"hg.exe的结果命令行太长"水星错误 [英] "Resulting command line for hg.exe too long" error in Mercurial

查看:93
本文介绍了"hg.exe的结果命令行太长"水星错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,基本上,每次我尝试对更改的文件进行更新时,都会收到此可怕的错误.然后,我只需要手动选择一些文件,定义一个提交消息,然后返回并选择更多文件,放入其他提交文本,依此类推,直到覆盖所有更改的文件.

So, basically about every time I try to do an update to my changed files, I get this awful error. I then have to manually select only some of the files, define a commit message, then come back and select some more files, put other commit text, etc, etc until I have covered all the changed files.

有什么更简单的方法吗?

Is there anything simpler, dammit?

我正在Visual Studio 2010中使用Tortoise HG( http://www.newsupaplex.pp. ru/index_eng.html )(如果有区别的话).

I am using Tortoise HG in Visual Studio 2010 ( http://www.newsupaplex.pp.ru/index_eng.html ), if it makes any difference.

推荐答案

HgSccPackage使用商业命令行客户端hg.exe. 在用于运行外部进程(hg.exe)的.Net Framework API中,最大命令行长度有大约2000个字符的限制.

HgSccPackage uses mercurial command line client hg.exe. There is a limitation on maximum command line length ~2000 characters in the .Net framework API used to run an external process (hg.exe).

并且由于提交必须是原子的,因此HgSccPackage无法完成操作并显示该错误.

And since the commit must be atomic the HgSccPackage fail to complete operation with that error.

您有三个选择:

  1. 您可以选择在提交窗口中检查所有更改的文件.然后,HgSccPackage将调用mercurial客户提交所有文件(而不在命令行参数中传递每个文件).
  2. 如果可能的话,您可以将提交拆分为文件较少的较小逻辑部分.
  3. 如果可能,请还原一些文件并一次提交所有其他文件

如果Mercurial客户可以选择在文件中传递文件列表(例如,每行带有文件名的list.txt),则将容易得多.但是没有这样的选择.

It would be much easier if the mercurial client had an option to pass a file list in a file (for example list.txt with file names in each line). But there is no such option.

顺便说一句,HgSccPackage不会传递文件的完整路径.相反,它传递相对于存储库根目录的文件路径.因此,很奇怪,您达到了命令行限制.

By the way, the HgSccPackage does not pass a full path for files. Instead it pass the file path relative to the repository root. So, it rather strange, that you hit the command line limit.

您要提交多少文件? 为什么不能提交所有文件?

How much files you are commiting ? Why can't you commit all files ?

这篇关于"hg.exe的结果命令行太长"水星错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