branch | stable |
changeset 1310 | 21d35cf4933e |
parent 1309 | 02972bce7d41 |
child 1315 | e3461e819922 |
--- a/hgkw/keyword.py Sun Nov 17 10:59:35 2013 -0500 +++ b/hgkw/keyword.py Thu Nov 28 12:57:12 2013 +0000 @@ -438,7 +438,11 @@ repo[None].add([fn]) ui.note(_('\nkeywords written to %s:\n') % fn) ui.note(keywords) - repo.dirstate.setbranch('demobranch') + wlock = repo.wlock() + try: + repo.dirstate.setbranch('demobranch') + finally: + wlock.release() for name, cmd in ui.configitems('hooks'): if name.split('.', 1)[0].find('commit') > -1: repo.ui.setconfig('hooks', name, '')