Error "Command line error for hg.exe too long" in Mercurial

So basically basically every time I try to update for modified files, I get this terrible error. Then I need to manually select only some of the files, define a commit message, then go back and select some more files, put another commit text, etc. Etc., Until I review all modified files.

Is there anything simpler hell?

I use Tortoise HG in Visual Studio 2010 ( http://www.newsupaplex.pp.ru/index_eng.html ), if that matters.

+2
source share
2 answers

HgSccPackage uses the hq.exe client from the mercurial command line. There is a limit on the maximum command line length of ~ 2000 characters in the .Net API used to start an external process (hg.exe).

And since the commit must be atomic, HgSccPackage cannot exit with this error.

You have three options:

  • You have the opportunity to check all modified files in the commit window. Then HgSccPackage will call the mercury client to transfer all the files (without passing each of the command line arguments).
  • If possible, you can split the commit into smaller logical parts with fewer files.
  • If possible, return several files and immediately copy all the rest.

, mercurial- (, list.txt ). .

, HgSccPackage . . , , .

? ?

+1

Mercurial SCC Package , 1700 .

, -, Mercurial Process.Start() hg.exe UseShellExecute = false.

Process.Start , 2080, .NET Framework, . WinAPI CreateProcess ( Process.Start ) 32 768 .

, VS.

, , C:\Documents and Settings\Regent\My Documents\Visual Studio 2010\Projects\, NTFS C:\Projects\ .

+1

Source: https://habr.com/ru/post/1781805/


All Articles