Show More
@@ -411,6 +411,7 b' def clone(ui, peeropts, source, dest=Non' | |||||
411 | if update is not True: |
|
411 | if update is not True: | |
412 | checkout = srcpeer.lookup(update) |
|
412 | checkout = srcpeer.lookup(update) | |
413 | uprev = None |
|
413 | uprev = None | |
|
414 | status = None | |||
414 | if checkout is not None: |
|
415 | if checkout is not None: | |
415 | try: |
|
416 | try: | |
416 | uprev = destrepo.lookup(checkout) |
|
417 | uprev = destrepo.lookup(checkout) | |
@@ -420,13 +421,21 b' def clone(ui, peeropts, source, dest=Non' | |||||
420 | try: |
|
421 | try: | |
421 | uprev = destrepo._bookmarks['@'] |
|
422 | uprev = destrepo._bookmarks['@'] | |
422 | update = '@' |
|
423 | update = '@' | |
|
424 | bn = destrepo[uprev].branch() | |||
|
425 | if bn == 'default': | |||
|
426 | status = _("updating to bookmark @\n") | |||
|
427 | else: | |||
|
428 | status = _("updating to bookmark @ on branch %s\n" | |||
|
429 | % bn) | |||
423 | except KeyError: |
|
430 | except KeyError: | |
424 | try: |
|
431 | try: | |
425 | uprev = destrepo.branchtip('default') |
|
432 | uprev = destrepo.branchtip('default') | |
426 | except error.RepoLookupError: |
|
433 | except error.RepoLookupError: | |
427 | uprev = destrepo.lookup('tip') |
|
434 | uprev = destrepo.lookup('tip') | |
428 | bn = destrepo[uprev].branch() |
|
435 | if not status: | |
429 | destrepo.ui.status(_("updating to branch %s\n") % bn) |
|
436 | bn = destrepo[uprev].branch() | |
|
437 | status = _("updating to branch %s\n") % bn | |||
|
438 | destrepo.ui.status(status) | |||
430 | _update(destrepo, uprev) |
|
439 | _update(destrepo, uprev) | |
431 | if update in destrepo._bookmarks: |
|
440 | if update in destrepo._bookmarks: | |
432 | bookmarks.setcurrent(destrepo, update) |
|
441 | bookmarks.setcurrent(destrepo, update) |
@@ -335,7 +335,7 b' hgweb' | |||||
335 | adding manifests |
|
335 | adding manifests | |
336 | adding file changes |
|
336 | adding file changes | |
337 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
337 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
338 |
updating to b |
|
338 | updating to bookmark @ | |
339 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
339 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
340 | $ hg -R cloned-bookmarks bookmarks |
|
340 | $ hg -R cloned-bookmarks bookmarks | |
341 | * @ 1:9b140be10808 |
|
341 | * @ 1:9b140be10808 | |
@@ -355,7 +355,7 b' bookmark, not all outgoing changes:' | |||||
355 | adding manifests |
|
355 | adding manifests | |
356 | adding file changes |
|
356 | adding file changes | |
357 | added 5 changesets with 5 changes to 3 files (+2 heads) |
|
357 | added 5 changesets with 5 changes to 3 files (+2 heads) | |
358 |
updating to b |
|
358 | updating to bookmark @ | |
359 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
359 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
360 | $ cd addmarks |
|
360 | $ cd addmarks | |
361 | $ echo foo > foo |
|
361 | $ echo foo > foo |
@@ -363,7 +363,7 b' test clone' | |||||
363 | a@ 2:db815d6d32e6 |
|
363 | a@ 2:db815d6d32e6 | |
364 | x y 2:db815d6d32e6 |
|
364 | x y 2:db815d6d32e6 | |
365 | $ hg clone . cloned-bookmarks |
|
365 | $ hg clone . cloned-bookmarks | |
366 |
updating to b |
|
366 | updating to bookmark @ | |
367 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
367 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
368 | $ hg -R cloned-bookmarks bookmarks |
|
368 | $ hg -R cloned-bookmarks bookmarks | |
369 | * @ 2:db815d6d32e6 |
|
369 | * @ 2:db815d6d32e6 | |
@@ -381,7 +381,7 b' test clone with pull protocol' | |||||
381 | adding manifests |
|
381 | adding manifests | |
382 | adding file changes |
|
382 | adding file changes | |
383 | added 3 changesets with 3 changes to 3 files (+1 heads) |
|
383 | added 3 changesets with 3 changes to 3 files (+1 heads) | |
384 |
updating to b |
|
384 | updating to bookmark @ | |
385 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
385 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
386 | $ hg -R cloned-bookmarks-pull bookmarks |
|
386 | $ hg -R cloned-bookmarks-pull bookmarks | |
387 | * @ 2:db815d6d32e6 |
|
387 | * @ 2:db815d6d32e6 |
@@ -507,10 +507,20 b" Test clone with special '@' bookmark:" | |||||
507 | $ cd a |
|
507 | $ cd a | |
508 | $ hg bookmark -r a7949464abda @ # branch point of stable from default |
|
508 | $ hg bookmark -r a7949464abda @ # branch point of stable from default | |
509 | $ hg clone . ../i |
|
509 | $ hg clone . ../i | |
510 |
updating to b |
|
510 | updating to bookmark @ | |
511 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
511 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
512 | $ hg id -i ../i |
|
512 | $ hg id -i ../i | |
513 | a7949464abda |
|
513 | a7949464abda | |
|
514 | $ rm -r ../i | |||
|
515 | ||||
|
516 | $ hg bookmark -f -r stable @ | |||
|
517 | $ hg bookmarks | |||
|
518 | @ 15:0aae7cf88f0d | |||
|
519 | $ hg clone . ../i | |||
|
520 | updating to bookmark @ on branch stable | |||
|
521 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
522 | $ hg id -i ../i | |||
|
523 | 0aae7cf88f0d | |||
514 | $ cd "$TESTTMP" |
|
524 | $ cd "$TESTTMP" | |
515 |
|
525 | |||
516 |
|
526 |
General Comments 0
You need to be logged in to leave comments.
Login now