You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Himanshu Raina <ra...@yahoo.com> on 2009/05/14 07:30:50 UTC

Removing unwanted data/release !!

Hi,

I have multiple repositories setup on my SVN server. As large number of commits are made the repository size keeps increasing regularly. Is there a way I can get rid of all unwanted revisions i.e. for example my current repo version is 4500 and I would want to keep only last 100 revision and delete all other. Is it possible and if yes then how ? 

Regards
Himanshu Raina



      Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2252255

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Removing unwanted data/release !!

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 16, 2009, at 12:09, webpost@tigris.org wrote:

> You would have to create a new repository with a new UUID, make  
> very sure not to preserve the old UUID, and have people use the  
> 'svn switch --relocate' command to switch to the new repository,  
> even if you kept it at the old location. And if you're doing that,  
> you may as well just have a new repository with a new name, so that  
> your old legacy material is still available.

Yes, you should use a new UUID on the new repository because it does  
not have the same contents as the old repository. However, this means  
that you cannot "svn switch --relocate", which is only for the case  
when a repository has moved to a different URL but is otherwise the  
same repository.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2285750

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Re: Removing unwanted data/release !!

Posted by we...@tigris.org.
Yes, you can. You can use the 'svndumpfilter' to re-order and leave out the now empty revisions. However, this will confuse the *heck* out of checked out repositories, which will have newer revisions that are not in the repository. I've accidentally done this, and this way lies madness.

You would have to create a new repository with a new UUID, make very sure not to preserve the old UUID, and have people use the 'svn switch --relocate' command to switch to the new repository, even if you kept it at the old location. And if you're doing that, you may as well just have a new repository with a new name, so that your old legacy material is still available.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2283044

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Removing unwanted data/release !!

Posted by Andy Levy <an...@gmail.com>.
On Thu, May 14, 2009 at 08:26, Himanshu Raina <ra...@yahoo.com> wrote:
> Hi,
>
> Dumping the repository and importing only unwanted data would change the
> revision number i.e say (of total 1000 revisions) if I dump revision
> 900-1000 from my existing repo and then create a new repo and load the dump
> file it would change the revision number from 1000 to 100 (i.e. 900-1000
> would become 0-100). My requirement is to delete all older revisions and
> keep only the latest ones (assuming I don't need older revisions) without
> disturbing the revision numbering i.e. when I checkout or update my existing
> copy it shouldn't give me a conflict owing to changes made by me.

You can't do that without creating empty "dummy" revisions.

Ask yourself again if it's really necessary. What kind of growth are
you dealing with? Why are you putting these things in the repository
if you don't care about losing history?

>
> --- On Thu, 14/5/09, Andy Levy <an...@gmail.com> wrote:
>
> From: Andy Levy <an...@gmail.com>
> Subject: Re: Removing unwanted data/release !!
> To: "Himanshu Raina" <ra...@yahoo.com>
> Cc: users@subversion.tigris.org
> Date: Thursday, 14 May, 2009, 3:59 PM
>
> On Thu, May 14, 2009 at 03:30, Himanshu Raina <ra...@yahoo.com>
> wrote:
>> Hi,
>>
>> I have multiple repositories setup on my SVN server. As large number of
>> commits are made the repository size keeps increasing regularly. Is there
>> a
>> way I can get rid of all unwanted revisions i.e. for example my current
>> repo
>> version is 4500 and I would want to keep only last 100 revision and delete
>> all other. Is it possible and if yes then how ?
>
> The whole point of a system like Subversion is to preserve your
> history. It's assumed that ALL revisions are wanted.
>
> Unless you're changing many very large binary files, or doing your
> moves & copies wrong, your repository should not be growing too
> quickly. What kind of growth are we talking about here?
>
> It is possible to remove revisions, but it requires taking the
> repository offline, dumping the contents, then loading what you want
> left in the repository (see
> http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering
> ). And depending on your repository activity, doing so can actually
> *increase* the size of your repository.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2254452
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>
> ________________________________
> Cricket on your mind? Visit the ultimate cricket website. Enter now!

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2257837

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Removing unwanted data/release !!

Posted by Himanshu Raina <ra...@yahoo.com>.
Hi,

Dumping the repository and importing only unwanted data would change the revision number i.e say (of total 1000 revisions) if I dump revision 900-1000 from my existing repo and then create a new repo and load the dump file it would change the revision number from 1000 to 100 (i.e. 900-1000 would become 0-100). My requirement is to delete all older revisions and keep only the latest ones (assuming I don't need older revisions) without disturbing the revision numbering i.e. when I checkout or update my existing copy it shouldn't give me a conflict owing to changes made by me.

Thanks,
Himanshu Raina

--- On Thu, 14/5/09, Andy Levy <an...@gmail.com> wrote:

From: Andy Levy <an...@gmail.com>
Subject: Re: Removing unwanted data/release !!
To: "Himanshu Raina" <ra...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Thursday, 14 May, 2009, 3:59 PM

On Thu, May 14, 2009 at 03:30, Himanshu Raina <ra...@yahoo.com> wrote:
> Hi,
>
> I have multiple repositories setup on my SVN server. As large number of
> commits are made the repository size keeps increasing regularly. Is there a
> way I can get rid of all unwanted revisions i.e. for example my current repo
> version is 4500 and I would want to keep only last 100 revision and delete
> all other. Is it possible and if yes then how ?

The whole point of a system like Subversion is to preserve your
history. It's assumed that ALL revisions are wanted.

Unless you're changing many very large binary files, or doing your
moves & copies wrong, your repository should not be growing too
quickly. What kind of growth are we talking about here?

It is possible to remove revisions, but it requires taking the
repository offline, dumping the contents, then loading what you want
left in the repository (see
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering
). And depending on your repository activity, doing so can actually
*increase* the size of your repository.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2254452

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].



      Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2256349

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Removing unwanted data/release !!

Posted by Andy Levy <an...@gmail.com>.
On Thu, May 14, 2009 at 03:30, Himanshu Raina <ra...@yahoo.com> wrote:
> Hi,
>
> I have multiple repositories setup on my SVN server. As large number of
> commits are made the repository size keeps increasing regularly. Is there a
> way I can get rid of all unwanted revisions i.e. for example my current repo
> version is 4500 and I would want to keep only last 100 revision and delete
> all other. Is it possible and if yes then how ?

The whole point of a system like Subversion is to preserve your
history. It's assumed that ALL revisions are wanted.

Unless you're changing many very large binary files, or doing your
moves & copies wrong, your repository should not be growing too
quickly. What kind of growth are we talking about here?

It is possible to remove revisions, but it requires taking the
repository offline, dumping the contents, then loading what you want
left in the repository (see
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering
). And depending on your repository activity, doing so can actually
*increase* the size of your repository.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2254452

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].