Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN recursive delete

Tags:

Is there a way to delete a folder, lets call it FolderX from an SVN trunk recursively? A quick search on google only tells me how to recursively delete all .svn folders and this is not what I want to do

like image 596
Razor Avatar asked Nov 05 '08 04:11

Razor


People also ask

How do I delete a .SVN folder recursively?

The find command returns a list of all the subfolders matching “. svn”, and this is then piped to the rm command to recursively delete the directory. Running rm using the full path will remove the confirmation prompt, and the “rf” arguments will recursively delete any folder contents.

How do I delete files from SVN?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

What is recursively remove?

Recursive deletion aims to delete all the files and directories within a subdirectory. Generally, whenever you attempt to delete any file or a directory within any operating system, the OS prompts you to provide confirmation to prevent accidental deletion of important files or directories.

How do I delete a .SVN file in Windows?

Right click on the project, go to Team->disconnect. It will open a popup where you select the first option: 'Also delete the SVN meta-information from file system. ' This will remove all the SVN folders automatically along with svn property files that you might forget sometimes while removing .


2 Answers

Try something like the following on a posix system:

find ./ -name "FolderX" | xargs svn delete --force 

This will find all matching files/folders starting in the current directory and perform the action on them i.e. svn delete. I'm not sure how to do this in windows though without cygwin.

For win32, the commenter below suggests a similar solution (cmd):

for /R . %1 in (*.EXT) do svn delete %1 
like image 139
Dana the Sane Avatar answered Sep 18 '22 15:09

Dana the Sane


svn delete FolX --force should do the trick even if there are unversioned files in the subtree.

like image 20
Franci Penov Avatar answered Sep 19 '22 15:09

Franci Penov