Unable to check out using TortoiseSVN - "File already exists" error for two files in repository

StackOverflow https://stackoverflow.com/questions/22769059

  •  24-06-2023
  •  | 
  •  

Question

When I try to check out the head version of a large repository, it fails on two particular files:

Error | Failed to run the WC DB work queue associated with
Error | 'C:\Work\gpss_src\cpp\apps\RTRover\lib', work item 6625 (file-install
Error | cpp/apps/RTRover/lib/prn.h 1 0 1 1)
Error | Can't move 'C:\Work\gpss_src\.svn\tmp\svn-F3F9679B' to
Error | 'C:\Work\gpss_src\cpp\apps\RTRover\lib\prn.h': Cannot create a file when that
Error | file already exists.

I've found similar problems posted, but not this exact issue. There is not an issue with case--there really is only a single prn.h file in the entire repository regardless of case. I get the same error with prn.cpp if I use svn move to rename prn.h.

The only solution I've found so far is to use svn move to rename prn.h and prn.cpp, but I would prefer to not rename the files. I've also tried renaming the original files and adding an empty prn.h, but that also causes this error. If I rename the original files and don't create a dummy prn.h or prn.cpp, everything will checkout without any errors. I also do not have any problems checking out the source in a Linux environment.

My guess is there is either a problem with the repository's SVN database or perhaps there's a version incompatibility. The SVN server is using version 1.6.11. The client is using TortoiseSVN 1.8.5 which is linked against SVN version 1.8.8.

Was it helpful?

Solution

You can't have a file named prn.* on Windows. There are certain reserved names on Windows:

  • PRN
  • CON
  • AUX
  • NUL
  • LPT1/2/3/4
  • CLOCK$

Files with those names, no matter what the suffix can not be created on a Windows system. You'll usually get some funky error such as Wrong number of Parameter or Read only file or File already exists.

You can prove it by doing this:

C:> notepad test.txt
C:> move test.txt prn.txt
The parameter is incorrect.

Unfortunately, there are no other solutions except to use another OS. Even Cygwin won't save you in this case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top