Show More
@@ -33,7 +33,8 b' This extension is not needed for:' | |||
|
33 | 33 | Note that there are some limitations on using this extension: |
|
34 | 34 | |
|
35 | 35 | - You should use single encoding in one repository. |
|
36 | ||
|
36 | - If the repository path ends with 0x5c, .hg/hgrc cannot be read. | |
|
37 | - win32mbcs is not compatible with fixutf8 extention. | |
|
37 | 38 | |
|
38 | 39 | By default, win32mbcs uses encoding.encoding decided by Mercurial. |
|
39 | 40 | You can specify the encoding by config option:: |
@@ -48,7 +49,7 b' import os, sys' | |||
|
48 | 49 | from mercurial.i18n import _ |
|
49 | 50 | from mercurial import util, encoding |
|
50 | 51 | |
|
51 |
_encoding = None # see |
|
|
52 | _encoding = None # see extsetup | |
|
52 | 53 | |
|
53 | 54 | def decode(arg): |
|
54 | 55 | if isinstance(arg, str): |
@@ -136,7 +137,7 b" problematic_encodings = '''big5 big5-tw " | |||
|
136 | 137 | sjis s_jis shift_jis_2004 shiftjis2004 sjis_2004 sjis2004 |
|
137 | 138 | shift_jisx0213 shiftjisx0213 sjisx0213 s_jisx0213 950 cp950 ms950 ''' |
|
138 | 139 | |
|
139 |
def |
|
|
140 | def extsetup(ui): | |
|
140 | 141 | # TODO: decide use of config section for this extension |
|
141 | 142 | if not os.path.supports_unicode_filenames: |
|
142 | 143 | ui.warn(_("[win32mbcs] cannot activate on this platform.\n")) |
@@ -149,6 +150,10 b' def reposetup(ui, repo):' | |||
|
149 | 150 | for f in funcs.split(): |
|
150 | 151 | wrapname(f, wrapper) |
|
151 | 152 | wrapname("mercurial.osutil.listdir", wrapperforlistdir) |
|
152 | ui.debug("[win32mbcs] activated with encoding: %s\n" | |
|
153 | # Check sys.args manually instead of using ui.debug() because | |
|
154 | # command line options is not yet applied when | |
|
155 | # extensions.loadall() is called. | |
|
156 | if '--debug' in sys.argv: | |
|
157 | ui.write("[win32mbcs] activated with encoding: %s\n" | |
|
153 | 158 | % _encoding) |
|
154 | 159 |
General Comments 0
You need to be logged in to leave comments.
Login now