##// END OF EJS Templates
sparse: use with statement for wlock...
marmoute -
r52193:fa87eeeb default
parent child Browse files
Show More
@@ -371,8 +371,7 b' def debugsparse(ui, repo, **opts):'
371 371 sparse.clearrules(repo, force=force)
372 372
373 373 if refresh:
374 try:
375 wlock = repo.wlock()
374 with repo.wlock():
376 375 fcounts = pycompat.maplist(
377 376 len,
378 377 sparse.refreshwdir(
@@ -386,7 +385,5 b' def debugsparse(ui, repo, **opts):'
386 385 dropped=fcounts[1],
387 386 conflicting=fcounts[2],
388 387 )
389 finally:
390 wlock.release()
391 388
392 389 del repo._has_sparse
General Comments 0
You need to be logged in to leave comments. Login now