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

login
register
mail settings
Submitter Angel Ezquerra
Date March 9, 2013, 12:12 a.m.
Message ID <68ebd12161c9fb787c37.1362787956@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/1089/
State Accepted
Commit e22107cff6bfcf759426d76b8cab2b591ce4f409
Headers show

Comments

Angel Ezquerra - March 9, 2013, 12:12 a.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@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

Patch

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)