Error checking out Subversion repository (svn: Your .svn/tmp directory may be missing or corrupt;)
Solution 1
Ok, so I have actually found the answer to my own question, well at least the solution. It turns out that it is to do with the length of the path. In my question above I edited the path name to not post details of company's code, but in reality it happened to be a file with a very long name and it lived in quite a deeply nested directory.
When I was checking out the branch on its own I was checking it out into a higher level directory in my hard drive and it was working. I tried checking out the branch on its own directly into the branches directory I had created for the project and it also failed, so I guess it must have had something to do with the path.
I am now checking out the entire project into D:\ProjectDir and everything seems to be going a lot more smoothly. I guess there is a limit in subversion to the length of a path and so it was failing to get some of the required files.
*Update: the limit is 255 characters. It turned out that in my case the path was 269 characters. So just going up 1 directory level was enough to get around the problem.
Solution 2
You can work around this problem on Windows by specifying the fully qualified path in the parameter to the svn command. For example rather than
c:\dev> svn co http://repoman.example/svn/myproj/trunk myproj
try this
c:\dev> svn co http://repoman.example/svn/myproj/trunk c:\dev\myproj
For some reason path length limits only apply to relative paths.
Solution 3
Check this:
find . -iname '.svn' -exec mkdir {}/tmp \;
Comments
-
Danny almost 2 years
I am trying to check out a full subversion repository including all branches and tags:
svn co svn+ssh://path/to/project
This runs for a while, but during the checkout of a branch I get the following error:
svn: Your .svn/tmp directory may be missing or corrupt; run 'svn cleanup' and try again svn: Can't open file 'project\branches\BRANCH\source\java\com\bS\.svn\tmp\text-base\Event.java.svn-base': The system cannot find the path specified.
So I tried to checkout the branch manually by doing:
svn co svn+ssh://path/to/project/branches/BRANCH
This runs fines and I get the branch. I can then copy the branch into the branches directory of the full project and continue with the checkout. But it keeps running into this problem on other branches.
Does anyone have any idea why I can't checkout the branch as part of the overall project, but I can check it out on its own?
-
David W. about 13 yearsYou're on Windows. Right? The maximum path length is a big Windows issue. I've seen spamware hidden using this. Windows Explorer and anti-malware couldn't see the files, but they were there. The irony is that Windows CAN handle these long paths, and NTFS CAN handle these paths. However, Windows Explorer and the basic file open/close libraries cannot. You can do programming technics using // paths that will allow you to get around these issues, but no one uses them. Why MS still has this faux limit in Windows is anyone's guess. Especially since .NET uses long path names.
-
Admin over 11 yearsThis worked for me. Good thing because I was already at the root of the drive, there was no way to shorten the checkout path.
-
Hoàng Long over 9 yearsIt's not very useful by that workaround, since sometimes you don't have that luxury to "go up one level". I would recommend Victor's solution(posted later) instead: using absolute path in your checkout link, not relative path