author | Christian Ebert <blacktrash@gmx.net> |
Thu, 28 Nov 2013 12:57:12 +0000 | |
branch | stable |
changeset 1310 | 21d35cf4933e |
parent 1307 | 164ed9bf157c (current diff) |
parent 1309 | 02972bce7d41 (diff) |
child 1311 | 1fed120bfa04 |
--- 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, '')