tests/hghave
branchstable
changeset 1072 bbf056e756cc
parent 1071 f0ce3dcd5c87
child 1089 f26e9129f65b
equal deleted inserted replaced
1071:f0ce3dcd5c87 1072:bbf056e756cc
    58     try:
    58     try:
    59         fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
    59         fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
    60         os.close(fd)
    60         os.close(fd)
    61         os.remove(path)
    61         os.remove(path)
    62         return True
    62         return True
    63     except:
    63     except (IOError, OSError):
    64         return False
    64         return False
    65 
    65 
    66 def has_executablebit():
    66 def has_executablebit():
    67     try:
    67     try:
    68         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
    68         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
    91         if path == p2:
    91         if path == p2:
    92             p2 = os.path.join(d, b.lower())
    92             p2 = os.path.join(d, b.lower())
    93         try:
    93         try:
    94             s2 = os.stat(p2)
    94             s2 = os.stat(p2)
    95             return s2 == s1
    95             return s2 == s1
    96         except:
    96         except OSError:
    97             return False
    97             return False
    98     finally:
    98     finally:
    99         os.remove(path)
    99         os.remove(path)
   100 
   100 
   101 def has_inotify():
   101 def has_inotify():