Fri, 06 Mar 2020 17:51:03 +0100 rust-status: wrap `stat_dmap_entries` to ease profiling
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Mar 2020 17:51:03 +0100] rev 44548
rust-status: wrap `stat_dmap_entries` to ease profiling Differential Revision: https://phab.mercurial-scm.org/D8250
Fri, 06 Mar 2020 17:48:30 +0100 rust-status: refactor handling of unknown files
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Mar 2020 17:48:30 +0100] rev 44547
rust-status: refactor handling of unknown files Differential Revision: https://phab.mercurial-scm.org/D8249
Wed, 19 Feb 2020 11:14:30 +0100 rust-status: move to recursive traversal to prepare for parallel traversal
Raphaël Gomès <rgomes@octobus.net> [Wed, 19 Feb 2020 11:14:30 +0100] rev 44546
rust-status: move to recursive traversal to prepare for parallel traversal I have looked into traversing the working directory in parallel either by a recursive or an iterative algorithm. The recursive approach won quite decisively both in terms of performance and code readability. You can look at my experiment here: https://heptapod.octobus.net/Alphare/rayon-recursive-traversal The chance of a stack overflow happening because the directories get too nested seems slim. This change does not yet do anything in parallel. Differential Revision: https://phab.mercurial-scm.org/D8215
Wed, 04 Mar 2020 15:10:11 +0100 rust-pathauditor: use interior mutability for use in multi-threaded contexts
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:10:11 +0100] rev 44545
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
Wed, 04 Mar 2020 15:12:08 +0100 rust-pathauditor: actually populate the `audited_dirs` cache
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:12:08 +0100] rev 44544
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
Wed, 04 Mar 2020 15:10:03 +0100 rust-pathauditor: actually split Windows shortname aliases at `~`
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 Mar 2020 15:10:03 +0100] rev 44543
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
Thu, 05 Mar 2020 10:24:45 +0100 debuginstall: add entry about re2 Rust bindings when applicable
Raphaël Gomès <rgomes@octobus.net> [Thu, 05 Mar 2020 10:24:45 +0100] rev 44542
debuginstall: add entry about re2 Rust bindings when applicable Differential Revision: https://phab.mercurial-scm.org/D8226
Thu, 05 Mar 2020 10:24:10 +0100 rust-cpython: add `debug` module to expose debug information to Python
Raphaël Gomès <rgomes@octobus.net> [Thu, 05 Mar 2020 10:24:10 +0100] rev 44541
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
Fri, 24 Jan 2020 11:06:01 +0100 rust-status: use bare hg status fastpath from Python
Raphaël Gomès <rgomes@octobus.net> [Fri, 24 Jan 2020 11:06:01 +0100] rev 44540
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
Fri, 17 Jan 2020 15:09:02 +0100 rust-status: update rust-cpython bridge to account for the changes in core
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:09:02 +0100] rev 44539
rust-status: update rust-cpython bridge to account for the changes in core Differential Revision: https://phab.mercurial-scm.org/D7930
Fri, 17 Jan 2020 15:43:46 +0100 rust-status: add bare `hg status` support in hg-core
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:43:46 +0100] rev 44538
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
Thu, 06 Feb 2020 14:32:16 +0100 rust-status: add function for sequential traversal of the working directory
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:32:16 +0100] rev 44537
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
Thu, 06 Feb 2020 14:34:54 +0100 rust-status: add missing variants to `Dispatch` enum
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:34:54 +0100] rev 44536
rust-status: add missing variants to `Dispatch` enum Differential Revision: https://phab.mercurial-scm.org/D8088
Thu, 06 Feb 2020 14:28:35 +0100 rust-status: rename `StatusResult` to `DirstateStatus`
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:28:35 +0100] rev 44535
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
Thu, 06 Feb 2020 14:25:59 +0100 rust-status: refactor options into a `StatusOptions` struct
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Feb 2020 14:25:59 +0100] rev 44534
rust-status: refactor options into a `StatusOptions` struct Differential Revision: https://phab.mercurial-scm.org/D8086
Fri, 17 Jan 2020 15:37:24 +0100 rust-status: add util for listing a directory
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:37:24 +0100] rev 44533
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
Fri, 17 Jan 2020 11:53:31 +0100 rust-matchers: add `IgnoreMatcher`
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:53:31 +0100] rev 44532
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
Fri, 17 Jan 2020 11:32:02 +0100 rust-matchers: add `build_regex_match` function
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:32:02 +0100] rev 44531
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
Fri, 17 Jan 2020 11:31:12 +0100 rust-matchers: add functions to get roots, dirs and parents from patterns
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:31:12 +0100] rev 44530
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
Fri, 17 Jan 2020 11:29:33 +0100 rust-matchers: add function to generate a regex matcher function
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 11:29:33 +0100] rev 44529
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
Tue, 10 Mar 2020 16:04:30 +0100 run-tests: restrict Rust thread pool to 3 threads during tests
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Mar 2020 16:04:30 +0100] rev 44528
run-tests: restrict Rust thread pool to 3 threads during tests Differential Revision: https://phab.mercurial-scm.org/D8270
Fri, 28 Feb 2020 00:31:14 +0100 nodemap: make sure the nodemap docket is updated after the changelog
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 00:31:14 +0100] rev 44527
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
Fri, 28 Feb 2020 00:29:18 +0100 nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 00:29:18 +0100] rev 44526
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
Thu, 27 Feb 2020 16:32:43 +0100 nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 16:32:43 +0100] rev 44525
nodemap: track the tip_node for validation Differential Revision: https://phab.mercurial-scm.org/D8184
Thu, 27 Feb 2020 15:42:04 +0100 nodemap: add a todo list for getting out of experimental
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 15:42:04 +0100] rev 44524
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
Tue, 18 Feb 2020 15:19:11 +0100 rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 15:19:11 +0100] rev 44523
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
Tue, 18 Feb 2020 18:32:55 +0100 nodemap: use data from the index in debugnodemap --dump-new
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 18:32:55 +0100] rev 44522
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
Wed, 12 Feb 2020 10:53:24 +0100 rust-nodemap: also clear Rust data in `clearcaches`
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:53:24 +0100] rev 44521
rust-nodemap: also clear Rust data in `clearcaches` Differential Revision: https://phab.mercurial-scm.org/D8161
Wed, 12 Feb 2020 10:53:19 +0100 rust-nodemap: add binding to `nodemap_update_data`
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:53:19 +0100] rev 44520
rust-nodemap: add binding to `nodemap_update_data` Differential Revision: https://phab.mercurial-scm.org/D8160
Wed, 12 Feb 2020 10:52:30 +0100 rust-nodemap: add binding for `nodemap_data_incremental`
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:52:30 +0100] rev 44519
rust-nodemap: add binding for `nodemap_data_incremental` Differential Revision: https://phab.mercurial-scm.org/D8159
Wed, 12 Feb 2020 10:51:17 +0100 rust-nodemap: add binding for `nodemap_data_all`
Georges Racinet <georges.racinet@octobus.net> [Wed, 12 Feb 2020 10:51:17 +0100] rev 44518
rust-nodemap: add binding for `nodemap_data_all` Differential Revision: https://phab.mercurial-scm.org/D8158
Wed, 12 Feb 2020 10:33:55 +0100 rust-nodemap: use proper Index API instead of using the C API
Raphaël Gomès <rgomes@octobus.net> [Wed, 12 Feb 2020 10:33:55 +0100] rev 44517
rust-nodemap: use proper Index API instead of using the C API Differential Revision: https://phab.mercurial-scm.org/D8157
Tue, 11 Feb 2020 16:30:28 +0100 rust-nodemap: add utils for propagating errors
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:30:28 +0100] rev 44516
rust-nodemap: add utils for propagating errors This also updates the copyright notice Differential Revision: https://phab.mercurial-scm.org/D8156
Tue, 11 Feb 2020 16:25:45 +0100 rust-nodemap: add utils to create `Node`s from Python objects
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:25:45 +0100] rev 44515
rust-nodemap: add utils to create `Node`s from Python objects Differential Revision: https://phab.mercurial-scm.org/D8155
Tue, 11 Feb 2020 16:23:06 +0100 rust-index: add `append` method to cindex/Index
Georges Racinet <georges.racinet@octobus.net> [Tue, 11 Feb 2020 16:23:06 +0100] rev 44514
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
Mon, 13 Jan 2020 19:56:16 +0100 rust-index: moved constructor in separate impl block
Georges Racinet <georges.racinet@octobus.net> [Mon, 13 Jan 2020 19:56:16 +0100] rev 44513
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
Mon, 13 Jan 2020 19:31:33 +0100 revlog: using two new functions in C capsule from Rust code
Georges Racinet <georges.racinet@octobus.net> [Mon, 13 Jan 2020 19:31:33 +0100] rev 44512
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
Tue, 18 Feb 2020 19:11:14 +0100 nodemap: refresh the persistent data on nodemap creation
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 Feb 2020 19:11:14 +0100] rev 44511
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
Wed, 11 Mar 2020 05:41:02 +0100 tests: check availability of pyflakes by trying to import pyflakes module
Manuel Jacob <me@manueljacob.de> [Wed, 11 Mar 2020 05:41:02 +0100] rev 44510
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.
Thu, 27 Feb 2020 22:34:45 +0100 nodemap: deal with the "debugupdatecache" case using a "fake" transaction
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 22:34:45 +0100] rev 44509
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
Fri, 28 Feb 2020 01:45:03 +0100 changelog: change the implementation of `_divertopener`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 Feb 2020 01:45:03 +0100] rev 44508
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
Thu, 27 Feb 2020 17:08:59 +0100 nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 17:08:59 +0100] rev 44507
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
Thu, 27 Feb 2020 16:09:17 +0100 nodemap: document the docket attributes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 Feb 2020 16:09:17 +0100] rev 44506
nodemap: document the docket attributes More documentation rarely hurts. Differential Revision: https://phab.mercurial-scm.org/D8182
Tue, 10 Mar 2020 13:10:53 -0400 git: key off `git` in .hg/requires rather than separate file
Augie Fackler <raf@durin42.com> [Tue, 10 Mar 2020 13:10:53 -0400] rev 44505
git: key off `git` in .hg/requires rather than separate file Differential Revision: https://phab.mercurial-scm.org/D8265
Tue, 10 Mar 2020 13:10:45 -0400 git: correctly handle p1() on dirstate when underlying git repo is empty
Augie Fackler <raf@durin42.com> [Tue, 10 Mar 2020 13:10:45 -0400] rev 44504
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
Tue, 10 Mar 2020 14:24:08 +0100 rust: clean remains of direct-ffi code
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 10 Mar 2020 14:24:08 +0100] rev 44503
rust: clean remains of direct-ffi code Since b55bec1ea972, the cext entry poitn have been removed, so we drop the code for consistency.
Fri, 06 Mar 2020 17:02:50 +0100 heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 06 Mar 2020 17:02:50 +0100] rev 44502
heptapod-ci: use the new `--rust/--no-rust` flag to run the tests
Fri, 06 Mar 2020 11:16:15 +0100 run-tests: add option for running with and without Rust extensions
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Mar 2020 11:16:15 +0100] rev 44501
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.
(0) -30000 -10000 -3000 -1000 -300 -100 -48 +48 +100 +300 +1000 +3000 tip