You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mi...@swissre.com on 2014/09/12 11:29:37 UTC

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

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-ct-batch-xd\src\main\resources"): 
CreateProcess error=206, The filename or extension is too long

This file in its path is far away from the longest name in project and I 
only changed the content of its file (did not changed the path or file 
name). This error prevents me to commit my changes. I also tried to 
checkout it from scratch, so that path changed to: 
C:\work\sources\g10ct\SR_G10_CT\modules\sr-g10-ct-batch-xd\src\main\resources, 
but id did not help.

Then I tried to commit changes in chunks (I did not change any path or 
file name), which finally worked. I had 285 files to commit.

1. Is it bug? At least message does not correspond to real error
2. Can it be configurable (the max file count to commit or some buffer)? 
(How?)
3. Is it fixed in some newer version?

Thank you
With regards

Milan Plancik



This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information.
Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender.
All incoming and outgoing e-mail messages are stored in the Swiss Re Electronic Message Repository.
If you do not wish the retention of potentially private e-mails by Swiss Re, we strongly advise you not to use the Swiss Re e-mail account for any private, non-business related communications.

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

Posted by Branko Čibej <br...@wandisco.com>.
On 16.09.2014 08:53, Milan_Plancik@swissre.com wrote:
> Dear all,
>
> I am running Windows 7 Enterprise 64-bit  (6.1, build 7601), also I
> should note, that I used IDE Intellij Idea 13.1.3 to commit changes (
> Not sure, whether the IDE influences this issue in this case). I do
> not know how to get the generated command from Intellij, also I
> already commited the files and therefore can not reproduce the issue
> in exactly same way.

IDEA 13.x uses a custom wrapper around the svn command-line client to do
version control. Depending on how they do that, and how they manage
paths within the wrapper, I can easily imagine ways to break due to
Windows path size limits; but there are too many moving parts to be sure.

I suggest the best thing to do is to report the bug to IntelliJ, and let
them determine if the bug is in fact in the svn command-line client or
within IDEA or their version control plugin.

> Next time I will face the same issue, I will try to provide you with
> the svn command.

Next time that happens, I suggest you retry the commit with the
command-line client. If that succeeds, it will be pretty strong evidence
of a bug in IDEA rather than Subversion.

-- Brane


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

Posted by Mi...@swissre.com.
Dear all,

I am running Windows 7 Enterprise 64-bit  (6.1, build 7601), also I should 
note, that I used IDE Intellij Idea 13.1.3 to commit changes ( Not sure, 
whether the IDE influences this issue in this case). I do not know how to 
get the generated command from Intellij, also I already commited the files 
and therefore can not reproduce the issue in exactly same way.

Next time I will face the same issue, I will try to provide you with the 
svn command. Hope this helps.

Have a nice day
With regards
Milan



From:   Geoff Field <Ge...@aapl.com.au>
To:     Stefan Sperling <st...@elego.de>, 
Cc:     "Milan_Plancik@swissre.com" <Mi...@swissre.com>, 
"users@subversion.apache.org" <us...@subversion.apache.org>
Date:   16. 09. 2014 00:54
Subject:        RE: svn command line client 1.8.8 - Error: file name or 
extension is too long



> On Mon, Sep 15, 2014 at 09:38:29AM +1000, Geoff Field wrote:
> > However, please note that Milan finally mannaged to commit 
> all the files by doing them in smaller batches.  That would 
> seem to indicate some other issue.
> 
> What were the commands he typed which worked?

Sorry Stefan, but I'm the wrong person to ask about this.  However, from 
Milan's original post:
"Then I tried to commit changes in chunks (I did not change any path or 
file name), which finally worked. I had 285 files to commit."

Note that he also said: "This file in its path is far away from the 
longest name in project..."
This implies that files with longer pathnames successfully committed. 
However, it's up to Milan to confirm or deny this.

> There are references to absolute paths working around the 
> problem in the archives:
> http://svn.haxx.se/users/archive-2005-02/1088.shtml
> 
> There are also posts that seem to contradict this theory:
> http://svn.haxx.se/dev/archive-2004-10/1482.shtml
> 
> I don't use windows so I can't verify any of this myself.

Part of the problem is that the rules very much depend on which version of 
Windows is being used.  Back in 2004/2005, XP was the bees' knees.  (Mind 
you, I'm typing this on a machine that's still running XP.)  Nowadays, 
things are somewhat different.  The next OS produced by MS was a 64-bit 
one, with all sorts of rule (and, of course, API) changes.

It would help if Milan told us more details, such as the exact platform 
(which Windows?) and the exact commands entered.

We know the SVN version from this: 
"C:\srdev\tool\SVN_CLIENT_1.8.8\svn.exe"

