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