Thu, 23 Jul 2020 23:58:23 +0200 commitctx: gather more preparation code within the lock context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 23:58:23 +0200] rev 45238
commitctx: gather more preparation code within the lock context This is a small change that exist mostly for clarification. I am about to move a large amount of code in its own function. having all that code next to each other will make the next changeset clearer.
Thu, 23 Jul 2020 23:40:59 +0200 commitctx: move a special case about files earlier
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 23:40:59 +0200] rev 45237
commitctx: move a special case about files earlier Same logic as a changeset a bit earlier, the `writefilecopymeta` section is more a post processing details so we move the conditional about `files` value closer to the rest of the code computing `files` value.
Thu, 23 Jul 2020 18:25:45 +0200 commitctx: extract all the manual logic to process the files
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 18:25:45 +0200] rev 45236
commitctx: extract all the manual logic to process the files That branch of the if is significantly more complicated than the other two. Moving it to its own function make it simple to keep the scope limited and to read to the higher level function.
Thu, 23 Jul 2020 23:08:00 +0200 commitctx: treat `filesadded` more like `filesremoved`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 23:08:00 +0200] rev 45235
commitctx: treat `filesadded` more like `filesremoved` Accumulating the filename in a list will have a negligible cost and deal with the list of added files like the other ones will make is code cleaning simpler. The two variable with very close name is not great, but my plan is to split most of the code in a separated function which will make the "problem" go away by itself.
Thu, 23 Jul 2020 22:58:29 +0200 commitctx: move `writechangesetcopy` business at the end a code section
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 22:58:29 +0200] rev 45234
commitctx: move `writechangesetcopy` business at the end a code section This code is to handle a specific subcase so we move it a the end. This allow to gather the rest of the "core" code closer to the related logic.
Thu, 23 Jul 2020 21:09:42 +0200 commitctx: move copy meta config reading in a dedicated function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 21:09:42 +0200] rev 45233
commitctx: move copy meta config reading in a dedicated function The logic is non trivial, make it contained in a function is clearer. It also unlock easy re-use of that logic without having the pass the value around.
Thu, 23 Jul 2020 21:03:30 +0200 commitctx: no longer use the `writecopiesto` variable in the function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 21:03:30 +0200] rev 45232
commitctx: no longer use the `writecopiesto` variable in the function The `writefilecopymeta` variable already carry the same information, so we can use `writefilecopymeta` in the one conditional where `writecopiesto` was used.
Thu, 23 Jul 2020 14:58:21 +0200 commitctx: extract the function that commit a new manifest
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Jul 2020 14:58:21 +0200] rev 45231
commitctx: extract the function that commit a new manifest The logic is large enough and isolated enough to be extracted, this reduce the size of the main function, making it simpler to follow.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -8 +8 +10 +30 +100 +300 +1000 +3000 tip