63

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?

12 Answers 12

80

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

5
  • Umm.. yes, this may have actually happened.. It's too long ago for me to remember now..
    – Earlz
    Mar 16, 2010 at 16:06
  • 1
    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
    Apr 13, 2010 at 19:35
  • 1
    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.
    – Cerin
    May 27, 2010 at 20:52
  • Did someone tried to "fix" that problem by enabling case sensitivity in Windows? Especially the "obcaseinsensitive" registry entry may help in such situations: superuser.com/questions/266110/…
    – Robert
    Aug 11, 2011 at 10:27
  • 1
    I checked in a folder on a CentOS linux machine and tried to update from an OSX machine and I got this error - and yes, after I deleted the file with the same name apart from capitalization, the error went away... how come? Dec 7, 2012 at 18:39
10

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.

3
  • 1
    Actually this doesn't work because "commit" will say it has nothing to do -no differences.
    – pcjuzer
    Nov 4, 2010 at 9:41
  • This works if you just need to update your existing file with changes from the repo
    – Barrett
    Jul 27, 2011 at 13:15
  • 1
    I checked out a fresh copy of the head revision, copied the file in question from that working copy into my actual working copy's \trunk.svn\text-base\filename.svn-base and then committed the actual working copy. It worked! Thanks for the pointer.
    – ErJab
    Oct 13, 2011 at 2:24
8

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

1
  • I was able to fix my issue similarly by checking out (to a new location) just the nested folder which had the problem (to avoid a root checkout). From there I took its missing .svn-base and copied it to my actual working copy's pristine folder where it could not find the file.
    – mungflesh
    Sep 5, 2019 at 10:45
5

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.

2
  • 1
    I did something similar to this but I had about 800 files that had been modified so, what I did was move the broken directory to a safe location outside the project directory, then do an update (which fetched a clean copy of the directory), then I copied the modified files from the broken directory into the new one (making sure not to copy the old broken .svn directory). I had to re-add a couple of files that were new and then everything commited without any errors. Apr 12, 2012 at 4:08
  • I use the same system as above: archive the broken directory, svn up it's parent to fetch a clean version, then copy over the modifications from the archive. you can use svn status to identify all the archive files to copy over. Apr 17, 2014 at 23:11
2

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.

2

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.

0
1

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

0

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.

2
  • 1
    If you downvote, at least comment on why to make the reason clear and help fellow viewers...
    – codekaizen
    May 28, 2010 at 13:39
  • I didn't downvote this answer but this procedure should be used as very last resource (if at all). This works well for repos with a few k or even MB but when we are talking about GIGs of information along with multiple sets of changes you may be in for more trouble than actually fixing the issue. Sep 25, 2013 at 16:38
0

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

0
0

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.

2
  • 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
    Feb 4, 2010 at 15:03
  • 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
    Feb 6, 2010 at 12:06
0

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 ;)
1
  • 1
    I believe this problem is now moot since SVN changed their working copy format to a SQLite database
    – Earlz
    Feb 5, 2012 at 18:27
-2

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" 
   ) 
)
2
  • 2
    What exactly is this supposed to be answering? Nov 29, 2012 at 14:09
  • Trying to manually change the contents of the .svn directories can be a headache. It's like editing a binary file :-) So I wouldn't recommend going this route. Mar 12, 2013 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.