|
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'! |
|
64 |
|
65 in rev c branch a |
|
66 |
|
67 $ hg in -qr c ../branch#a |
|
68 1:dd6e60a716c6 |
|
69 2:f25d57ab0566 |
|
70 $ hg in -qr c -b a |
|
71 1:dd6e60a716c6 |
|
72 2:f25d57ab0566 |
|
73 |
|
74 out branch . |
|
75 |
|
76 $ hg out -q ../branch#. |
|
77 1:b84708d77ab7 |
|
78 4:65511d0e2b55 |
|
79 $ hg out -q -b . |
|
80 1:b84708d77ab7 |
|
81 4:65511d0e2b55 |
|
82 |
|
83 out branch . non-ascii |
|
84 |
|
85 $ hg --encoding utf-8 up æ |
|
86 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 $ hg --encoding latin1 out -q ../branch#. |
|
88 2:df5a44224d4e |
|
89 3:4f4a5125ca10 |
|
90 $ hg --encoding latin1 out -q -b . |
|
91 2:df5a44224d4e |
|
92 3:4f4a5125ca10 |
|
93 |
|
94 clone branch b |
|
95 |
|
96 $ cd .. |
|
97 $ hg clone branch2#b branch3 |
|
98 requesting all changes |
|
99 adding changesets |
|
100 adding manifests |
|
101 adding file changes |
|
102 added 3 changesets with 3 changes to 1 files (+1 heads) |
|
103 updating to branch b |
|
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
105 $ hg -q -R branch3 heads b |
|
106 2:65511d0e2b55 |
|
107 1:b84708d77ab7 |
|
108 $ hg -q -R branch3 parents |
|
109 2:65511d0e2b55 |
|
110 $ rm -rf branch3 |
|
111 |
|
112 clone rev a branch b |
|
113 |
|
114 $ hg clone -r a branch2#b branch3 |
|
115 requesting all changes |
|
116 adding changesets |
|
117 adding manifests |
|
118 adding file changes |
|
119 added 3 changesets with 3 changes to 1 files (+1 heads) |
|
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 |