Is there any way to remove a working copy of svn? svn autoremove?

Is there a way to return a svn repo check?

I accidentally checked a huge code base in my user folder, and it will be very painful to delete everything manually, is there a way to delete a working copy?

Is there something like svn autoclean ?

+6
source share
3 answers

SVN was not intended for this, ideally you should check in an empty directory. Looking back, 20/20, so now you need to hack.

Create an empty branch in your repo, svn switch to this branch. This will update your working copy in this branch, in which there is nothing, so any files under version control should be deleted from your working copy. This will leave files and folders of .svn metafiles that you can work with individually, which will be much easier than individually figuring out which files are under version control and which are not

Also, if your SVN story has revision 1 as a new empty repo, you can SVN Update to this revision, which will do the same as the switching maneuver above, but most of the repos I've dealt with already have a lot files in version 1.

+5
source

deltree (on Windows) or rm -rf (everywhere)

0
source

From @invertedspear's good idea, we can have a simple solution

 # find your repo root first root_url=$(svn info --show-item repos-root-url) # switch to version 0 (must be empty) svn sw --ignore-ancestry "$root_url"@0 rm -rf .svn 
0
source

All Articles