##// END OF EJS Templates
test-bheads: use a case-insensitive set of filenames (issue2274)...
Nicolas Dumazet -
r11543:0a2762d8 stable
parent child Browse files
Show More
@@ -1,186 +1,186 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 heads()
3 heads()
4 {
4 {
5 hg heads --template '{rev}: {desc|firstline|strip} ({branches})\n' "$@"
5 hg heads --template '{rev}: {desc|firstline|strip} ({branches})\n' "$@"
6 }
6 }
7
7
8 hg init a
8 hg init a
9 cd a
9 cd a
10 echo 'root' >root
10 echo 'root' >root
11 hg add root
11 hg add root
12 hg commit -m "Adding root node"
12 hg commit -m "Adding root node"
13 heads
13 heads
14 echo '-------'
14 echo '-------'
15 heads .
15 heads .
16
16
17 echo '======='
17 echo '======='
18 echo 'a' >a
18 echo 'a' >a
19 hg add a
19 hg add a
20 hg branch a
20 hg branch a
21 hg commit -m "Adding a branch"
21 hg commit -m "Adding a branch"
22 heads
22 heads
23 echo '-------'
23 echo '-------'
24 heads .
24 heads .
25
25
26 echo '======='
26 echo '======='
27 hg update -C 0
27 hg update -C 0
28 echo 'b' >b
28 echo 'b' >b
29 hg add b
29 hg add b
30 hg branch b
30 hg branch b
31 hg commit -m "Adding b branch"
31 hg commit -m "Adding b branch"
32 heads
32 heads
33 echo '-------'
33 echo '-------'
34 heads .
34 heads .
35
35
36 echo '======='
36 echo '======='
37 echo 'bh1' >bh1
37 echo 'bh1' >bh1
38 hg add bh1
38 hg add bh1
39 hg commit -m "Adding b branch head 1"
39 hg commit -m "Adding b branch head 1"
40 heads
40 heads
41 echo '-------'
41 echo '-------'
42 heads .
42 heads .
43
43
44 echo '======='
44 echo '======='
45 hg update -C 2
45 hg update -C 2
46 echo 'bh2' >bh2
46 echo 'bh2' >bh2
47 hg add bh2
47 hg add bh2
48 hg commit -m "Adding b branch head 2"
48 hg commit -m "Adding b branch head 2"
49 heads
49 heads
50 echo '-------'
50 echo '-------'
51 heads .
51 heads .
52
52
53 echo '======='
53 echo '======='
54 hg update -C 2
54 hg update -C 2
55 echo 'bh3' >bh3
55 echo 'bh3' >bh3
56 hg add bh3
56 hg add bh3
57 hg commit -m "Adding b branch head 3"
57 hg commit -m "Adding b branch head 3"
58 heads
58 heads
59 echo '-------'
59 echo '-------'
60 heads .
60 heads .
61
61
62 echo '======='
62 echo '======='
63 hg merge 4
63 hg merge 4
64 hg commit -m "Merging b branch head 2 and b branch head 3"
64 hg commit -m "Merging b branch head 2 and b branch head 3"
65 heads
65 heads
66 echo '-------'
66 echo '-------'
67 heads .
67 heads .
68
68
69 echo '======='
69 echo '======='
70 echo 'c' >c
70 echo 'c' >c
71 hg add c
71 hg add c
72 hg branch c
72 hg branch c
73 hg commit -m "Adding c branch"
73 hg commit -m "Adding c branch"
74 heads
74 heads
75 echo '-------'
75 echo '-------'
76 heads .
76 heads .
77
77
78 echo '======='
78 echo '======='
79 heads -r 3 .
79 heads -r 3 .
80 echo $?
80 echo $?
81 echo '-------'
81 echo '-------'
82 heads -r 2 .
82 heads -r 2 .
83 echo $?
83 echo $?
84 echo '-------'
84 echo '-------'
85 hg update -C 4
85 hg update -C 4
86 echo $?
86 echo $?
87 echo '-------'
87 echo '-------'
88 heads -r 3 .
88 heads -r 3 .
89 echo $?
89 echo $?
90 echo '-------'
90 echo '-------'
91 heads -r 2 .
91 heads -r 2 .
92 echo $?
92 echo $?
93 echo '-------'
93 echo '-------'
94 heads -r 7 .
94 heads -r 7 .
95 echo $?
95 echo $?
96
96
97 echo '======='
97 echo '======='
98 for i in 0 1 2 3 4 5 6 7; do
98 for i in 0 1 2 3 4 5 6 7; do
99 hg update -C "$i"
99 hg update -C "$i"
100 heads
100 heads
101 echo '-------'
101 echo '-------'
102 heads .
102 heads .
103 echo '-------'
103 echo '-------'
104 done
104 done
105
105
106 echo '======='
106 echo '======='
107 for i in a b c z; do
107 for i in a b c z; do
108 heads "$i"
108 heads "$i"
109 echo '-------'
109 echo '-------'
110 done
110 done
111
111
112 echo '======='
112 echo '======='
113 heads 0 1 2 3 4 5 6 7
113 heads 0 1 2 3 4 5 6 7
114
114
115 echo '% topological heads'
115 echo '% topological heads'
116 heads -t
116 heads -t
117
117
118 echo '______________'
118 echo '______________'
119 cd ..
119 cd ..
120
120
121 hg init newheadmsg
121 hg init newheadmsg
122 cd newheadmsg
122 cd newheadmsg
123
123
124 echo '% created new head message'
124 echo '% created new head message'
125 echo '% init: no msg'
125 echo '% init: no msg'
126 echo 1 > a
126 echo 1 > a
127 hg ci -Am "a0: Initial root"
127 hg ci -Am "a0: Initial root"
128 echo 2 >> a
128 echo 2 >> a
129 hg ci -m "a1 (HN)"
129 hg ci -m "a1 (HN)"
130
130
131 hg branch b
131 hg branch b
132 echo 1 > b
132 echo 1 > b
133 hg ci -Am "b2: Initial root for branch b"
133 hg ci -Am "b2: Initial root for branch b"
134 echo 2 >> b
134 echo 2 >> b
135 hg ci -m "b3 (HN)"
135 hg ci -m "b3 (HN)"
136
136
137 echo '% case NN: msg'
137 echo '% case NN: msg'
138 hg up -q null
138 hg up -q null
139 hg branch -f b
139 hg branch -f b
140 echo 1 > B
140 echo 1 > bb
141 hg ci -Am "b4 (NN): new topo root for branch b"
141 hg ci -Am "b4 (NN): new topo root for branch b"
142
142
143 echo '% case HN: no msg'
143 echo '% case HN: no msg'
144 echo 2 >> B
144 echo 2 >> bb
145 hg ci -m "b5 (HN)"
145 hg ci -m "b5 (HN)"
146
146
147 echo '% case BN: msg'
147 echo '% case BN: msg'
148 hg branch -f default
148 hg branch -f default
149 echo 1 > A
149 echo 1 > aa
150 hg ci -Am "a6 (BN): new branch root"
150 hg ci -Am "a6 (BN): new branch root"
151
151
152 echo '% case CN: msg'
152 echo '% case CN: msg'
153 hg up -q 4
153 hg up -q 4
154 echo 3 >> BB
154 echo 3 >> bbb
155 hg ci -Am "b7 (CN): regular new head"
155 hg ci -Am "b7 (CN): regular new head"
156
156
157 echo '% case BB: msg'
157 echo '% case BB: msg'
158 hg up -q 4
158 hg up -q 4
159 hg merge -q 3
159 hg merge -q 3
160 hg branch -f default
160 hg branch -f default
161 hg ci -m "a8 (BB): weird new branch root"
161 hg ci -m "a8 (BB): weird new branch root"
162
162
163 echo '% case CB: msg'
163 echo '% case CB: msg'
164 hg up -q 4
164 hg up -q 4
165 hg merge -q 1
165 hg merge -q 1
166 hg ci -m "b9 (CB): new head from branch merge"
166 hg ci -m "b9 (CB): new head from branch merge"
167
167
168 echo '% case HB: no msg'
168 echo '% case HB: no msg'
169 hg up -q 7
169 hg up -q 7
170 hg merge -q 6
170 hg merge -q 6
171 hg ci -m "b10 (HB): continuing head from branch merge"
171 hg ci -m "b10 (HB): continuing head from branch merge"
172
172
173 echo '% case CC: msg'
173 echo '% case CC: msg'
174 hg up -q 4
174 hg up -q 4
175 hg merge -q 2
175 hg merge -q 2
176 hg ci -m "b11 (CC): new head from merge"
176 hg ci -m "b11 (CC): new head from merge"
177
177
178 echo '% case CH: no msg'
178 echo '% case CH: no msg'
179 hg up -q 2
179 hg up -q 2
180 hg merge -q 10
180 hg merge -q 10
181 hg ci -m "b12 (CH): continuing head from merge"
181 hg ci -m "b12 (CH): continuing head from merge"
182
182
183 echo '% case HH: no msg'
183 echo '% case HH: no msg'
184 hg merge -q 3
184 hg merge -q 3
185 hg ci -m "b12 (HH): merging two heads"
185 hg ci -m "b12 (HH): merging two heads"
186
186
@@ -1,209 +1,209 b''
1 0: Adding root node ()
1 0: Adding root node ()
2 -------
2 -------
3 0: Adding root node ()
3 0: Adding root node ()
4 =======
4 =======
5 marked working directory as branch a
5 marked working directory as branch a
6 1: Adding a branch (a)
6 1: Adding a branch (a)
7 0: Adding root node ()
7 0: Adding root node ()
8 -------
8 -------
9 1: Adding a branch (a)
9 1: Adding a branch (a)
10 =======
10 =======
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
12 marked working directory as branch b
12 marked working directory as branch b
13 2: Adding b branch (b)
13 2: Adding b branch (b)
14 1: Adding a branch (a)
14 1: Adding a branch (a)
15 0: Adding root node ()
15 0: Adding root node ()
16 -------
16 -------
17 2: Adding b branch (b)
17 2: Adding b branch (b)
18 =======
18 =======
19 3: Adding b branch head 1 (b)
19 3: Adding b branch head 1 (b)
20 1: Adding a branch (a)
20 1: Adding a branch (a)
21 0: Adding root node ()
21 0: Adding root node ()
22 -------
22 -------
23 3: Adding b branch head 1 (b)
23 3: Adding b branch head 1 (b)
24 =======
24 =======
25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
25 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
26 created new head
26 created new head
27 4: Adding b branch head 2 (b)
27 4: Adding b branch head 2 (b)
28 3: Adding b branch head 1 (b)
28 3: Adding b branch head 1 (b)
29 1: Adding a branch (a)
29 1: Adding a branch (a)
30 0: Adding root node ()
30 0: Adding root node ()
31 -------
31 -------
32 4: Adding b branch head 2 (b)
32 4: Adding b branch head 2 (b)
33 3: Adding b branch head 1 (b)
33 3: Adding b branch head 1 (b)
34 =======
34 =======
35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
36 created new head
36 created new head
37 5: Adding b branch head 3 (b)
37 5: Adding b branch head 3 (b)
38 4: Adding b branch head 2 (b)
38 4: Adding b branch head 2 (b)
39 3: Adding b branch head 1 (b)
39 3: Adding b branch head 1 (b)
40 1: Adding a branch (a)
40 1: Adding a branch (a)
41 0: Adding root node ()
41 0: Adding root node ()
42 -------
42 -------
43 5: Adding b branch head 3 (b)
43 5: Adding b branch head 3 (b)
44 4: Adding b branch head 2 (b)
44 4: Adding b branch head 2 (b)
45 3: Adding b branch head 1 (b)
45 3: Adding b branch head 1 (b)
46 =======
46 =======
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 (branch merge, don't forget to commit)
48 (branch merge, don't forget to commit)
49 6: Merging b branch head 2 and b branch head 3 (b)
49 6: Merging b branch head 2 and b branch head 3 (b)
50 3: Adding b branch head 1 (b)
50 3: Adding b branch head 1 (b)
51 1: Adding a branch (a)
51 1: Adding a branch (a)
52 0: Adding root node ()
52 0: Adding root node ()
53 -------
53 -------
54 6: Merging b branch head 2 and b branch head 3 (b)
54 6: Merging b branch head 2 and b branch head 3 (b)
55 3: Adding b branch head 1 (b)
55 3: Adding b branch head 1 (b)
56 =======
56 =======
57 marked working directory as branch c
57 marked working directory as branch c
58 7: Adding c branch (c)
58 7: Adding c branch (c)
59 6: Merging b branch head 2 and b branch head 3 (b)
59 6: Merging b branch head 2 and b branch head 3 (b)
60 3: Adding b branch head 1 (b)
60 3: Adding b branch head 1 (b)
61 1: Adding a branch (a)
61 1: Adding a branch (a)
62 0: Adding root node ()
62 0: Adding root node ()
63 -------
63 -------
64 7: Adding c branch (c)
64 7: Adding c branch (c)
65 =======
65 =======
66 no open branch heads found on branches c (started at 3)
66 no open branch heads found on branches c (started at 3)
67 1
67 1
68 -------
68 -------
69 7: Adding c branch (c)
69 7: Adding c branch (c)
70 0
70 0
71 -------
71 -------
72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
72 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
73 0
73 0
74 -------
74 -------
75 3: Adding b branch head 1 (b)
75 3: Adding b branch head 1 (b)
76 0
76 0
77 -------
77 -------
78 6: Merging b branch head 2 and b branch head 3 (b)
78 6: Merging b branch head 2 and b branch head 3 (b)
79 3: Adding b branch head 1 (b)
79 3: Adding b branch head 1 (b)
80 0
80 0
81 -------
81 -------
82 no open branch heads found on branches b (started at 7)
82 no open branch heads found on branches b (started at 7)
83 1
83 1
84 =======
84 =======
85 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
85 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
86 7: Adding c branch (c)
86 7: Adding c branch (c)
87 6: Merging b branch head 2 and b branch head 3 (b)
87 6: Merging b branch head 2 and b branch head 3 (b)
88 3: Adding b branch head 1 (b)
88 3: Adding b branch head 1 (b)
89 1: Adding a branch (a)
89 1: Adding a branch (a)
90 0: Adding root node ()
90 0: Adding root node ()
91 -------
91 -------
92 0: Adding root node ()
92 0: Adding root node ()
93 -------
93 -------
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
95 7: Adding c branch (c)
95 7: Adding c branch (c)
96 6: Merging b branch head 2 and b branch head 3 (b)
96 6: Merging b branch head 2 and b branch head 3 (b)
97 3: Adding b branch head 1 (b)
97 3: Adding b branch head 1 (b)
98 1: Adding a branch (a)
98 1: Adding a branch (a)
99 0: Adding root node ()
99 0: Adding root node ()
100 -------
100 -------
101 1: Adding a branch (a)
101 1: Adding a branch (a)
102 -------
102 -------
103 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
103 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
104 7: Adding c branch (c)
104 7: Adding c branch (c)
105 6: Merging b branch head 2 and b branch head 3 (b)
105 6: Merging b branch head 2 and b branch head 3 (b)
106 3: Adding b branch head 1 (b)
106 3: Adding b branch head 1 (b)
107 1: Adding a branch (a)
107 1: Adding a branch (a)
108 0: Adding root node ()
108 0: Adding root node ()
109 -------
109 -------
110 6: Merging b branch head 2 and b branch head 3 (b)
110 6: Merging b branch head 2 and b branch head 3 (b)
111 3: Adding b branch head 1 (b)
111 3: Adding b branch head 1 (b)
112 -------
112 -------
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 7: Adding c branch (c)
114 7: Adding c branch (c)
115 6: Merging b branch head 2 and b branch head 3 (b)
115 6: Merging b branch head 2 and b branch head 3 (b)
116 3: Adding b branch head 1 (b)
116 3: Adding b branch head 1 (b)
117 1: Adding a branch (a)
117 1: Adding a branch (a)
118 0: Adding root node ()
118 0: Adding root node ()
119 -------
119 -------
120 6: Merging b branch head 2 and b branch head 3 (b)
120 6: Merging b branch head 2 and b branch head 3 (b)
121 3: Adding b branch head 1 (b)
121 3: Adding b branch head 1 (b)
122 -------
122 -------
123 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
123 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 7: Adding c branch (c)
124 7: Adding c branch (c)
125 6: Merging b branch head 2 and b branch head 3 (b)
125 6: Merging b branch head 2 and b branch head 3 (b)
126 3: Adding b branch head 1 (b)
126 3: Adding b branch head 1 (b)
127 1: Adding a branch (a)
127 1: Adding a branch (a)
128 0: Adding root node ()
128 0: Adding root node ()
129 -------
129 -------
130 6: Merging b branch head 2 and b branch head 3 (b)
130 6: Merging b branch head 2 and b branch head 3 (b)
131 3: Adding b branch head 1 (b)
131 3: Adding b branch head 1 (b)
132 -------
132 -------
133 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
133 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
134 7: Adding c branch (c)
134 7: Adding c branch (c)
135 6: Merging b branch head 2 and b branch head 3 (b)
135 6: Merging b branch head 2 and b branch head 3 (b)
136 3: Adding b branch head 1 (b)
136 3: Adding b branch head 1 (b)
137 1: Adding a branch (a)
137 1: Adding a branch (a)
138 0: Adding root node ()
138 0: Adding root node ()
139 -------
139 -------
140 6: Merging b branch head 2 and b branch head 3 (b)
140 6: Merging b branch head 2 and b branch head 3 (b)
141 3: Adding b branch head 1 (b)
141 3: Adding b branch head 1 (b)
142 -------
142 -------
143 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
143 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
144 7: Adding c branch (c)
144 7: Adding c branch (c)
145 6: Merging b branch head 2 and b branch head 3 (b)
145 6: Merging b branch head 2 and b branch head 3 (b)
146 3: Adding b branch head 1 (b)
146 3: Adding b branch head 1 (b)
147 1: Adding a branch (a)
147 1: Adding a branch (a)
148 0: Adding root node ()
148 0: Adding root node ()
149 -------
149 -------
150 6: Merging b branch head 2 and b branch head 3 (b)
150 6: Merging b branch head 2 and b branch head 3 (b)
151 3: Adding b branch head 1 (b)
151 3: Adding b branch head 1 (b)
152 -------
152 -------
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 7: Adding c branch (c)
154 7: Adding c branch (c)
155 6: Merging b branch head 2 and b branch head 3 (b)
155 6: Merging b branch head 2 and b branch head 3 (b)
156 3: Adding b branch head 1 (b)
156 3: Adding b branch head 1 (b)
157 1: Adding a branch (a)
157 1: Adding a branch (a)
158 0: Adding root node ()
158 0: Adding root node ()
159 -------
159 -------
160 7: Adding c branch (c)
160 7: Adding c branch (c)
161 -------
161 -------
162 =======
162 =======
163 1: Adding a branch (a)
163 1: Adding a branch (a)
164 -------
164 -------
165 6: Merging b branch head 2 and b branch head 3 (b)
165 6: Merging b branch head 2 and b branch head 3 (b)
166 3: Adding b branch head 1 (b)
166 3: Adding b branch head 1 (b)
167 -------
167 -------
168 7: Adding c branch (c)
168 7: Adding c branch (c)
169 -------
169 -------
170 abort: unknown revision 'z'!
170 abort: unknown revision 'z'!
171 -------
171 -------
172 =======
172 =======
173 7: Adding c branch (c)
173 7: Adding c branch (c)
174 6: Merging b branch head 2 and b branch head 3 (b)
174 6: Merging b branch head 2 and b branch head 3 (b)
175 3: Adding b branch head 1 (b)
175 3: Adding b branch head 1 (b)
176 1: Adding a branch (a)
176 1: Adding a branch (a)
177 0: Adding root node ()
177 0: Adding root node ()
178 % topological heads
178 % topological heads
179 7: Adding c branch (c)
179 7: Adding c branch (c)
180 3: Adding b branch head 1 (b)
180 3: Adding b branch head 1 (b)
181 1: Adding a branch (a)
181 1: Adding a branch (a)
182 ______________
182 ______________
183 % created new head message
183 % created new head message
184 % init: no msg
184 % init: no msg
185 adding a
185 adding a
186 marked working directory as branch b
186 marked working directory as branch b
187 adding b
187 adding b
188 % case NN: msg
188 % case NN: msg
189 marked working directory as branch b
189 marked working directory as branch b
190 adding B
190 adding bb
191 created new head
191 created new head
192 % case HN: no msg
192 % case HN: no msg
193 % case BN: msg
193 % case BN: msg
194 marked working directory as branch default
194 marked working directory as branch default
195 adding A
195 adding aa
196 created new head
196 created new head
197 % case CN: msg
197 % case CN: msg
198 adding BB
198 adding bbb
199 created new head
199 created new head
200 % case BB: msg
200 % case BB: msg
201 marked working directory as branch default
201 marked working directory as branch default
202 created new head
202 created new head
203 % case CB: msg
203 % case CB: msg
204 created new head
204 created new head
205 % case HB: no msg
205 % case HB: no msg
206 % case CC: msg
206 % case CC: msg
207 created new head
207 created new head
208 % case CH: no msg
208 % case CH: no msg
209 % case HH: no msg
209 % case HH: no msg
General Comments 0
You need to be logged in to leave comments. Login now