comparison mercurial/util.py @ 4002:d7b9ec589546

symlinks: use is_link wherever is_exec is used
author Matt Mackall <mpm@selenic.com>
date Fri, 29 Dec 2006 20:04:31 -0600
parents 3297aa945cf2
children ea6174c96ae1
comparison
equal deleted inserted replaced
4001:dda03b2d9ef1 4002:d7b9ec589546
711 '''return an is_exec() function with default to fallback''' 711 '''return an is_exec() function with default to fallback'''
712 if checkexec(path): 712 if checkexec(path):
713 return lambda x: is_exec(os.path.join(path, x)) 713 return lambda x: is_exec(os.path.join(path, x))
714 return fallback 714 return fallback
715 715
716 def checksymlink(path): 716 def checklink(path):
717 """check whether the given path is on a symlink-capable filesystem""" 717 """check whether the given path is on a symlink-capable filesystem"""
718 # mktemp is not racy because symlink creation will fail if the 718 # mktemp is not racy because symlink creation will fail if the
719 # file already exists 719 # file already exists
720 name = tempfile.mktemp(dir=path) 720 name = tempfile.mktemp(dir=path)
721 try: 721 try: