author | Bryan O'Sullivan <bryano@fb.com> |
Fri, 15 Jan 2016 13:14:46 -0800 | |
changeset 27805 | bdaf433192f0 |
parent 27804 | aa41199a74e2 |
child 27806 | a5eae47aa1f8 |
--- a/mercurial/commands.py Fri Jan 15 13:14:46 2016 -0800 +++ b/mercurial/commands.py Fri Jan 15 13:14:46 2016 -0800 @@ -1833,11 +1833,8 @@ Returns 0 on success, 1 if errors are encountered. """ - wlock = repo.wlock(False) - try: + with repo.wlock(False): return cmdutil.copy(ui, repo, pats, opts) - finally: - wlock.release() @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True) def debugancestor(ui, repo, *args):