# HG changeset patch # User Patrick Mezard # Date 2007-08-26 13:35:57 # Node ID 4fa0f2dff64384077c143b78809333fe208fb888 # Parent 149742a628fd6011c83052cdfae014ab73602430 hghave: detect git availability diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -51,9 +51,16 @@ def has_lsprof(): 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"),