tags:

views:

10732

answers:

9

I deleted manually a directory I just added, offline, in my repository. I can't restore the directory.

Any attempt to do an update or a commit will fail with :

"blabla/.svn" containing working copy admin area is missing.

I understand why, but is there anyway to fix this.

I don't want to checkout the entire repo and add my changes to it manually, it would take hours.

+3  A: 

Can you try to check out a new copy of the parent directory?

Edit: To be bit more specific, I meant to suggest going up one level and deleting the containing directory. Then do a

svn update --set-depth infinity

to replace the directory.

Rob Wells
I tried that but for some strange reason, I end up with an empty directory. I don't get it...
e-satis
Do an update with `--set-depth infinity`
Wim Coenen
@wcoenen, edited as suggested. Thanks.
Rob Wells
An explicit <code>svn update blabla</code> from the parent should work too.
jmanning2k
@jmanning2k, that's what i thought as well, but the OP said that he'd tried it and it hadn't worked.
Rob Wells
To clarify, I suggested `--set-depth infinity` because of this: http://stackoverflow.com/questions/866835/subversion-using-visualsvn-tortoise-refuses-to-pull-down-new-files/
Wim Coenen
OK. But I'm working in UBuntu, so no tortoise.
e-satis
+7  A: 

According to this: http://www.devcha.com/2008/03/svn-directory-svn-containing-working.html

Check-out the folder "blabla" to a different location and then copy its .svn folder back into the original "blabla".

Mark
+12  A: 

fwiw, I had a similar situation and used svn --force delete _dir_. That solved the issue for me. Then i continued working with my working copy as normal.

Matt Setter
This worked for me as well. Updates and cleans failed because the directory never was in the repository, but the working copy was sure that it was under revision control. I wonder if I added the directory, but then deleted it before I committed it?
This is very good. I had added a directory, deleted the .svn but never commited. This totaly did the trick
Eric
+1  A: 

I had this error recently, when the files were excluded by settings in my SVN globals. The error was especially nasty since I also deleted the files directly from the repository - and this meant that the above solutions were refusing wouldn't work. In this case, manually deleting the .svn directory from the directory that I removed from SVN allowed me to run an update which then allowed me to commit.

Casebash
+1  A: 

@Mark, this worked great, thank you!

To clarify, the error "Directory 'blah/.svn' containing working copy admin area is missing" occurred when I attempted to add the directory to the repository, but did not have enough filesystem privileges to do so. The directory was not already in the repository, but it was claiming to be under version control after the failed add.

Checking out a copy of the parent directory to another location, and replacing the .svn folder in the parent dir of the working copy allowed me to add and commit the new directory successfully (after fixing the file permissions, of course).

Rob DiCiuccio
+3  A: 

What I did to fix this was to delete the local copy of the folder under question and then do an svn update of the parent directly afterwards.

Fixed it right up.

Maurizio
+1  A: 

I had the same problem, when I was trying to switch "C:\superfolder"

Error messages:

Directory 'C:\superfolder\subfolder\.svn'
containing
working copy admin area is missing
Please execute the 'Cleanup' command.

After trying to do a "cleanup", I got the following error:

 Cleanup failed to process the following paths:
 C:\superfolder\
'C:\superfolder\subfolder\' is not a working copy directory

Solution:

  1. Delete the folder "subfolder"
  2. Clean up the folder "superfolder"
  3. Try to switch again the folder "superfolder"

this worked for me. Please let me know if it also works for you.

Andreas
+1  A: 

We use maven and svn. It was an mistaken checkin of target directory to SVN that cause this error. Removing that fixed everything, if this hint helps anyone.

Madu
A: 

I just did 'svn revert /blabla' and it worked, the folder is back and I can svn delete it

Mala