##// END OF EJS Templates
changegroup: move manifest unpacking into its own method...
Augie Fackler -
r26712:04176eaf default
parent child Browse files
Show More
@@ -287,6 +287,18 b' class cg1unpacker(object):'
287 pos = next
287 pos = next
288 yield closechunk()
288 yield closechunk()
289
289
290 def _unpackmanifests(self, repo, revmap, trp, prog, numchanges):
291 # We know that we'll never have more manifests than we had
292 # changesets.
293 self.callback = prog(_('manifests'), numchanges)
294 # no need to check for empty manifest group here:
295 # if the result of the merge of 1 and 2 is the same in 3 and 4,
296 # no new manifest will be created and the manifest group will
297 # be empty during the pull
298 self.manifestheader()
299 repo.manifest.addgroup(self, revmap, trp)
300 repo.ui.progress(_('manifests'), None)
301
290 def apply(self, repo, srctype, url, emptyok=False,
302 def apply(self, repo, srctype, url, emptyok=False,
291 targetphase=phases.draft, expectedtotal=None):
303 targetphase=phases.draft, expectedtotal=None):
292 """Add the changegroup returned by source.read() to this repo.
304 """Add the changegroup returned by source.read() to this repo.
@@ -357,15 +369,7 b' class cg1unpacker(object):'
357
369
358 # pull off the manifest group
370 # pull off the manifest group
359 repo.ui.status(_("adding manifests\n"))
371 repo.ui.status(_("adding manifests\n"))
360 # manifests <= changesets
372 self._unpackmanifests(repo, revmap, trp, prog, changesets)
361 self.callback = prog(_('manifests'), changesets)
362 # no need to check for empty manifest group here:
363 # if the result of the merge of 1 and 2 is the same in 3 and 4,
364 # no new manifest will be created and the manifest group will
365 # be empty during the pull
366 self.manifestheader()
367 repo.manifest.addgroup(self, revmap, trp)
368 repo.ui.progress(_('manifests'), None)
369
373
370 needfiles = {}
374 needfiles = {}
371 if repo.ui.configbool('server', 'validate', default=False):
375 if repo.ui.configbool('server', 'validate', default=False):
General Comments 0
You need to be logged in to leave comments. Login now