mercurial/changegroup.py
changeset 52381 d98b56a1d41c
parent 51859 f4733654f144
child 52643 5cc8deb96b48
equal deleted inserted replaced
52380:f94efae47eb3 52381:d98b56a1d41c
    15 from .node import (
    15 from .node import (
    16     hex,
    16     hex,
    17     nullrev,
    17     nullrev,
    18     short,
    18     short,
    19 )
    19 )
    20 from .pycompat import open
       
    21 
    20 
    22 from . import (
    21 from . import (
    23     error,
    22     error,
    24     match as matchmod,
    23     match as matchmod,
    25     mdiff,
    24     mdiff,
    85             if vfs:
    84             if vfs:
    86                 fh = vfs.open(filename, b"wb")
    85                 fh = vfs.open(filename, b"wb")
    87             else:
    86             else:
    88                 # Increase default buffer size because default is usually
    87                 # Increase default buffer size because default is usually
    89                 # small (4k is common on Linux).
    88                 # small (4k is common on Linux).
    90                 fh = open(filename, b"wb", 131072)
    89                 fh = open(filename, "wb", 131072)
    91         else:
    90         else:
    92             fd, filename = pycompat.mkstemp(prefix=b"hg-bundle-", suffix=b".hg")
    91             fd, filename = pycompat.mkstemp(prefix=b"hg-bundle-", suffix=b".hg")
    93             fh = os.fdopen(fd, "wb")
    92             fh = os.fdopen(fd, "wb")
    94         cleanup = filename
    93         cleanup = filename
    95         for c in chunks:
    94         for c in chunks: