git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] mtn to git conversion script

From
Brian Downing <bdowning@lavos.net>
Date
Aug 25, 2008, 16:41 UTC
Message-ID
<20080825164153.GK31114@lavos.net>
In-Reply-To
<20080825163530.GJ31114@lavos.net>
On Mon, Aug 25, 2008 at 11:35:31AM -0500, Brian Downing wrote:
Show 13 quoted lines
> 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
Previous: Brian DowningNext: Felipe Contreras
Message 16 of 21 in “[RFC] mtn to git conversion script”
  1. Felipe ContrerasAug 24, 2008
  2. Miklos VajnaAug 24, 2008
  3. Johannes SchindelinAug 24, 2008
  4. Miklos VajnaAug 24, 2008
  5. Felipe ContrerasAug 24, 2008
  6. Shawn O. PearceAug 24, 2008
  7. Felipe ContrerasAug 25, 2008
  8. Anand KumriaAug 28, 2008
  9. Felipe ContrerasAug 28, 2008
  10. Felipe ContrerasSep 4, 2008
  11. Jakub NarebskiSep 4, 2008
  12. Felipe ContrerasSep 4, 2008
  13. Thomas MoschnySep 4, 2008
  14. Felipe ContrerasSep 4, 2008
  15. Brian DowningAug 25, 2008
  16. Brian DowningAug 25, 2008
  17. Felipe ContrerasAug 25, 2008
  18. Brian DowningAug 25, 2008
  19. Anand KumriaAug 28, 2008
  20. Juan Jose ComellasNov 11, 2008
  21. Juan Jose ComellasNov 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.