Show More
@@ -39,6 +39,7 b' def getminsize(ui, assumelfiles, opt, de' | |||
|
39 | 39 | return lfsize |
|
40 | 40 | |
|
41 | 41 | def link(src, dest): |
|
42 | util.makedirs(os.path.dirname(dest)) | |
|
42 | 43 | try: |
|
43 | 44 | util.oslink(src, dest) |
|
44 | 45 | except OSError: |
@@ -86,7 +87,6 b' def findfile(repo, hash):' | |||
|
86 | 87 | elif inusercache(repo.ui, hash): |
|
87 | 88 | repo.ui.note(_('found %s in system cache\n') % hash) |
|
88 | 89 | path = storepath(repo, hash) |
|
89 | util.makedirs(os.path.dirname(path)) | |
|
90 | 90 | link(usercachepath(repo.ui, hash), path) |
|
91 | 91 | return path |
|
92 | 92 | return None |
@@ -203,10 +203,10 b' def copyalltostore(repo, node):' | |||
|
203 | 203 | |
|
204 | 204 | |
|
205 | 205 | def copytostoreabsolute(repo, file, hash): |
|
206 | util.makedirs(os.path.dirname(storepath(repo, hash))) | |
|
207 | 206 | if inusercache(repo.ui, hash): |
|
208 | 207 | link(usercachepath(repo.ui, hash), storepath(repo, hash)) |
|
209 | 208 | elif not getattr(repo, "_isconverting", False): |
|
209 | util.makedirs(os.path.dirname(storepath(repo, hash))) | |
|
210 | 210 | dst = util.atomictempfile(storepath(repo, hash), |
|
211 | 211 | createmode=repo.store.createmode) |
|
212 | 212 | for chunk in util.filechunkiter(open(file, 'rb')): |
@@ -217,7 +217,6 b' def copytostoreabsolute(repo, file, hash' | |||
|
217 | 217 | def linktousercache(repo, hash): |
|
218 | 218 | path = usercachepath(repo.ui, hash) |
|
219 | 219 | if path: |
|
220 | util.makedirs(os.path.dirname(path)) | |
|
221 | 220 | link(storepath(repo, hash), path) |
|
222 | 221 | |
|
223 | 222 | def getstandinmatcher(repo, pats=[], opts={}): |
@@ -8,9 +8,6 b'' | |||
|
8 | 8 | |
|
9 | 9 | '''store class for local filesystem''' |
|
10 | 10 | |
|
11 | import os | |
|
12 | ||
|
13 | from mercurial import util | |
|
14 | 11 | from mercurial.i18n import _ |
|
15 | 12 | |
|
16 | 13 | import lfutil |
@@ -26,7 +23,6 b' class localstore(basestore.basestore):' | |||
|
26 | 23 | super(localstore, self).__init__(ui, repo, self.remote.url()) |
|
27 | 24 | |
|
28 | 25 | def put(self, source, hash): |
|
29 | util.makedirs(os.path.dirname(lfutil.storepath(self.remote, hash))) | |
|
30 | 26 | if lfutil.instore(self.remote, hash): |
|
31 | 27 | return |
|
32 | 28 | lfutil.link(lfutil.storepath(self.repo, hash), |
General Comments 0
You need to be logged in to leave comments.
Login now