Command line length limitation

Mads Kiilerich mads at kiilerich.com
Mon Jan 3 05:48:11 CST 2011


On 01/03/2011 12:38 PM, Sergey Antonov wrote:
> I'm working on mercurial plugin for MS Visual Studio and I use mercurial
> command line client (hg.exe) to invoke mercurial commands.
>
> There is a limitation for a maximum command line length (about 2080
> characters) in the .Net API, which I use to run external process with
> mercurial.
>
> For the most commands (add, remove, status, resolve, etc) I have a
> workaround for a command line limit. If the resulting command line
> length is longer than limit, then I split the files to smaller groups
> and run the command several times.
>
> But, I can not do this for commit command, because it must be atomic.
> The problem is when the user have a lot of changed files (or a deep
> hierarchy in repository) and wants to commit only part of them.
>
> Is it possible to address this issue in mercurial ?
> For example, add a possibility to specify file names in a text file,
> where each line contains a file name.

http://selenic.com/repo/hg/rev/1f4721de2ca9 will be in Mercurial 1.8

/Mads


More information about the Mercurial mailing list