hgext/color.py
changeset 9017 c24c9ce0cdcf
parent 8963 a4ceae3aa7be
child 9057 07788bbb35e4
--- 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'],