Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 11:13:46 +0200] rev 48013
dirstate: fix restoration of "merged" state after a remove
Before this change, "merged" file that get removed and re-added later were
recorded as "from_p2" instead.
This came from 8fe74328f700, a 2014 changeset that start explicitly doing so
for reason I have not been able to fully grasp. The graft test mentioned in
the description are still happy after this changeset.
So this changeset restore what seems to be the intended behavior. Restoring
information as it was before the removal.
Differential Revision: https://phab.mercurial-scm.org/D11429
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 10:20:25 +0200] rev 48012
dirstate: inline the last two `_drop` usage
The function is small and having the associated code directly inline help use to cleanup the dirstate API.
Differential Revision: https://phab.mercurial-scm.org/D11428
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 10:02:11 +0200] rev 48011
dirstate: make a conditionnal easier to read in `setparents`
By grabing `nullid` in the local space, we get the conditionnal to fit in one
line.
Differential Revision: https://phab.mercurial-scm.org/D11427
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 09:50:44 +0200] rev 48010
dirstate: removed the now unused `_add` method
Differential Revision: https://phab.mercurial-scm.org/D11426
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 18:18:16 +0200] rev 48009
dirstate: replace `_add` call in `setparent`
Same logic as the previous changeset, it get us closer to removed older API on
the dirstate.
Differential Revision: https://phab.mercurial-scm.org/D11425
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 09:41:02 +0200] rev 48008
dirstate: directly call the right function in `set_tracked`
This get use closer to removing some older API on the dirstate.
Differential Revision: https://phab.mercurial-scm.org/D11424
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 10:05:25 +0200] rev 48007
dirstate: same logic as what we did for `_drop`
This is part of the dirstatemap so let the dirstatemap deal with it.
Differential Revision: https://phab.mercurial-scm.org/D11423
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Sep 2021 09:28:17 +0200] rev 48006
dirstate: use `tracked` property in `_addpath`
It is semantically better.
Differential Revision: https://phab.mercurial-scm.org/D11422
Simon Sapin <simon.sapin@octobus.net> [Fri, 17 Sep 2021 08:57:12 +0200] rev 48005
rust: Update the memmap2 crate to version 0.4.0
This version:
* Optionally implements the `StableDeref` trait, removing the need
for a wrapper type doing that
* Adds support for mapping empty files, which can routinely happen
for dirstate-v2 data files. This was a cause of some failing tests
when running with `run-tests.py --rhg --extra-config-opt rhg.status=1`
Differential Revision: https://phab.mercurial-scm.org/D11446
Martin von Zweigbergk <martinvonz@google.com> [Thu, 16 Sep 2021 16:42:16 -0700] rev 48004
dirstate: fix compilation warnings in `dirstate_item_set_possibly_dirty()`
Since https://phab.mercurial-scm.org/D11387 (i.e. the same patch as
mentioned in my previous patch), Clang has also started warning about
`dirstate_item_set_possibly_dirty()` missing an explicit return, and
about its use of the result of an assignment as a condition without
using parentheses. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D11445