Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert a git repository to mercurial?

I've been developing a java application using git as source code repository. I'd like to share the project with other java developers and hg seems to be most used by them.

My question is how do I convert a git repository to hg?

If I tried googling "convert git to hg" and every search hit is about converting from hg to git. I'm also using TortoiseHg.

like image 608
Spoike Avatar asked Jan 29 '09 13:01

Spoike


People also ask

Is Mercurial better than Git?

Git Is Better for Experienced Users Mercurial depends on your level of technical expertise. Mercurial may be safer for less experienced users, but Git can offer ways to enhance safety (once you know what you are doing).

Can you use Mercurial with GitHub?

Overview. This extension adds the ability to work on a Git repository from Mercurial. It also allows using a Git server as a collaboration point for a team with developers using both Git and Mercurial. At the same time, it can also be used to interact with a Mercurial repository using Git.

What is Hg in Git?

The Hg-Git plugin can convert commits/changesets losslessly from one system to another, so you can push via a Mercurial repository and another Mercurial client can pull it. In theory, the changeset IDs should not change, although this may not hold true for complex histories. Commands.


1 Answers

The hg convert utility isn't on by default after installation. In order to set it as such add the following to your .hgrc file.

[extensions] hgext.convert= 

If you're using TortoiseHg on Windows then this file resides in your home directory as mercurial.ini. After this setting change you will be able to use the hg convert utility.

like image 109
Spoike Avatar answered Sep 21 '22 03:09

Spoike