##// END OF EJS Templates
test: use both bundle formats in test-bookmarks-pushpull...
Pierre-Yves David -
r25357:efa2621c default
parent child Browse files
Show More
@@ -1,729 +1,749
1 1 #require serve
2 2
3 3 $ cat << EOF >> $HGRCPATH
4 4 > [ui]
5 5 > logtemplate={rev}:{node|short} {desc|firstline}
6 6 > [phases]
7 7 > publish=False
8 8 > [experimental]
9 9 > evolution=createmarkers,exchange
10 10 > # drop me once bundle2 is the default,
11 11 > # added to get test change early.
12 12 > bundle2-exp = True
13 13 > EOF
14 14
15 15 initialize
16 16
17 17 $ hg init a
18 18 $ cd a
19 19 $ echo 'test' > test
20 20 $ hg commit -Am'test'
21 21 adding test
22 22
23 23 set bookmarks
24 24
25 25 $ hg bookmark X
26 26 $ hg bookmark Y
27 27 $ hg bookmark Z
28 28
29 29 import bookmark by name
30 30
31 31 $ hg init ../b
32 32 $ cd ../b
33 33 $ hg book Y
34 34 $ hg book
35 35 * Y -1:000000000000
36 36 $ hg pull ../a
37 37 pulling from ../a
38 38 requesting all changes
39 39 adding changesets
40 40 adding manifests
41 41 adding file changes
42 42 added 1 changesets with 1 changes to 1 files
43 43 adding remote bookmark X
44 44 updating bookmark Y
45 45 adding remote bookmark Z
46 46 (run 'hg update' to get a working copy)
47 47 $ hg bookmarks
48 48 X 0:4e3505fd9583
49 49 * Y 0:4e3505fd9583
50 50 Z 0:4e3505fd9583
51 51 $ hg debugpushkey ../a namespaces
52 52 bookmarks
53 53 namespaces
54 54 obsolete
55 55 phases
56 56 $ hg debugpushkey ../a bookmarks
57 57 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
58 58 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
59 59 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
60 60
61 61 delete the bookmark to re-pull it
62 62
63 63 $ hg book -d X
64 64 $ hg pull -B X ../a
65 65 pulling from ../a
66 66 no changes found
67 67 adding remote bookmark X
68 68
69 69 finally no-op pull
70 70
71 71 $ hg pull -B X ../a
72 72 pulling from ../a
73 73 no changes found
74 74 $ hg bookmark
75 75 X 0:4e3505fd9583
76 76 * Y 0:4e3505fd9583
77 77 Z 0:4e3505fd9583
78 78
79 79 export bookmark by name
80 80
81 81 $ hg bookmark W
82 82 $ hg bookmark foo
83 83 $ hg bookmark foobar
84 84 $ hg push -B W ../a
85 85 pushing to ../a
86 86 searching for changes
87 87 no changes found
88 88 exporting bookmark W
89 89 [1]
90 90 $ hg -R ../a bookmarks
91 91 W -1:000000000000
92 92 X 0:4e3505fd9583
93 93 Y 0:4e3505fd9583
94 94 * Z 0:4e3505fd9583
95 95
96 96 delete a remote bookmark
97 97
98 98 $ hg book -d W
99 99 $ hg push -B W ../a
100 100 pushing to ../a
101 101 searching for changes
102 102 no changes found
103 103 deleting remote bookmark W
104 104 [1]
105 105
106 106 push/pull name that doesn't exist
107 107
108 108 $ hg push -B badname ../a
109 109 pushing to ../a
110 110 searching for changes
111 111 bookmark badname does not exist on the local or remote repository!
112 112 no changes found
113 113 [2]
114 114 $ hg pull -B anotherbadname ../a
115 115 pulling from ../a
116 116 abort: remote bookmark anotherbadname not found!
117 117 [255]
118 118
119 119 divergent bookmarks
120 120
121 121 $ cd ../a
122 122 $ echo c1 > f1
123 123 $ hg ci -Am1
124 124 adding f1
125 125 $ hg book -f @
126 126 $ hg book -f X
127 127 $ hg book
128 128 @ 1:0d2164f0ce0d
129 129 * X 1:0d2164f0ce0d
130 130 Y 0:4e3505fd9583
131 131 Z 1:0d2164f0ce0d
132 132
133 133 $ cd ../b
134 134 $ hg up
135 135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 136 updating bookmark foobar
137 137 $ echo c2 > f2
138 138 $ hg ci -Am2
139 139 adding f2
140 140 $ hg book -if @
141 141 $ hg book -if X
142 142 $ hg book
143 143 @ 1:9b140be10808
144 144 X 1:9b140be10808
145 145 Y 0:4e3505fd9583
146 146 Z 0:4e3505fd9583
147 147 foo -1:000000000000
148 148 * foobar 1:9b140be10808
149 149
150 150 $ hg pull --config paths.foo=../a foo
151 151 pulling from $TESTTMP/a (glob)
152 152 searching for changes
153 153 adding changesets
154 154 adding manifests
155 155 adding file changes
156 156 added 1 changesets with 1 changes to 1 files (+1 heads)
157 157 divergent bookmark @ stored as @foo
158 158 divergent bookmark X stored as X@foo
159 159 updating bookmark Z
160 160 (run 'hg heads' to see heads, 'hg merge' to merge)
161 161 $ hg book
162 162 @ 1:9b140be10808
163 163 @foo 2:0d2164f0ce0d
164 164 X 1:9b140be10808
165 165 X@foo 2:0d2164f0ce0d
166 166 Y 0:4e3505fd9583
167 167 Z 2:0d2164f0ce0d
168 168 foo -1:000000000000
169 169 * foobar 1:9b140be10808
170 170
171 171 (test that too many divergence of bookmark)
172 172
173 173 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -r 000000000000 "X@${i}"; done
174 174 $ hg pull ../a
175 175 pulling from ../a
176 176 searching for changes
177 177 no changes found
178 178 warning: failed to assign numbered name to divergent bookmark X
179 179 divergent bookmark @ stored as @1
180 180 $ hg bookmarks | grep '^ X' | grep -v ':000000000000'
181 181 X 1:9b140be10808
182 182 X@foo 2:0d2164f0ce0d
183 183
184 184 (test that remotely diverged bookmarks are reused if they aren't changed)
185 185
186 186 $ hg bookmarks | grep '^ @'
187 187 @ 1:9b140be10808
188 188 @1 2:0d2164f0ce0d
189 189 @foo 2:0d2164f0ce0d
190 190 $ hg pull ../a
191 191 pulling from ../a
192 192 searching for changes
193 193 no changes found
194 194 warning: failed to assign numbered name to divergent bookmark X
195 195 divergent bookmark @ stored as @1
196 196 $ hg bookmarks | grep '^ @'
197 197 @ 1:9b140be10808
198 198 @1 2:0d2164f0ce0d
199 199 @foo 2:0d2164f0ce0d
200 200
201 201 $ python $TESTDIR/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
202 202 $ hg bookmarks -d "@1"
203 203
204 204 $ hg push -f ../a
205 205 pushing to ../a
206 206 searching for changes
207 207 adding changesets
208 208 adding manifests
209 209 adding file changes
210 210 added 1 changesets with 1 changes to 1 files (+1 heads)
211 211 $ hg -R ../a book
212 212 @ 1:0d2164f0ce0d
213 213 * X 1:0d2164f0ce0d
214 214 Y 0:4e3505fd9583
215 215 Z 1:0d2164f0ce0d
216 216
217 217 explicit pull should overwrite the local version (issue4439)
218 218
219 219 $ hg pull --config paths.foo=../a foo -B X
220 220 pulling from $TESTTMP/a (glob)
221 221 no changes found
222 222 divergent bookmark @ stored as @foo
223 223 importing bookmark X
224 224
225 225 reinstall state for further testing:
226 226
227 227 $ hg book -fr 9b140be10808 X
228 228
229 229 revsets should not ignore divergent bookmarks
230 230
231 231 $ hg bookmark -fr 1 Z
232 232 $ hg log -r 'bookmark()' --template '{rev}:{node|short} {bookmarks}\n'
233 233 0:4e3505fd9583 Y
234 234 1:9b140be10808 @ X Z foobar
235 235 2:0d2164f0ce0d @foo X@foo
236 236 $ hg log -r 'bookmark("X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
237 237 2:0d2164f0ce0d @foo X@foo
238 238 $ hg log -r 'bookmark("re:X@foo")' --template '{rev}:{node|short} {bookmarks}\n'
239 239 2:0d2164f0ce0d @foo X@foo
240 240
241 241 update a remote bookmark from a non-head to a head
242 242
243 243 $ hg up -q Y
244 244 $ echo c3 > f2
245 245 $ hg ci -Am3
246 246 adding f2
247 247 created new head
248 248 $ hg push ../a
249 249 pushing to ../a
250 250 searching for changes
251 251 adding changesets
252 252 adding manifests
253 253 adding file changes
254 254 added 1 changesets with 1 changes to 1 files (+1 heads)
255 255 updating bookmark Y
256 256 $ hg -R ../a book
257 257 @ 1:0d2164f0ce0d
258 258 * X 1:0d2164f0ce0d
259 259 Y 3:f6fc62dde3c0
260 260 Z 1:0d2164f0ce0d
261 261
262 262 update a bookmark in the middle of a client pulling changes
263 263
264 264 $ cd ..
265 265 $ hg clone -q a pull-race
266 266 $ hg clone -q pull-race pull-race2
267 267 $ cd pull-race
268 268 $ hg up -q Y
269 269 $ echo c4 > f2
270 270 $ hg ci -Am4
271 271 $ echo c5 > f3
272 272 $ cat <<EOF > .hg/hgrc
273 273 > [hooks]
274 274 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
275 275 > EOF
276 276 $ cd ../pull-race2
277 277 $ hg pull
278 278 pulling from $TESTTMP/pull-race (glob)
279 279 searching for changes
280 280 adding f3
281 281 committed in pull-race
282 282 adding changesets
283 283 adding manifests
284 284 adding file changes
285 285 added 1 changesets with 1 changes to 1 files
286 286 updating bookmark Y
287 287 (run 'hg update' to get a working copy)
288 288 $ hg book
289 289 * @ 1:0d2164f0ce0d
290 290 X 1:0d2164f0ce0d
291 291 Y 4:b0a5eff05604
292 292 Z 1:0d2164f0ce0d
293 293 $ cd ../b
294 294
295 295 diverging a remote bookmark fails
296 296
297 297 $ hg up -q 4e3505fd9583
298 298 $ echo c4 > f2
299 299 $ hg ci -Am4
300 300 adding f2
301 301 created new head
302 302 $ echo c5 > f2
303 303 $ hg ci -Am5
304 304 $ hg log -G
305 305 @ 5:c922c0139ca0 5
306 306 |
307 307 o 4:4efff6d98829 4
308 308 |
309 309 | o 3:f6fc62dde3c0 3
310 310 |/
311 311 | o 2:0d2164f0ce0d 1
312 312 |/
313 313 | o 1:9b140be10808 2
314 314 |/
315 315 o 0:4e3505fd9583 test
316 316
317 317
318 318 $ hg book -f Y
319 319
320 320 $ cat <<EOF > ../a/.hg/hgrc
321 321 > [web]
322 322 > push_ssl = false
323 323 > allow_push = *
324 324 > EOF
325 325
326 326 $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid
327 327 $ cat ../hg2.pid >> $DAEMON_PIDS
328 328
329 329 $ hg push http://localhost:$HGPORT2/
330 330 pushing to http://localhost:$HGPORT2/
331 331 searching for changes
332 332 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
333 333 (merge or see "hg help push" for details about pushing new heads)
334 334 [255]
335 335 $ hg -R ../a book
336 336 @ 1:0d2164f0ce0d
337 337 * X 1:0d2164f0ce0d
338 338 Y 3:f6fc62dde3c0
339 339 Z 1:0d2164f0ce0d
340 340
341 341
342 342 Unrelated marker does not alter the decision
343 343
344 344 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
345 345 $ hg push http://localhost:$HGPORT2/
346 346 pushing to http://localhost:$HGPORT2/
347 347 searching for changes
348 348 abort: push creates new remote head c922c0139ca0 with bookmark 'Y'!
349 349 (merge or see "hg help push" for details about pushing new heads)
350 350 [255]
351 351 $ hg -R ../a book
352 352 @ 1:0d2164f0ce0d
353 353 * X 1:0d2164f0ce0d
354 354 Y 3:f6fc62dde3c0
355 355 Z 1:0d2164f0ce0d
356 356
357 357 Update to a successor works
358 358
359 359 $ hg id --debug -r 3
360 360 f6fc62dde3c0771e29704af56ba4d8af77abcc2f
361 361 $ hg id --debug -r 4
362 362 4efff6d98829d9c824c621afd6e3f01865f5439f
363 363 $ hg id --debug -r 5
364 364 c922c0139ca03858f655e4a2af4dd02796a63969 tip Y
365 365 $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc
366 366 $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f
367 367 $ hg push http://localhost:$HGPORT2/
368 368 pushing to http://localhost:$HGPORT2/
369 369 searching for changes
370 370 remote: adding changesets
371 371 remote: adding manifests
372 372 remote: adding file changes
373 373 remote: added 2 changesets with 2 changes to 1 files (+1 heads)
374 374 remote: 2 new obsolescence markers
375 375 updating bookmark Y
376 376 $ hg -R ../a book
377 377 @ 1:0d2164f0ce0d
378 378 * X 1:0d2164f0ce0d
379 379 Y 5:c922c0139ca0
380 380 Z 1:0d2164f0ce0d
381 381
382 382 hgweb
383 383
384 384 $ cat <<EOF > .hg/hgrc
385 385 > [web]
386 386 > push_ssl = false
387 387 > allow_push = *
388 388 > EOF
389 389
390 390 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
391 391 $ cat ../hg.pid >> $DAEMON_PIDS
392 392 $ cd ../a
393 393
394 394 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
395 395 bookmarks
396 396 namespaces
397 397 obsolete
398 398 phases
399 399 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
400 400 @ 9b140be1080824d768c5a4691a564088eede71f9
401 401 X 9b140be1080824d768c5a4691a564088eede71f9
402 402 Y c922c0139ca03858f655e4a2af4dd02796a63969
403 403 Z 9b140be1080824d768c5a4691a564088eede71f9
404 404 foo 0000000000000000000000000000000000000000
405 405 foobar 9b140be1080824d768c5a4691a564088eede71f9
406 406 $ hg out -B http://localhost:$HGPORT/
407 407 comparing with http://localhost:$HGPORT/
408 408 searching for changed bookmarks
409 409 @ 0d2164f0ce0d
410 410 X 0d2164f0ce0d
411 411 Z 0d2164f0ce0d
412 412 foo
413 413 foobar
414 414 $ hg push -B Z http://localhost:$HGPORT/
415 415 pushing to http://localhost:$HGPORT/
416 416 searching for changes
417 417 no changes found
418 418 updating bookmark Z
419 419 [1]
420 420 $ hg book -d Z
421 421 $ hg in -B http://localhost:$HGPORT/
422 422 comparing with http://localhost:$HGPORT/
423 423 searching for changed bookmarks
424 424 @ 9b140be10808
425 425 X 9b140be10808
426 426 Z 0d2164f0ce0d
427 427 foo 000000000000
428 428 foobar 9b140be10808
429 429 $ hg pull -B Z http://localhost:$HGPORT/
430 430 pulling from http://localhost:$HGPORT/
431 431 no changes found
432 432 divergent bookmark @ stored as @1
433 433 divergent bookmark X stored as X@1
434 434 adding remote bookmark Z
435 435 adding remote bookmark foo
436 436 adding remote bookmark foobar
437 437 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
438 438 requesting all changes
439 439 adding changesets
440 440 adding manifests
441 441 adding file changes
442 442 added 5 changesets with 5 changes to 3 files (+2 heads)
443 443 2 new obsolescence markers
444 444 updating to bookmark @
445 445 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
446 446 $ hg -R cloned-bookmarks bookmarks
447 447 * @ 1:9b140be10808
448 448 X 1:9b140be10808
449 449 Y 4:c922c0139ca0
450 450 Z 2:0d2164f0ce0d
451 451 foo -1:000000000000
452 452 foobar 1:9b140be10808
453 453
454 454 $ cd ..
455 455
456 456 Test to show result of bookmarks comparision
457 457
458 458 $ mkdir bmcomparison
459 459 $ cd bmcomparison
460 460
461 461 $ hg init source
462 462 $ hg -R source debugbuilddag '+2*2*3*4'
463 463 $ hg -R source log -G --template '{rev}:{node|short}'
464 464 o 4:e7bd5218ca15
465 465 |
466 466 | o 3:6100d3090acf
467 467 |/
468 468 | o 2:fa942426a6fd
469 469 |/
470 470 | o 1:66f7d451a68b
471 471 |/
472 472 o 0:1ea73414a91b
473 473
474 474 $ hg -R source bookmarks -r 0 SAME
475 475 $ hg -R source bookmarks -r 0 ADV_ON_REPO1
476 476 $ hg -R source bookmarks -r 0 ADV_ON_REPO2
477 477 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO1
478 478 $ hg -R source bookmarks -r 0 DIFF_ADV_ON_REPO2
479 479 $ hg -R source bookmarks -r 1 DIVERGED
480 480
481 481 $ hg clone -U source repo1
482 482
483 483 (test that incoming/outgoing exit with 1, if there is no bookmark to
484 484 be excahnged)
485 485
486 486 $ hg -R repo1 incoming -B
487 487 comparing with $TESTTMP/bmcomparison/source
488 488 searching for changed bookmarks
489 489 no changed bookmarks found
490 490 [1]
491 491 $ hg -R repo1 outgoing -B
492 492 comparing with $TESTTMP/bmcomparison/source
493 493 searching for changed bookmarks
494 494 no changed bookmarks found
495 495 [1]
496 496
497 497 $ hg -R repo1 bookmarks -f -r 1 ADD_ON_REPO1
498 498 $ hg -R repo1 bookmarks -f -r 2 ADV_ON_REPO1
499 499 $ hg -R repo1 bookmarks -f -r 3 DIFF_ADV_ON_REPO1
500 500 $ hg -R repo1 bookmarks -f -r 3 DIFF_DIVERGED
501 501 $ hg -R repo1 -q --config extensions.mq= strip 4
502 502 $ hg -R repo1 log -G --template '{node|short} ({bookmarks})'
503 503 o 6100d3090acf (DIFF_ADV_ON_REPO1 DIFF_DIVERGED)
504 504 |
505 505 | o fa942426a6fd (ADV_ON_REPO1)
506 506 |/
507 507 | o 66f7d451a68b (ADD_ON_REPO1 DIVERGED)
508 508 |/
509 509 o 1ea73414a91b (ADV_ON_REPO2 DIFF_ADV_ON_REPO2 SAME)
510 510
511 511
512 512 $ hg clone -U source repo2
513 513 $ hg -R repo2 bookmarks -f -r 1 ADD_ON_REPO2
514 514 $ hg -R repo2 bookmarks -f -r 1 ADV_ON_REPO2
515 515 $ hg -R repo2 bookmarks -f -r 2 DIVERGED
516 516 $ hg -R repo2 bookmarks -f -r 4 DIFF_ADV_ON_REPO2
517 517 $ hg -R repo2 bookmarks -f -r 4 DIFF_DIVERGED
518 518 $ hg -R repo2 -q --config extensions.mq= strip 3
519 519 $ hg -R repo2 log -G --template '{node|short} ({bookmarks})'
520 520 o e7bd5218ca15 (DIFF_ADV_ON_REPO2 DIFF_DIVERGED)
521 521 |
522 522 | o fa942426a6fd (DIVERGED)
523 523 |/
524 524 | o 66f7d451a68b (ADD_ON_REPO2 ADV_ON_REPO2)
525 525 |/
526 526 o 1ea73414a91b (ADV_ON_REPO1 DIFF_ADV_ON_REPO1 SAME)
527 527
528 528
529 529 (test that difference of bookmarks between repositories are fully shown)
530 530
531 531 $ hg -R repo1 incoming -B repo2 -v
532 532 comparing with repo2
533 533 searching for changed bookmarks
534 534 ADD_ON_REPO2 66f7d451a68b added
535 535 ADV_ON_REPO2 66f7d451a68b advanced
536 536 DIFF_ADV_ON_REPO2 e7bd5218ca15 changed
537 537 DIFF_DIVERGED e7bd5218ca15 changed
538 538 DIVERGED fa942426a6fd diverged
539 539 $ hg -R repo1 outgoing -B repo2 -v
540 540 comparing with repo2
541 541 searching for changed bookmarks
542 542 ADD_ON_REPO1 66f7d451a68b added
543 543 ADD_ON_REPO2 deleted
544 544 ADV_ON_REPO1 fa942426a6fd advanced
545 545 DIFF_ADV_ON_REPO1 6100d3090acf advanced
546 546 DIFF_ADV_ON_REPO2 1ea73414a91b changed
547 547 DIFF_DIVERGED 6100d3090acf changed
548 548 DIVERGED 66f7d451a68b diverged
549 549
550 550 $ hg -R repo2 incoming -B repo1 -v
551 551 comparing with repo1
552 552 searching for changed bookmarks
553 553 ADD_ON_REPO1 66f7d451a68b added
554 554 ADV_ON_REPO1 fa942426a6fd advanced
555 555 DIFF_ADV_ON_REPO1 6100d3090acf changed
556 556 DIFF_DIVERGED 6100d3090acf changed
557 557 DIVERGED 66f7d451a68b diverged
558 558 $ hg -R repo2 outgoing -B repo1 -v
559 559 comparing with repo1
560 560 searching for changed bookmarks
561 561 ADD_ON_REPO1 deleted
562 562 ADD_ON_REPO2 66f7d451a68b added
563 563 ADV_ON_REPO2 66f7d451a68b advanced
564 564 DIFF_ADV_ON_REPO1 1ea73414a91b changed
565 565 DIFF_ADV_ON_REPO2 e7bd5218ca15 advanced
566 566 DIFF_DIVERGED e7bd5218ca15 changed
567 567 DIVERGED fa942426a6fd diverged
568 568
569 569 $ cd ..
570 570
571 571 Pushing a bookmark should only push the changes required by that
572 572 bookmark, not all outgoing changes:
573 573 $ hg clone http://localhost:$HGPORT/ addmarks
574 574 requesting all changes
575 575 adding changesets
576 576 adding manifests
577 577 adding file changes
578 578 added 5 changesets with 5 changes to 3 files (+2 heads)
579 579 2 new obsolescence markers
580 580 updating to bookmark @
581 581 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 582 $ cd addmarks
583 583 $ echo foo > foo
584 584 $ hg add foo
585 585 $ hg commit -m 'add foo'
586 586 $ echo bar > bar
587 587 $ hg add bar
588 588 $ hg commit -m 'add bar'
589 589 $ hg co "tip^"
590 590 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
591 591 (leaving bookmark @)
592 592 $ hg book add-foo
593 593 $ hg book -r tip add-bar
594 594 Note: this push *must* push only a single changeset, as that's the point
595 595 of this test.
596 596 $ hg push -B add-foo --traceback
597 597 pushing to http://localhost:$HGPORT/
598 598 searching for changes
599 599 remote: adding changesets
600 600 remote: adding manifests
601 601 remote: adding file changes
602 602 remote: added 1 changesets with 1 changes to 1 files
603 603 exporting bookmark add-foo
604 604
605 605 pushing a new bookmark on a new head does not require -f if -B is specified
606 606
607 607 $ hg up -q X
608 608 $ hg book W
609 609 $ echo c5 > f2
610 610 $ hg ci -Am5
611 611 created new head
612 612 $ hg push -B W
613 613 pushing to http://localhost:$HGPORT/
614 614 searching for changes
615 615 remote: adding changesets
616 616 remote: adding manifests
617 617 remote: adding file changes
618 618 remote: added 1 changesets with 1 changes to 1 files (+1 heads)
619 619 exporting bookmark W
620 620 $ hg -R ../b id -r W
621 621 cc978a373a53 tip W
622 622
623 623 Check summary output for incoming/outgoing bookmarks
624 624
625 625 $ hg bookmarks -d X
626 626 $ hg bookmarks -d Y
627 627 $ hg summary --remote | grep '^remote:'
628 628 remote: *, 2 incoming bookmarks, 1 outgoing bookmarks (glob)
629 629
630 630 $ cd ..
631 631
632 632 pushing an unchanged bookmark should result in no changes
633 633
634 634 $ hg init unchanged-a
635 635 $ hg init unchanged-b
636 636 $ cd unchanged-a
637 637 $ echo initial > foo
638 638 $ hg commit -A -m initial
639 639 adding foo
640 640 $ hg bookmark @
641 641 $ hg push -B @ ../unchanged-b
642 642 pushing to ../unchanged-b
643 643 searching for changes
644 644 adding changesets
645 645 adding manifests
646 646 adding file changes
647 647 added 1 changesets with 1 changes to 1 files
648 648 exporting bookmark @
649 649
650 650 $ hg push -B @ ../unchanged-b
651 651 pushing to ../unchanged-b
652 652 searching for changes
653 653 no changes found
654 654 [1]
655 655
656 656
657 657 Check hook preventing push (issue4455)
658 658 ======================================
659 659
660 660 $ hg bookmarks
661 661 * @ 0:55482a6fb4b1
662 662 $ hg log -G
663 663 @ 0:55482a6fb4b1 initial
664 664
665 665 $ hg init ../issue4455-dest
666 666 $ hg push ../issue4455-dest # changesets only
667 667 pushing to ../issue4455-dest
668 668 searching for changes
669 669 adding changesets
670 670 adding manifests
671 671 adding file changes
672 672 added 1 changesets with 1 changes to 1 files
673 673 $ cat >> .hg/hgrc << EOF
674 674 > [paths]
675 675 > local=../issue4455-dest/
676 676 > ssh=ssh://user@dummy/issue4455-dest
677 677 > http=http://localhost:$HGPORT/
678 678 > [ui]
679 679 > ssh=python "$TESTDIR/dummyssh"
680 680 > EOF
681 681 $ cat >> ../issue4455-dest/.hg/hgrc << EOF
682 682 > [hooks]
683 683 > prepushkey=false
684 684 > [web]
685 685 > push_ssl = false
686 686 > allow_push = *
687 687 > EOF
688 688 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
689 689 $ hg -R ../issue4455-dest serve -p $HGPORT -d --pid-file=../issue4455.pid -E ../issue4455-error.log
690 690 $ cat ../issue4455.pid >> $DAEMON_PIDS
691 691
692 692 Local push
693 693 ----------
694 694
695 695 $ hg push -B @ local
696 696 pushing to $TESTTMP/issue4455-dest (glob)
697 697 searching for changes
698 698 no changes found
699 699 pushkey-abort: prepushkey hook exited with status 1
700 700 exporting bookmark @ failed!
701 701 [1]
702 702 $ hg -R ../issue4455-dest/ bookmarks
703 703 no bookmarks set
704 704
705 705 Using ssh
706 706 ---------
707 707
708 $ hg push -B @ ssh
708 $ hg push -B @ ssh --config experimental.bundle2-exp=True
709 pushing to ssh://user@dummy/issue4455-dest
710 searching for changes
711 no changes found
712 remote: pushkey-abort: prepushkey hook exited with status 1
713 exporting bookmark @ failed!
714 [1]
715 $ hg -R ../issue4455-dest/ bookmarks
716 no bookmarks set
717
718 $ hg push -B @ ssh --config experimental.bundle2-exp=False
709 719 pushing to ssh://user@dummy/issue4455-dest
710 720 searching for changes
711 721 no changes found
712 722 remote: pushkey-abort: prepushkey hook exited with status 1
713 723 exporting bookmark @ failed!
714 724 [1]
715 725 $ hg -R ../issue4455-dest/ bookmarks
716 726 no bookmarks set
717 727
718 728 Using http
719 729 ----------
720 730
721 $ hg push -B @ http
731 $ hg push -B @ http --config experimental.bundle2-exp=True
722 732 pushing to http://localhost:$HGPORT/
723 733 searching for changes
724 734 no changes found
725 735 remote: pushkey-abort: prepushkey hook exited with status 1
726 736 exporting bookmark @ failed!
727 737 [1]
728 738 $ hg -R ../issue4455-dest/ bookmarks
729 739 no bookmarks set
740
741 $ hg push -B @ http --config experimental.bundle2-exp=False
742 pushing to http://localhost:$HGPORT/
743 searching for changes
744 no changes found
745 remote: pushkey-abort: prepushkey hook exited with status 1
746 exporting bookmark @ failed!
747 [1]
748 $ hg -R ../issue4455-dest/ bookmarks
749 no bookmarks set
General Comments 0
You need to be logged in to leave comments. Login now