changeset 1309 | 02972bce7d41 |
parent 1222 | 01c23fd3d424 |
child 1315 | e3461e819922 |
--- a/hgkw/keyword.py Wed Nov 20 12:26:54 2013 +0000 +++ b/hgkw/keyword.py Wed Nov 20 12:55:08 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, '')