TortoiseHg can't commit--"The system cannot find the file specified"
Asked Answered
T

2

8

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.

Thickhead answered 3/7, 2010 at 17:48 Comment(10)
I got the same error and i can't find a solution for this. Please give us an answer!Brassiere
what version of hg + windows, what version of python? ignore the latter if python isnt required.Dinette
TortoiseHg is version 1.1 with Mercurial 1.6. I'm running Windows 7 64bits.Brassiere
I have TortoiseHg 1.1, Mercurial 1.6 like Champigny. Running Windows XP SP2, 32 bit.Thickhead
Have you tried looking at TortoiseHg known issues (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.Blindfold
Also possibly related : #2454881Blindfold
Can you commit with the command line tool?Apophyllite
Yes, running hg commit works in that directory. After this, though, with further changes I still can't commit through TortoiseHg.Thickhead
31eee384: Please contact the TortoiseHg developers through their proper channels: bitbucket.org/tortoisehg/stable/issues and [email protected]. 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.Inconstant
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.Thickhead
A
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

Apteral answered 16/7, 2010 at 1:43 Comment(8)
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.Thickhead
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)!Brassiere
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)Apteral
@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?Rosenstein
@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.Rosenstein
@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 :)Apteral
@Victor I was actually talking about using the command line tool. Commiting from command line works but not from TortoiseHg.Brassiere
@Thickhead 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 belowRosenstein
R
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.

Rosenstein answered 21/11, 2010 at 2:45 Comment(3)
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.Thickhead
@Thickhead 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 :)Rosenstein
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.Lorylose
A
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

Apteral answered 16/7, 2010 at 1:43 Comment(8)
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.Thickhead
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)!Brassiere
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)Apteral
@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?Rosenstein
@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.Rosenstein
@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 :)Apteral
@Victor I was actually talking about using the command line tool. Commiting from command line works but not from TortoiseHg.Brassiere
@Thickhead 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 belowRosenstein

© 2022 - 2024 — McMap. All rights reserved.