Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 134775 - Automated Merge Diff not displaying correctly
Automated Merge Diff not displaying correctly
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
All Windows XP
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
Depends on:
  Show dependency treegraph
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

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

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, commit
C-Swing: added Help Menu in, 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
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
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]
Comment 5 Quality Engineering 2008-05-20 05:08:15 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #206 build
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
Comment 7 Peter Pis 2008-06-04 13:31:17 UTC
Comment 8 Peter Pis 2008-06-19 10:25:36 UTC
Verified with patch2.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo