Show More
@@ -1,60 +1,127 b'' | |||||
1 | #!/bin/sh |
|
1 | test branch selection options | |
|
2 | ||||
|
3 | $ hg init branch | |||
|
4 | $ cd branch | |||
|
5 | $ hg branch a | |||
|
6 | marked working directory as branch a | |||
|
7 | $ echo a > foo | |||
|
8 | $ hg ci -d '0 0' -Ama | |||
|
9 | adding foo | |||
|
10 | $ echo a2 > foo | |||
|
11 | $ hg ci -d '0 0' -ma2 | |||
|
12 | $ hg up 0 | |||
|
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
14 | $ hg branch c | |||
|
15 | marked working directory as branch c | |||
|
16 | $ echo c > foo | |||
|
17 | $ hg ci -d '0 0' -mc | |||
|
18 | $ hg tag -l z | |||
|
19 | $ cd .. | |||
|
20 | $ hg clone -r 0 branch branch2 | |||
|
21 | requesting all changes | |||
|
22 | adding changesets | |||
|
23 | adding manifests | |||
|
24 | adding file changes | |||
|
25 | added 1 changesets with 1 changes to 1 files | |||
|
26 | updating to branch a | |||
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
28 | $ cd branch2 | |||
|
29 | $ hg up 0 | |||
|
30 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
31 | $ hg branch b | |||
|
32 | marked working directory as branch b | |||
|
33 | $ echo b > foo | |||
|
34 | $ hg ci -d '0 0' -mb | |||
|
35 | $ hg up 0 | |||
|
36 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
37 | $ hg --encoding utf-8 branch æ | |||
|
38 | marked working directory as branch æ | |||
|
39 | $ echo ae1 > foo | |||
|
40 | $ hg ci -d '0 0' -mae1 | |||
|
41 | $ hg up 0 | |||
|
42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
43 | $ hg --encoding utf-8 branch -f æ | |||
|
44 | marked working directory as branch æ | |||
|
45 | $ echo ae2 > foo | |||
|
46 | $ hg ci -d '0 0' -mae2 | |||
|
47 | created new head | |||
|
48 | $ hg up 0 | |||
|
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
50 | $ hg branch -f b | |||
|
51 | marked working directory as branch b | |||
|
52 | $ echo b2 > foo | |||
|
53 | $ hg ci -d '0 0' -mb2 | |||
|
54 | created new head | |||
|
55 | ||||
|
56 | unknown branch and fallback | |||
|
57 | ||||
|
58 | $ hg in -qbz | |||
|
59 | abort: unknown branch 'z'! | |||
|
60 | $ hg in -q ../branch#z | |||
|
61 | 2:f25d57ab0566 | |||
|
62 | $ hg out -qbz | |||
|
63 | abort: unknown branch 'z'! | |||
2 |
|
64 | |||
3 | # test branch selection options |
|
65 | in rev c branch a | |
4 | hg init branch |
|
66 | ||
5 | cd branch |
|
67 | $ hg in -qr c ../branch#a | |
6 | hg branch a |
|
68 | 1:dd6e60a716c6 | |
7 | echo a > foo |
|
69 | 2:f25d57ab0566 | |
8 | hg ci -d '0 0' -Ama |
|
70 | $ hg in -qr c -b a | |
9 | echo a2 > foo |
|
71 | 1:dd6e60a716c6 | |
10 | hg ci -d '0 0' -ma2 |
|
72 | 2:f25d57ab0566 | |
11 | hg up 0 |
|
73 | ||
12 |
|
|
74 | out branch . | |
13 | echo c > foo |
|
75 | ||
14 | hg ci -d '0 0' -mc |
|
76 | $ hg out -q ../branch#. | |
15 | hg tag -l z |
|
77 | 1:b84708d77ab7 | |
16 | cd .. |
|
78 | 4:65511d0e2b55 | |
17 | hg clone -r 0 branch branch2 |
|
79 | $ hg out -q -b . | |
18 | cd branch2 |
|
80 | 1:b84708d77ab7 | |
19 | hg up 0 |
|
81 | 4:65511d0e2b55 | |
20 | hg branch b |
|
82 | ||
21 | echo b > foo |
|
83 | out branch . non-ascii | |
22 | hg ci -d '0 0' -mb |
|
84 | ||
23 | hg up 0 |
|
85 | $ hg --encoding utf-8 up æ | |
24 | hg --encoding utf-8 branch æ |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | echo ae1 > foo |
|
87 | $ hg --encoding latin1 out -q ../branch#. | |
26 | hg ci -d '0 0' -mae1 |
|
88 | 2:df5a44224d4e | |
27 | hg up 0 |
|
89 | 3:4f4a5125ca10 | |
28 | hg --encoding utf-8 branch -f æ |
|
90 | $ hg --encoding latin1 out -q -b . | |
29 | echo ae2 > foo |
|
91 | 2:df5a44224d4e | |
30 | hg ci -d '0 0' -mae2 |
|
92 | 3:4f4a5125ca10 | |
31 | hg up 0 |
|
93 | ||
32 |
|
|
94 | clone branch b | |
33 | echo b2 > foo |
|
|||
34 | hg ci -d '0 0' -mb2 |
|
|||
35 |
|
95 | |||
36 | echo unknown branch and fallback |
|
96 | $ cd .. | |
37 | hg in -qbz |
|
97 | $ hg clone branch2#b branch3 | |
38 | hg in -q ../branch#z |
|
98 | requesting all changes | |
39 | hg out -qbz |
|
99 | adding changesets | |
40 | echo in rev c branch a |
|
100 | adding manifests | |
41 | hg in -qr c ../branch#a |
|
101 | adding file changes | |
42 | hg in -qr c -b a |
|
102 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
43 | echo out branch . |
|
103 | updating to branch b | |
44 | hg out -q ../branch#. |
|
104 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
45 | hg out -q -b . |
|
105 | $ hg -q -R branch3 heads b | |
46 | echo out branch . non-ascii |
|
106 | 2:65511d0e2b55 | |
47 | hg --encoding utf-8 up æ |
|
107 | 1:b84708d77ab7 | |
48 | hg --encoding latin1 out -q ../branch#. |
|
108 | $ hg -q -R branch3 parents | |
49 | hg --encoding latin1 out -q -b . |
|
109 | 2:65511d0e2b55 | |
50 | echo clone branch b |
|
110 | $ rm -rf branch3 | |
51 | cd .. |
|
111 | ||
52 |
|
|
112 | clone rev a branch b | |
53 | hg -q -R branch3 heads b |
|
113 | ||
54 | hg -q -R branch3 parents |
|
114 | $ hg clone -r a branch2#b branch3 | |
55 | rm -rf branch3 |
|
115 | requesting all changes | |
56 | echo clone rev a branch b |
|
116 | adding changesets | |
57 | hg clone -r a branch2#b branch3 |
|
117 | adding manifests | |
58 | hg -q -R branch3 heads b |
|
118 | adding file changes | |
59 | hg -q -R branch3 parents |
|
119 | added 3 changesets with 3 changes to 1 files (+1 heads) | |
60 | rm -rf branch3 |
|
120 | updating to branch a | |
|
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
122 | $ hg -q -R branch3 heads b | |||
|
123 | 2:65511d0e2b55 | |||
|
124 | 1:b84708d77ab7 | |||
|
125 | $ hg -q -R branch3 parents | |||
|
126 | 0:5b65ba7c951d | |||
|
127 | $ rm -rf branch3 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now