views:

617

answers:

5

I'm using TortoiseSVN.

On my project I created a directory, put files on it, added everything to SVN source control but haven't commited it to the repository yet. It was looking like this:

/root_project_dir
-> .svn
-> dir1
  -> .svn
-> added_dir
  -> .svn
  -> subdir

But I mistakenly removed it with a regular Windows delete. Now, if I create the dir again, I can't add it to TortoiseSVN, it says:

"Directory '.../added_dir/.svn' containing working copy admin area is missing. Please execute the "Cleanup" command.

Ok, but when I run the "Cleanup" command I get this:

".../added_dir" is not a working copy directory.

I tried removing the directory, doing cleanup, creating it again, but couldn't be succesfull.

How can I add this dir to versioning again?

A: 

Try creating the directory without using the SVN Add command. Then commit it.

Joe Philllips
+2  A: 

Do a svn revert on the directory you deleted.

Joey
The real solution would be reverting the addition of the top directory and then creating the directory and adding it to versioning again
Edison Gustavo Muenz
svn revert added_dir should work fine. Afterwards the WC is in a usable state again and you can add the dir as usual
Joey
+5  A: 

Try to revert the addition: right-click on "root_project_dir" folder (that was the parent folder, right?) and select "Revert".

Milen A. Radev
That worked like a charm, thanks a lot
Edison Gustavo Muenz
A: 

Did you try to restore it from your bin ?

Luc M
+1  A: 

Off top of my head

svn revert --force <dirname>
Vladimir