Regards,

Geoff

-- 
Apologies for the auto-generated legal boilerplate added by our IT 
department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is 
intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the 
information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the 
sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached 
files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or 
damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files. 







This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information.
Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender.
All incoming and outgoing e-mail messages are stored in the Swiss Re Electronic Message Repository.
If you do not wish the retention of potentially private e-mails by Swiss Re, we strongly advise you not to use the Swiss Re e-mail account for any private, non-business related communications.

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

Posted by Geoff Field <Ge...@aapl.com.au>.
> On Mon, Sep 15, 2014 at 09:38:29AM +1000, Geoff Field wrote:
> > However, please note that Milan finally mannaged to commit 
> all the files by doing them in smaller batches.  That would 
> seem to indicate some other issue.
> 
> What were the commands he typed which worked?

Sorry Stefan, but I'm the wrong person to ask about this.  However, from Milan's original post:
"Then I tried to commit changes in chunks (I did not change any path or file name), which finally worked. I had 285 files to commit."

Note that he also said: "This file in its path is far away from the longest name in project..."
This implies that files with longer pathnames successfully committed.  However, it's up to Milan to confirm or deny this.

> There are references to absolute paths working around the 
> problem in the archives:
> http://svn.haxx.se/users/archive-2005-02/1088.shtml
> 
> There are also posts that seem to contradict this theory:
> http://svn.haxx.se/dev/archive-2004-10/1482.shtml
> 
> I don't use windows so I can't verify any of this myself.

Part of the problem is that the rules very much depend on which version of Windows is being used.  Back in 2004/2005, XP was the bees' knees.  (Mind you, I'm typing this on a machine that's still running XP.)  Nowadays, things are somewhat different.  The next OS produced by MS was a 64-bit one, with all sorts of rule (and, of course, API) changes.

It would help if Milan told us more details, such as the exact platform (which Windows?) and the exact commands entered.

We know the SVN version from this: "C:\srdev\tool\SVN_CLIENT_1.8.8\svn.exe"

Regards,

Geoff

-- 
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files. 



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

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Sep 15, 2014 at 09:38:29AM +1000, Geoff Field wrote:
> However, please note that Milan finally mannaged to commit all the files by doing them in smaller batches.  That would seem to indicate some other issue.

What were the commands he typed which worked?

There are references to absolute paths working around the
problem in the archives:
http://svn.haxx.se/users/archive-2005-02/1088.shtml

There are also posts that seem to contradict this theory:
http://svn.haxx.se/dev/archive-2004-10/1482.shtml

I don't use windows so I can't verify any of this myself.

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

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Branko Čibej [mailto:brane@wandisco.com]
> Sent: dinsdag 16 september 2014 12:07
> To: users@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@aapl.com.au]
> >> Sent: maandag 15 september 2014 01:38
> >> To: Stefan Sperling; Milan_Plancik@swissre.com
> >> Cc: users@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@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




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

Posted by Branko Čibej <br...@wandisco.com>.
On 16.09.2014 11:12, Bert Huijben wrote:
>
>> -----Original Message-----
>> From: Geoff Field [mailto:Geoff_Field@aapl.com.au]
>> Sent: maandag 15 september 2014 01:38
>> To: Stefan Sperling; Milan_Plancik@swissre.com
>> Cc: users@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@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.

This is just guesswork, of course, but I've seen similar things happen
in naïvely written apps on Windows. To make things worse, the IntelliJ
devs probably don't have much control over how Java launches external
processes on Windows.

-- Brane


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

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Geoff Field [mailto:Geoff_Field@aapl.com.au]
> Sent: maandag 15 september 2014 01:38
> To: Stefan Sperling; Milan_Plancik@swissre.com
> Cc: users@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@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.


	Bert


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

Posted by Geoff Field <Ge...@aapl.com.au>.
> On Fri, Sep 12, 2014 at 11:29:37AM +0200, 
> Milan_Plancik@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
> > 
> > This file in its path is far away from the longest name in 
> project and 
> > I only changed the content of its file (did not changed the path or 
> > file name). This error prevents me to commit my changes. I 
> also tried 
> > to checkout it from scratch, so that path changed to:
> > 
> C:\work\sources\g10ct\SR_G10_CT\modules\sr-g10-ct-batch-xd\src\main\re
> > sources,
> > but id did not help.
> > 
> > Then I tried to commit changes in chunks (I did not change 
> any path or 
> > file name), which finally worked. I had 285 files to commit.
> > 
> > 1. Is it bug? At least message does not correspond to real error 2. 
> > Can it be configurable (the max file count to commit or 
> some buffer)?
> > (How?)
> > 3. Is it fixed in some newer version?
> > 
> > Thank you
> > With regards
> > 
> > Milan Plancik
> 
> IIRC this is a limitation of windows.

