[PATCH 3 of 6 V2] util: add notindexed optional parameter to makedirs function

Angel Ezquerra angel.ezquerra at gmail.com
Fri Mar 8 18:12:36 CST 2013


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1361011453 -3600
#      Sat Feb 16 11:44:13 2013 +0100
# Node ID 68ebd12161c9fb787c378630307840ec95a16cf1
# Parent  2571bfc8b921dcf449cfc755ee4f4c82f681edf6
util: add notindexed optional parameter to makedirs function

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -863,10 +863,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
@@ -875,8 +875,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)
 


More information about the Mercurial-devel mailing list