hgext/keyword.py
changeset 8112 6ee71f78497c
parent 8098 6a6ce1df98d2
child 8209 a1a5a57efe90
--- 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):