Mercurial > hg
comparison mercurial/manifest.py @ 38556:0db41eb0a3ac
manifest: define and implement addgroup() on manifestlog
Changegroup code was bypassing our manifest interface and calling a
method on the private revlog attribute.
This commit formalizes the interface for adding a group of
revisions from deltas and changes the changegroup code to use it.
This enables alternate manifest storage to work with changegroup
application operations (like `hg unbundle` and `hg pull`).
Differential Revision: https://phab.mercurial-scm.org/D3883
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 01 Jul 2018 14:25:44 -0700 |
parents | f2f9bacf0587 |
children | 28c9d67d88ab |
comparison
equal
deleted
inserted
replaced
38555:f2f9bacf0587 | 38556:0db41eb0a3ac |
---|---|
1349 self._revlog.clearcaches() | 1349 self._revlog.clearcaches() |
1350 | 1350 |
1351 def rev(self, node): | 1351 def rev(self, node): |
1352 return self._revlog.rev(node) | 1352 return self._revlog.rev(node) |
1353 | 1353 |
1354 def addgroup(self, deltas, linkmapper, transaction): | |
1355 return self._revlog.addgroup(deltas, linkmapper, transaction) | |
1356 | |
1354 @interfaceutil.implementer(repository.imanifestrevisionwritable) | 1357 @interfaceutil.implementer(repository.imanifestrevisionwritable) |
1355 class memmanifestctx(object): | 1358 class memmanifestctx(object): |
1356 def __init__(self, manifestlog): | 1359 def __init__(self, manifestlog): |
1357 self._manifestlog = manifestlog | 1360 self._manifestlog = manifestlog |
1358 self._manifestdict = manifestdict() | 1361 self._manifestdict = manifestdict() |