Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:26:48 +0200] rev 47174
revlog: directly use self._format_flags when loading index
The shorthand variable does not bring much, so we drop it to simplify the code.
Differential Revision: https://phab.mercurial-scm.org/D10600
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:26:37 +0200] rev 47173
revlog: directly use self._format_version when loading index
The shorthand variable does not bring much, so we drop it to simplify the code.
Differential Revision: https://phab.mercurial-scm.org/D10599
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:26:27 +0200] rev 47172
revlog: use `_format_flags` to access flags instead of `header`
It seems better to reuse the variable we carefully extracted
This also open the way to more flexible way to retrieve these flags.
Differential Revision: https://phab.mercurial-scm.org/D10598
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:26:17 +0200] rev 47171
revlog: rename `newversionflags` to `new_header`
This make it consistent with the previous changeset.
Differential Revision: https://phab.mercurial-scm.org/D10597
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:26:06 +0200] rev 47170
revlog: rename `versionflags` to header
The variable is named as such because it contains "version" information and
"flags" information. However you mostly needs to know the code to understand the
name which is not great. The fact that this is the very first four bytes in all
revlog seems more relevant, so we rename the variable "header".
Differential Revision: https://phab.mercurial-scm.org/D10596
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:25:56 +0200] rev 47169
revlog: move index reading logic in a dedicated method
They are multiple motivation to do it:
* The logic is complicated enough to deserver its own method.
* We will need to reuse this once we put a docket in use.
* This split the actual reading from the processing of the read data better.
Differential Revision: https://phab.mercurial-scm.org/D10595
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 12:25:45 +0200] rev 47168
revlog: define the actual index and datafile at loading time
This is just code movement, to make the code closer to where we actually use it
and where it will be defined in the future.
Differential Revision: https://phab.mercurial-scm.org/D10594