[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

1 vote
Accepted answer

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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,914 views 7 10
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