[PATCH 3 of 9] scmutil: reorder newly added functions for vfs support in dictionary order
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Mon Oct 8 12:06:13 CDT 2012
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1349714515 -32400
# Node ID 78af21a7663ffa9828bc52c6a6bd1ff516eaa4f8
# Parent fa1096df9fbe91d4dc526d2da4a9b5354a5cc4ec
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
diff -r fa1096df9fbe -r 78af21a7663f mercurial/scmutil.py
--- 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
More information about the Mercurial-devel
mailing list