mercurial/localrepo.py
changeset 23648 915ac9403e13
parent 23630 b9af235810cc
child 23666 965788d9ae09
--- a/mercurial/localrepo.py	Fri Dec 12 15:31:28 2014 -0800
+++ b/mercurial/localrepo.py	Mon Dec 22 15:48:39 2014 -0800
@@ -1785,8 +1785,10 @@
             return False
         self.ui.debug('pushing key for "%s:%s"\n' % (namespace, key))
         ret = pushkey.push(self, namespace, key, old, new)
-        self.hook('pushkey', namespace=namespace, key=key, old=old, new=new,
-                  ret=ret)
+        def runhook():
+            self.hook('pushkey', namespace=namespace, key=key, old=old, new=new,
+                      ret=ret)
+        self._afterlock(runhook)
         return ret
 
     def listkeys(self, namespace):