我无法通过 Mercurial 提交单个文件。以下是命令的不同变体:
带有 --traceback 的变体
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
带有 --debug 的变体
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
我和我的同事已经清理了提交的项目,重新克隆了它,是否拉取了更改,检查了所有 python 脚本和 ssh 密钥的可达性......应该没问题,但事实并非如此。
我怀疑虽然“--debug”变体中的错误在提交更改日志后出现,但它可能与它有关吗?我在项目中没有看到任何名为“changelog”的文件,并且有三个包含该单词,它们显然都是旧的 - 从存储库克隆。
关于重复问题。似乎在许多完全不同的情况下会弹出该消息或类似消息:
Mercurial Editor:“中止:系统找不到指定的文件” - 在同一脚本的这个地方提交失败,但是......堆栈本身不同,只有提交失败而没有消息。我有消息。并且作者试图使用替代的默认编辑器并且不能 - 那是他的问题,与我的完全不同。我没有更改编辑器。我对编辑没有问题。我已经安装了 hg,克隆了项目,更改了一个文件并想要提交它——仅此而已。
TortoiseHg 无法提交——“系统找不到指定的文件” ——这里的错误信息头不是“abort:”,而是“abort:Adding:”
android studio gradle refresh failed (The system cannot find the file specified) - 这里从 Android Studio 调用 commit 并且指定了文件
Mercurial 中的“中止:系统找不到指定的文件” - 消息几乎相同,只有缺失的文件是 Mercurial 指定的。堆栈是不同的。就我而言,我可以更新,而那个作者不能。
在 SO 的其他情况下,带有该错误消息的不是 Mercurial 调用错误的原因。
我在不同的网站上查看了许多类似的案例,但我没有发现同样的问题。总是重要的事情是不同的。
@Leon 在下面假设了一个有趣的版本-原因是错误地设置了 openssl/gnupg。我检查了 openssl 的安装,运行 hg help commitsigs
- 并阅读了输出,发现了诸如forcesign
.
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.
是的,它看起来很有希望。...但是即使将该属性设置为 0 也不会改变这种情况。