Earlz
Earlz

Reputation: 63905

Can't open .svn/text-base/file.svn-base?

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?

Upvotes: 63

Views: 65089

Answers (12)

Xonatron
Xonatron

Reputation: 16082

Posting this for those who have the same problem where it`s not related to the same filename in different capitalization/case:

I`m not sure what causes it, but this fix worked for me:

  • checkout the section in question to a new temp location
  • back up (in case this fails) and delete the .svn folder in your main location
  • replace the .svn folder in your main location with the one from the temp location
  • commit

This worked for me. I had only one file changed. Somehow the .svn folder became corrupt. Please back up your work before doing this.

Upvotes: 5

pashups
pashups

Reputation: 21

I had similar kind of issue "(Can't open file 'folder.svn\tmp\text-base\file.svn-base': The system cannot find the file specified")."

It was not because of case-sensitivity issue. But because the file path was too long. So I renamed the folder with a shorter name and moved it right inside C Drive and checked in successfully.

So if it is not case sensitivity, please watch for length of the full path to the file as well.

Upvotes: 2

chunguiw
chunguiw

Reputation: 841

Hi i meet similar problem today.

cannot find the file .svn\pristine\24\24fd530d4bd82341fb514ab912c9e10adbc4ad89.svn-base And i use the simple way to fix this problem.

First i delete the copy folder of this project And then i look up this file did not exist under that folder.so i just copy a svn-base from other file and rename this with 24fd530d4bd82341fb514ab912c9e10adbc4ad89.svn-base.And then do the clean up operation. After that i meet another file missing.using the same way and at last i fix this problem. Hope it can help you

in other words the solution is create a new svn-base file with the missing files name

Upvotes: 8

NGS mtech
NGS mtech

Reputation: 5

Batch solution for this awfull issue.

for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *.svn') do ( 
   if not exist %%i\text-base ( 
       mkdir "%%i\text-base"
   ) else (
echo already exist "%%i\text-base" 
   ) 
)

Upvotes: -2

Peon
Peon

Reputation: 29

For me the probleme was : case sensitive

svn repository commit under Linux : 2 files with the same name except for capitalization svn repository updated under Windows : Error durying update or checkout => The system cannot find the file specified.

Upvotes: 2

Traugott Streicher
Traugott Streicher

Reputation: 1

Solution (in case of corrupt SVN-directory; cleanup, etc. doeesn't work)

  1. Backup (rename directory)
  2. Checkout again
  3. Rename new directory
  4. Rename old directory back to old name
  5. Try to commit again (if necessary in small portions)
  6. Whenever an error occurs: copy the SVN-file in question from new directory to corrupt sources
  7. Repeat until happy ;)

Upvotes: 0

adams
adams

Reputation: 606

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).

Upvotes: 1

Dmitry Yakhnov
Dmitry Yakhnov

Reputation: 136

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.

Upvotes: 10

pettys
pettys

Reputation: 2468

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).

Upvotes: 80

Robert
Robert

Reputation: 878

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.

Upvotes: 0

mfeingold
mfeingold

Reputation: 7134

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

Upvotes: 0

codekaizen
codekaizen

Reputation: 27429

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.

Upvotes: 0

Related Questions