diff -r 1c50a954a524 -r 5cef810e588f mercurial/changegroup.py --- 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):