Windows: problems with too long command line calls

Martin Geisler mg at aragost.com
Fri Oct 28 10:59:39 CDT 2011


Marc Strapetz <marc.strapetz at syntevo.com> writes:

> For our Mercurial GUI client, the user can select an arbitrary set of
> files to perform local operations (like add or commit) for. This set
> of files is directly passed to the hg executable. The problem is that
> (at least) on Windows, there is a limitation on the maximum command
> line length. Hence, if too many files are specified, the user will get
> "The filename or extension is too long.":
>
> http://technet.microsoft.com/en-us/library/cc978785.aspx
>
> We can work-around that for many commands, by splitting the overall
> set of files into multiple smaller sets. However this does not work
> for "hg commit" and "hg addremove --similarity".
>
> As far as I understand there is currently no alternate way to specify
> the set of files e.g. through a file, similar as for "hg commit
> --message <file>"? Are there any other work-arounds for that problem?

Use the 'listfile:' syntax described in 'hg help patterns'.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial-devel mailing list