deltaparent or deltabase; let's decide

Matt Mackall mpm at selenic.com
Fri May 6 00:39:26 CDT 2011


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.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list