Raphaël Gomès <rgomes@octobus.net> [Thu, 07 May 2020 23:53:12 +0200] rev 44892
rust-regex: prevent nonsensical `.*.*` pattern from happening
Differential Revision: https://phab.mercurial-scm.org/D8507
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 May 2020 23:52:08 +0200] rev 44891
rust-regex: fix issues with regex anchoring and performance
It turns out that the way I tried to work around `regex`'s behavior difference
with `re2` and Python's `re` was 1) buggy and 2) much more complicated than
needed.
In a few words:
`regex` adds `.*` on either side of patterns when no start or end anchor is
present. My previous workaround put `^` or `$` for every pattern, which is
wrong even without the other 2 bugs on top of it.
Using `^(?:<patterns>)` right at the end of the `regex` path fixes the issue.
I've opened an issue to get a build option instead:
https://github.com/rust-lang/regex/issues/675
Differential Revision: https://phab.mercurial-scm.org/D8506
Augie Fackler <augie@google.com> [Thu, 07 May 2020 16:56:03 -0400] rev 44890
diff: avoid going from contexts to nodes and back
This will allow us to pass in-memory contexts that may not have a
valid node to the diffing logic.
Differential Revision: https://phab.mercurial-scm.org/D8503