HNibernate in Git and Mercurial.
I imported NHibernate sources into github.com and bitbucket.org.
First, I've downloaded snapshot of svn repository from http://fabiomaulo.blogspot.com/2010/06/nhibernate-svn-local-mirror.html. You can set up mirror on your own, but download is faster.
Then I've created 2 folders, one for git and one for mercurial. Then ran those 2 scripts:
cd ../NHibernateMirror.git
git svn clone file:///home/vadim/projects/NHibernateMirror -T trunk/nhibernate .
hg clone file:///home/vadim/projects/NHibernateMirror/trunk/nhibernate/ ../NHibernateMirror.hg
I don't like trunk containing a folder "nhibernate", it is redundant IMHO, so I made the essential content the root of git and mercurial repository. Because of this, importing tags and branches is problematic, but I'm not interested in trunk only.
Import is good, but how to keep it up to date?
Update your local svn mirror:
svnsync sync file:///home/vadim/projects/NHibernateMirror
Update Git:
cd ../NHibernateMirror.git
git svn fetch
git svn rebase
git push origin master
Update mercurial
cd ../NHibernateMirror.hg
hg pull
hg push ssh://hg@bitbucket.org/vadim/nhibernate