mercurial/util.py
changeset 4017 ea6174c96ae1
parent 4002 d7b9ec589546
child 4059 431f3c1d3a37
equal deleted inserted replaced
4016:a195f11ed1a2 4017:ea6174c96ae1
   720     name = tempfile.mktemp(dir=path)
   720     name = tempfile.mktemp(dir=path)
   721     try:
   721     try:
   722         os.symlink(".", name)
   722         os.symlink(".", name)
   723         os.unlink(name)
   723         os.unlink(name)
   724         return True
   724         return True
   725     except OSError:
   725     except (OSError, AttributeError):
   726         return False
   726         return False
   727 
   727 
   728 def linkfunc(path, fallback):
   728 def linkfunc(path, fallback):
   729     '''return an is_link() function with default to fallback'''
   729     '''return an is_link() function with default to fallback'''
   730     if checklink(path):
   730     if checklink(path):