Mon, 03 May 2021 21:04:55 +0200 revlog: add a `_get_decompressor` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 21:04:55 +0200] rev 47254
revlog: add a `_get_decompressor` method This logic is non-trivial and we will need to reuse it. Differential Revision: https://phab.mercurial-scm.org/D10651
Mon, 03 May 2021 19:46:25 +0200 revlog: introduce a plain compression mode
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 19:46:25 +0200] rev 47253
revlog: introduce a plain compression mode That mode is simple it means the chunk contains uncompressed data and can be used directly. Differential Revision: https://phab.mercurial-scm.org/D10650
Mon, 03 May 2021 20:22:34 +0200 revlog: use an intermediate variable for `data` in `_chunk`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 20:22:34 +0200] rev 47252
revlog: use an intermediate variable for `data` in `_chunk` This will help us to dispatch this to the right decompressor. Differential Revision: https://phab.mercurial-scm.org/D10649
Mon, 03 May 2021 18:41:51 +0200 revlogv2: preserve the compression mode on disk
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 18:41:51 +0200] rev 47251
revlogv2: preserve the compression mode on disk The value is still the same and still not treated, but now it exists one disk. Differential Revision: https://phab.mercurial-scm.org/D10648
Tue, 04 May 2021 01:49:37 +0200 revlog: use `format_version` to dispatch different version in index_get
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 01:49:37 +0200] rev 47250
revlog: use `format_version` to dispatch different version in index_get This is semantically more correct. Differential Revision: https://phab.mercurial-scm.org/D10647
Mon, 03 May 2021 18:19:16 +0200 revlog: add a "data compression mode" entry in the index tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 18:19:16 +0200] rev 47249
revlog: add a "data compression mode" entry in the index tuple That will make it possible to keep track of compression information in the revlog index, opening the way to more efficient revision restoration (in native code, but the python usage is already defeating performance work). We start with adding a new entry to the index tuple, using a value matching the current behavior. We will introduce storage and other value in later changesets. Differential Revision: https://phab.mercurial-scm.org/D10646
Tue, 04 May 2021 01:15:03 +0200 revlog: fix the `null_item` attribute for V0
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 01:15:03 +0200] rev 47248
revlog: fix the `null_item` attribute for V0 This is not a proper index tuple. Differential Revision: https://phab.mercurial-scm.org/D10645
Tue, 04 May 2021 01:13:53 +0200 revlog: create a create `null_item` attribute for V0
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 01:13:53 +0200] rev 47247
revlog: create a create `null_item` attribute for V0 This value is currently wrong, but at least it is now -obviously- wrong. Differential Revision: https://phab.mercurial-scm.org/D10644
Mon, 03 May 2021 16:52:38 +0200 revlog: improve documentation of the entry tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 16:52:38 +0200] rev 47246
revlog: improve documentation of the entry tuple The code in revlog, and outside revlog directly use the index's entry tuple, with direct integer indexing. This is a voluntary trade off to obtains better performance from the Python code at the expense of the developers sanity. Let's at least have a clear and central documentation about what this tuple is about. Differential Revision: https://phab.mercurial-scm.org/D10643
Mon, 03 May 2021 23:45:05 +0200 revlog: simplify entry update logic in `rewrite_sidedata`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 23:45:05 +0200] rev 47245
revlog: simplify entry update logic in `rewrite_sidedata` We don't need to rebuild the full entry. So lets just gather the data we need to pass to `replace_sidedata_info`. Differential Revision: https://phab.mercurial-scm.org/D10642
Tue, 04 May 2021 00:02:48 +0200 revlog: simplify the replace_sidedata_info code
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 04 May 2021 00:02:48 +0200] rev 47244
revlog: simplify the replace_sidedata_info code We already know how to serialize and de-serialize and enty. So lets just do that and modify the entry tuple directly. This avoid having to duplicated binary operation in complicated code. Differential Revision: https://phab.mercurial-scm.org/D10641
Mon, 03 May 2021 23:59:15 +0200 revlog: use `rev` instead of `i` in replace_sidedata_info
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 23:59:15 +0200] rev 47243
revlog: use `rev` instead of `i` in replace_sidedata_info This is clearer. Differential Revision: https://phab.mercurial-scm.org/D10640
Mon, 03 May 2021 12:35:35 +0200 revlogv2: also keep track for the size of the "data" file
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:35:35 +0200] rev 47242
revlogv2: also keep track for the size of the "data" file This is useful to make sure we always start writing at the right location, without effort. Differential Revision: https://phab.mercurial-scm.org/D10632
Mon, 03 May 2021 12:35:25 +0200 revlogv2: track pending write in the docket and expose it to hooks
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:35:25 +0200] rev 47241
revlogv2: track pending write in the docket and expose it to hooks The docket is now able to write pending data. We could have used a distinct intermediate files, however keeping everything in the same file will make it simpler to keep track of the various involved files if necessary. However it might prove more complicated for streaming clone. This will be dealt with later. Note that we lifted the stderr redirection in the test since we no longer suffer from "unkown working directory parent" message. Differential Revision: https://phab.mercurial-scm.org/D10631
Mon, 03 May 2021 12:35:14 +0200 revlog: move the `trypending` logic from the `changelog` to the `revlog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:35:14 +0200] rev 47240
revlog: move the `trypending` logic from the `changelog` to the `revlog` We move the -reading- logic for the pending's '.a' suffixed index within the revlog class. This is motivated by the fact the logic could be simpler and cleaner if directly handled by the revlog docket. Before we can do so, we need to teach the revlog code about reading "pending" changes. To be honest, we already needed some special casing of the `.a` postfix, so this does not adds much complexity. The logic around -writing- the special '00changelog.i.a' remains in the `changelog` class. Note that the revlog-v2 logic no longer use this logic. The only remaining user of the `postfix` argument is the `censor` logic. We could probably also make the revlog full aware of it (most of the code is already implemented in revlog anyway) and get rid of the `postfix` argument and logic. However this is an adventure for another time. Since we have more information, we add more, paranoid, Programming error in case we detect such "pending reader" trying to do a read (which does not happens anyways). Differential Revision: https://phab.mercurial-scm.org/D10630
Mon, 03 May 2021 12:35:02 +0200 revlogv2: delay the update of the changelog docket to transaction end
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:35:02 +0200] rev 47239
revlogv2: delay the update of the changelog docket to transaction end This prevent external reader to see the transaction content before it is commited. However this also prevent the hooks to see the transaction content. We will fix this in later changesets. We have to temporarily suppress the error output of the command ran during the transaction as they sometimes get confused about unknown working directory and sometimes issue message on std-err in unspecified order. Differential Revision: https://phab.mercurial-scm.org/D10629
Mon, 03 May 2021 12:34:52 +0200 revlogv2: track current index size in the docket
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:52 +0200] rev 47238
revlogv2: track current index size in the docket This help use to fix transaction safety on repos. See next changesets for details. Differential Revision: https://phab.mercurial-scm.org/D10628
Mon, 03 May 2021 12:34:41 +0200 revlogv2: also test transactionality of revlog v2
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:41 +0200] rev 47237
revlogv2: also test transactionality of revlog v2 Without surprise, this is broken :-) Now that it is tested, we can fix it. Differential Revision: https://phab.mercurial-scm.org/D10627
Mon, 03 May 2021 12:34:31 +0200 revlog: add a new test file focussed on testing transactionally issue
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:31 +0200] rev 47236
revlog: add a new test file focussed on testing transactionally issue What we test here is currently also covered by `test-hooks.t`. However having our own test file allow for more focussed/deep testing and to cover more variant when relevant. So we create a new test file. Differential Revision: https://phab.mercurial-scm.org/D10626
Mon, 03 May 2021 12:34:21 +0200 revlogv2: store version information in the docket only
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:21 +0200] rev 47235
revlogv2: store version information in the docket only Having it duplicated in the index was both useless and a risk of discrepancy. Differential Revision: https://phab.mercurial-scm.org/D10625
Mon, 03 May 2021 12:34:11 +0200 revlogv2: introduce a very basic docket file
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:11 +0200] rev 47234
revlogv2: introduce a very basic docket file This is the first stone toward using a docket file in revlogv2. Right now the docket is very basic and only store the version number (which is -also- stored into the index file…) and the other files have fixed name. This new implementation break transactionally… but they are no test checking transactionally for revlogv2… So I take this as an opportunity to start small. They are no usage of revlogv2 outside of tests anyway. The docket keeps the `.i` naming used by previous version index to preserve a unique entry point. We could decide to use a different name and look it up first, or to fully rework this in a future "store" version. However that does not seems necessary right now. We will re-introduces transactionality (and associated testing…) in a later changesets. A long list of TODOs have been added to the relevant comment. Differential Revision: https://phab.mercurial-scm.org/D10624
Mon, 17 May 2021 15:05:24 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 17 May 2021 15:05:24 +0200] rev 47233
branching: merge stable into default
Mon, 03 May 2021 12:34:01 +0200 revlogv2: mark revlogv2 as requires a full upgrade
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:34:01 +0200] rev 47232
revlogv2: mark revlogv2 as requires a full upgrade This was overlooked previously. Differential Revision: https://phab.mercurial-scm.org/D10623
Mon, 03 May 2021 12:30:46 +0200 revlog: unify flag processing when loading index
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:30:46 +0200] rev 47231
revlog: unify flag processing when loading index The new code use a simple declaration to do centralised processing. This is clearer, shorter and less error prone. This will be especially useful as we plan to add a fourth format: changelog-v2. Differential Revision: https://phab.mercurial-scm.org/D10622
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 tip