Show More
@@ -10,7 +10,7 b' from __future__ import absolute_import' | |||||
10 | import struct |
|
10 | import struct | |
11 |
|
11 | |||
12 | from .. import pycompat |
|
12 | from .. import pycompat | |
13 |
stringio = pycompat.s |
|
13 | stringio = pycompat.bytesio | |
14 |
|
14 | |||
15 | class mpatchError(Exception): |
|
15 | class mpatchError(Exception): | |
16 | """error raised when a delta cannot be decoded |
|
16 | """error raised when a delta cannot be decoded |
@@ -12,7 +12,7 b' import zlib' | |||||
12 |
|
12 | |||
13 | from ..node import nullid |
|
13 | from ..node import nullid | |
14 | from .. import pycompat |
|
14 | from .. import pycompat | |
15 |
stringio = pycompat.s |
|
15 | stringio = pycompat.bytesio | |
16 |
|
16 | |||
17 |
|
17 | |||
18 | _pack = struct.pack |
|
18 | _pack = struct.pack |
@@ -64,7 +64,9 b' if ispy3:' | |||||
64 | sysexecutable = sys.executable |
|
64 | sysexecutable = sys.executable | |
65 | if sysexecutable: |
|
65 | if sysexecutable: | |
66 | sysexecutable = os.fsencode(sysexecutable) |
|
66 | sysexecutable = os.fsencode(sysexecutable) | |
67 |
s |
|
67 | bytesio = io.BytesIO | |
|
68 | # TODO deprecate stringio name, as it is a lie on Python 3. | |||
|
69 | stringio = bytesio | |||
68 |
|
70 | |||
69 | def maplist(*args): |
|
71 | def maplist(*args): | |
70 | return list(map(*args)) |
|
72 | return list(map(*args)) | |
@@ -343,7 +345,8 b' else:' | |||||
343 | getcwd = os.getcwd |
|
345 | getcwd = os.getcwd | |
344 | sysexecutable = sys.executable |
|
346 | sysexecutable = sys.executable | |
345 | shlexsplit = shlex.split |
|
347 | shlexsplit = shlex.split | |
346 |
s |
|
348 | bytesio = cStringIO.StringIO | |
|
349 | stringio = bytesio | |||
347 | maplist = map |
|
350 | maplist = map | |
348 | ziplist = zip |
|
351 | ziplist = zip | |
349 | rawinput = raw_input |
|
352 | rawinput = raw_input |
@@ -71,7 +71,9 b' socketserver = pycompat.socketserver' | |||||
71 | stderr = pycompat.stderr |
|
71 | stderr = pycompat.stderr | |
72 | stdin = pycompat.stdin |
|
72 | stdin = pycompat.stdin | |
73 | stdout = pycompat.stdout |
|
73 | stdout = pycompat.stdout | |
74 |
s |
|
74 | bytesio = pycompat.bytesio | |
|
75 | # TODO deprecate stringio name, as it is a lie on Python 3. | |||
|
76 | stringio = bytesio | |||
75 | xmlrpclib = pycompat.xmlrpclib |
|
77 | xmlrpclib = pycompat.xmlrpclib | |
76 |
|
78 | |||
77 | httpserver = urllibcompat.httpserver |
|
79 | httpserver = urllibcompat.httpserver |
General Comments 0
You need to be logged in to leave comments.
Login now