mercurial/httppeer.py
changeset 43503 313e3a279828
parent 43117 8ff1ecfadcd1
child 43506 9f70512ae2cf
equal deleted inserted replaced
43502:c093cc6e6c99 43503:313e3a279828
   541     def _calltwowaystream(self, cmd, fp, **args):
   541     def _calltwowaystream(self, cmd, fp, **args):
   542         filename = None
   542         filename = None
   543         try:
   543         try:
   544             # dump bundle to disk
   544             # dump bundle to disk
   545             fd, filename = pycompat.mkstemp(prefix=b"hg-bundle-", suffix=b".hg")
   545             fd, filename = pycompat.mkstemp(prefix=b"hg-bundle-", suffix=b".hg")
   546             with os.fdopen(fd, r"wb") as fh:
   546             with os.fdopen(fd, "wb") as fh:
   547                 d = fp.read(4096)
   547                 d = fp.read(4096)
   548                 while d:
   548                 while d:
   549                     fh.write(d)
   549                     fh.write(d)
   550                     d = fp.read(4096)
   550                     d = fp.read(4096)
   551             # start http push
   551             # start http push