How do I convert a git repository to mercurial?

后端 未结 9 1286
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 20:31

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.

9条回答
  •  不知归路
    2021-01-29 21:15

    By using the Mercurial Convert extension

    Add the following lines to your .hgrc or to enable the extension :

    [extensions]
    hgext.convert=
    

    And typing a

    cd src
    hg convert --datesort . dst
    

    (even though it can lead to some issues...)

    Note:: metrix reports that this might not work:

         hg convert --datesort src dst
    

    Note: there happens to be a bug with hg convert if you perform this command from a directory other than the source directory.
    You will get the following error:

    abort: cannot read tags from git-repo4/.git
    

    Confirmed with git 1.7.9 and Mercurial 2.6.2 on Windows XP

提交回复
热议问题