Patchwork D4058: narrowspec: remove the unused _parsestoredpatterns() function

login
register
mail settings
Submitter phabricator
Date Aug. 3, 2018, 4:55 p.m.
Message ID <d294ae6433ad62f308ad194f13dd952a@localhost.localdomain>
Download mbox | patch
Permalink /patch/33161/
State Not Applicable
Headers show

Comments

phabricator - Aug. 3, 2018, 4:55 p.m.
pulkit updated this revision to Diff 9830.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4058?vs=9797&id=9830

REVISION DETAIL
  https://phab.mercurial-scm.org/D4058

AFFECTED FILES
  mercurial/narrowspec.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py
--- a/mercurial/narrowspec.py
+++ b/mercurial/narrowspec.py
@@ -19,29 +19,6 @@ 
 
 FILENAME = 'narrowspec'
 
-def _parsestoredpatterns(text):
-    """Parses the narrowspec format that's stored on disk."""
-    patlist = None
-    includepats = []
-    excludepats = []
-    for l in text.splitlines():
-        if l == '[includes]':
-            if patlist is None:
-                patlist = includepats
-            else:
-                raise error.Abort(_('narrowspec includes section must appear '
-                                    'at most once, before excludes'))
-        elif l == '[excludes]':
-            if patlist is not excludepats:
-                patlist = excludepats
-            else:
-                raise error.Abort(_('narrowspec excludes section must appear '
-                                    'at most once'))
-        else:
-            patlist.append(l)
-
-    return set(includepats), set(excludepats)
-
 def parseserverpatterns(text):
     """Parses the narrowspec format that's returned by the server."""
     includepats = set()