[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Reality of delta benefit

From: Zack Weinberg <zack_at_wolery.cumb.org>
Date: 2000-08-17 21:27:00 CEST

On Thu, Aug 17, 2000 at 02:07:27PM -0400, Jonathan S. Shapiro wrote:
> > It's not all about the storage requirement, it's also about the speed it
> > takes to perform source code control operations.
> > i.e.:
> > * Initial insertion
> > * Checking in a new version of a file
> > * Retrieving the current version (in a reverse delta scenario)
> > * Retrieving an intermediate version
> > * Computing the diff between two distinct versions
> > * Reporting on revision logs (cvs log)
> > * Merging branches
>
> Of these, it seems to me that a common family file (an RCS, SCCS, or XDELTA
> file) assists in log reporting, and possibly also in computing the diff, but
> the latter only if the format is designed with great care. I'm not aware of
> any case where a merge tool today is leveraging the storage format for merge
> computation.

The SCCS format can be leveraged for merges, and Teamware/Bitkeeper
does just that. (Plain SCCS doesn't.) A version of a file maps to a
set of 'serial numbers' each of which in turn maps to a set of line
numbers which are to be included in the checked-out file. Supposing
you had three versions of a file:

# v1
a
b
c

# v2
a
b
d

# v3
a
b
e

the s.file representation of that would look something like

a # 1 2 3
b # 1 2 3
c # 1
d # 2
e # 3

Supposing you merged versions 2 and 3 to generate a
fourth version, and that fourth version wound up reading

# v4
a
b
d
e

Then the s.file now reads

a # 1 2 3 4
b # 1 2 3 4
c # 1
d # 2 4
e # 3 4

The actual s.file format has a header and a body; for this operation,
only the header changes. There is no need to rewrite the body.
[Except that you have to shuffle everything down a few hundred bytes;
which can trivially be avoided by putting the header and the body in
separate files.]

RCS ,v format, by contrast, would have to regenerate the 'tip' version
and add a delta block. If you wanted to keep version 3 around, it
would have to add a branch record and another delta block - in SCCS,
you can save version 3 for free.

> For all the other operations you mention, having every version be a separate
> entity is clearly more efficient and less prone to locking conflicts.

Agreed.

zw
Received on Sat Oct 21 14:36:07 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.