[PATCH 1 of 2] Apply color to output of qseries --verbose
Kevin Christen
kevin.christen at gmail.com
Wed Jul 23 20:48:20 CDT 2008
# HG changeset patch
# User Kevin Christen <kevin.christen at gmail.com>
# Date 1216863203 18000
# Node ID e955f5d1f6b788f086101e5557bd5d6bb7b7b2e9
# Parent c016dc1a8e91e465b84ccccca9bbbcea8d99de17
Apply color to output of qseries --verbose
Fixes issue 1173.
diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -40,7 +40,7 @@
status.unknown = magenta bold underline
status.ignored = black bold
- 'none' turns off all effects
+# 'none' turns off all effects
status.clean = none
status.copied = none
@@ -144,13 +144,17 @@
retval = qseriesfunc(ui, repo, **opts)
patches = ui.popbuffer().splitlines()
for patch in patches:
+ patchname = patch
+ if opts['summary']:
+ patchname = patchname.split(': ')[0]
+ if ui.verbose:
+ patchname = patchname.split(' ', 2)[-1]
+
if opts['missing']:
effects = _patch_effects['missing']
- # Determine if patch is applied. Search for beginning of output
- # line in the applied patch list, in case --summary has been used
- # and output line isn't just the patch name.
+ # Determine if patch is applied.
elif [ applied for applied in repo.mq.applied
- if patch.startswith(applied.name) ]:
+ if patchname == applied.name ]:
effects = _patch_effects['applied']
else:
effects = _patch_effects['unapplied']
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20080723/4e26a148/attachment.htm
More information about the Mercurial-devel
mailing list