comparison mercurial/commands.py @ 28274:5d9578d9ad1a

pull: deactivate a bookmark not matching with the destination of the update Before this patch, "hg pull -u" with a target doesn't deactivate a current active bookmark, which doesn't match with the explicit destination of the update, even though bare "hg update" does so. A "target" can be provided through: - option --rev ANOTHER - option --branch ANOTHER - source URL#ANOTHER
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 26 Feb 2016 20:22:05 +0900
parents 9ac8955d8c45
children aa73d6a5d9ea
comparison
equal deleted inserted replaced
28273:9ac8955d8c45 28274:5d9578d9ad1a
5568 ui.status(_("updating bookmark %s\n") % repo._activebookmark) 5568 ui.status(_("updating bookmark %s\n") % repo._activebookmark)
5569 elif brev in repo._bookmarks: 5569 elif brev in repo._bookmarks:
5570 if brev != repo._activebookmark: 5570 if brev != repo._activebookmark:
5571 ui.status(_("(activating bookmark %s)\n") % brev) 5571 ui.status(_("(activating bookmark %s)\n") % brev)
5572 bookmarks.activate(repo, brev) 5572 bookmarks.activate(repo, brev)
5573 elif brev:
5574 if repo._activebookmark:
5575 ui.status(_("(leaving bookmark %s)\n") %
5576 repo._activebookmark)
5577 bookmarks.deactivate(repo)
5573 return ret 5578 return ret
5574 if modheads > 1: 5579 if modheads > 1:
5575 currentbranchheads = len(repo.branchheads()) 5580 currentbranchheads = len(repo.branchheads())
5576 if currentbranchheads == modheads: 5581 if currentbranchheads == modheads:
5577 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n")) 5582 ui.status(_("(run 'hg heads' to see heads, 'hg merge' to merge)\n"))