Subject: Re: [RFC] mtn to git conversion script

From: [email-masked] (Brian Downing)
Date: Mon, 25 Aug 2008 11:41:53 -0500

On Mon, Aug 25, 2008 at 11:35:31AM -0500, Brian Downing wrote:
> Note that for monotone export to go fast you absolutely /must/ avoid the
> get_manifest operation.  In my converter I use the revision information
> directly.  Getting the renames right with this is a little tricky; IIRC,
> the ordering that works is:
> 
> * Rename all renamed files, innermost files first, to temporary names.
> * Delete all deleted files, innermost first.
> * Rename all temporary names to permanent names, outermost first.
> * Add all new/modified files.
> 
> Conveniently, all of the above can be done by directly emitting
> fast-import commands, so you don't have to keep track of trees directly.
> (With one exception, which I'll elaborate on in a different email.)

The exception is one commit in monotone's repository.  There was
actually a commit that did:

    rename '/' '/something'
    add '/other'

Monotone can apparently handle that, but git fast-import cannot, last I
checked.  One would have to "know" what all the files were and recreate
them by hand, which was what fast-import's move/copy commands were
supposed to avoid.

Obviously this use case is not too important to me, as patches have not
been forthcoming to fix this, but I figured I'd mention it in case it's
important to somebody else.

-bcd