changeset 38477:de275ab362cb

stringutil: update list of re-special characters to include &~ I missed this because I was looking at the change that refactored re.escape, and these characters were added in https://github.com/python/cpython/commit/05cb728d68a278d11466f9a6c8258d914135c96c. Differential Revision: https://phab.mercurial-scm.org/D3850
author Augie Fackler <augie@google.com>
date Wed, 27 Jun 2018 10:21:07 -0400
parents b4cfd803b3f2
children b2d5ad03f31a
files mercurial/utils/stringutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/stringutil.py	Tue Jun 26 11:38:58 2018 -0400
+++ b/mercurial/utils/stringutil.py	Wed Jun 27 10:21:07 2018 -0400
@@ -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):