changeset 27801 | 7be6371c732e |
parent 27698 | dad6404ccddb |
child 27802 | ed44a66fd7ae |
--- a/mercurial/cmdutil.py Fri Jan 15 13:14:45 2016 -0800 +++ b/mercurial/cmdutil.py Fri Jan 15 13:14:45 2016 -0800 @@ -230,11 +230,8 @@ pass def recordinwlock(ui, repo, message, match, opts): - wlock = repo.wlock() - try: + with repo.wlock(): return recordfunc(ui, repo, message, match, opts) - finally: - wlock.release() return commit(ui, repo, recordinwlock, pats, opts)