changeset 40409:5eefd32cb382

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 05 Sep 2017 15:24:25 -0700
parents 997997eb8367
children 3b782669561d
files mercurial/archival.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()