[core-workflow] Help needed: best way to convert hg repos to git?

Nicolás Alvarez nicolas.alvarez at gmail.com
Thu Feb 11 19:43:29 EST 2016


2016-02-06 3:03 GMT-03:00 Nicolás Alvarez <nicolas.alvarez at gmail.com>:
> 2016-02-05 23:39 GMT-03:00 Nicolás Alvarez <nicolas.alvarez at gmail.com>:
>> 2016-02-05 22:57 GMT-03:00 Brett Cannon <brett at python.org>:
>>> https://www.python.org/dev/peps/pep-0512/#define-commands-to-move-a-mercurial-repository-to-git
>>>
>>> There appear to be multiple ways to convert hg repos to git, but no clear
>>> winner. It would be great if some one/people took on the task of evaluating
>>> the tools available out there by converting the cpython repo and seeing
>>> which one has the best results.
>>
>> I said I'd look into this. I didn't. Shame on me.
>>
>> Trying fast-export now :)
>
> Update: The fast-export tool started at about 500 revs/sec but
> progressively slowed down. Now it's 90% done after churning for two
> hours, and each merge commit (of which there are many!) takes an
> entire second by itself. I don't feel like staying awake to see it
> finish.

I tried fast-export, and I don't really see anything wrong with the
repository. The size is 221MB.

It depends on how crazy you want to go. For example, SVN-era merges
don't appear as merges, but looks like some SVN-era branches don't
exist in Hg to begin with (Would I need to get cpython-fullhistory?
Cloning it gives me a 400 Bad Request). Do we care about that?

Or, changes that come from non-committers could have their Author
field modified, maybe based on the ACKS file modification. It's
feasible but will take time and manual work. Do we care about that?

-- 
Nicolás


More information about the core-workflow mailing list