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

Re: Remove old revisions - merge old revs into one?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Fri, 22 Aug 2008 10:52:24 -0500

On Aug 22, 2008, at 05:30, Michael Schmarck wrote:

> Ryan Schmidt wrote:
>
>> On Aug 22, 2008, at 02:39, Michael Schmarck wrote:
>>
>>> Is it possible to merge all the "old" (however that's defined)
>>> revisions into one and then dump everything that's been done
>>> before that "old" rev.?
>>>
>>> Reason: I don't really need to keep a history of everything
>>> back to "day 1".
>>
>> That's not a good reason.... :)
>
> Depends.
>
>> The repository stores things efficiently, storing only changes
>> between revisions.
>
> That's much. I store binary files in the repo, so it always has
> to store a complete file.

Subversion uses a diff algorithm on all files, both text and binary.
So in many cases, the space occupied by committing a new binary will
be less than the size of the new binary, depending on how the binary
is structured. However, I understand that binary files are much
larger than text, so the amount of space used by lots of changes may
still be large.

>> So you probably won't gain much by deleting part
>> of the history, and you lose a lot -- the history! In some cases,
>
> The history doesn't mean much at all to me. I can very well do without
> it.
>
>> even ends up much larger. (Cheap copies can become non-cheap, for
>> example, if the source of the copy goes away with your deleted
>> revisions.)
>
> I don't do cheap copies.

Ok, if you don't ever copy things in the repository, like making a
tag or a branch, then you won't run into this situation.

>> The tools to accomplish the deletion of revisions are svnadmin dump,
>> svndumpfilter, and svnadmin load, if you're curious, but as I said, I
>> don't recommend you doing this.
>
> That effectively means to recreate the repo, doesn't it?

Yes. You dump the range of revisions you want to keep (e.g. to
discard the history of the first 1000 revisions, you could dump
revisions 1000 thru HEAD), optionally filter out any extra paths you
want to remove, then create a new repo with a new UUID and load the
dump file into it. Everybody then discards their working copies and
checks out new ones. Any references to old revision numbers in your
log messages are now likely wrong since revisions have been
renumbered. All in all, it can be a pretty painful operation.
Subversion is designed to retain all your history; making it do
otherwise is hard.

If you don't use tags and branches, and you don't care about history,
and you're storing binary files, and you want to periodically free up
disk space by deleting old revisions, you may want to reconsider
whether Subversion is the best tool for this task. A simple
fileserver may be better suited, for example.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-08-22 17:52:50 CEST

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

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