mercurial/wireprotov1server.py
changeset 52644 e627cc25b6f3
parent 52640 24ee91ba9aa8
child 52727 48572371d478
equal deleted inserted replaced
52643:5cc8deb96b48 52644:e627cc25b6f3
   290 
   290 
   291     def generator(vfs, bundle_path):
   291     def generator(vfs, bundle_path):
   292         with vfs(bundle_path) as f:
   292         with vfs(bundle_path) as f:
   293             length = os.fstat(f.fileno())[6]
   293             length = os.fstat(f.fileno())[6]
   294             yield util.uvarintencode(length)
   294             yield util.uvarintencode(length)
   295             for chunk in util.filechunkiter(f):
   295             yield from util.filechunkiter(f)
   296                 yield chunk
       
   297 
   296 
   298     stream = generator(repo.vfs, clonebundlepath)
   297     stream = generator(repo.vfs, clonebundlepath)
   299     return wireprototypes.streamres(gen=stream, prefer_uncompressed=True)
   298     return wireprototypes.streamres(gen=stream, prefer_uncompressed=True)
   300 
   299 
   301 
   300