Mercurial > hg
changeset 6855:09db2b8236ec
Apply color to output of qseries --verbose
Fixes issue 1173.
author | Kevin Christen <kevin.christen@gmail.com> |
---|---|
date | Wed, 23 Jul 2008 20:33:23 -0500 |
parents | 9d11faecb0f1 |
children | c6890cfc2253 |
files | hgext/color.py |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sat Aug 02 13:49:13 2008 +0200 +++ b/hgext/color.py Wed Jul 23 20:33:23 2008 -0500 @@ -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']