comparison mercurial/archival.py @ 45072:a56ba57c837d

scmutil: allowing different files to be prefetched per revision The old API takes a list of revision separate from the file matcher, and thus provides no way to fetch different sets of files from each revision. In preparation for adding one such usage, I'm changing the API to take a list of (revision, file matcher) tuples instead. Differential Revision: https://phab.mercurial-scm.org/D8721
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Thu, 09 Jul 2020 18:48:55 -0700
parents f8427841c8fc
children 3a6ec080b521
comparison
equal deleted inserted replaced
45071:196ba4d4eb86 45072:a56ba57c837d
362 files = list(ctx.manifest().walk(match)) 362 files = list(ctx.manifest().walk(match))
363 total = len(files) 363 total = len(files)
364 if total: 364 if total:
365 files.sort() 365 files.sort()
366 scmutil.prefetchfiles( 366 scmutil.prefetchfiles(
367 repo, [ctx.rev()], scmutil.matchfiles(repo, files) 367 repo, [(ctx.rev(), scmutil.matchfiles(repo, files))]
368 ) 368 )
369 progress = repo.ui.makeprogress( 369 progress = repo.ui.makeprogress(
370 _(b'archiving'), unit=_(b'files'), total=total 370 _(b'archiving'), unit=_(b'files'), total=total
371 ) 371 )
372 progress.update(0) 372 progress.update(0)