deltaparent or deltabase; let's decide

Sune Foldager cryo at cyanite.org
Fri May 6 02:19:40 CDT 2011


On Fri, May 06, 2011 at 12:39:26 -0500, Matt Mackall wrote:
>On Thu, 2011-05-05 at 10:06 +0200, Sune Foldager wrote:
>> The concept of the parent or base of a delta, meaning the revision (or node)
>> holding the text that a given delta is a patch for, is arbitrarily called
>> deltaparent and deltabase throughout the code. We also have a related but
>> separate concept 'base' in revlog, meaning the base of a chain of such deltas.
>>
>> We should decide on either deltaparent or deltabase, and change the code
>> accordingly.
>>
>> Arguments in favor of deltabase include that it's the base of a delta.
>> Arguments against is that it might conflate with the base of a delta CHAIN.
>>
>> Arguments in favor of deltaparent include that it's the parent of a delta ;-).
>
>Agreed, deltabase is confusing.
>
>'base' is (before generaldelta turns it into parent) the first revision
>in a delta chain. It's only useful to revlog internals.
>
>We basically never want a delta against that base. We usually want a
>delta against rev-1 (for bundling) or a delta against a parent (for
>bundling with parentdelta/general) or whatever delta we happen to
>already have (verify uses this to speed up reading manifests).
>
>In the context of bundling, we're using deltabase to mean 'what this
>delta is based on', so it's actually somewhat logical. And it's no more
>or less wrong than 'deltaparent', because it's not necessarily a parent
>in our usual sense either. So we need another synonym. Possibilities:
>deltafrom, deltabasis, deltaagainst, deltareference.

Well, since I renamed base to chainbase, we might also just stick with deltabase
now? (not sure the rename was pushed yet; otherwise it's in my queue). I actually
think I would prefer that over deltaparent, to lessen the confusion with parent.

Then we'd have:
parent - the usual sense
chainbase - base of a chain of deltas
deltabase - base of a delta?

Sune


More information about the Mercurial-devel mailing list