Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-backout @ 2551:764a54eb8c5a
merge with crew.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Mon, 03 Jul 2006 10:19:09 -0700 |
parents | 2f4addf56715 |
children | 8ba1c31f6864 |
rev | line source |
---|---|
2158 | 1 #!/bin/sh |
2 | |
3 echo '# basic operation' | |
4 hg init basic | |
5 cd basic | |
6 echo a > a | |
7 hg commit -d '0 0' -A -m a | |
8 echo b >> a | |
9 hg commit -d '1 0' -m b | |
10 | |
11 hg backout -d '2 0' tip | |
12 cat a | |
13 | |
14 echo '# file that was removed is recreated' | |
15 cd .. | |
16 hg init remove | |
17 cd remove | |
18 | |
19 echo content > a | |
20 hg commit -d '0 0' -A -m a | |
21 | |
22 hg rm a | |
23 hg commit -d '1 0' -m b | |
24 | |
25 hg backout -d '2 0' --merge tip | |
26 cat a | |
27 | |
28 echo '# backout of backout is as if nothing happened' | |
29 | |
30 hg backout -d '3 0' --merge tip | |
2186
1092533fd11c
tests: fix compatibility on Solaris
TK Soh <teekaysoh@yahoo.com>
parents:
2158
diff
changeset
|
31 cat a 2>/dev/null || echo cat: a: No such file or directory |
2158 | 32 |
33 echo '# backout with merge' | |
34 cd .. | |
35 hg init merge | |
36 cd merge | |
37 | |
38 echo line 1 > a | |
39 hg commit -d '0 0' -A -m a | |
40 | |
41 echo line 2 >> a | |
42 hg commit -d '1 0' -m b | |
43 | |
44 echo line 3 >> a | |
45 hg commit -d '2 0' -m c | |
46 | |
47 hg backout --merge -d '3 0' 1 | |
48 hg commit -d '4 0' -m d | |
49 cat a | |
50 | |
2492 | 51 echo '# backout should not back out subsequent changesets' |
52 hg init onecs | |
53 cd onecs | |
54 echo 1 > a | |
55 hg commit -d '0 0' -A -m a | |
56 echo 2 >> a | |
57 hg commit -d '1 0' -m b | |
58 echo 1 > b | |
59 hg commit -d '2 0' -A -m c | |
60 hg backout -d '3 0' 1 | |
61 hg locate b | |
62 | |
2158 | 63 exit 0 |