Don't die calling outgoing hook if we have no changesets
authorMatt Mackall <mpm@selenic.com>
Fri, 21 Apr 2006 15:14:27 -0500
changeset 2107 7ff92c04f8e5
parent 2106 b03de24ee2ec
child 2108 30c7564f6dfc
Don't die calling outgoing hook if we have no changesets
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())