Mercurial > public > mercurial-scm > hg
comparison mercurial/vfs.py @ 32208:d74b0cff94a9
osutil: proxy through util (and platform) modules (API)
See the previous commit for why. Marked as API change since osutil.listdir()
seems widely used in third-party extensions.
The win32mbcs extension is updated to wrap both util. and windows. aliases.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 26 Apr 2017 22:26:28 +0900 |
parents | f80d9ddc40f3 |
children | 1a79de471d56 |
comparison
equal
deleted
inserted
replaced
32203:0c73634d0570 | 32208:d74b0cff94a9 |
---|---|
15 import threading | 15 import threading |
16 | 16 |
17 from .i18n import _ | 17 from .i18n import _ |
18 from . import ( | 18 from . import ( |
19 error, | 19 error, |
20 osutil, | |
21 pathutil, | 20 pathutil, |
22 pycompat, | 21 pycompat, |
23 util, | 22 util, |
24 ) | 23 ) |
25 | 24 |
161 return fd, os.path.join(dir, fname) | 160 return fd, os.path.join(dir, fname) |
162 else: | 161 else: |
163 return fd, fname | 162 return fd, fname |
164 | 163 |
165 def readdir(self, path=None, stat=None, skip=None): | 164 def readdir(self, path=None, stat=None, skip=None): |
166 return osutil.listdir(self.join(path), stat, skip) | 165 return util.listdir(self.join(path), stat, skip) |
167 | 166 |
168 def readlock(self, path): | 167 def readlock(self, path): |
169 return util.readlock(self.join(path)) | 168 return util.readlock(self.join(path)) |
170 | 169 |
171 def rename(self, src, dst, checkambig=False): | 170 def rename(self, src, dst, checkambig=False): |