narrow: strip trailing `/` from manifest dir before matching it
Commit
17a822d7943e broke some of our internal tests at Google because the `dir`
variable contains a trailing slash since that commit. Let's restore the old
behavior by stripping that trailing slash.
tests: demonstrate error when narrowing with `rootfilesin:` pattern
This demonstrates a bug introduced in
17a822d7943e.
matchers: use correct method for finding index in vector
The path matcher has an optimization for when all paths are `rootfilesin:`. This
optimization exists in both Python and Rust. However, the Rust implementation
currently has a bug that makes it fail in most cases. The bug is that it
`rfind()` where it was clearly intended to use `rposition()`. This patch fixes
that and adds a test.
dirstate: make the `transaction` argument of `setbranch` mandatory
This is deprecated since 6.4. We should drop it now.
rust-clippy: apply some more trivial fixes
All of these were hinted at by clippy and make the code simpler.
rust-clippy: simplify `match` to `if let`
This was hinted at by clippy, and makes it more obvious that nothing is
happening in the `None` case.
censor: accept multiple revision in a single call
This is useful when dealing with corruption, as all the corrupted revision can
be dealt with in one go.
censor: be more verbose about the other steps too
If we informs the user about head checking, we should tell him when the other
operation happens too. Otherwise the user can imagine to still be in the head
checking part.
censor: add a command flag to skip the head checks
In some case we spend hours of time checking the heads to censors a simple file
is not a good behavior. Especially when censors is used to removed corrupted
content.
censor: inform the user that we are spending time checking heads
The time this can consume can be a surprise to the user, lets be explicit about
it.