views:

1758

answers:

6

I'm using TortoiseSVN. I just made quite a few changes to my working copy and now I went to do a commit some of the files went through but at one file named Search.aspx.cs it says

Commit failed (details follow):
Can't open file 
'C:\-----\trunk\.svn\text-base\Search.aspx.cs.svn-base': 
The system cannot find the file specified.

I have tried doing a SVN update and SVN cleanup and nothing is restoring this file. I can't even create a diff because it gives a similar error about missing files. How do I fix this? What did I do to cause it?

A: 

It looks like your working copy is corrupted - the SVN base file for Search.aspx.cs is missing.

What I do in a situation like this to do a separate check-out in another directory to make a new working copy on the base, export my modified working copy, and copy the export over the new working copy.

codekaizen
If you downvote, at least comment on why to make the reason clear and help fellow viewers...
codekaizen
A: 

Did the rest of your changes go in ok?

If they did copy aside the offending file, kill the directory, check out a fresh copy and add the file back

mfeingold
A: 

I just checked back in here because my TSVN just triggered the same error.

In my case a simple 'clean up' on the corresponding directories helped.

Robert
Well, cleanup didn't work for me either. You must copy out the changed files to an unversioned directory, and then checkout a fresh copy of the repo and copy in the changed files.
Earlz
I did some further investigation and found out that my Windows Driver Kit build.bat was called with the -c command thus clearing all subdirectories (also the .svn* directories). So TSVN wasn't able to relocate the settings for the cleared directories. With this in mind I'd rather say my case was an easy one opposed to yours.
Robert
+5  A: 

Does this seem like a possible answer to your situation?

(from http://www.uwplatt.edu/csse/tools/subversion/subversion-help.html)

"Failed to add file '(name here)': object of the same name already exists.

or

"Can't open file 'folder.svn\tmp\text-base\file.svn-base': The system cannot find the file specified."

Both mean that two files in the same folder have the same name except for capitalization; for example "Readme.txt" and "README.TXT". Unix and Subversion are case-sensitive, so the files are considered to be completely unrelated. But in Windows is not case-sensitive, so when it tries to update README.TXT on top of Readme.txt (say), it breaks.

The surest way to fix the problem is to log in to a Unix system (such as io.uwplatt.edu) and use the unix notes to check out the repository there. You can then use the svn mv command to rename one of the files. If you are in the middle of trying to add a file to your repository, you might try using TortoiseSVN->Rename... to rename the existing file to something entirely different and then updating. Note that you need to use the TortoiseSVN rename commands; merely renaming the file in Windows Explorer won't fix your problems.

I had this same error, and using Tortoise SVN's repo browser was able to confirm that there were two files in the repository with the same name only varying by upper/lowercase letters. You can also fix this issue through the repo browser by deleting one of the files (you can do a diff first through repo browser to make sure you have what you need).

pettys
Umm.. yes, this may have actually happened.. It's too long ago for me to remember now..
Earlz
Just encountered this today. Someone had mistakenly added a file to the repository that had the same name but different case than an existing file. There was no need to use a unix system to check out, I was able to delete the offending file using the Tortise repo-browser... the project then checked out with no problem. I would imagine that if you renamed the file in the repo-browser (rather than the working copy) that would work as well.
B Pete
This is exactly the cause. It happened to me in a subfolder within a much more massive folder. Instead of wiping out my entire project, I was able to "fix" it by deleting the subfolder from the commandline, and then doing a svn update, which restored the missing subfolder.
Chris S
I had this problem too. This is such an odd issue. I wonder why TortoiseSVN can't just detect this instead of showing a weird error message.
Pieter
A: 

You can copy working file: C:-----\trunk\Search.aspx.cs

to the missing one: C:-----\trunk.svn\text-base\Search.aspx.cs.svn-base

and it will do the trick.

Dmitry Yakhnov
A: 

I had this problem after accidentally wiping empty .svn/tmp folders (and all other empty folders on my HD). None of the above solutions, except restoring an empty .svn/tmp folder helped (for all .svn folders).

gpgemini