Mercurial > public > mercurial-scm > hg
diff hgext/graphlog.py @ 17119:2e13c1bd34dc
graphlog: display obsolete changeset as "x"
Changeset detected as obsolete will be displayed as "x" instead of 'o':
o new rewritten changeset
|
| x old obsolete changeset
|/
|
o base
This will be useful even when some obsolete changeset will be "hidden" because
not all obsolete changeset can be hidden. If an obsolete changeset have
non-obsolete descendant we can't simply hide it. And having a clear visual hint
that the changeset is obsolete is useful.
The main reason to make this minor change right now is to:
1) introduce an officiel user of the `ctx.obsolete()` method that will detect
breakage earlier than third party code (mutable, hgview)
2) Do not display any vocabulary related to obsolete. Such vocabulary will
require discussion.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 04 Jul 2012 17:29:49 +0200 |
parents | 058e14da7044 |
children | 01d847e0fdc9 |
line wrap: on
line diff
--- a/hgext/graphlog.py Wed Jul 04 17:26:51 2012 +0200 +++ b/hgext/graphlog.py Wed Jul 04 17:29:49 2012 +0200 @@ -455,7 +455,11 @@ filematcher=None): seen, state = [], asciistate() for rev, type, ctx, parents in dag: - char = ctx.node() in showparents and '@' or 'o' + char = 'o' + if ctx.node() in showparents: + char = '@' + elif ctx.obsolete(): + char = 'x' copies = None if getrenamed and ctx.rev(): copies = []