changeset 38321 | 9b1536b02221 |
parent 38320 | eef4668be8a3 |
child 38322 | e218ed5ba484 |
--- a/mercurial/commands.py Thu Jun 14 15:28:32 2018 -0700 +++ b/mercurial/commands.py Thu Jun 14 15:08:19 2018 -0700 @@ -560,13 +560,8 @@ Returns 0 on success, 1 if nothing to backout or there are unresolved files. ''' - wlock = lock = None - try: - wlock = repo.wlock() - lock = repo.lock() + with repo.wlock(), repo.lock(): return _dobackout(ui, repo, node, rev, **opts) - finally: - release(lock, wlock) def _dobackout(ui, repo, node=None, rev=None, **opts): opts = pycompat.byteskwargs(opts)