Mercurial > hg
annotate tests/test-mq-qfold @ 9857:24bc6e414610
diff: change --inverse to --reverse
This fixes an incompatibility with patch(1), which also uses --reverse
for reversed diffs. The --inverse flag was added in 3f522d2fa633. That
name was chosen over --reverse since it was thought that --reverse
would make --rev ambiguous.
It turns out that both flags can co-exist, with the cost that --rev
can no longer be shortened to --r and --re. Since one can always use
the short -r option, this is not a real problem.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 14 Nov 2009 14:21:53 +0100 |
parents | 2ff17c4de1da |
children | 296a0b14a686 |
rev | line source |
---|---|
8426 | 1 #!/bin/sh |
2 | |
3 echo "[extensions]" >> $HGRCPATH | |
4 echo "mq=" >> $HGRCPATH | |
5 | |
6 filterdiff() | |
7 { | |
8 grep -v diff | \ | |
9 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
10 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
11 } | |
12 | |
13 echo '% init' | |
14 hg init repo | |
15 cd repo | |
16 echo a > a | |
17 hg ci -Am adda | |
18 echo a >> a | |
19 hg qnew -f p1 | |
20 echo b >> a | |
21 hg qnew -f p2 | |
22 echo c >> a | |
23 hg qnew -f p3 | |
24 echo '% fold in the middle of the queue' | |
25 hg qpop p1 | |
26 hg qdiff | filterdiff | |
27 hg qfold p2 | |
28 hg qser | |
29 hg qdiff | filterdiff | |
30 echo '% fold with local changes' | |
31 echo d >> a | |
32 hg qfold p3 | |
33 hg diff -c . | filterdiff | |
34 cd .. | |
35 | |
36 |