author | Vadim Gelfer <vadim.gelfer@gmail.com> |
Wed, 03 May 2006 14:35:17 -0700 | |
changeset 2191 | c2e43535d4d1 |
parent 2186 | 1092533fd11c |
child 2492 | 2f4addf56715 |
permissions | -rwxr-xr-x |
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 |
||
51 |
exit 0 |