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

Re: How to destroy previous revisions

From: <karl.kornel_at_mindspeed.com>
Date: 2006-12-29 06:43:22 CET

sudheer bheema <sudheer_bheema@yahoo.com> wrote on 12/28/2006 11:29:54 PM:

> Hello everybody,
>
> I am new to subversion.. Is there a functionality like removing
> the previous revisions from the repository.. I mean if i have 200
> revisions and i dont need 1-100 revisions, can i specifically remove
> the revisions 1-100 from repository.. Is this possible?? its only to
> save memory..
>
> <<<snip>>>

        First of all, I should ask if you really want to destroy 100
revisions. I mean, how much disk space will you really be able to save? I
acknowledge that you may be able to save a notable amount of space in
certain circumstances (for example, you check in a large file in revision
2, and delete it in revision 50, and you will NEVER EVER need the file
again), but I do not think it would be worth it, considering the vast
amount of history that would be lost.

        That being said, I believe you can dump and reload your repository
to achieve this effect. When you dump your repository, using the
`svnadmin dump` command, just dump revisions from 101 and above (`svnadmin
dump -r 101:HEAD > partial_dump`). When svnadmin dumps revision 101, it
will dump the complete contents of the repository for that revision (as if
you were checking out revision 101); svnadmin follows that by dumping each
revision, but only dumping the files that were changed. When you load the
dump file into a newly-created repository, revision 101 in the old
repository becomes revision 1 in the new repository, and everything from
revisions 1 to 100 in the old repository are lost.

        Beware: Do NOT use the '--incremental' switch when you dump your
repository: I said that svnadmin starts by dumping the complete contents
of the repository for the lowest revision; if you include the
'--incremental' switch when you execute the dump command, only the
differences are dumped (so running `svnadmin dump -r 101:HEAD
--incremental > partial_dump_2` starts by dumping just the differences
between revisions 100 and 101).

        Once again, be very careful! Do not destroy historic data unless
you have an extremely good reason for doing so, a reason that others agree
is valid!

-- A. Karl Kornel, Mindspeed Technologies, Inc.
karl.kornel@mindspeed.com -- (949) 579-3503
"Remember the Rules: Separation & Optimization"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 29 06:43:39 2006

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.