##// END OF EJS Templates
tests: unify test-branch-option
Martin Geisler -
r11869:36a5e7cb default
parent child Browse files
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
4 hg init branch
5 cd branch
6 hg branch a
7 echo a > foo
8 hg ci -d '0 0' -Ama
9 echo a2 > foo
10 hg ci -d '0 0' -ma2
11 hg up 0
12 hg branch c
13 echo c > foo
14 hg ci -d '0 0' -mc
15 hg tag -l z
16 cd ..
17 hg clone -r 0 branch branch2
18 cd branch2
19 hg up 0
20 hg branch b
21 echo b > foo
22 hg ci -d '0 0' -mb
23 hg up 0
24 hg --encoding utf-8 branch æ
25 echo ae1 > foo
26 hg ci -d '0 0' -mae1
27 hg up 0
28 hg --encoding utf-8 branch -f æ
29 echo ae2 > foo
30 hg ci -d '0 0' -mae2
31 hg up 0
32 hg branch -f b
33 echo b2 > foo
34 hg ci -d '0 0' -mb2
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
35 95
36 echo unknown branch and fallback
37 hg in -qbz
38 hg in -q ../branch#z
39 hg out -qbz
40 echo in rev c branch a
41 hg in -qr c ../branch#a
42 hg in -qr c -b a
43 echo out branch .
44 hg out -q ../branch#.
45 hg out -q -b .
46 echo out branch . non-ascii
47 hg --encoding utf-8 up æ
48 hg --encoding latin1 out -q ../branch#.
49 hg --encoding latin1 out -q -b .
50 echo clone branch b
51 cd ..
52 hg clone branch2#b branch3
53 hg -q -R branch3 heads b
54 hg -q -R branch3 parents
55 rm -rf branch3
56 echo clone rev a branch b
57 hg clone -r a branch2#b branch3
58 hg -q -R branch3 heads b
59 hg -q -R branch3 parents
60 rm -rf branch3
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
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now