D4058: narrowspec: remove the unused _parsestoredpatterns() function
This revision was automatically updated to reflect the committed changes. Closed by commit rHG794afa91f0a5: narrowspec: remove the unused _parsestoredpatterns() function (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4058?vs=9830=9870 REVISION DETAIL https://phab.mercurial-scm.org/D4058 AFFECTED FILES mercurial/narrowspec.py CHANGE DETAILS 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() To: pulkit, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4058: narrowspec: remove the unused _parsestoredpatterns() function
pulkit updated this revision to Diff 9830. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4058?vs=9797=9830 REVISION DETAIL https://phab.mercurial-scm.org/D4058 AFFECTED FILES mercurial/narrowspec.py CHANGE DETAILS 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() To: pulkit, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4058: narrowspec: remove the unused _parsestoredpatterns() function
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previous patch started using sparse.parseconfig() to read narrowspec and now we don't need this function. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4058 AFFECTED FILES mercurial/narrowspec.py CHANGE DETAILS 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() To: pulkit, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel