threads / discuss / 15509

[ANN] mtn2git v0.1

Subject: [ANN] mtn2git v0.1

## tl;dr

6 messages between Sep 12, 2008 and Sep 15, 2008.

replies: 5people: 3as markdown or json

Felipe Contreras· Sep 12, 2008, 22:59 UTC · lore
Hi,

This is the result of various experiments I've been doing while trying to import mtn repositories into git. I've looked into other mtn2git scripts but none fitted my needs.

After some rfcs on git and monotone mailing lists it seems now the script is going in the right direction.

There are two modes:
== checkout ==

In this mode each revision is checked out and imported directly into git. This means it's 100% sure that the result would be an exact clone.

The disadvantage is that it's extremely slow (1 day for 25,000 commits).
== fast-import ==

This mode requires a few patches for git fast-import, it's very fast (40 min for 25,000 commits), but not 100% reliable yet.

There are also some missing features like branch creation and updates.

My plan is to keep these two modes in the code until fast-import method is reliable enough.

I've tried this with Pidgin's repository. The result is here: http://github.com/felipec/pidgin-clone

It would be interesting to do something similar with OE's repo. Any takers?
Comments and patches are welcome :)
-- 
Felipe Contreras
Jakub Narebski· Sep 13, 2008, 09:45 UTC · re: Felipe Contreras · lore

Re: [ANN] mtn2git v0.1

"Felipe Contreras" <felipe.contreras@gmail.com> writes:
> This is the result of various experiments I've been doing while trying
> to import mtn repositories into git. I've looked into other mtn2git
> scripts but none fitted my needs.
mtn or mnt?
> After some RFCs on git and monotone mailing lists it seems now that
> the script is going in the right direction.
When you feel this script to be ready, could you add it to the
"Interaction with other Revision Control Systems" section on
  http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
As far as I can see there ain't any Monotone to Git converter on this
list.
TIA
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Felipe Contreras· Sep 13, 2008, 10:52 UTC · re: Jakub Narebski · lore

Re: [ANN] mtn2git v0.1

On Sat, Sep 13, 2008 at 12:45 PM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 7 quoted lines
> "Felipe Contreras" <felipe.contreras@gmail.com> writes:
>
>> This is the result of various experiments I've been doing while trying
>> to import mtn repositories into git. I've looked into other mtn2git
>> scripts but none fitted my needs.
>
> mtn or mnt?
monotone = mtn
Show 8 quoted lines
>> After some RFCs on git and monotone mailing lists it seems now that
>> the script is going in the right direction.
>
> When you feel this script to be ready, could you add it to the
> "Interaction with other Revision Control Systems" section on
>  http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
> As far as I can see there ain't any Monotone to Git converter on this
> list.

Ok, done. I think it's ready if you can bare the slowness of the 'checkout' method. The only missing feature is tags, but should be easy to implement.

-- 
Felipe Contreras
Jakub Narebski· Sep 13, 2008, 12:02 UTC · re: Felipe Contreras · lore

Re: [ANN] mtn2git v0.1

On Sat, 13 Sep 2008, Felipe Contreras wrote:
Show 10 quoted lines
> On Sat, Sep 13, 2008 at 12:45 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>> "Felipe Contreras" <felipe.contreras@gmail.com> writes:
>>
>>> This is the result of various experiments I've been doing while trying
>>> to import mtn repositories into git. I've looked into other mtn2git
>>> scripts but none fitted my needs.
>>
>> mtn or mnt?
> 
> monotone = mtn
Thanks.
My confusion resulted from the fact that 'monotone' has 'n' both
before and after 't'.
 
Show 12 quoted lines
>>> After some RFCs on git and monotone mailing lists it seems now that
>>> the script is going in the right direction.
>>
>> When you feel this script to be ready, could you add it to the
>> "Interaction with other Revision Control Systems" section on
>>  http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
>> As far as I can see there ain't any Monotone to Git converter on this
>> list.
> 
> Ok, done. I think it's ready if you can bare the slowness of the
> 'checkout' method. The only missing feature is tags, but should be
> easy to implement.
Thank you.

BTW. did you have any problems with (from what I understand) slightly different concept of branches between Monotone and Git?

-- 
Jakub Narebski
Poland
Felipe Contreras· Sep 13, 2008, 15:21 UTC · re: Jakub Narebski · lore

Re: [ANN] mtn2git v0.1

On Sat, Sep 13, 2008 at 3:02 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> On Sat, 13 Sep 2008, Felipe Contreras wrote:
>> On Sat, Sep 13, 2008 at 12:45 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>>> "Felipe Contreras" <felipe.contreras@gmail.com> writes:
<snip/>
Show 17 quoted lines
>>>> After some RFCs on git and monotone mailing lists it seems now that
>>>> the script is going in the right direction.
>>>
>>> When you feel this script to be ready, could you add it to the
>>> "Interaction with other Revision Control Systems" section on
>>>  http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
>>> As far as I can see there ain't any Monotone to Git converter on this
>>> list.
>>
>> Ok, done. I think it's ready if you can bare the slowness of the
>> 'checkout' method. The only missing feature is tags, but should be
>> easy to implement.
>
> Thank you.
>
> BTW. did you have any problems with (from what I understand) slightly
> different concept of branches between Monotone and Git?

Monotone can have multiple heads in one single branch, but from what I understand that mostly happens locally (not on the published repo). Anyway, If that happens the commits are still there, just dangling temporarily in no branch.

There isn't much we can do for that situation, except maybe create branch_n or something. I don't think it's a big problem.

-- 
Felipe Contreras
Markus Wanner· Sep 15, 2008, 09:07 UTC · re: Felipe Contreras · lore

Re: [Monotone-devel] Re: [ANN] mtn2git v0.1

Hi,
Felipe Contreras wrote:
> Monotone can have multiple heads in one single branch, but from what I
> understand that mostly happens locally (not on the published repo).

Uh.. no, I'd say quite the opposite: if multiple developers work on the same branch and do their commits, the first time both heads appear in the same branch on the same machine will be the public repository.

> Anyway, If that happens the commits are still there, just dangling
> temporarily in no branch.
..for the mtn repo imported into git that is, right?
Regards
Markus Wanner (ne Schiltknecht)

← back to recent threads