##// END OF EJS Templates
tests: remove bundle2 activation from test-push-warn.t...
Pierre-Yves David -
r29659:7eb9ee3e default
parent child Browse files
Show More
@@ -1,798 +1,792
1 $ cat << EOF >> $HGRCPATH
2 > [experimental]
3 > # drop me once bundle2 is the default,
4 > # added to get test change early.
5 > bundle2-exp = True
6 > EOF
7 $ hg init a
1 $ hg init a
8 $ cd a
2 $ cd a
9 $ echo foo > t1
3 $ echo foo > t1
10 $ hg add t1
4 $ hg add t1
11 $ hg commit -m "1"
5 $ hg commit -m "1"
12
6
13 $ cd ..
7 $ cd ..
14 $ hg clone a b
8 $ hg clone a b
15 updating to branch default
9 updating to branch default
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17
11
18 $ cd a
12 $ cd a
19 $ echo foo > t2
13 $ echo foo > t2
20 $ hg add t2
14 $ hg add t2
21 $ hg commit -m "2"
15 $ hg commit -m "2"
22
16
23 $ cd ../b
17 $ cd ../b
24 $ echo foo > t3
18 $ echo foo > t3
25 $ hg add t3
19 $ hg add t3
26 $ hg commit -m "3"
20 $ hg commit -m "3"
27
21
28 Specifying a revset that evaluates to null will abort
22 Specifying a revset that evaluates to null will abort
29
23
30 $ hg push -r '0 & 1' ../a
24 $ hg push -r '0 & 1' ../a
31 pushing to ../a
25 pushing to ../a
32 abort: specified revisions evaluate to an empty set
26 abort: specified revisions evaluate to an empty set
33 (use different revision arguments)
27 (use different revision arguments)
34 [255]
28 [255]
35
29
36 $ hg push ../a
30 $ hg push ../a
37 pushing to ../a
31 pushing to ../a
38 searching for changes
32 searching for changes
39 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
33 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
40 abort: push creates new remote head 1e108cc5548c!
34 abort: push creates new remote head 1e108cc5548c!
41 (pull and merge or see "hg help push" for details about pushing new heads)
35 (pull and merge or see "hg help push" for details about pushing new heads)
42 [255]
36 [255]
43
37
44 $ hg push --debug ../a
38 $ hg push --debug ../a
45 pushing to ../a
39 pushing to ../a
46 query 1; heads
40 query 1; heads
47 searching for changes
41 searching for changes
48 taking quick initial sample
42 taking quick initial sample
49 query 2; still undecided: 1, sample size is: 1
43 query 2; still undecided: 1, sample size is: 1
50 2 total queries
44 2 total queries
51 listing keys for "phases"
45 listing keys for "phases"
52 checking for updated bookmarks
46 checking for updated bookmarks
53 listing keys for "bookmarks"
47 listing keys for "bookmarks"
54 listing keys for "bookmarks"
48 listing keys for "bookmarks"
55 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
49 remote has heads on branch 'default' that are not known locally: 1c9246a22a0a
56 new remote heads on branch 'default':
50 new remote heads on branch 'default':
57 1e108cc5548c
51 1e108cc5548c
58 abort: push creates new remote head 1e108cc5548c!
52 abort: push creates new remote head 1e108cc5548c!
59 (pull and merge or see "hg help push" for details about pushing new heads)
53 (pull and merge or see "hg help push" for details about pushing new heads)
60 [255]
54 [255]
61
55
62 $ hg pull ../a
56 $ hg pull ../a
63 pulling from ../a
57 pulling from ../a
64 searching for changes
58 searching for changes
65 adding changesets
59 adding changesets
66 adding manifests
60 adding manifests
67 adding file changes
61 adding file changes
68 added 1 changesets with 1 changes to 1 files (+1 heads)
62 added 1 changesets with 1 changes to 1 files (+1 heads)
69 (run 'hg heads' to see heads, 'hg merge' to merge)
63 (run 'hg heads' to see heads, 'hg merge' to merge)
70
64
71 $ hg push ../a
65 $ hg push ../a
72 pushing to ../a
66 pushing to ../a
73 searching for changes
67 searching for changes
74 abort: push creates new remote head 1e108cc5548c!
68 abort: push creates new remote head 1e108cc5548c!
75 (merge or see "hg help push" for details about pushing new heads)
69 (merge or see "hg help push" for details about pushing new heads)
76 [255]
70 [255]
77
71
78 $ hg merge
72 $ hg merge
79 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
73 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 (branch merge, don't forget to commit)
74 (branch merge, don't forget to commit)
81
75
82 $ hg commit -m "4"
76 $ hg commit -m "4"
83 $ hg push ../a
77 $ hg push ../a
84 pushing to ../a
78 pushing to ../a
85 searching for changes
79 searching for changes
86 adding changesets
80 adding changesets
87 adding manifests
81 adding manifests
88 adding file changes
82 adding file changes
89 added 2 changesets with 1 changes to 1 files
83 added 2 changesets with 1 changes to 1 files
90
84
91 $ cd ..
85 $ cd ..
92
86
93 $ hg init c
87 $ hg init c
94 $ cd c
88 $ cd c
95 $ for i in 0 1 2; do
89 $ for i in 0 1 2; do
96 > echo $i >> foo
90 > echo $i >> foo
97 > hg ci -Am $i
91 > hg ci -Am $i
98 > done
92 > done
99 adding foo
93 adding foo
100 $ cd ..
94 $ cd ..
101
95
102 $ hg clone c d
96 $ hg clone c d
103 updating to branch default
97 updating to branch default
104 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
105
99
106 $ cd d
100 $ cd d
107 $ for i in 0 1; do
101 $ for i in 0 1; do
108 > hg co -C $i
102 > hg co -C $i
109 > echo d-$i >> foo
103 > echo d-$i >> foo
110 > hg ci -m d-$i
104 > hg ci -m d-$i
111 > done
105 > done
112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
106 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 created new head
107 created new head
114 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
115 created new head
109 created new head
116
110
117 $ HGMERGE=true hg merge 3
111 $ HGMERGE=true hg merge 3
118 merging foo
112 merging foo
119 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
113 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
120 (branch merge, don't forget to commit)
114 (branch merge, don't forget to commit)
121
115
122 $ hg ci -m c-d
116 $ hg ci -m c-d
123
117
124 $ hg push ../c
118 $ hg push ../c
125 pushing to ../c
119 pushing to ../c
126 searching for changes
120 searching for changes
127 abort: push creates new remote head 6346d66eb9f5!
121 abort: push creates new remote head 6346d66eb9f5!
128 (merge or see "hg help push" for details about pushing new heads)
122 (merge or see "hg help push" for details about pushing new heads)
129 [255]
123 [255]
130
124
131 $ hg push -r 2 ../c
125 $ hg push -r 2 ../c
132 pushing to ../c
126 pushing to ../c
133 searching for changes
127 searching for changes
134 no changes found
128 no changes found
135 [1]
129 [1]
136
130
137 $ hg push -r 3 ../c
131 $ hg push -r 3 ../c
138 pushing to ../c
132 pushing to ../c
139 searching for changes
133 searching for changes
140 abort: push creates new remote head a5dda829a167!
134 abort: push creates new remote head a5dda829a167!
141 (merge or see "hg help push" for details about pushing new heads)
135 (merge or see "hg help push" for details about pushing new heads)
142 [255]
136 [255]
143
137
144 $ hg push -v -r 3 -r 4 ../c
138 $ hg push -v -r 3 -r 4 ../c
145 pushing to ../c
139 pushing to ../c
146 searching for changes
140 searching for changes
147 new remote heads on branch 'default':
141 new remote heads on branch 'default':
148 a5dda829a167
142 a5dda829a167
149 ee8fbc7a0295
143 ee8fbc7a0295
150 abort: push creates new remote head a5dda829a167!
144 abort: push creates new remote head a5dda829a167!
151 (merge or see "hg help push" for details about pushing new heads)
145 (merge or see "hg help push" for details about pushing new heads)
152 [255]
146 [255]
153
147
154 $ hg push -v -f -r 3 -r 4 ../c
148 $ hg push -v -f -r 3 -r 4 ../c
155 pushing to ../c
149 pushing to ../c
156 searching for changes
150 searching for changes
157 2 changesets found
151 2 changesets found
158 uncompressed size of bundle content:
152 uncompressed size of bundle content:
159 348 (changelog)
153 348 (changelog)
160 326 (manifests)
154 326 (manifests)
161 253 foo
155 253 foo
162 adding changesets
156 adding changesets
163 adding manifests
157 adding manifests
164 adding file changes
158 adding file changes
165 added 2 changesets with 2 changes to 1 files (+2 heads)
159 added 2 changesets with 2 changes to 1 files (+2 heads)
166
160
167 $ hg push -r 5 ../c
161 $ hg push -r 5 ../c
168 pushing to ../c
162 pushing to ../c
169 searching for changes
163 searching for changes
170 adding changesets
164 adding changesets
171 adding manifests
165 adding manifests
172 adding file changes
166 adding file changes
173 added 1 changesets with 1 changes to 1 files (-1 heads)
167 added 1 changesets with 1 changes to 1 files (-1 heads)
174
168
175 $ hg in ../c
169 $ hg in ../c
176 comparing with ../c
170 comparing with ../c
177 searching for changes
171 searching for changes
178 no changes found
172 no changes found
179 [1]
173 [1]
180
174
181
175
182 Issue450: push -r warns about remote head creation even if no heads
176 Issue450: push -r warns about remote head creation even if no heads
183 will be created
177 will be created
184
178
185 $ hg init ../e
179 $ hg init ../e
186 $ hg push -r 0 ../e
180 $ hg push -r 0 ../e
187 pushing to ../e
181 pushing to ../e
188 searching for changes
182 searching for changes
189 adding changesets
183 adding changesets
190 adding manifests
184 adding manifests
191 adding file changes
185 adding file changes
192 added 1 changesets with 1 changes to 1 files
186 added 1 changesets with 1 changes to 1 files
193
187
194 $ hg push -r 1 ../e
188 $ hg push -r 1 ../e
195 pushing to ../e
189 pushing to ../e
196 searching for changes
190 searching for changes
197 adding changesets
191 adding changesets
198 adding manifests
192 adding manifests
199 adding file changes
193 adding file changes
200 added 1 changesets with 1 changes to 1 files
194 added 1 changesets with 1 changes to 1 files
201
195
202 $ cd ..
196 $ cd ..
203
197
204
198
205 Issue736: named branches are not considered for detection of
199 Issue736: named branches are not considered for detection of
206 unmerged heads in "hg push"
200 unmerged heads in "hg push"
207
201
208 $ hg init f
202 $ hg init f
209 $ cd f
203 $ cd f
210 $ hg -q branch a
204 $ hg -q branch a
211 $ echo 0 > foo
205 $ echo 0 > foo
212 $ hg -q ci -Am 0
206 $ hg -q ci -Am 0
213 $ echo 1 > foo
207 $ echo 1 > foo
214 $ hg -q ci -m 1
208 $ hg -q ci -m 1
215 $ hg -q up 0
209 $ hg -q up 0
216 $ echo 2 > foo
210 $ echo 2 > foo
217 $ hg -q ci -m 2
211 $ hg -q ci -m 2
218 $ hg -q up 0
212 $ hg -q up 0
219 $ hg -q branch b
213 $ hg -q branch b
220 $ echo 3 > foo
214 $ echo 3 > foo
221 $ hg -q ci -m 3
215 $ hg -q ci -m 3
222 $ cd ..
216 $ cd ..
223
217
224 $ hg -q clone f g
218 $ hg -q clone f g
225 $ cd g
219 $ cd g
226
220
227 Push on existing branch and new branch:
221 Push on existing branch and new branch:
228
222
229 $ hg -q up 1
223 $ hg -q up 1
230 $ echo 4 > foo
224 $ echo 4 > foo
231 $ hg -q ci -m 4
225 $ hg -q ci -m 4
232 $ hg -q up 0
226 $ hg -q up 0
233 $ echo 5 > foo
227 $ echo 5 > foo
234 $ hg -q branch c
228 $ hg -q branch c
235 $ hg -q ci -m 5
229 $ hg -q ci -m 5
236
230
237 $ hg push ../f
231 $ hg push ../f
238 pushing to ../f
232 pushing to ../f
239 searching for changes
233 searching for changes
240 abort: push creates new remote branches: c!
234 abort: push creates new remote branches: c!
241 (use 'hg push --new-branch' to create new remote branches)
235 (use 'hg push --new-branch' to create new remote branches)
242 [255]
236 [255]
243
237
244 $ hg push -r 4 -r 5 ../f
238 $ hg push -r 4 -r 5 ../f
245 pushing to ../f
239 pushing to ../f
246 searching for changes
240 searching for changes
247 abort: push creates new remote branches: c!
241 abort: push creates new remote branches: c!
248 (use 'hg push --new-branch' to create new remote branches)
242 (use 'hg push --new-branch' to create new remote branches)
249 [255]
243 [255]
250
244
251
245
252 Multiple new branches:
246 Multiple new branches:
253
247
254 $ hg -q branch d
248 $ hg -q branch d
255 $ echo 6 > foo
249 $ echo 6 > foo
256 $ hg -q ci -m 6
250 $ hg -q ci -m 6
257
251
258 $ hg push ../f
252 $ hg push ../f
259 pushing to ../f
253 pushing to ../f
260 searching for changes
254 searching for changes
261 abort: push creates new remote branches: c, d!
255 abort: push creates new remote branches: c, d!
262 (use 'hg push --new-branch' to create new remote branches)
256 (use 'hg push --new-branch' to create new remote branches)
263 [255]
257 [255]
264
258
265 $ hg push -r 4 -r 6 ../f
259 $ hg push -r 4 -r 6 ../f
266 pushing to ../f
260 pushing to ../f
267 searching for changes
261 searching for changes
268 abort: push creates new remote branches: c, d!
262 abort: push creates new remote branches: c, d!
269 (use 'hg push --new-branch' to create new remote branches)
263 (use 'hg push --new-branch' to create new remote branches)
270 [255]
264 [255]
271
265
272 $ cd ../g
266 $ cd ../g
273
267
274
268
275 Fail on multiple head push:
269 Fail on multiple head push:
276
270
277 $ hg -q up 1
271 $ hg -q up 1
278 $ echo 7 > foo
272 $ echo 7 > foo
279 $ hg -q ci -m 7
273 $ hg -q ci -m 7
280
274
281 $ hg push -r 4 -r 7 ../f
275 $ hg push -r 4 -r 7 ../f
282 pushing to ../f
276 pushing to ../f
283 searching for changes
277 searching for changes
284 abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
278 abort: push creates new remote head 0b715ef6ff8f on branch 'a'!
285 (merge or see "hg help push" for details about pushing new heads)
279 (merge or see "hg help push" for details about pushing new heads)
286 [255]
280 [255]
287
281
288 Push replacement head on existing branches:
282 Push replacement head on existing branches:
289
283
290 $ hg -q up 3
284 $ hg -q up 3
291 $ echo 8 > foo
285 $ echo 8 > foo
292 $ hg -q ci -m 8
286 $ hg -q ci -m 8
293
287
294 $ hg push -r 7 -r 8 ../f
288 $ hg push -r 7 -r 8 ../f
295 pushing to ../f
289 pushing to ../f
296 searching for changes
290 searching for changes
297 adding changesets
291 adding changesets
298 adding manifests
292 adding manifests
299 adding file changes
293 adding file changes
300 added 2 changesets with 2 changes to 1 files
294 added 2 changesets with 2 changes to 1 files
301
295
302
296
303 Merge of branch a to other branch b followed by unrelated push
297 Merge of branch a to other branch b followed by unrelated push
304 on branch a:
298 on branch a:
305
299
306 $ hg -q up 7
300 $ hg -q up 7
307 $ HGMERGE=true hg -q merge 8
301 $ HGMERGE=true hg -q merge 8
308 $ hg -q ci -m 9
302 $ hg -q ci -m 9
309 $ hg -q up 8
303 $ hg -q up 8
310 $ echo 10 > foo
304 $ echo 10 > foo
311 $ hg -q ci -m 10
305 $ hg -q ci -m 10
312
306
313 $ hg push -r 9 ../f
307 $ hg push -r 9 ../f
314 pushing to ../f
308 pushing to ../f
315 searching for changes
309 searching for changes
316 adding changesets
310 adding changesets
317 adding manifests
311 adding manifests
318 adding file changes
312 adding file changes
319 added 1 changesets with 1 changes to 1 files (-1 heads)
313 added 1 changesets with 1 changes to 1 files (-1 heads)
320
314
321 $ hg push -r 10 ../f
315 $ hg push -r 10 ../f
322 pushing to ../f
316 pushing to ../f
323 searching for changes
317 searching for changes
324 adding changesets
318 adding changesets
325 adding manifests
319 adding manifests
326 adding file changes
320 adding file changes
327 added 1 changesets with 1 changes to 1 files (+1 heads)
321 added 1 changesets with 1 changes to 1 files (+1 heads)
328
322
329
323
330 Cheating the counting algorithm:
324 Cheating the counting algorithm:
331
325
332 $ hg -q up 9
326 $ hg -q up 9
333 $ HGMERGE=true hg -q merge 2
327 $ HGMERGE=true hg -q merge 2
334 $ hg -q ci -m 11
328 $ hg -q ci -m 11
335 $ hg -q up 1
329 $ hg -q up 1
336 $ echo 12 > foo
330 $ echo 12 > foo
337 $ hg -q ci -m 12
331 $ hg -q ci -m 12
338
332
339 $ hg push -r 11 -r 12 ../f
333 $ hg push -r 11 -r 12 ../f
340 pushing to ../f
334 pushing to ../f
341 searching for changes
335 searching for changes
342 adding changesets
336 adding changesets
343 adding manifests
337 adding manifests
344 adding file changes
338 adding file changes
345 added 2 changesets with 2 changes to 1 files
339 added 2 changesets with 2 changes to 1 files
346
340
347
341
348 Failed push of new named branch:
342 Failed push of new named branch:
349
343
350 $ echo 12 > foo
344 $ echo 12 > foo
351 $ hg -q ci -m 12a
345 $ hg -q ci -m 12a
352 [1]
346 [1]
353 $ hg -q up 11
347 $ hg -q up 11
354 $ echo 13 > foo
348 $ echo 13 > foo
355 $ hg -q branch e
349 $ hg -q branch e
356 $ hg -q ci -m 13d
350 $ hg -q ci -m 13d
357
351
358 $ hg push -r 12 -r 13 ../f
352 $ hg push -r 12 -r 13 ../f
359 pushing to ../f
353 pushing to ../f
360 searching for changes
354 searching for changes
361 abort: push creates new remote branches: e!
355 abort: push creates new remote branches: e!
362 (use 'hg push --new-branch' to create new remote branches)
356 (use 'hg push --new-branch' to create new remote branches)
363 [255]
357 [255]
364
358
365
359
366 Using --new-branch to push new named branch:
360 Using --new-branch to push new named branch:
367
361
368 $ hg push --new-branch -r 12 -r 13 ../f
362 $ hg push --new-branch -r 12 -r 13 ../f
369 pushing to ../f
363 pushing to ../f
370 searching for changes
364 searching for changes
371 adding changesets
365 adding changesets
372 adding manifests
366 adding manifests
373 adding file changes
367 adding file changes
374 added 1 changesets with 1 changes to 1 files
368 added 1 changesets with 1 changes to 1 files
375
369
376 Pushing multi headed new branch:
370 Pushing multi headed new branch:
377
371
378 $ echo 14 > foo
372 $ echo 14 > foo
379 $ hg -q branch f
373 $ hg -q branch f
380 $ hg -q ci -m 14
374 $ hg -q ci -m 14
381 $ echo 15 > foo
375 $ echo 15 > foo
382 $ hg -q ci -m 15
376 $ hg -q ci -m 15
383 $ hg -q up 14
377 $ hg -q up 14
384 $ echo 16 > foo
378 $ echo 16 > foo
385 $ hg -q ci -m 16
379 $ hg -q ci -m 16
386 $ hg push --branch f --new-branch ../f
380 $ hg push --branch f --new-branch ../f
387 pushing to ../f
381 pushing to ../f
388 searching for changes
382 searching for changes
389 abort: push creates new branch 'f' with multiple heads
383 abort: push creates new branch 'f' with multiple heads
390 (merge or see "hg help push" for details about pushing new heads)
384 (merge or see "hg help push" for details about pushing new heads)
391 [255]
385 [255]
392 $ hg push --branch f --new-branch --force ../f
386 $ hg push --branch f --new-branch --force ../f
393 pushing to ../f
387 pushing to ../f
394 searching for changes
388 searching for changes
395 adding changesets
389 adding changesets
396 adding manifests
390 adding manifests
397 adding file changes
391 adding file changes
398 added 3 changesets with 3 changes to 1 files (+1 heads)
392 added 3 changesets with 3 changes to 1 files (+1 heads)
399
393
400 Checking prepush logic does not allow silently pushing
394 Checking prepush logic does not allow silently pushing
401 multiple new heads but also doesn't report too many heads:
395 multiple new heads but also doesn't report too many heads:
402
396
403 $ cd ..
397 $ cd ..
404 $ hg init h
398 $ hg init h
405 $ echo init > h/init
399 $ echo init > h/init
406 $ hg -R h ci -Am init
400 $ hg -R h ci -Am init
407 adding init
401 adding init
408 $ echo a > h/a
402 $ echo a > h/a
409 $ hg -R h ci -Am a
403 $ hg -R h ci -Am a
410 adding a
404 adding a
411 $ hg clone h i
405 $ hg clone h i
412 updating to branch default
406 updating to branch default
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
407 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
414 $ hg -R h up 0
408 $ hg -R h up 0
415 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
409 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
416 $ echo b > h/b
410 $ echo b > h/b
417 $ hg -R h ci -Am b
411 $ hg -R h ci -Am b
418 adding b
412 adding b
419 created new head
413 created new head
420 $ hg -R i up 0
414 $ hg -R i up 0
421 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
415 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
422 $ echo c > i/c
416 $ echo c > i/c
423 $ hg -R i ci -Am c
417 $ hg -R i ci -Am c
424 adding c
418 adding c
425 created new head
419 created new head
426
420
427 $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done
421 $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done
428
422
429 $ hg -R i push h
423 $ hg -R i push h
430 pushing to h
424 pushing to h
431 searching for changes
425 searching for changes
432 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
426 remote has heads on branch 'default' that are not known locally: 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
433 abort: push creates new remote head 97bd0c84d346!
427 abort: push creates new remote head 97bd0c84d346!
434 (pull and merge or see "hg help push" for details about pushing new heads)
428 (pull and merge or see "hg help push" for details about pushing new heads)
435 [255]
429 [255]
436 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx
430 $ hg -R h up -q 0; echo x > h/b; hg -R h ci -qAmx
437 $ hg -R i push h
431 $ hg -R i push h
438 pushing to h
432 pushing to h
439 searching for changes
433 searching for changes
440 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others
434 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 and 1 others
441 abort: push creates new remote head 97bd0c84d346!
435 abort: push creates new remote head 97bd0c84d346!
442 (pull and merge or see "hg help push" for details about pushing new heads)
436 (pull and merge or see "hg help push" for details about pushing new heads)
443 [255]
437 [255]
444 $ hg -R i push h -v
438 $ hg -R i push h -v
445 pushing to h
439 pushing to h
446 searching for changes
440 searching for changes
447 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
441 remote has heads on branch 'default' that are not known locally: 18ddb72c4590 534543e22c29 764f8ec07b96 afe7cc7679f5 ce4212fc8847
448 new remote heads on branch 'default':
442 new remote heads on branch 'default':
449 97bd0c84d346
443 97bd0c84d346
450 abort: push creates new remote head 97bd0c84d346!
444 abort: push creates new remote head 97bd0c84d346!
451 (pull and merge or see "hg help push" for details about pushing new heads)
445 (pull and merge or see "hg help push" for details about pushing new heads)
452 [255]
446 [255]
453
447
454
448
455 Check prepush logic with merged branches:
449 Check prepush logic with merged branches:
456
450
457 $ hg init j
451 $ hg init j
458 $ hg -R j branch a
452 $ hg -R j branch a
459 marked working directory as branch a
453 marked working directory as branch a
460 (branches are permanent and global, did you want a bookmark?)
454 (branches are permanent and global, did you want a bookmark?)
461 $ echo init > j/foo
455 $ echo init > j/foo
462 $ hg -R j ci -Am init
456 $ hg -R j ci -Am init
463 adding foo
457 adding foo
464 $ hg clone j k
458 $ hg clone j k
465 updating to branch a
459 updating to branch a
466 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
460 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
467 $ echo a1 > j/foo
461 $ echo a1 > j/foo
468 $ hg -R j ci -m a1
462 $ hg -R j ci -m a1
469 $ hg -R k branch b
463 $ hg -R k branch b
470 marked working directory as branch b
464 marked working directory as branch b
471 $ echo b > k/foo
465 $ echo b > k/foo
472 $ hg -R k ci -m b
466 $ hg -R k ci -m b
473 $ hg -R k up 0
467 $ hg -R k up 0
474 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
468 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
475
469
476 $ hg -R k merge b
470 $ hg -R k merge b
477 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
471 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
478 (branch merge, don't forget to commit)
472 (branch merge, don't forget to commit)
479
473
480 $ hg -R k ci -m merge
474 $ hg -R k ci -m merge
481
475
482 $ hg -R k push -r a j
476 $ hg -R k push -r a j
483 pushing to j
477 pushing to j
484 searching for changes
478 searching for changes
485 abort: push creates new remote branches: b!
479 abort: push creates new remote branches: b!
486 (use 'hg push --new-branch' to create new remote branches)
480 (use 'hg push --new-branch' to create new remote branches)
487 [255]
481 [255]
488
482
489
483
490 Prepush -r should not allow you to sneak in new heads:
484 Prepush -r should not allow you to sneak in new heads:
491
485
492 $ hg init l
486 $ hg init l
493 $ cd l
487 $ cd l
494 $ echo a >> foo
488 $ echo a >> foo
495 $ hg -q add foo
489 $ hg -q add foo
496 $ hg -q branch a
490 $ hg -q branch a
497 $ hg -q ci -ma
491 $ hg -q ci -ma
498 $ hg -q up null
492 $ hg -q up null
499 $ echo a >> foo
493 $ echo a >> foo
500 $ hg -q add foo
494 $ hg -q add foo
501 $ hg -q branch b
495 $ hg -q branch b
502 $ hg -q ci -mb
496 $ hg -q ci -mb
503 $ cd ..
497 $ cd ..
504 $ hg -q clone l m -u a
498 $ hg -q clone l m -u a
505 $ cd m
499 $ cd m
506 $ hg -q merge b
500 $ hg -q merge b
507 $ hg -q ci -mmb
501 $ hg -q ci -mmb
508 $ hg -q up 0
502 $ hg -q up 0
509 $ echo a >> foo
503 $ echo a >> foo
510 $ hg -q ci -ma2
504 $ hg -q ci -ma2
511 $ hg -q up 2
505 $ hg -q up 2
512 $ echo a >> foo
506 $ echo a >> foo
513 $ hg -q branch -f b
507 $ hg -q branch -f b
514 $ hg -q ci -mb2
508 $ hg -q ci -mb2
515 $ hg -q merge 3
509 $ hg -q merge 3
516 $ hg -q ci -mma
510 $ hg -q ci -mma
517
511
518 $ hg push ../l -b b
512 $ hg push ../l -b b
519 pushing to ../l
513 pushing to ../l
520 searching for changes
514 searching for changes
521 abort: push creates new remote head 451211cc22b0 on branch 'a'!
515 abort: push creates new remote head 451211cc22b0 on branch 'a'!
522 (merge or see "hg help push" for details about pushing new heads)
516 (merge or see "hg help push" for details about pushing new heads)
523 [255]
517 [255]
524
518
525 $ cd ..
519 $ cd ..
526
520
527
521
528 Check prepush with new branch head on former topo non-head:
522 Check prepush with new branch head on former topo non-head:
529
523
530 $ hg init n
524 $ hg init n
531 $ cd n
525 $ cd n
532 $ hg branch A
526 $ hg branch A
533 marked working directory as branch A
527 marked working directory as branch A
534 (branches are permanent and global, did you want a bookmark?)
528 (branches are permanent and global, did you want a bookmark?)
535 $ echo a >a
529 $ echo a >a
536 $ hg ci -Ama
530 $ hg ci -Ama
537 adding a
531 adding a
538 $ hg branch B
532 $ hg branch B
539 marked working directory as branch B
533 marked working directory as branch B
540 $ echo b >b
534 $ echo b >b
541 $ hg ci -Amb
535 $ hg ci -Amb
542 adding b
536 adding b
543
537
544 b is now branch head of B, and a topological head
538 b is now branch head of B, and a topological head
545 a is now branch head of A, but not a topological head
539 a is now branch head of A, but not a topological head
546
540
547 $ hg clone . inner
541 $ hg clone . inner
548 updating to branch B
542 updating to branch B
549 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
543 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
550 $ cd inner
544 $ cd inner
551 $ hg up B
545 $ hg up B
552 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
546 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
553 $ echo b1 >b1
547 $ echo b1 >b1
554 $ hg ci -Amb1
548 $ hg ci -Amb1
555 adding b1
549 adding b1
556
550
557 in the clone b1 is now the head of B
551 in the clone b1 is now the head of B
558
552
559 $ cd ..
553 $ cd ..
560 $ hg up 0
554 $ hg up 0
561 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
555 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
562 $ echo a2 >a2
556 $ echo a2 >a2
563 $ hg ci -Ama2
557 $ hg ci -Ama2
564 adding a2
558 adding a2
565
559
566 a2 is now the new branch head of A, and a new topological head
560 a2 is now the new branch head of A, and a new topological head
567 it replaces a former inner branch head, so it should at most warn about
561 it replaces a former inner branch head, so it should at most warn about
568 A, not B
562 A, not B
569
563
570 glog of local:
564 glog of local:
571
565
572 $ hg log -G --template "{rev}: {branches} {desc}\n"
566 $ hg log -G --template "{rev}: {branches} {desc}\n"
573 @ 2: A a2
567 @ 2: A a2
574 |
568 |
575 | o 1: B b
569 | o 1: B b
576 |/
570 |/
577 o 0: A a
571 o 0: A a
578
572
579 glog of remote:
573 glog of remote:
580
574
581 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
575 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
582 @ 2: B b1
576 @ 2: B b1
583 |
577 |
584 o 1: B b
578 o 1: B b
585 |
579 |
586 o 0: A a
580 o 0: A a
587
581
588 outgoing:
582 outgoing:
589
583
590 $ hg out inner --template "{rev}: {branches} {desc}\n"
584 $ hg out inner --template "{rev}: {branches} {desc}\n"
591 comparing with inner
585 comparing with inner
592 searching for changes
586 searching for changes
593 2: A a2
587 2: A a2
594
588
595 $ hg push inner
589 $ hg push inner
596 pushing to inner
590 pushing to inner
597 searching for changes
591 searching for changes
598 adding changesets
592 adding changesets
599 adding manifests
593 adding manifests
600 adding file changes
594 adding file changes
601 added 1 changesets with 1 changes to 1 files (+1 heads)
595 added 1 changesets with 1 changes to 1 files (+1 heads)
602
596
603 $ cd ..
597 $ cd ..
604
598
605
599
606 Check prepush with new branch head on former topo head:
600 Check prepush with new branch head on former topo head:
607
601
608 $ hg init o
602 $ hg init o
609 $ cd o
603 $ cd o
610 $ hg branch A
604 $ hg branch A
611 marked working directory as branch A
605 marked working directory as branch A
612 (branches are permanent and global, did you want a bookmark?)
606 (branches are permanent and global, did you want a bookmark?)
613 $ echo a >a
607 $ echo a >a
614 $ hg ci -Ama
608 $ hg ci -Ama
615 adding a
609 adding a
616 $ hg branch B
610 $ hg branch B
617 marked working directory as branch B
611 marked working directory as branch B
618 $ echo b >b
612 $ echo b >b
619 $ hg ci -Amb
613 $ hg ci -Amb
620 adding b
614 adding b
621
615
622 b is now branch head of B, and a topological head
616 b is now branch head of B, and a topological head
623
617
624 $ hg up 0
618 $ hg up 0
625 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
619 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
626 $ echo a1 >a1
620 $ echo a1 >a1
627 $ hg ci -Ama1
621 $ hg ci -Ama1
628 adding a1
622 adding a1
629
623
630 a1 is now branch head of A, and a topological head
624 a1 is now branch head of A, and a topological head
631
625
632 $ hg clone . inner
626 $ hg clone . inner
633 updating to branch A
627 updating to branch A
634 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
628 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
635 $ cd inner
629 $ cd inner
636 $ hg up B
630 $ hg up B
637 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
631 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
638 $ echo b1 >b1
632 $ echo b1 >b1
639 $ hg ci -Amb1
633 $ hg ci -Amb1
640 adding b1
634 adding b1
641
635
642 in the clone b1 is now the head of B
636 in the clone b1 is now the head of B
643
637
644 $ cd ..
638 $ cd ..
645 $ echo a2 >a2
639 $ echo a2 >a2
646 $ hg ci -Ama2
640 $ hg ci -Ama2
647 adding a2
641 adding a2
648
642
649 a2 is now the new branch head of A, and a topological head
643 a2 is now the new branch head of A, and a topological head
650 it replaces a former topological and branch head, so this should not warn
644 it replaces a former topological and branch head, so this should not warn
651
645
652 glog of local:
646 glog of local:
653
647
654 $ hg log -G --template "{rev}: {branches} {desc}\n"
648 $ hg log -G --template "{rev}: {branches} {desc}\n"
655 @ 3: A a2
649 @ 3: A a2
656 |
650 |
657 o 2: A a1
651 o 2: A a1
658 |
652 |
659 | o 1: B b
653 | o 1: B b
660 |/
654 |/
661 o 0: A a
655 o 0: A a
662
656
663 glog of remote:
657 glog of remote:
664
658
665 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
659 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
666 @ 3: B b1
660 @ 3: B b1
667 |
661 |
668 | o 2: A a1
662 | o 2: A a1
669 | |
663 | |
670 o | 1: B b
664 o | 1: B b
671 |/
665 |/
672 o 0: A a
666 o 0: A a
673
667
674 outgoing:
668 outgoing:
675
669
676 $ hg out inner --template "{rev}: {branches} {desc}\n"
670 $ hg out inner --template "{rev}: {branches} {desc}\n"
677 comparing with inner
671 comparing with inner
678 searching for changes
672 searching for changes
679 3: A a2
673 3: A a2
680
674
681 $ hg push inner
675 $ hg push inner
682 pushing to inner
676 pushing to inner
683 searching for changes
677 searching for changes
684 adding changesets
678 adding changesets
685 adding manifests
679 adding manifests
686 adding file changes
680 adding file changes
687 added 1 changesets with 1 changes to 1 files
681 added 1 changesets with 1 changes to 1 files
688
682
689 $ cd ..
683 $ cd ..
690
684
691
685
692 Check prepush with new branch head and new child of former branch head
686 Check prepush with new branch head and new child of former branch head
693 but child is on different branch:
687 but child is on different branch:
694
688
695 $ hg init p
689 $ hg init p
696 $ cd p
690 $ cd p
697 $ hg branch A
691 $ hg branch A
698 marked working directory as branch A
692 marked working directory as branch A
699 (branches are permanent and global, did you want a bookmark?)
693 (branches are permanent and global, did you want a bookmark?)
700 $ echo a0 >a
694 $ echo a0 >a
701 $ hg ci -Ama0
695 $ hg ci -Ama0
702 adding a
696 adding a
703 $ echo a1 >a
697 $ echo a1 >a
704 $ hg ci -ma1
698 $ hg ci -ma1
705 $ hg up null
699 $ hg up null
706 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
700 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
707 $ hg branch B
701 $ hg branch B
708 marked working directory as branch B
702 marked working directory as branch B
709 $ echo b0 >b
703 $ echo b0 >b
710 $ hg ci -Amb0
704 $ hg ci -Amb0
711 adding b
705 adding b
712 $ echo b1 >b
706 $ echo b1 >b
713 $ hg ci -mb1
707 $ hg ci -mb1
714
708
715 $ hg clone . inner
709 $ hg clone . inner
716 updating to branch B
710 updating to branch B
717 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
711 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
718
712
719 $ hg up A
713 $ hg up A
720 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
714 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
721 $ hg branch -f B
715 $ hg branch -f B
722 marked working directory as branch B
716 marked working directory as branch B
723 $ echo a3 >a
717 $ echo a3 >a
724 $ hg ci -ma3
718 $ hg ci -ma3
725 created new head
719 created new head
726 $ hg up 3
720 $ hg up 3
727 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
721 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
728 $ hg branch -f A
722 $ hg branch -f A
729 marked working directory as branch A
723 marked working directory as branch A
730 $ echo b3 >b
724 $ echo b3 >b
731 $ hg ci -mb3
725 $ hg ci -mb3
732 created new head
726 created new head
733
727
734 glog of local:
728 glog of local:
735
729
736 $ hg log -G --template "{rev}: {branches} {desc}\n"
730 $ hg log -G --template "{rev}: {branches} {desc}\n"
737 @ 5: A b3
731 @ 5: A b3
738 |
732 |
739 | o 4: B a3
733 | o 4: B a3
740 | |
734 | |
741 o | 3: B b1
735 o | 3: B b1
742 | |
736 | |
743 o | 2: B b0
737 o | 2: B b0
744 /
738 /
745 o 1: A a1
739 o 1: A a1
746 |
740 |
747 o 0: A a0
741 o 0: A a0
748
742
749 glog of remote:
743 glog of remote:
750
744
751 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
745 $ hg log -G -R inner --template "{rev}: {branches} {desc}\n"
752 @ 3: B b1
746 @ 3: B b1
753 |
747 |
754 o 2: B b0
748 o 2: B b0
755
749
756 o 1: A a1
750 o 1: A a1
757 |
751 |
758 o 0: A a0
752 o 0: A a0
759
753
760 outgoing:
754 outgoing:
761
755
762 $ hg out inner --template "{rev}: {branches} {desc}\n"
756 $ hg out inner --template "{rev}: {branches} {desc}\n"
763 comparing with inner
757 comparing with inner
764 searching for changes
758 searching for changes
765 4: B a3
759 4: B a3
766 5: A b3
760 5: A b3
767
761
768 $ hg push inner
762 $ hg push inner
769 pushing to inner
763 pushing to inner
770 searching for changes
764 searching for changes
771 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
765 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
772 (merge or see "hg help push" for details about pushing new heads)
766 (merge or see "hg help push" for details about pushing new heads)
773 [255]
767 [255]
774
768
775 $ hg push inner -r4 -r5
769 $ hg push inner -r4 -r5
776 pushing to inner
770 pushing to inner
777 searching for changes
771 searching for changes
778 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
772 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
779 (merge or see "hg help push" for details about pushing new heads)
773 (merge or see "hg help push" for details about pushing new heads)
780 [255]
774 [255]
781
775
782 $ hg in inner
776 $ hg in inner
783 comparing with inner
777 comparing with inner
784 searching for changes
778 searching for changes
785 no changes found
779 no changes found
786 [1]
780 [1]
787
781
788 Test fail hook
782 Test fail hook
789
783
790 $ hg push inner --config hooks.fail-push="echo running fail-push hook"
784 $ hg push inner --config hooks.fail-push="echo running fail-push hook"
791 pushing to inner
785 pushing to inner
792 searching for changes
786 searching for changes
793 running fail-push hook
787 running fail-push hook
794 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
788 abort: push creates new remote head 7d0f4fb6cf04 on branch 'A'!
795 (merge or see "hg help push" for details about pushing new heads)
789 (merge or see "hg help push" for details about pushing new heads)
796 [255]
790 [255]
797
791
798 $ cd ..
792 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now