Patchwork D2190: narrowspec: document constraints when validating patterns

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 11:18 p.m.
Message ID <735ccc82560caf3ba5021cbde60492c9@localhost.localdomain>
Download mbox | patch
Permalink /patch/27738/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 11:18 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9c55bbc29dcf: narrowspec: document constraints when validating patterns (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2190?vs=5506&id=5560

REVISION DETAIL
  https://phab.mercurial-scm.org/D2190

AFFECTED FILES
  hgext/narrow/narrowspec.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

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.