Mon, 20 Feb 2023 14:06:15 +0100 dirstate: mark `clear` and `rebuild` as `require_changing_parents`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 14:06:15 +0100] rev 50115
dirstate: mark `clear` and `rebuild` as `require_changing_parents` Yeah, more scoping!
Mon, 20 Feb 2023 11:37:02 +0100 dirstate: add a comment about the semantic of `dirstate.clear`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:37:02 +0100] rev 50114
dirstate: add a comment about the semantic of `dirstate.clear` This method is weird, lets flag it as such.
Mon, 20 Feb 2023 14:05:19 +0100 debugrebuildstate: wrap the operation in a `changing_parents` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 14:05:19 +0100] rev 50113
debugrebuildstate: wrap the operation in a `changing_parents` context This ismaybe a "changing_files" case? However this would be the only usage of `rebuild` outside a `changing_parents` context and this is a debug command, so lets not make the code base more complex because of that one command.
Sun, 19 Feb 2023 02:50:46 +0100 strip: use a `changing_parents` context for --keep update
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 19 Feb 2023 02:50:46 +0100] rev 50112
strip: use a `changing_parents` context for --keep update These are now properly scoped. note: it would be neat to reuse this in `hg rollback`.
Sun, 19 Feb 2023 02:47:28 +0100 mq: wrap the dirstate's rebuild in a `changing_parents` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 19 Feb 2023 02:47:28 +0100] rev 50111
mq: wrap the dirstate's rebuild in a `changing_parents` context This code is dealing with `qreshesh` failure. In that case the working copy will be left on the parent of the refreshed patch, so the parents are changing and `changing_parents` make sens.
Mon, 20 Feb 2023 11:37:05 +0100 lfconvert: use a `changing_parents` context to clear the dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:37:05 +0100] rev 50110
lfconvert: use a `changing_parents` context to clear the dirstate Not sure if this is the right context, but it works and it is consistent with the other usages of `dirstate.clear`.
Mon, 20 Feb 2023 11:57:46 +0100 dirstate: mark the `copy` method as requiring a `changing_any` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:57:46 +0100] rev 50109
dirstate: mark the `copy` method as requiring a `changing_any` context This is used both when changing parents (e.g. merging with rename) and changing files (e.g. running `hg rename`).
Mon, 20 Feb 2023 11:54:10 +0100 dirstate: add a `require_changing_any` decorator
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:54:10 +0100] rev 50108
dirstate: add a `require_changing_any` decorator We will need it for a couple of usecase (e.g `dirstate.copy`).
Mon, 20 Feb 2023 12:06:03 +0100 rebase: scope parent change into a changing_parents context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 12:06:03 +0100] rev 50107
rebase: scope parent change into a changing_parents context If we are actually altering the working copy (i.e. we are not in memory), we should properly scope the working copy update.
Sat, 18 Feb 2023 04:10:08 +0100 dirstate: requires being in a `changing_parents` `context to set_parents`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 18 Feb 2023 04:10:08 +0100] rev 50106
dirstate: requires being in a `changing_parents` `context to set_parents` Enforcing proper operation scoping on all methods that mutate the dirstate will tighten correctness and reduce the risk of bugs. The context to use for this method is obvious, and all code was already compliant ☺
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip