# HG changeset patch # User Patrick Mezard # Date 1188135357 -7200 # Node ID 4fa0f2dff64384077c143b78809333fe208fb888 # Parent 149742a628fd6011c83052cdfae014ab73602430 hghave: detect git availability diff -r 149742a628fd -r 4fa0f2dff643 tests/hghave --- a/tests/hghave Sun Aug 26 14:51:27 2007 +0200 +++ b/tests/hghave Sun Aug 26 15:35:57 2007 +0200 @@ -51,9 +51,16 @@ except ImportError: return False +def has_git(): + fh = os.popen('git --version 2>&1') + s = fh.read() + ret = fh.close() + return ret is None and s.startswith('git version') + checks = { "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), "execbit": (has_executablebit, "executable bit"), + "git": (has_git, "git command line client"), "fifo": (has_fifo, "named pipes"), "hotshot": (has_hotshot, "python hotshot module"), "lsprof": (has_lsprof, "python lsprof module"),