You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Giorgio F. Signorini" <gi...@unifi.it> on 2012/03/16 19:33:17 UTC

a simple recipe to 'obliterate' an item from svn repository

Hello

I need to delete a file permanently from my repository, since it was
added by mistake and is very big. I understand this is not a very easy
thing to do, and is related to the project of an 'svn obliterate'
command.

I seem to have found a simple workaround for my problem, and I would
very much like to share it for comments.

Suppose the current revision is 200 and the big file was added in rev
100. I can use the dump / load scheme of svnadmin, taking care in
skipping revision 100 during the process:

svnadmin dump -r1:99 oldrepos > rev.1-99
svnadmin dump -r101:200 --incremental oldrepos > rev.101-200

svnadmin create newrepos
svnadmin load newrepos < rev.1-99
svnadmin load newrepos < rev.101-200


I only wonder if the "--incremental" option will work even when
merging non-contiguous revisions. Please note that in revision 100
only the big unwanted file was added.

Thank you for your help

-- GFS
------------------------------------------------------------------------
 Dr. Giorgio F. SIGNORINI, PhD    
 Dipartimento di Chimica           tel: +39-055-457-3085
 Universita` di Firenze         
 via della Lastruccia, 3          email: giorgio.signorini "at" unifi.it  
 I-50019 Sesto F. (Firenze) Italy        http://www.chim.unifi.it/~signo
   My PGP key:  http://srv.chim.unifi.it/~signo/signo.asc
------------------------------------------------------------------------

R: Re: R: Re: a simple recipe to 'obliterate' an item from svn repository

Posted by "Giorgio F. Signorini" <gi...@unifi.it>.
 > From: Daniel Shahaf <da...@elego.de>
 > Date: Sat, 17 Mar 2012 12:50:48 +0200
 > 
 > 
 > Are you aware of svndumpfilter?
 > 
 
No, I was not. It is definitely the tool I need for the task. Thank
you.

Giorgio


Re: R: Re: a simple recipe to 'obliterate' an item from svn repository

Posted by Daniel Shahaf <da...@elego.de>.
Giorgio F. Signorini wrote on Sat, Mar 17, 2012 at 09:29:52 +0100:
> Hm ...  I just found that in r100 I did a couple of other changes to
> the repository other than adding the big unwanted file, so the recipe
> I had in mind is not an option. 
> 

Are you aware of svndumpfilter?

> I am left with your suggestion, svnsync. I thought it was used just to
> mirror a repository, do you mean it can be used to make a copy of a
> repo with some changes? What versione of SVN do I need (currently
> using 1.6.12)?

Any version that supports svnsync.  (So: you need to serve the
repository with 1.4+.)

> Some users have pre-1.5 subversion; will they be able
> to checkout from the new, modified repository (if created with
> --pre-1.5-compatible)?
> 

--pre-1.5-compatible matters in two ways: (a) between the on-disk
repository and the server program reading it; (b) in whether the
repository supports certain kinds of efficient mergeinfo
representations.  The latter should be documented in the 1.5 release
notes.

> Giorgio
> 
> 
>  > From: Daniel Shahaf <da...@elego.de>
>  > Date: Fri, 16 Mar 2012 21:27:55 +0200
>  > 
>  > Your recipe should work, assuming the file was added in r100 and never
>  > changed or copied afterwards.  You may pass --deltas to 'svnadmin dump'
>  > (no reason not to).  It'll offset r101:r200 revnums by one in the new
>  > repository.
>  > 
>  > Another way is to use svnsync with path-based authz blocking the file
>  > (and all its copied) from the sync user.
>  > 
>  > Giorgio F. Signorini wrote on Fri, Mar 16, 2012 at 19:33:17 +0100:
>  > > Hello
>  > > 
>  > > I need to delete a file permanently from my repository, since it was
>  > > added by mistake and is very big. I understand this is not a very easy
>  > > thing to do, and is related to the project of an 'svn obliterate'
>  > > command.
>  > > 
>  > > I seem to have found a simple workaround for my problem, and I would
>  > > very much like to share it for comments.
>  > > 
>  > > Suppose the current revision is 200 and the big file was added in rev
>  > > 100. I can use the dump / load scheme of svnadmin, taking care in
>  > > skipping revision 100 during the process:
>  > > 
>  > > svnadmin dump -r1:99 oldrepos > rev.1-99
>  > > svnadmin dump -r101:200 --incremental oldrepos > rev.101-200
>  > > 
>  > > svnadmin create newrepos
>  > > svnadmin load newrepos < rev.1-99
>  > > svnadmin load newrepos < rev.101-200
>  > > 
>  > > 
>  > > I only wonder if the "--incremental" option will work even when
>  > > merging non-contiguous revisions. Please note that in revision 100
>  > > only the big unwanted file was added.
>  > > 
>  > > Thank you for your help
>  > > 
>  > > -- GFS
>  > > ------------------------------------------------------------------------
>  > >  Dr. Giorgio F. SIGNORINI, PhD    
>  > >  Dipartimento di Chimica           tel: +39-055-457-3085
>  > >  Universita` di Firenze         
>  > >  via della Lastruccia, 3          email: giorgio.signorini "at" unifi.it  
>  > >  I-50019 Sesto F. (Firenze) Italy        http://www.chim.unifi.it/~signo
>  > >    My PGP key:  http://srv.chim.unifi.it/~signo/signo.asc
>  > > ------------------------------------------------------------------------

