equal
deleted
inserted
replaced
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: |