Sat, 04 Feb 2023 12:14:19 +0100 subrepo: let black expand some call on multiple lines early
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 04 Feb 2023 12:14:19 +0100] rev 50101
subrepo: let black expand some call on multiple lines early newer version of black are righfully doing this, so I apply it before more semantic change to reduce noise in the next changeset.
Wed, 14 Dec 2022 00:43:24 +0100 dirstate: use `dirstate.change_files` to scope the change in `import`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Dec 2022 00:43:24 +0100] rev 50100
dirstate: use `dirstate.change_files` to scope the change in `import` This is the way.
Wed, 14 Dec 2022 00:52:06 +0100 dirstate: use `dirstate.change_files` to scope the change in `automv`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Dec 2022 00:52:06 +0100] rev 50099
dirstate: use `dirstate.change_files` to scope the change in `automv` This is... mostly... the way.
Wed, 14 Dec 2022 00:47:22 +0100 dirstate: use `dirstate.change_files` to scope the change in `amend`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Dec 2022 00:47:22 +0100] rev 50098
dirstate: use `dirstate.change_files` to scope the change in `amend` This is the way.
Wed, 25 Jan 2023 12:46:46 +0100 dirstate: use the `changing_files` context in the `keyword` demo
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Jan 2023 12:46:46 +0100] rev 50097
dirstate: use the `changing_files` context in the `keyword` demo This is the way.
Wed, 25 Jan 2023 12:56:26 +0100 dirstate: wrap repository change in appropriate context in `test-context`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Jan 2023 12:56:26 +0100] rev 50096
dirstate: wrap repository change in appropriate context in `test-context` We need the `wlock` (to add files), the `lock` (to commit), a `transaction` (to commit) and a `changing_files` context (to add files). Strictly speaking, we could let the commit take the `lock` and create a `transaction`, but it seems more consistent that way.
Wed, 25 Jan 2023 12:57:52 +0100 dirstate: use wlock and changing_files context in `test-revlog-ancestry`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Jan 2023 12:57:52 +0100] rev 50095
dirstate: use wlock and changing_files context in `test-revlog-ancestry` This is the way.
Tue, 13 Dec 2022 15:01:59 +0100 dirstate: use `dirstate.change_files` to scope the change in `revert`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 15:01:59 +0100] rev 50094
dirstate: use `dirstate.change_files` to scope the change in `revert` This is the way.
Wed, 25 Jan 2023 12:46:22 +0100 dirstate: use `dirstate.change_files` to scope the change in `gpg`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 25 Jan 2023 12:46:22 +0100] rev 50093
dirstate: use `dirstate.change_files` to scope the change in `gpg` This is the way.
Tue, 13 Dec 2022 16:57:41 +0100 dirstate: use `dirstate.change_files` to scope the change in `tag`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 16:57:41 +0100] rev 50092
dirstate: use `dirstate.change_files` to scope the change in `tag` This is the way.
Tue, 31 Jan 2023 00:05:12 +0100 dirstate: use `dirstate.change_files` to scope the change in `rename`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 31 Jan 2023 00:05:12 +0100] rev 50091
dirstate: use `dirstate.change_files` to scope the change in `rename` This is the way, unless we are not actually touching the working copy. In such cases we don't need to do something.
Tue, 31 Jan 2023 00:08:53 +0100 dirstate: use `dirstate.change_files` to scope the change in `copy`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 31 Jan 2023 00:08:53 +0100] rev 50090
dirstate: use `dirstate.change_files` to scope the change in `copy` This is the way, unless we are not actually touching the working copy. In such cases we don't need to do something.
Tue, 13 Dec 2022 16:29:30 +0100 dirstate: use `dirstate.change_files` to scope the change in `remove`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 16:29:30 +0100] rev 50089
dirstate: use `dirstate.change_files` to scope the change in `remove` This is the way.
Tue, 13 Dec 2022 16:27:57 +0100 dirstate: use `dirstate.change_files` to scope the change in `forget`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 16:27:57 +0100] rev 50088
dirstate: use `dirstate.change_files` to scope the change in `forget` This is the way.
Tue, 13 Dec 2022 15:07:32 +0100 dirstate: use `dirstate.change_files` to scope the change in `addremove`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Dec 2022 15:07:32 +0100] rev 50087
dirstate: use `dirstate.change_files` to scope the change in `addremove` This is the way.
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 50086
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 50085
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.
Sun, 05 Feb 2023 15:38:23 +0100 commit: move the addremove logic around to make the next changeset clearer
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 15:38:23 +0100] rev 50084
commit: move the addremove logic around to make the next changeset clearer Lets do the noise now, without changing any thing. So the new changeset can focus on the actual semantic changes.
Wed, 15 Feb 2023 10:46:46 +0100 largefiles: link the core dirstate._changing context to the lfdirstate one
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 10:46:46 +0100] rev 50083
largefiles: link the core dirstate._changing context to the lfdirstate one This will be much cleaner and safer to make sure the two dirstates are in sync. This way, the large-files dirstate will simply inherit the state of the main dirstate, so if the core code does the right thing, the large-files code should be right too.
Thu, 26 Jan 2023 17:44:27 +0100 dirstate: add a context for tracking files change
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Jan 2023 17:44:27 +0100] rev 50082
dirstate: add a context for tracking files change Let us start to use it. We will enforce it later.
Mon, 13 Feb 2023 21:51:45 +0100 dirstate: invalidate the dirstate change on transaction failure
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 13 Feb 2023 21:51:45 +0100] rev 50081
dirstate: invalidate the dirstate change on transaction failure If the change context lives inside a transaction, the change are not flushed to disk on exit as this is delegated to the transaction. As a result we should also delegate the part that do cleanup on failure. The issue was caught by tests with other change, but it seems useful to fix this as soon as possible.
Thu, 26 Jan 2023 17:16:24 +0100 dirstate: factor the "changing" context logic out
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Jan 2023 17:16:24 +0100] rev 50080
dirstate: factor the "changing" context logic out This makes it reusable for other types of changes.
Thu, 26 Jan 2023 15:50:45 +0100 dirstate: introduce a `is_changing_any` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Jan 2023 15:50:45 +0100] rev 50079
dirstate: introduce a `is_changing_any` property This will embrace other cases than changing parents.
Mon, 30 Jan 2023 19:21:34 +0100 dirstate: rename `pendingparentchange` to `is_changing_parents`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 30 Jan 2023 19:21:34 +0100] rev 50078
dirstate: rename `pendingparentchange` to `is_changing_parents` This is clearer and more inline witht he other change we did.
Thu, 26 Jan 2023 15:50:36 +0100 dirstate: rename _parentwriters to _changing_level
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Jan 2023 15:50:36 +0100] rev 50077
dirstate: rename _parentwriters to _changing_level We will have context for changing more than parents, so lets be prepared.
Sun, 05 Feb 2023 12:14:45 +0100 largefiles: remove the `changing_parents` context in `openlfdirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Feb 2023 12:14:45 +0100] rev 50076
largefiles: remove the `changing_parents` context in `openlfdirstate` This code might run in any kind of change context, we should rely on the higher level context instead of opening our own.
Wed, 15 Feb 2023 00:57:16 +0100 largefiles: remove the second `changing_parents` in `updatelfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:57:16 +0100] rev 50075
largefiles: remove the second `changing_parents` in `updatelfiles` Now that the `update_file` call have been migrated, we can drop the semantically-wrong `changing_parents` context.
Wed, 15 Feb 2023 00:55:44 +0100 largefiles: remove the first `changing_parents` in `updatelfiles`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Feb 2023 00:55:44 +0100] rev 50074
largefiles: remove the first `changing_parents` in `updatelfiles` Now that the `update_file` call have been migrated, we can drop the semantically-wrong `changing_parents` context.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 tip