mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
cmdutil: add a "changeset.obsolete" label in changeset_printer
Until now there were no label to highlight obsolete changesets in log output, only evolution troubles (unstable, bumped, divergent) are supported. We add a "changeset.obsolete" label on changeset entries produced by changeset_printer so that obsolete changesets can be highlighted in log output. This is useful because, unless using a graph log where obsolete changesets have a 'x' marker, there's no way to identify obsolete changesets. And even in graph mode, when working directory's parent is obsolete, we get a '@' marker and we do not see it as obsolete.
This commit is contained in:
parent
df777290b9
commit
2ae8148594
@ -1155,6 +1155,8 @@ def diffordiffstat(ui, repo, diffopts, node1, node2, match,
|
||||
|
||||
def _changesetlabels(ctx):
|
||||
labels = ['log.changeset', 'changeset.%s' % ctx.phasestr()]
|
||||
if ctx.obsolete():
|
||||
labels.append('changeset.obsolete')
|
||||
if ctx.troubled():
|
||||
labels.append('changeset.troubled')
|
||||
for trouble in ctx.troubles():
|
||||
|
Loading…
Reference in New Issue
Block a user