changeset 15588:632f4be4d1f3

localrepo: remove asserts in _afterlock
author Matt Mackall <mpm@selenic.com>
date Wed, 30 Nov 2011 16:20:07 -0600
parents 809d5d30e377
children cc24e4ed3e0c
files mercurial/localrepo.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Nov 30 15:36:55 2011 -0600
+++ b/mercurial/localrepo.py	Wed Nov 30 16:20:07 2011 -0600
@@ -917,9 +917,8 @@
 
         The callback will be executed on lock release."""
         l = self._lockref and self._lockref()
-        assert l is not None
-        assert l.held
-        l.postreleasehooks.append(callback)
+        if l:
+            l.postreleasehooks.append(callback)
 
     def lock(self, wait=True):
         '''Lock the repository store (.hg/store) and return a weak reference