diff -r 4169a4f83548 -r 7df090c9c9fe mercurial/localrepo.py --- a/mercurial/localrepo.py Thu May 07 12:07:10 2015 +0900 +++ b/mercurial/localrepo.py Thu May 07 12:07:10 2015 +0900 @@ -1517,7 +1517,7 @@ def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): # hack for command that use a temporary commit (eg: histedit) # temporary commit got stripped before hook release - if node in self: + if self.changelog.hasnode(ret): self.hook("commit", node=node, parent1=parent1, parent2=parent2) self._afterlock(commithook)