You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by vinay modi <mo...@gmail.com> on 2012/09/04 22:03:38 UTC

Need Help : Purging very old (/unwanted) revisions

Hi

My organization's svn repository size has grown too large and most of the
old revisions of documents are never being used.

Consider I have 4 documents in my repository, of which I have 10 revisions:
4 for document A
3 for document B
2 for document C
1 for document D.

Now, I want to keep only the last 2 revisions of all documents i.e 2 for A,
2 for B, 2 for C and 1 for D..
Is there any way I can achieve this in my subversion repository?

Thanks in Advance

Regards
Vinay

Re: Need Help : Purging very old (/unwanted) revisions

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag vinay modi,
am Dienstag, 4. September 2012 um 22:03 schrieben Sie:

> Now, I want to keep only the last 2 revisions of all documents i.e 2 for A,
> 2 for B, 2 for C and 1 for D..
> Is there any way I can achieve this in my subversion repository?

Not easily, you may have a look at svndumpfilter and script something
or else, but be aware that all working copies need a clean checkout
after that. The current working copies become useless, as the newly
created repo will have new revisions with completely new content.

Besides that, what exactly does "too large" mean? Storage, revision
numbers, directory structure, file number or else? This is very
important, because in your example you may even not save any space
after you did what you think about. Subversion did save your
documents completely in your first revision, after that changes to the
documents where only applied as diffs, depending on your documents
with very few data actually saved. If your documents are MBs of size
and you have 10 revisions with only some KBs in size each, you will
not save much space because even if you only save the last two
revisions your document has to be saved completely once, of course.

What is your repository version? New versions of Subversions
repository have a feature called representation sharing, which is some
kind of deduplication, helping to minimize actually needed storage a
lot. In my old repositories I was able to nearly half the size. The
other benefit would be that you only need a dump/load-cycle and you
can reuse your existing working copies, as revision numbers etc. won't
be changed.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Need Help : Purging very old (/unwanted) revisions

Posted by Lorenz <lo...@yahoo.com>.
vinay modi wrote:
>My organization's svn repository size has grown too large and most of the
>old revisions of documents are never being used.
>[...]
>Now, I want to keep only the last 2 revisions of all documents i.e 2 for A,
>2 for B, 2 for C and 1 for D..

	http://subversion.apache.org/faq.html#removal
and
	http://subversion.tigris.org/issues/show_bug.cgi?id=516
-- 

Lorenz


RE: Need Help : Purging very old (/unwanted) revisions

Posted by "Cooke, Mark" <ma...@siemens.com>.
Please try to post in * plain * text (not html or rich text).  We also prefer to add text in-line or at the bottom as it makes it easier to read the whole story...

> 	From: vinay modi [mailto:modivinay@gmail.com 
> <javascript:_e({}, 'cvml', 'modivinay@gmail.com');> ] 
> 	Sent: Tuesday, September 04, 2012 4:04 PM
> 	To: users@subversion.apache.org <javascript:_e({}, 
> 'cvml', 'users@subversion.apache.org');> 
> 	Subject: Need Help : Purging very old (/unwanted) revisions
> 
> 	Hi
> 
> 	My organization's svn repository size has grown too 
> large and most of the old revisions of documents are never being used.

Can we stop here and ask what the problem actually is?  There are repositories around with millions of revisions and files that work without problems, so what are your issues?

> 	Consider I have 4 documents in my repository, of which 
> I have 10 revisions:
> 	4 for document A
> 	3 for document B
> 	2 for document C
> 	1 for document D.
> 
> 	Now, I want to keep only the last 2 revisions of all 
> documents i.e 2 for A, 2 for B, 2 for C and 1 for D..
> 	Is there any way I can achieve this in my subversion repository?

Short answer: no.

Long answer: subversion (along with other such tools) is designed to keep all your history!  Removing stuff is not generally considered "a good thing" and is therefore not something you can easily do.

As JPM mentions below, it probably can be done, with a lot of effort by someone who knows what they are doing, but I would urge you to consider and explain why you think this is necessary.  There may be other ways around whatever problems you are having that we can suggest once we understand your issues.

~ mark c

> 	Thanks in Advance
> 
> 	Regards
> 
> 	Vinay
> 
> On Wednesday, September 5, 2012, John Maher wrote:
> 
> 	Hello,
> 
> 	You can create a new repository then get the second to 
> last revision and use that to create a new project in that 
> new repository.  Then create a working copy and replace it 
> with the current revision.  Then do a commit and you're done.
> 
> 	JPM
> 

Re: Need Help : Purging very old (/unwanted) revisions

Posted by vinay modi <mo...@gmail.com>.
Thanks John for your prompt response.

I am not an svn administator and so I am unable to list down the steps to
be followed in order to achieve this.

Could you please provide me the steps (/commands) to be followed.

Regards
Vinay

On Wednesday, September 5, 2012, John Maher wrote:

>  Hello,****
>
> ** **
>
> You can create a new repository then get the second to last revision and
> use that to create a new project in that new repository.  Then create a
> working copy and replace it with the current revision.  Then do a commit
> and you’re done.****
>
> ** **
>
> JPM****
>
> ** **
>  ------------------------------
>
> *From:* vinay modi [mailto:modivinay@gmail.com <javascript:_e({}, 'cvml',
> 'modivinay@gmail.com');>]
> *Sent:* Tuesday, September 04, 2012 4:04 PM
> *To:* users@subversion.apache.org <javascript:_e({}, 'cvml',
> 'users@subversion.apache.org');>
> *Subject:* Need Help : Purging very old (/unwanted) revisions****
>
> ** **
>
> Hi****
>
> ** **
>
> My organization's svn repository size has grown too large and most of the
> old revisions of documents are never being used.****
>
> ** **
>
> Consider I have 4 documents in my repository, of which I have 10 revisions:
> 4 for document A
> 3 for document B
> 2 for document C
> 1 for document D.****
>
>
> Now, I want to keep only the last 2 revisions of all documents i.e 2 for
> A, 2 for B, 2 for C and 1 for D..
> Is there any way I can achieve this in my subversion repository?****
>
> ** **
>
> Thanks in Advance****
>
> ** **
>
> Regards****
>
> Vinay****
>

RE: Need Help : Purging very old (/unwanted) revisions

Posted by John Maher <Jo...@rotair.com>.
Hello,

 

You can create a new repository then get the second to last revision and
use that to create a new project in that new repository.  Then create a
working copy and replace it with the current revision.  Then do a commit
and you're done.

 

JPM

 

________________________________

From: vinay modi [mailto:modivinay@gmail.com] 
Sent: Tuesday, September 04, 2012 4:04 PM
To: users@subversion.apache.org
Subject: Need Help : Purging very old (/unwanted) revisions

 

Hi

 

My organization's svn repository size has grown too large and most of
the old revisions of documents are never being used.

 

Consider I have 4 documents in my repository, of which I have 10
revisions:
4 for document A
3 for document B
2 for document C
1 for document D.


Now, I want to keep only the last 2 revisions of all documents i.e 2 for
A, 2 for B, 2 for C and 1 for D..
Is there any way I can achieve this in my subversion repository?

 

Thanks in Advance

 

Regards

Vinay