Wed, 17 Nov 2021 20:27:27 +0100 dirstate: stop gathering parentfiledata in update_file
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:27:27 +0100] rev 48387
dirstate: stop gathering parentfiledata in update_file Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. Accurate data can still be explicitly provided. We drop the spontaneous and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11791
Wed, 17 Nov 2021 20:26:33 +0100 dirstate: stop gathering parentfiledata in update_file_p1
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:26:33 +0100] rev 48386
dirstate: stop gathering parentfiledata in update_file_p1 Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. So we drop this and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11790
Wed, 17 Nov 2021 20:26:14 +0100 dirstate: make it mandatory to provide parentfiledata in `set_clean`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:26:14 +0100] rev 48385
dirstate: make it mandatory to provide parentfiledata in `set_clean` Gathering the mode, size and mtime, independently from determining that the file is clean is a race-machine. So we just make these information required arguments. (note that the data is still gathered in a racy way in practice, but at least the API is no longer encouraging it.) Differential Revision: https://phab.mercurial-scm.org/D11789
Mon, 22 Nov 2021 15:58:51 +0100 dirstate: do no use `set_clean` in revert
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 22 Nov 2021 15:58:51 +0100] rev 48384
dirstate: do no use `set_clean` in revert The current `set_clean` usage is racy (the file might be modified between its restoration and the `set_clean` call). So we simply leave the file as ambiguous and the next status will fix that. We still have to make sure the copy information is dropped, so we teach dirstate how to do that. The win32txt extension is confused after this because current logic is broken in more location. However this series will ultimately fix that so we "ignore" it for now. Fixing it now is complicated without some extra fix landing later. Differential Revision: https://phab.mercurial-scm.org/D11788
Thu, 18 Nov 2021 22:49:05 +0100 status: adapt the "keyword" extensions to gather stats at lookup time
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 22:49:05 +0100] rev 48383
status: adapt the "keyword" extensions to gather stats at lookup time See main core code for details. We don't factor the code in a common function yet, because we will have to adapt a bit more things in the keyword case at the end of the series. Differential Revision: https://phab.mercurial-scm.org/D11787
Thu, 18 Nov 2021 22:46:50 +0100 status: adapt largefile to gather stats at lookup time
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 22:46:50 +0100] rev 48382
status: adapt largefile to gather stats at lookup time See the core code for details of why we are doing this. We don't factor the code in a common function yet, because we will have to adapt a bit more things in the largefile case at the end of the series. Differential Revision: https://phab.mercurial-scm.org/D11786
Wed, 17 Nov 2021 23:37:47 +0100 status: gather fixup info at comparison time
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 23:37:47 +0100] rev 48381
status: gather fixup info at comparison time This is still racy, but on a much small windows. In addition, the API now make it possible for it to not be racy. This also unlock other cleanups that we are about to do regarding mtime ambiguity at gathering time. Differential Revision: https://phab.mercurial-scm.org/D11785
Wed, 17 Nov 2021 10:22:15 +0100 update: filter the ambiguous mtime in update directly
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 10:22:15 +0100] rev 48380
update: filter the ambiguous mtime in update directly Right now, this filtering is done by `dirstate.write` using the time of `dirstate.write` method call. However that filtering is done "too late" It works "fine" as most command are "fast enough", and race rare enough. We are about to change the mtime filtering logic in the dirstate to be more accurate and reliable. However `hg update` will still need such filtering (mostly because it is actually quite racy, even with the existing filtering). So we explicitly implement a similar logic here. Before removing the older one later in the series. Differential Revision: https://phab.mercurial-scm.org/D11784
Wed, 17 Nov 2021 12:24:00 +0100 dirstate: move "get fs now" in the timestamp utility module
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 12:24:00 +0100] rev 48379
dirstate: move "get fs now" in the timestamp utility module We will need it during update. Differential Revision: https://phab.mercurial-scm.org/D11783
Wed, 17 Nov 2021 10:26:48 +0100 dirstate-item: allow mtime to be None in "parentdata"
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 10:26:48 +0100] rev 48378
dirstate-item: allow mtime to be None in "parentdata" This will be useful to filter out unreliable mtime. Differential Revision: https://phab.mercurial-scm.org/D11782
Wed, 17 Nov 2021 02:58:44 +0100 dirstate: add a comment about a racy piece of code during updates
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 02:58:44 +0100] rev 48377
dirstate: add a comment about a racy piece of code during updates This is a bit that is not really correct but works "fine" in practice. Let us write the details down so that people stop wondering how that logic might be correct… It is not. Differential Revision: https://phab.mercurial-scm.org/D11781
Mon, 25 Oct 2021 15:11:53 +0200 tests: add missing `head` for when things go wrong
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Oct 2021 15:11:53 +0200] rev 48376
tests: add missing `head` for when things go wrong See comment above the changed line, you can get a millions of line of output in case of failure. When don't need to have them all. Differential Revision: https://phab.mercurial-scm.org/D11780
Tue, 23 Nov 2021 16:32:56 +0100 tests: ensure a status will have non ambiguous mtime in some race test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 16:32:56 +0100] rev 48375
tests: ensure a status will have non ambiguous mtime in some race test For the test to work, we need some mtime to be recorded. For them to be recorded, they need to be "clearly in the past", otherwise edit with the same mtime would be possible. Strictly speaking there might be file system with a minimal mtime increment longer than one second. However it is unlikely that we will run the test on them for now. We can be smarter about this in the future if it becomes necessary. Differential Revision: https://phab.mercurial-scm.org/D11779
Thu, 18 Nov 2021 00:08:57 +0100 tests: make sure no ambiguities remains after the commit
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 00:08:57 +0100] rev 48374
tests: make sure no ambiguities remains after the commit This will help to stabilize part of the test that are not relevant for what is actually tested. Differential Revision: https://phab.mercurial-scm.org/D11778
Thu, 04 Nov 2021 17:49:25 +0100 dirstate: clarify a `hg update` invocation in a test
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Nov 2021 17:49:25 +0100] rev 48373
dirstate: clarify a `hg update` invocation in a test It is common for readers of that test to confuse the `hg co` call with a `hg commit`, while it actually means `hg checkout`, an alias for the more common `hg update. So let us use the clearer version. Differential Revision: https://phab.mercurial-scm.org/D11777
Wed, 01 Dec 2021 00:04:29 +0100 test: mark rhg output as flaky
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 01 Dec 2021 00:04:29 +0100] rev 48372
test: mark rhg output as flaky rhg is not updating the dirstate on status yet, which make this part of the test flaky. This will be fixed soon. Differential Revision: https://phab.mercurial-scm.org/D11833
Mon, 18 Oct 2021 12:30:53 -0700 chistedit: explain which order the commits are presented in
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Oct 2021 12:30:53 -0700] rev 48371
chistedit: explain which order the commits are presented in It's not obvious which order the commits in chistedit (and text-based histedit), so let's add a note about it. Differential Revision: https://phab.mercurial-scm.org/D11832
Mon, 22 Nov 2021 17:21:55 -0800 errors: use detailed error for invalid commit-extras argument
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 Nov 2021 17:21:55 -0800] rev 48370
errors: use detailed error for invalid commit-extras argument Differential Revision: https://phab.mercurial-scm.org/D11831
Fri, 19 Nov 2021 16:21:00 -0800 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 16:21:00 -0800] rev 48369
errors: use detailed exit code in pathauditor Differential Revision: https://phab.mercurial-scm.org/D11830
Fri, 19 Nov 2021 16:16:21 -0800 errors: use detailed exit code for RepoLookupError
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 16:16:21 -0800] rev 48368
errors: use detailed exit code for RepoLookupError Differential Revision: https://phab.mercurial-scm.org/D11829
Fri, 19 Nov 2021 15:40:56 -0800 errors: use detailed exit code for detected case-collision
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:40:56 -0800] rev 48367
errors: use detailed exit code for detected case-collision Differential Revision: https://phab.mercurial-scm.org/D11828
Fri, 19 Nov 2021 15:39:35 -0800 errors: use detailed exit code when trying to merge file outside narrowspec
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:39:35 -0800] rev 48366
errors: use detailed exit code when trying to merge file outside narrowspec Differential Revision: https://phab.mercurial-scm.org/D11827
Fri, 19 Nov 2021 15:38:36 -0800 errors: use detailed exit code for non-integer number of diff context lines
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:38:36 -0800] rev 48365
errors: use detailed exit code for non-integer number of diff context lines Differential Revision: https://phab.mercurial-scm.org/D11826
Fri, 19 Nov 2021 09:17:30 -0800 patch: add hint about mangled whitespace on bad patch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 09:17:30 -0800] rev 48364
patch: add hint about mangled whitespace on bad patch One of the most common reasons that a patch doesn't apply is because its whitespace has been mangled (e.g. by their mail client or though copy&paste). Let's provide a hint about that. Differential Revision: https://phab.mercurial-scm.org/D11825
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 tip