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

Re: Easy "obliterate" for BDB and lowest revision [Resent 2]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 23 Jun 2009 18:36:40 +0100

On Tue, 2009-06-23 at 09:39 +0200, Philipp Marek wrote:
> [I'm resending this mail {a third time} as it doesn't seem to have reached the
> mailing list - Jack already knows about that.]

I don't know what's up with that, but I expect this reply from me will
get there.

> Hello everybody,
>
> looking at trunk/subversion/libsvn_fs_base/notes/structure:358 I see this:
>
> At present, Subversion generally stores the youngest strings in "fulltext"
> form, and older strings as "delta"s against them (unless the delta would
> save no space compared to the fulltext).
>
> If I understand that correctly it should be relatively easy to obliterate the
> *lowest* (oldest) revision of any entry, as it's not referenced anywhere else.
> (Whether the directories could be purged too, and only kept in later
> revisions, I'm not sure ATM).

Well, I believe you're right in thinking the oldest delta of a file is
not referenced by anything else, so no other deltas need to be
re-calculated in order to remove it. However, I suspect that
re-calculating deltas is not one of the major difficulties with
implementing any kind of "obliterate" feature, as we already do it
during ordinary commits.

For example, one of the things we would need to take care of, if we
remove the existence of that file's oldest revision, is any "copy-from"
references that exist in later objects that were copied from it. (If, on
the other hand, we replace the file's text content with empty content or
some other content and leave it existing, that particular problem goes
away.)

I don't know what other things we'll have to take care of in the
repository. On the client side there is of course still the issue of how
working copies should behave (and how old working copies of clients that
don't understand "obliterate" will behave).

> I'm asking this because in 2004 there's been rumors about a script that does
> surgery in BDB repositories
> (http://svn.haxx.se/dev/archive-2004-08/index.shtml#163), and the simply
> "obliterate" way above would allow to use subversion for a round-robin backup
> system.

> Is there anything left of this script, or can someone assist in getting
> something like this done?

I don't know about such a script.

Personally I'm hoping to work on a more general solution that enables
obliterating later revisions, not just the oldest. But if someone wants
to fund me to do obliterate-just-the-oldest in a way that could be
extended to other cases later, I'll certainly do it. (I am currently
looking at the higher level issues: what kinds of functional change to
the repository's externally visible structure would best satisfy the
various kinds of user requirements, and how to manage the invalidation
that will occur to working copies.)

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2364572
Received on 2009-06-23 19:37:09 CEST

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.