diff options
Diffstat (limited to 'hgext/win32mbcs.py')
-rw-r--r-- | hgext/win32mbcs.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py index 65f0854..8cda3f0 100644 --- a/hgext/win32mbcs.py +++ b/hgext/win32mbcs.py @@ -48,7 +48,6 @@ It is useful for the users who want to commit with UTF-8 log message. import os, sys from mercurial.i18n import _ from mercurial import util, encoding -testedwith = 'internal' _encoding = None # see extsetup @@ -128,14 +127,11 @@ def wrapname(name, wrapper): # NOTE: os.path.dirname() and os.path.basename() are safe because # they use result of os.path.split() funcs = '''os.path.join os.path.split os.path.splitext - os.path.normpath os.makedirs + os.path.splitunc os.path.normpath os.path.normcase os.makedirs mercurial.util.endswithsep mercurial.util.splitpath mercurial.util.checkcase mercurial.util.fspath mercurial.util.pconvert mercurial.util.normpath mercurial.util.checkwinfilename mercurial.util.checkosfilename''' -# List of Windows specific functions to be wrapped. -winfuncs = '''os.path.splitunc''' - # codec and alias names of sjis and big5 to be faked. problematic_encodings = '''big5 big5-tw csbig5 big5hkscs big5-hkscs hkscs cp932 932 ms932 mskanji ms-kanji shift_jis csshiftjis shiftjis @@ -144,8 +140,7 @@ problematic_encodings = '''big5 big5-tw csbig5 big5hkscs big5-hkscs def extsetup(ui): # TODO: decide use of config section for this extension - if ((not os.path.supports_unicode_filenames) and - (sys.platform != 'cygwin')): + if not os.path.supports_unicode_filenames: ui.warn(_("[win32mbcs] cannot activate on this platform.\n")) return # determine encoding for filename @@ -155,9 +150,6 @@ def extsetup(ui): if _encoding.lower() in problematic_encodings.split(): for f in funcs.split(): wrapname(f, wrapper) - if os.name == 'nt': - for f in winfuncs.split(): - wrapname(f, wrapper) wrapname("mercurial.osutil.listdir", wrapperforlistdir) # Check sys.args manually instead of using ui.debug() because # command line options is not yet applied when @@ -165,3 +157,4 @@ def extsetup(ui): if '--debug' in sys.argv: ui.write("[win32mbcs] activated with encoding: %s\n" % _encoding) + |