diff mercurial/changegroup.py @ 10430:5cef810e588f

localrepo: show indeterminate progress for incoming data This has some quirks, like showing progress bars for importing bundles, including during rebase.
author Augie Fackler <durin42@gmail.com>
date Sun, 07 Feb 2010 12:00:40 -0600
parents bc2414948012
children 801533a52799
line wrap: on
line diff
--- a/mercurial/changegroup.py	Sat Feb 13 02:06:13 2010 +0100
+++ b/mercurial/changegroup.py	Sun Feb 07 12:00:40 2010 -0600
@@ -24,13 +24,15 @@
                           % (len(d), l - 4))
     return d
 
-def chunkiter(source):
+def chunkiter(source, progress=None):
     """iterate through the chunks in source, yielding a sequence of chunks
     (strings)"""
     while 1:
         c = getchunk(source)
         if not c:
             break
+        elif progress is not None:
+            progress()
         yield c
 
 def chunkheader(length):