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

RE: svn command line client 1.8.8 - Error: file name or extension is too long

From: Bert Huijben <bert_at_qqmail.nl>
Date: Tue, 16 Sep 2014 13:02:25 +0200

> -----Original Message-----
> From: Branko Čibej [mailto:brane_at_wandisco.com]
> Sent: dinsdag 16 september 2014 12:07
> To: users_at_subversion.apache.org
> Subject: Re: svn command line client 1.8.8 - Error: file name or extension is
> too long
>
> On 16.09.2014 11:12, Bert Huijben wrote:
> >
> >> -----Original Message-----
> >> From: Geoff Field [mailto:Geoff_Field_at_aapl.com.au]
> >> Sent: maandag 15 september 2014 01:38
> >> To: Stefan Sperling; Milan_Plancik_at_swissre.com
> >> Cc: users_at_subversion.apache.org
> >> Subject: RE: svn command line client 1.8.8 - Error: file name or extension
> > is
> >> too long
> >>
> >>> On Fri, Sep 12, 2014 at 11:29:37AM +0200,
> >>> Milan_Plancik_at_swissre.com wrote:
> >>>> Dear team,
> >>>>
> >>>> I tried to commit my changes with following error message:
> >>>>
> >>>> Error:Cannot run program
> >>> "C:\srdev\tool\SVN_CLIENT_1.8.8\svn.exe" (in
> >>>> directory
> >>>>
> >>> "C:\Users\S3F96Q\work\sources\g10ct\SR_G10_CT\modules\sr-g10-c
> >>> t-batch-xd\src\main\resources"):
> >>>> CreateProcess error=206, The filename or extension is too long
> > Going back to the original error report:
> >
> > Looking at the error(CreateProcess error=206), you get this error when
> > starting the process, not after the process started.
> >
> > This implies that the length problem is either with the name of the process
> > (=svn.exe) or with the directory in which you are trying to start the
> > process.
> >
> > If the path length error would have been in an argument, or a subpath you
> > would have received an error from svn, not from the process starting svn.
> >
> > In general Subversion 1.7 and later shouldn't have problems with long
> paths,
> > as long as all the (long) passed paths are in the absolute form.
> >
> > Long relative paths have different problems, as the Windows api to
> transform
> > those paths to their absolute form doesn't support long paths.
> >
> >
> >
> > You can probably solve your issue by just starting 'svn' explicitly from
> > 'C:\' or some other safe directory.
>
> See above; the OP used IntelliJ IDEA, which drives the command-line
> client, not the command line directly. I suspect it's a limit of the
> CreateProcess API, which limits the command-line paraneter to MAX_PATH;
> so, if there are a lot of files to commit, and IDEA (correctly) passes
> absolute paths to Subversion, it's fairly easy to exceed that limit.

The commandline argument of CreateProcess has a limit of 32768 characters (See http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx) on Windows NT and later. This argument contains all arguments passed by the calling program, in most cases including the program name itself. If you hit this limit you get a different kind of error, as there is nothing that requires this to be a path.

If you get a long path error in the calling process the problem is a path directly passed to the CreateProcess API... The parsing of the commandline to separate arguments is part of the called process on Windows, so that would have been reported as an error of the process... not an error starting the process.

(The parsing in the application is also the reason why different processes have different argument escaping rules...)

        Bert
Received on 2014-09-16 13:03:07 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.