##// END OF EJS Templates
with: use context manager for wlock in removelargefiles
Bryan O'Sullivan -
r27822:bce0afa1 default
parent child Browse files
Show More
@@ -196,8 +196,7 b' def removelargefiles(ui, repo, isaddremo'
196
196
197 # Need to lock because standin files are deleted then removed from the
197 # Need to lock because standin files are deleted then removed from the
198 # repository and we could race in-between.
198 # repository and we could race in-between.
199 wlock = repo.wlock()
199 with repo.wlock():
200 try:
201 lfdirstate = lfutil.openlfdirstate(ui, repo)
200 lfdirstate = lfutil.openlfdirstate(ui, repo)
202 for f in sorted(remove):
201 for f in sorted(remove):
203 if ui.verbose or not m.exact(f):
202 if ui.verbose or not m.exact(f):
@@ -228,8 +227,6 b' def removelargefiles(ui, repo, isaddremo'
228 False)
227 False)
229
228
230 lfdirstate.write()
229 lfdirstate.write()
231 finally:
232 wlock.release()
233
230
234 return result
231 return result
235
232
General Comments 0
You need to be logged in to leave comments. Login now