Mercurial > hg
comparison mercurial/archival.py @ 44284:e786d69c665d
archival: use walk() instead of matches() on manifest
All we care about is the filepaths, so this avoids a pointless copy of the
manifest that we only used to extract matching filenames.
Differential Revision: https://phab.mercurial-scm.org/D8090
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 06 Feb 2020 16:55:39 -0500 |
parents | 9f70512ae2cf |
children | f8427841c8fc |
comparison
equal
deleted
inserted
replaced
44283:934a79697c36 | 44284:e786d69c665d |
---|---|
353 if repo.ui.configbool(b"ui", b"archivemeta"): | 353 if repo.ui.configbool(b"ui", b"archivemeta"): |
354 name = b'.hg_archival.txt' | 354 name = b'.hg_archival.txt' |
355 if match(name): | 355 if match(name): |
356 write(name, 0o644, False, lambda: buildmetadata(ctx)) | 356 write(name, 0o644, False, lambda: buildmetadata(ctx)) |
357 | 357 |
358 files = [f for f in ctx.manifest().matches(match)] | 358 files = list(ctx.manifest().walk(match)) |
359 total = len(files) | 359 total = len(files) |
360 if total: | 360 if total: |
361 files.sort() | 361 files.sort() |
362 scmutil.prefetchfiles( | 362 scmutil.prefetchfiles( |
363 repo, [ctx.rev()], scmutil.matchfiles(repo, files) | 363 repo, [ctx.rev()], scmutil.matchfiles(repo, files) |