Simon Sapin <simon.sapin@octobus.net> [Mon, 11 Jan 2021 13:33:00 +0100] rev 46658
copies-rust: add a macro-based unit-testing framework
`compare_values`, `merge_copies_dict`, and `CombineChangesetCopies`
are APIs whose signatures involve non-trivial types.
Calling them directly in unit tests would involve a lot of verbose
setup code that obscures the meaningful parts of a given test case.
This adds a macro-based test-harness with pseudo-syntax to tersely
create arguments and expected return values in the correct types.
For now there is only one (not particularly meaningful) test case
per tested function, just to exercize the macros.
Differential Revision: https://phab.mercurial-scm.org/D10071
Simon Sapin <simon.sapin@octobus.net> [Wed, 06 Jan 2021 23:11:59 +0100] rev 46657
copies-rust: rewrite ChangedFiles binary parsing
by using the new from-bytes-safe crate and a custom struct
that encodes the expected data structure.
Differential Revision: https://phab.mercurial-scm.org/D10068
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 02 Mar 2021 00:02:25 +0530] rev 46656
tags: validate nodes in _getfnodes() and update cache in case of unknown nodes
`hgtagsfnodescache` can contain unknown nodes due to cache corruption and this
lead to a traceback on operations like `hg tags` as we don't validate nodes.
This patch validates that all filenodes returned after `hgtagsfnodescache` are
known to the repository. If there exists any unknown filenode, we force
recompute it and update the cache.
The test change demonstrates the fix.
Differential Revision: https://phab.mercurial-scm.org/D10083