This is an archive of the discontinued Mercurial Phabricator instance.

stringutil: add a new function to do minimal regex escaping
AbandonedPublic

Authored by durin42 on Jun 26 2018, 11:21 AM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Per https://bugs.python.org/issue29995, re.escape() used to
over-escape regular expression strings, but in Python 3.7 that's been
fixed, which also improved the performance of re.escape(). Since it's
both an output change for us *and* a perfomance win, let's just
effectively backport the new behavior to hg on all Python versions.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped