added \r for progress counting in churn extension
authorArmin Ronacher <armin.ronacher@active-4.com>
Thu, 31 Jan 2008 23:42:21 +0100
changeset 5989 a7817ad608ea
parent 5976 9f1e6ab76069
child 5990 71d675f4b1f8
added \r for progress counting in churn extension
contrib/churn.py
--- a/contrib/churn.py	Thu Jan 31 14:44:19 2008 -0600
+++ b/contrib/churn.py	Thu Jan 31 23:42:21 2008 +0100
@@ -127,11 +127,11 @@
         if progress:
             nr_revs = max(nr_revs, 1)
             if int(100.0*(cur_rev - 1)/nr_revs) < int(100.0*cur_rev/nr_revs):
-                ui.write("%d%%.." % (int(100.0*cur_rev/nr_revs),))
+                ui.write("\rGnerating stats: %d%%" % (int(100.0*cur_rev/nr_revs),))
                 sys.stdout.flush()
 
     if progress:
-        ui.write("done\n")
+        ui.write("\r")
         sys.stdout.flush()
 
     return stats