changeset 3996 | c190df14338c |
parent 3995 | a4e79f86d304 |
child 3997 | 3f0ba82c103f |
--- a/mercurial/util.py Fri Dec 29 20:04:30 2006 -0600 +++ b/mercurial/util.py Fri Dec 29 20:04:30 2006 -0600 @@ -707,6 +707,12 @@ os.unlink(fn) return r +def execfunc(path, fallback): + '''return an is_exec() function with default to fallback''' + if checkexec(path): + return lambda x: is_exec(os.path.join(path, x), False) + return fallback + # Platform specific variants if os.name == 'nt': import msvcrt