[PATCH 07 of 13] churn: make use of output labeling

Brodie Rao dackze at gmail.com
Fri Apr 2 15:33:20 CDT 2010


# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1270239730 18000
# Node ID a6ac91c313af2aa3daeeadb4c8ca83e7f8247f44
# Parent  da809085bc9f84e441104e34151a7db34a6afd25
churn: make use of output labeling

diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -153,8 +153,10 @@ def churn(ui, repo, *pats, **opts):
         def format(name, (added, removed)):
             return "%s %15s %s%s\n" % (pad(name, maxname),
                                        '+%d/-%d' % (added, removed),
-                                       '+' * charnum(added),
-                                       '-' * charnum(removed))
+                                       ui.label('+' * charnum(added),
+                                                'diffstat.inserted'),
+                                       ui.label('-' * charnum(removed),
+                                                'diffstat.deleted'))
     else:
         width -= 6
         def format(name, count):


More information about the Mercurial-devel mailing list