Probably this is a very easy question, but I did not find yet how to delete all files present at the moment in a external SVN repository.
I can delete just one file using:
svn delete -m "delete README" http://myrepo.com/svn/myrepo/README
But now I want to delete all of them. I thought about a script which gets the list of all the files of the repository and afterwards deletes them one by one, but this is tedious. Do you know a simpler solution?
I also tried:
svn rm http://myrepo.com/svn/myrepo
svn delete http://myrepo.com/svn/myrepo/*
But nothing
Thanks
You could do a shallow checkout and then delete all.
Example:
svn checkout --depth immediates http://myrepo.com/svn/myrepo myworking_copy
cd myworking_copy
svn rm *
svn ci -m "Deleting all"
You can svn rm
a sub-path in the repos, but not the repos itself. For the future a trunk
/ branches
/ tags
structure will probably fit you better.
To delete them with some bash/zsh magic:
REPO=http://myrepo.com/svn/myrepo && svn rm `svn ls $REPO | sed "s/^/$REPO\//"`
which will expand to
svn rm http://myrepo.com/svn/myrepo/file_1 http://myrepo.com/svn/myrepo/file_2 ...
You didn't say which platform you're on.
If you're on Windows and you have TortoiseSVN installed, you can search for all the files in the folder hierarchy using the explorer, mark all resulting files, and remove them using Tortoise.
If you're on some Unix derivate (includes OSX), you can probably do something similar in your favorite shell.