annotate tests/test-rebase-mq-skip @ 11843:00f8e7837668 stable

rebase: recompute the set of skipped rev when using --continue (issue2330)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 13 Aug 2010 18:02:02 +0200
parents 2313dc4d9817
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
1 #!/bin/sh
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
2 # This emulates the effects of an hg pull --rebase in which the remote repo
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
3 # already has one local mq patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
4
11208
2313dc4d9817 tests: fix bashism to load helpers.sh
Yuya Nishihara <yuya@tcha.org>
parents: 11198
diff changeset
5 . $TESTDIR/helpers.sh
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
6
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
7 echo "[extensions]" >> $HGRCPATH
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
8 echo "graphlog=" >> $HGRCPATH
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
9 echo "rebase=" >> $HGRCPATH
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
10 echo "mq=" >> $HGRCPATH
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
11
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
12 hg init a
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
13 cd a
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
14 hg qinit -c # This must work even with a managed mq queue
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
15
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
16 echo 'c1' > c1
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
17 hg add c1
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 6906
diff changeset
18 hg commit -d '0 0' -m "C1"
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
19
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
20 echo 'r1' > r1
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
21 hg add r1
8168
8766fee6f225 tests: removed redundant "-u test" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 6906
diff changeset
22 hg commit -d '1 0' -m "R1"
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
23
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
24 hg up 0
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
25 hg qnew p0.patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
26 echo 'p0' > p0
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
27 hg add p0
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
28 hg qref -m 'P0'
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
30 hg qnew p1.patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
31 echo 'p1' > p1
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
32 hg add p1
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
33 hg qref -m 'P1'
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
34 hg export qtip > p1.patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
35
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
36 echo
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
37 echo '% "Mainstream" import p1.patch'
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
38 hg up -C 1
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
39 hg import p1.patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
40 rm p1.patch
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
41
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
42 echo
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
43 echo '% Rebase'
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
44 hg up -C qtip
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
45 hg rebase | hidebackup
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
46 hg glog --template '{rev} {desc} tags: {tags}\n'
11843
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
47
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
48 echo
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
49 echo '% Now with --continue'
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
50 cd ..
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
51 hg init b
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
52 cd b
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
53 hg qinit -c # This must work even with a managed mq queue
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
54
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
55 for i in r0 r1 r2 r3 r4 r5 r6;
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
56 do
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
57 echo $i > $i
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
58 hg ci -Am $i
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
59 done
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
60 hg qimport -r 1:tip
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
61 hg up 0
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
62 for i in r1 r3 r7 r8;
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
63 do
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
64 echo $i > $i
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
65 hg ci -Am branch2-$i
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
66 done
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
67 echo somethingelse > r4
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
68 hg ci -Am branch2-r4
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
69 echo r6 > r6
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
70 hg ci -Am branch2-r6
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
71
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
72 hg up qtip
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
73 HGMERGE=internal:fail hg rebase | hidebackup
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
74 HGMERGE=internal:local hg resolve --all
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
75 hg rebase --continue | hidebackup
00f8e7837668 rebase: recompute the set of skipped rev when using --continue (issue2330)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 11208
diff changeset
76 hg glog --template '{rev} {desc} tags: {tags}\n'