Show More
@@ -15,6 +15,7 b' import os' | |||
|
15 | 15 | import time |
|
16 | 16 | |
|
17 | 17 | from mercurial.i18n import _ |
|
18 | from mercurial.pycompat import open | |
|
18 | 19 | from mercurial import ( |
|
19 | 20 | cmdutil, |
|
20 | 21 | encoding, |
@@ -15,6 +15,7 b' import shlex' | |||
|
15 | 15 | import subprocess |
|
16 | 16 | |
|
17 | 17 | from mercurial.i18n import _ |
|
18 | from mercurial.pycompat import open | |
|
18 | 19 | from mercurial import ( |
|
19 | 20 | encoding, |
|
20 | 21 | error, |
@@ -11,6 +11,7 b' import os' | |||
|
11 | 11 | import shutil |
|
12 | 12 | |
|
13 | 13 | from mercurial.i18n import _ |
|
14 | from mercurial.pycompat import open | |
|
14 | 15 | from mercurial import ( |
|
15 | 16 | encoding, |
|
16 | 17 | error, |
@@ -12,6 +12,7 b' import re' | |||
|
12 | 12 | import socket |
|
13 | 13 | |
|
14 | 14 | from mercurial.i18n import _ |
|
15 | from mercurial.pycompat import open | |
|
15 | 16 | from mercurial import ( |
|
16 | 17 | encoding, |
|
17 | 18 | error, |
@@ -11,6 +11,7 b' import os' | |||
|
11 | 11 | import re |
|
12 | 12 | |
|
13 | 13 | from mercurial.i18n import _ |
|
14 | from mercurial.pycompat import open | |
|
14 | 15 | from mercurial import ( |
|
15 | 16 | encoding, |
|
16 | 17 | error, |
@@ -23,6 +23,7 b' import re' | |||
|
23 | 23 | import time |
|
24 | 24 | |
|
25 | 25 | from mercurial.i18n import _ |
|
26 | from mercurial.pycompat import open | |
|
26 | 27 | from mercurial import ( |
|
27 | 28 | bookmarks, |
|
28 | 29 | context, |
@@ -11,6 +11,7 b' import os' | |||
|
11 | 11 | import re |
|
12 | 12 | |
|
13 | 13 | from mercurial.i18n import _ |
|
14 | from mercurial.pycompat import open | |
|
14 | 15 | from mercurial import ( |
|
15 | 16 | error, |
|
16 | 17 | pycompat, |
@@ -8,6 +8,7 b' import re' | |||
|
8 | 8 | import xml.dom.minidom |
|
9 | 9 | |
|
10 | 10 | from mercurial.i18n import _ |
|
11 | from mercurial.pycompat import open | |
|
11 | 12 | from mercurial import ( |
|
12 | 13 | encoding, |
|
13 | 14 | error, |
@@ -13,6 +13,7 b' import hashlib' | |||
|
13 | 13 | import os |
|
14 | 14 | |
|
15 | 15 | from mercurial.i18n import _ |
|
16 | from mercurial.pycompat import open | |
|
16 | 17 | from mercurial import ( |
|
17 | 18 | error, |
|
18 | 19 | linelog as linelogmod, |
@@ -10,6 +10,7 b' import contextlib' | |||
|
10 | 10 | import os |
|
11 | 11 | |
|
12 | 12 | from mercurial.i18n import _ |
|
13 | from mercurial.pycompat import open | |
|
13 | 14 | from mercurial import ( |
|
14 | 15 | error, |
|
15 | 16 | extensions, |
@@ -13,6 +13,7 b' import os' | |||
|
13 | 13 | import struct |
|
14 | 14 | |
|
15 | 15 | from mercurial.node import hex |
|
16 | from mercurial.pycompat import open | |
|
16 | 17 | from mercurial import ( |
|
17 | 18 | error as hgerror, |
|
18 | 19 | pycompat, |
@@ -117,7 +117,7 b' import weakref' | |||
|
117 | 117 | |
|
118 | 118 | from mercurial.i18n import _ |
|
119 | 119 | from mercurial.node import hex |
|
120 | ||
|
120 | from mercurial.pycompat import open | |
|
121 | 121 | from mercurial import ( |
|
122 | 122 | context, |
|
123 | 123 | encoding, |
@@ -206,6 +206,7 b' import os' | |||
|
206 | 206 | import struct |
|
207 | 207 | |
|
208 | 208 | from mercurial.i18n import _ |
|
209 | from mercurial.pycompat import open | |
|
209 | 210 | from mercurial import ( |
|
210 | 211 | bundle2, |
|
211 | 212 | cmdutil, |
@@ -103,6 +103,8 b' from mercurial.node import (' | |||
|
103 | 103 | |
|
104 | 104 | from mercurial.i18n import _ |
|
105 | 105 | |
|
106 | from mercurial.pycompat import open | |
|
107 | ||
|
106 | 108 | from mercurial.utils import ( |
|
107 | 109 | procutil, |
|
108 | 110 | stringutil, |
@@ -11,6 +11,7 b' import os' | |||
|
11 | 11 | import subprocess |
|
12 | 12 | import tempfile |
|
13 | 13 | |
|
14 | from mercurial.pycompat import open | |
|
14 | 15 | from mercurial import ( |
|
15 | 16 | node, |
|
16 | 17 | pycompat, |
@@ -16,6 +16,7 b' import stat' | |||
|
16 | 16 | |
|
17 | 17 | from mercurial.i18n import _ |
|
18 | 18 | from mercurial.node import hex |
|
19 | from mercurial.pycompat import open | |
|
19 | 20 | |
|
20 | 21 | from mercurial import ( |
|
21 | 22 | dirstate, |
@@ -10,6 +10,7 b'' | |||
|
10 | 10 | from __future__ import absolute_import |
|
11 | 11 | |
|
12 | 12 | from mercurial.i18n import _ |
|
13 | from mercurial.pycompat import open | |
|
13 | 14 | from mercurial import util |
|
14 | 15 | |
|
15 | 16 | from . import ( |
@@ -14,6 +14,8 b' import os' | |||
|
14 | 14 | |
|
15 | 15 | from mercurial.i18n import _ |
|
16 | 16 | |
|
17 | from mercurial.pycompat import open | |
|
18 | ||
|
17 | 19 | from mercurial.hgweb import webcommands |
|
18 | 20 | |
|
19 | 21 | from mercurial import ( |
@@ -8,6 +8,7 b' import os' | |||
|
8 | 8 | import re |
|
9 | 9 | |
|
10 | 10 | from mercurial.i18n import _ |
|
11 | from mercurial.pycompat import open | |
|
11 | 12 | |
|
12 | 13 | from mercurial import ( |
|
13 | 14 | error, |
@@ -76,6 +76,7 b' from mercurial.node import (' | |||
|
76 | 76 | nullrev, |
|
77 | 77 | short, |
|
78 | 78 | ) |
|
79 | from mercurial.pycompat import open | |
|
79 | 80 | from mercurial import ( |
|
80 | 81 | cmdutil, |
|
81 | 82 | commands, |
@@ -83,6 +83,7 b' import os' | |||
|
83 | 83 | import socket |
|
84 | 84 | |
|
85 | 85 | from mercurial.i18n import _ |
|
86 | from mercurial.pycompat import open | |
|
86 | 87 | from mercurial import ( |
|
87 | 88 | cmdutil, |
|
88 | 89 | commands, |
@@ -24,6 +24,7 b' from mercurial.node import (' | |||
|
24 | 24 | nullrev, |
|
25 | 25 | short, |
|
26 | 26 | ) |
|
27 | from mercurial.pycompat import open | |
|
27 | 28 | from mercurial import ( |
|
28 | 29 | bookmarks, |
|
29 | 30 | cmdutil, |
@@ -18,6 +18,7 b' import errno' | |||
|
18 | 18 | import re |
|
19 | 19 | |
|
20 | 20 | from mercurial.i18n import _ |
|
21 | from mercurial.pycompat import open | |
|
21 | 22 | from mercurial import ( |
|
22 | 23 | config, |
|
23 | 24 | error, |
@@ -12,6 +12,7 b' import os' | |||
|
12 | 12 | import stat |
|
13 | 13 | |
|
14 | 14 | from mercurial.i18n import _ |
|
15 | from mercurial.pycompat import open | |
|
15 | 16 | from mercurial import ( |
|
16 | 17 | error, |
|
17 | 18 | hg, |
@@ -132,6 +132,7 b' import traceback' | |||
|
132 | 132 | |
|
133 | 133 | from mercurial.node import hex |
|
134 | 134 | from mercurial.i18n import _ |
|
135 | from mercurial.pycompat import open | |
|
135 | 136 | from mercurial import ( |
|
136 | 137 | changegroup, |
|
137 | 138 | changelog, |
@@ -9,6 +9,7 b' import struct' | |||
|
9 | 9 | import time |
|
10 | 10 | |
|
11 | 11 | from mercurial.i18n import _ |
|
12 | from mercurial.pycompat import open | |
|
12 | 13 | from mercurial import ( |
|
13 | 14 | node as nodemod, |
|
14 | 15 | policy, |
@@ -9,6 +9,7 b' import time' | |||
|
9 | 9 | |
|
10 | 10 | from mercurial.i18n import _ |
|
11 | 11 | from mercurial.node import bin, hex |
|
12 | from mercurial.pycompat import open | |
|
12 | 13 | from mercurial import ( |
|
13 | 14 | error, |
|
14 | 15 | pycompat, |
@@ -12,6 +12,7 b' import zlib' | |||
|
12 | 12 | |
|
13 | 13 | from mercurial.node import bin, hex, nullid, short |
|
14 | 14 | from mercurial.i18n import _ |
|
15 | from mercurial.pycompat import open | |
|
15 | 16 | from mercurial import ( |
|
16 | 17 | error, |
|
17 | 18 | filelog, |
@@ -14,6 +14,7 b' import zlib' | |||
|
14 | 14 | |
|
15 | 15 | from mercurial.i18n import _ |
|
16 | 16 | from mercurial.node import bin, hex, nullid |
|
17 | from mercurial.pycompat import open | |
|
17 | 18 | from mercurial import ( |
|
18 | 19 | changegroup, |
|
19 | 20 | changelog, |
@@ -15,6 +15,7 b' import struct' | |||
|
15 | 15 | import tempfile |
|
16 | 16 | |
|
17 | 17 | from mercurial.i18n import _ |
|
18 | from mercurial.pycompat import open | |
|
18 | 19 | from mercurial import ( |
|
19 | 20 | error, |
|
20 | 21 | node, |
@@ -18,6 +18,7 b' from __future__ import absolute_import' | |||
|
18 | 18 | import os |
|
19 | 19 | |
|
20 | 20 | from mercurial.i18n import _ |
|
21 | from mercurial.pycompat import open | |
|
21 | 22 | from mercurial import ( |
|
22 | 23 | bundlerepo, |
|
23 | 24 | cmdutil, |
@@ -172,7 +172,7 b' if sys.version_info[0] >= 3:' | |||
|
172 | 172 | l = ( |
|
173 | 173 | b'; from mercurial.pycompat import ' |
|
174 | 174 | b'delattr, getattr, hasattr, setattr, ' |
|
175 |
b' |
|
|
175 | b'unicode\n' | |
|
176 | 176 | ) |
|
177 | 177 | for u in tokenize.tokenize(io.BytesIO(l).readline): |
|
178 | 178 | if u.type in (tokenize.ENCODING, token.ENDMARKER): |
@@ -221,7 +221,7 b' if sys.version_info[0] >= 3:' | |||
|
221 | 221 | # ``replacetoken`` or any mechanism that changes semantics of module |
|
222 | 222 | # loading is changed. Otherwise cached bytecode may get loaded without |
|
223 | 223 | # the new transformation mechanisms applied. |
|
224 |
BYTECODEHEADER = b'HG\x00\x0 |
|
|
224 | BYTECODEHEADER = b'HG\x00\x0d' | |
|
225 | 225 | |
|
226 | 226 | class hgloader(importlib.machinery.SourceFileLoader): |
|
227 | 227 | """Custom module loader that transforms source code. |
@@ -17,6 +17,7 b' import zlib' | |||
|
17 | 17 | |
|
18 | 18 | from .i18n import _ |
|
19 | 19 | from .node import nullrev |
|
20 | from .pycompat import open | |
|
20 | 21 | |
|
21 | 22 | from . import ( |
|
22 | 23 | error, |
@@ -18,6 +18,7 b' from .node import (' | |||
|
18 | 18 | nullrev, |
|
19 | 19 | short, |
|
20 | 20 | ) |
|
21 | from .pycompat import open | |
|
21 | 22 | |
|
22 | 23 | from . import ( |
|
23 | 24 | error, |
@@ -19,6 +19,7 b' from .node import (' | |||
|
19 | 19 | nullrev, |
|
20 | 20 | short, |
|
21 | 21 | ) |
|
22 | from .pycompat import open | |
|
22 | 23 | |
|
23 | 24 | from . import ( |
|
24 | 25 | bookmarks, |
@@ -22,6 +22,7 b' from .node import (' | |||
|
22 | 22 | wdirhex, |
|
23 | 23 | wdirrev, |
|
24 | 24 | ) |
|
25 | from .pycompat import open | |
|
25 | 26 | from . import ( |
|
26 | 27 | archival, |
|
27 | 28 | bookmarks, |
@@ -23,6 +23,7 b' from .node import (' | |||
|
23 | 23 | wdirfilenodeids, |
|
24 | 24 | wdirhex, |
|
25 | 25 | ) |
|
26 | from .pycompat import open | |
|
26 | 27 | from . import ( |
|
27 | 28 | copies, |
|
28 | 29 | dagop, |
@@ -16,6 +16,7 b' import re' | |||
|
16 | 16 | import signal |
|
17 | 17 | |
|
18 | 18 | from .i18n import _ |
|
19 | from .pycompat import open | |
|
19 | 20 | from . import ( |
|
20 | 21 | encoding, |
|
21 | 22 | error, |
@@ -32,6 +32,7 b' from .node import (' | |||
|
32 | 32 | nullrev, |
|
33 | 33 | short, |
|
34 | 34 | ) |
|
35 | from .pycompat import open | |
|
35 | 36 | from . import ( |
|
36 | 37 | bundle2, |
|
37 | 38 | changegroup, |
@@ -18,6 +18,7 b' from .i18n import (' | |||
|
18 | 18 | _, |
|
19 | 19 | gettext, |
|
20 | 20 | ) |
|
21 | from .pycompat import open | |
|
21 | 22 | |
|
22 | 23 | from . import ( |
|
23 | 24 | cmdutil, |
@@ -18,6 +18,7 b' from .node import (' | |||
|
18 | 18 | nullid, |
|
19 | 19 | short, |
|
20 | 20 | ) |
|
21 | from .pycompat import open | |
|
21 | 22 | |
|
22 | 23 | from . import ( |
|
23 | 24 | encoding, |
@@ -14,6 +14,7 b' import mimetypes' | |||
|
14 | 14 | import os |
|
15 | 15 | import stat |
|
16 | 16 | |
|
17 | from ..pycompat import open | |
|
17 | 18 | from .. import ( |
|
18 | 19 | encoding, |
|
19 | 20 | pycompat, |
@@ -17,6 +17,7 b' import traceback' | |||
|
17 | 17 | import wsgiref.validate |
|
18 | 18 | |
|
19 | 19 | from ..i18n import _ |
|
20 | from ..pycompat import open | |
|
20 | 21 | |
|
21 | 22 | from .. import ( |
|
22 | 23 | encoding, |
@@ -13,6 +13,7 b' from __future__ import absolute_import' | |||
|
13 | 13 | import os |
|
14 | 14 | |
|
15 | 15 | from .i18n import _ |
|
16 | from .pycompat import open | |
|
16 | 17 | from . import ( |
|
17 | 18 | pycompat, |
|
18 | 19 | util, |
@@ -19,6 +19,7 b' import socket' | |||
|
19 | 19 | import time |
|
20 | 20 | |
|
21 | 21 | from .i18n import _ |
|
22 | from .pycompat import open | |
|
22 | 23 | from . import ( |
|
23 | 24 | encoding, |
|
24 | 25 | error, |
@@ -13,6 +13,7 b' import os' | |||
|
13 | 13 | import re |
|
14 | 14 | |
|
15 | 15 | from .i18n import _ |
|
16 | from .pycompat import open | |
|
16 | 17 | from . import ( |
|
17 | 18 | encoding, |
|
18 | 19 | error, |
@@ -24,6 +24,7 b' from .node import (' | |||
|
24 | 24 | hex, |
|
25 | 25 | short, |
|
26 | 26 | ) |
|
27 | from .pycompat import open | |
|
27 | 28 | from . import ( |
|
28 | 29 | copies, |
|
29 | 30 | diffhelper, |
@@ -21,6 +21,7 b' import tempfile' | |||
|
21 | 21 | import unicodedata |
|
22 | 22 | |
|
23 | 23 | from .i18n import _ |
|
24 | from .pycompat import open | |
|
24 | 25 | from . import ( |
|
25 | 26 | encoding, |
|
26 | 27 | error, |
@@ -10,6 +10,7 b' from __future__ import absolute_import, ' | |||
|
10 | 10 | import contextlib |
|
11 | 11 | |
|
12 | 12 | from .i18n import _ |
|
13 | from .pycompat import open | |
|
13 | 14 | from . import ( |
|
14 | 15 | encoding, |
|
15 | 16 | error, |
@@ -354,6 +354,7 b' else:' | |||
|
354 | 354 | sysstr = identity |
|
355 | 355 | strurl = identity |
|
356 | 356 | bytesurl = identity |
|
357 | open = open | |
|
357 | 358 | |
|
358 | 359 | # this can't be parsed on Python 3 |
|
359 | 360 | exec(b'def raisewithtb(exc, tb):\n' b' raise exc, None, tb\n') |
@@ -10,6 +10,7 b' from __future__ import absolute_import' | |||
|
10 | 10 | import os |
|
11 | 11 | |
|
12 | 12 | from .i18n import _ |
|
13 | from .pycompat import open | |
|
13 | 14 | |
|
14 | 15 | from . import ( |
|
15 | 16 | chgserver, |
@@ -28,6 +28,7 b' import itertools' | |||
|
28 | 28 | import stat |
|
29 | 29 | |
|
30 | 30 | from .i18n import _ |
|
31 | from .pycompat import open | |
|
31 | 32 | from . import ( |
|
32 | 33 | bookmarks, |
|
33 | 34 | bundle2, |
@@ -114,6 +114,7 b' import sys' | |||
|
114 | 114 | import threading |
|
115 | 115 | import time |
|
116 | 116 | |
|
117 | from .pycompat import open | |
|
117 | 118 | from . import ( |
|
118 | 119 | encoding, |
|
119 | 120 | pycompat, |
@@ -12,6 +12,7 b' import os' | |||
|
12 | 12 | import struct |
|
13 | 13 | |
|
14 | 14 | from .i18n import _ |
|
15 | from .pycompat import open | |
|
15 | 16 | from .interfaces import repository |
|
16 | 17 | from . import ( |
|
17 | 18 | cacheutil, |
@@ -19,6 +19,7 b' import tarfile' | |||
|
19 | 19 | import xml.dom.minidom |
|
20 | 20 | |
|
21 | 21 | from .i18n import _ |
|
22 | from .pycompat import open | |
|
22 | 23 | from . import ( |
|
23 | 24 | cmdutil, |
|
24 | 25 | encoding, |
@@ -22,6 +22,7 b' import traceback' | |||
|
22 | 22 | |
|
23 | 23 | from .i18n import _ |
|
24 | 24 | from .node import hex |
|
25 | from .pycompat import open | |
|
25 | 26 | |
|
26 | 27 | from . import ( |
|
27 | 28 | color, |
General Comments 0
You need to be logged in to leave comments.
Login now