Augie Fackler <augie@google.com> [Wed, 25 Mar 2020 11:56:47 -0400] rev 44610
setup: relax -Werror for declaration-after-statement on Python 3.9
It turns out Python 3.9 introduces such declarations in the headers, eg
cpython/abstract.h:189:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
so we have to be more relaxed when compiling for 3.9.
Differential Revision: https://phab.mercurial-scm.org/D8327
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2020 08:28:20 -0700] rev 44609
pvec: drop an unused `from __future__ import division`
This module only uses the `//` operator (for integer division).
Differential Revision: https://phab.mercurial-scm.org/D8326
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2020 23:31:36 -0700] rev 44608
py3: use integer division in histedit
Histedit uses the `/` operator, which does type conversion to float in
Python 3 instead of integer division likeon Python 2. Let's preserve
the Python 2 behavior by importing and using the `//` operator.
Differential Revision: https://phab.mercurial-scm.org/D8324
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Mar 2020 10:06:32 +0100] rev 44607
rust: update README to reflect use of `regex` crate
Differential Revision: https://phab.mercurial-scm.org/D8325
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Mar 2020 12:11:41 +0100] rev 44606
rust: update all dependencies
We do this periodically to say up to date.
No major versions were crossed this time per se, but the `rand` is still in v0,
and their 0.7x series broke three things:
- Some distribution-related elements were moved to a separate crate,
flashing a deprecation warning
- The `LogNormal::new` associated function now returns a `Result`
- Certain RNGs were updated to sample a `u32` instead of `usize` when their
upper-bound is less than `u32::MAX` for better portability, which changed
the output for 2 tests.
Moreover, the recent use of the `regex` crate for ignore mechanisms prompted
some benchmarking that revealed that `regex` was slower at compiling big regex
than `Re2`. The author of `regex` was very quick to discover an optimization
that yielded a 30% improvement. It's still slower than `Re2` in that regard, but
less so in the 1.3.6 release.
Differential Revision: https://phab.mercurial-scm.org/D8320
Raphaël Gomès <rgomes@octobus.net> [Mon, 23 Mar 2020 12:07:45 +0100] rev 44605
rust: update micro-timer dependency
The new version uses a much more robust technique and should remove any existing
risk of bad compiler error or performance hit.
Differential Revision: https://phab.mercurial-scm.org/D8319
Raphaël Gomès <rgomes@octobus.net> [Fri, 20 Mar 2020 15:21:34 +0100] rev 44604
rust-status: only involve ignore mechanism when needed
This prevents unnecessary fallbacks to Python, improving performance for
`hg update` for instance.
On Mozilla-Central a noop update goes from 1.6s down to 700ms.
Differential Revision: https://phab.mercurial-scm.org/D8315
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Mar 2020 00:07:12 +0900] rev 44603
templater: fix cbor() filter to recursively convert smartset to list
The previous attempt, e3e44e6e7245 "templater: fix cbor() filter to accept
smartset", was incomplete since obj may be a collection containing a smartset.
This works around the problem by converting smartsets recursively. Another
option is to teach cborutil how to encode a smartset. That should be okay,
but I hesitated to add "import smartset" to cborutil.py as the cborutil is
pretty generic.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2020 15:14:42 -0700] rev 44602
shelve: split up dounshelve() in unshelvecmd() and _dounshelve()
I'd like to be able to override the new `_dounshelve()`, getting
access to the name of the shelve to unshelve. `unshelvecmd()` seems to
better match the existing `createcmd()`, `listcmd()` etc.
Differential Revision: https://phab.mercurial-scm.org/D8322
Raphaël Gomès <rgomes@octobus.net> [Tue, 24 Mar 2020 17:55:59 +0100] rev 44601
rust-matchers: use the `regex` crate
Instead of falling back to Python when a code path with "ignore" functionality
is reached and `Re2` is not installed, the default compilation (i.e. without
the `with-re2` feature) will use the `regex` crate for all regular expressions
business.
As with the introduction of `Re2` in a previous series, this yields a big
performance boost compared to the Python + C code in `status`, `diff`, `commit`,
`update`, and maybe others.
For now `Re2` looks to be faster at compiling the DFA (1.5ms vs 5ms for
Netbeans' `.hgignore`) and a bit faster in actual use: (123ms vs 137ms for
the parallel traversal of Netbeans' clean repo). I am in talks with the author
of `regex` to see whether that performance difference is a bug, a "won't fix",
or a tuning issue.
The `regex` crate is already one of our dependencies and using this code does
not require any additional work from the end-user than to use the Rust
extensions.
Differential Revision: https://phab.mercurial-scm.org/D8323