comparison tests/hghave @ 6996:fecf060f32a1

inotify: deactivate inotify status on failure workaround issue1208, add test fix traceback handling (socket.error is a singleton in this case)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 06 Sep 2008 12:49:20 +0200
parents 59f7b804352f
children ddfcefab8b97
comparison
equal deleted inserted replaced
6995:25619b72f86a 6996:fecf060f32a1
54 s = os.lstat(path).st_mode 54 s = os.lstat(path).st_mode
55 os.chmod(path, s | 0100) 55 os.chmod(path, s | 0100)
56 return (os.lstat(path).st_mode & 0100 != 0) 56 return (os.lstat(path).st_mode & 0100 != 0)
57 finally: 57 finally:
58 os.remove(path) 58 os.remove(path)
59
60 def has_inotify():
61 try:
62 import hgext.inotify.linux.watcher
63 return True
64 except ImportError:
65 return False
59 66
60 def has_fifo(): 67 def has_fifo():
61 return hasattr(os, "mkfifo") 68 return hasattr(os, "mkfifo")
62 69
63 def has_hotshot(): 70 def has_hotshot():
127 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), 134 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
128 "execbit": (has_executablebit, "executable bit"), 135 "execbit": (has_executablebit, "executable bit"),
129 "fifo": (has_fifo, "named pipes"), 136 "fifo": (has_fifo, "named pipes"),
130 "git": (has_git, "git command line client"), 137 "git": (has_git, "git command line client"),
131 "hotshot": (has_hotshot, "python hotshot module"), 138 "hotshot": (has_hotshot, "python hotshot module"),
139 "inotify": (has_inotify, "inotify extension support"),
132 "lsprof": (has_lsprof, "python lsprof module"), 140 "lsprof": (has_lsprof, "python lsprof module"),
133 "mtn": (has_mtn, "monotone client (> 0.31)"), 141 "mtn": (has_mtn, "monotone client (> 0.31)"),
142 "pygments": (has_pygments, "Pygments source highlighting library"),
134 "svn": (has_svn, "subversion client and admin tools"), 143 "svn": (has_svn, "subversion client and admin tools"),
135 "svn-bindings": (has_svn_bindings, "subversion python bindings"), 144 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
136 "symlink": (has_symlink, "symbolic links"), 145 "symlink": (has_symlink, "symbolic links"),
137 "tla": (has_tla, "GNU Arch tla client"), 146 "tla": (has_tla, "GNU Arch tla client"),
138 "unix-permissions": (has_unix_permissions, "unix-style permissions"), 147 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
139 "pygments": (has_pygments, "Pygments source highlighting library"),
140 } 148 }
141 149
142 def list_features(): 150 def list_features():
143 for name, feature in checks.iteritems(): 151 for name, feature in checks.iteritems():
144 desc = feature[1] 152 desc = feature[1]