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 echo '% hg update -C 8' |
|
52 hg update -C 8 |
|
53 |
|
54 echo '% hg branch some-branch' |
|
55 hg branch some-branch |
|
56 echo '% hg commit' |
|
57 hgcommit -m 'started some-branch' |
|
58 echo '% hg commit --close-branch' |
|
59 hgcommit --close-branch -m 'closed some-branch' |
|
60 |
|
61 echo '% hg update default' |
|
62 hg update default |
|
63 echo '% hg merge some-branch' |
|
64 hg merge some-branch |
|
65 echo '% hg commit (no reopening of some-branch)' |
|
66 hgcommit -m 'merge with closed branch' |
|
67 |
|
68 cat >> $HGRCPATH <<EOF |
|
69 [extensions] |
|
70 graphlog = |
|
71 EOF |
|
72 |
|
73 #hg glog |
|