comparison mercurial/interfaces/repository.py @ 44352:0bf3b5e80d30

manifest: move matches method to be outside the interface In order to adequately smoke out any legacy consumers of the method, we rename it to _matches so it's clear that it's class-private. To my amazement, all consumers of this method really only wanted matching filenames, not a full filtered manifest. Differential Revision: https://phab.mercurial-scm.org/D8085
author Augie Fackler <augie@google.com>
date Wed, 05 Feb 2020 17:13:51 -0500
parents c86256bd4eb8
children 948fac24bc39
comparison
equal deleted inserted replaced
44351:8ec186c1ccfe 44352:0bf3b5e80d30
983 """Returns an object implementing the ``idirs`` interface.""" 983 """Returns an object implementing the ``idirs`` interface."""
984 984
985 def hasdir(dir): 985 def hasdir(dir):
986 """Returns a bool indicating if a directory is in this manifest.""" 986 """Returns a bool indicating if a directory is in this manifest."""
987 987
988 def matches(match):
989 """Generate a new manifest filtered through a matcher.
990
991 Returns an object conforming to the ``imanifestdict`` interface.
992 """
993
994 def walk(match): 988 def walk(match):
995 """Generator of paths in manifest satisfying a matcher. 989 """Generator of paths in manifest satisfying a matcher.
996
997 This is equivalent to ``self.matches(match).iterkeys()`` except a new
998 manifest object is not created.
999 990
1000 If the matcher has explicit files listed and they don't exist in 991 If the matcher has explicit files listed and they don't exist in
1001 the manifest, ``match.bad()`` is called for each missing file. 992 the manifest, ``match.bad()`` is called for each missing file.
1002 """ 993 """
1003 994