diff -r 32f6cae83db7 -r b650bfdfc7ee mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Sep 22 09:47:27 2005 -0700 +++ b/mercurial/localrepo.py Thu Sep 22 10:12:42 2005 -0700 @@ -987,7 +987,8 @@ self.ui.status("adding changesets\n") co = self.changelog.tip() cn = self.changelog.addgroup(getgroup(), csmap, tr, 1) # unique - changesets = self.changelog.rev(cn) - self.changelog.rev(co) + cnr, cor = map(self.changelog.rev, (cn, co)) + changesets = cnr - cor # pull off the manifest group self.ui.status("adding manifests\n") @@ -1017,9 +1018,13 @@ tr.close() - if not self.hook("changegroup"): + if not self.hook("changegroup", node=hex(self.changelog.node(cor+1))): + self.ui.warn("abort: changegroup hook returned failure!\n") return 1 + for i in range(cor + 1, cnr + 1): + self.hook("commit", node=hex(self.changelog.node(i))) + return def update(self, node, allow=False, force=False, choose=None,