Mercurial错误 - 找不到文件

时间:2012-01-31 11:41:32

标签: file mercurial

我刚刚开始使用Mercurial,下载并安装了适用于Windows的hg命令行,克隆了一个新的BitBucket存储库,添加了一个文件,但是当我提交时,我收到了这个错误:

>hg commit -m 'first commit'
abort: commit': The system cannot find the file specified

添加的文件肯定在存储库文件夹中。当我运行hg状态时,我得到:

A Ant.java

在提交消息中添加--traceback会让我:

Traceback (most recent call last):
  File "mercurial\dispatch.pyc", line 87, in _runcatch
  File "mercurial\dispatch.pyc", line 684, in _dispatch
  File "mercurial\dispatch.pyc", line 466, in runcommand
  File "mercurial\dispatch.pyc", line 738, in _runcommand
  File "mercurial\dispatch.pyc", line 692, in checkargs
  File "mercurial\dispatch.pyc", line 681, in <lambda>
  File "mercurial\util.pyc", line 458, in check
  File "mercurial\commands.pyc", line 1194, in commit
  File "mercurial\cmdutil.pyc", line 1223, in commit
  File "mercurial\commands.pyc", line 1189, in commitfunc
  File "mercurial\localrepo.pyc", line 1036, in commit
  File "mercurial\localrepo.pyc", line 1295, in status
  File "mercurial\dirstate.pyc", line 685, in status
  File "mercurial\dirstate.pyc", line 594, in walk
  File "mercurial\localrepo.pyc", line 1016, in fail
Abort: commit': The system cannot find the file specified
abort: commit': The system cannot find the file specified

在Google上搜索问题时,出现了许多对TortoiseHG的引用。我曾经安装过,但摆脱它并重新启动,系统上似乎没有任何东西。关于我可以尝试什么的任何想法,或者我可能犯的任何错误?

2 个答案:

答案 0 :(得分:8)

使用双引号:hg commit -m "first commit"

答案 1 :(得分:1)

请注意,由于无意中在短划线和m之间有空格,您可能会收到此错误。 - m而不是-m