##// END OF EJS Templates
diff: add --inverse option...
diff: add --inverse option Most of the time, one can reverse a diff by swapping the revisions passed with -r but it happens that if you use the global -R, and diff against the tip of the current repo, you can't swap the revisions. One use-case for that is reviewing changes from a bundle before unbundling. One could also pipe the output of `hg diff` to a command line filter that reverses the diff, but that would remove the benefit from color diffs. Therefore, having an option in `hg diff` to reverse a diff is a good thing. The option flag selection was tricky. GNU patch uses -R/--reverse but -R is already used as a global option and --reverse would make --rev ambiguous.

File last commit:

r4115:c95060a5 default
r9725:3f522d2f default
Show More
test-rename-dir-merge2
28 lines | 279 B | text/plain | TextLexer
/ tests / test-rename-dir-merge2
#!/bin/sh
mkdir r1
cd r1
hg init
mkdir a
echo foo > a/f
hg add a
hg ci -m "a/f == foo"
cd ..
hg clone r1 r2
cd r2
hg mv a b
echo foo1 > b/f
hg ci -m" a -> b, b/f == foo1"
cd ..
cd r1
mkdir a/aa
echo bar > a/aa/g
hg add a/aa
hg ci -m "a/aa/g"
hg pull ../r2
hg merge
hg st -C