Mercurial > hg-stable
changeset 27856:2b3a21052be9
with: use context manager in resolve
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 15 Jan 2016 13:14:49 -0800 |
parents | 5b675a5665ef |
children | b0b98e0a12f8 |
files | mercurial/commands.py |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Jan 15 13:14:49 2016 -0800 +++ b/mercurial/commands.py Fri Jan 15 13:14:49 2016 -0800 @@ -5899,8 +5899,7 @@ fm.end() return 0 - wlock = repo.wlock() - try: + with repo.wlock(): ms = mergemod.mergestate.read(repo) if not (ms.active() or repo.dirstate.p2() != nullid): @@ -6017,9 +6016,6 @@ if not proceed: return 1 - finally: - wlock.release() - # Nudge users into finishing an unfinished operation unresolvedf = list(ms.unresolved()) driverresolvedf = list(ms.driverresolved())