Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.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 | 434e5bd615fc |
children | 4cfd02c2df9a |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Oct 16 18:05:33 2012 -0500 +++ b/mercurial/commands.py Tue Oct 16 13:35:58 2012 -0500 @@ -977,7 +977,7 @@ label = 'branches.current' rev = str(ctx.rev()).rjust(31 - encoding.colwidth(ctx.branch())) rev = ui.label('%s:%s' % (rev, hexfunc(ctx.node())), - 'log.changeset') + 'log.changeset changeset.%s' % ctx.phasestr()) tag = ui.label(ctx.branch(), label) if ui.quiet: ui.write("%s\n" % tag) @@ -5423,7 +5423,7 @@ # label with log.changeset (instead of log.parent) since this # shows a working directory parent *changeset*: ui.write(_('parent: %d:%s ') % (p.rev(), str(p)), - label='log.changeset') + label='log.changeset changeset.%s' % p.phasestr()) ui.write(' '.join(p.tags()), label='log.tag') if p.bookmarks(): marks.extend(p.bookmarks()) @@ -5710,7 +5710,7 @@ hn = hexfunc(n) r = "%5d:%s" % (repo.changelog.rev(n), hn) - rev = ui.label(r, 'log.changeset') + rev = ui.label(r, 'log.changeset changeset.%s' % repo[n].phasestr()) spaces = " " * (30 - encoding.colwidth(t)) tag = ui.label(t, 'tags.normal')