Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 10:00:04 +0100] rev 50021
dirstate: warn about non-explicitly rolledback parent-change
Now that the invalidation is dealt with by the context manager itself, we
should no longer need this in the unlocking code. We start with issuing a
warning if this is the case before actually dropping this code later.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 11:39:44 +0100] rev 50020
dirstate: invalidate changes when parent-change fails
When an error occurs during changing parents, we should invalidate all dirstate
modifications and reload the dirstate. This is currently done by a `unlock`
callback on the `wlock`.
To fix this anomaly, we start dealing with the error directly in the context
manager and its potential nesting.
The "hard" part is to make sure that, when the parent-change context are nested,
we and higher level nesting do not continue to use the invalidated dirstate.
We introduce dedicated code to enforce that.
Cédric Krier <ced@b2ck.com> [Sat, 28 Jan 2023 20:08:57 +0100] rev 50019
setup: Ensure target directory exists with building rust extension
When the rust extension is the first to be build, the target directory may not
exist so the copy fails.
Cédric Krier <ced@b2ck.com> [Thu, 26 Jan 2023 00:23:07 +0100] rev 50018
filemerge: add union-other-first as internal merge tool
See inline documentation for details.
Raphaël Gomès <rgomes@octobus.net> [Fri, 13 Jan 2023 00:07:07 +0100] rev 50017
rust: use `peek_mut` from the standard lib now that it's stable
Just a little cleanup of a TODO found along the way.
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Jan 2023 18:45:38 +0100] rev 50016
clippy: actually fail if there are any warnings
So far, only errors would trip the CI, this makes it so all warnings are
elevated to errors, making it a CI fail if any warnings are present.
This was the intended behavior, I just missed this when adding clippy.
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Jan 2023 18:44:09 +0100] rev 50015
rust-clippy: fix warning about nested ifs
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Thu, 19 Jan 2023 11:12:20 -0500] rev 50014
debugshell: allow commands to be specified as a CLI argument
Add a `--command` option to `hg debugshell` that allows the user to pass in
Python code to evaluate directly from the command line. This was inspired by
the `--command` option present in Facebook's Sapling fork of Mercurial,
which in turn was inspired by the `-c` option of the Python interpreter
itself. It is particularly useful for writing tests, especially for getting
visibility into things that otherwise aren't exposed via debug commands.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 11:40:19 +0100] rev 50013
heptapod-ci: add `clippy` to the CI
This linter mostly makes our code more idiomatic, less surprising, has good
suggestions and catches bugs. It's widely used in the Rust community and now
part of the default toolchain when using `rustup`.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 11:39:53 +0100] rev 50012
makefile: add `cargo clippy` to tests if cargo is available
This linter mostly makes our code more idiomatic, less surprising, has good
suggestions and catches bugs. It's widely used in the Rust community and now
part of the default toolchain when using `rustup`.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 11:25:24 +0100] rev 50011
rust-tests: run `cargo` tests inside the `rust` folder
There is no reason to only run inside the `rust/hg-cpython` folder, even if
the `cargo test --all` behavior ends up being the same.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 11:20:54 +0100] rev 50010
rust-clippy: merge "revlog" module definition and struct implementation
Module inception is confusing when looking for code and almost never
the right choice.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 10:57:15 +0100] rev 50009
rust-clippy: merge "config" module definition and struct implementation
Module inception is confusing when looking for code and almost never
the right choice.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 10:45:38 +0100] rev 50008
rust-clippy: upgrade `bytes-cast` dependency
I released a new version of `bytes-cast` to get rid of the clippy warning,
and bump to edition 2021, so let's use it.
Raphaël Gomès <rgomes@octobus.net> [Tue, 10 Jan 2023 10:41:52 +0100] rev 50007
rust-clippy: remove redundant suffix from enum
Same as last time, this makes the code clearer in this instance.
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 19:37:05 +0100] rev 50006
rust-clippy: fix remaining warnings in `hg-cpython`