comparison mercurial/changegroup.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 1c5c4a5dd86d
children e7aa113b14f7
comparison
equal deleted inserted replaced
38555:f2f9bacf0587 38556:0db41eb0a3ac
243 # if the result of the merge of 1 and 2 is the same in 3 and 4, 243 # if the result of the merge of 1 and 2 is the same in 3 and 4,
244 # no new manifest will be created and the manifest group will 244 # no new manifest will be created and the manifest group will
245 # be empty during the pull 245 # be empty during the pull
246 self.manifestheader() 246 self.manifestheader()
247 deltas = self.deltaiter() 247 deltas = self.deltaiter()
248 repo.manifestlog._revlog.addgroup(deltas, revmap, trp) 248 repo.manifestlog.addgroup(deltas, revmap, trp)
249 prog.complete() 249 prog.complete()
250 self.callback = None 250 self.callback = None
251 251
252 def apply(self, repo, tr, srctype, url, targetphase=phases.draft, 252 def apply(self, repo, tr, srctype, url, targetphase=phases.draft,
253 expectedtotal=None): 253 expectedtotal=None):