equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 |
|
3 . $TESTDIR/helpers.sh |
|
4 |
|
5 echo "[extensions]" >> $HGRCPATH |
|
6 echo "graphlog=" >> $HGRCPATH |
|
7 echo "rebase=" >> $HGRCPATH |
|
8 |
|
9 createrepo() { |
|
10 rm -rf repo |
|
11 hg init repo |
|
12 cd repo |
|
13 echo 'c1' >common |
|
14 hg add common |
|
15 hg commit -d '0 0' -m "C1" |
|
16 |
|
17 echo 'c2' >>common |
|
18 hg commit -d '1 0' -m "C2" |
|
19 |
|
20 echo 'c3' >>common |
|
21 hg commit -d '2 0' -m "C3" |
|
22 |
|
23 hg update -C 1 |
|
24 echo 'l1' >>extra |
|
25 hg add extra |
|
26 hg commit -d '3 0' -m "L1" |
|
27 |
|
28 sed -e 's/c2/l2/' common > common.new |
|
29 mv common.new common |
|
30 hg commit -d '4 0' -m "L2" |
|
31 } |
|
32 |
|
33 echo |
|
34 createrepo > /dev/null 2>&1 |
|
35 hg --config extensions.hgext.graphlog= glog --template '{rev}: {desc}\n' |
|
36 |
|
37 echo |
|
38 echo '% Conflicting rebase' |
|
39 hg --config extensions.hgext.rebase= rebase -s 3 -d 2 | cleanrebase |
|
40 |
|
41 echo |
|
42 echo '% Abort' |
|
43 hg --config extensions.hgext.rebase= rebase --abort | cleanrebase |
|
44 |
|
45 hg --config extensions.hgext.graphlog= glog --template '{rev}: {desc}\n' |
|
46 |
|
47 createrepo() { |
|
48 rm -rf repo |
|
49 hg init repo |
|
50 cd repo |
|
51 echo "a">a |
|
52 hg ci -A -m'A' |
|
53 echo "b">b |
|
54 hg ci -A -m'B' |
|
55 echo "c">c |
|
56 hg ci -A -m'C' |
|
57 hg up 0 |
|
58 echo "b">b |
|
59 hg ci -A -m'B bis' |
|
60 echo "c1">c |
|
61 hg ci -A -m'C1' |
|
62 } |
|
63 echo |
|
64 echo '% Rebase and abort without generating new changesets' |
|
65 |
|
66 echo |
|
67 createrepo > /dev/null 2>&1 |
|
68 hg --config extensions.hgext.graphlog= glog --template '{rev}:{desc|short}\n' |
|
69 |
|
70 hg --config extensions.hgext.rebase= rebase -b 4 -d 2 | cleanrebase |
|
71 |
|
72 hg --config extensions.hgext.graphlog= glog --template '{rev}:{desc|short}\n' |
|
73 |
|
74 hg rebase -a | cleanrebase |
|
75 hg glog --template '{rev}:{desc|short}\n' |
|
76 |
|