Error Message - Patching Mercurial failed

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

An error message appears, "Patching Mercurial failed."

Cause

You'll get this message when trying to use the system Mercurial, if you're using the recently released Mercurial 1.9.

Resolution

Mercurial 1.9 isn't supported yet. There are 2 reasons:

  1. Mercurial 1.9 breaks a number of extensions, including hgattic which SourceTree relies on.

  2. Mercurial up to 1.9.2 has a bug on Mac OS X with calling merge tools which can cause a segfault in Python on particularly large merges.

Once these issues are resolved, the 'use system Mercurial' option will be updated to work with 1.9 too. For updates, set a watch on this page by logging in and watching the page.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.