# HG changeset patch # User Vincent Danjean # Date 1146202142 25200 # Node ID 43ce1c17e64458c21baabdca088ffe1a6430542a # Parent c72e618c12046e61dc4ea57646180c7f63bbebc4 allow to pull from an empty repo without getting a backtrace diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1320,7 +1320,8 @@ class localrepository(object): # Signal that no more groups are left. yield changegroup.closechunk() - self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) + if nodes: + self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) return util.chunkbuffer(gengroup())