comparison mercurial/cmdutil.py @ 17788:9912baaae7df

color: add additional changeset.phase label to log.changeset and log.parent This allows the user to set different colors for each phase, e.g. [color] changeset.public = blue changeset.draft = green changeset.secret = red In addition, this doesn't affect current configuration for custom log.changeset colors, but rather adds the option for users that want to visually see which changesets are amendable.
author Sean Farley <sean.michael.farley@gmail.com>
date Tue, 16 Oct 2012 13:35:58 -0500
parents 6d218e47cf9b
children a8aba2921456
comparison
equal deleted inserted replaced
17787:21503aa02d4f 17788:9912baaae7df
685 685
686 parents = [(p, hexfunc(log.node(p))) 686 parents = [(p, hexfunc(log.node(p)))
687 for p in self._meaningful_parentrevs(log, rev)] 687 for p in self._meaningful_parentrevs(log, rev)]
688 688
689 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)), 689 self.ui.write(_("changeset: %d:%s\n") % (rev, hexfunc(changenode)),
690 label='log.changeset') 690 label='log.changeset changeset.%s' % ctx.phasestr())
691 691
692 branch = ctx.branch() 692 branch = ctx.branch()
693 # don't show the default branch name 693 # don't show the default branch name
694 if branch != 'default': 694 if branch != 'default':
695 self.ui.write(_("branch: %s\n") % branch, 695 self.ui.write(_("branch: %s\n") % branch,
703 if self.ui.debugflag and ctx.phase(): 703 if self.ui.debugflag and ctx.phase():
704 self.ui.write(_("phase: %s\n") % _(ctx.phasestr()), 704 self.ui.write(_("phase: %s\n") % _(ctx.phasestr()),
705 label='log.phase') 705 label='log.phase')
706 for parent in parents: 706 for parent in parents:
707 self.ui.write(_("parent: %d:%s\n") % parent, 707 self.ui.write(_("parent: %d:%s\n") % parent,
708 label='log.parent') 708 label='log.parent changeset.%s' % ctx.phasestr())
709 709
710 if self.ui.debugflag: 710 if self.ui.debugflag:
711 mnode = ctx.manifestnode() 711 mnode = ctx.manifestnode()
712 self.ui.write(_("manifest: %d:%s\n") % 712 self.ui.write(_("manifest: %d:%s\n") %
713 (self.repo.manifest.rev(mnode), hex(mnode)), 713 (self.repo.manifest.rev(mnode), hex(mnode)),