( )⚙ D10352 revlog: introduce an explicit tracking of what the revlog is about

This is an archive of the discontinued Mercurial Phabricator instance.

revlog: introduce an explicit tracking of what the revlog is about
ClosedPublic

Authored by Alphare on Apr 9 2021, 8:30 AM.

Details

Summary

Since the dawn of time, people have been forced to rely to lossy introspection
of the index filename to determine what the purpose and role of the revlog they
encounter is. This is hacky, error prone, inflexible, abstraction-leaky,
<insert-your-own-complaints-here>.

In f63299ee7e4d Raphaël introduced a new attribute to track this information:
revlog_kind. However it is initialized in an odd place and various instances
end up not having it set. In addition is only tracking some of the information
we end up having to introspect in various pieces of code.

So we add a new attribute that holds more data and is more strictly enforced.
This work is done in collaboration with Raphaël.

The revlog_kind one will be removed/adapted in the next changeset. We expect
to be able to clean up various existing piece of code and to simplify coming
work around the newer revlog format.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Alphare created this revision.Apr 9 2021, 8:30 AM
marmoute accepted this revision.Apr 19 2021, 8:43 AM
marmoute added a subscriber: marmoute.

I co-authored this revision with Alphare. So I am accepting it on the behalf of both of use since it already got two pairs on eyes on it.

baymax updated this revision to Diff 27092.Apr 20 2021, 5:55 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 27094.Apr 20 2021, 9:33 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 27223.Apr 30 2021, 6:52 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 27295.May 3 2021, 4:14 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

baymax updated this revision to Diff 27464.May 3 2021, 9:02 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.