Mercurial > public > mercurial-scm > hg
diff hgext/keyword.py @ 8112:6ee71f78497c
switch lock releasing in the extensions from gc to explicit
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> |
---|---|
date | Wed, 22 Apr 2009 02:01:22 +0200 |
parents | 6a6ce1df98d2 |
children | a1a5a57efe90 |
line wrap: on
line diff
--- a/hgext/keyword.py Wed Apr 22 02:01:22 2009 +0200 +++ b/hgext/keyword.py Wed Apr 22 02:01:22 2009 +0200 @@ -83,6 +83,7 @@ from mercurial import commands, cmdutil, dispatch, filelog, revlog, extensions from mercurial import patch, localrepo, templater, templatefilters, util from mercurial.hgweb import webcommands +from mercurial.lock import release from mercurial.node import nullid, hex from mercurial.i18n import _ import re, shutil, tempfile, time @@ -273,8 +274,7 @@ lock = repo.lock() kwt.overwrite(None, expand, status[6]) finally: - del wlock, lock - + release(lock, wlock) def demo(ui, repo, *args, **opts): '''print [keywordmaps] configuration and an expansion example @@ -487,7 +487,7 @@ repo.hook('commit', node=n, parent1=_p1, parent2=_p2) return n finally: - del wlock, lock + release(lock, wlock) # monkeypatches def kwpatchfile_init(orig, self, ui, fname, opener, missing=False):