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
Use TortoiseSVN → Delete to remove files or folders from Subversion. When you TortoiseSVN → Delete a file or folder, it is removed from your working copy immediately as well as being marked for deletion in the repository on next commit. The item's parent folder shows a “modified” icon overlay.
Browse to the directory in your repository that you want to delete. In the top-right corner, click , then click Delete directory. Review the files you will delete.
If you are using TortoiseSVN, just do a Check for Modifications, sort by the Status column, select all the entries marked missing , right-click to open the context menu, and select Delete. Finally, commit to publish the changes to the repository.
Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will revert not only the contents of an item in your working copy, but also any property changes.
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 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With