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
--- 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