Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial提交失败:“;系统找不到指定的文件";,但实际上并没有具体说明_Mercurial_Mercurial Commit - Fatal编程技术网

Mercurial提交失败:“;系统找不到指定的文件";,但实际上并没有具体说明

Mercurial提交失败:“;系统找不到指定的文件";,但实际上并没有具体说明,mercurial,mercurial-commit,Mercurial,Mercurial Commit,我不能通过Mercurial提交一个文件。以下是该命令的不同变体: 带有--回溯的变体 C:\Users\543829657\workspace\dev.appl.ib.cbl>hg commit --traceback "--message=Ad ded a task Xml2Java for creation request/response files" --user "Petr Gangnus <petr.gangnus@moneta.cz>" -- applicati

我不能通过Mercurial提交一个文件。以下是该命令的不同变体:

带有--回溯的变体

C:\Users\543829657\workspace\dev.appl.ib.cbl>hg commit --traceback "--message=Ad
ded a task Xml2Java for creation request/response files" --user "Petr Gangnus <petr.gangnus@moneta.cz>" -- application/build.gradle
transaction abort!
rollback completed
Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 160, in _runcatch
  File "mercurial\dispatch.pyo", line 885, in _dispatch
  File "mercurial\dispatch.pyo", line 646, in runcommand
  File "mercurial\extensions.pyo", line 168, in closure
  File "hgext\color.pyo", line 521, in colorcmd
  File "mercurial\dispatch.pyo", line 976, in _runcommand
  File "mercurial\dispatch.pyo", line 947, in checkargs
  File "mercurial\dispatch.pyo", line 882, in <lambda>
  File "mercurial\util.pyo", line 716, in check
  File "mercurial\commands.pyo", line 1546, in commit
  File "mercurial\cmdutil.pyo", line 2456, in commit
  File "mercurial\commands.pyo", line 1540, in commitfunc
  File "mercurial\localrepo.pyo", line 64, in wrapper
  File "mercurial\localrepo.pyo", line 1508, in commit
  File "mercurial\localrepo.pyo", line 64, in wrapper
  File "mercurial\localrepo.pyo", line 1596, in commitctx
  File "mercurial\extensions.pyo", line 168, in closure
  File "c:/Users/543829657/workspace/mercurial-tools/commitsigs.py", line 357, in add
  File "c:/Users/543829657/workspace/mercurial-tools/commitsigs.py", line 168, in opensslsign
  File "subprocess.pyo", line 710, in __init__
  File "subprocess.pyo", line 958, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
abort: The system cannot find the file specified

是的,看起来很有希望。。。但是,即使将该属性设置为0,在这种情况下也不会改变任何内容。

堆栈跟踪中的
commitsigs.py
项表明问题是由于。检查一下

  • 您的系统上安装了
    gnupg
    openssl
  • 您拥有有效的GPG密钥(如果是
    gnupg
    )或X509证书(如果是
    openssl
  • 并且正确配置了Commitsigs(有关详细信息,请运行
    hg help Commitsigs
    )。特别是,必须正确指定
    gnupg
    openssl
    的路径,否则即使禁用了
    commitsigs.forcesign
    模式,也可能会遇到上述问题

  • 没有。我在从TortoiseHg或IntelliJ启动commit时看到了相同的问题,它们都管理路径分隔符OK。。。。我希望你已经找到了,并且试过了——没有区别。不管怎样,谢谢。是该文件有问题,还是您根本无法提交?问题不可能出在要提交的文件上,请注意,在提交之前对其进行了检查,结果发现没有问题。问题似乎是由于配置错误,或者您没有X509证书来签署提交。@Leon当然,它与commitsigs连接,堆栈的老行显示在该文件中。好主意。还有一些文件列表,在对文件的评论中,一些“文件”被称为证书文件。但是这些密钥是如何用于克隆/更新而不用于提交的呢?这对我来说似乎很奇怪…谢谢你,我明天一定会检查你的方式。我已经在问题的末尾添加了检查你版本的结果。看来,情况有所不同-(那么你的Commitsigs设置/配置有什么问题吗?你的想法肯定是正确的!因为我检查了Mercurial.ini中对“openssl.path”的引用,结果很糟糕!(它在path中包含程序文件,但不应该。请在你的回答中添加对openssl的错误或缺乏引用)。
    C:\Users\543829657\workspace\dev.appl.ib.cbl>hg commit --debug "--message=
    Added a task Xml2Java for creation request/response files" --user "Petr Gangnus <petr.gangnus@moneta.cz>"
     -- application/build.gradle
    calling hook precommit.checkfiles: hghook_precommit_checkfiles.fixup_hook
    checkfiles: removing tabs and/or trailing whitespace in changed files...
    checkfiles: opts:
    checkfiles: checked extensions:
    checkfiles: ignored extensions: .sln .suo .vcproj .csproj .ui
    checkfiles: ignored files:
    checkfiles: check diffs only: False
    checkfiles: use spaces: True
    checkfiles: tab size: 4
    checkfiles: considering files:
      application/build.gradle
    checkfiles: application/build.gradle ok
    committing files:
    application/build.gradle
    committing manifest
    committing changelog
    transaction abort!
    rollback completed
    abort: The system cannot find the file specified
    
    If the parametr is specified with a value of 1, the commit process will be
    aborted and rolled back if the changeset cannot be signed for whatever reason
    (bad setup, expired certificate and so on. The default is that the commit
    will still be successful, but not signed.