--- a/hgext/keyword.py Fri Jan 15 13:14:46 2016 -0800
+++ b/hgext/keyword.py Fri Jan 15 13:14:46 2016 -0800
@@ -696,8 +696,7 @@
def kw_dorecord(orig, ui, repo, commitfunc, *pats, **opts):
'''Wraps record.dorecord expanding keywords after recording.'''
- wlock = repo.wlock()
- try:
+ with repo.wlock():
# record returns 0 even when nothing has changed
# therefore compare nodes before and after
kwt.postcommit = True
@@ -712,8 +711,6 @@
kwt.overwrite(recctx, added, False, True, True)
kwt.restrict = True
return ret
- finally:
- wlock.release()
def kwfilectx_cmp(orig, self, fctx):
# keyword affects data size, comparing wdir and filelog size does