smartlog: turn obsolete changeset grey

He highlight the "undead" status of obsolete changeset by turning them grey, the
same way the current changeset is highlighted with purple.
This commit is contained in:
Pierre-Yves David 2014-06-10 16:52:48 -07:00
parent 840e36d875
commit ad5b4b4916

View File

@ -36,12 +36,18 @@ def uisetup(ui):
if type == 'F':
char = "."
# Color the current commits. @ is too subtle
if enabled and char == "@":
newtext = []
for line in text:
line = "\033[35m" + line + "\033[0m"
newtext.append(line)
text = newtext
if enabled:
color = None
if char == "@":
color = "\033[35m"
elif char == "x":
color = "\033[30m\033[1m"
if color is not None:
newtext = []
for line in text:
line = color + line + "\033[0m"
newtext.append(line)
text = newtext
return orig(ui, state, type, char, text, coldata)
wrapfunction(graphmod, 'ascii', ascii)