##// END OF EJS Templates
prepush: add more test cases
Peter Arrenbrecht -
r10909:29a83fb8 stable
parent child Browse files
Show More
@@ -1,267 +1,303 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 echo "[extensions]" >> $HGRCPATH
3 echo "[extensions]" >> $HGRCPATH
4 echo "graphlog=" >> $HGRCPATH
4 echo "graphlog=" >> $HGRCPATH
5
5
6 mkdir a
6 mkdir a
7 cd a
7 cd a
8 hg init
8 hg init
9 echo foo > t1
9 echo foo > t1
10 hg add t1
10 hg add t1
11 hg commit -m "1" -d "1000000 0"
11 hg commit -m "1" -d "1000000 0"
12
12
13 cd ..
13 cd ..
14 hg clone a b
14 hg clone a b
15
15
16 cd a
16 cd a
17 echo foo > t2
17 echo foo > t2
18 hg add t2
18 hg add t2
19 hg commit -m "2" -d "1000000 0"
19 hg commit -m "2" -d "1000000 0"
20
20
21 cd ../b
21 cd ../b
22 echo foo > t3
22 echo foo > t3
23 hg add t3
23 hg add t3
24 hg commit -m "3" -d "1000000 0"
24 hg commit -m "3" -d "1000000 0"
25
25
26 hg push ../a
26 hg push ../a
27 hg pull ../a
27 hg pull ../a
28 hg push ../a
28 hg push ../a
29 hg merge
29 hg merge
30 hg commit -m "4" -d "1000000 0"
30 hg commit -m "4" -d "1000000 0"
31 hg push ../a
31 hg push ../a
32 cd ..
32 cd ..
33
33
34 hg init c
34 hg init c
35 cd c
35 cd c
36 for i in 0 1 2; do
36 for i in 0 1 2; do
37 echo $i >> foo
37 echo $i >> foo
38 hg ci -Am $i -d "1000000 0"
38 hg ci -Am $i -d "1000000 0"
39 done
39 done
40 cd ..
40 cd ..
41
41
42 hg clone c d
42 hg clone c d
43 cd d
43 cd d
44 for i in 0 1; do
44 for i in 0 1; do
45 hg co -C $i
45 hg co -C $i
46 echo d-$i >> foo
46 echo d-$i >> foo
47 hg ci -m d-$i -d "1000000 0"
47 hg ci -m d-$i -d "1000000 0"
48 done
48 done
49
49
50 HGMERGE=true hg merge 3
50 HGMERGE=true hg merge 3
51 hg ci -m c-d -d "1000000 0"
51 hg ci -m c-d -d "1000000 0"
52
52
53 hg push ../c; echo $?
53 hg push ../c; echo $?
54 hg push -r 2 ../c; echo $?
54 hg push -r 2 ../c; echo $?
55 hg push -r 3 ../c; echo $?
55 hg push -r 3 ../c; echo $?
56 hg push -r 3 -r 4 ../c; echo $?
56 hg push -r 3 -r 4 ../c; echo $?
57 hg push -f -r 3 -r 4 ../c; echo $?
57 hg push -f -r 3 -r 4 ../c; echo $?
58 hg push -r 5 ../c; echo $?
58 hg push -r 5 ../c; echo $?
59 hg in ../c
59 hg in ../c
60
60
61 echo % issue 450
61 echo % issue 450
62 hg init ../e
62 hg init ../e
63 hg push -r 0 ../e ; echo $?
63 hg push -r 0 ../e ; echo $?
64 hg push -r 1 ../e ; echo $?
64 hg push -r 1 ../e ; echo $?
65
65
66 cd ..
66 cd ..
67
67
68 echo % issue 736
68 echo % issue 736
69 hg init f
69 hg init f
70 cd f
70 cd f
71 hg -q branch a
71 hg -q branch a
72 echo 0 > foo
72 echo 0 > foo
73 hg -q ci -d "1000000 0" -Am 0
73 hg -q ci -d "1000000 0" -Am 0
74 echo 1 > foo
74 echo 1 > foo
75 hg -q ci -d "1000000 0" -m 1
75 hg -q ci -d "1000000 0" -m 1
76 hg -q up 0
76 hg -q up 0
77 echo 2 > foo
77 echo 2 > foo
78 hg -q ci -d "1000000 0" -m 2
78 hg -q ci -d "1000000 0" -m 2
79 hg -q up 0
79 hg -q up 0
80 hg -q branch b
80 hg -q branch b
81 echo 3 > foo
81 echo 3 > foo
82 hg -q ci -d "1000000 0" -m 3
82 hg -q ci -d "1000000 0" -m 3
83 cd ..
83 cd ..
84
84
85 hg -q clone f g
85 hg -q clone f g
86 cd g
86 cd g
87
87
88 echo % push on existing branch and new branch
88 echo % push on existing branch and new branch
89 hg -q up 1
89 hg -q up 1
90 echo 4 > foo
90 echo 4 > foo
91 hg -q ci -d "1000000 0" -m 4
91 hg -q ci -d "1000000 0" -m 4
92 hg -q up 0
92 hg -q up 0
93 echo 5 > foo
93 echo 5 > foo
94 hg -q branch c
94 hg -q branch c
95 hg -q ci -d "1000000 0" -m 5
95 hg -q ci -d "1000000 0" -m 5
96 hg push ../f; echo $?
96 hg push ../f; echo $?
97 hg push -r 4 -r 5 ../f; echo $?
97 hg push -r 4 -r 5 ../f; echo $?
98
98
99 echo % multiple new branches
99 echo % multiple new branches
100 hg -q branch d
100 hg -q branch d
101 echo 6 > foo
101 echo 6 > foo
102 hg -q ci -d "1000000 0" -m 6
102 hg -q ci -d "1000000 0" -m 6
103 hg push ../f; echo $?
103 hg push ../f; echo $?
104 hg push -r 4 -r 6 ../f; echo $?
104 hg push -r 4 -r 6 ../f; echo $?
105 cd ../g
105 cd ../g
106
106
107 echo % fail on multiple head push
107 echo % fail on multiple head push
108 hg -q up 1
108 hg -q up 1
109 echo 7 > foo
109 echo 7 > foo
110 hg -q ci -d "1000000 0" -m 7
110 hg -q ci -d "1000000 0" -m 7
111 hg push -r 4 -r 7 ../f; echo $?
111 hg push -r 4 -r 7 ../f; echo $?
112
112
113 echo % push replacement head on existing branches
113 echo % push replacement head on existing branches
114 hg -q up 3
114 hg -q up 3
115 echo 8 > foo
115 echo 8 > foo
116 hg -q ci -d "1000000 0" -m 8
116 hg -q ci -d "1000000 0" -m 8
117 hg push -r 7 -r 8 ../f; echo $?
117 hg push -r 7 -r 8 ../f; echo $?
118
118
119 echo % merge of branch a to other branch b followed by unrelated push on branch a
119 echo % merge of branch a to other branch b followed by unrelated push on branch a
120 hg -q up 7
120 hg -q up 7
121 HGMERGE=true hg -q merge 8
121 HGMERGE=true hg -q merge 8
122 hg -q ci -d "1000000 0" -m 9
122 hg -q ci -d "1000000 0" -m 9
123 hg -q up 8
123 hg -q up 8
124 echo 10 > foo
124 echo 10 > foo
125 hg -q ci -d "1000000 0" -m 10
125 hg -q ci -d "1000000 0" -m 10
126 hg push -r 9 ../f; echo $?
126 hg push -r 9 ../f; echo $?
127 hg push -r 10 ../f; echo $?
127 hg push -r 10 ../f; echo $?
128
128
129 echo % cheating the counting algorithm
129 echo % cheating the counting algorithm
130 hg -q up 9
130 hg -q up 9
131 HGMERGE=true hg -q merge 2
131 HGMERGE=true hg -q merge 2
132 hg -q ci -d "1000000 0" -m 11
132 hg -q ci -d "1000000 0" -m 11
133 hg -q up 1
133 hg -q up 1
134 echo 12 > foo
134 echo 12 > foo
135 hg -q ci -d "1000000 0" -m 12
135 hg -q ci -d "1000000 0" -m 12
136 hg push -r 11 -r 12 ../f; echo $?
136 hg push -r 11 -r 12 ../f; echo $?
137
137
138 echo % checking prepush logic does not allow silently pushing multiple new heads
138 echo % checking prepush logic does not allow silently pushing multiple new heads
139 cd ..
139 cd ..
140 hg init h
140 hg init h
141 echo init > h/init
141 echo init > h/init
142 hg -R h ci -Am init
142 hg -R h ci -Am init
143 echo a > h/a
143 echo a > h/a
144 hg -R h ci -Am a
144 hg -R h ci -Am a
145 hg clone h i
145 hg clone h i
146 hg -R h up 0
146 hg -R h up 0
147 echo b > h/b
147 echo b > h/b
148 hg -R h ci -Am b
148 hg -R h ci -Am b
149 hg -R i up 0
149 hg -R i up 0
150 echo c > i/c
150 echo c > i/c
151 hg -R i ci -Am c
151 hg -R i ci -Am c
152 hg -R i push h
152 hg -R i push h
153 echo
153 echo
154
154
155 echo % check prepush logic with merged branches
155 echo % check prepush logic with merged branches
156 hg init j
156 hg init j
157 hg -R j branch a
157 hg -R j branch a
158 echo init > j/foo
158 echo init > j/foo
159 hg -R j ci -Am init
159 hg -R j ci -Am init
160 hg clone j k
160 hg clone j k
161 echo a1 > j/foo
161 echo a1 > j/foo
162 hg -R j ci -m a1
162 hg -R j ci -m a1
163 hg -R k branch b
163 hg -R k branch b
164 echo b > k/foo
164 echo b > k/foo
165 hg -R k ci -m b
165 hg -R k ci -m b
166 hg -R k up 0
166 hg -R k up 0
167 hg -R k merge b
167 hg -R k merge b
168 hg -R k ci -m merge
168 hg -R k ci -m merge
169 hg -R k push -r a j
169 hg -R k push -r a j
170 echo
170 echo
171
171
172 echo % prepush -r should not allow you to sneak in new heads
172 echo % prepush -r should not allow you to sneak in new heads
173 hg init l
173 hg init l
174 cd l
174 cd l
175 echo a >> foo
175 echo a >> foo
176 hg -q add foo
176 hg -q add foo
177 hg -q branch a
177 hg -q branch a
178 hg -q ci -d '0 0' -ma
178 hg -q ci -d '0 0' -ma
179 hg -q up null
179 hg -q up null
180 echo a >> foo
180 echo a >> foo
181 hg -q add foo
181 hg -q add foo
182 hg -q branch b
182 hg -q branch b
183 hg -q ci -d '0 0' -mb
183 hg -q ci -d '0 0' -mb
184 cd ..
184 cd ..
185 hg -q clone l m -u a
185 hg -q clone l m -u a
186 cd m
186 cd m
187 hg -q merge b
187 hg -q merge b
188 hg -q ci -d '0 0' -mmb
188 hg -q ci -d '0 0' -mmb
189 hg -q up 0
189 hg -q up 0
190 echo a >> foo
190 echo a >> foo
191 hg -q ci -ma2
191 hg -q ci -ma2
192 hg -q up 2
192 hg -q up 2
193 echo a >> foo
193 echo a >> foo
194 hg -q branch -f b
194 hg -q branch -f b
195 hg -q ci -d '0 0' -mb2
195 hg -q ci -d '0 0' -mb2
196 hg -q merge 3
196 hg -q merge 3
197 hg -q ci -d '0 0' -mma
197 hg -q ci -d '0 0' -mma
198 hg push ../l -b b
198 hg push ../l -b b
199 cd ..
199 cd ..
200
200
201 echo % check prepush with new branch head on former topo non-head
201 echo % check prepush with new branch head on former topo non-head
202 hg init n
202 hg init n
203 cd n
203 cd n
204 hg branch A
204 hg branch A
205 echo a >a
205 echo a >a
206 hg ci -Ama
206 hg ci -Ama
207 hg branch B
207 hg branch B
208 echo b >b
208 echo b >b
209 hg ci -Amb
209 hg ci -Amb
210 # b is now branch head of B, and a topological head
210 # b is now branch head of B, and a topological head
211 # a is now branch head of A, but not a topological head
211 # a is now branch head of A, but not a topological head
212 hg clone . inner
212 hg clone . inner
213 cd inner
213 cd inner
214 hg up B
214 hg up B
215 echo b1 >b1
215 echo b1 >b1
216 hg ci -Amb1
216 hg ci -Amb1
217 # in the clone b1 is now the head of B
217 # in the clone b1 is now the head of B
218 cd ..
218 cd ..
219 hg up 0
219 hg up 0
220 echo a2 >a2
220 echo a2 >a2
221 hg ci -Ama2
221 hg ci -Ama2
222 # a2 is now the new branch head of A, and a new topological head
222 # a2 is now the new branch head of A, and a new topological head
223 # it replaces a former inner branch head, so it should at most warn about A, not B
223 # it replaces a former inner branch head, so it should at most warn about A, not B
224 echo %% glog of local
224 echo %% glog of local
225 hg glog --template "{rev}: {branches} {desc}\n"
225 hg glog --template "{rev}: {branches} {desc}\n"
226 echo %% glog of remote
226 echo %% glog of remote
227 hg glog -R inner --template "{rev}: {branches} {desc}\n"
227 hg glog -R inner --template "{rev}: {branches} {desc}\n"
228 echo %% outgoing
228 echo %% outgoing
229 hg out inner --template "{rev}: {branches} {desc}\n"
229 hg out inner --template "{rev}: {branches} {desc}\n"
230 hg push inner
230 hg push inner
231 cd ..
231 cd ..
232
232
233 echo % check prepush with new branch head on former topo head
233 echo % check prepush with new branch head on former topo head
234 hg init o
234 hg init o
235 cd o
235 cd o
236 hg branch A
236 hg branch A
237 echo a >a
237 echo a >a
238 hg ci -Ama
238 hg ci -Ama
239 hg branch B
239 hg branch B
240 echo b >b
240 echo b >b
241 hg ci -Amb
241 hg ci -Amb
242 # b is now branch head of B, and a topological head
242 # b is now branch head of B, and a topological head
243 hg up 0
243 hg up 0
244 echo a1 >a1
244 echo a1 >a1
245 hg ci -Ama1
245 hg ci -Ama1
246 # a1 is now branch head of A, and a topological head
246 # a1 is now branch head of A, and a topological head
247 hg clone . inner
247 hg clone . inner
248 cd inner
248 cd inner
249 hg up B
249 hg up B
250 echo b1 >b1
250 echo b1 >b1
251 hg ci -Amb1
251 hg ci -Amb1
252 # in the clone b1 is now the head of B
252 # in the clone b1 is now the head of B
253 cd ..
253 cd ..
254 echo a2 >a2
254 echo a2 >a2
255 hg ci -Ama2
255 hg ci -Ama2
256 # a2 is now the new branch head of A, and a topological head
256 # a2 is now the new branch head of A, and a topological head
257 # it replaces a former topological and branch head, so this should not warn
257 # it replaces a former topological and branch head, so this should not warn
258 echo %% glog of local
258 echo %% glog of local
259 hg glog --template "{rev}: {branches} {desc}\n"
259 hg glog --template "{rev}: {branches} {desc}\n"
260 echo %% glog of remote
260 echo %% glog of remote
261 hg glog -R inner --template "{rev}: {branches} {desc}\n"
261 hg glog -R inner --template "{rev}: {branches} {desc}\n"
262 echo %% outgoing
262 echo %% outgoing
263 hg out inner --template "{rev}: {branches} {desc}\n"
263 hg out inner --template "{rev}: {branches} {desc}\n"
264 hg push inner
264 hg push inner
265 cd ..
265 cd ..
266
266
267 echo % check prepush with new branch head and new child of former branch head
268 echo % but child is on different branch
269 hg init p
270 cd p
271 hg branch A
272 echo a0 >a
273 hg ci -Ama0
274 echo a1 >a
275 hg ci -ma1
276 hg up null
277 hg branch B
278 echo b0 >b
279 hg ci -Amb0
280 echo b1 >b
281 hg ci -mb1
282
283 hg clone . inner
284
285 hg up A
286 hg branch -f B
287 echo a3 >a
288 hg ci -ma3
289 hg up 3
290 hg branch -f A
291 echo b3 >b
292 hg ci -mb3
293
294 echo %% glog of local
295 hg glog --template "{rev}: {branches} {desc}\n"
296 echo %% glog of remote
297 hg glog -R inner --template "{rev}: {branches} {desc}\n"
298 echo %% outgoing
299 hg out inner --template "{rev}: {branches} {desc}\n"
300 hg push inner
301 cd ..
302
267 exit 0
303 exit 0
@@ -1,260 +1,305 b''
1 updating to branch default
1 updating to branch default
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 pushing to ../a
3 pushing to ../a
4 searching for changes
4 searching for changes
5 abort: push creates new remote heads on branch 'default'!
5 abort: push creates new remote heads on branch 'default'!
6 (you should pull and merge or use push -f to force)
6 (you should pull and merge or use push -f to force)
7 pulling from ../a
7 pulling from ../a
8 searching for changes
8 searching for changes
9 adding changesets
9 adding changesets
10 adding manifests
10 adding manifests
11 adding file changes
11 adding file changes
12 added 1 changesets with 1 changes to 1 files (+1 heads)
12 added 1 changesets with 1 changes to 1 files (+1 heads)
13 (run 'hg heads' to see heads, 'hg merge' to merge)
13 (run 'hg heads' to see heads, 'hg merge' to merge)
14 pushing to ../a
14 pushing to ../a
15 searching for changes
15 searching for changes
16 abort: push creates new remote heads on branch 'default'!
16 abort: push creates new remote heads on branch 'default'!
17 (did you forget to merge? use push -f to force)
17 (did you forget to merge? use push -f to force)
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 (branch merge, don't forget to commit)
19 (branch merge, don't forget to commit)
20 pushing to ../a
20 pushing to ../a
21 searching for changes
21 searching for changes
22 adding changesets
22 adding changesets
23 adding manifests
23 adding manifests
24 adding file changes
24 adding file changes
25 added 2 changesets with 1 changes to 1 files
25 added 2 changesets with 1 changes to 1 files
26 adding foo
26 adding foo
27 updating to branch default
27 updating to branch default
28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 created new head
30 created new head
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 created new head
32 created new head
33 merging foo
33 merging foo
34 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
34 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
35 (branch merge, don't forget to commit)
35 (branch merge, don't forget to commit)
36 pushing to ../c
36 pushing to ../c
37 searching for changes
37 searching for changes
38 abort: push creates new remote heads on branch 'default'!
38 abort: push creates new remote heads on branch 'default'!
39 (did you forget to merge? use push -f to force)
39 (did you forget to merge? use push -f to force)
40 1
40 1
41 pushing to ../c
41 pushing to ../c
42 searching for changes
42 searching for changes
43 no changes found
43 no changes found
44 0
44 0
45 pushing to ../c
45 pushing to ../c
46 searching for changes
46 searching for changes
47 abort: push creates new remote heads on branch 'default'!
47 abort: push creates new remote heads on branch 'default'!
48 (did you forget to merge? use push -f to force)
48 (did you forget to merge? use push -f to force)
49 1
49 1
50 pushing to ../c
50 pushing to ../c
51 searching for changes
51 searching for changes
52 abort: push creates new remote heads on branch 'default'!
52 abort: push creates new remote heads on branch 'default'!
53 (did you forget to merge? use push -f to force)
53 (did you forget to merge? use push -f to force)
54 1
54 1
55 pushing to ../c
55 pushing to ../c
56 searching for changes
56 searching for changes
57 adding changesets
57 adding changesets
58 adding manifests
58 adding manifests
59 adding file changes
59 adding file changes
60 added 2 changesets with 2 changes to 1 files (+2 heads)
60 added 2 changesets with 2 changes to 1 files (+2 heads)
61 0
61 0
62 pushing to ../c
62 pushing to ../c
63 searching for changes
63 searching for changes
64 adding changesets
64 adding changesets
65 adding manifests
65 adding manifests
66 adding file changes
66 adding file changes
67 added 1 changesets with 1 changes to 1 files (-1 heads)
67 added 1 changesets with 1 changes to 1 files (-1 heads)
68 0
68 0
69 comparing with ../c
69 comparing with ../c
70 searching for changes
70 searching for changes
71 no changes found
71 no changes found
72 % issue 450
72 % issue 450
73 pushing to ../e
73 pushing to ../e
74 searching for changes
74 searching for changes
75 adding changesets
75 adding changesets
76 adding manifests
76 adding manifests
77 adding file changes
77 adding file changes
78 added 1 changesets with 1 changes to 1 files
78 added 1 changesets with 1 changes to 1 files
79 0
79 0
80 pushing to ../e
80 pushing to ../e
81 searching for changes
81 searching for changes
82 adding changesets
82 adding changesets
83 adding manifests
83 adding manifests
84 adding file changes
84 adding file changes
85 added 1 changesets with 1 changes to 1 files
85 added 1 changesets with 1 changes to 1 files
86 0
86 0
87 % issue 736
87 % issue 736
88 % push on existing branch and new branch
88 % push on existing branch and new branch
89 pushing to ../f
89 pushing to ../f
90 searching for changes
90 searching for changes
91 abort: push creates new remote branches: c!
91 abort: push creates new remote branches: c!
92 (use 'hg push -f' to force)
92 (use 'hg push -f' to force)
93 1
93 1
94 pushing to ../f
94 pushing to ../f
95 searching for changes
95 searching for changes
96 abort: push creates new remote branches: c!
96 abort: push creates new remote branches: c!
97 (use 'hg push -f' to force)
97 (use 'hg push -f' to force)
98 1
98 1
99 % multiple new branches
99 % multiple new branches
100 pushing to ../f
100 pushing to ../f
101 searching for changes
101 searching for changes
102 abort: push creates new remote branches: c, d!
102 abort: push creates new remote branches: c, d!
103 (use 'hg push -f' to force)
103 (use 'hg push -f' to force)
104 1
104 1
105 pushing to ../f
105 pushing to ../f
106 searching for changes
106 searching for changes
107 abort: push creates new remote branches: c, d!
107 abort: push creates new remote branches: c, d!
108 (use 'hg push -f' to force)
108 (use 'hg push -f' to force)
109 1
109 1
110 % fail on multiple head push
110 % fail on multiple head push
111 pushing to ../f
111 pushing to ../f
112 searching for changes
112 searching for changes
113 abort: push creates new remote heads on branch 'a'!
113 abort: push creates new remote heads on branch 'a'!
114 (did you forget to merge? use push -f to force)
114 (did you forget to merge? use push -f to force)
115 1
115 1
116 % push replacement head on existing branches
116 % push replacement head on existing branches
117 pushing to ../f
117 pushing to ../f
118 searching for changes
118 searching for changes
119 adding changesets
119 adding changesets
120 adding manifests
120 adding manifests
121 adding file changes
121 adding file changes
122 added 2 changesets with 2 changes to 1 files
122 added 2 changesets with 2 changes to 1 files
123 0
123 0
124 % merge of branch a to other branch b followed by unrelated push on branch a
124 % merge of branch a to other branch b followed by unrelated push on branch a
125 pushing to ../f
125 pushing to ../f
126 searching for changes
126 searching for changes
127 adding changesets
127 adding changesets
128 adding manifests
128 adding manifests
129 adding file changes
129 adding file changes
130 added 1 changesets with 1 changes to 1 files (-1 heads)
130 added 1 changesets with 1 changes to 1 files (-1 heads)
131 0
131 0
132 pushing to ../f
132 pushing to ../f
133 searching for changes
133 searching for changes
134 adding changesets
134 adding changesets
135 adding manifests
135 adding manifests
136 adding file changes
136 adding file changes
137 added 1 changesets with 1 changes to 1 files (+1 heads)
137 added 1 changesets with 1 changes to 1 files (+1 heads)
138 0
138 0
139 % cheating the counting algorithm
139 % cheating the counting algorithm
140 pushing to ../f
140 pushing to ../f
141 searching for changes
141 searching for changes
142 adding changesets
142 adding changesets
143 adding manifests
143 adding manifests
144 adding file changes
144 adding file changes
145 added 2 changesets with 2 changes to 1 files
145 added 2 changesets with 2 changes to 1 files
146 0
146 0
147 % checking prepush logic does not allow silently pushing multiple new heads
147 % checking prepush logic does not allow silently pushing multiple new heads
148 adding init
148 adding init
149 adding a
149 adding a
150 updating to branch default
150 updating to branch default
151 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
151 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
152 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
153 adding b
153 adding b
154 created new head
154 created new head
155 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
155 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
156 adding c
156 adding c
157 created new head
157 created new head
158 pushing to h
158 pushing to h
159 searching for changes
159 searching for changes
160 abort: push creates new remote heads on branch 'default'!
160 abort: push creates new remote heads on branch 'default'!
161 (you should pull and merge or use push -f to force)
161 (you should pull and merge or use push -f to force)
162
162
163 % check prepush logic with merged branches
163 % check prepush logic with merged branches
164 marked working directory as branch a
164 marked working directory as branch a
165 adding foo
165 adding foo
166 updating to branch a
166 updating to branch a
167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
168 marked working directory as branch b
168 marked working directory as branch b
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
171 (branch merge, don't forget to commit)
171 (branch merge, don't forget to commit)
172 pushing to j
172 pushing to j
173 searching for changes
173 searching for changes
174 abort: push creates new remote branches: b!
174 abort: push creates new remote branches: b!
175 (use 'hg push -f' to force)
175 (use 'hg push -f' to force)
176
176
177 % prepush -r should not allow you to sneak in new heads
177 % prepush -r should not allow you to sneak in new heads
178 pushing to ../l
178 pushing to ../l
179 searching for changes
179 searching for changes
180 abort: push creates new remote heads on branch 'a'!
180 abort: push creates new remote heads on branch 'a'!
181 (did you forget to merge? use push -f to force)
181 (did you forget to merge? use push -f to force)
182 % check prepush with new branch head on former topo non-head
182 % check prepush with new branch head on former topo non-head
183 marked working directory as branch A
183 marked working directory as branch A
184 adding a
184 adding a
185 marked working directory as branch B
185 marked working directory as branch B
186 adding b
186 adding b
187 updating to branch B
187 updating to branch B
188 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
188 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 adding b1
190 adding b1
191 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
191 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
192 adding a2
192 adding a2
193 created new head
193 created new head
194 %% glog of local
194 %% glog of local
195 @ 2: A a2
195 @ 2: A a2
196 |
196 |
197 | o 1: B b
197 | o 1: B b
198 |/
198 |/
199 o 0: A a
199 o 0: A a
200
200
201 %% glog of remote
201 %% glog of remote
202 @ 2: B b1
202 @ 2: B b1
203 |
203 |
204 o 1: B b
204 o 1: B b
205 |
205 |
206 o 0: A a
206 o 0: A a
207
207
208 %% outgoing
208 %% outgoing
209 comparing with inner
209 comparing with inner
210 searching for changes
210 searching for changes
211 2: A a2
211 2: A a2
212 pushing to inner
212 pushing to inner
213 searching for changes
213 searching for changes
214 note: unsynced remote changes!
214 note: unsynced remote changes!
215 adding changesets
215 adding changesets
216 adding manifests
216 adding manifests
217 adding file changes
217 adding file changes
218 added 1 changesets with 1 changes to 1 files (+1 heads)
218 added 1 changesets with 1 changes to 1 files (+1 heads)
219 % check prepush with new branch head on former topo head
219 % check prepush with new branch head on former topo head
220 marked working directory as branch A
220 marked working directory as branch A
221 adding a
221 adding a
222 marked working directory as branch B
222 marked working directory as branch B
223 adding b
223 adding b
224 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
224 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
225 adding a1
225 adding a1
226 created new head
226 created new head
227 updating to branch A
227 updating to branch A
228 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
229 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
229 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
230 adding b1
230 adding b1
231 adding a2
231 adding a2
232 %% glog of local
232 %% glog of local
233 @ 3: A a2
233 @ 3: A a2
234 |
234 |
235 o 2: A a1
235 o 2: A a1
236 |
236 |
237 | o 1: B b
237 | o 1: B b
238 |/
238 |/
239 o 0: A a
239 o 0: A a
240
240
241 %% glog of remote
241 %% glog of remote
242 @ 3: B b1
242 @ 3: B b1
243 |
243 |
244 | o 2: A a1
244 | o 2: A a1
245 | |
245 | |
246 o | 1: B b
246 o | 1: B b
247 |/
247 |/
248 o 0: A a
248 o 0: A a
249
249
250 %% outgoing
250 %% outgoing
251 comparing with inner
251 comparing with inner
252 searching for changes
252 searching for changes
253 3: A a2
253 3: A a2
254 pushing to inner
254 pushing to inner
255 searching for changes
255 searching for changes
256 note: unsynced remote changes!
256 note: unsynced remote changes!
257 adding changesets
257 adding changesets
258 adding manifests
258 adding manifests
259 adding file changes
259 adding file changes
260 added 1 changesets with 1 changes to 1 files
260 added 1 changesets with 1 changes to 1 files
261 % check prepush with new branch head and new child of former branch head
262 % but child is on different branch
263 marked working directory as branch A
264 adding a
265 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
266 marked working directory as branch B
267 adding b
268 created new head
269 updating to branch B
270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
271 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
272 marked working directory as branch B
273 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
274 marked working directory as branch A
275 %% glog of local
276 @ 5: A b3
277 |
278 | o 4: B a3
279 | |
280 o | 3: B b1
281 | |
282 o | 2: B b0
283 /
284 o 1: A a1
285 |
286 o 0: A a0
287
288 %% glog of remote
289 @ 3: B b1
290 |
291 o 2: B b0
292
293 o 1: A a1
294 |
295 o 0: A a0
296
297 %% outgoing
298 comparing with inner
299 searching for changes
300 4: B a3
301 5: A b3
302 pushing to inner
303 searching for changes
304 abort: push creates new remote heads on branch 'A'!
305 (did you forget to merge? use push -f to force)
General Comments 0
You need to be logged in to leave comments. Login now