Patchwork D3850: stringutil: update list of re-special characters to include &~

login
register
mail settings
Submitter phabricator
Date June 27, 2018, 2:40 p.m.
Message ID <b38f78618304ae0104ef040408ffed91@localhost.localdomain>
Download mbox | patch
Permalink /patch/32463/
State Not Applicable
Headers show

Comments

phabricator - June 27, 2018, 2:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGde275ab362cb: stringutil: update list of re-special characters to include &amp;~ (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3850?vs=9323&id=9325

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

AFFECTED FILES
  mercurial/utils/stringutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/utils/stringutil.py b/mercurial/utils/stringutil.py
--- a/mercurial/utils/stringutil.py
+++ b/mercurial/utils/stringutil.py
@@ -25,7 +25,7 @@ 
 
 # regex special chars pulled from https://bugs.python.org/issue29995
 # which was part of Python 3.7.
-_respecial = pycompat.bytestr(b'()[]{}?*+-|^$\\.# \t\n\r\v\f')
+_respecial = pycompat.bytestr(b'()[]{}?*+-|^$\\.&~# \t\n\r\v\f')
 _regexescapemap = {ord(i): (b'\\' + i).decode('latin1') for i in _respecial}
 
 def reescape(pat):