Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:10:11 +0100] rev 44535
rust-pathauditor: use interior mutability for use in multi-threaded contexts
The usual recommendation for using `RwLock` or `Mutex` is that if there are
about as many write as there are reads, use `Mutex`, and if there are more
reads than writes, use `RwLock`.
If after the main bottleneck (i.e. parallel traversal) is removed this shows
up on profiles, we should investigate using the `parking_lot` since we don't
need a poisoning API, or maybe move to different types of caches entirely.
Differential Revision: https://phab.mercurial-scm.org/D8213
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:12:08 +0100] rev 44534
rust-pathauditor: actually populate the `audited_dirs` cache
I forgot this when rewriting this logic during the review process.
Differential Revision: https://phab.mercurial-scm.org/D8212
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:10:03 +0100] rev 44533
rust-pathauditor: actually split Windows shortname aliases at `~`
Right now, splitting with a max of 1 parts is useless.
Differential Revision: https://phab.mercurial-scm.org/D8211
Raphaël Gomès <rgomes@octobus.net> [Thu, 05 Mar 2020 10:24:45 +0100] rev 44532
debuginstall: add entry about re2 Rust bindings when applicable
Differential Revision: https://phab.mercurial-scm.org/D8226
Raphaël Gomès <rgomes@octobus.net> [Thu, 05 Mar 2020 10:24:10 +0100] rev 44531
rust-cpython: add `debug` module to expose debug information to Python
This will be mostly used in `debuginstall`.
Differential Revision: https://phab.mercurial-scm.org/D8225
Raphaël Gomès <rgomes@octobus.net> [Fri, 24 Jan 2020 11:06:01 +0100] rev 44530
rust-status: use bare hg status fastpath from Python
This change also adds a test case for subrepos.
Repeating the benchmark information from the `hg-core` commit:
On the Netbeans repository:
C: 840ms
Rust+C: 556ms
Mozilla Central with the one pattern that causes a fallback removed:
C: 2.315s
Rust+C: 1.700s
Differential Revision: https://phab.mercurial-scm.org/D7931
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:09:02 +0100] rev 44529
rust-status: update rust-cpython bridge to account for the changes in core
Differential Revision: https://phab.mercurial-scm.org/D7930
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:43:46 +0100] rev 44528
rust-status: add bare `hg status` support in hg-core
A lot of performance remains to be gained, most notably by doing more things
in parallel, but also by caching, not falling back to Python but switching
to another regex engine, etc..
I have measured on multiple repositories that this change, when in combination
with the next two patches, improve bare `hg status` performance, and has no
observable impact when falling back (because it does so early).
On the Netbeans repository:
C: 840ms
Rust+C: 556ms
Mozilla Central with the one pattern that causes a fallback removed:
C: 2.315s
Rust+C: 1.700 s
Differential Revision: https://phab.mercurial-scm.org/D7929
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:32:16 +0100] rev 44527
rust-status: add function for sequential traversal of the working directory
This change also introduces helper structs to make things clearer.
Differential Revision: https://phab.mercurial-scm.org/D7928
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:34:54 +0100] rev 44526
rust-status: add missing variants to `Dispatch` enum
Differential Revision: https://phab.mercurial-scm.org/D8088
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:28:35 +0100] rev 44525
rust-status: rename `StatusResult` to `DirstateStatus`
"Result" has a special meaning in the Rust world, this should be clearer.
Differential Revision: https://phab.mercurial-scm.org/D8087
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:25:59 +0100] rev 44524
rust-status: refactor options into a `StatusOptions` struct
Differential Revision: https://phab.mercurial-scm.org/D8086
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:37:24 +0100] rev 44523
rust-status: add util for listing a directory
I debated moving it to utils, but it is not used anywhere else for now, and
its skip behavior is pretty specific to status.
Differential Revision: https://phab.mercurial-scm.org/D7927
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:53:31 +0100] rev 44522
rust-matchers: add `IgnoreMatcher`
This is a big change but all of the pieces call each other, so it makes sense
to have this all in one patch.
Differential Revision: https://phab.mercurial-scm.org/D7925
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:32:02 +0100] rev 44521
rust-matchers: add `build_regex_match` function
This function will be used to help build the upcoming `IncludeMatcher`.
Differential Revision: https://phab.mercurial-scm.org/D7924
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:31:12 +0100] rev 44520
rust-matchers: add functions to get roots, dirs and parents from patterns
These functions will be used to help build the upcoming `IncludeMatcher`.
Differential Revision: https://phab.mercurial-scm.org/D7923
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:29:33 +0100] rev 44519
rust-matchers: add function to generate a regex matcher function
This function will be used to help build the upcoming `IncludeMatcher`. While
Re2 is still used and behind a feature flag, this function returns an error
meant for fallback in the default case.
Differential Revision: https://phab.mercurial-scm.org/D7922
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Mar 2020 16:04:30 +0100] rev 44518
run-tests: restrict Rust thread pool to 3 threads during tests
Differential Revision: https://phab.mercurial-scm.org/D8270
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 00:31:14 +0100] rev 44517
nodemap: make sure the nodemap docket is updated after the changelog
It is better to have a lagging nodemap than a nodemap pointing to node that does
not exists yet.
(strictly speaking, the order was already right, however we make it more
explicit).
Differential Revision: https://phab.mercurial-scm.org/D8188
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 00:29:18 +0100] rev 44516
nodemap: make sure hooks have access to an up-to-date version
We make sure hooks can read persistent nodemap data and that they access
something up-to-date with the pending transaction.
Differential Revision: https://phab.mercurial-scm.org/D8187
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 16:32:43 +0100] rev 44515
nodemap: track the tip_node for validation
Differential Revision: https://phab.mercurial-scm.org/D8184
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 15:42:04 +0100] rev 44514
nodemap: add a todo list for getting out of experimental
This is all the requirement I can think off. More might be added as they emerge.
The first ones are mostly simple technical matters that will be taken care of
soon. The question about the "status" of the persistent nodemap and the revlogs
that will use it requires more discussion and thinking.
Differential Revision: https://phab.mercurial-scm.org/D8181
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 15:19:11 +0100] rev 44513
rust-nodemap: automatically use the rust index for persistent nodemap
The persistent nodemap requires the rust index to be used to provides any gains.
So we automatically enable it for revlog using the persistent nodemap. We keep
it off for other revset because now that the rust revlog fully initialise the
nodemap using it everywhere introduce a fairly significant regression (eg: hg
diff moving from 0.8s to 2.3s on mozilla-try)
Differential Revision: https://phab.mercurial-scm.org/D8164
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 18:32:55 +0100] rev 44512
nodemap: use data from the index in debugnodemap --dump-new
It is better to run the actual code when generating a new nodemap cache from
scratch. So we do.
Differential Revision: https://phab.mercurial-scm.org/D8163
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:53:24 +0100] rev 44511
rust-nodemap: also clear Rust data in `clearcaches`
Differential Revision: https://phab.mercurial-scm.org/D8161
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:53:19 +0100] rev 44510
rust-nodemap: add binding to `nodemap_update_data`
Differential Revision: https://phab.mercurial-scm.org/D8160
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:52:30 +0100] rev 44509
rust-nodemap: add binding for `nodemap_data_incremental`
Differential Revision: https://phab.mercurial-scm.org/D8159
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:51:17 +0100] rev 44508
rust-nodemap: add binding for `nodemap_data_all`
Differential Revision: https://phab.mercurial-scm.org/D8158
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Feb 2020 10:33:55 +0100] rev 44507
rust-nodemap: use proper Index API instead of using the C API
Differential Revision: https://phab.mercurial-scm.org/D8157
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:30:28 +0100] rev 44506
rust-nodemap: add utils for propagating errors
This also updates the copyright notice
Differential Revision: https://phab.mercurial-scm.org/D8156
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:25:45 +0100] rev 44505
rust-nodemap: add utils to create `Node`s from Python objects
Differential Revision: https://phab.mercurial-scm.org/D8155
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:23:06 +0100] rev 44504
rust-index: add `append` method to cindex/Index
This will be used by `MixedIndex` in a later patch.
Differential Revision: https://phab.mercurial-scm.org/D8154
Georges Racinet <georges.racinet@octobus.net> [Mon, 13 Jan 2020 19:56:16 +0100] rev 44503
rust-index: moved constructor in separate impl block
with the upcoming addition of the nodemap logic, it's going to become
more complicated.
Being in the separate impl block has the advantage to be subject to rustfmt,
whereas code inside macro calls isn't.
Differential Revision: https://phab.mercurial-scm.org/D8153
Georges Racinet <georges.racinet@octobus.net> [Mon, 13 Jan 2020 19:31:33 +0100] rev 44502
revlog: using two new functions in C capsule from Rust code
We expose `index_length` and `index_node` in the C capsule, so that
the Rust representation of the C index can implement the `RevlogIndex`
trait.
Because our `Node` is actually a one-field struct, we have
to decorate it for direct FFI exchange with the C `char*`
It would be a good thing to get a length from the C layer, but doing
so right now would probably interfere with the upcoming changes that
will happen there for the hash length.
Differential Revision: https://phab.mercurial-scm.org/D8152
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 19:11:14 +0100] rev 44501
nodemap: refresh the persistent data on nodemap creation
The logic to read the data and validate the docket are still in python, so we
need to "help" whatever compiled code live in the index to refresh it.
Otherwise clearing the cache could lead to an expensive full recomputation and
disk update even when the persisted data are still valid.
Differential Revision: https://phab.mercurial-scm.org/D8174
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Mar 2020 15:23:47 +0100] rev 44500
cext-index: propagate inline_scan error in `index_deref`
Before this change, revlog index corruption could be silently ignored in some
situation.
Differential Revision: https://phab.mercurial-scm.org/D8276
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 12 Mar 2020 18:53:37 +0100] rev 44499
heptapod-ci: fix test paths in the listing file
Now what we run the test from the root, we need to list test name from the root.
Differential Revision: https://phab.mercurial-scm.org/D8275
Manuel Jacob <me@manueljacob.de> [Wed, 11 Mar 2020 05:41:02 +0100] rev 44498
tests: check availability of pyflakes by trying to import pyflakes module
Since
e397c6d74652, we use the pyflakes module instead of the pyflakes
executable. As was pointed out during the review, the hghave check can be
rewritten to try to import the pyflakes module instead of spawning a new
subprocess.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 22:34:45 +0100] rev 44497
nodemap: deal with the "debugupdatecache" case using a "fake" transaction
We are going to need more and more methods of the transaction. So lets change
approach. The `hg debugupdatecache` case do not need a transaction, because has
the repositories locked, but is not adding any "store" data to it.
Differential Revision: https://phab.mercurial-scm.org/D8186
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 01:45:03 +0100] rev 44496
changelog: change the implementation of `_divertopener`
During a transaction, new data to the changelog index are "diverted". The
previous implementat ways pretty basic, we need something better to be able to
use the changelog vfs fully during transaction. (eg: accessing the vfs options).
Differential Revision: https://phab.mercurial-scm.org/D8185
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 17:08:59 +0100] rev 44495
nodemap: test that an outdated nodemap can catch up
If the persistent nodemap does not contains all revision that the index
contains, this is should be detected and dealt with. We add a test for this
case.
Differential Revision: https://phab.mercurial-scm.org/D8183
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 16:09:17 +0100] rev 44494
nodemap: document the docket attributes
More documentation rarely hurts.
Differential Revision: https://phab.mercurial-scm.org/D8182
Augie Fackler <raf@durin42.com> [Tue, 10 Mar 2020 13:10:53 -0400] rev 44493
git: key off `git` in .hg/requires rather than separate file
Differential Revision: https://phab.mercurial-scm.org/D8265
Augie Fackler <raf@durin42.com> [Tue, 10 Mar 2020 13:10:45 -0400] rev 44492
git: correctly handle p1() on dirstate when underlying git repo is empty
This shows up in my next change, which ends up making an empty git
repo and then running hg.
Differential Revision: https://phab.mercurial-scm.org/D8271
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 14:24:08 +0100] rev 44491
rust: clean remains of direct-ffi code
Since
b55bec1ea972, the cext entry poitn have been removed, so we drop the code
for consistency.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Mar 2020 17:02:50 +0100] rev 44490
heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Mar 2020 11:16:15 +0100] rev 44489
run-tests: add option for running with and without Rust extensions
This provide a simple and clear way to run the test with or without rust.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Mar 2020 16:24:50 +0100] rev 44488
run-tests: rename "pure" variable to setup_opts
There are more useful flag than just `--pure`. We clarify the variable name
before adding more options.