I can't commit a single file by Mercurial. Here are different variants of the command:
The variant with --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
The variant with --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
My colleagues and me had cleaned the project committed, re-cloned it, pulled changes or not, checked all python scripts and ssh keys for reachability... It should be OK, but it is not.
I have a suspision that while the error in the "--debug" variant appears after committing changelog, it could be something with it? I don't see any file that is named "changelog" in the project and there are three containing that word and they all are obviously old - cloned from repository.
About duplication of questions. It seems that that or similar message pops up in very many absolutely different situations:
Mercurial Editor: "abort: The system cannot find the file specified" - The commit fails in this very place of the same script, but... The stack itself is different, and there fails only the commit without the message. I have the message. And the author tries to use an alternative default editor and cannot - that is his problem, absolutely different from mine. I haven't changed the editor. I have not troubles with editor. I have installed hg, cloned project, changed one file and want to commit it - that is all.
TortoiseHg can't commit--"The system cannot find the file specified" - here the error message header is not "abort:", but "abort: Adding: "
android studio gradle refresh failed (The system cannot find the file specified) - here the commit is called from Android Studio and the file IS specified
"abort: The system cannot find the file specified" in Mercurial - the messages are almost the same, only the missing file IS specified by Mercurial. And the stack is different. And in my case I can update, whereas that author could not.
In others cases on SO with that error message it is not Mercurial what invokes the error.
I have looked at many similar cases on different sites, and I had not found the same problem. Always something important was different.
@Leon has supposed an interesting version below - that the reason is incorrectly set openssl/gnupg. I have checked installation of openssl, ran hg help commitsigs
- and reading the ouput, noticed such interesting property as 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.
Yes, it looks promising. ...But even setting that property to 0 changed nothing in the situation.
The commitsigs.py
entries in your stack trace suggest that the problem is due to the Commitsigs Extension. Check that
gnupg
or openssl
installed on your systemgnupg
) or a X509 certificate (in case of openssl
)hg help commitsigs
for details). In particular, the path to gnupg
or openssl
must be correctly specified, otherwise you may run into the described problem even when commitsigs.forcesign
mode is disabled.