9

I just picked up TortoiseHg to use for distributed source control on Windows and installed it on my C drive. Then I created a repository (located in D:\projects).

When I try to commit the changes, it gives me the error

"abort: None: The system cannot find the file specified"

in a new window titled "Commit". This causes the commit to abort. It doesn't specify any file, and when I run hg --traceback commit -m 'Message' it gives this as output:

Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 54, in _runcatch
  File "mercurial\dispatch.pyo", line 483, in _dispatch
  File "mercurial\dispatch.pyo", line 351, in runcommand
  File "mercurial\dispatch.pyo", line 534, in _runcommand
  File "mercurial\dispatch.pyo", line 488, in checkargs
  File "mercurial\dispatch.pyo", line 481, in <lambda>
  File "mercurial\util.pyo", line 420, in check
  File "mercurial\commands.pyo", line 762, in commit
  File "mercurial\cmdutil.pyo", line 1202, in commit
  File "mercurial\commands.pyo", line 757, in commitfunc
  File "mercurial\localrepo.pyo", line 816, in commit
  File "mercurial\localrepo.pyo", line 1053, in status
  File "mercurial\dirstate.pyo", line 629, in status
  File "mercurial\dirstate.pyo", line 540, in walk
  File "mercurial\localrepo.pyo", line 796, in fail
Abort: Adding: The system cannot find the file specified
abort: Adding: The system cannot find the file specified

I don't know what else I can give as debug info, not having any experience with the program.

I have configured TortoiseHg with both a username globally and for the repository. Also, kdiff3 is specified as both the three-way merge tool and the visual diff tool. I have not knowingly changed any other settings.

Thanks for any help, and please ask for more information, I just don't know what to give in this situation.

Gangnus
  • 22,127
  • 14
  • 79
  • 132
31eee384
  • 2,676
  • 2
  • 14
  • 27
  • I got the same error and i can't find a solution for this. Please give us an answer! – Pierre-Luc Champigny Jul 10 '10 at 00:25
  • what version of hg + windows, what version of python? ignore the latter if python isnt required. – meder omuraliev Jul 10 '10 at 00:42
  • TortoiseHg is version 1.1 with Mercurial 1.6. I'm running Windows 7 64bits. – Pierre-Luc Champigny Jul 10 '10 at 18:03
  • I have TortoiseHg 1.1, Mercurial 1.6 like Champigny. Running Windows XP SP2, 32 bit. – 31eee384 Jul 11 '10 at 23:21
  • Have you tried looking at TortoiseHg known issues (http://bitbucket.org/tortoisehg/stable/issues) ? I use [TortoiseHg1.1 + Mercurial 1.6 under Windows 7 64bits] and can't reproduce, but perhaps someone else had a similar problem. – Dynami Le Savard Jul 12 '10 at 17:43
  • Also possibly related : http://stackoverflow.com/questions/2454381/mercurial-editor-abort-the-system-cannot-find-the-file-specified – Dynami Le Savard Jul 12 '10 at 17:45
  • Can you commit with the command line tool? – Rudi Jul 13 '10 at 11:40
  • Yes, running hg commit works in that directory. After this, though, with further changes I still can't commit through TortoiseHg. – 31eee384 Jul 13 '10 at 15:25
  • 1
    31eee384: Please contact the TortoiseHg developers through their *proper channels*: http://bitbucket.org/tortoisehg/stable/issues/ and tortoisehg-discuss@lists.sourceforge.net. When you encounter a problem with a tool, then it polite to write back to the developers and inform them of the problem, instead of posting it on some third-party website. – Martin Geisler Jul 22 '10 at 12:31
  • Martin: The reason I didn't try to contact them is that I assumed it was my setup that was wrong, and I didn't want to waste the developers' time. Now that you mention it though, I guess contacting them should have been higher up on my to do list. – 31eee384 Aug 08 '10 at 13:41

2 Answers2

2

I'm getting acquainted with Hg and trying Tortoise-Hg out and I'm running to the same exact issue as the OP. I cloned a repository from one of the open source projects and made some changes to the source. However when I attempt to commit, I get the follow message from the commit dialog window:

abort: None: The system cannot find the file specified

Dropping down to commandline and using hg commit -m "message" works. I'm using this under Windows 7 64-bit and have tried two versions TortoiseHg 1.1.5 and the latest 1.1.6.1(64-bit version) as of this post.

Any idea what the problem is? As you can imagine, this is a major issue since I can't even do one of the most basic operations for a version control system w/o needing to drop down to CLI. What is wrong with this?

Thanks

Update: I have SOLVED the issue! After some collaboration on the TortoiseHg mailing-list, I've identified the root cause of this error. This error is happening because whenever tortoisehg tries to commit it's tacking on an extra 'none' parameter to the end of that commit command line.

This can happen if you've set your repository settings->Commit->Auto Commit List to 'None'. The fix is simple -- make sure that Auto Commit List and Auto Exclude List are both set to < unspecified >. Check your global settings as well and make sure these 2 fields are set the same way.

Additionally, to see if your Auto Commit List and Auto Exclude List are set properly type

hg showconfig --debug tortoisehg

If it contains a line something to this effect:

mercurial.ini:15: tortoisehg.autoinc=None

then tortoisehg isn't configured properly.

I hope this solves the issue for the OP and others that are running into this problem and pulling their hair out trying to fix it.

greatwolf
  • 18,899
  • 13
  • 64
  • 102
  • 1
    Sorry for taking so long to answer (and I've since moved on to using git from the command line) but I tried this out. (Heh, pressing enter submits, and doesn't do line breaks.) This solution didn't work for me. Looking in both the global and repository settings the option specified is listed as "unspecified", and I still get the same message when committing. Interestingly, it *does* show "tortoisehg.autoinc=None" when I run hg showconfig --debug tortoisehg. – 31eee384 Dec 07 '10 at 23:52
  • @31eee384 hmm it sounds like somehow the hg config is not in sync with the gui. Perhaps you might try manually removing that from the hg configure file. At any rate, use whatever feels best suited for you :) – greatwolf Dec 08 '10 at 03:07
  • I have the same problem and no tortoisehg.autoinc mentioned in any hg property file, system or user one. So, I am afraid, you have not solved the problem as such. – Gangnus Jul 18 '17 at 12:58
