##// END OF EJS Templates
largefiles: use more reasonable locking for update
Mads Kiilerich -
r21089:278bd08a default
parent child Browse files
Show More
@@ -297,15 +297,15 b' def overridedebugstate(orig, ui, repo, *'
297 # will get the new files. Filemerge is also overridden so that the merge
297 # will get the new files. Filemerge is also overridden so that the merge
298 # will merge standins correctly.
298 # will merge standins correctly.
299 def overrideupdate(orig, ui, repo, *pats, **opts):
299 def overrideupdate(orig, ui, repo, *pats, **opts):
300 lfdirstate = lfutil.openlfdirstate(ui, repo)
301 s = lfdirstate.status(match_.always(repo.root, repo.getcwd()), [], False,
302 False, False)
303 (unsure, modified, added, removed, missing, unknown, ignored, clean) = s
304
305 # Need to lock between the standins getting updated and their
300 # Need to lock between the standins getting updated and their
306 # largefiles getting updated
301 # largefiles getting updated
307 wlock = repo.wlock()
302 wlock = repo.wlock()
308 try:
303 try:
304 lfdirstate = lfutil.openlfdirstate(ui, repo)
305 s = lfdirstate.status(match_.always(repo.root, repo.getcwd()),
306 [], False, False, False)
307 (unsure, modified, added, removed, missing, unknown, ignored, clean) = s
308
309 if opts['check']:
309 if opts['check']:
310 mod = len(modified) > 0
310 mod = len(modified) > 0
311 for lfile in unsure:
311 for lfile in unsure:
@@ -322,9 +322,9 b' def overrideupdate(orig, ui, repo, *pats'
322 if not opts['clean']:
322 if not opts['clean']:
323 for lfile in unsure + modified + added:
323 for lfile in unsure + modified + added:
324 lfutil.updatestandin(repo, lfutil.standin(lfile))
324 lfutil.updatestandin(repo, lfutil.standin(lfile))
325 return orig(ui, repo, *pats, **opts)
325 finally:
326 finally:
326 wlock.release()
327 wlock.release()
327 return orig(ui, repo, *pats, **opts)
328
328
329 # Before starting the manifest merge, merge.updates will call
329 # Before starting the manifest merge, merge.updates will call
330 # _checkunknown to check if there are any files in the merged-in
330 # _checkunknown to check if there are any files in the merged-in
General Comments 0
You need to be logged in to leave comments. Login now