revlog: rename `hdrsize` to `entry_size` in the C code
This is the size of and index entry, so lets make it clearer.
Differential Revision: https://phab.mercurial-scm.org/D10566
revlog: split the `version` attribute into its two components
The `revlog.version` attribute contained an integer coding 2 different informations:
* the revlog version number
* a bit field defining some specific feature of the revlog
We now explicitly store the two components independently. This avoid exposing
the implementation details all around the code and prepare for future revlog
version that would encode the information in a different way.
In the process we drop the `version` attribute from the interface. It was
flagged for removal when that interface was created.
Differential Revision: https://phab.mercurial-scm.org/D10565
verify: pass a revlog to `_checkrevlog` in `_verifymanifest`
Since `manifestrevlog` is not a `revlog`, we are passing strange thing to
`_checkrevlog`. We fix this to avoid breakage during future change.
Differential Revision: https://phab.mercurial-scm.org/D10564
revlog: replace flag check related to generaldelta with attribute check
Same logic as the previous changesets.
Differential Revision: https://phab.mercurial-scm.org/D10563
revlog: replace REVLOGV2 check related to sidedata with `hassidedata` checks
This is more flexible and semantically more correct. The associated revlog's
attribute exist since
827cb4fe62a3, so well we start linking sidedata to
revlogv2.
Differential Revision: https://phab.mercurial-scm.org/D10562
revlog: explicitely pass the "indexfile" parameter
Most of this was already done when introducing the `target` parameter, but some
remained. Having "indexfile" passed explicitely will help us to change the way
we address a revlog later in the stack. With the introduction of more generic
`docket`, the entry point will not necessarly be `xxx.i` file, and the actual
index files will have a variable name.
Differential Revision: https://phab.mercurial-scm.org/D10561
revlog: highlight current incompatibility in `rewrite_sidedata`
See comment for details. We will need to fix the test coverage when this
incompatibility is lifted.
Differential Revision: https://phab.mercurial-scm.org/D10544
revlog: adjust rewrite_sidedata code to not delete existing revlog content
The "w+" file mode is deleting all the content of the opened file. Which is bad…
This is not caught by the test because the test only check for a full, initial
pull where not pre-existing content exists. So we need to fix our test coverage
here.
However they are another issue that prevent "incremental" pull to work here. See
next changeset for details.
Differential Revision: https://phab.mercurial-scm.org/D10543