diff -r 9f81f9e5b47a -r 07309e527df7 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Dec 31 16:50:19 2014 -0600 +++ b/mercurial/cmdutil.py Fri Oct 17 09:26:37 2014 -0700 @@ -902,20 +902,26 @@ self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)), label='log.changeset changeset.%s' % ctx.phasestr()) + # branches are shown first before any other names due to backwards + # compatibility branch = ctx.branch() # don't show the default branch name if branch != 'default': # i18n: column positioning for "hg log" self.ui.write(_("branch: %s\n") % branch, label='log.branch') - for bookmark in self.repo.nodebookmarks(changenode): - # i18n: column positioning for "hg log" - self.ui.write(_("bookmark: %s\n") % bookmark, - label='log.bookmark') - for tag in self.repo.nodetags(changenode): - # i18n: column positioning for "hg log" - self.ui.write(_("tag: %s\n") % tag, - label='log.tag') + + for name, ns in self.repo.names.iteritems(): + # branches has special logic already handled above, so here we just + # skip it + if name == 'branches': + continue + # we will use the templatename as the color name since those two + # should be the same + for name in ns.names(self.repo, changenode): + # i18n: column positioning for "hg log" + tname = _(("%s:" % ns.templatename).ljust(13) + "%s\n") % name + self.ui.write("%s" % tname, label='log.%s' % ns.templatename) if self.ui.debugflag: # i18n: column positioning for "hg log" self.ui.write(_("phase: %s\n") % _(ctx.phasestr()),