changegroup: remove remaining uses of repo.manifest
The remaining uses of repo.manifest in the changegroup module are treating the
manifest exclusively as a revlog, so let's replace them with instances of the
revlog directly.
This is part of dropping all dependencies on repo.manifest in favor of
repo.manifestlog.
--- a/mercurial/changegroup.py Fri Nov 04 13:49:15 2016 -0700
+++ b/mercurial/changegroup.py Tue Nov 08 08:03:43 2016 -0800
@@ -250,7 +250,7 @@
# no new manifest will be created and the manifest group will
# be empty during the pull
self.manifestheader()
- repo.manifest.addgroup(self, revmap, trp)
+ repo.manifestlog._revlog.addgroup(self, revmap, trp)
repo.ui.progress(_('manifests'), None)
self.callback = None
@@ -480,7 +480,7 @@
# If we get here, there are directory manifests in the changegroup
d = chunkdata["filename"]
repo.ui.debug("adding %s revisions\n" % d)
- dirlog = repo.manifest.dirlog(d)
+ dirlog = repo.manifestlog._revlog.dirlog(d)
if not dirlog.addgroup(self, revmap, trp):
raise error.Abort(_("received dir revlog group is empty"))
@@ -588,7 +588,7 @@
def _packmanifests(self, dir, mfnodes, lookuplinknode):
"""Pack flat manifests into a changegroup stream."""
assert not dir
- for chunk in self.group(mfnodes, self._repo.manifest,
+ for chunk in self.group(mfnodes, self._repo.manifestlog._revlog,
lookuplinknode, units=_('manifests')):
yield chunk
@@ -852,8 +852,10 @@
def _packmanifests(self, dir, mfnodes, lookuplinknode):
if dir:
yield self.fileheader(dir)
- for chunk in self.group(mfnodes, self._repo.manifest.dirlog(dir),
- lookuplinknode, units=_('manifests')):
+
+ dirlog = self._repo.manifestlog._revlog.dirlog(dir)
+ for chunk in self.group(mfnodes, dirlog, lookuplinknode,
+ units=_('manifests')):
yield chunk
def _manifestsdone(self):