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

Re: Another thought on Subversion as a changeset engine

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-12-19 13:44:52 CET

On Thu, 2002-12-19 at 03:58, Alon Ziv wrote:
> It has occured to me that Subversion is already "almost" a changeset
> database, as the "deltas" it stores are equivalent to
> changesets---only they are reversed (i.e. they create the preceeding
> version from the following one, instead of the other way around).

The details of storage aren't relevant; it is the access model which is
important. Deltas are stored in this reversed style deliberately, so
that it is faster to access the most recent revisions. (It's fast to
access any revision, due to delta combination and skip-deltas, but it's
even faster to access the more recent ones.)

When a client asks for a delta between two revisions, we don't pull
deltas out of the repository and feed them to the client; we reconstruct
both revisions and diff them.

> Is this possible? Or are deltas fundamentally irreversible? (I do
> recall something was said about it on the list once, but I can't
> remember what... And couldn't find it in the archives :-( )

You can't look at a delta and reverse it (simple proof: if the target
file is empty, the delta will contain no instructions, and thus no
information about the source file). However, given a source file and a
delta, there may be a relatively efficient way to create a reversed
delta--that is, more efficient than simply reconstructing the target
file and then recomputing the delta backwards. As noted above, though,
we don't currently have a need for such an operation.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 19 13:48:15 2002

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