equal
deleted
inserted
replaced
691 return False |
691 return False |
692 return True |
692 return True |
693 except: |
693 except: |
694 return True |
694 return True |
695 |
695 |
|
696 def checkexec(path): |
|
697 """ |
|
698 Check whether the given path is on a filesystem with UNIX-like exec flags |
|
699 |
|
700 Requires a directory (like /foo/.hg) |
|
701 """ |
|
702 fh, fn = tempfile.mkstemp("", "", path) |
|
703 os.close(fh) |
|
704 m = os.stat(fn).st_mode |
|
705 os.chmod(fn, m ^ 0111) |
|
706 r = (os.stat(fn).st_mode != m) |
|
707 os.unlink(fn) |
|
708 return r |
|
709 |
696 # Platform specific variants |
710 # Platform specific variants |
697 if os.name == 'nt': |
711 if os.name == 'nt': |
698 import msvcrt |
712 import msvcrt |
699 nulldev = 'NUL:' |
713 nulldev = 'NUL:' |
700 |
714 |