Mercurial > public > mercurial-scm > hg-stable
diff hgext/sparse.py @ 33551:1d1779734c99
sparse: require [section] in sparse config files (BC)
Previously, [include] was implicit and pattern lines before a
[section] were added to includes.
Because the format may change in the future and explicit behavior,
well, more explicit, this commit changes the config parser to
reject pattern lines that don't occur in a [section].
Differential Revision: https://phab.mercurial-scm.org/D96
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 15 Jul 2017 13:21:23 -0700 |
parents | 258298f4712b |
children | e1c56486d1aa |
line wrap: on
line diff
--- a/hgext/sparse.py Sat Jul 15 13:07:57 2017 -0700 +++ b/hgext/sparse.py Sat Jul 15 13:21:23 2017 -0700 @@ -35,8 +35,7 @@ The special lines ``[include]`` and ``[exclude]`` denote the section for includes and excludes that follow, respectively. It is illegal to -have ``[include]`` after ``[exclude]``. If no sections are defined, -entries are assumed to be in the ``[include]`` section. +have ``[include]`` after ``[exclude]``. Non-special lines resemble file patterns to be added to either includes or excludes. The syntax of these lines is documented by :hg:`help patterns`.