# HG changeset patch # User Kyle Lippincott # Date 2018-08-23 07:34:25 # Node ID 8798be5f04fc38811f4adc0d592cc95ca1ab25fe # Parent 079d7bfa463da5704412ad90a48a9211688f4854 treemanifest: avoid unnecessary copies/processing when using alwaysmatcher Differential Revision: https://phab.mercurial-scm.org/D4368 diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -940,7 +940,7 @@ class treemanifest(object): def filesnotin(self, m2, match=None): '''Set of files in this manifest that are not in the other''' - if match: + if match and not match.always(): m1 = self.matches(match) m2 = m2.matches(match) return m1.filesnotin(m2) @@ -1085,7 +1085,7 @@ class treemanifest(object): the nodeid will be None and the flags will be the empty string. ''' - if match: + if match and not match.always(): m1 = self.matches(match) m2 = m2.matches(match) return m1.diff(m2, clean=clean)