# HG changeset patch # User Benoit Boissinot # Date 1147352490 -7200 # Node ID 181b0643ffb16e1bbfb085bbe5cfc119cb5071cc # Parent 7e43d68f390089eb6189a582dc112571ce678f25 fix a traceback when unbundling does not add any changesets only run the hooks when some changesets has been added diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1544,8 +1544,9 @@ class localrepository(object): " with %d changes to %d files%s\n") % (changesets, revisions, files, heads)) - self.hook('pretxnchangegroup', throw=True, - node=hex(self.changelog.node(cor+1)), source=srctype) + if changesets > 0: + self.hook('pretxnchangegroup', throw=True, + node=hex(self.changelog.node(cor+1)), source=srctype) tr.close()