Mercurial > hg-stable
changeset 27860:0da102e4f203
with: use context manager in rebuildfncache again
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 15 Jan 2016 13:14:49 -0800 |
parents | f55a5ace8e69 |
children | 3315a9c2019c |
files | mercurial/repair.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repair.py Fri Jan 15 13:14:49 2016 -0800 +++ b/mercurial/repair.py Fri Jan 15 13:14:49 2016 -0800 @@ -252,8 +252,7 @@ 'support fncache)\n')) return - lock = repo.lock() - try: + with repo.lock(): fnc = repo.store.fncache # Trigger load of fncache. if 'irrelevant' in fnc: @@ -305,8 +304,6 @@ tr.release() else: ui.write(_('fncache already up to date\n')) - finally: - lock.release() def stripbmrevset(repo, mark): """