diff -r 0b740dcf0cf1 -r 3297aa945cf2 mercurial/util.py --- a/mercurial/util.py Fri Dec 29 20:04:31 2006 -0600 +++ b/mercurial/util.py Fri Dec 29 20:04:31 2006 -0600 @@ -725,6 +725,12 @@ except OSError: return False +def linkfunc(path, fallback): + '''return an is_link() function with default to fallback''' + if checklink(path): + return lambda x: is_link(os.path.join(path, x)) + return fallback + # Platform specific variants if os.name == 'nt': import msvcrt