Yes, there is such a limitation of Windows.  I've encountered it before in other applications.  There's a known issue with paths over 260 characters long, INCLUDING the drive letter, the colon AND the terminating NUL.  See this MSDN article:
http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath

If you prepend the string '\\?\' to the path, it's meant to allow 32,767 Unicode characters of path name.  We've found, however, that some languages (such as National Instruments' LabVIEW up to version 8.6 at least) don't allow this.

There are two approaches available in this case:
1) Shorten your path names.
2) Use the DOS subst command to create a new virtual drive starting at an appropriate place in the tree (preferably the directory where the .svn directory resides).  It would be something like "SUBST Z: C:\work\sources\g10ct"  When you're done, you can then do "SUBST Z: /D" to delete it.

However, please note that Milan finally mannaged to commit all the files by doing them in smaller batches.  That would seem to indicate some other issue.

> Passing absolute paths on the command line should work around it.

Probably not, given what I've just discussed.
 
> BTW, please try to avoid posting disclaimers like the one 
> below to public mailing list. See 
> http://producingoss.com/en/communications.html#face

Some of us are subject to the whims and caprices of a corporate IT department (and their bosses).  I know I am.  We can't avoid the disclaimers if we're using our work emails.

Regards,

Geoff

-- 
Apologies for the auto-generated legal boilerplate added by our IT department:


- The contents of this email, and any attachments, are strictly private
and confidential.
- It may contain legally privileged or sensitive information and is intended
solely for the individual or entity to which it is addressed.
- Only the intended recipient may review, reproduce, retransmit, disclose,
disseminate or otherwise use or take action in reliance upon the information
contained in this email and any attachments, with the permission of
Australian Arrow Pty. Ltd.
- If you have received this communication in error, please reply to the sender
immediately and promptly delete the email and attachments, together with
any copies, from all computers.
- It is your responsibility to scan this communication and any attached files
for computer viruses and other defects and we recommend that it be
subjected to your virus checking procedures prior to use.
- Australian Arrow Pty. Ltd. does not accept liability for any loss or damage
of any nature, howsoever caused, which may result
directly or indirectly from this communication or any attached files. 



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

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Sep 12, 2014 at 11:29:37AM +0200, Milan_Plancik@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-ct-batch-xd\src\main\resources"): 
> CreateProcess error=206, The filename or extension is too long
> 
> This file in its path is far away from the longest name in project and I 
> only changed the content of its file (did not changed the path or file 
> name). This error prevents me to commit my changes. I also tried to 
> checkout it from scratch, so that path changed to: 
> C:\work\sources\g10ct\SR_G10_CT\modules\sr-g10-ct-batch-xd\src\main\resources, 
> but id did not help.
> 
> Then I tried to commit changes in chunks (I did not change any path or 
> file name), which finally worked. I had 285 files to commit.
> 
> 1. Is it bug? At least message does not correspond to real error
> 2. Can it be configurable (the max file count to commit or some buffer)? 
> (How?)
> 3. Is it fixed in some newer version?
> 
> Thank you
> With regards
> 
> Milan Plancik

IIRC this is a limitation of windows.
Passing absolute paths on the command line should work around it.

BTW, please try to avoid posting disclaimers like the one below to
public mailing list. See http://producingoss.com/en/communications.html#face

> This e-mail, including attachments, is intended for the person(s) or company named and may contain confidential and/or legally privileged information.
> Unauthorized disclosure, copying or use of this information may be unlawful and is prohibited. If you are not the intended recipient, please delete this message and notify the sender.
> All incoming and outgoing e-mail messages are stored in the Swiss Re Electronic Message Repository.
> If you do not wish the retention of potentially private e-mails by Swiss Re, we strongly advise you not to use the Swiss Re e-mail account for any private, non-business related communications.

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

Posted by robertvo <na...@gmail.com>.
Hello friends i alsoo face same problem.someone suggest long path tool ,its
really helpful.




--
View this message in context: http://subversion.1072662.n5.nabble.com/svn-command-line-client-1-8-8-Error-file-name-or-extension-is-too-long-tp190249p195306.html
Sent from the Subversion Users mailing list archive at Nabble.com.

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

Posted by julias4 <da...@gmail.com>.
Did you try Long Path Tool that also useful in situations where you see these
error messages: Cannot read from source file or disk, there has been a
sharing violation etc. i have used it. not yet get any problem.   



--
View this message in context: http://subversion.1072662.n5.nabble.com/svn-command-line-client-1-8-8-Error-file-name-or-extension-is-too-long-tp190249p191344.html
Sent from the Subversion Users mailing list archive at Nabble.com.