util: add notindexed optional parameter to makedirs function
authorAngel Ezquerra <angel.ezquerra@gmail.com>
Sat, 16 Feb 2013 11:44:13 +0100
changeset 18938 e22107cff6bf
parent 18937 9a171baa9202
child 18939 aab0c14c20d0
util: add notindexed optional parameter to makedirs function
mercurial/util.py
--- a/mercurial/util.py	Sat Feb 16 01:11:20 2013 +0100
+++ b/mercurial/util.py	Sat Feb 16 11:44:13 2013 +0100
@@ -873,10 +873,10 @@
         if safehasattr(self, '_fp'): # constructor actually did something
             self.discard()
 
-def makedirs(name, mode=None):
+def makedirs(name, mode=None, notindexed=False):
     """recursive directory creation with parent mode inheritance"""
     try:
-        os.mkdir(name)
+        makedir(name, notindexed)
     except OSError, err:
         if err.errno == errno.EEXIST:
             return
@@ -885,8 +885,8 @@
         parent = os.path.dirname(os.path.abspath(name))
         if parent == name:
             raise
-        makedirs(parent, mode)
-        os.mkdir(name)
+        makedirs(parent, mode, notindexed)
+        makedir(name, notindexed)
     if mode is not None:
         os.chmod(name, mode)