##// END OF EJS Templates
encoding: use absolute_import
Gregory Szorc -
r27355:b479fc42 default
parent child Browse files
Show More
@@ -5,8 +5,15 b''
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 import error
8 from __future__ import absolute_import
9 import unicodedata, locale, os
9
10 import locale
11 import os
12 import unicodedata
13
14 from . import (
15 error,
16 )
10
17
11 # These unicode characters are ignored by HFS+ (Apple Technote 1150,
18 # These unicode characters are ignored by HFS+ (Apple Technote 1150,
12 # "Unicode Subtleties"), so we need to ignore them in some places for
19 # "Unicode Subtleties"), so we need to ignore them in some places for
@@ -194,7 +201,7 b" def trim(s, width, ellipsis='', leftside"
194 'ellipsis' is always placed at trimmed side.
201 'ellipsis' is always placed at trimmed side.
195
202
196 >>> ellipsis = '+++'
203 >>> ellipsis = '+++'
197 >>> from mercurial import encoding
204 >>> from . import encoding
198 >>> encoding.encoding = 'utf-8'
205 >>> encoding.encoding = 'utf-8'
199 >>> t= '1234567890'
206 >>> t= '1234567890'
200 >>> print trim(t, 12, ellipsis=ellipsis)
207 >>> print trim(t, 12, ellipsis=ellipsis)
@@ -290,7 +297,7 b' def _asciilower(s):'
290 def asciilower(s):
297 def asciilower(s):
291 # delay importing avoids cyclic dependency around "parsers" in
298 # delay importing avoids cyclic dependency around "parsers" in
292 # pure Python build (util => i18n => encoding => parsers => util)
299 # pure Python build (util => i18n => encoding => parsers => util)
293 import parsers
300 from . import parsers
294 impl = getattr(parsers, 'asciilower', _asciilower)
301 impl = getattr(parsers, 'asciilower', _asciilower)
295 global asciilower
302 global asciilower
296 asciilower = impl
303 asciilower = impl
@@ -306,7 +313,7 b' def _asciiupper(s):'
306 def asciiupper(s):
313 def asciiupper(s):
307 # delay importing avoids cyclic dependency around "parsers" in
314 # delay importing avoids cyclic dependency around "parsers" in
308 # pure Python build (util => i18n => encoding => parsers => util)
315 # pure Python build (util => i18n => encoding => parsers => util)
309 import parsers
316 from . import parsers
310 impl = getattr(parsers, 'asciiupper', _asciiupper)
317 impl = getattr(parsers, 'asciiupper', _asciiupper)
311 global asciiupper
318 global asciiupper
312 asciiupper = impl
319 asciiupper = impl
@@ -104,7 +104,6 b''
104 mercurial/context.py not using absolute_import
104 mercurial/context.py not using absolute_import
105 mercurial/dirstate.py not using absolute_import
105 mercurial/dirstate.py not using absolute_import
106 mercurial/dispatch.py requires print_function
106 mercurial/dispatch.py requires print_function
107 mercurial/encoding.py not using absolute_import
108 mercurial/exchange.py not using absolute_import
107 mercurial/exchange.py not using absolute_import
109 mercurial/help.py not using absolute_import
108 mercurial/help.py not using absolute_import
110 mercurial/httpclient/__init__.py not using absolute_import
109 mercurial/httpclient/__init__.py not using absolute_import
General Comments 0
You need to be logged in to leave comments. Login now