Show More
@@ -1306,7 +1306,7 b' class svn_sink(converter_sink, commandli' | |||
|
1306 | 1306 | self.setexec = [] |
|
1307 | 1307 | |
|
1308 | 1308 | fd, messagefile = tempfile.mkstemp(prefix='hg-convert-') |
|
1309 | fp = os.fdopen(fd, 'w') | |
|
1309 | fp = os.fdopen(fd, pycompat.sysstr('w')) | |
|
1310 | 1310 | fp.write(commit.desc) |
|
1311 | 1311 | fp.close() |
|
1312 | 1312 | try: |
@@ -18,6 +18,7 b' from mercurial import (' | |||
|
18 | 18 | error, |
|
19 | 19 | match, |
|
20 | 20 | node as hgnode, |
|
21 | pycompat, | |
|
21 | 22 | util, |
|
22 | 23 | ) |
|
23 | 24 | |
@@ -44,11 +45,11 b' class gpg(object):' | |||
|
44 | 45 | try: |
|
45 | 46 | # create temporary files |
|
46 | 47 | fd, sigfile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".sig") |
|
47 | fp = os.fdopen(fd, 'wb') | |
|
48 | fp = os.fdopen(fd, pycompat.sysstr('wb')) | |
|
48 | 49 | fp.write(sig) |
|
49 | 50 | fp.close() |
|
50 | 51 | fd, datafile = tempfile.mkstemp(prefix="hg-gpg-", suffix=".txt") |
|
51 | fp = os.fdopen(fd, 'wb') | |
|
52 | fp = os.fdopen(fd, pycompat.sysstr('wb')) | |
|
52 | 53 | fp.write(data) |
|
53 | 54 | fp.close() |
|
54 | 55 | gpgcmd = ("%s --logger-fd 1 --status-fd 1 --verify " |
@@ -28,6 +28,7 b' from mercurial import (' | |||
|
28 | 28 | merge, |
|
29 | 29 | node as nodemod, |
|
30 | 30 | patch, |
|
31 | pycompat, | |
|
31 | 32 | registrar, |
|
32 | 33 | revlog, |
|
33 | 34 | revset, |
@@ -197,7 +198,7 b' class transplanter(object):' | |||
|
197 | 198 | patchfile = None |
|
198 | 199 | else: |
|
199 | 200 | fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-') |
|
200 | fp = os.fdopen(fd, 'w') | |
|
201 | fp = os.fdopen(fd, pycompat.sysstr('w')) | |
|
201 | 202 | gen = patch.diff(source, parent, node, opts=diffopts) |
|
202 | 203 | for chunk in gen: |
|
203 | 204 | fp.write(chunk) |
@@ -245,7 +246,7 b' class transplanter(object):' | |||
|
245 | 246 | self.ui.status(_('filtering %s\n') % patchfile) |
|
246 | 247 | user, date, msg = (changelog[1], changelog[2], changelog[4]) |
|
247 | 248 | fd, headerfile = tempfile.mkstemp(prefix='hg-transplant-') |
|
248 | fp = os.fdopen(fd, 'w') | |
|
249 | fp = os.fdopen(fd, pycompat.sysstr('w')) | |
|
249 | 250 | fp.write("# HG changeset patch\n") |
|
250 | 251 | fp.write("# User %s\n" % user) |
|
251 | 252 | fp.write("# Date %d %d\n" % date) |
@@ -26,6 +26,7 b' from . import (' | |||
|
26 | 26 | error, |
|
27 | 27 | mdiff, |
|
28 | 28 | phases, |
|
29 | pycompat, | |
|
29 | 30 | util, |
|
30 | 31 | ) |
|
31 | 32 | |
@@ -98,7 +99,7 b' def writechunks(ui, chunks, filename, vf' | |||
|
98 | 99 | fh = open(filename, "wb", 131072) |
|
99 | 100 | else: |
|
100 | 101 | fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") |
|
101 | fh = os.fdopen(fd, "wb") | |
|
102 | fh = os.fdopen(fd, pycompat.sysstr("wb")) | |
|
102 | 103 | cleanup = filename |
|
103 | 104 | for c in chunks: |
|
104 | 105 | fh.write(c) |
@@ -338,7 +338,7 b' else:' | |||
|
338 | 338 | _kernel32.CloseHandle(fh) |
|
339 | 339 | _raiseioerror(name) |
|
340 | 340 | |
|
341 | f = os.fdopen(fd, mode, bufsize) | |
|
341 | f = os.fdopen(fd, pycompat.sysstr(mode), bufsize) | |
|
342 | 342 | # unfortunately, f.name is '<fdopen>' at this point -- so we store |
|
343 | 343 | # the name on this wrapper. We cannot just assign to f.name, |
|
344 | 344 | # because that attribute is read-only. |
@@ -1038,7 +1038,7 b' class ui(object):' | |||
|
1038 | 1038 | suffix=extra['suffix'], text=True, |
|
1039 | 1039 | dir=rdir) |
|
1040 | 1040 | try: |
|
1041 | f = os.fdopen(fd, "w") | |
|
1041 | f = os.fdopen(fd, pycompat.sysstr("w")) | |
|
1042 | 1042 | f.write(text) |
|
1043 | 1043 | f.close() |
|
1044 | 1044 |
@@ -809,7 +809,7 b' def tempfilter(s, cmd):' | |||
|
809 | 809 | inname, outname = None, None |
|
810 | 810 | try: |
|
811 | 811 | infd, inname = tempfile.mkstemp(prefix='hg-filter-in-') |
|
812 | fp = os.fdopen(infd, 'wb') | |
|
812 | fp = os.fdopen(infd, pycompat.sysstr('wb')) | |
|
813 | 813 | fp.write(s) |
|
814 | 814 | fp.close() |
|
815 | 815 | outfd, outname = tempfile.mkstemp(prefix='hg-filter-out-') |
General Comments 0
You need to be logged in to leave comments.
Login now