Is there a single Subversion command that would “reset” a working copy exactly to the state that’s stored in the repository? Something like git reset --hard or (ha, hard Git reset does not remove unversioned files either!) rm -rf wc && svn co <url> wc.
Update: I’m not after a simple revert, as that does not delete extra files in the working copy. I really want something that would be the same as deleting the working copy and checking it out again, only without having to download the data again. (Obviously I don’t mind losing all the uncommitted changes.)
You can recursively revert like this:
svn revert --recursive .There is no way (without writing a creative script) to remove things that aren’t under source control. I think the closest you could do is to iterate over all of the files, use then grep the result of
svn list, and if the grep fails, then delete it.EDIT:
The solution for the creative script is here: Automatically remove Subversion unversioned files
So you could create a script that combines a
revertwith whichever answer in the linked question suits you best.