[PATCH 0 of 1] 3-way diff mode in extdiff, for merge changesets
Sune Foldager
cryo at cyanite.org
Thu Sep 17 14:23:08 CDT 2009
This enables you to use an external differ capable of 3-way diffs to view both parents
of merge changesets as well as pending merges. Normal changesets will be viewed as before,
altohugh the diff program must support the 'second parent' argument simply left out for
that to work (kdiff3, for instance, does that fine).
Some comments and design:
- Might not be as fast as possible due to the use of a lot of sets and set operations,
but I wanted to keep the code more clear.
- Works around what at least _used_ to be an issue where repo.status would return some
weird results on merge changesets in some cases, leading extdiff to do the wrong thing
when there was only one file to diff. It's been so long since I coded this, so I forget
the exact problem, nor do I know if it has been fixed in the mean time. The workaround
doesn't seem to mess anything up, though.
- Introduces magic tokens $parent1, $parent2 and $child which can be used in the diff
command argument template. The default is '$parent1 $child', which will give the existing
behavior. I realize we use $local, $other and $base in other places, but they seem quite
weird in this context, so I introduced new ones.
Having used this for some time in our setup at work, I can say that's a _really_ nice
feature to have, so I hope we can get it included in one form or another.
/Sune
More information about the Mercurial-devel
mailing list