exchange: add progress bar when pulling using wire protocol command
progress bar on pull was only available for pushkey based pull before this
changeset.
--- a/hgext/evolve.py Mon Mar 03 21:37:18 2014 -0800
+++ b/hgext/evolve.py Mon Mar 03 22:18:05 2014 -0800
@@ -2249,7 +2249,18 @@
f = self._callstream("evoext_pullobsmarkers_0", **opts)
f = self._decompress(f)
length= int(f.read(20))
- return StringIO(f.read(length))
+ chunk = 4096
+ current = 0
+ data = StringIO()
+ ui = self.ui
+ ui.progress('OBSEXC', current, unit="bytes", total=length)
+ while current < length:
+ readsize = min(length-current, chunk)
+ data.write(f.read(readsize))
+ current += readsize
+ ui.progress('OBSEXC', current, unit="bytes", total=length)
+ ui.progress('OBSEXC', None)
+ return data
@eh.addattr(localrepo.localpeer, 'evoext_pullobsmarkers_0')
def local_pullobsmarkers(self, heads=None, common=None):