Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot update embedded mercurial in Sourcetree


Windows 10 64 bit

Whenever I start Sourcetree, I get a warning dialogue about mercurial being out of date:

Your selected Mercurial is older than 3.7.3.

The Mercurial team strongly encourages all users to upgrade to 3.7.3 or later due to a security vulnerability.

You current configuration is Mercurial is 3.2.3.

In Tools->Options->Mercurial, I click on Update Embedded Mercurial.

It downloads something, then I get an error dialogue saying:


Failed to Extract

7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21

Scanning the drive for archives:
1 file, 8410583 bytes (8214 KiB)

Extracting archive: C:\Users\xx\AppData\Local\Atlassian\SourceTree\PortableHg.7z
Path = C:\Users\xx\AppData\Local\Atlassian\SourceTree\PortableHg.7z
Type = 7z
Physical Size = 8410583
Headers Size = 3362
Method = LZMA2:24 BCJ
Solid = +
Blocks = 2

Sub items Errors: 2

Archives with Errors: 1

Sub items Errors: 2

Then under that, there is another dialogue that says:

Download not successful
Download either failed or was cancelled, please try again later.

It did download though, so I don't know what that dialogue is all about.


How can I update the embedded mercurial in Sourcetree?

5 answers

2 votes
minnsey Atlassian Team Jul 17, 2017


Firstly SourceTree does not currently support Mercurial 4+, unfortunately it breaks some extensions we use. We have a fix in the works and hope to have it out to beta testers soon.

Therefore the highest versions SourceTree will work with is 3.9.2. SourceTree should be able to work with a System install of 3.9.2

Where there are problems updating the embedded Hg.

EMbedded Hg is still using 3.7.3 and the following is the correct URL.

This should get downloaded to
and then unzipped into

If there are problmes downloading I can only assume there is a network connectivity issue getting to or perhaps a proxy on the network?

It is possible the download has succeeded but unzipping has failed, possibly because a file is in use, in that case shutdwn SourceTree and delete the folder %localappdata%\Atlassian\SourceTree\hg_local.
When SourceTree restarts it shoudl re-install the embedded hg.

Thanks for taking the time to reply Michael. Deleting the hg_local folder, re-open SourceTree, a pop-up comes up saying it can't find Mercurial, select the option Download an embedded version, and it now no longer continously displays the Mercurial version warning. The Mercurial version shows as 3.7.3 in Tools->Options. So that problem is solved.

Note that there were in fact no network problems or download issues as you suggest. I stated that in the original post, that it did download ok. So the error message that Sourcetree displays is incorrect. So you might want to open a bug report or something.

Also probably another bug report candidate for having to delete that folder to get the auto-update to work.

Alas, now when I select my repository, I get a popup saying something about not supporting hg-attic shelves anymore, then Sourcetree crashes. 

Unfortunately, I cannot spend any more time on trying to get Sourcetree working. I'm using TortoiseHg and everything is fine.

Hello Michael,

thanks for the solution of the download problem. I did the manual download and extract and I now have version 3.7.3.

Best regards,

Hello Michael,

I downloaded the files, but I don't have the hg_local folder.




0 votes
Ana Retamal Atlassian Team Jul 10, 2017

Hi! Can you try following the steps at Upgrading Mercurial in SourceTree for Windows (downloading the latest Mercurial version) and let us know if this worked for you?

Best regards,


Hi Ana, I have a similiar problem. I just updated from SourceTree 1.9 to and tried to update the Embedded Mercurial. All I get is an error message

"Unable to extract C:\...\PortableHg.7z

Please check your SourceTree options.

System.Net.WebException: Unable to connect to the remote server
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it"

SourceTree is trying to download from

When I try to access this address in a web browser, I get:

"The requested URL /software/sourcetree/windows/PortableHg_3.7.3.7z. was not found on this server."

OS is Windows 7, 64-bit.

Thanks in advance,

Thanks for the reply Ana. Unfortunately, attempting to Use System Mercurial does not work either. When I click that button, I simply get the Mercurial version warning dialogue again, and when I dismiss it, nothing happens. I seem to recall a folder location dialogue popping up for that in the past, but not now. I have Mercurial 4.1 installed from a TortoiseHg install, and that is included in my path.

0 votes
minnsey Atlassian Team Jan 18, 2018

If this is still an issue please upgrade to Sourcetree as this supports Mercurial 4.4.1.

After upgrading you will still need to update the embedded version of Mercurial in the Tools/Options/Mercurial tab.

Hi Michael,


yes there is still a problem, thanks.


Do you know how I can upgrade Sourcetree from the existing program?




Hi Michael,


I have the Sourcetree v. and in tools/options/mercurial tab I have Embedded Mercurial version 4.4.1, but I still get the error message.

Thanks and regards,

FrancoScreen Shot 01-26-18 at 02.41 PM.PNG

minnsey Atlassian Team Jan 31, 2018


Do you still get the error dialog after closing and restarting Sourcetree? If so it sounds like a bug, If Sourcetree reports version 4.4.1 in that tab then it is using that version.

Hi Michael,


I don't get more the error dialog now.


Thanks for helping.




Suggest an answer

Log in or Sign up to answer
Community showcase
Published 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...

2,922 views 4 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you