Importing from subversion to mercurial

  1 post   Feedicon  
Replies: 0 - Last Post: May 10, 2011 03:26
by: dengdai
showing 1 - 1 of 1
 
Posted: October 27, 2008 03:41 by wayne meissner
Just in case anyone is trying to import an existing project into a mercurial repository hosted on kenai, here is one way to do it. Whether or not this is the best way is another question. It could also be scripted to make it easier.

1) Use hgimportsvn to create a mercurial repository from subversion
e.g.
hgimportsvn https://my.svn.repository/whatever/

2) Use hgpullsvn to pull all the revisions into the new repository

pushd whatever && hgpullsvn && popd

3) create a new repository on kenai.com (or use the default one), and clone that on your local machine.

hg clone https://username@kenai.com/hg/whatever~mercurial

4) Pull all the changes from the converted svn repo into the new mercurial repo, then push back to kenai.

pushd whatever~mercurial && hg pull -u ../whatever && hg push && popd

Thats what I've done for a couple of projects (from memory). The worst bit is the hgpullsvn which can be uber slow - to speed it up, you can use svnsync to create a local copy of the repo and hgimportsvn/hgpullsvn from the copy.
Replies: 0 - Last Post: May 10, 2011 03:26
by: dengdai
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close