hgext3rd/pullbundle.py
changeset 4807 ea8da5aa23c6
parent 4756 22ffbbba695d
child 4814 48b30ff742cb
equal deleted inserted replaced
4806:44629ae21b84 4807:ea8da5aa23c6
   434     # delay file opening as much as possible this introduce a small race
   434     # delay file opening as much as possible this introduce a small race
   435     # condition if someone remove the file before we actually use it. However
   435     # condition if someone remove the file before we actually use it. However
   436     # opening too many file will not work.
   436     # opening too many file will not work.
   437 
   437 
   438     def data():
   438     def data():
   439         with open(bundlepath, 'rb') as fd:
   439         with open(bundlepath, r'rb') as fd:
   440             for chunk in util.filechunkiter(fd):
   440             for chunk in util.filechunkiter(fd):
   441                 yield chunk
   441                 yield chunk
   442     return data()
   442     return data()
   443 
   443 
   444 def cachewriter(repo, bundlename, stream):
   444 def cachewriter(repo, bundlename, stream):