diff hgext/progress.py @ 10891:83af68e38be3

progress: fall back to indeterminate progress if position is >= total
author Augie Fackler <durin42@gmail.com>
date Thu, 08 Apr 2010 15:04:00 -0500
parents 32b213b9b22c
children ec21d91c79b3
line wrap: on
line diff
--- a/hgext/progress.py	Sun Apr 11 14:25:02 2010 -0500
+++ b/hgext/progress.py	Thu Apr 08 15:04:00 2010 -0500
@@ -114,7 +114,7 @@
             if tail:
                 used += len(tail) + 1
             progwidth = termwidth - used - 3
-            if total:
+            if total and pos <= total:
                 amt = pos * progwidth // total
                 bar = '=' * (amt - 1)
                 if amt > 0: