Skip to content
Snippets Groups Projects
Commit f26ed4ea authored by Hao Lian's avatar Hao Lian
Browse files

largefiles: remove lfutil.createdir, replace calls with util.makedirs

parent 8af6c6d9
Branches
Tags
No related merge requests found
......@@ -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()
......
......@@ -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={}):
......
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment