equal
deleted
inserted
replaced
1 #!/bin/sh |
|
2 |
|
3 hg init a |
|
4 cd a |
|
5 echo 'root' >root |
|
6 hg add root |
|
7 hg commit -d '0 0' -m "Adding root node" |
|
8 |
|
9 echo 'a' >a |
|
10 hg add a |
|
11 hg branch a |
|
12 hg commit -d '1 0' -m "Adding a branch" |
|
13 |
|
14 hg branch q |
|
15 echo 'aa' >a |
|
16 hg branch -C |
|
17 hg commit -d '2 0' -m "Adding to a branch" |
|
18 |
|
19 hg update -C 0 |
|
20 echo 'b' >b |
|
21 hg add b |
|
22 hg branch b |
|
23 hg commit -d '2 0' -m "Adding b branch" |
|
24 |
|
25 echo 'bh1' >bh1 |
|
26 hg add bh1 |
|
27 hg commit -d '3 0' -m "Adding b branch head 1" |
|
28 |
|
29 hg update -C 2 |
|
30 echo 'bh2' >bh2 |
|
31 hg add bh2 |
|
32 hg commit -d '4 0' -m "Adding b branch head 2" |
|
33 |
|
34 echo 'c' >c |
|
35 hg add c |
|
36 hg branch c |
|
37 hg commit -d '5 0' -m "Adding c branch" |
|
38 |
|
39 hg branch tip |
|
40 hg branch null |
|
41 hg branch . |
|
42 |
|
43 echo 'd' >d |
|
44 hg add d |
|
45 hg branch 'a branch name much longer than the default justification used by branches' |
|
46 hg commit -d '6 0' -m "Adding d branch" |
|
47 |
|
48 hg branches |
|
49 echo '-------' |
|
50 hg branches -a |
|
51 |
|
52 echo "--- Branch a" |
|
53 hg log -b a |
|
54 |
|
55 echo "---- Branch b" |
|
56 hg log -b b |
|
57 |
|
58 echo "---- going to test branch closing" |
|
59 hg branches |
|
60 hg up -C b |
|
61 echo 'xxx1' >> b |
|
62 hg commit -d '7 0' -m 'adding cset to branch b' |
|
63 hg up -C aee39cd168d0 |
|
64 echo 'xxx2' >> b |
|
65 hg commit -d '8 0' -m 'adding head to branch b' |
|
66 echo 'xxx3' >> b |
|
67 hg commit -d '9 0' -m 'adding another cset to branch b' |
|
68 hg branches |
|
69 hg heads --closed |
|
70 hg heads |
|
71 hg commit -d '9 0' --close-branch -m 'prune bad branch' |
|
72 hg branches -a |
|
73 hg up -C b |
|
74 hg commit -d '9 0' --close-branch -m 'close this part branch too' |
|
75 echo '--- b branch should be inactive' |
|
76 hg branches |
|
77 hg branches -c |
|
78 hg branches -a |
|
79 hg heads b |
|
80 hg heads --closed b |
|
81 echo 'xxx4' >> b |
|
82 hg commit -d '9 0' -m 'reopen branch with a change' |
|
83 echo '--- branch b is back in action' |
|
84 hg branches -a |
|
85 echo '---- test heads listings' |
|
86 hg heads |
|
87 echo '% branch default' |
|
88 hg heads default |
|
89 echo '% branch a' |
|
90 hg heads a |
|
91 hg heads --active a |
|
92 echo '% branch b' |
|
93 hg heads b |
|
94 hg heads --closed b |
|