comparison 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
comparison
equal deleted inserted replaced
34644:c0a6c19690ff 34645:75979c8d4572
1345 genericerror = _("error executing git for subrepo '%s': %s") 1345 genericerror = _("error executing git for subrepo '%s': %s")
1346 notfoundhint = _("check git is installed and in your PATH") 1346 notfoundhint = _("check git is installed and in your PATH")
1347 if e.errno != errno.ENOENT: 1347 if e.errno != errno.ENOENT:
1348 raise error.Abort(genericerror % ( 1348 raise error.Abort(genericerror % (
1349 self._path, encoding.strtolocal(e.strerror))) 1349 self._path, encoding.strtolocal(e.strerror)))
1350 elif pycompat.osname == 'nt': 1350 elif pycompat.iswindows:
1351 try: 1351 try:
1352 self._gitexecutable = 'git.cmd' 1352 self._gitexecutable = 'git.cmd'
1353 out, err = self._gitnodir(['--version']) 1353 out, err = self._gitnodir(['--version'])
1354 except OSError as e2: 1354 except OSError as e2:
1355 if e2.errno == errno.ENOENT: 1355 if e2.errno == errno.ENOENT: