( )⚙ D1034 codemod: use pycompat.iswindows

This is an archive of the discontinued Mercurial Phabricator instance.

codemod: use pycompat.iswindows
ClosedPublic

Authored by quark on Oct 12 2017, 12:37 PM.

Details

Summary

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

quark created this revision.Oct 12 2017, 12:37 PM
spectral accepted this revision.Oct 12 2017, 2:52 PM
quark edited the summary of this revision. (Show Details)Oct 13 2017, 2:36 AM
quark updated this revision to Diff 2656.
lothiraldan accepted this revision.Oct 13 2017, 4:52 AM
This revision was automatically updated to reflect the committed changes.

Thanks for making this nice improvement @quark!