Cannot update embedded mercurial in Sourcetree

Sourcetree 2.1.2.5

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

This widget could not be displayed.

Hi

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.

https://downloads.atlassian.com/software/sourcetree/windows/PortableHg_3.7.3.7z

This should get downloaded to
%localappdata%\Atlassian\SourceTree\PortableHg.7z
and then unzipped into
%localappdata%\Atlassian\SourceTree\hg_local

If there are problmes downloading I can only assume there is a network connectivity issue getting to https://downloads.atlassian.com 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,
Bernhard

Hello Michael,

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

 

Thanks,

Franco

This widget could not be displayed.

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,

Ana

Hi Ana, I have a similiar problem. I just updated from SourceTree 1.9 to 2.1.2.5 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 52.84.194.43:443"

SourceTree is trying to download from https://downloads.atlassian.com/software/sourcetree/windows/PortableHg_3.7.3.7z.

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,
Bernhard

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.

This widget could not be displayed.

If this is still an issue please upgrade to Sourcetree 2.4.7.0 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.

This widget could not be displayed.

Hi Michael,

 

yes there is still a problem, thanks.

 

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

 

Regards,

Franco

This widget could not be displayed.

Hi Michael,

 

I have the Sourcetree v. 2.4.7.0 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

Hi

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.

 

Regards,

Franco

Suggest an answer

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

876 views 2 3
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