git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] mtn to git conversion script
@ 2008-08-24  9:18 Felipe Contreras
  2008-08-24 13:14 ` Miklos Vajna
  2008-08-25 16:35 ` Brian Downing
  0 siblings, 2 replies; 21+ messages in thread
From: Felipe Contreras @ 2008-08-24  9:18 UTC (permalink / raw)
  To: git, monotone-devel

Hi,

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 #{@id} --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/#{@id} #{@git_id}

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

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
tools.

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-11-11 16:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24  9:18 [RFC] mtn to git conversion script Felipe Contreras
2008-08-24 13:14 ` Miklos Vajna
2008-08-24 18:19   ` Johannes Schindelin
2008-08-24 19:37     ` Miklos Vajna
2008-08-24 18:33   ` Felipe Contreras
2008-08-24 22:46     ` Shawn O. Pearce
2008-08-25  0:45       ` Felipe Contreras
2008-08-28  5:57         ` Anand Kumria
2008-08-28  9:03           ` [Monotone-devel] " Felipe Contreras
2008-09-04  9:43             ` Felipe Contreras
2008-09-04 10:31               ` Jakub Narebski
2008-09-04 13:21                 ` Felipe Contreras
2008-09-04 10:50               ` Thomas Moschny
2008-09-04 13:29                 ` Felipe Contreras
2008-08-25 16:35 ` Brian Downing
2008-08-25 16:41   ` Brian Downing
2008-08-25 20:47   ` Felipe Contreras
2008-08-25 21:09     ` Brian Downing
2008-08-28  7:11   ` Anand Kumria
2008-11-11 16:30   ` Juan Jose Comellas
2008-11-11 16:40   ` Juan Jose Comellas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).