comparison hgext/churn.py @ 9467:4c041f1ee1b4

do not attempt to translate ui.debug output
author Martin Geisler <mg@lazybytes.net>
date Sat, 19 Sep 2009 01:15:38 +0200
parents 637f2726ec7f
children ceb0f59e1327
comparison
equal deleted inserted replaced
9466:1214c64c592b 9467:4c041f1ee1b4
151 # Be careful not to have a zero maxcount (issue833) 151 # Be careful not to have a zero maxcount (issue833)
152 maxcount = float(max(v for k, v in rate)) or 1.0 152 maxcount = float(max(v for k, v in rate)) or 1.0
153 maxname = max(len(k) for k, v in rate) 153 maxname = max(len(k) for k, v in rate)
154 154
155 ttywidth = util.termwidth() 155 ttywidth = util.termwidth()
156 ui.debug(_("assuming %i character terminal\n") % ttywidth) 156 ui.debug("assuming %i character terminal\n" % ttywidth)
157 width = ttywidth - maxname - 2 - 6 - 2 - 2 157 width = ttywidth - maxname - 2 - 6 - 2 - 2
158 158
159 for date, count in rate: 159 for date, count in rate:
160 print "%s %6d %s" % (pad(date, maxname), count, 160 print "%s %6d %s" % (pad(date, maxname), count,
161 "*" * int(count * width / maxcount)) 161 "*" * int(count * width / maxcount))