changeset 15589:cc24e4ed3e0c

lock: change name of release chain
author Matt Mackall <mpm@selenic.com>
date Wed, 30 Nov 2011 16:53:44 -0600
parents 632f4be4d1f3
children dbdb8aa70503
files mercurial/localrepo.py mercurial/lock.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Nov 30 16:20:07 2011 -0600
+++ b/mercurial/localrepo.py	Wed Nov 30 16:53:44 2011 -0600
@@ -918,7 +918,7 @@
         The callback will be executed on lock release."""
         l = self._lockref and self._lockref()
         if l:
-            l.postreleasehooks.append(callback)
+            l.postrelease.append(callback)
 
     def lock(self, wait=True):
         '''Lock the repository store (.hg/store) and return a weak reference
--- a/mercurial/lock.py	Wed Nov 30 16:20:07 2011 -0600
+++ b/mercurial/lock.py	Wed Nov 30 16:53:44 2011 -0600
@@ -35,7 +35,7 @@
         self.timeout = timeout
         self.releasefn = releasefn
         self.desc = desc
-        self.postreleasehooks  = []
+        self.postrelease  = []
         self.lock()
 
     def __del__(self):
@@ -134,11 +134,10 @@
                 util.unlink(self.f)
             except OSError:
                 pass
-            for callback in self.postreleasehooks:
+            for callback in self.postrelease:
                 callback()
 
 def release(*locks):
     for lock in locks:
         if lock is not None:
             lock.release()
-