R: Re: a simple recipe to 'obliterate' an item from svn repository

Posted by "Giorgio F. Signorini" <gi...@unifi.it>.
Hm ...  I just found that in r100 I did a couple of other changes to
the repository other than adding the big unwanted file, so the recipe
I had in mind is not an option. 

I am left with your suggestion, svnsync. I thought it was used just to
mirror a repository, do you mean it can be used to make a copy of a
repo with some changes? What versione of SVN do I need (currently
using 1.6.12)? Some users have pre-1.5 subversion; will they be able
to checkout from the new, modified repository (if created with
--pre-1.5-compatible)?

Giorgio


 > From: Daniel Shahaf <da...@elego.de>
 > Date: Fri, 16 Mar 2012 21:27:55 +0200
 > 
 > Your recipe should work, assuming the file was added in r100 and never
 > changed or copied afterwards.  You may pass --deltas to 'svnadmin dump'
 > (no reason not to).  It'll offset r101:r200 revnums by one in the new
 > repository.
 > 
 > Another way is to use svnsync with path-based authz blocking the file
 > (and all its copied) from the sync user.
 > 
 > Giorgio F. Signorini wrote on Fri, Mar 16, 2012 at 19:33:17 +0100:
 > > Hello
 > > 
 > > I need to delete a file permanently from my repository, since it was
 > > added by mistake and is very big. I understand this is not a very easy
 > > thing to do, and is related to the project of an 'svn obliterate'
 > > command.
 > > 
 > > I seem to have found a simple workaround for my problem, and I would
 > > very much like to share it for comments.
 > > 
 > > Suppose the current revision is 200 and the big file was added in rev
 > > 100. I can use the dump / load scheme of svnadmin, taking care in
 > > skipping revision 100 during the process:
 > > 
 > > svnadmin dump -r1:99 oldrepos > rev.1-99
 > > svnadmin dump -r101:200 --incremental oldrepos > rev.101-200
 > > 
 > > svnadmin create newrepos
 > > svnadmin load newrepos < rev.1-99
 > > svnadmin load newrepos < rev.101-200
 > > 
 > > 
 > > I only wonder if the "--incremental" option will work even when
 > > merging non-contiguous revisions. Please note that in revision 100
 > > only the big unwanted file was added.
 > > 
 > > Thank you for your help
 > > 
 > > -- GFS
 > > ------------------------------------------------------------------------
 > >  Dr. Giorgio F. SIGNORINI, PhD    
 > >  Dipartimento di Chimica           tel: +39-055-457-3085
 > >  Universita` di Firenze         
 > >  via della Lastruccia, 3          email: giorgio.signorini "at" unifi.it  
 > >  I-50019 Sesto F. (Firenze) Italy        http://www.chim.unifi.it/~signo
 > >    My PGP key:  http://srv.chim.unifi.it/~signo/signo.asc
 > > ------------------------------------------------------------------------

Re: a simple recipe to 'obliterate' an item from svn repository

Posted by Daniel Shahaf <da...@elego.de>.
Your recipe should work, assuming the file was added in r100 and never
changed or copied afterwards.  You may pass --deltas to 'svnadmin dump'
(no reason not to).  It'll offset r101:r200 revnums by one in the new
repository.

Another way is to use svnsync with path-based authz blocking the file
(and all its copied) from the sync user.

Giorgio F. Signorini wrote on Fri, Mar 16, 2012 at 19:33:17 +0100:
> Hello
> 
> I need to delete a file permanently from my repository, since it was
> added by mistake and is very big. I understand this is not a very easy
> thing to do, and is related to the project of an 'svn obliterate'
> command.
> 
> I seem to have found a simple workaround for my problem, and I would
> very much like to share it for comments.
> 
> Suppose the current revision is 200 and the big file was added in rev
> 100. I can use the dump / load scheme of svnadmin, taking care in
> skipping revision 100 during the process:
> 
> svnadmin dump -r1:99 oldrepos > rev.1-99
> svnadmin dump -r101:200 --incremental oldrepos > rev.101-200
> 
> svnadmin create newrepos
> svnadmin load newrepos < rev.1-99
> svnadmin load newrepos < rev.101-200
> 
> 
> I only wonder if the "--incremental" option will work even when
> merging non-contiguous revisions. Please note that in revision 100
> only the big unwanted file was added.
> 
> Thank you for your help
> 
> -- GFS
> ------------------------------------------------------------------------
>  Dr. Giorgio F. SIGNORINI, PhD    
>  Dipartimento di Chimica           tel: +39-055-457-3085
>  Universita` di Firenze         
>  via della Lastruccia, 3          email: giorgio.signorini "at" unifi.it  
>  I-50019 Sesto F. (Firenze) Italy        http://www.chim.unifi.it/~signo
>    My PGP key:  http://srv.chim.unifi.it/~signo/signo.asc
> ------------------------------------------------------------------------

