Response file as an alternative to command line passing of arguments/commands/options?

Frank A. Kingswood frank at kingswood-consulting.co.uk
Thu Dec 23 11:05:37 CST 2010


On 12/23/10 10:16, Lasse Vågsæther Karlsen wrote:
> indicating that a program generated a too long command line for
> Mercurial, the shell, or whatever, to process.
>
> <http://stackoverflow.com/questions/4512321/resulting-command-line-for-hg-exe-too-long-error-in-mercurial>Then
> it dawned on me that the problem described in that question might be a
> problem for my library as well, although I don't know how big that would
> be. I will test to get the exact limits.

Don't call hg through cmd.exe which adds its own limit (4k-ish IIRC).

> 3. What alternatives do I have? Pull up my sleeves and submit a patch?
> (though that would be aways before coming seeing as though I know
> Python, I am not an expert and I don't know the Mercurial code)

It would be reasonable to write an extension (let's optimistically call 
it the "jsonextension") that allows you to execute commands, giving 
input and receiving replies in a standard format.

That extension would still be tied to the Mercurial core but could be 
generally useful - and you will be more likely to find people willing to 
help out with this.
Your application then talks to hg through the jsonextension.

IANAL, but this might also help prevent licensing problems if your 
windows code is not GPL.

Frank "my commandline maxes out at 3GB"


More information about the Mercurial-devel mailing list