Mercurial > hg
comparison hgext/convert/gnuarch.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 | 28626957395a |
children | 058c2468b2f5 |
comparison
equal
deleted
inserted
replaced
39903:803b7569c9ea | 39904:5fe0b880200e |
---|---|
221 self._parsechangeset(changeset, rev) | 221 self._parsechangeset(changeset, rev) |
222 | 222 |
223 def _getfile(self, name, rev): | 223 def _getfile(self, name, rev): |
224 mode = os.lstat(os.path.join(self.tmppath, name)).st_mode | 224 mode = os.lstat(os.path.join(self.tmppath, name)).st_mode |
225 if stat.S_ISLNK(mode): | 225 if stat.S_ISLNK(mode): |
226 data = os.readlink(os.path.join(self.tmppath, name)) | 226 data = util.readlink(os.path.join(self.tmppath, name)) |
227 if mode: | 227 if mode: |
228 mode = 'l' | 228 mode = 'l' |
229 else: | 229 else: |
230 mode = '' | 230 mode = '' |
231 else: | 231 else: |