cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 126839 - Problem, when bigger amount of files are committing at once
: Problem, when bigger amount of files are committing at once
Status: RESOLVED FIXED
: versioncontrol
Mercurial
: 6.1
: All All
: P3 (vote)
: TBD
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-02-06 14:51 by
Modified: 2008-03-13 17:18 (History)
Issue Type: DEFECT
:


Attachments
screen shot (12.25 KB, image/png)
2008-02-06 14:52, Jana Maleckova
Details
initial patch (1.33 KB, patch)
2008-03-12 16:05, Padraig Obriain
Details | Diff
proposed patch (3.25 KB, patch)
2008-03-13 17:16, Padraig Obriain
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-02-06 14:51:02
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)

Description:
============
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
------- Comment #1 From 2008-02-06 14:52:11 -------
Created an attachment (id=56167) [details]
screen shot
------- Comment #2 From 2008-02-25 09:36:33 -------
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.
http://blogs.msdn.com/oldnewthing/archive/2003/12/11/56043.aspx
------- Comment #3 From 2008-02-25 09:39:02 -------
Some info on Windows command line limits.
http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx
------- Comment #4 From 2008-03-12 10:24:49 -------
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.
------- Comment #5 From 2008-03-12 16:05:11 -------
Created an attachment (id=58245) [details]
initial patch
------- Comment #6 From 2008-03-12 16:08:01 -------
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.
------- Comment #7 From 2008-03-13 11:47:26 -------
More info on Windows command line limits:
http://www.ubercode.com/write-programs-for-windows-api.html

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
structure.
    * 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
defined constant.
    * 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.
------- Comment #8 From 2008-03-13 17:16:21 -------
Created an attachment (id=58334) [details]
proposed patch
------- Comment #9 From 2008-03-13 17:18:57 -------
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.