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 Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,230 views 4 2
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