##// 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 sparse.clearrules(repo, force=force)
371 sparse.clearrules(repo, force=force)
372
372
373 if refresh:
373 if refresh:
374 try:
374 with repo.wlock():
375 wlock = repo.wlock()
376 fcounts = pycompat.maplist(
375 fcounts = pycompat.maplist(
377 len,
376 len,
378 sparse.refreshwdir(
377 sparse.refreshwdir(
@@ -386,7 +385,5 b' def debugsparse(ui, repo, **opts):'
386 dropped=fcounts[1],
385 dropped=fcounts[1],
387 conflicting=fcounts[2],
386 conflicting=fcounts[2],
388 )
387 )
389 finally:
390 wlock.release()
391
388
392 del repo._has_sparse
389 del repo._has_sparse
General Comments 0
You need to be logged in to leave comments. Login now