Mercurial > hg-stable
changeset 17723:ab23768746fd
scmutil: reorder newly added functions for vfs support in dictionary order
Definition functions for vfs support in dictionary order increases
readability/maintainability, because there are functions which invoke
file API:
- with same name: "os.listdir" and "osutil.listdir", for example
- with ambiguous names: "os.mkdir" and "util.makedirs", for example
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 09 Oct 2012 01:41:55 +0900 |
parents | 3b976051034d |
children | bf4b72d8dd4d |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Oct 09 01:41:55 2012 +0900 +++ b/mercurial/scmutil.py Tue Oct 09 01:41:55 2012 +0900 @@ -204,9 +204,6 @@ finally: fp.close() - def mkdir(self, path=None): - return os.mkdir(self.join(path)) - def exists(self, path=None): return os.path.exists(self.join(path)) @@ -219,6 +216,9 @@ def makedirs(self, path=None, mode=None): return util.makedirs(self.join(path), mode) + def mkdir(self, path=None): + return os.mkdir(self.join(path)) + class vfs(abstractvfs): '''Operate files relative to a base directory