[PATCH 0 of 3] Patches for diff and extdiff, version 3
Sune Foldager
cryo at cyanite.org
Thu Oct 9 11:04:58 CDT 2008
This time there are three patches:
- One adds -c and --switch-parent to hg diff.
- One does the same for hg extdiff.
- One adds 3-way diff to hg extdiff.
The 3-way patch is based on the other extdiff patch, although they don't
really have too much in common wrt. their changes.
The modes work as follows:
-c (--changeset):
Diffs the selected revision (or working directory) against its parent
(and second parent, for 3-way). Additionally, -c is implied when no
revision is given, i.e. when diffing wd against '.'.
--switch-parent:
When -c is active, diffs against the second parent instead of the first.
In three way mode, swaps the two parents, if applicable. In both cases
an error will be reported if there is only one parent.
3-way mode is activated when the following conditions are fulfilled:
1. The extdiff -o contains '$second', and...
2. The selected revision (or working directory) has two parents.
The 3-way patch in general adds the following substitution tokens to be used
in extdiff command options:
$child The child, i.e. the selected revision (file or directory)
$first The first parent (file or directory)
$second The second parent, if any (file or directory)
The default is '$first $child', as before. Comments and suggestions are welcome!
-- Sune.
More information about the Mercurial-devel
mailing list