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 134775 - Automated Merge Diff not displaying correctly
Summary: Automated Merge Diff not displaying correctly
Status: VERIFIED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-09 14:50 UTC by John Rice
Modified: 2008-07-10 15:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
main_work_80047_3b13fc76f535-diff-common-ancestor.patch (12.45 KB, text/plain)
2008-05-16 12:41 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Rice 2008-05-09 14:50:07 UTC
Cloned OpenJDK as described on the MercurialNetBeans wiki JavaOne2008 BOF slides, speaker notes.

Had Source Swing project and Clone Swing project:
S-Swing: changed L&F in SampleTree.java, commit
C-Swing: added Help Menu in SampleTree.java, commit
On C-Swing did Fetch from S-Swing to C-Swing (pull-merge-auto commit)
On C-Swing did Show Out and got two csets listed as expected, one for Help Menu change and one for automated merge for
Fetch.
Looked at diffs and get the same Help menu diff for both csets.
On C-Swing do View and can see the correct csets and correct diffs here. So something is gong wrong in the Show Out -
Diff window.
Comment 1 John Rice 2008-05-15 11:12:37 UTC
The diff is working correctly, it diffs the current rev (automated merge) against the child rev and this has the menu diff. 

What we see in hgk is that the diff is smart enough to figure out the current rev (automated merge) is the result of a
merge and so diffs the common ancestor of the two files that were used to create the automated merge, not one of the
immediate ancestors.
Comment 2 John Rice 2008-05-15 11:41:30 UTC
For a given rev we could see if it has multiple parents:
$ hg parents

If it does then we could use:
$ hg debugancestor <revP1> <revP2> to get the common ancestor
Then we would diff the current selected rev against the common ancestor.

This will add a performance hit when you want to do a diff in the Show command window, so may want to have this as an
option along lines of, "diff against common ancestor"
Comment 3 John Rice 2008-05-16 12:40:31 UTC
Can pick up parent info when the Search is performed and then when doing diff use this info to see if there are 2
parents. If there this must be a merge changeset so we then take the hit to check for the common ancestor.

changeset:   80224:88c624a8b5d3
tag:         tip
user:        jrice@netbeans.org
date:        Fri May 16 12:31:10 2008 +0100
summary:     #134775: Automated merge diff problem - need to diff common ancestor

Comment 4 John Rice 2008-05-16 12:41:07 UTC
Created attachment 61479 [details]
main_work_80047_3b13fc76f535-diff-common-ancestor.patch
Comment 5 Quality Engineering 2008-05-20 05:08:15 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #206 build
Changeset: http://hg.netbeans.org/main/rev/88c624a8b5d3
User: jrice@netbeans.org
Log: #134775: Automated merge diff problem - need to diff common ancestor
Comment 6 rbalada 2008-06-03 16:22:23 UTC
Backported into release61_fixes repository as http://hg.netbeans.org/release61_fixes/rev/095bdc9a925f
Comment 7 Peter Pis 2008-06-04 13:31:17 UTC
Verified.
Comment 8 Peter Pis 2008-06-19 10:25:36 UTC
Verified with patch2.