Mercurial > hg
comparison mercurial/repository.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 | a232e6744ba3 |
comparison
equal
deleted
inserted
replaced
38555:f2f9bacf0587 | 38556:0db41eb0a3ac |
---|---|
926 """Obtain the revision number for a binary node. | 926 """Obtain the revision number for a binary node. |
927 | 927 |
928 Raises ``error.LookupError`` if the node is not known. | 928 Raises ``error.LookupError`` if the node is not known. |
929 """ | 929 """ |
930 | 930 |
931 def addgroup(deltas, linkmapper, transaction): | |
932 """Process a series of deltas for storage. | |
933 | |
934 ``deltas`` is an iterable of 7-tuples of | |
935 (node, p1, p2, linknode, deltabase, delta, flags) defining revisions | |
936 to add. | |
937 | |
938 The ``delta`` field contains ``mpatch`` data to apply to a base | |
939 revision, identified by ``deltabase``. The base node can be | |
940 ``nullid``, in which case the header from the delta can be ignored | |
941 and the delta used as the fulltext. | |
942 | |
943 Returns a list of nodes that were processed. A node will be in the list | |
944 even if it existed in the store previously. | |
945 """ | |
946 | |
931 class completelocalrepository(interfaceutil.Interface): | 947 class completelocalrepository(interfaceutil.Interface): |
932 """Monolithic interface for local repositories. | 948 """Monolithic interface for local repositories. |
933 | 949 |
934 This currently captures the reality of things - not how things should be. | 950 This currently captures the reality of things - not how things should be. |
935 """ | 951 """ |