[PATCH] ui: fix NameError due to unit/units typo

Brodie Rao dackze at gmail.com
Tue Aug 18 13:50:05 CDT 2009


# HG changeset patch
# User Brodie Rao <me+hg at dackz.net>
# Date 1250621261 14400
# Node ID a7d5c3b54060604521f17bcc2423ab66a816f5c4
# Parent  bb7e2cdd4854b9f84db04e38a3ea8003f4072388
ui: fix NameError due to unit/units typo

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -358,7 +358,7 @@ class ui(object):
         visible. 'topic' is the current operation, 'item' is a
         non-numeric marker of the current position (ie the currently
         in-process file), 'pos' is the current numeric position (ie
-        revision, bytes, etc.), units is a corresponding unit label,
+        revision, bytes, etc.), unit is a corresponding unit label,
         and total is the highest expected pos.
 
         Multiple nested topics may be active at a time. All topics
@@ -368,14 +368,14 @@ class ui(object):
         if pos == None or not self.debugflag:
             return
 
-        if units:
-            units = ' ' + units
+        if unit:
+            unit = ' ' + unit
         if item:
             item = ' ' + item
 
         if total:
             pct = 100.0 * pos / total
             ui.debug('%s:%s %s/%s%s (%4.2g%%)\n'
-                     % (topic, item, pos, total, units, pct))
+                     % (topic, item, pos, total, unit, pct))
         else:
-            ui.debug('%s:%s %s%s\n' % (topic, item, pos, units))
+            ui.debug('%s:%s %s%s\n' % (topic, item, pos, unit))


More information about the Mercurial-devel mailing list