# HG changeset patch # User Gregory Szorc # Date 1533936047 25200 # Node ID aad4b46e89bb05430ba16e2dcc835fb62db31389 # Parent 2af6b2d8d1d823fb57b1d6363aae7858d9d17c98 manifest: remove addgroup() from manifestlog and imanifestlog addgroup() is part of the storage interface for manifests. Unfortunately, we don't yet have a formal storage interface for manifests. (One will be established in subsequent commits.) One thing is for sure, addgroup() doesn't belong on imanifestlog - at least not unless we extend that interface to encompass storage. For now, let's access addgroup() on the _revlog attribute, just like we do for tree manifests. Even though this violates visibility, it is consistent. Differential Revision: https://phab.mercurial-scm.org/D4274 diff -r 2af6b2d8d1d8 -r aad4b46e89bb mercurial/changegroup.py --- a/mercurial/changegroup.py Fri Aug 10 13:59:27 2018 -0700 +++ b/mercurial/changegroup.py Fri Aug 10 14:20:47 2018 -0700 @@ -253,7 +253,8 @@ # be empty during the pull self.manifestheader() deltas = self.deltaiter() - repo.manifestlog.addgroup(deltas, revmap, trp) + # TODO this violates storage abstraction. + repo.manifestlog._revlog.addgroup(deltas, revmap, trp) prog.complete() self.callback = None diff -r 2af6b2d8d1d8 -r aad4b46e89bb mercurial/manifest.py --- a/mercurial/manifest.py Fri Aug 10 13:59:27 2018 -0700 +++ b/mercurial/manifest.py Fri Aug 10 14:20:47 2018 -0700 @@ -1485,9 +1485,6 @@ def rev(self, node): return self._revlog.rev(node) - def addgroup(self, deltas, linkmapper, transaction): - return self._revlog.addgroup(deltas, linkmapper, transaction) - @interfaceutil.implementer(repository.imanifestrevisionwritable) class memmanifestctx(object): def __init__(self, manifestlog): diff -r 2af6b2d8d1d8 -r aad4b46e89bb mercurial/repository.py --- a/mercurial/repository.py Fri Aug 10 13:59:27 2018 -0700 +++ b/mercurial/repository.py Fri Aug 10 14:20:47 2018 -0700 @@ -1032,22 +1032,6 @@ Raises ``error.LookupError`` if the node is not known. """ - def addgroup(deltas, linkmapper, transaction): - """Process a series of deltas for storage. - - ``deltas`` is an iterable of 7-tuples of - (node, p1, p2, linknode, deltabase, delta, flags) defining revisions - to add. - - The ``delta`` field contains ``mpatch`` data to apply to a base - revision, identified by ``deltabase``. The base node can be - ``nullid``, in which case the header from the delta can be ignored - and the delta used as the fulltext. - - Returns a list of nodes that were processed. A node will be in the list - even if it existed in the store previously. - """ - class completelocalrepository(interfaceutil.Interface): """Monolithic interface for local repositories.