##// 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:

r3853:c0b44915 default
r9725:3f522d2f default
Show More
test-copy
30 lines | 725 B | text/plain | TextLexer
Thomas Arendsen Hein
Remove bashisms and use /bin/sh instead of /bin/bash....
r544 #!/bin/sh
mpm@selenic.com
Add hg copy...
r363
hg init
echo a > a
hg add a
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg commit -m "1" -d "1000000 0"
mpm@selenic.com
Add hg copy...
r363 hg status
hg copy a b
hg status
Thomas Arendsen Hein
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero....
r1933 hg --debug commit -m "2" -d "1000000 0"
mpm@selenic.com
Update tests
r1043 echo "we should see two history entries"
hg history -v
echo "we should see one log entry for a"
mpm@selenic.com
Add hg copy...
r363 hg log a
mpm@selenic.com
Update tests
r1043 echo "this should show a revision linked to changeset 0"
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 hg debugindex .hg/store/data/a.i
mpm@selenic.com
Update tests
r1043 echo "we should see one log entry for b"
hg log b
echo "this should show a revision linked to changeset 1"
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 hg debugindex .hg/store/data/b.i
mpm@selenic.com
Update tests
r1043
echo "this should show the rename information in the metadata"
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2
mpm@selenic.com
Update tests
r1043
Benoit Boissinot
switch to the .hg/store layout, fix the tests
r3853 $TESTDIR/md5sum.py .hg/store/data/b.i
mpm@selenic.com
Fix pipe timing for copy test...
r462 hg cat b > bsum
Peter van Dijk
fix testsuite for freebsd and one timingissue
r1923 $TESTDIR/md5sum.py bsum
mpm@selenic.com
Fix pipe timing for copy test...
r462 hg cat a > asum
Peter van Dijk
fix testsuite for freebsd and one timingissue
r1923 $TESTDIR/md5sum.py asum
mpm@selenic.com
Add hg copy...
r363 hg verify