Bitbucket Mercurial Support Is Ending: Need Mercurial Repository Options?
Bad news for Mercurial users: Atlassian recently announced that they will remove support for the Mercurial version control system from Bitbucket Cloud and its API.
Mercurial repositories and features will be officially removed from Bitbucket and the API on June 1, 2020. And you won’t be able to create new Mercurial repositories after February 1, 2020.
Mercurial: A Brief History
Mercurial is an open source distributed version control system (DVCS) that first launched in 2005.
Git was introduced around the same time, and for the same reason:
To provide source control for developers building the Linux kernel.
Git was actually chosen by the Linux kernel team (not surprising, since it was also written by Linus Torvalds).
Over time, Git became extremely popular. Mercurial became popular, too.
Who Uses Mercurial Today?
Today, there are many thousands of developers and repositories using Mercurial. It is sometimes referred to as Hg, which is the symbol for the mercury element on the periodic table.
The primary users of Mercurial today are individuals and small teams. The only large tech companies using Mercurial are Facebook and Mozilla (the makers of the Firefox web browser).
Facebook has a large team working constantly to support their Mercurial system. They’ve made many of their own contributions so it can scale to suit their needs.
Why Teams Still Use Mercurial
Most teams using Mercurial today are using it for one or more of the following three reasons:
- To manage a large codebase for numerous ongoing projects that have been active for a period of time.
- To hold the history of a legacy code, so developers can refer to it occasionally if needed.
- To develop and support new and existing projects by people who like Mercurial better than Git. (Some love it.)
Bitbucket Mercurial Repository Support — Since 2008
Bitbucket is a code hosting and collaboration service launched in 2008. Bitbucket launched as a standalone company offering Mercurial hosting exclusively. In 2010, Bitbucket was purchased by Atlassian. In 2011, Atlassian announced support for Git in Bitbucket.
Bitbucket is the largest Mercurial code hosting service — and it has been for a long time. While Atlassian focuses more effort on Jira and Confluence, they’ve had success (in large companies) with the exclusively Git-based enterprise version of Bitbucket. And Atlassian recently decided to focus their priorities and roadmap on building the best possible experience for Git users.
While Atlassian has made this decision in favor of Git, Mercurial is far from dead. And if you have Mercurial repositories in Bitbucket, you’ll need a plan for moving them.
What Should Users of Bitbucket and Mercurial Do Now?
Mercurial assets in Bitbucket will “disappear” on June 1, 2020, which is not that long from now.
So, what should the 100s of 1,000s of companies using Bitbucket for Mercurial hosting do? Start looking for an alternative solution immediately.
Carefully Plan Moving Mercurial Repositories
You’ll need to consider and plan how to move the repositories. There are other hosting providers who can handle Mercurial repositories. This includes Perforce — Helix TeamHub can host Mercurial.
Moving repos to another hosting provider, like Helix TeamHub, is easy from a technical perspective. But the bigger problem is the history of code changes and reviews, comments, and issue tracking. These are stored in Bitbucket’s database. And there is no mechanism in Bitbucket to export this data.
Bitbucket has stated that they are not planning to provide this functionality. So, you’ll need to plan on:
- Going through all the projects manually.
- Capturing the most important historic information about the projects that needs to be kept.
- Manually cutting and pasting that information elsewhere.
This is like the source code version of going through Grandpa’s attic. You might find a treasure trove in there. (I’m hoping this is at least a somewhat positive way of looking at it.)
An Alternative For Your Mercurial Repositories
A great alternative for a relatively small team of developers that wants to stay on Mercurial is Helix TeamHub.
Helix TeamHub is a code hosting and collaboration platform from Perforce which has built-in, native support for Mercurial. You can host Git and Subversion repositories, too. And projects can have multiple repos of more than one type.
You try out Helix TeamHub with Mercurial in the cloud for free for up to 5 users.
Git vs. Mercurial vs. Perforce: Should You Switch?
Of course, instead of moving repositories, you could consider switching. But to what?
Mercurial to Git?
Bitbucket will continue to enhance its Git version. So, you could move your repositories from Mercurial to Git.
But Atlassian hasn’t yet provided help for the switch. There is no automatic, easy way to switch to Git in Bitbucket. In fact, developers who have both Git and Mercurial repositories in the same Bitbucket account have no easy way to determine which ones are which (e.g., by looking at a list). Although, Atlassian promises to deliver the ability to generate such a list soon.
There is an open source plugin for Mercurial, called Hg-Git. Hg-Git lets developers push to and pull from a Git server repository from Mercurial.
In theory, this means collaboration can happen on Git-based projects from Mercurial. This doesn’t solve the problem of the metadata. But it does let developers who love Mercurial continue to use it as their interface. Although, using Hg-Git adds complexity, limitations, and the possibility of error to something that should be simple.
[Related Blog] Git vs. Mercurial: How Are They Different?
Mercurial to Perforce Helix Core?
If your team is larger — and not wedded to Mercurial or excited about moving to Git — there is another alternative. That is Perforce Helix Core.
There are many advantages to Helix Core.
- Helix Core is faster.
- It has numerous integrations to IDEs and DevOps.
- It comes with an enterprise-capable, user-friendly code review and collaboration solution called Helix Swarm.
- Perforce Streams provide easier branching and merging than Git or Mercurial.
In addition to a command line client, Helix Core has a visual client that runs on Linux, Mac, and Windows. Mercurial users who like Atlassian’s Sourcetree will be interested in this.
See for yourself the benefits of Helix Core. You can try it free for up to 5 users.