Re: a simple recipe to 'obliterate' an item from svn repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 16, 2012, at 13:33, Giorgio F. Signorini wrote:

> I need to delete a file permanently from my repository, since it was
> added by mistake and is very big. I understand this is not a very easy
> thing to do, and is related to the project of an 'svn obliterate'
> command.
> 
> I seem to have found a simple workaround for my problem, and I would
> very much like to share it for comments.
> 
> Suppose the current revision is 200 and the big file was added in rev
> 100. I can use the dump / load scheme of svnadmin, taking care in
> skipping revision 100 during the process:
> 
> svnadmin dump -r1:99 oldrepos > rev.1-99
> svnadmin dump -r101:200 --incremental oldrepos > rev.101-200
> 
> svnadmin create newrepos
> svnadmin load newrepos < rev.1-99
> svnadmin load newrepos < rev.101-200

You also need to ensure the new repos has a new UUID. That means use the "--ignore-uuid" flag on the first "svnadmin load" command. It also means everybody who has a working copy must check out a new working copy from the new repository once you're done.



AW: a simple recipe to 'obliterate' an item from svn repository

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Giorgio,

Maybe "svndumpfilter" can help:
http://svnbook.spears.at/nightly/de/svn.reposadmin.maint.html#svn.reposadmin.maint.tk.svndumpfilter
http://svnbook.spears.at/nightly/de/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering


Best regards

Markus Schaber
-- 
___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 


-----Ursprüngliche Nachricht-----
Von: Giorgio F. Signorini [mailto:giorgio.signorini@unifi.it] 
Gesendet: Freitag, 16. März 2012 19:33
An: users@subversion.apache.org
Betreff: a simple recipe to 'obliterate' an item from svn repository

Hello

I need to delete a file permanently from my repository, since it was added by mistake and is very big. I understand this is not a very easy thing to do, and is related to the project of an 'svn obliterate'
command.

I seem to have found a simple workaround for my problem, and I would very much like to share it for comments.

Suppose the current revision is 200 and the big file was added in rev 100. I can use the dump / load scheme of svnadmin, taking care in skipping revision 100 during the process:

svnadmin dump -r1:99 oldrepos > rev.1-99 svnadmin dump -r101:200 --incremental oldrepos > rev.101-200

svnadmin create newrepos
svnadmin load newrepos < rev.1-99
svnadmin load newrepos < rev.101-200


I only wonder if the "--incremental" option will work even when merging non-contiguous revisions. Please note that in revision 100 only the big unwanted file was added.

Thank you for your help

-- GFS
------------------------------------------------------------------------
 Dr. Giorgio F. SIGNORINI, PhD    
 Dipartimento di Chimica           tel: +39-055-457-3085
 Universita` di Firenze         
 via della Lastruccia, 3          email: giorgio.signorini "at" unifi.it  
 I-50019 Sesto F. (Firenze) Italy        http://www.chim.unifi.it/~signo
   My PGP key:  http://srv.chim.unifi.it/~signo/signo.asc
------------------------------------------------------------------------