git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Stelian Pop <stelian@popies.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add hg-to-git conversion utility.
Date: Fri, 12 Jan 2007 17:15:25 -0500	[thread overview]
Message-ID: <20070112221525.GA20956@spearce.org> (raw)
In-Reply-To: <1168639023.13640.2.camel@localhost.localdomain>

Stelian Pop <stelian@popies.net> wrote:
> hg-to-git.py  is able to convert a Mercurial repository into a git one,
> and preserves the branches in the process (unlike tailor)

Cool!

You've already written the converter, but you may want to look at
using git-fast-import as the backend interface to Git.  I think
your code may come out shorter, be clearer, and will run faster.

For example Simon Schubert's cvs -> git converter was written in
one night (last night) in Ruby using git-fast-import as the backend
(Simon already had the heavy lifting CVS portions done).  I peeked
at his source and its quite readable, though maybe that's just the
Ruby talking.  ;-) Simon is apparently trying to import FreeBSD's
CVS repository to Git.  A non-trivial task.

Chris Lee also has an svn -> git converter that uses gfi as its
backend. Its only 150 or so lines of Python and is also quite
readable.  Chris is apparently trying to import KDE to Git.
An equally non-trivial task.

I think the common thread between the two implementations is
that there's less process forking and less manipulation of ugly
environment variables.  So the import runs faster and its a little
easier to organize the code.


The gitweb (and mirror URLs) for gfi is available here:

  http://repo.or.cz/w/git/fastimport.git

Post 1.5.0 I'm going to nudge Junio to get gfi added to the main
git.git repository.  (Right now I don't want to distract him from
the release.)

-- 
Shawn.

  reply	other threads:[~2007-01-12 22:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11 17:49 Mercurial to git converter Stelian Pop
2007-01-12 19:28 ` Jakub Narebski
2007-01-12 20:14   ` Stelian Pop
2007-01-12 21:57     ` [PATCH] Add hg-to-git conversion utility Stelian Pop
2007-01-12 22:15       ` Shawn O. Pearce [this message]
2007-01-12 23:00         ` Stelian Pop
2007-01-12 23:14           ` Junio C Hamano
2007-01-12 23:18             ` Stelian Pop
2008-06-14 10:23 ` Mercurial to git converter Nick Andrew
2008-06-14 15:53   ` Johannes Schindelin
2008-06-14 16:48     ` Jakub Narebski
2008-06-16  2:24       ` Shawn O. Pearce
2008-06-16  8:21     ` Nick Andrew
2008-06-16  8:26     ` Mike Hommey
2008-06-17  9:12       ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070112221525.GA20956@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=stelian@popies.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).