[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn client and long filenames on Windows

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-05-15 15:32:48 CEST

See "Naming a File" <http://msdn2.microsoft.com/en-us/library/aa365247.aspx>
for the gory details. (Peter was more correct -- you get 32k bytes for
absolute UNC paths.)

C. Michael Pilato wrote:
> Graham Leggett wrote:
>> On Tue, May 15, 2007 3:05 pm, Peter Lundblad wrote:
>>
>>> Is it possible to turn your tool into submitting absolute paths to svn?
>> The tool is Apache Maven http://maven.apache.org, so getting it changed
>> will involve convincing the maven people to do it.
>>
>> Can you give an example of what you mean by submitting absolute paths?
>>
>> My understanding is that no path in Windows can exceed 256 characters in
>> length, so an absolute path will (in theory) not work either. In am also
>> not a Windows person, so I cannot be sure on this either.
>
> The limitation of 250-some characters is true for relative paths (that is,
> paths whose target determination is dependent upon the location from which
> the path is evaluated:
>
> "foo.c"
> "..\bar\foo.c"
>
> These are relative paths because if I'm at a CMD shell and I type "notepad
> foo.c" then NOTEPAD.EXE is going to assume I mean the "foo.c" sitting in my
> current working directory. If I change to a different working directory and
> type "notepad foo.c", NOTEPAD.EXE will look in *that* directory for a file
> called foo.c.
>
> Windows, however, allows you something like 65k bytes if you use UNC
> notation and an absolute path, which APR does (on most systems) for you. An
> absolute path is one that, for a given drive letter, is unambiguous. I can
> be "in" any directory on the C: drive and type "notepad C:\bar\foo.c" and
> get the same foo.c loaded into NOTEPAD.EXE every time.
>
> So, the recommendation here is that in your build scripts, don't do
> something like:
>
> svn checkout http://myserver.com/repos/trunk working-copy
>
> because "working-copy" is relative to your current working directory.
>
> Instead, do:
>
> svn checkout http://myserver.com/repos/trunk C:\Projects\working-copy
>
> because there can be no question about where C:\Projects\working-copy is --
> it's an absolute path.
>

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Tue May 15 15:32:58 2007

This is an archived mail posted to the Subversion Dev mailing list.