Comments
Patch
@@ -23,10 +23,16 @@ from . import (
scmutil,
txnutil,
util,
)
+# label constants
+# until 3.5, bookmarks.current was the advertised name, not
+# bookmarks.active, so we must use both to avoid breaking old
+# custom styles
+activebookmarklabel = 'bookmarks.active bookmarks.current'
+
def _getbkfile(repo):
"""Hook so that extensions that mess with the store can hook bm storage.
For core, this just handles wether we should see pending
bookmarks or the committed ones. Other extensions (like share)
@@ -64,16 +64,10 @@ release = lockmod.release
table = {}
table.update(debugcommandsmod.command._table)
command = registrar.command(table)
-# label constants
-# until 3.5, bookmarks.current was the advertised name, not
-# bookmarks.active, so we must use both to avoid breaking old
-# custom styles
-activebookmarklabel = 'bookmarks.active bookmarks.current'
-
# common command options
globalopts = [
('R', 'repository', '',
_('repository root directory or name of overlay bundle file'),
@@ -992,11 +986,11 @@ def bookmark(ui, repo, *names, **opts):
if len(marks) == 0 and fm.isplain():
ui.status(_("no bookmarks set\n"))
for bmark, n in sorted(marks.iteritems()):
active = repo._activebookmark
if bmark == active:
- prefix, label = '*', activebookmarklabel
+ prefix, label = '*', bookmarks.activebookmarklabel
else:
prefix, label = ' ', ''
fm.startitem()
if not ui.quiet:
@@ -4814,14 +4808,14 @@ def summary(ui, repo, **opts):
active = repo._activebookmark
# i18n: column positioning for "hg summary"
ui.write(_('bookmarks:'), label='log.bookmark')
if active is not None:
if active in marks:
- ui.write(' *' + active, label=activebookmarklabel)
+ ui.write(' *' + active, label=bookmarks.activebookmarklabel)
marks.remove(active)
else:
- ui.write(' [%s]' % active, label=activebookmarklabel)
+ ui.write(' [%s]' % active, label=bookmarks.activebookmarklabel)
for m in marks:
ui.write(' ' + m, label='log.bookmark')
ui.write('\n', label='log.bookmark')
status = repo.status(unknown=True)