1

Try this:

  1. Remove TortoiseHG
  2. Restart the system (basically to make sure there are no processes from tortoise, such as file monitoring, that can put locks on files)
  3. Intall command line hg
  4. do the regular hg commit -m "yourmessage"

If this works, it's more likely than not that the monitoring tool from TortoiseHg is holding a lock on some file (the system tray applet).

It also could be the case that someone else is doing than (not TortoiseHg), e.g. editor? diff tool? etc?

Finally, another reason why this can happen is: someone fooled around with the repo files inside .hg directory... It doesn't seem to be the case though

Nick
  • 2,498
  • 1
  • 22
  • 28
  • I'm not in a position where I can restart at the moment, but even with TortoiseHg installed `hg commit` works. And yes, as you assume, I haven't modified anything in the .hg directory and nobody else has access to the computer. I'll uninstall TortoiseHg and leave another comment when I restart, in case it helps at all. Also, I don't know what you mean "someone else is doing than", but I tried turning all the editor settings to unspecified and it still fails the same way. – 31eee384 Jul 16 '10 at 03:42
  • Well I tried it before you posted this answer and it work! But this doesn't really solve the "TortoiseHg problem". I also tried to create a clean repository and then pull data, change a file and commit, the problem persist... Well I guess I'll just use it the old fashioned way (command line)! – Pierre-Luc Champigny Jul 16 '10 at 03:49
  • you can also try using tortoise without the tool that monitors for changes and displays overlay icons. It's not the tortoise itself, but the components it comes with (one can also suspect the diff tool) – Nick Jul 16 '10 at 19:45
  • @pierre When you said you tried it and it worked what exactly did you try? Are you referring to the uninstall-reinstall-restart? or did you mean the commit from the cli worked? – greatwolf Nov 21 '10 at 19:05
  • @nick Are there any other suggestions you can offer regarding this issue? Tortoisehg's default package comes with hg's cli tools already. None of the suggestions have worked for me in resolving the commit issue when using the GUI. I'd imagine this is a serious issue if this basic functionality isn't working but it seems like most people aren't running into this problem. I've also posted on the tortoisehg mailing list, hopefully they have some working suggestions they can offer. – greatwolf Nov 21 '10 at 19:09
  • @victor I really think you have one of two reasons for that to happen: the monitoring tool that comes with turtoise (get rid of it, it's pretty useless anyways), or one of your project executables / other software keeps holding a file. You probably have checked these, but double check again :) – Nick Nov 22 '10 at 19:52
  • @Victor I was actually talking about using the command line tool. Commiting from command line works but not from TortoiseHg. – Pierre-Luc Champigny Dec 01 '10 at 00:09
  • @31eee384 If you're still trying tortoisehg please try my solution below and see if it works for you. If so you might want to change the accepted answer. @nick and @Pierre thanks for the response and clarification but I've finally found the solution to my problem. See below – greatwolf Dec 01 '10 at 09:36