Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 18:18:05 +0200] rev 48275
dirstate-v2: adjust the meaning of directory flags
Tracking directory "explicitly" give use the opportunity to distinct between
entry that are untracked because they are part of the directory structure and
entry that are ignored/unknown files on the files system.
The help is adjusted to the new semantic and the code now comply to it for both
read and write.
Differential Revision: https://phab.mercurial-scm.org/D11694
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 15:58:14 +0200] rev 48274
dirstate-v2: actually use sub-second mtime precision
Instead of zero, set the nanoseconds field to its correct value whenever
possible and preserve it across serialization+parsing.
Differential Revision: https://phab.mercurial-scm.org/D11702
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:54:39 +0200] rev 48273
dirstate: ignore sub-second component when either is zero in mtime
When comparing mtimes for equality.
Some APIs simply return zero when more precision is not available.
When comparing values from different sources, if only one is truncated in
that way, doing a simple comparison would cause many false negatives.
Differential Revision: https://phab.mercurial-scm.org/D11701
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:04:14 +0200] rev 48272
dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags
This flag will let us use more `mtime` value in the future. For now we have a
minimal handling of the flag at read time, but we will never put ourself in a
situation where we will needs to writes it.
See the flag documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11700
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 11:23:07 +0200] rev 48271
dirstate: store mtimes with nanosecond precision in memory
Keep integer seconds since the Unix epoch,
together with integer nanoseconds in the `0 <= n < 1e9` range.
For now, nanoseconds are still always zero.
This commit is about data structure changes.
Differential Revision: https://phab.mercurial-scm.org/D11684
Simon Sapin <simon.sapin@octobus.net> [Tue, 19 Oct 2021 21:03:13 +0200] rev 48270
rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method
Differential Revision: https://phab.mercurial-scm.org/D11696
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:14:48 +0200] rev 48269
dirstate: align Rust function name to `need_delay`
The rest of the code use this name. It is not a great name, but it is better to
stay consistent.
Differential Revision: https://phab.mercurial-scm.org/D11699
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 19:02:40 +0200] rev 48268
dirstate: rename a `very_likely_equal` method to `likely_equal`
No need to oversell it.
Differential Revision: https://phab.mercurial-scm.org/D11691
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:03:39 +0200] rev 48267
backout: backed out changeset 2f2107c01dee
After discussion on the original phab patch, we've decided to wait until
Python 2 support is dropped to do this since the behavior differs for
relatively obscure reasons.
Differential Revision: https://phab.mercurial-scm.org/D11692
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 19:04:11 +0200] rev 48266
backout: backed out changeset 6edc8800dbc3
Same as the previous changeset.
Differential Revision: https://phab.mercurial-scm.org/D11693
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 10:56:54 +0200] rev 48265
dirstate-v2: preserve the fallback values on disk
When the fallback values are set, they are now read and written to disk.
See format documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11688
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:05 +0200] rev 48264
dirstate: make DirstateItem constructor accept fallback value
This could arguably goes in the previous changeset, but I wanted to keep that
previous changeset small to focus more on the user code and the documentation.
Differential Revision: https://phab.mercurial-scm.org/D11687
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Oct 2021 20:02:15 +0200] rev 48263
dirstate: add a concept of "fallback" flags to dirstate item
The concept is defined and "used" by the flag code, but it is neither persisted
nor set anywhere yet. We currently focus on defining the semantic of the
attribute. More to come in the next changesets
Check the inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11686
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Oct 2021 16:33:19 +0200] rev 48262
dirstate-v2: adds two flag to track the presence of some unrecorded files
Right now, we don't record ignored or unknown files in the dirstate. However
the structure would allow it. So we introduce two flags that can be used to
clarify whether all unknown/ignored children are recorded or not. This will
allow for more information to be stored in the future if this end up being
relevant.
Differential Revision: https://phab.mercurial-scm.org/D11682