Mercurial > hg
changeset 20113:7ad2ae7792ad
keyword: wlock while setting branch in kwdemo
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Wed, 20 Nov 2013 12:55:08 +0000 |
parents | 169f8141ba00 |
children | 390aff33c2f9 |
files | hgext/keyword.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/keyword.py Sun Nov 17 15:43:46 2013 +0100 +++ b/hgext/keyword.py Wed Nov 20 12:55:08 2013 +0000 @@ -439,7 +439,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, '')