tags:

views:

79

answers:

3

I cannot create working copy from command line using svn utility if resulting full file names for some files are too long.
But I can successfully create working copy from TortoiseSVN or from Subclipse.
Why?

+2  A: 

As a workaround, you can subst your working copy to a drive letter to keep down the path length:

C:\Users\Me\SVN\My\Cool\Repository\With\A\Very\Long\Path> subst S: .
C:\Users\Me\SVN\My\Cool\Repository\With\A\Very\Long\Path> S:
S:> svn up
Joey
+2  A: 

This isn't really a limitation of the svn client but of the windows console: relative paths can't exceed MAX_PATH (254) chars when expanded.

And unlike some commenter here claims, it is not an oversight of the svn developers to forget about MAX_PATH. Because: if you pass full paths instead of relative ones, the commands will work.

So, instead of

cd C:\some\...\very\long\path
svn up .

run

svn up c:\some\...\very\long\path

and it should work just fine.

Stefan
So we need to do it(svn up path) in all directories in our project?
Vladimir Bezugliy
yes, or shorten the paths to less than 254 chars, either by really shortening them (renaming) or using SUBST on a subfolder and then use the substed drive as the path.
Stefan
Argh. I'm sorry. And now I can't even delete that answer anymore.
Joey
A: 

If your command line is in fact the Cygwin bash, then you could have hit this bug:

http://www.itefix.no/i2/node/11064 or http://old.nabble.com/file-name-too-long-td22189828.html

which in fact is, that Cygwin can't handle paths with lengths over 255 chars. (In addition to Stefan's answer: Neither absolute nor relative paths are possible here.) Cygwin 1.7, which is beta since half a year, seems to fix this.

Boldewyn
No - it is not Cygwin.I use svn from FAR or from cmd.
Vladimir Bezugliy