Mercurial > hg
diff tests/test-graft.t @ 26228:0fd20a71abdb
extdiff: add a --patch argument for diffing changeset deltas
One of the things I missed the most when transitioning from versioned MQ to
evolve was the loss of being able to check that rebase conflicts were properly
resolved by:
$ hg ci --mq -m "before"
$ hg rebase -s qbase -d tip
$ hg bcompare --mq
The old csets stay in the tree with evolve, but a straight diff includes all of
the other changes that were pulled in, obscuring the code that was rebased.
Diffing deltas can be confusing, but unless radical changes were made during the
resolve, it is very clear when individual hunks are added, dropped or modified.
Unlike the MQ technique, this can only compare a single pair of csets/patches at
a time. Like the MQ method, this also highlights changes in the commit comment
and other metadata.
I originally tried monkey patching from the evolve extension, but that is too
complicated given that it depends on the order the two different extensions are
loaded. This functionality is also useful when comparing grafts however, so
implementing it in the core is more than just convenience.
The --change argument doesn't make much sense for this, but it isn't harmful so
I didn't bother blocking it. The -I/-X options are ignored because of a
limitation of cmdutil.export(). We'll fix that next.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 09 Sep 2015 21:07:38 -0400 |
parents | 273d94255e1e |
children | d1530c6e8613 |
line wrap: on
line diff
--- a/tests/test-graft.t Wed Sep 09 20:48:09 2015 -0400 +++ b/tests/test-graft.t Wed Sep 09 21:07:38 2015 -0400 @@ -332,6 +332,38 @@ skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) [255] + $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 + --- */hg-5c095ad7e90f.patch * +0000 (glob) + +++ */hg-7a4785234d87.patch * +0000 (glob) + @@ -1,18 +1,18 @@ + # HG changeset patch + -# User test + +# User foo + # Date 0 0 + # Thu Jan 01 00:00:00 1970 +0000 + -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 + -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 + +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 + +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f + 2 + + -diff -r 5d205f8b35b6 -r 5c095ad7e90f a + +diff -r b592ea63bb0c -r 7a4785234d87 a + --- a/a Thu Jan 01 00:00:00 1970 +0000 + +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 + @@ -1,1 +0,0 @@ + --b + -diff -r 5d205f8b35b6 -r 5c095ad7e90f b + +-a + +diff -r b592ea63bb0c -r 7a4785234d87 b + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/b Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + -+b + ++a + [1] + + Disallow grafting already grafted csets with the same origin onto each other $ hg up -q 13 $ hg graft 2