Wed, 24 Nov 2021 04:51:05 +0100 dirstate-item: implement the comparison logic for mtime-second-ambiguous
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:51:05 +0100] rev 48399
dirstate-item: implement the comparison logic for mtime-second-ambiguous If the flag is set we now process it properly. We "just" need to actually set it and persist it. Differential Revision: https://phab.mercurial-scm.org/D11843
Wed, 24 Nov 2021 04:40:00 +0100 dirstate-item: add a "second_ambiguous` flag in the mtime tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:40:00 +0100] rev 48398
dirstate-item: add a "second_ambiguous` flag in the mtime tuple This will be used to support the `mtime-second-ambiguous` flag from dirstate v2. See format documentation for details. For now, we only make it possible to store the information, no other logic have been added. Differential Revision: https://phab.mercurial-scm.org/D11842
Tue, 23 Nov 2021 19:27:17 +0100 dirstate: drop comparison primitive on the timestamp class
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 19:27:17 +0100] rev 48397
dirstate: drop comparison primitive on the timestamp class All comparison are now managed without using operator : - the status mtime comparisons is handled by the DirstateItem, - the fixup reliability check, - the update "hack". So we no longer needs the operator and should discourage its usage. Differential Revision: https://phab.mercurial-scm.org/D11841
Tue, 23 Nov 2021 18:13:33 +0100 largefile: use the proper "mtime boundary" logic during fixup
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:13:33 +0100] rev 48396
largefile: use the proper "mtime boundary" logic during fixup This will prevent ambiguous cache entry to be used in racy situation. This fix flakiness in test and some real live misbehavior. Differential Revision: https://phab.mercurial-scm.org/D11800
Tue, 23 Nov 2021 18:03:51 +0100 status: move the boundary comparison logic within the timestamp module
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:03:51 +0100] rev 48395
status: move the boundary comparison logic within the timestamp module Some extensions will need it too. So lets isolate the logic. It also makes things clearer. Differential Revision: https://phab.mercurial-scm.org/D11799
Tue, 23 Nov 2021 18:11:42 +0100 tests: remove potential mtime ambiguity in a dirstate test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:11:42 +0100] rev 48394
tests: remove potential mtime ambiguity in a dirstate test If the test was fast enough, some mtime where not stored. We now wait long enough to ensure the mtime is no longer ambiguous. Differential Revision: https://phab.mercurial-scm.org/D11798
Fri, 19 Nov 2021 03:03:01 +0100 dirstate: cleanup remaining of "now" during write
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Nov 2021 03:03:01 +0100] rev 48393
dirstate: cleanup remaining of "now" during write Since the whole `need_delay` have been removed, we no longer need this. Differential Revision: https://phab.mercurial-scm.org/D11797
Fri, 19 Nov 2021 03:04:42 +0100 dirstate: remove need_delay logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Nov 2021 03:04:42 +0100] rev 48392
dirstate: remove need_delay logic Now that allĀ¹ stored mtime are non ambiguous, we no longer need to apply the `need_delay` step. The need delay logic was not great are mtime gathered during longer operation could be ambiguous but younger than the `dirstate.write` call time. So, we don't need that logic anymore and can drop it This make the code much simpler. The code related to the test extension faking the dirstate write is now obsolete and associated test will be migrated as follow up. They currently do not break. [1] except the ones from `hg update`, but `need_delay` no longer help for them either. Differential Revision: https://phab.mercurial-scm.org/D11796
Mon, 25 Oct 2021 11:36:22 +0200 dirstate: remove `lastnormaltime` mechanism
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Oct 2021 11:36:22 +0200] rev 48391
dirstate: remove `lastnormaltime` mechanism This is now redundant with the new, simpler `mtime_boundary` one. Differential Revision: https://phab.mercurial-scm.org/D11795
Thu, 18 Nov 2021 13:12:40 +0100 status: use filesystem time boundary to invalidate racy mtime
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 13:12:40 +0100] rev 48390
status: use filesystem time boundary to invalidate racy mtime We record the filesystem time at the start of the status walk and use that as a boundary to detect files that might be modified during (or right after) the status run without the mtime allowing that edition to be detected. We currently do this at a second precision. In a later patch, we will use nanosecond precision when available. To cope with "broken" time on the file system where file could be in the future, we also keep mtime for file over one day in the future. See inline comment for details. Large file tests get a bit more confused as we reduce the odds for race condition. As a "side effect", the win32text extension is happy again. Differential Revision: https://phab.mercurial-scm.org/D11794
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip