Mercurial > hg
changeset 36098:9c55bbc29dcf
narrowspec: document constraints when validating patterns
Differential Revision: https://phab.mercurial-scm.org/D2190
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 12 Feb 2018 14:27:32 -0500 |
parents | 66b4ffe90676 |
children | b8bbe589fd47 |
files | hgext/narrow/narrowspec.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/narrow/narrowspec.py Mon Feb 12 14:15:52 2018 -0500 +++ b/hgext/narrow/narrowspec.py Mon Feb 12 14:27:32 2018 -0500 @@ -83,7 +83,11 @@ return len((s + 'x').splitlines()) def _validatepattern(pat): - """Validates the pattern and aborts if it is invalid.""" + """Validates the pattern and aborts if it is invalid. + + Patterns are stored in the narrowspec as newline-separated + POSIX-style bytestring paths. There's no escaping. + """ # We use newlines as separators in the narrowspec file, so don't allow them # in patterns.