diff mercurial/subrepo.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 719a5c17e131
children 68e0bcb90357
line wrap: on
line diff
--- a/mercurial/subrepo.py	Thu Oct 12 19:20:04 2017 -0700
+++ b/mercurial/subrepo.py	Thu Oct 12 23:30:46 2017 -0700
@@ -1347,7 +1347,7 @@
             if e.errno != errno.ENOENT:
                 raise error.Abort(genericerror % (
                     self._path, encoding.strtolocal(e.strerror)))
-            elif pycompat.osname == 'nt':
+            elif pycompat.iswindows:
                 try:
                     self._gitexecutable = 'git.cmd'
                     out, err = self._gitnodir(['--version'])