# [ANN] mtn2git v0.1

6 messages from 2008-09-12 to 2008-09-15. Participants: Felipe Contreras, Jakub Narebski, Markus Wanner.
Thread: https://gitlist.dev/t/15509

## Felipe Contreras, 2008-09-12 22:59

Subject: [ANN] mtn2git v0.1
Message-ID: <94a0d4530809121559w5f644174j461ec61cb2327fd8@mail.gmail.com>
URL: https://gitlist.dev/e/94a0d4530809121559w5f644174j461ec61cb2327fd8%40mail.gmail.com

```
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, 2008-09-13 09:45

Subject: Re: [ANN] mtn2git v0.1
Message-ID: <m3d4j8nzy9.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3d4j8nzy9.fsf%40localhost.localdomain
In-Reply-To: <94a0d4530809121559w5f644174j461ec61cb2327fd8@mail.gmail.com>

```
"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, 2008-09-13 10:52

Subject: Re: [ANN] mtn2git v0.1
Message-ID: <94a0d4530809130352v5775be53sc14b354b8c1dae15@mail.gmail.com>
URL: https://gitlist.dev/e/94a0d4530809130352v5775be53sc14b354b8c1dae15%40mail.gmail.com
In-Reply-To: <m3d4j8nzy9.fsf@localhost.localdomain>

```
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

>> 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, 2008-09-13 12:02

Subject: Re: [ANN] mtn2git v0.1
Message-ID: <200809131402.11413.jnareb@gmail.com>
URL: https://gitlist.dev/e/200809131402.11413.jnareb%40gmail.com
In-Reply-To: <94a0d4530809130352v5775be53sc14b354b8c1dae15@mail.gmail.com>

```
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:
>>
>>> 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'.
 
>>> 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, 2008-09-13 15:21

Subject: Re: [ANN] mtn2git v0.1
Message-ID: <94a0d4530809130821h6f424695xe09386243c3213c3@mail.gmail.com>
URL: https://gitlist.dev/e/94a0d4530809130821h6f424695xe09386243c3213c3%40mail.gmail.com
In-Reply-To: <200809131402.11413.jnareb@gmail.com>

```
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/>

>>>> 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, 2008-09-15 09:07

Subject: Re: [Monotone-devel] Re: [ANN] mtn2git v0.1
Message-ID: <48CE25B6.40608@bluegap.ch>
URL: https://gitlist.dev/e/48CE25B6.40608%40bluegap.ch
In-Reply-To: <94a0d4530809130821h6f424695xe09386243c3213c3@mail.gmail.com>

```
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)

```
