comparison tests/hghave @ 5230:4fa0f2dff643

hghave: detect git availability
author Patrick Mezard <pmezard@gmail.com>
date Sun, 26 Aug 2007 15:35:57 +0200
parents e5b21a549cc5
children c0281c6b40b0
comparison
equal deleted inserted replaced
5229:149742a628fd 5230:4fa0f2dff643
49 import _lsprof 49 import _lsprof
50 return True 50 return True
51 except ImportError: 51 except ImportError:
52 return False 52 return False
53 53
54 def has_git():
55 fh = os.popen('git --version 2>&1')
56 s = fh.read()
57 ret = fh.close()
58 return ret is None and s.startswith('git version')
59
54 checks = { 60 checks = {
55 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), 61 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
56 "execbit": (has_executablebit, "executable bit"), 62 "execbit": (has_executablebit, "executable bit"),
63 "git": (has_git, "git command line client"),
57 "fifo": (has_fifo, "named pipes"), 64 "fifo": (has_fifo, "named pipes"),
58 "hotshot": (has_hotshot, "python hotshot module"), 65 "hotshot": (has_hotshot, "python hotshot module"),
59 "lsprof": (has_lsprof, "python lsprof module"), 66 "lsprof": (has_lsprof, "python lsprof module"),
60 "symlink": (has_symlink, "symbolic links"), 67 "symlink": (has_symlink, "symbolic links"),
61 } 68 }