equal
deleted
inserted
replaced
133 except (IOError, OSError): |
133 except (IOError, OSError): |
134 # we don't care, the user probably won't be able to commit anyway |
134 # we don't care, the user probably won't be able to commit anyway |
135 return False |
135 return False |
136 return not (new_file_has_exec or exec_flags_cannot_flip) |
136 return not (new_file_has_exec or exec_flags_cannot_flip) |
137 |
137 |
|
138 def checklink(path): |
|
139 """check whether the given path is on a symlink-capable filesystem""" |
|
140 # mktemp is not racy because symlink creation will fail if the |
|
141 # file already exists |
|
142 name = tempfile.mktemp(dir=path, prefix='hg-checklink-') |
|
143 try: |
|
144 os.symlink(".", name) |
|
145 os.unlink(name) |
|
146 return True |
|
147 except (OSError, AttributeError): |
|
148 return False |
|
149 |
138 def set_binary(fd): |
150 def set_binary(fd): |
139 pass |
151 pass |
140 |
152 |
141 def pconvert(path): |
153 def pconvert(path): |
142 return path |
154 return path |