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 |
59 |
|
60 def has_icasefs(): |
|
61 # Stolen from mercurial.util |
|
62 fd, path = tempfile.mkstemp(prefix=tempprefix) |
|
63 os.close(fd) |
|
64 try: |
|
65 s1 = os.stat(path) |
|
66 d, b = os.path.split(path) |
|
67 p2 = os.path.join(d, b.upper()) |
|
68 if path == p2: |
|
69 p2 = os.path.join(d, b.lower()) |
|
70 try: |
|
71 s2 = os.stat(p2) |
|
72 return s2 == s1 |
|
73 except: |
|
74 return False |
|
75 finally: |
|
76 os.remove(path) |
|
77 |
60 def has_fifo(): |
78 def has_fifo(): |
61 return hasattr(os, "mkfifo") |
79 return hasattr(os, "mkfifo") |
62 |
80 |
63 def has_hotshot(): |
81 def has_hotshot(): |
64 try: |
82 try: |
127 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), |
145 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), |
128 "execbit": (has_executablebit, "executable bit"), |
146 "execbit": (has_executablebit, "executable bit"), |
129 "fifo": (has_fifo, "named pipes"), |
147 "fifo": (has_fifo, "named pipes"), |
130 "git": (has_git, "git command line client"), |
148 "git": (has_git, "git command line client"), |
131 "hotshot": (has_hotshot, "python hotshot module"), |
149 "hotshot": (has_hotshot, "python hotshot module"), |
|
150 "icasefs": (has_icasefs, "case insensitive file system"), |
132 "lsprof": (has_lsprof, "python lsprof module"), |
151 "lsprof": (has_lsprof, "python lsprof module"), |
133 "mtn": (has_mtn, "monotone client (> 0.31)"), |
152 "mtn": (has_mtn, "monotone client (> 0.31)"), |
134 "svn": (has_svn, "subversion client and admin tools"), |
153 "svn": (has_svn, "subversion client and admin tools"), |
135 "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
154 "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
136 "symlink": (has_symlink, "symbolic links"), |
155 "symlink": (has_symlink, "symbolic links"), |