# HG changeset patch # User Augie Fackler # Date 1518463652 18000 # Node ID 9c55bbc29dcf45285a9ba72a73e64750b7b0e2ee # Parent 66b4ffe90676ee280e1f812dbab0552114d9d7f1 narrowspec: document constraints when validating patterns Differential Revision: https://phab.mercurial-scm.org/D2190 diff --git a/hgext/narrow/narrowspec.py b/hgext/narrow/narrowspec.py --- a/hgext/narrow/narrowspec.py +++ b/hgext/narrow/narrowspec.py @@ -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.