Can't commit using hg

SourceTree has generally worked great for me, but recently, when I try to commit using mercurial to a local repo, I get this error: Cannot run program "hg": error=2, No such file or directory

 at java.lang.ProcessBuilder.start(

 at scala.sys.process.ProcessBuilderImpl$


I've switched to using System Mercurial, then back to built-in, I've restarted SourceTree, I've restarted my machine, but I still get the error. Any advice for debugging this?

2 answers

This is on OS X 10.9.4, SourceTree version 1.9.8. (Sorry, just realized there's now a Windows version.)

Hi Thom,

Your SourceTree is having difficult to locate the hg driver program, responsible to the mercurial integration.

I would recommend you to try to install the latest SourceTree version (for Mac OS X is 2.0.0):

Could you please try it and return here to say if it works or not?

Kind Regards,
Henrique Lechner

Upgrading to 2.0.1 didn't fix this, but uninstalling and re-installing (version 2) did. I'll just hope it was a one-time error.

Oops. Apparently it didn't fix it. Still getting the error, especially when using fetch.

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

262 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot