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
Martin von Zweigbergk <martinvonz@google.com> [Thu, 16 Sep 2021 16:29:55 -0700] rev 48003
dirstate: make dirstate flags char be unsigned
Since https://phab.mercurial-scm.org/D11387, `CC='clang -Werror' make
local` has started failing like this:
```
mercurial/cext/util.h:41:50: error: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion]
static const char dirstate_flag_rust_special = 1 << 7;
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~^~~~
```
This patch fixes that by making the flags be an unsigned char. That
also matches the `bool` typedef we have in `util.h`, which seems good
since many of the `dirstate_item_c_*()` functions return a `bool`.
Differential Revision: https://phab.mercurial-scm.org/D11444
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Sep 2021 03:59:35 +0200] rev 48002
dirstate: introduce a `set_clean` method on dirstate's map and items
This method is the "reverse" of "set possibly dirty", and can be used to more
accurately other call that the dirstate was making. It is currently heavily
influenced by its origin.
Differential Revision: https://phab.mercurial-scm.org/D11421
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Sep 2021 04:03:20 +0200] rev 48001
dirstate: extract the logic to check file/dirname collision when adding a file
Differential Revision: https://phab.mercurial-scm.org/D11420
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 02 Sep 2021 02:53:47 +0200] rev 48000
dirstate: make dirstatemap.set_untracked deal with added file
This merge dropfile in set_untracked.
Differential Revision: https://phab.mercurial-scm.org/D11419