Version control with Mercurial
Mercurial is an open source distributed version control system initially designed as a replacement tool for Linux kernel development. In Helix TeamHub, you can create any number of Mercurial repositories in your projects.
The below is the list of resources to help you learn Mercurial:
Setting up
Download and install the latest version of Mercurial client and open your Terminal.
Introduce your name and email to Mercurial, so that Helix TeamHub can display your user account correctly. Please specify the same email address you use to sign in to Helix TeamHub:
Open ~/.hgrc
(or on a Windows system in %USERPROFILE%\Mercurial.ini
) by creating it and adding the following lines:
username = YOUR NAME <[HELIX TEAMHUB EMAIL ADDRESS]>
Configure your SSH keys under your Helix TeamHub Profile settings and start working with Mercurial.
For example, to clone the "bar" Mercurial repository from the "foo" project in "acme" company with SSH, issue the following command in the terminal:
hg clone ssh://[email protected]/acme/projects/foo/repositories/git/bar
To clone the same repository with HTTP:
hg clone http://[HELIX TEAMHUB USERNAME]@helixteamhub.cloud/acme/projects/foo/repositories/mercurial/bar
Migrating existing Mercurial (HG) repositories to Helix TeamHub
The following steps are needed in order to migrate existing Mercurial repositories to Helix TeamHub:
-
Create a new repository in Helix TeamHub project. You can accomplish this either through quick actions or from the repositories screen:
-
Clone the repository you wish to migrate:
hg clone <OLD-REPOSITORY-URL>
-
Go to the repository directory:
cd <YOUR-REPOSITORY-NAME>
-
Obtain the clone URL for the repository you created in Helix TeamHub from the repository view:
-
Push the repository to Helix TeamHub:
hg push <HELIX-TEAMHUB-REPOSITORY-URL>
If you copied the clone URL with SSH as an access method, you need to have your SSH key added to Helix TeamHub in order to push the changes.
- Clone the repository from Helix TeamHub to a new directory. Alternatively, you can change the new clone URL to the
[paths]
section of.hg/hgrc
file in the repository.