Re: [PATCH] Add hg-to-git conversion utility.

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

 



Stelian Pop <stelian@xxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]