Product Version: NetBeans IDE Dev (Build 200802050005)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
committing more than new 300 files finish with error. Seems this is problem of cmd limitation in win XP. Can we solve it?
Another reason is, that ide erases message error which doesn't make sence: something like "Mercurial could not be found"
- see attachment
Created attachment 56167 [details]
We need to confirm that this is actually the cmd line limit issue.
If it is - there are various limits in Windows that we can't easily get around, so for now we should detect the size of
the output command and if it breaks one of these limits then offer to do a hg commit from the top level, which will
commit all altered files, without having to explicitly list them and break the limit.
There seems to be a way to get around the limit using memory mapped files, but we'd need to alter hg to use it and this
is not possible.
Some info on Windows command line limits.
Suggestion as follows:
Do an OS specific check on command buffer size, if its over the OS limit then warn user and offer to allow them to do a
top level commit to committable all files in the project, as opposed to specifying them individually.
Created attachment 58245 [details]
The initial patch which I have pushed in b152d304e60d will reduce the required size of the command line.
This is just the first step in addressing this issue.
More info on Windows command line limits:
The Command Line Length Limit is the longest possible command line that may be passed to programs under Windows. It
varies, depending on the context in which the command line is being used. Here are the limits:
* CreateProcess() Windows API function The maximum length is 32767 characters, based on fields in the UNICODE_STRING
* Cmd.exe When using the Windows NT / 2000 / XP command processor, the maximum length is 8192 characters.
* ShellExecute() Windows API function The maximum length is 2048 characters as given by the INTERNET_MAX_URL_LENGTH
* ShellExecute() Windows 95 API function Under Windows 95 the maximum length is 255 characters as defined by MAX_PATH.
* MS-DOS command line When using MS-DOS or the command.com MS-DOS boxes under Windows 95, Windows 98 or Windows ME,
the maximum command line length is 127 characters.
* Environment variables There is also a maximum size allowed for Environment variables under cmd.exe - this is 32767
characters, including the names of the variables. Under MS-DOS the maximum size allowed for environment variables can be
set to a lesser limit using the /E command line option.
Created attachment 58334 [details]
I have pushed the proposed patch in fc5ef493bbe4.
I believe that this patch should fix the problem on Windows although I have not been able to test it.
Please reopen the bug if the problem is still present.