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.
Summary: | Editor displays difference on line after "Push to default" | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | Petr Dvorak <joshis> |
Component: | Mercurial | Assignee: | issues@versioncontrol <issues> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | jlahoda |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | proposed patch |
Description
Petr Dvorak
2008-05-13 10:55:29 UTC
I can reproduce this problem. Transferring to editor for help in understanding that causes the green mark to be displayed. No idea why this was reassigned to the editor - the green mark is provided by the versioning system and generally means that the file is modified when compared with the repository version. Please note that the displayed status is inconsistent - the file is marked as up-to-date (black) in projects tab, but yet the line is marked as added. This has to be fixed in mercurial ... it seems that getOriginalFile() method returns a wrong version of the file thus causing inline diff to show differences. The method is called every time a file is opened in editor. I see no evidence that getOriginalFile is being called when step 4 (switch to tab of original file) is done I am seeing DiffSideBar$RefreshDiffTask.fetchOriginalContent being called and originalContentBufferSerial = originalContentSerial so getText is not called. My understaning is that getText is what causes getOriginalFile to be called. if I add a call to initialize() to insertUpdate in DiffSidebar.java the problem does not occur. After the call to hg push, hg update is called on the target repository and this causes Main.java to be changed in the working directory. It looks like DiffSidebar.java is not aware that getOriginalFile need to be called on Main.java. originalContentBufferSerial == originalContentSerial is an indication that the diff sidebar did not detect any change in the file status. In this case, it is still mercurial to blame ;-) You need to fire status change event for that file from MercurialVCS so that diff sidebar refreshes its cache. Created attachment 61907 [details]
proposed patch
I have added -v option to HgCommand.doUpdateAll to get the list of file which are changed by hg update command. Then fire sttaus change for each file. This seems to fix the problem. changeset: 81563:69ec3771b81c tag: tip user: padraigob@netbeans.org date: Mon May 26 11:59:55 2008 +0100 summary: 134937: Fire status change event for files updated after push Same problem exists for local Pull. Logged issue 136066 for pull issue so marking this bug as fixed.. Verified (200806240008) |