##// END OF EJS Templates
win32mbcs: use str for encoding value...
Matt Harbison -
r52573:e6508d1e stable
parent child Browse files
Show More
@@ -73,7 +73,7 b' configitem('
73 default=lambda: encoding.encoding,
73 default=lambda: encoding.encoding,
74 )
74 )
75
75
76 _encoding = None # see extsetup
76 _encoding: str = "" # see extsetup
77
77
78
78
79 def decode(arg):
79 def decode(arg):
@@ -129,7 +129,7 b' def basewrapper(func, argtype, enc, dec,'
129 except UnicodeError:
129 except UnicodeError:
130 raise error.Abort(
130 raise error.Abort(
131 _(b"[win32mbcs] filename conversion failed with %s encoding\n")
131 _(b"[win32mbcs] filename conversion failed with %s encoding\n")
132 % _encoding
132 % encoding.strtolocal(_encoding)
133 )
133 )
134
134
135
135
@@ -199,7 +199,7 b' def extsetup(ui):'
199 return
199 return
200 # determine encoding for filename
200 # determine encoding for filename
201 global _encoding
201 global _encoding
202 _encoding = ui.config(b'win32mbcs', b'encoding')
202 _encoding = encoding.strfromlocal(ui.config(b'win32mbcs', b'encoding'))
203 # fake is only for relevant environment.
203 # fake is only for relevant environment.
204 if _encoding.lower() in problematic_encodings.split():
204 if _encoding.lower() in problematic_encodings.split():
205 for f in funcs.split():
205 for f in funcs.split():
@@ -217,5 +217,6 b' def extsetup(ui):'
217 # extensions.loadall() is called.
217 # extensions.loadall() is called.
218 if '--debug' in sys.argv:
218 if '--debug' in sys.argv:
219 ui.writenoi18n(
219 ui.writenoi18n(
220 b"[win32mbcs] activated with encoding: %s\n" % _encoding
220 b"[win32mbcs] activated with encoding: %s\n"
221 % encoding.strtolocal(_encoding)
221 )
222 )
General Comments 0
You need to be logged in to leave comments. Login now