Mercurial > hg
changeset 38840:794afa91f0a5
narrowspec: remove the unused _parsestoredpatterns() function
Previous patch started using sparse.parseconfig() to read narrowspec and now we
don't need this function.
Differential Revision: https://phab.mercurial-scm.org/D4058
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Thu, 02 Aug 2018 22:44:41 +0300 |
parents | f64ebe7d2259 |
children | df0873ab5c14 |
files | mercurial/narrowspec.py |
diffstat | 1 files changed, 0 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/narrowspec.py Fri Aug 03 22:29:04 2018 +0530 +++ b/mercurial/narrowspec.py Thu Aug 02 22:44:41 2018 +0300 @@ -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()