2247 if common is not None: |
2247 if common is not None: |
2248 opts['common'] = wireproto.encodelist(common) |
2248 opts['common'] = wireproto.encodelist(common) |
2249 f = self._callstream("evoext_pullobsmarkers_0", **opts) |
2249 f = self._callstream("evoext_pullobsmarkers_0", **opts) |
2250 f = self._decompress(f) |
2250 f = self._decompress(f) |
2251 length= int(f.read(20)) |
2251 length= int(f.read(20)) |
2252 return StringIO(f.read(length)) |
2252 chunk = 4096 |
|
2253 current = 0 |
|
2254 data = StringIO() |
|
2255 ui = self.ui |
|
2256 ui.progress('OBSEXC', current, unit="bytes", total=length) |
|
2257 while current < length: |
|
2258 readsize = min(length-current, chunk) |
|
2259 data.write(f.read(readsize)) |
|
2260 current += readsize |
|
2261 ui.progress('OBSEXC', current, unit="bytes", total=length) |
|
2262 ui.progress('OBSEXC', None) |
|
2263 return data |
2253 |
2264 |
2254 @eh.addattr(localrepo.localpeer, 'evoext_pullobsmarkers_0') |
2265 @eh.addattr(localrepo.localpeer, 'evoext_pullobsmarkers_0') |
2255 def local_pullobsmarkers(self, heads=None, common=None): |
2266 def local_pullobsmarkers(self, heads=None, common=None): |
2256 return _getobsmarkersstream(self._repo, heads=heads, common=common) |
2267 return _getobsmarkersstream(self._repo, heads=heads, common=common) |
2257 |
2268 |