- Aug 02, 2023
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
- Oct 30, 2023
-
-
Georges Racinet authored
-
- Nov 02, 2023
-
-
Raphaël Gomès authored
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.
-
- Sep 27, 2023
-
-
Georges Racinet authored
-
- Nov 02, 2023
-
-
Raphaël Gomès authored
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`.
-
- Sep 30, 2023
-
-
Georges Racinet authored
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.
-
- Sep 29, 2023
-
-
Georges Racinet authored
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.
-
- Sep 27, 2023
-
-
Georges Racinet authored
This is a good match for exceptions raised from the C implementation, when it is not about a nodemap inconsistency.
-
- Oct 18, 2023
-
-
Georges Racinet authored
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.
-
- Aug 03, 2023
-
-
Raphaël Gomès authored
-
- Oct 30, 2023
-
-
Raphaël Gomès authored
I'm not 100% sure how useful it is outside of perf, but it's still worth implementing.
-
- Jun 29, 2023
-
-
Raphaël Gomès authored
This is a temporary safeguard while we synchronize both indexes.
-
- Jun 28, 2023
-
-
Raphaël Gomès authored
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 authored
This is not defined on the Python or C one, and isn't used anywhere.
-
Raphaël Gomès authored
-
- Jun 27, 2023
-
-
Raphaël Gomès authored
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.
-
- Sep 18, 2023
-
-
Raphaël Gomès authored
This will become necessary as we start writing revlog data from Rust.
-
- Jun 27, 2023
-
-
Raphaël Gomès authored
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 authored
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.
-
- Jun 26, 2023
-
-
Raphaël Gomès authored
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.
-
- Jun 29, 2023
-
-
Raphaël Gomès authored
The same code will be used for keeping the new index mmap around.
-
Raphaël Gomès authored
We're going to add another mmap reference holder, so let's rename this one first.
-
- Sep 27, 2023
-
-
Georges Racinet authored
-
- Dec 15, 2023
-
-
Pierre-Yves David authored
We merge with the current children of the bad merge (37b52b938579)
-
Pierre-Yves David authored
This recreates `37b52b938579` right as a `hg branch --rev 5b186ba40001` screwed up the content.
-
- Dec 07, 2023
-
-
Pierre-Yves David authored
Since this will never happens, we can make the situation invalid and to stop to handling the associated the case. This simplify the random access file reading too.
-
- Dec 11, 2023
-
-
Pierre-Yves David authored
The test suite mostly use small repositories, that implies that most changelog in the tests are inlined. As a result, non-inlined changelog are quite poorly tested. Since non-inline changelog are most common case for serious repositories, this lack of testing is a significant problem that results in high profile issue like the one recently fixed by 66417f55ea33 and 849745d7da89. Inlining the changelog does not bring much to the table, the number of total file saved is negligible, and the changelog will be read by most operation anyway. So this changeset is make it so we never inline the changelog, and de-inline the one that are still inlined whenever we touch them. By doing that, we remove the "dual code path" situation for writing new entry to the changelog and move to a "single code path" situation. Having a single code path simplify the code and make sure it is covered by test (if test cover that situation obviously) This impact all tests that care about the number of file and the exchange size, but there is nothing too complicated in them just a lot of churn. The churn is made "worse" by the fact rust will use the persistent nodemap on any changelog now. Which is overall a win as it means testing the persistent nodemap more and having less special cases. In short, having inline changelog is mostly useless and an endless source of pain. We get rid of it.
-
Pierre-Yves David authored
The test is focussing on the inline flag, so we glob out the other to highlight that fact and prevent noise in the future.
-
Pierre-Yves David authored
This test previously checked the transaction safety of splitting the changelog. The changelog is a special case, with delayed/diverted writes and we will stop inlining it soon. So we keep testing that transaction is safe around inline on another revlog type : a filelog. Minor comestic adjustement will be done in the next changesets.
-
- Dec 07, 2023
-
-
Pierre-Yves David authored
We will make this revlog non-inline, so we clarify the code to make sure it is simple to adjust the test later.
-
Pierre-Yves David authored
Not sure why we kept the number here.
-
- Dec 12, 2023
-
-
Pierre-Yves David authored
-
- Dec 07, 2023
-
-
Pierre-Yves David authored
The format cannot encode the lack of tip_rev. There is currently nothing known to write such empty nodemap right now, but the change we are preparing on default reveal this issue. So I had rather fix it on stable.
-
- Dec 12, 2023
-
-
Julien Cristau authored
ncurses patchlevel 20231111 started returning an error from endwin() if called twice without a intervening screen update. Per Sven Joachim in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058041#17: "AFAICS, invoking curses.echo() and curses.endwin() is superfluous because curses.wrapper already does that for you, and calling curses.endwin() twice throws an error with the newer ncurses. Removing those two lines should fix the problem."
-
- Dec 07, 2023
-
-
Martin von Zweigbergk authored
This continues the work from 972f3e5c94b8. We saw a crash on line 956 but I updated lots of other places as well.
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-