narrowspec: remove parseserverpatterns() which isn't used anymore
authorYuya Nishihara <yuya@tcha.org>
Wed, 12 Sep 2018 22:15:43 +0900
changeset 39572 c8ea5c7ec99d
parent 39571 cb675e95a2c2
child 39573 623081f2abc2
narrowspec: remove parseserverpatterns() which isn't used anymore Follows up 10a8472f6662, "narrow: drop support for remote expansion."
mercurial/narrowspec.py
--- a/mercurial/narrowspec.py	Tue Sep 11 17:22:15 2018 -0700
+++ b/mercurial/narrowspec.py	Wed Sep 12 22:15:43 2018 +0900
@@ -29,27 +29,6 @@
     b'rootfilesin:',
 )
 
-def parseserverpatterns(text):
-    """Parses the narrowspec format that's returned by the server."""
-    includepats = set()
-    excludepats = set()
-
-    # We get one entry per line, in the format "<key> <value>".
-    # It's OK for value to contain other spaces.
-    for kp in (l.split(' ', 1) for l in text.splitlines()):
-        if len(kp) != 2:
-            raise error.Abort(_('Invalid narrowspec pattern line: "%s"') % kp)
-        key = kp[0]
-        pat = kp[1]
-        if key == 'include':
-            includepats.add(pat)
-        elif key == 'exclude':
-            excludepats.add(pat)
-        else:
-            raise error.Abort(_('Invalid key "%s" in server response') % key)
-
-    return includepats, excludepats
-
 def normalizesplitpattern(kind, pat):
     """Returns the normalized version of a pattern and kind.