##// END OF EJS Templates
py3: convert to unicode to pass into encode()...
Pulkit Goyal -
r30050:d229be12 default
parent child Browse files
Show More
@@ -1,104 +1,108 b''
1 # i18n.py - internationalization support for mercurial
1 # i18n.py - internationalization support for mercurial
2 #
2 #
3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 import gettext as gettextmod
10 import gettext as gettextmod
11 import locale
11 import locale
12 import os
12 import os
13 import sys
13 import sys
14
14
15 from . import encoding
15 from . import (
16 encoding,
17 pycompat,
18 )
16
19
17 # modelled after templater.templatepath:
20 # modelled after templater.templatepath:
18 if getattr(sys, 'frozen', None) is not None:
21 if getattr(sys, 'frozen', None) is not None:
19 module = sys.executable
22 module = sys.executable
20 else:
23 else:
21 module = __file__
24 module = __file__
22
25
23 try:
26 try:
24 unicode
27 unicode
25 except NameError:
28 except NameError:
26 unicode = str
29 unicode = str
27
30
28 _languages = None
31 _languages = None
29 if (os.name == 'nt'
32 if (os.name == 'nt'
30 and 'LANGUAGE' not in encoding.environ
33 and 'LANGUAGE' not in encoding.environ
31 and 'LC_ALL' not in encoding.environ
34 and 'LC_ALL' not in encoding.environ
32 and 'LC_MESSAGES' not in encoding.environ
35 and 'LC_MESSAGES' not in encoding.environ
33 and 'LANG' not in encoding.environ):
36 and 'LANG' not in encoding.environ):
34 # Try to detect UI language by "User Interface Language Management" API
37 # Try to detect UI language by "User Interface Language Management" API
35 # if no locale variables are set. Note that locale.getdefaultlocale()
38 # if no locale variables are set. Note that locale.getdefaultlocale()
36 # uses GetLocaleInfo(), which may be different from UI language.
39 # uses GetLocaleInfo(), which may be different from UI language.
37 # (See http://msdn.microsoft.com/en-us/library/dd374098(v=VS.85).aspx )
40 # (See http://msdn.microsoft.com/en-us/library/dd374098(v=VS.85).aspx )
38 try:
41 try:
39 import ctypes
42 import ctypes
40 langid = ctypes.windll.kernel32.GetUserDefaultUILanguage()
43 langid = ctypes.windll.kernel32.GetUserDefaultUILanguage()
41 _languages = [locale.windows_locale[langid]]
44 _languages = [locale.windows_locale[langid]]
42 except (ImportError, AttributeError, KeyError):
45 except (ImportError, AttributeError, KeyError):
43 # ctypes not found or unknown langid
46 # ctypes not found or unknown langid
44 pass
47 pass
45
48
46 _ugettext = None
49 _ugettext = None
47
50
48 def setdatapath(datapath):
51 def setdatapath(datapath):
49 localedir = os.path.join(datapath, 'locale')
52 localedir = os.path.join(datapath, 'locale')
50 t = gettextmod.translation('hg', localedir, _languages, fallback=True)
53 t = gettextmod.translation('hg', localedir, _languages, fallback=True)
51 global _ugettext
54 global _ugettext
52 try:
55 try:
53 _ugettext = t.ugettext
56 _ugettext = t.ugettext
54 except AttributeError:
57 except AttributeError:
55 _ugettext = t.gettext
58 _ugettext = t.gettext
56
59
57 _msgcache = {}
60 _msgcache = {}
58
61
59 def gettext(message):
62 def gettext(message):
60 """Translate message.
63 """Translate message.
61
64
62 The message is looked up in the catalog to get a Unicode string,
65 The message is looked up in the catalog to get a Unicode string,
63 which is encoded in the local encoding before being returned.
66 which is encoded in the local encoding before being returned.
64
67
65 Important: message is restricted to characters in the encoding
68 Important: message is restricted to characters in the encoding
66 given by sys.getdefaultencoding() which is most likely 'ascii'.
69 given by sys.getdefaultencoding() which is most likely 'ascii'.
67 """
70 """
68 # If message is None, t.ugettext will return u'None' as the
71 # If message is None, t.ugettext will return u'None' as the
69 # translation whereas our callers expect us to return None.
72 # translation whereas our callers expect us to return None.
70 if message is None or not _ugettext:
73 if message is None or not _ugettext:
71 return message
74 return message
72
75
73 if message not in _msgcache:
76 if message not in _msgcache:
74 if type(message) is unicode:
77 if type(message) is unicode:
75 # goofy unicode docstrings in test
78 # goofy unicode docstrings in test
76 paragraphs = message.split(u'\n\n')
79 paragraphs = message.split(u'\n\n')
77 else:
80 else:
78 paragraphs = [p.decode("ascii") for p in message.split('\n\n')]
81 paragraphs = [p.decode("ascii") for p in message.split('\n\n')]
79 # Be careful not to translate the empty string -- it holds the
82 # Be careful not to translate the empty string -- it holds the
80 # meta data of the .po file.
83 # meta data of the .po file.
81 u = u'\n\n'.join([p and _ugettext(p) or u'' for p in paragraphs])
84 u = u'\n\n'.join([p and _ugettext(p) or u'' for p in paragraphs])
82 try:
85 try:
83 # encoding.tolocal cannot be used since it will first try to
86 # encoding.tolocal cannot be used since it will first try to
84 # decode the Unicode string. Calling u.decode(enc) really
87 # decode the Unicode string. Calling u.decode(enc) really
85 # means u.encode(sys.getdefaultencoding()).decode(enc). Since
88 # means u.encode(sys.getdefaultencoding()).decode(enc). Since
86 # the Python encoding defaults to 'ascii', this fails if the
89 # the Python encoding defaults to 'ascii', this fails if the
87 # translated string use non-ASCII characters.
90 # translated string use non-ASCII characters.
88 _msgcache[message] = u.encode(encoding.encoding, "replace")
91 encodingstr = pycompat.sysstr(encoding.encoding)
92 _msgcache[message] = u.encode(encodingstr, "replace")
89 except LookupError:
93 except LookupError:
90 # An unknown encoding results in a LookupError.
94 # An unknown encoding results in a LookupError.
91 _msgcache[message] = message
95 _msgcache[message] = message
92 return _msgcache[message]
96 return _msgcache[message]
93
97
94 def _plain():
98 def _plain():
95 if ('HGPLAIN' not in encoding.environ
99 if ('HGPLAIN' not in encoding.environ
96 and 'HGPLAINEXCEPT' not in encoding.environ):
100 and 'HGPLAINEXCEPT' not in encoding.environ):
97 return False
101 return False
98 exceptions = encoding.environ.get('HGPLAINEXCEPT', '').strip().split(',')
102 exceptions = encoding.environ.get('HGPLAINEXCEPT', '').strip().split(',')
99 return 'i18n' not in exceptions
103 return 'i18n' not in exceptions
100
104
101 if _plain():
105 if _plain():
102 _ = lambda message: message
106 _ = lambda message: message
103 else:
107 else:
104 _ = gettext
108 _ = gettext
@@ -1,178 +1,178 b''
1 #require test-repo
1 #require test-repo
2
2
3 $ . "$TESTDIR/helpers-testrepo.sh"
3 $ . "$TESTDIR/helpers-testrepo.sh"
4 $ cd "$TESTDIR"/..
4 $ cd "$TESTDIR"/..
5
5
6 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
6 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
7 hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
7 hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
8 hgext/fsmonitor/pywatchman/__init__.py requires print_function
8 hgext/fsmonitor/pywatchman/__init__.py requires print_function
9 hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
9 hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
10 hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
10 hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
11 i18n/check-translation.py not using absolute_import
11 i18n/check-translation.py not using absolute_import
12 setup.py not using absolute_import
12 setup.py not using absolute_import
13 tests/test-demandimport.py not using absolute_import
13 tests/test-demandimport.py not using absolute_import
14
14
15 #if py3exe
15 #if py3exe
16 $ hg files 'set:(**.py) - grep(pygments)' | sed 's|\\|/|g' \
16 $ hg files 'set:(**.py) - grep(pygments)' | sed 's|\\|/|g' \
17 > | xargs $PYTHON3 contrib/check-py3-compat.py \
17 > | xargs $PYTHON3 contrib/check-py3-compat.py \
18 > | sed 's/[0-9][0-9]*)$/*)/'
18 > | sed 's/[0-9][0-9]*)$/*)/'
19 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *)
19 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *)
20 hgext/acl.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
20 hgext/acl.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
21 hgext/automv.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
21 hgext/automv.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
22 hgext/blackbox.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
22 hgext/blackbox.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
23 hgext/bugzilla.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
23 hgext/bugzilla.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
24 hgext/censor.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
24 hgext/censor.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
25 hgext/chgserver.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
25 hgext/chgserver.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
26 hgext/children.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
26 hgext/children.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
27 hgext/churn.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
27 hgext/churn.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
28 hgext/clonebundles.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
28 hgext/clonebundles.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
29 hgext/color.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
29 hgext/color.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
30 hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
30 hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
31 hgext/convert/common.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
31 hgext/convert/common.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
32 hgext/convert/convcmd.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
32 hgext/convert/convcmd.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
33 hgext/convert/cvs.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
33 hgext/convert/cvs.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
34 hgext/convert/cvsps.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
34 hgext/convert/cvsps.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
35 hgext/convert/darcs.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
35 hgext/convert/darcs.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
36 hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
36 hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *)
37 hgext/convert/git.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
37 hgext/convert/git.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
38 hgext/convert/gnuarch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
38 hgext/convert/gnuarch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
39 hgext/convert/hg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
39 hgext/convert/hg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
40 hgext/convert/monotone.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
40 hgext/convert/monotone.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
41 hgext/convert/p4.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
41 hgext/convert/p4.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
42 hgext/convert/subversion.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
42 hgext/convert/subversion.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
43 hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *)
43 hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *)
44 hgext/eol.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
44 hgext/eol.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
45 hgext/extdiff.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
45 hgext/extdiff.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
46 hgext/factotum.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
46 hgext/factotum.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
47 hgext/fetch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
47 hgext/fetch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
48 hgext/fsmonitor/state.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
48 hgext/fsmonitor/state.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
49 hgext/fsmonitor/watchmanclient.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
49 hgext/fsmonitor/watchmanclient.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
50 hgext/gpg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
50 hgext/gpg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
51 hgext/graphlog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
51 hgext/graphlog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
52 hgext/hgk.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
52 hgext/hgk.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
53 hgext/histedit.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
53 hgext/histedit.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
54 hgext/journal.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
54 hgext/journal.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
55 hgext/keyword.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
55 hgext/keyword.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
56 hgext/largefiles/basestore.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
56 hgext/largefiles/basestore.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
57 hgext/largefiles/lfcommands.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
57 hgext/largefiles/lfcommands.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
58 hgext/largefiles/lfutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
58 hgext/largefiles/lfutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
59 hgext/largefiles/localstore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
59 hgext/largefiles/localstore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
60 hgext/largefiles/overrides.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
60 hgext/largefiles/overrides.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
61 hgext/largefiles/proto.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
61 hgext/largefiles/proto.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
62 hgext/largefiles/remotestore.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
62 hgext/largefiles/remotestore.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
63 hgext/largefiles/reposetup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
63 hgext/largefiles/reposetup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
64 hgext/largefiles/storefactory.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
64 hgext/largefiles/storefactory.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
65 hgext/largefiles/uisetup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
65 hgext/largefiles/uisetup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
66 hgext/largefiles/wirestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
66 hgext/largefiles/wirestore.py: error importing module: <SystemError> Parent module 'hgext.largefiles' not loaded, cannot perform relative import (line *)
67 hgext/mq.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
67 hgext/mq.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
68 hgext/notify.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
68 hgext/notify.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
69 hgext/pager.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
69 hgext/pager.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
70 hgext/patchbomb.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
70 hgext/patchbomb.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
71 hgext/purge.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
71 hgext/purge.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
72 hgext/rebase.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
72 hgext/rebase.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
73 hgext/record.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
73 hgext/record.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
74 hgext/relink.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
74 hgext/relink.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
75 hgext/schemes.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
75 hgext/schemes.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
76 hgext/share.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
76 hgext/share.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
77 hgext/shelve.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
77 hgext/shelve.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
78 hgext/strip.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
78 hgext/strip.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
79 hgext/transplant.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
79 hgext/transplant.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
80 hgext/win32text.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
80 hgext/win32text.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
81 mercurial/archival.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
81 mercurial/archival.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
82 mercurial/bookmarks.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
82 mercurial/bookmarks.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
83 mercurial/branchmap.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
83 mercurial/branchmap.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
84 mercurial/bundle2.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
84 mercurial/bundle2.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
85 mercurial/bundlerepo.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
85 mercurial/bundlerepo.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
86 mercurial/byterange.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
86 mercurial/byterange.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
87 mercurial/changegroup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
87 mercurial/changegroup.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
88 mercurial/changelog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
88 mercurial/changelog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
89 mercurial/cmdutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
89 mercurial/cmdutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
90 mercurial/commands.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
90 mercurial/commands.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
91 mercurial/commandserver.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
91 mercurial/commandserver.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
92 mercurial/config.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
92 mercurial/config.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
93 mercurial/context.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
93 mercurial/context.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
94 mercurial/copies.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
94 mercurial/copies.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
95 mercurial/crecord.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
95 mercurial/crecord.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
96 mercurial/destutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
96 mercurial/destutil.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
97 mercurial/dirstate.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
97 mercurial/dirstate.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
98 mercurial/discovery.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
98 mercurial/discovery.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
99 mercurial/dispatch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
99 mercurial/dispatch.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
100 mercurial/encoding.py: error importing module: <TypeError> bytes expected, not str (line *)
100 mercurial/encoding.py: error importing module: <TypeError> bytes expected, not str (line *)
101 mercurial/exchange.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
101 mercurial/exchange.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
102 mercurial/extensions.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
102 mercurial/extensions.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
103 mercurial/filelog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
103 mercurial/filelog.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
104 mercurial/filemerge.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
104 mercurial/filemerge.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
105 mercurial/fileset.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
105 mercurial/fileset.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
106 mercurial/formatter.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
106 mercurial/formatter.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
107 mercurial/graphmod.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
107 mercurial/graphmod.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
108 mercurial/help.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
108 mercurial/help.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
109 mercurial/hg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
109 mercurial/hg.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
110 mercurial/hgweb/common.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
110 mercurial/hgweb/common.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
111 mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
111 mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
112 mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
112 mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
113 mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
113 mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
114 mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
114 mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
115 mercurial/hgweb/server.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
115 mercurial/hgweb/server.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
116 mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
116 mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
117 mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
117 mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
118 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
118 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *)
119 mercurial/hook.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
119 mercurial/hook.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
120 mercurial/httpconnection.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
120 mercurial/httpconnection.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
121 mercurial/httppeer.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
121 mercurial/httppeer.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
122 mercurial/i18n.py: error importing module: <TypeError> bytes expected, not str (line *)
122 mercurial/i18n.py: error importing module: <TypeError> bytes expected, not str (line *)
123 mercurial/keepalive.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
123 mercurial/keepalive.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
124 mercurial/localrepo.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
124 mercurial/localrepo.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
125 mercurial/lock.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
125 mercurial/lock.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
126 mercurial/mail.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
126 mercurial/mail.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
127 mercurial/manifest.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
127 mercurial/manifest.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
128 mercurial/match.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
128 mercurial/match.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
129 mercurial/mdiff.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
129 mercurial/mdiff.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
130 mercurial/merge.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
130 mercurial/merge.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
131 mercurial/minirst.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
131 mercurial/minirst.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
132 mercurial/namespaces.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
132 mercurial/namespaces.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
133 mercurial/obsolete.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
133 mercurial/obsolete.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
134 mercurial/patch.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
134 mercurial/patch.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
135 mercurial/pathutil.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
135 mercurial/pathutil.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
136 mercurial/peer.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
136 mercurial/peer.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
137 mercurial/profiling.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
137 mercurial/profiling.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
138 mercurial/pushkey.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
138 mercurial/pushkey.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
139 mercurial/pvec.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
139 mercurial/pvec.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
140 mercurial/registrar.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
140 mercurial/registrar.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
141 mercurial/repair.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
141 mercurial/repair.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
142 mercurial/repoview.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
142 mercurial/repoview.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
143 mercurial/revlog.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
143 mercurial/revlog.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
144 mercurial/revset.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
144 mercurial/revset.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
145 mercurial/scmutil.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
145 mercurial/scmutil.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
146 mercurial/scmwindows.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
146 mercurial/scmwindows.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
147 mercurial/similar.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
147 mercurial/similar.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
148 mercurial/simplemerge.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
148 mercurial/simplemerge.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
149 mercurial/sshpeer.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
149 mercurial/sshpeer.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
150 mercurial/sshserver.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
150 mercurial/sshserver.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
151 mercurial/sslutil.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
151 mercurial/sslutil.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
152 mercurial/statichttprepo.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
152 mercurial/statichttprepo.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
153 mercurial/store.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
153 mercurial/store.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
154 mercurial/streamclone.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
154 mercurial/streamclone.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
155 mercurial/subrepo.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
155 mercurial/subrepo.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
156 mercurial/tagmerge.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
156 mercurial/tagmerge.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
157 mercurial/tags.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
157 mercurial/tags.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
158 mercurial/templatefilters.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
158 mercurial/templatefilters.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
159 mercurial/templatekw.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
159 mercurial/templatekw.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
160 mercurial/templater.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
160 mercurial/templater.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
161 mercurial/transaction.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
161 mercurial/transaction.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
162 mercurial/ui.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
162 mercurial/ui.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
163 mercurial/unionrepo.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
163 mercurial/unionrepo.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
164 mercurial/url.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
164 mercurial/url.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
165 mercurial/util.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
165 mercurial/util.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
166 mercurial/verify.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
166 mercurial/verify.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
167 mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
167 mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
168 mercurial/windows.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
168 mercurial/windows.py: error importing module: <ImportError> No module named 'msvcrt' (line *)
169 mercurial/wireproto.py: error importing: <TypeError> encode() argument 1 must be str, not bytes (error at i18n.py:*)
169 mercurial/wireproto.py: error importing: <TypeError> encode() argument 2 must be str, not bytes (error at i18n.py:*)
170
170
171 #endif
171 #endif
172
172
173 #if py3exe py3pygments
173 #if py3exe py3pygments
174 $ hg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
174 $ hg files 'set:(**.py) and grep(pygments)' | sed 's|\\|/|g' \
175 > | xargs $PYTHON3 contrib/check-py3-compat.py \
175 > | xargs $PYTHON3 contrib/check-py3-compat.py \
176 > | sed 's/[0-9][0-9]*)$/*)/'
176 > | sed 's/[0-9][0-9]*)$/*)/'
177 hgext/highlight/highlight.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
177 hgext/highlight/highlight.py: error importing: <TypeError> Can't mix strings and bytes in path components (error at i18n.py:*)
178 #endif
178 #endif
General Comments 0
You need to be logged in to leave comments. Login now