@@ -54,7 +55,11 @@ for s in os.getenv('PATHEXT', '').split(os.pathsep)]
return os.path.exists(exe) and ext in path_ext
else:
- return osutils.find_executable_on_path(exe) is not None
+ if osutils.find_executable_on_path(exe) is not None:
+ return True
+ if win32utils.get_app_path(exe) != exe:
+ return True
+ return False
else:
return (os.access(exe, os.X_OK)
or osutils.find_executable_on_path(exe) is not None)
But the real tool invoker should convert program name to its fullpath on Windows, otherwise python will be unable to launch the program, unless you will pass "shell=True" to subprocess.Popen
I think the following change should make check_availability to return True:
=== modified file 'bzrlib/ mergetools. py' mergetools. py 2011-12-19 13:23:58 +0000 mergetools. py 2012-02-23 17:08:49 +0000
--- bzrlib/
+++ bzrlib/
@@ -30,6 +30,7 @@
cmdline,
osutils,
trace,
+ win32utils,
)
""")
@@ -54,7 +55,11 @@
for s in os.getenv( 'PATHEXT' , '').split( os.pathsep) ] find_executable _on_path( exe) is not None find_executable _on_path( exe) is not None: get_app_ path(exe) != exe: find_executable _on_path( exe) is not None)
return os.path.exists(exe) and ext in path_ext
else:
- return osutils.
+ if osutils.
+ return True
+ if win32utils.
+ return True
+ return False
else:
return (os.access(exe, os.X_OK)
or osutils.
But the real tool invoker should convert program name to its fullpath on Windows, otherwise python will be unable to launch the program, unless you will pass "shell=True" to subprocess.Popen