diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2015,8 +2015,8 @@ class localrepository(repo.repository): source.callback = pr source.changelogheader() - if (cl.addgroup(source, csmap, trp) is None - and not emptyok): + srccontent = cl.addgroup(source, csmap, trp) + if not (srccontent or emptyok): raise util.Abort(_("received changelog group is empty")) clend = len(cl) changesets = clend - clstart @@ -2064,7 +2064,7 @@ class localrepository(repo.repository): pr() fl = self.file(f) o = len(fl) - if fl.addgroup(source, revmap, trp) is None: + if not fl.addgroup(source, revmap, trp): raise util.Abort(_("received file revlog group is empty")) revisions += len(fl) - o files += 1 diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1131,6 +1131,7 @@ class revlog(object): """ # track the base of the current delta log + content = [] node = None r = len(self) @@ -1161,6 +1162,8 @@ class revlog(object): deltabase = chunkdata['deltabase'] delta = chunkdata['delta'] + content.append(node) + link = linkmapper(cs) if node in self.nodemap: # this can happen if two branches make the same change @@ -1190,7 +1193,7 @@ class revlog(object): dfh.close() ifh.close() - return node + return content def strip(self, minlink, transaction): """truncate the revlog on the first revision with a linkrev >= minlink