comparison tests/test-rebase-cache @ 10547:bae9bb09166b stable

strip: invalidate all caches after stripping (fixes issue1951) test thanks to Stefano Tortarolo
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 21 Feb 2010 20:59:27 +0100
parents
children b345b1cc124f
comparison
equal deleted inserted replaced
10546:3a69afd6987e 10547:bae9bb09166b
1 #!/bin/sh
2
3 createrepo() {
4 rm -rf repo
5 hg init repo
6 cd repo
7
8 echo "a" > a
9 hg commit -d '0 0' -A -m 'A'
10
11 hg branch branch1
12 hg commit -d '1 0' -m 'Branch1'
13
14 echo "b" > b
15 hg commit -A -d '2 0' -m 'B'
16
17 hg up 0
18 hg branch branch2
19 hg commit -d '3 0' -m 'Branch2'
20
21 echo "c" > C
22 hg commit -A -d '4 0' -m 'C'
23
24 hg up 2
25 hg branch -f branch2
26 echo "d" > d
27 hg commit -A -d '5 0' -m 'D'
28
29 echo "e" > e
30 hg commit -A -d '6 0' -m 'E'
31
32 hg update default
33
34 hg branch branch3
35 hg commit -d '7 0' -m 'Branch3'
36
37 echo "f" > f
38 hg commit -A -d '8 0' -m 'F'
39 }
40
41 echo
42 createrepo > /dev/null 2>&1
43 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
44
45 echo
46 echo '% Branches'
47 hg branches
48
49 echo
50 echo '% Heads'
51 hg heads --template '{rev}:{node|short} {desc} branch: {branches}\n'
52
53 echo
54 echo '% Rebase part of branch2 (5-6) onto branch3 (8)'
55 hg --config extensions.hgext.rebase= rebase --detach -s 5 -d 8 2>&1 | sed 's/\(saving bundle to \).*/\1/'
56
57 echo
58 echo '% Branches'
59 hg branches
60
61 echo
62 echo '% Heads'
63 hg heads --template '{rev}:{node|short} {desc} branch: {branches}\n'
64
65 echo
66 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
67
68 echo
69 echo '% Rebase head of branch3 (8) onto branch2 (6)'
70 createrepo > /dev/null 2>&1
71 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
72
73 hg --config extensions.hgext.rebase= rebase --detach -s 8 -d 6 2>&1 | sed 's/\(saving bundle to \).*/\1/'
74
75 echo
76 echo '% Branches'
77 hg branches
78
79 echo
80 echo '% Heads'
81 hg heads --template '{rev}:{node|short} {desc} branch: {branches}\n'
82
83 echo
84 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
85 hg verify -q
86
87 echo
88 echo '% Rebase entire branch3 (7-8) onto branch2 (6)'
89 createrepo > /dev/null 2>&1
90 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
91
92 hg --config extensions.hgext.rebase= rebase --detach -s 7 -d 6 2>&1 | sed 's/\(saving bundle to \).*/\1/'
93
94 echo
95 echo '% Branches'
96 hg branches
97
98 echo
99 echo '% Heads'
100 hg heads --template '{rev}:{node|short} {desc} branch: {branches}\n'
101
102 echo
103 hg --config extensions.hgext.graphlog= glog --template '{rev}:{node|short} {desc} branch: {branches}\n'
104 hg verify -q