Patchwork D8090: archival: use walk() instead of matches() on manifest

login
register
mail settings
Submitter phabricator
Date Feb. 6, 2020, 9:57 p.m.
Message ID <differential-rev-PHID-DREV-4u2ah47r6vi4slscpa3b-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45003/
State Superseded
Headers show

Comments

phabricator - Feb. 6, 2020, 9:57 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  All we care about is the filepaths, so this avoids a pointless copy of the
  manifest that we only used to extract matching filenames.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8090

AFFECTED FILES
  mercurial/archival.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -355,7 +355,7 @@ 
         if match(name):
             write(name, 0o644, False, lambda: buildmetadata(ctx))
 
-    files = [f for f in ctx.manifest().matches(match)]
+    files = list(ctx.manifest().walk(match))
     total = len(files)
     if total:
         files.sort()