changeset 27837 | 496ca4deddc5 |
parent 27836 | 1c2408c28aff |
child 27838 | 60b850b7e4ef |
--- a/hgext/shelve.py Fri Jan 15 13:14:47 2016 -0800 +++ b/hgext/shelve.py Fri Jan 15 13:14:47 2016 -0800 @@ -602,11 +602,8 @@ than ``maxbackups`` backups are kept, if same timestamp prevents from deciding exact order of them, for safety. """ - wlock = repo.wlock() - try: + with repo.wlock(): return _dounshelve(ui, repo, *shelved, **opts) - finally: - lockmod.release(wlock) def _dounshelve(ui, repo, *shelved, **opts): abortf = opts['abort']