You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sancho Neves-Graca <sa...@neves-graca.org> on 2003/10/04 20:34:12 UTC

Removing files from repository

Hello,

I keep development projects on a repository repos1. I have decided to 
move the directory repos1/vendor to a new repository, repos2. This is 
because repos1/vendor keeps third-party libraries for many projects and 
it is growing large in size. The question is: once the contents of 
repos1/directory have been moved to repos2, can repos1/directory be 
deleted? I want this because it would reduce substantially the size of 
repos1 and there is no interest in the history of repos1/directory.

I thought of

	svn merge -r 323:1 ${REPOS}/vendor

	svn commit

But this will not really remove the files, it will just take it out 
from the head revision.

On p. 50 of the Subversion Handbook there is a mention of future 
development of svnadmin obliterate. This would be a welcome feature. It 
would be the closest to removing a module from a CVS repository.

In the meantime, is there any workaround to accomplish the permanent 
deletion?

Sincerely, Sancho Neves-Graca


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Removing files from repository

Posted by "C. Michael Pilato" <cm...@collab.net>.
Sancho Neves-Graca <sa...@neves-graca.org> writes:

> In the meantime, is there any workaround to accomplish the permanent
> deletion?

You can dump the repository using 'svnadmin dump', and hand-edit the
dumpfile to remove all references to the file you wish to delete.
Then reload the dumpfile into a new repository (using 'svnadmin
load').

Some warnings:  if you have binary files, make sure your text editor
won't munge that binary data when you edit the dumpfile (my Emacs is
pretty bad about doing this, sadly).  Also, make sure you understand
the dumpfile format before hopping around willy nilly with your 'yank'
command.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Wishlist -- svndumpfilter functionality moved into svnadmin

Posted by "C. Michael Pilato" <cm...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:

> Sancho Neves-Graca <sa...@neves-graca.org> writes:
> 
> > In the meantime, is there any workaround to accomplish the permanent
> > deletion?
> 
> Yes... 'svnadmin dump' your repository to a dumpfile, then 'svnadmin
> load' it into a new repository, but use 'svndumpfilter' to screen out
> all mention of the directory you want to be gone.
> 
> We really ought to mention this workaround in the book... hm.

Heh.  I forgot all about the dumpfilter!  Nice one, Ben.

--[ topic change ]--

I'd be all for mentioning it in the book if I really felt that
svndumpfilter was ready for primetime.  But alas, it isn't, and can't
be -- the concept is fundamentally flawed. :-( Because we don't report
fulltexts on every recursive item in a copy, and because svndumpfilter
has no access to those fulltexts, it cannot (and trust -- does not)
properly handle the case where an item was copied from an excluded
path to an included one.

As I've said off-list in the past, svndumpfilter's functionality
belongs in svnadmin.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Removing files from repository

Posted by kf...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> Sancho Neves-Graca <sa...@neves-graca.org> writes:
> Yes... 'svnadmin dump' your repository to a dumpfile, then 'svnadmin
> load' it into a new repository, but use 'svndumpfilter' to screen out
> all mention of the directory you want to be gone.
> 
> We really ought to mention this workaround in the book... hm.

Or at least in http://subversion.tigris.org/project_faq.html.

Sancho Neves-Graca, would you like to write a patch for the FAQ for
this item?  Just post it to users@subversion.tigris.org if so...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Removing files from repository

Posted by Ben Collins-Sussman <su...@collab.net>.
Sancho Neves-Graca <sa...@neves-graca.org> writes:

> In the meantime, is there any workaround to accomplish the permanent
> deletion?

Yes... 'svnadmin dump' your repository to a dumpfile, then 'svnadmin
load' it into a new repository, but use 'svndumpfilter' to screen out
all mention of the directory you want to be gone.

We really ought to mention this workaround in the book... hm.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org