Introduction to history deltas

Martin Pool mbp at sourcefrog.net
Tue Dec 6 12:30:34 GMT 2005


On  5 Dec 2005, John Yates <jyates at netezza.com> wrote:
> As I understand it the text deltas are delta between clear text
> versions of files, not between weaves.  Does this not preclude
> using some of the more powerful merge algorithms?
 
> Could not the text delta be redefined to express how to construct
> a new weave from an earlier weave?  If that were the case, and if
> the deltas are appropriately ordered then there must exist a one-
> pass algorithm that both reconstructs the desired weave and also
> produces one of the revisions encoded within the weave.

Suppose we store the line-based diffs to each version from its primary
parent.  Running through those diffs we can construct a weave in memory
in time approximately proportional to the number of revisions, and
comparable to the effort in just reading a weave in from disk.  (It may
in practice be more, perhaps substantially more, if we're reading many
files rather than just one.)  In particular if we already have the
line-based diffs this can be much easier and more efficient than needing
to calculate those diffs for each one.

This is perhaps a good reason to store these step-by-step line deltas
for each revision.  We might in addition want to store deltas that span
many revisions, or caches of particular versions, but I think having the
line-by-line deltas has value.

I've also been thinking about storage using something like history
deltas.  (And I'm happy Johan is looking at it too.)

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051206/53071dae/attachment.pgp 


More information about the bazaar mailing list