tests/hghave
changeset 5157 105d4cf7ec24
parent 5144 6e040f6c2c9c
child 5162 9b0efeb725f4
equal deleted inserted replaced
5156:0bbd86b847dd 5157:105d4cf7ec24
    33         os.remove(path)
    33         os.remove(path)
    34         return True
    34         return True
    35     except:
    35     except:
    36         return False
    36         return False
    37 
    37 
       
    38 def has_lsprof():
       
    39     try:
       
    40         import _lsprof
       
    41         return True
       
    42     except ImportError:
       
    43         return False
       
    44 
    38 checks = {
    45 checks = {
       
    46     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
       
    47     "execbit": (has_executablebit, "executable bit"),
       
    48     "fifo": (has_fifo, "named pipes"),
       
    49     "lsprof": (has_lsprof, "python lsprof module"),
    39     "symlink": (has_symlink, "symbolic links"),
    50     "symlink": (has_symlink, "symbolic links"),
    40     "fifo": (has_fifo, "named pipes"),
       
    41     "execbit": (has_executablebit, "executable bit"),
       
    42     "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
       
    43 }
    51 }
    44 
    52 
    45 def list_features():
    53 def list_features():
    46     for name, feature in checks.iteritems():
    54     for name, feature in checks.iteritems():
    47         desc = feature[1]
    55         desc = feature[1]