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.
Product Version = NetBeans IDE 7.2 RC1 (Build 201206272359) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_05 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.1-b03 When files are reverted, operation finishes, but file open in editor is not refreshed - which can cause major problem. Steps to reproduce: 1. Check out file from svn 2. Modify it 3. save 4. From Subversion menu select "Revert modifications" 5. File on disk is reverted, but editor keeps modified version
Created attachment 121674 [details] IDE log
I've changed priority to P1, because according to http://wiki.netbeans.org/BugPriorityGuidelines it can be classified as "User's data are corrupted or lost" This revert issue already caused some problems for me.
Reproducible in both 7.2 RC and trunk on default settings. Doesn't happen with javahl and cmd clients, just with svnkit. Also it doesn't happen on working copies in svn 1.6 format. If the problem is coming from svnkit, at least hotfix to prevent this behavior should be put into 7.2.
svnkit restores the files timestamp back to the past value when the last commit was made. CloneableEditorSupport.Listener.propertyChange is notified about the file change but doesn't reload the document because the delivered PROP_TIME new value (files timestamp) < lastSaveTime. one more thing: a) the problem is reproducible on Mac only when the revert action is invoked from the editor tab context menu or the main menu - in such case usually PROP_TIME new value = files timestamp, but might be from time to time also -1 like in b) b) in case the revert action is invoked from the versioning status view or the projects view then PROP_TIME new value = -1 and the document is refreshed a possible workaround in subversion would be to reset the files timestamp to lastSaveTime after revert, don't know though what side effects that would have on the svnkit-s behavior. Also that other similar commands may cause the same problem - e.g. svn update $rev, svn switch, ... Preferably the IDE should reload the document even if the timestamp is older then lastSaveTime. Other external tools might cause similar scenarios! cc Mila and Jarda, maybe they will have some idea ...
I've made a fix in CloneableEditorSupport with an initial threshold of 10secs time difference - we should discuss the fix once Yarda is back. Initial testing of behavior is ok - the file with an older timestamp reloads opened editor. Tests in openide.text pass ok after the fix. http://hg.netbeans.org/jet-main/rev/29758473fe48
Integrated into 'main-golden', will be available in build *201207040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/29758473fe48 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #215099 - SVN REVERT does not refresh file in editor.
mhankus, please could you verify the fix on bits from http://bits.netbeans.org/download/trunk/nightly/2012-07-04_00-02-20/ Thanks
Works for me too. Thank you for quick fix ;)
Fix verified by QE in trunk. If there are no objections, please integrate into release72 branch.
(In reply to comment #9) > Fix verified by QE in trunk. If there are no objections, please integrate into > release72 branch. Thanks for verification - backported to release72 - http://hg.netbeans.org/releases/rev/53c0450cbe9b
Integrated into 'releases', will be available in build *201207092359* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/53c0450cbe9b User: Miloslav Metelka <mmetelka@netbeans.org> Log: #215099 - SVN REVERT does not refresh file in editor. (transplanted from 29758473fe48b727aae81091cbb3fe6a0062b390)
verified in 7.2