diff mercurial/localrepo.py @ 2107:7ff92c04f8e5

Don't die calling outgoing hook if we have no changesets
author Matt Mackall <mpm@selenic.com>
date Fri, 21 Apr 2006 15:14:27 -0500
parents 190c6a81e6ad
children 30c7564f6dfc
line wrap: on
line diff
--- 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())