Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 15:50:14 +0200] rev 51234
rust-index: add support for delta-chain computation
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 15:01:34 +0200] rev 51233
rust-index: add support for `find_snapshots`
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 12:05:32 +0200] rev 51232
rust-index: add `is_snapshot` method
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 16:49:33 +0200] rev 51231
rust-index: use the Rust index in `partialmatch`
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 14:50:17 +0200] rev 51230
rust-index: add missing special case for null rev
This was an oversight, it was never a problem because we didn't use the index
much for user-facing things in the past, which is the only real way of getting
to this edge case.
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 16:49:17 +0200] rev 51229
rust-index: use the rust index in `shortest`
Raphaël Gomès <rgomes@octobus.net> [Wed, 02 Aug 2023 14:34:21 +0200] rev 51228
rust-index: add checks that `__contains__` is synchronized
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Oct 2023 11:03:57 +0100] rev 51227
rust-index: using the Rust index in nodemap updating methods
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:19:54 +0100] rev 51226
rust-index: implementation of __getitem__
Although the removed panic tends to prove if the full test suite
did pass that the case when the input is a node id does not happen,
it is best not to remove it right now.
Raising IndexError is crucial for iteration on the index to stop,
given the default CPython sequence iterator, see for instance
https://github.com/zpoint/CPython-Internals/blobs/master/BasicObject/iter/iter.md
This was spotted by `test-rust-ancestors.py`, which does simple interations on
indexes (as preflight checks).
In `revlog.c`, `index_getitem` defaults to `index_get` when called
on revision numbers, which does raise `IndexError` with the same message as
the one we are introducing here.
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 11:34:52 +0200] rev 51225
rust-index: optim note for post-scaffolding removal
Raphaël Gomès <rgomes@octobus.net> [Thu, 02 Nov 2023 11:16:13 +0100] rev 51224
rust-index: check that the entry bytes are the same in both indexes
This is a temporary measure to show that both the Rust and C indexes are
kept in sync.
Comes with some related documentation precisions.
For comparison of error cases, see `index_entry_binary()` in `revlog.c`.
Georges Racinet <georges.racinet@octobus.net> [Sat, 30 Sep 2023 16:15:56 +0200] rev 51223
rust-index: return variables systematic naming convention
To help knowing at a glance when a method is ready, making
us more comofortable when we are close to the final removal of
scaffolding, we introduce the systematic variable names `rust_res` and
`c_res`. The goal of this series is to always return the formet.
We take again the case of `pack_header` as example.
Our personal opinion is to usually avoid such poor semantics as `res`, but
usually accept it when it close to the actual return, which will be the
case in most methods of this series. Also, the name can simply be dropped
when we remove the scaffolding. To follow on the example, the body of
`pack_header()` should become this in the final version:
```
let index = self.index(py).borrow();
let packed = index.pack_header(args.get_item(py, 0).extract(py)?);
Ok(PyBytes::new(py, &packed).into_object());
```
in these cases it is close to the actual return and will be removed
at the end entirely.
Georges Racinet <georges.racinet@octobus.net> [Fri, 29 Sep 2023 15:51:49 +0200] rev 51222
rust-index: results comparison helper with details
This is a bit simpler to call and has the advantage of systematically log
the encountered deviation.
To avoid committing dead code, we apply it to the `pack_header` method, that
was already returning the Rust result.
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 10:59:04 +0200] rev 51221
rust-index: helper for revision not in index not involving nodemap
This is a good match for exceptions raised from the C implementation,
when it is not about a nodemap inconsistency.
Georges Racinet <georges.racinet@octobus.net> [Wed, 18 Oct 2023 19:54:18 +0200] rev 51220
rust-index: renamed nodemap error function for rev not in index
The function name was misleading, as the error wording mentions the
nodemap, hence would not be appropriate for missing revisions not
related to a nodemap lookup.
Raphaël Gomès <rgomes@octobus.net> [Thu, 03 Aug 2023 10:28:10 +0200] rev 51219
rust-index: add `pack_header` support
Raphaël Gomès <rgomes@octobus.net> [Mon, 30 Oct 2023 10:34:48 +0100] rev 51218
rust-index: support cache clearing
I'm not 100% sure how useful it is outside of perf, but it's still worth
implementing.
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 11:37:19 +0200] rev 51217
rust-index: check rindex and cindex return the same get_rev
This is a temporary safeguard while we synchronize both indexes.
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 16:43:39 +0200] rev 51216
rust-index: synchronize remove to Rust index
Future steps will bring the two indexes further together until we can
rip the C index entirely when running Rust code.
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 11:59:43 +0200] rev 51215
rust-index: remove `__setitem__` method from the mixed index
This is not defined on the Python or C one, and isn't used anywhere.
Raphaël Gomès <rgomes@octobus.net> [Wed, 28 Jun 2023 11:36:22 +0200] rev 51214
rust-index: check equality between rust and cindex for `__len__`
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 18:24:54 +0200] rev 51213
rust-index: synchronize append method
We now append to the Rust index just as we do to the C index. Future steps
will bring the two indexes further together until we can rip the C index
entirely when running Rust code.
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Sep 2023 17:11:11 +0200] rev 51212
rust-revlog: teach the revlog opening code to read the repo options
This will become necessary as we start writing revlog data from Rust.
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 17:34:51 +0200] rev 51211
rust-index: pass data down to the Rust index
This will allow us to start keeping the Rust index synchronized with the
cindex as we gradually implement more and more methods in Rust. This will
eventually be removed.
Raphaël Gomès <rgomes@octobus.net> [Tue, 27 Jun 2023 16:32:09 +0200] rev 51210
rust-index: add append method
This is the first time the Rust index has any notion of mutability.
This will be used in a future patch from Python, to start synchronizing the
Rust index and the C index.
Raphaël Gomès <rgomes@octobus.net> [Mon, 26 Jun 2023 19:16:07 +0200] rev 51209
rust-index: add an abstraction to support bytes added at runtimes
In order to support appending data to the Rust index, we need to abstract
data access away from the immutable (on-disk) bytes, to seemlessly fetch
either from the preexisting data or from the newly added data.
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 16:09:57 +0200] rev 51208
rust-mixed-index: move the mmap keepalive into a function
The same code will be used for keeping the new index mmap around.
Raphaël Gomès <rgomes@octobus.net> [Thu, 29 Jun 2023 15:00:46 +0200] rev 51207
rust-mixed-index: rename variable to make the next change clearer
We're going to add another mmap reference holder, so let's rename this one
first.
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Sep 2023 10:08:32 +0200] rev 51206
rust: fix cargo doc for hg-cpython
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Dec 2023 11:10:24 +0100] rev 51205
branching: merge with default
We merge with the current children of the bad merge (37b52b938579)