equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 hgcommit() { |
|
4 hg commit -u user -d '0 0' "$@" |
|
5 } |
|
6 |
|
7 hg init clhead |
|
8 cd clhead |
|
9 |
|
10 |
|
11 touch foo && hg add && hgcommit -m 'foo' |
|
12 touch bar && hg add && hgcommit -m 'bar' |
|
13 touch baz && hg add && hgcommit -m 'baz' |
|
14 |
|
15 echo "flub" > foo |
|
16 hgcommit -m "flub" |
|
17 echo "nub" > foo |
|
18 hgcommit -m "nub" |
|
19 |
|
20 hg up -C 2 |
|
21 |
|
22 echo "c1" > c1 |
|
23 hg add c1 |
|
24 hgcommit -m "c1" |
|
25 echo "c2" > c1 |
|
26 hgcommit -m "c2" |
|
27 |
|
28 hg up -C 2 |
|
29 |
|
30 echo "d1" > d1 |
|
31 hg add d1 |
|
32 hgcommit -m "d1" |
|
33 echo "d2" > d1 |
|
34 hgcommit -m "d2" |
|
35 hg tag -l good |
|
36 |
|
37 echo '% fail with three heads' |
|
38 hg up -C good |
|
39 hg merge |
|
40 |
|
41 echo '% close one of the heads' |
|
42 hg up -C 6 |
|
43 hgcommit -m 'close this head' --close-branch |
|
44 |
|
45 echo '% succeed with two open heads' |
|
46 hg up -C good |
|
47 hg up -C good |
|
48 hg merge |
|
49 hgcommit -m 'merged heads' |
|
50 |
|
51 |