changeset 1333:7475c42671b1 stable

util: add prefix to PrefixMatch The upstream match object now has a prefix function. Let's add it to our PrefixMatcher. The upstream implementation will return False if anypats() is true, which it is for our PrefixMatcher, so we go ahead and return False. This was caught by the tests failing.
author Durham Goode <durham@fb.com>
date Thu, 28 May 2015 20:18:50 -0700
parents 82803ec84c82
children 9a78a6524f9d
files hgsubversion/util.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -227,6 +227,9 @@ class PrefixMatch(object):
     def anypats(self):
         return True
 
+    def prefix(self):
+        return False
+
 def outgoing_revisions(repo, reverse_map, sourcerev):
     """Given a repo and an hg_editor, determines outgoing revisions for the
     current working copy state.