This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 13017 - Changes from ALL VCS FSs do not refresh file in editor
Summary: Changes from ALL VCS FSs do not refresh file in editor
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords:
: 13959 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-06-20 14:41 UTC by Ivana Ladenbergerova
Modified: 2008-12-23 10:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivana Ladenbergerova 2001-06-20 14:41:59 UTC
Using VSS on Windows 2000 as Versioning System.

1. Check out a file
2. make some changes in the editor
3. undo check out the file

Now the file on disk is in its old version, but the editor window still has the 
new (and discarded) version.

The same applies if you check out or get latest version. It never refreshes the 
file in the editor window.

This is bad, because if you check out and check in then you have unwanted 
changes in VSS, because file in editor and file from VSS were not in sync.



***  [FFJ CUSTBUG] This issue is based on a FFJ customer's bug report ***
Comment 1 dmladek 2001-07-25 15:34:07 UTC
The original Summary was: 

"Changes from VSS do not refresh file in editor"

----------------------------------------------------------------



This broblem occures in general affects all used version control system in ide.



For CVS modules(JavaCVS,cvsvcs,Genericvcs-cvs) the reproduction is following:

---------------------------------------------------

User u1= USER No.1;

User u2= USER No.2;



u1 create, add & commit file

u2 update his FS, so this file appears in his FS

u1 modify, save & commit file

u2 modify file and MUST update it!

-----------------------------------

File is merged on disk and also is created backup 

(#_file....). BUT u2 see still the same version of file in the editor. Any other modification and saving this file override merged version on the disk and causes DATALOST.



I increase the priority because of potencional datalost





Comment 2 Martin Entlicher 2001-07-25 16:09:23 UTC
I've found this piece of code in AbstractFileObject:
// JST: Seems like the lastModified () time can vary a bit on NT (up
to 500ms)
//        if (!l.equals (lastModified)) {
//
if (Math.abs(lastModified.getTime() - l.getTime ()) >= 5000) {

    lastModified = l;

    if (hasAtLeastOneListeners ()) {
       FileEvent ev = new FileEvent (this, this, expected);
       fileChanged0 (ev);
    }
}

In other words it means, that the change, which is done in less then 5
seconds is ignored. This might be the problem.
Therefore I reassign this to openide.
Can the 5000ms be changed to 500ms or at least 1000ms to minimize the
impact? I can not believe, that Win NT ignores changes done in 5sec.
Otherwise please add a check for Windows so that it will run at least
on real OS.
Comment 3 Jiri Kovalsky 2001-07-26 12:22:14 UTC
*** Issue 13959 has been marked as a duplicate of this issue. ***
Comment 4 Jan Zajicek 2001-07-27 13:10:35 UTC
assigning to proper subcomponent (filesystems)
Comment 5 Jan Zajicek 2001-08-08 14:59:43 UTC
assigning
Comment 6 rmatous 2001-08-24 17:58:08 UTC
Fixed in main trunk. The strange condition is not present any more. 
Comment 7 pzajac 2003-02-12 15:51:00 UTC
very old