##// END OF EJS Templates
setup: avoid attempting to invoke the system-wide hg.exe on Windows...
Matt Harbison -
r41016:f6987f65 default
parent child Browse files
Show More
@@ -294,14 +294,17 b' def findhg():'
294 hgenv['LANGUAGE'] = 'C'
294 hgenv['LANGUAGE'] = 'C'
295 hgcmd = ['hg']
295 hgcmd = ['hg']
296 # Run a simple "hg log" command just to see if using hg from the user's
296 # Run a simple "hg log" command just to see if using hg from the user's
297 # path works and can successfully interact with this repository.
297 # path works and can successfully interact with this repository. Windows
298 # gives precedence to hg.exe in the current directory, so fall back to the
299 # python invocation of local hg, where pythonXY.dll can always be found.
298 check_cmd = ['log', '-r.', '-Ttest']
300 check_cmd = ['log', '-r.', '-Ttest']
299 try:
301 if os.name != 'nt':
300 retcode, out, err = runcmd(hgcmd + check_cmd, hgenv)
302 try:
301 except EnvironmentError:
303 retcode, out, err = runcmd(hgcmd + check_cmd, hgenv)
302 retcode = -1
304 except EnvironmentError:
303 if retcode == 0 and not filterhgerr(err):
305 retcode = -1
304 return hgcommand(hgcmd, hgenv)
306 if retcode == 0 and not filterhgerr(err):
307 return hgcommand(hgcmd, hgenv)
305
308
306 # Fall back to trying the local hg installation.
309 # Fall back to trying the local hg installation.
307 hgenv = localhgenv()
310 hgenv = localhgenv()
General Comments 0
You need to be logged in to leave comments. Login now