# HG changeset patch # User Angel Ezquerra # Date 2013-02-16 10:44:13 # Node ID e22107cff6bfcf759426d76b8cab2b591ce4f409 # Parent 9a171baa9202fed5169884713f4e03e676af092f 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 @@ -873,10 +873,10 @@ class atomictempfile(object): 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 @@ def makedirs(name, mode=None): 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)