Show More
@@ -223,20 +223,30 b' def openlfdirstate(ui, repo, create=True' | |||
|
223 | 223 | # it. This ensures that we create it on the first meaningful |
|
224 | 224 | # largefiles operation in a new clone. |
|
225 | 225 | if create and not vfs.exists(vfs.join(lfstoredir, b'dirstate')): |
|
226 | matcher = getstandinmatcher(repo) | |
|
227 | standins = repo.dirstate.walk( | |
|
228 | matcher, subrepos=[], unknown=False, ignored=False | |
|
229 | ) | |
|
226 | try: | |
|
227 | with repo.wlock(wait=False): | |
|
228 | matcher = getstandinmatcher(repo) | |
|
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: | |
|
232 | vfs.makedirs(lfstoredir) | |
|
233 | ||
|
234 | with lfdirstate.changing_parents(repo): | |
|
235 | for standin in standins: | |
|
236 | lfile = splitstandin(standin) | |
|
237 | lfdirstate.update_file( | |
|
238 |
|
|
|
239 | ) | |
|
236 | with lfdirstate.changing_parents(repo): | |
|
237 | for standin in standins: | |
|
238 | lfile = splitstandin(standin) | |
|
239 | lfdirstate.update_file( | |
|
240 | lfile, | |
|
241 | p1_tracked=True, | |
|
242 | wc_tracked=True, | |
|
243 | possibly_dirty=True, | |
|
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 | 250 | return lfdirstate |
|
241 | 251 | |
|
242 | 252 |
General Comments 0
You need to be logged in to leave comments.
Login now