# HG changeset patch # User Augie Fackler # Date 2018-06-27 14:21:07 # Node ID de275ab362cb37d9a6fc166fbe158ebcad93d373 # Parent b4cfd803b3f2697928be9b3a96787bcee3447c7e 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 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 @@ from .. import ( # 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):