Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/hgext/win32mbcs.py Thu Oct 12 19:20:04 2017 -0700 +++ b/hgext/win32mbcs.py Thu Oct 12 23:30:46 2017 -0700 @@ -190,7 +190,7 @@ if _encoding.lower() in problematic_encodings.split(): for f in funcs.split(): wrapname(f, wrapper) - if pycompat.osname == 'nt': + if pycompat.iswindows: for f in winfuncs.split(): wrapname(f, wrapper) wrapname("mercurial.util.listdir", wrapperforlistdir)