# HG changeset patch # User Matt Mackall # Date 2006-04-21 20:14:27 # Node ID 7ff92c04f8e5041ccd6d1072d49ab6748798bf4c # Parent b03de24ee2eca0b2014e8b1e6f69a7e48ef5aad8 Don't die calling outgoing hook if we have no changesets diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1386,7 +1386,9 @@ class localrepository(object): yield chnk yield changegroup.closechunk() - self.hook('outgoing', node=hex(nodes[0]), source=source) + + if nodes: + self.hook('outgoing', node=hex(nodes[0]), source=source) return util.chunkbuffer(gengroup())