tests/hghave
changeset 5250 d61e98a82cee
parent 5249 d82ebcdf20e1
child 5308 9400d677efc7
equal deleted inserted replaced
5249:d82ebcdf20e1 5250:d61e98a82cee
    67 
    67 
    68 def has_svn():
    68 def has_svn():
    69     return matchoutput('svn --version 2>&1', r'^svn, version') and \
    69     return matchoutput('svn --version 2>&1', r'^svn, version') and \
    70         matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
    70         matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
    71 
    71 
       
    72 def has_svn_bindings():
       
    73     try:
       
    74         import svn.core
       
    75         return True
       
    76     except ImportError:
       
    77         return False
       
    78 
    72 checks = {
    79 checks = {
    73     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
    80     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
    74     "execbit": (has_executablebit, "executable bit"),
    81     "execbit": (has_executablebit, "executable bit"),
    75     "git": (has_git, "git command line client"),
    82     "git": (has_git, "git command line client"),
    76     "fifo": (has_fifo, "named pipes"),
    83     "fifo": (has_fifo, "named pipes"),
    77     "hotshot": (has_hotshot, "python hotshot module"),
    84     "hotshot": (has_hotshot, "python hotshot module"),
    78     "lsprof": (has_lsprof, "python lsprof module"),
    85     "lsprof": (has_lsprof, "python lsprof module"),
    79     "svn": (has_svn, "subversion client and admin tools"),
    86     "svn": (has_svn, "subversion client and admin tools"),
       
    87     "svn-bindings": (has_svn_bindings, "subversion python bindings"),
    80     "symlink": (has_symlink, "symbolic links"),
    88     "symlink": (has_symlink, "symbolic links"),
    81 }
    89 }
    82 
    90 
    83 def list_features():
    91 def list_features():
    84     for name, feature in checks.iteritems():
    92     for name, feature in checks.iteritems():