diff mercurial/util.py @ 39904:5fe0b880200e

py3: convert os.readlink() path to native strings on Windows Windows insisted that it needs to be str. I skipped the stuff in the posix module, and left `tests/f` and `run-tests.py` alone for now.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 25 Sep 2018 21:16:12 -0400
parents b63dee7bd0d9
children 4017968f0a1d
line wrap: on
line diff
--- a/mercurial/util.py	Sat Sep 29 02:02:35 2018 -0400
+++ b/mercurial/util.py	Tue Sep 25 21:16:12 2018 -0400
@@ -112,6 +112,7 @@
 pconvert = platform.pconvert
 poll = platform.poll
 posixfile = platform.posixfile
+readlink = platform.readlink
 rename = platform.rename
 removedirs = platform.removedirs
 samedevice = platform.samedevice
@@ -1841,7 +1842,7 @@
 
 def readlock(pathname):
     try:
-        return os.readlink(pathname)
+        return readlink(pathname)
     except OSError as why:
         if why.errno not in (errno.EINVAL, errno.ENOSYS):
             raise