Show More
@@ -8,6 +8,7 b'' | |||||
8 | from __future__ import absolute_import, print_function |
|
8 | from __future__ import absolute_import, print_function | |
9 |
|
9 | |||
10 | import email |
|
10 | import email | |
|
11 | import email.header | |||
11 | import os |
|
12 | import os | |
12 | import quopri |
|
13 | import quopri | |
13 | import smtplib |
|
14 | import smtplib | |
@@ -23,7 +24,7 b' from . import (' | |||||
23 | util, |
|
24 | util, | |
24 | ) |
|
25 | ) | |
25 |
|
26 | |||
26 |
_oldheaderinit = email. |
|
27 | _oldheaderinit = email.header.Header.__init__ | |
27 | def _unifiedheaderinit(self, *args, **kw): |
|
28 | def _unifiedheaderinit(self, *args, **kw): | |
28 | """ |
|
29 | """ | |
29 | Python 2.7 introduces a backwards incompatible change |
|
30 | Python 2.7 introduces a backwards incompatible change | |
@@ -279,7 +280,7 b' def headencode(ui, s, charsets=None, dis' | |||||
279 | if not display: |
|
280 | if not display: | |
280 | # split into words? |
|
281 | # split into words? | |
281 | s, cs = _encode(ui, s, charsets) |
|
282 | s, cs = _encode(ui, s, charsets) | |
282 |
return str(email. |
|
283 | return str(email.header.Header(s, cs)) | |
283 | return s |
|
284 | return s | |
284 |
|
285 | |||
285 | def _addressencode(ui, name, addr, charsets=None): |
|
286 | def _addressencode(ui, name, addr, charsets=None): | |
@@ -330,7 +331,7 b' def mimeencode(ui, s, charsets=None, dis' | |||||
330 | def headdecode(s): |
|
331 | def headdecode(s): | |
331 | '''Decodes RFC-2047 header''' |
|
332 | '''Decodes RFC-2047 header''' | |
332 | uparts = [] |
|
333 | uparts = [] | |
333 |
for part, charset in email. |
|
334 | for part, charset in email.header.decode_header(s): | |
334 | if charset is not None: |
|
335 | if charset is not None: | |
335 | try: |
|
336 | try: | |
336 | uparts.append(part.decode(charset)) |
|
337 | uparts.append(part.decode(charset)) |
@@ -121,29 +121,27 b'' | |||||
121 | mercurial/i18n.py: error importing module: <TypeError> bytes expected, not str (line *) |
|
121 | mercurial/i18n.py: error importing module: <TypeError> bytes expected, not str (line *) | |
122 | mercurial/keepalive.py: error importing module: <AttributeError> module 'mercurial.util' has no attribute 'httplib' (line *) |
|
122 | mercurial/keepalive.py: error importing module: <AttributeError> module 'mercurial.util' has no attribute 'httplib' (line *) | |
123 | mercurial/localrepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) |
|
123 | mercurial/localrepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) | |
124 |
mercurial/ma |
|
124 | mercurial/manifest.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
125 |
mercurial/m |
|
125 | mercurial/merge.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
126 |
mercurial/ |
|
126 | mercurial/namespaces.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
127 |
mercurial/ |
|
127 | mercurial/patch.py: error importing module: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (line *) | |
128 | mercurial/patch.py: error importing: <AttributeError> module 'email' has no attribute 'Header' (error at mail.py:*) |
|
|||
129 | mercurial/pvec.py: error importing module: <NameError> name 'xrange' is not defined (line *) |
|
128 | mercurial/pvec.py: error importing module: <NameError> name 'xrange' is not defined (line *) | |
130 | mercurial/repair.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) |
|
129 | mercurial/repair.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) | |
131 |
mercurial/revlog.py: error importing: <AttributeError> module ' |
|
130 | mercurial/revlog.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
132 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) |
|
131 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) | |
133 | mercurial/scmwindows.py: error importing module: <ImportError> No module named 'winreg' (line *) |
|
132 | mercurial/scmwindows.py: error importing module: <ImportError> No module named 'winreg' (line *) | |
134 | mercurial/sshpeer.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) |
|
133 | mercurial/sshpeer.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) | |
135 |
mercurial/sshserver.py: error importing: <AttributeError> module ' |
|
134 | mercurial/sshserver.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
136 | mercurial/statichttprepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at byterange.py:*) |
|
135 | mercurial/statichttprepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at byterange.py:*) | |
137 | mercurial/store.py: error importing module: <NameError> name 'xrange' is not defined (line *) |
|
136 | mercurial/store.py: error importing module: <NameError> name 'xrange' is not defined (line *) | |
138 | mercurial/streamclone.py: error importing: <TypeError> can't concat bytes to str (error at store.py:*) |
|
137 | mercurial/streamclone.py: error importing: <TypeError> can't concat bytes to str (error at store.py:*) | |
139 |
mercurial/subrepo.py: error importing: <AttributeError> module ' |
|
138 | mercurial/subrepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
140 |
mercurial/templatefilters.py: error importing: <AttributeError> module ' |
|
139 | mercurial/templatefilters.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
141 |
mercurial/templatekw.py: error importing: <AttributeError> module ' |
|
140 | mercurial/templatekw.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
142 |
mercurial/templater.py: error importing: <AttributeError> module ' |
|
141 | mercurial/templater.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
143 |
mercurial/ui.py: error importing: <AttributeError> module ' |
|
142 | mercurial/ui.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
144 |
mercurial/unionrepo.py: error importing: <AttributeError> module ' |
|
143 | mercurial/unionrepo.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'stringio' (error at patch.py:*) | |
145 | mercurial/url.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) |
|
144 | mercurial/url.py: error importing: <AttributeError> module 'mercurial.util' has no attribute 'urlerr' (error at httpconnection.py:*) | |
146 | mercurial/verify.py: error importing: <AttributeError> module 'email' has no attribute 'Header' (error at mail.py:*) |
|
|||
147 | mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *) |
|
145 | mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *) | |
148 | mercurial/windows.py: error importing module: <ImportError> No module named 'msvcrt' (line *) |
|
146 | mercurial/windows.py: error importing module: <ImportError> No module named 'msvcrt' (line *) | |
149 | mercurial/wireproto.py: error importing: <TypeError> %b requires bytes, or an object that implements __bytes__, not 'str' (error at bundle2.py:*) |
|
147 | mercurial/wireproto.py: error importing: <TypeError> %b requires bytes, or an object that implements __bytes__, not 'str' (error at bundle2.py:*) |
General Comments 0
You need to be logged in to leave comments.
Login now