Mon, 19 Jul 2021 03:25:21 +0200 largefile: rearrange conditionnal in `synclfdirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 03:25:21 +0200] rev 47699
largefile: rearrange conditionnal in `synclfdirstate` We can liquidate the special case early, so do we. Differential Revision: https://phab.mercurial-scm.org/D11141
Mon, 19 Jul 2021 03:20:04 +0200 largefile: use `update_file` instead of `remove` in `mergerecordupdates`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 03:20:04 +0200] rev 47698
largefile: use `update_file` instead of `remove` in `mergerecordupdates` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11140
Sat, 17 Jul 2021 00:15:31 +0200 mq: use `update_file_p1` instead of `remove` when adjusting dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 17 Jul 2021 00:15:31 +0200] rev 47697
mq: use `update_file_p1` instead of `remove` when adjusting dirstate This is the new API. Differential Revision: https://phab.mercurial-scm.org/D11139
Mon, 19 Jul 2021 04:43:28 +0200 dirstate: properly update `_lastnormaltime` in `update_file_p1`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 04:43:28 +0200] rev 47696
dirstate: properly update `_lastnormaltime` in `update_file_p1` This was previously overlooked. Differential Revision: https://phab.mercurial-scm.org/D11138
Mon, 19 Jul 2021 04:43:14 +0200 dirstate: properly update `_lastnormaltime` in `update_file`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 04:43:14 +0200] rev 47695
dirstate: properly update `_lastnormaltime` in `update_file` This was previously overlooked. Differential Revision: https://phab.mercurial-scm.org/D11137
Thu, 15 Jul 2021 04:55:57 +0200 dirstate: use `reset_state` in `update_file_p1`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 04:55:57 +0200] rev 47694
dirstate: use `reset_state` in `update_file_p1` Going through the same API is more consistent and allow us to push implementation lower down the call stack. Differential Revision: https://phab.mercurial-scm.org/D11136
Thu, 15 Jul 2021 04:34:51 +0200 dirstate: rename `update_file_reference` to `update_file_p1`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 04:34:51 +0200] rev 47693
dirstate: rename `update_file_reference` to `update_file_p1` This is a bit clearer on the intended usage of the function. (but still not great) Differential Revision: https://phab.mercurial-scm.org/D11135
Mon, 19 Jul 2021 07:23:55 +0200 dirstate-map: move most of `dirstate.update_file` logic in the dsmap
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 07:23:55 +0200] rev 47692
dirstate-map: move most of `dirstate.update_file` logic in the dsmap A new `reset_state` method is introduced to deal with most of that logic. This move things one layer lower, but the ultimate goal is to deal with most of this at the DirstateItem level. This reveal various imperfection with the data passed to update_file by `mergestate.recordupdates`, however this is orthogonal to this patch and should be dealt with at a higher level. Differential Revision: https://phab.mercurial-scm.org/D11134
Fri, 16 Jul 2021 22:30:11 +0200 dirstate: replace `update_parent_file_data` with simpler `update_parent` call
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Jul 2021 22:30:11 +0200] rev 47691
dirstate: replace `update_parent_file_data` with simpler `update_parent` call This make the dirstate API simpler. Differential Revision: https://phab.mercurial-scm.org/D11133
Fri, 16 Jul 2021 15:07:16 +0200 dirstate: factor out the part retrieve "filedata" out of `normal`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Jul 2021 15:07:16 +0200] rev 47690
dirstate: factor out the part retrieve "filedata" out of `normal` We will need them elsewhere. Differential Revision: https://phab.mercurial-scm.org/D11132
Thu, 15 Jul 2021 02:19:41 +0200 dirstate-map: factor out the change to _dirs and _alldirs on removing
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 02:19:41 +0200] rev 47689
dirstate-map: factor out the change to _dirs and _alldirs on removing This logic is complicated enough to deserves its own function. So it now does. This will make it easier to reuse that logic in later changeset. Differential Revision: https://phab.mercurial-scm.org/D11131
Thu, 15 Jul 2021 01:58:50 +0200 dirstate-map: factor out the change to _dirs and _alldirs on dropping
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 01:58:50 +0200] rev 47688
dirstate-map: factor out the change to _dirs and _alldirs on dropping This logic is complicated enough to deserves its own function. So it now does. This will make it easier to reuse that logic in later changeset. Differential Revision: https://phab.mercurial-scm.org/D11130
Thu, 15 Jul 2021 01:58:31 +0200 dirstate-map: factor out the change to _dirs and _alldirs on adding
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 01:58:31 +0200] rev 47687
dirstate-map: factor out the change to _dirs and _alldirs on adding This logic is complicated enough to deserves its own function. So it now does. This will make it easier to reuse that logic in later changeset. Differential Revision: https://phab.mercurial-scm.org/D11129
Wed, 14 Jul 2021 22:06:13 +0200 dirstate-item: introduce a `dm_otherparent` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Jul 2021 22:06:13 +0200] rev 47686
dirstate-item: introduce a `dm_otherparent` property See inline documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11124
Wed, 14 Jul 2021 21:59:18 +0200 dirstate-item: introduce a `dm_nonnormal` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Jul 2021 21:59:18 +0200] rev 47685
dirstate-item: introduce a `dm_nonnormal` property See inline documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11123
Fri, 16 Jul 2021 16:19:31 +0200 dirstate-v2: Reserve a few bytes of space for future extensions
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 16:19:31 +0200] rev 47684
dirstate-v2: Reserve a few bytes of space for future extensions See doc-comment Differential Revision: https://phab.mercurial-scm.org/D11101
Fri, 16 Jul 2021 14:08:26 +0200 dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 14:08:26 +0200] rev 47683
dirstate-v2: Separate iterators for dirfoldmap and debugdirstate `dirstatemap.dirfoldmap` was recently changed to re-use a Rust iterator that was added for the `hg debugdirstate` command. That iterator was based on all nodes in the tree dirstate without an entry only existing to hold child nodes, and therefore being directories. However to optimize status further we may want to store additional nodes for unknown or ignored files and directories. At that point the two users of this iterator will want different things, so let’s make two iterators instead. See doc-comments in `dispatch.rs`. Differential Revision: https://phab.mercurial-scm.org/D11099
Thu, 15 Jul 2021 23:02:17 +0200 dirstate-v2: Move fixed-size tree metadata into the docket file
Simon Sapin <simon.sapin@octobus.net> [Thu, 15 Jul 2021 23:02:17 +0200] rev 47682
dirstate-v2: Move fixed-size tree metadata into the docket file Before this changeset, the dirstate-v2 data file contained not only nodes and paths that may be reused when appending to an existing file, but also some fixed-size metadata that applies to the entire tree and was added at the end of the data file for every append. This moves that metadata into the docket file, so that repeated "append" operations without meaningful changes don’t actually need to grow any file. Differential Revision: https://phab.mercurial-scm.org/D11098
Thu, 08 Jul 2021 19:23:44 +0200 dirstate-v2: Add heuristic for when to create a new data file
Simon Sapin <simon.sapin@octobus.net> [Thu, 08 Jul 2021 19:23:44 +0200] rev 47681
dirstate-v2: Add heuristic for when to create a new data file … instead of appending to the existing one. This is based on keeping track of how much of the existing data is not used anymore. Differential Revision: https://phab.mercurial-scm.org/D11097
Thu, 15 Jul 2021 10:31:43 +0200 dirstate-v2: Reuse existing paths when appending to a data file
Simon Sapin <simon.sapin@octobus.net> [Thu, 15 Jul 2021 10:31:43 +0200] rev 47680
dirstate-v2: Reuse existing paths when appending to a data file When writing a dirstate in v2 format by appending to an existing data file, filenames / paths that are borrowed from the previous on-disk representation can be reused. Differential Revision: https://phab.mercurial-scm.org/D11096
Thu, 15 Jul 2021 08:53:03 +0200 dirstate-v2: Reuse existing nodes when appending to a data file
Simon Sapin <simon.sapin@octobus.net> [Thu, 15 Jul 2021 08:53:03 +0200] rev 47679
dirstate-v2: Reuse existing nodes when appending to a data file When writing a dirstate in v2 format by appending to an existing data file, nodes that are still "unparsed" from the previous on-disk representation have been unchanged and can therefore be reused. This makes the new data point to previously-existing data for tree nodes. Differential Revision: https://phab.mercurial-scm.org/D11095
Tue, 13 Jul 2021 17:18:23 +0200 dirstate-v2: Support appending to the same data file
Simon Sapin <simon.sapin@octobus.net> [Tue, 13 Jul 2021 17:18:23 +0200] rev 47678
dirstate-v2: Support appending to the same data file For now we’re still writing the entire data every time, so appending is not useful yet. Later we’ll have new nodes pointing to some existing data for nodes and paths that haven’t changed. The decision whether to append is pseudo-random in order to make tests exercise both code paths. This will be replaced by a heuristic based on the amount of unused existing data. Differential Revision: https://phab.mercurial-scm.org/D11094
Tue, 13 Jul 2021 09:44:44 +0200 dirstate-v2: shrink on-disk path lengths to 16-bits
Simon Sapin <simon.sapin@octobus.net> [Tue, 13 Jul 2021 09:44:44 +0200] rev 47677
dirstate-v2: shrink on-disk path lengths to 16-bits Differential Revision: https://phab.mercurial-scm.org/D11091
Mon, 12 Jul 2021 23:05:56 +0200 dirstate-v2: Rename Header to Root, move it to the end of the data file
Simon Sapin <simon.sapin@octobus.net> [Mon, 12 Jul 2021 23:05:56 +0200] rev 47676
dirstate-v2: Rename Header to Root, move it to the end of the data file Now that they don’t have to be at the start, a given data file may contain multiple "roots". A docket only points to one of them, and previous ones are left unused to allow allow append-only in-place writing to an existing data file. Differential Revision: https://phab.mercurial-scm.org/D11090
Mon, 12 Jul 2021 22:46:52 +0200 dirstate-v2: Enforce data size read from the docket file
Simon Sapin <simon.sapin@octobus.net> [Mon, 12 Jul 2021 22:46:52 +0200] rev 47675
dirstate-v2: Enforce data size read from the docket file The data file may not be shorter than its size given by the docket. It may be longer, but additional data is ignored. Differential Revision: https://phab.mercurial-scm.org/D11089
Thu, 08 Jul 2021 12:18:21 +0200 dirstate-v2: Introduce a docket file
Simon Sapin <simon.sapin@octobus.net> [Thu, 08 Jul 2021 12:18:21 +0200] rev 47674
dirstate-v2: Introduce a docket file .hg/dirstate now only contains some metadata to point to a separate data file named .hg/dirstate.{}.d with a random hexadecimal identifier. For now every update creates a new data file and removes the old one, but later we’ll (usually) append to an existing file. Separating into two files allows doing the "write to a temporary file then atomically rename into destination" dance with only a small docket file, without always rewriting a lot of data. Differential Revision: https://phab.mercurial-scm.org/D11088
Thu, 15 Jul 2021 17:24:09 +0200 dirstate: replace a dead conditional branch with an assert in `update_file`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 17:24:09 +0200] rev 47673
dirstate: replace a dead conditional branch with an assert in `update_file` This is a case we never meet, so lets trim it away to simplify the code before more changes. Differential Revision: https://phab.mercurial-scm.org/D11128
Wed, 14 Jul 2021 23:32:35 +0200 dirstate-map: do not use `size` to gate copy dropping during remove_file
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Jul 2021 23:32:35 +0200] rev 47672
dirstate-map: do not use `size` to gate copy dropping during remove_file This get us close to moving the block right above withing the DirstateItem object. Doing so will help us getting rid of magic constant at the dirstatemap level. Differential Revision: https://phab.mercurial-scm.org/D11127
Thu, 15 Jul 2021 00:27:29 +0200 dirstate: drop a duplicated assert
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 00:27:29 +0200] rev 47671
dirstate: drop a duplicated assert This very case is checked in 3 line above that one. Differential Revision: https://phab.mercurial-scm.org/D11126
Thu, 15 Jul 2021 00:22:49 +0200 dirstate: drop duplicated check
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 00:22:49 +0200] rev 47670
dirstate: drop duplicated check This is covered by the `@requires_parents_change` decorator that this function use. Differential Revision: https://phab.mercurial-scm.org/D11125
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip