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:

java.io.IOException: Cannot run program "hg": error=2, No such file or directory

 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)

 at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:68)

...

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

544 views 1 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