Show More
@@ -54,6 +54,7 b' from mercurial import (' | |||||
54 | encoding, |
|
54 | encoding, | |
55 | error, |
|
55 | error, | |
56 | pycompat, |
|
56 | pycompat, | |
|
57 | registrar, | |||
57 | ) |
|
58 | ) | |
58 |
|
59 | |||
59 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
60 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | |
@@ -62,6 +63,15 b' from mercurial import (' | |||||
62 | # leave the attribute unspecified. |
|
63 | # leave the attribute unspecified. | |
63 | testedwith = 'ships-with-hg-core' |
|
64 | testedwith = 'ships-with-hg-core' | |
64 |
|
65 | |||
|
66 | configtable = {} | |||
|
67 | configitem = registrar.configitem(configtable) | |||
|
68 | ||||
|
69 | # Encoding.encoding may be updated by --encoding option. | |||
|
70 | # Use a lambda do delay the resolution. | |||
|
71 | configitem('win32mbcs', 'encoding', | |||
|
72 | default=lambda: encoding.encoding, | |||
|
73 | ) | |||
|
74 | ||||
65 | _encoding = None # see extsetup |
|
75 | _encoding = None # see extsetup | |
66 |
|
76 | |||
67 | def decode(arg): |
|
77 | def decode(arg): | |
@@ -175,7 +185,7 b' def extsetup(ui):' | |||||
175 | return |
|
185 | return | |
176 | # determine encoding for filename |
|
186 | # determine encoding for filename | |
177 | global _encoding |
|
187 | global _encoding | |
178 |
_encoding = ui.config('win32mbcs', 'encoding' |
|
188 | _encoding = ui.config('win32mbcs', 'encoding') | |
179 | # fake is only for relevant environment. |
|
189 | # fake is only for relevant environment. | |
180 | if _encoding.lower() in problematic_encodings.split(): |
|
190 | if _encoding.lower() in problematic_encodings.split(): | |
181 | for f in funcs.split(): |
|
191 | for f in funcs.split(): |
General Comments 0
You need to be logged in to leave comments.
Login now