Show More
@@ -223,20 +223,30 b' def openlfdirstate(ui, repo, create=True' | |||||
223 | # it. This ensures that we create it on the first meaningful |
|
223 | # it. This ensures that we create it on the first meaningful | |
224 | # largefiles operation in a new clone. |
|
224 | # largefiles operation in a new clone. | |
225 | if create and not vfs.exists(vfs.join(lfstoredir, b'dirstate')): |
|
225 | if create and not vfs.exists(vfs.join(lfstoredir, b'dirstate')): | |
226 | matcher = getstandinmatcher(repo) |
|
226 | try: | |
227 | standins = repo.dirstate.walk( |
|
227 | with repo.wlock(wait=False): | |
228 | matcher, subrepos=[], unknown=False, ignored=False |
|
228 | matcher = getstandinmatcher(repo) | |
229 | ) |
|
229 | standins = repo.dirstate.walk( | |
|
230 | matcher, subrepos=[], unknown=False, ignored=False | |||
|
231 | ) | |||
|
232 | ||||
|
233 | if len(standins) > 0: | |||
|
234 | vfs.makedirs(lfstoredir) | |||
230 |
|
235 | |||
231 | if len(standins) > 0: |
|
236 | with lfdirstate.changing_parents(repo): | |
232 | vfs.makedirs(lfstoredir) |
|
237 | for standin in standins: | |
233 |
|
238 | lfile = splitstandin(standin) | ||
234 | with lfdirstate.changing_parents(repo): |
|
239 | lfdirstate.update_file( | |
235 | for standin in standins: |
|
240 | lfile, | |
236 | lfile = splitstandin(standin) |
|
241 | p1_tracked=True, | |
237 | lfdirstate.update_file( |
|
242 | wc_tracked=True, | |
238 |
|
|
243 | possibly_dirty=True, | |
239 | ) |
|
244 | ) | |
|
245 | except error.LockError: | |||
|
246 | # Assume that whatever was holding the lock was important. | |||
|
247 | # If we were doing something important, we would already have | |||
|
248 | # either the lock or a largefile dirstate. | |||
|
249 | pass | |||
240 | return lfdirstate |
|
250 | return lfdirstate | |
241 |
|
251 | |||
242 |
|
252 |
General Comments 0
You need to be logged in to leave comments.
Login now