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

login
register
mail settings
Submitter Angel Ezquerra
Date Feb. 16, 2013, 12:27 p.m.
Message ID <2c631f46e2fe2014c402.1361017647@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/1017/
State Superseded, archived
Headers show

Comments

Angel Ezquerra - Feb. 16, 2013, 12:27 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1361011453 -3600
# Node ID 2c631f46e2fe2014c4021249e61b471a5d92b7e4
# Parent  108c3058f48613aaaeb9c090c7e98d3c0ec15f1c
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)