diff -r fe0aac1082f3 -r ceec79b5657a mercurial/commands.py --- a/mercurial/commands.py Sat May 30 02:06:09 2015 +0800 +++ b/mercurial/commands.py Thu Apr 16 15:18:59 2015 -0700 @@ -40,6 +40,12 @@ # @command decorator. inferrepo = '' +# 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 = [ @@ -1037,7 +1043,7 @@ for bmark, n in sorted(marks.iteritems()): current = repo._activebookmark if bmark == current: - prefix, label = '*', 'bookmarks.current' + prefix, label = '*', activebookmarklabel else: prefix, label = ' ', '' @@ -5932,10 +5938,10 @@ ui.write(_('bookmarks:'), label='log.bookmark') if current is not None: if current in marks: - ui.write(' *' + current, label='bookmarks.current') + ui.write(' *' + current, label=activebookmarklabel) marks.remove(current) else: - ui.write(' [%s]' % current, label='bookmarks.current') + ui.write(' [%s]' % current, label=activebookmarklabel) for m in marks: ui.write(' ' + m, label='log.bookmark') ui.write('\n', label='log.bookmark')