mercurial/match.py
changeset 32406 952017471f93
parent 32401 284b18303f61
child 32415 9695aca1a3a0
--- a/mercurial/match.py	Mon May 22 10:41:32 2017 -0700
+++ b/mercurial/match.py	Mon May 22 11:08:18 2017 -0700
@@ -214,6 +214,9 @@
         self._anypats = bool(include or exclude)
         self._always = False
         self._pathrestricted = bool(include or exclude or patterns)
+        self.patternspat = None
+        self.includepat = None
+        self.excludepat = None
 
         # roots are directories which are recursively included/excluded.
         self._includeroots = set()
@@ -375,6 +378,11 @@
     def prefix(self):
         return not self.always() and not self.isexact() and not self.anypats()
 
+    def __repr__(self):
+        return ('<matcher files=%r, patterns=%r, includes=%r, excludes=%r>' %
+                (self._files, self.patternspat, self.includepat,
+                 self.excludepat))
+
 class subdirmatcher(matcher):
     """Adapt a matcher to work on a subdirectory only.