[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] [RFC] mtn to git conversion script

From: Felipe Contreras
Subject: [Monotone-devel] [RFC] mtn to git conversion script
Date: Sun, 24 Aug 2008 12:18:50 +0300


I developed a script that converts a monotone repository into a git
one (exact clone), I want to contribute it so everybody can use it.

However, I might have not done it correctly.

This is the gist of the script:

mtn update --revision address@hidden --reallyquiet
git ls-files --modified --others --exclude-standard -z | git
update-index --add --remove -z --stdin
git write-tree
git write-raw < /tmp/commit.txt
git update-ref refs/mtn/address@hidden address@hidden

branches.each do |e|
    git update-ref refs/heads/#{e} address@hidden

I wrote "git write-raw" which takes the commit text as is, and puts it
into the repository.

I've read about 'fast-import' but I'm not sure if it would be more
efficient, because you would have to parse the output of different mtn

What do you think? Does it makes sense to have a 'write-raw' command?
Or should I somehow use 'fast-import'?

Best regards.

Felipe Contreras

reply via email to

[Prev in Thread] Current Thread [Next in Thread]