[SourceTree] How to use a local Mercurial installation?

I have a local Mercurial installation in /sw/bin (more recent than the one used by SourceTree). I made 2 symlinks in /usr/local/bin and /usr/bin but SourceTree doesn't find them when I click on "Utiliser Mercurial Système" (Use System Mercurial?) button in Preferences… . How can I change the Hg binary used by SourceTree?



3 answers

1 accepted

Becuase the vast majority of Mercurial is installed in your Python library ('hg' is just a simple script which starts Python and loads the libraries), the location of the hg script isn't actually very useful. So instead, SourceTree invokes Python, imports the mercurial package and asks where it's located. This will work regardless of where the 'hg' script is located - unless your command-line Python install is different to the system install perhaps.

However, this may be academic anyway if you're using hg 1.9, please see http://confluence.atlassian.com/display/SOURCETREEKB/Error+Message+-+Patching+Mercurial+failed . Now that 1.9.3 is out which fixes the nasty merge bug on OS X, SourceTree will support 1.9+ soon - once the extensions that 1.9 broke are updated to work with it.

Thank you for the quick answer. I've forced the use of my Python 2.7 with 1.9.3 Mercurial but SourceTree failed with some private unnamed extensions. I'll wait the next ST release but if I had the list of needed extensions I could try with my local installation?



You can see the extensions SourceTree uses on the Preferences page - in terms of 1.9 though the main remaining problem is hgattic (for shelve/unshelve). I'm in the process of adapting it for 1.9 because the original author hasn't done it, and I can't find any definitive versions yet - it's in the public domain here: https://bitbucket.org/sinbad/hgattic

I just have a mercurial server started serving all my local repositories to any of my systems including SourceTree and Bamboo.


Any news about supporting new mercurial versions? We realy neeed use large files support [2.0 mercurial version] and now it's impossible because SourceTree can't work with such repositories.


SourceTree 1.3 is using Mercurial 2.0 by default, there will be a beta at the end of this week.

"SourceTree 1.3 is using Mercurial 2.0 by default, there will be a beta at the end of this week."

Wow - great

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
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

25,985 views 26 12
Join discussion

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