phabricator: fix processing of tags/desc in getoldnodedrevmap()
It seems that the previous logic was wrong (it essentially comes
from changeset
3ab0d5767b54 where the result got accumulated instead of
early returned).
First of all, the "continue" in first "if m:" is useless because we're
at the end of the loop. Then, the algorithm seems weird because we will
process all predecessors of a node and possibly override
`toconfirm[node]` for each of these having a tag (maybe this doesn't
happen, but still). Finally, we would also override `toconfirm[node]`
when the "Differential Revision: " is found in changeset description.
Maybe this is not a big deal when there is no mix of local tag and
changeset description update?
The logic is changed so that the loop on predecessors stops upon first
match of a tag and so that the changeset description is only checked if
no tag was found. Therefore, `toconfirm[node]` is only set once.
Differential Revision: https://phab.mercurial-scm.org/D7513
tests: replace [[]] bashism with portable [] invocation
In this case nothing fancy is required.
Differential Revision: https://phab.mercurial-scm.org/D7596
rust-hg-path: implement `Display` for `HgPath` and `HgPathBuf`
This is useful when debugging, to get a human readable output instead of an
array of `u8`.
Differential Revision: https://phab.mercurial-scm.org/D7523
rust-performance: introduce FastHashMap type alias for HashMap
Rust's default hashing is slow, because it is meant for preventing collision
attacks.
For all of the current Rust code, we don't care about those attacks, because
if an person with bad intentions has write access to your repo, you have other
issues.
I've chosen to use the TwoXHash crate because it was made by a reputable member
of the Rust community and has very good benchmarks.
For now it does not seem to improve performance by much for the current code,
but it's something else to not worry about when benchmarking code: in a
previous experiment with copytracing in Rust, it accounted for more than 10%
of the time of the entire script.
Differential Revision: https://phab.mercurial-scm.org/D7116
mail: use procutil.shellsplit instead of bytes.split to parse command
Differential Revision: https://phab.mercurial-scm.org/D7541
annotate: describe --skip as taking a revset
It's obvious to me, but probably wouldn't be obvious to a novice user.
Differential Revision: https://phab.mercurial-scm.org/D7557