Mercurial > hg-stable
changeset 9017:c24c9ce0cdcf
color: don't highlight the summary part of the qseries command
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Sat, 27 Jun 2009 13:09:11 +0200 |
parents | 894c5b4be275 |
children | fc5737e49193 |
files | hgext/color.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Sat Jun 27 15:28:44 2009 +0200 +++ b/hgext/color.py Sat Jun 27 13:09:11 2009 +0200 @@ -146,9 +146,9 @@ for patch in patches: patchname = patch if opts['summary']: - patchname = patchname.split(': ')[0] + patchname = patchname.split(': ', 1)[0] if ui.verbose: - patchname = patchname.split(' ', 2)[-1] + patchname = patchname.lstrip().split(' ', 2)[-1] if opts['missing']: effects = _patch_effects['missing'] @@ -158,7 +158,9 @@ effects = _patch_effects['applied'] else: effects = _patch_effects['unapplied'] - ui.write(render_effects(patch, effects) + '\n') + + patch = patch.replace(patchname, render_effects(patchname, effects), 1) + ui.write(patch + '\n') return retval _patch_effects = { 'applied': ['blue', 'bold', 'underline'],