hooks run after transactions finish must not affect method results.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Tue, 14 Feb 2006 15:10:45 -0800
changeset 1717 7a4a16a7d21f
parent 1715 40346aa66b0f
child 1718 c1996b84d4f5
hooks run after transactions finish must not affect method results.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Feb 13 12:48:28 2006 -0600
+++ b/mercurial/localrepo.py	Tue Feb 14 15:10:45 2006 -0800
@@ -465,8 +465,7 @@
         self.dirstate.update(new, "n")
         self.dirstate.forget(remove)
 
-        if not self.hook("commit", node=hex(n)):
-            return None
+        self.hook("commit", node=hex(n))
         return n
 
     def walk(self, node=None, files=[], match=util.always):
@@ -1380,16 +1379,11 @@
         tr.close()
 
         if changesets > 0:
-            if not self.hook("changegroup",
-                             node=hex(self.changelog.node(cor+1))):
-                self.ui.warn(_("abort: changegroup hook returned failure!\n"))
-                return 1
+            self.hook("changegroup", node=hex(self.changelog.node(cor+1)))
 
             for i in range(cor + 1, cnr + 1):
                 self.hook("incoming", node=hex(self.changelog.node(i)))
 
-        return
-
     def update(self, node, allow=False, force=False, choose=None,
                moddirstate=True, forcemerge=False, wlock=None):
         pl = self.dirstate.parents()