mercurial/windows.py
changeset 51716 e618a1756b08
parent 51712 f3b34386d3e0
child 51795 1888846a1ee2
equal deleted inserted replaced
51715:7558cee89655 51716:e618a1756b08
   618 
   618 
   619     If gid is None, return the name of the current group."""
   619     If gid is None, return the name of the current group."""
   620     return None
   620     return None
   621 
   621 
   622 
   622 
   623 def readlink(pathname: bytes) -> bytes:
   623 def readlink(path: bytes) -> bytes:
   624     path = pycompat.fsdecode(pathname)
   624     path_str = pycompat.fsdecode(path)
   625     try:
   625     try:
   626         link = os.readlink(path)
   626         link = os.readlink(path_str)
   627     except ValueError as e:
   627     except ValueError as e:
   628         # On py2, os.readlink() raises an AttributeError since it is
   628         # On py2, os.readlink() raises an AttributeError since it is
   629         # unsupported.  On py3, reading a non-link raises a ValueError.  Simply
   629         # unsupported.  On py3, reading a non-link raises a ValueError.  Simply
   630         # treat this as the error the locking code has been expecting up to now
   630         # treat this as the error the locking code has been expecting up to now
   631         # until an effort can be made to enable symlink support on Windows.
   631         # until an effort can be made to enable symlink support on Windows.