Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 17882:36ed69d4593d stable
clone: show status "updating to bookmark @"
if bookmark @ is not on the default branch, we show
updating to bookmark @ on branch <name>
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Mon, 29 Oct 2012 14:02:30 +0100 |
parents | 92ba3cd55be6 |
children | 0e2846b2482c |
line wrap: on
line diff
--- a/mercurial/hg.py Sun Oct 28 14:16:16 2012 +0100 +++ b/mercurial/hg.py Mon Oct 29 14:02:30 2012 +0100 @@ -411,6 +411,7 @@ if update is not True: checkout = srcpeer.lookup(update) uprev = None + status = None if checkout is not None: try: uprev = destrepo.lookup(checkout) @@ -420,13 +421,21 @@ try: uprev = destrepo._bookmarks['@'] update = '@' + bn = destrepo[uprev].branch() + if bn == 'default': + status = _("updating to bookmark @\n") + else: + status = _("updating to bookmark @ on branch %s\n" + % bn) except KeyError: try: uprev = destrepo.branchtip('default') except error.RepoLookupError: uprev = destrepo.lookup('tip') - bn = destrepo[uprev].branch() - destrepo.ui.status(_("updating to branch %s\n") % bn) + if not status: + bn = destrepo[uprev].branch() + status = _("updating to branch %s\n") % bn + destrepo.ui.status(status) _update(destrepo, uprev) if update in destrepo._bookmarks: bookmarks.setcurrent(destrepo, update)