# HG changeset patch # User Hao Lian # Date 1319557528 14400 # Node ID f26ed4ea46d8beb03ae521cab2cd1f9bcd44fa38 # Parent 8af6c6d91c9229035ca128beeccc36852b3f0fc4 largefiles: remove lfutil.createdir, replace calls with util.makedirs diff -r 8af6c6d91c92 -r f26ed4ea46d8 hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py Wed Oct 26 14:22:19 2011 -0500 +++ b/hgext/largefiles/lfcommands.py Tue Oct 25 11:45:28 2011 -0400 @@ -245,7 +245,7 @@ # largefile was modified, update standins fullpath = rdst.wjoin(f) - lfutil.createdir(os.path.dirname(fullpath)) + util.makedirs(os.path.dirname(fullpath)) m = util.sha1('') m.update(ctx[f].data()) hash = m.hexdigest() diff -r 8af6c6d91c92 -r f26ed4ea46d8 hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py Wed Oct 26 14:22:19 2011 -0500 +++ b/hgext/largefiles/lfutil.py Tue Oct 25 11:45:28 2011 -0400 @@ -196,10 +196,6 @@ def instore(repo, hash): return os.path.exists(storepath(repo, hash)) -def createdir(dir): - if not os.path.exists(dir): - os.makedirs(dir) - def storepath(repo, hash): return repo.join(os.path.join(longname, hash)) @@ -223,7 +219,7 @@ copytostoreabsolute(repo, repo.wjoin(file), hash) def copytostoreabsolute(repo, file, hash): - createdir(os.path.dirname(storepath(repo, hash))) + util.makedirs(os.path.dirname(storepath(repo, hash))) if inusercache(repo.ui, hash): link(usercachepath(repo.ui, hash), storepath(repo, hash)) else: @@ -232,7 +228,7 @@ linktousercache(repo, hash) def linktousercache(repo, hash): - createdir(os.path.dirname(usercachepath(repo.ui, hash))) + util.makedirs(os.path.dirname(usercachepath(repo.ui, hash))) link(storepath(repo, hash), usercachepath(repo.ui, hash)) def getstandinmatcher(repo, pats=[], opts={}): diff -r 8af6c6d91c92 -r f26ed4ea46d8 hgext/largefiles/localstore.py --- a/hgext/largefiles/localstore.py Wed Oct 26 14:22:19 2011 -0500 +++ b/hgext/largefiles/localstore.py Tue Oct 25 11:45:28 2011 -0400 @@ -27,7 +27,7 @@ self.remote = remote def put(self, source, hash): - lfutil.createdir(os.path.dirname(lfutil.storepath(self.remote, hash))) + util.makedirs(os.path.dirname(lfutil.storepath(self.remote, hash))) if lfutil.instore(self.remote, hash): return lfutil.link(lfutil.storepath(self.repo, hash),