Mercurial > hg
diff mercurial/ui.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 | c0dabec35019 |
children | 6cd8d8203204 |
line wrap: on
line diff
--- a/mercurial/ui.py Thu Oct 12 19:20:04 2017 -0700 +++ b/mercurial/ui.py Thu Oct 12 23:30:46 2017 -0700 @@ -1041,7 +1041,7 @@ # gracefully and tell the user about their broken pager. shell = any(c in command for c in "|&;<>()$`\\\"' \t\n*?[#~=%") - if pycompat.osname == 'nt' and not shell: + if pycompat.iswindows and not shell: # Window's built-in `more` cannot be invoked with shell=False, but # its `more.com` can. Hide this implementation detail from the # user so we can also get sane bad PAGER behavior. MSYS has