status: update comment to reflect the more recent situation
This is a gratuitous cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8516
hooks: provide access to transaction changes for internal hooks
External hooks are skipped here as the environment often has a size
limit in the low MBs and that can easily be reached by larger
transactions.
Differential Revision: https://phab.mercurial-scm.org/D8490
rust-regex: add test for verbatim regex syntax
This makes sure it's not modified.
Differential Revision: https://phab.mercurial-scm.org/D8508
rust-regex: prevent nonsensical `.*.*` pattern from happening
Differential Revision: https://phab.mercurial-scm.org/D8507
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
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
setup: raise minimum Python version to 2.7.4
On older Python versions, Mercurial is not really usable because of
https://bugs.python.org/
issue10211.
Recently someone reported a crash on the mailing list when running Mercurial
on Python 2.7.3. There was consensus that fixing compatibility for a Python
version more than 7 years old is not worth it. So, instead of making Mercurial
crash with an obscure exception, this patch raises the minimum Python version
to 2.7.4.
fsmonitor: coerce `clock` variable to byte-string (
issue6321)
Callers of `fsmonitor.state.setlastclock` pass their arguments
wrapped in `pycompat.sysbytes` to ensure the value is a `bytes`
on Python 3. However in `fsmonitor.poststatus.__call__`, if the
return value of `getlastclock()` is `None`, we use the value of
`fsmonitor.poststatus._startclock` instead, which is not converted
to a byte string in the same manner. This commit converts the
value of `startclock` to a byte string using `pycompat.sysbytes`
in the constructor for `poststatus`, to avoid the "`str` + `bytes`"
error from issue 6321.
Differential Revision: https://phab.mercurial-scm.org/D8573