mercurial/util.py
changeset 3996 c190df14338c
parent 3995 a4e79f86d304
child 3997 3f0ba82c103f
equal deleted inserted replaced
3995:a4e79f86d304 3996:c190df14338c
   705     os.chmod(fn, m ^ 0111)
   705     os.chmod(fn, m ^ 0111)
   706     r = (os.stat(fn).st_mode != m)
   706     r = (os.stat(fn).st_mode != m)
   707     os.unlink(fn)
   707     os.unlink(fn)
   708     return r
   708     return r
   709 
   709 
       
   710 def execfunc(path, fallback):
       
   711     '''return an is_exec() function with default to fallback'''
       
   712     if checkexec(path):
       
   713         return lambda x: is_exec(os.path.join(path, x), False)
       
   714     return fallback
       
   715 
   710 # Platform specific variants
   716 # Platform specific variants
   711 if os.name == 'nt':
   717 if os.name == 'nt':
   712     import msvcrt
   718     import msvcrt
   713     nulldev = 'NUL:'
   719     nulldev = 'NUL:'
   714 
   720