Mercurial > public > mercurial-scm > hg
diff hgext/logtoprocess.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 | 68ed3b4f86ef |
children | 52790352dd05 |
line wrap: on
line diff
--- a/hgext/logtoprocess.py Thu Oct 12 19:20:04 2017 -0700 +++ b/hgext/logtoprocess.py Thu Oct 12 23:30:46 2017 -0700 @@ -51,7 +51,7 @@ testedwith = 'ships-with-hg-core' def uisetup(ui): - if pycompat.osname == 'nt': + if pycompat.iswindows: # no fork on Windows, but we can create a detached process # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx # No stdlib constant exists for this value