Tue, 13 Dec 2022 12:57:38 +0100 dirstate: use `dirstate.change_files` to scope the change in `add`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 12:57:38 +0100] rev 50030
dirstate: use `dirstate.change_files` to scope the change in `add` This is the way.
Wed, 15 Feb 2023 11:51:58 +0100 commit: use `dirstate.change_files` to scope the associated `addremove`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 11:51:58 +0100] rev 50029
commit: use `dirstate.change_files` to scope the associated `addremove` This was significantly more complicated than I expected, because multiple extensions get in the way. I introduced a context that lazily open the transaction and associated context to work around these complication. See the inline documentation for details. Introducing the wrapping transaction remove the need for dirstate-guard (one of the ultimate goal of all this), and slightly affect the result of a `hg rollback` after a `hg commit --addremove`. That last part is deemed fine. It aligns the behavior with what happens after a failed `hg commit --addremove` and nobody should be using `hg rollback` anyway. The small output change in the test come from the different transaction timing and fact the transaction now backup the dirstate before the addremove, which might mean "no file to backup" when the repository starts from an empty state.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 tip