# HG changeset patch # User Martin von Zweigbergk # Date 1504650265 25200 # Node ID 5eefd32cb3824b32889d80df97ba4a9bf3c9c098 # Parent 997997eb8367a424f7889bbda0437e7e9736a355 archive: use manifest.matches() to simplify and speed up matching manifest.matches() can avoid walking paths the user did not want to archive. Differential Revision: https://phab.mercurial-scm.org/D5178 diff -r 997997eb8367 -r 5eefd32cb382 mercurial/archival.py --- a/mercurial/archival.py Tue Sep 05 15:24:22 2017 -0700 +++ b/mercurial/archival.py Tue Sep 05 15:24:25 2017 -0700 @@ -321,7 +321,7 @@ if match(name): write(name, 0o644, False, lambda: buildmetadata(ctx)) - files = [f for f in ctx.manifest().keys() if match(f)] + files = [f for f in ctx.manifest().matches(match)] total = len(files) if total: files.sort()