author | Christian Ebert <blacktrash@gmx.net> |
Wed, 14 Feb 2007 02:50:06 +0100 | |
branch | kwmap-templates |
changeset 143 | 3485b0ef99c4 |
parent 142 | aedce5bcc9eb |
child 144 | 19b3d1de3db0 |
hgkw/keyword.py | file | annotate | diff | comparison | revisions |
--- a/hgkw/keyword.py Wed Feb 14 02:44:25 2007 +0100 +++ b/hgkw/keyword.py Wed Feb 14 02:50:06 2007 +0100 @@ -207,8 +207,16 @@ if not candidates: return node - kwt = kwtemplater(self.ui, self) - kwt.overwrite(candidates, node) + wrelease = False + if not wlock: + wlock = self.wlock() + wrelease = True + try: + kwt = kwtemplater(self.ui, self) + kwt.overwrite(candidates, node) + finally: + if wrelease: + wlock.release() return node class kwfilelog(filelog.filelog):