changeset 1322:fd3461f86582

add minimum methods for matcher By changeset 24820:5693c834bcb4 in mercurial crew, it become that matcher object need to implement some common methods, bad(), always(), iseact() and anypats(). So the PrefixMatch class should be implement them.
author Shun-ichi GOTO <shunichi.goto@gmail.com>
date Mon, 13 Apr 2015 22:24:41 +0900
parents a36e87ae2380
children 6fd0ec01553b 15c313b60567
files hgsubversion/util.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -215,6 +215,18 @@ class PrefixMatch(object):
     def __call__(self, fn):
         return fn.startswith(self.p)
 
+    def bad(self, f, msg):
+        pass
+
+    def always(self):
+        return False
+
+    def isexact(self):
+        return False
+
+    def anypats(self):
+        return True
+
 def outgoing_revisions(repo, reverse_map, sourcerev):
     """Given a repo and an hg_editor, determines outgoing revisions for the
     current working copy state.