comparison mercurial/hg.py @ 29902:a77d48219edd

update: label bookmark name in message We label bookmark name as such in various messages. This will help them to standout (or at least give the user the option to make them stand out). We use a distinct label for the 'active' bookmark, this can help users to catch bookmark operation affecting their working copy.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 22 Aug 2016 14:44:14 +0200
parents e93408080646
children 1779dde4c9ef
comparison
equal deleted inserted replaced
29901:4d1e6f91f1c7 29902:a77d48219edd
736 736
737 if not ret and movemarkfrom: 737 if not ret and movemarkfrom:
738 if movemarkfrom == repo['.'].node(): 738 if movemarkfrom == repo['.'].node():
739 pass # no-op update 739 pass # no-op update
740 elif bookmarks.update(repo, [movemarkfrom], repo['.'].node()): 740 elif bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
741 ui.status(_("updating bookmark %s\n") % repo._activebookmark) 741 b = ui.label(repo._activebookmark, 'bookmarks.active')
742 ui.status(_("updating bookmark %s\n") % b)
742 else: 743 else:
743 # this can happen with a non-linear update 744 # this can happen with a non-linear update
744 ui.status(_("(leaving bookmark %s)\n") % 745 b = ui.label(repo._activebookmark, 'bookmarks')
745 repo._activebookmark) 746 ui.status(_("(leaving bookmark %s)\n") % b)
746 bookmarks.deactivate(repo) 747 bookmarks.deactivate(repo)
747 elif brev in repo._bookmarks: 748 elif brev in repo._bookmarks:
748 if brev != repo._activebookmark: 749 if brev != repo._activebookmark:
749 ui.status(_("(activating bookmark %s)\n") % brev) 750 b = ui.label(brev, 'bookmarks.active')
751 ui.status(_("(activating bookmark %s)\n") % b)
750 bookmarks.activate(repo, brev) 752 bookmarks.activate(repo, brev)
751 elif brev: 753 elif brev:
752 if repo._activebookmark: 754 if repo._activebookmark:
753 ui.status(_("(leaving bookmark %s)\n") % 755 b = ui.label(repo._activebookmark, 'bookmarks')
754 repo._activebookmark) 756 ui.status(_("(leaving bookmark %s)\n") % b)
755 bookmarks.deactivate(repo) 757 bookmarks.deactivate(repo)
756 758
757 if warndest: 759 if warndest:
758 destutil.statusotherdests(ui, repo) 760 destutil.statusotherdests(ui, repo)
759 761