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

Brodie Rao dackze at gmail.com
Wed Mar 31 10:00:43 CDT 2010


# HG changeset patch
# User Brodie Rao <brodie at bitheap.org>
# Date 1270046412 18000
# Node ID a3ff52fa5caddff3a4cfcaf5c7dda6575fe66060
# Parent  62321a18dcc1a4feb7bbfd066e694ffdf621dccc
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