importing from git
Christopher Li
hg at chrisli.org
Tue May 31 15:45:56 UTC 2005
Hi,
Here is the script I promise on importing from git.
http://www.int80.org/scm/git.py
Here is my description page can be found on
http://www.int80.org/scm/gitimport.html
Chris
I cleanup the git.py script a little and add the command to import GIT repository into mercurial.
Assume you have git and mercurial install correctly. Download git.py and save as git.
Before you start importing, you need to setup the git repository. Here is what I usually do:
$ mkdir foo
$ cd foo
$ git initdb
$ git parent ../git/foo.git/objects
Now start importing stuff to mercurial:
$ git hgci 3
Which will import 3 delta in to mercurial. It will always rebuild a fresh copy of a ".hg" directory
and delete any pending change. The first time invoke will take a long time because it will walk
the git repository change log history and saves it to cache. The subsequent invoke will use the cache
instead. The cache is build incrementally.
It use the "rawcommit" command which provide in this patch to mercurial.
More information about the Mercurial
mailing list