Mercurial > hg
comparison hgext/win32mbcs.py @ 34645:75979c8d4572
codemod: use pycompat.iswindows
This is done by:
sed -i "s/pycompat\.osname == 'nt'/pycompat.iswindows/" **/*.py
sed -i "s/pycompat\.osname != 'nt'/not pycompat.iswindows/" **/*.py
sed -i 's/pycompat.osname == "nt"/pycompat.iswindows/' **/*.py
Differential Revision: https://phab.mercurial-scm.org/D1034
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 12 Oct 2017 23:30:46 -0700 |
parents | 37513324f620 |
children | 79dd61a4554f |
comparison
equal
deleted
inserted
replaced
34644:c0a6c19690ff | 34645:75979c8d4572 |
---|---|
188 _encoding = ui.config('win32mbcs', 'encoding') | 188 _encoding = ui.config('win32mbcs', 'encoding') |
189 # fake is only for relevant environment. | 189 # fake is only for relevant environment. |
190 if _encoding.lower() in problematic_encodings.split(): | 190 if _encoding.lower() in problematic_encodings.split(): |
191 for f in funcs.split(): | 191 for f in funcs.split(): |
192 wrapname(f, wrapper) | 192 wrapname(f, wrapper) |
193 if pycompat.osname == 'nt': | 193 if pycompat.iswindows: |
194 for f in winfuncs.split(): | 194 for f in winfuncs.split(): |
195 wrapname(f, wrapper) | 195 wrapname(f, wrapper) |
196 wrapname("mercurial.util.listdir", wrapperforlistdir) | 196 wrapname("mercurial.util.listdir", wrapperforlistdir) |
197 wrapname("mercurial.windows.listdir", wrapperforlistdir) | 197 wrapname("mercurial.windows.listdir", wrapperforlistdir) |
198 # wrap functions to be called with local byte string arguments | 198 # wrap functions to be called with local byte string arguments |