[PATCH] localrepo: provide progress updates during commit
David Golub
golubdr at gmail.com
Mon Nov 7 20:41:36 CST 2011
# HG changeset patch
# User David Golub <golubdr at gmail.com>
# Date 1320720015 18000
# Branch stable
# Node ID 40a50eda9f5790d00fd5da68225d6fdd2f34bed2
# Parent 54c0517c0fe8af4f8851a1bbb5bb229f0e7dd853
localrepo: provide progress updates during commit
diff -r 54c0517c0fe8 -r 40a50eda9f57 mercurial/localrepo.py
--- a/mercurial/localrepo.py Fri Nov 04 10:31:38 2011 +0100
+++ b/mercurial/localrepo.py Mon Nov 07 21:40:15 2011 -0500
@@ -1166,9 +1166,14 @@
# check in files
new = {}
+ total = len(ctx.modified() + ctx.added())
+ i = 0
changed = []
linkrev = len(self)
for f in sorted(ctx.modified() + ctx.added()):
+ i += 1
+ self.ui.progress(_('committing'), i, total=total,
+ unit=_('files'))
self.ui.note(f + "\n")
try:
fctx = ctx[f]
@@ -1185,6 +1190,7 @@
raise
else:
removed.append(f)
+ self.ui.progress(_('committing'), None)
# update manifest
m1.update(new)
More information about the Mercurial-devel
mailing list