- The 1st recipe was trying to convert directly using Hg in Working With Subversion Repositories
But there seemed a bug in Hg when the SVN requires HTTP authorization - even the user and password were correct it still could not pass through:hg convert --config convert.hg.tagsbranch=0 http://marshal.com/trunk/project1
initializing destination project1 repository
http authorization required
realm: crowd
user: marshal
password:
real URL is http://marshal.com/trunk/project1/
http authorization required
realm: crowd
user: marshal
password:
http authorization required
realm: crowd
user: marshal
password:
abort: HTTP Error 401: Authorization Required
- Now veer to the Python tool for Hg, which requires Python 2.5+ (already included on Ubuntu 8.1+) & SVN.Do the following:
Best match: hgsvn 0.1.6# svn not installed by default
sudo apt-get install subversion
# easy_install not included in Python package by default
sudo apt-get install python-setuptools
# download & install hgsvn
sudo easy_install hgsvn
Downloading http://pypi.python.org/packages/2.5/h/hgsvn/hgsvn-0.1.6-py2.5.egg#md5=8d15f42a8f4cb8516e219b7952bd9607
Processing hgsvn-0.1.6-py2.5.egg
Moving hgsvn-0.1.6-py2.5.egg to /usr/lib/python2.5/site-packages
Adding hgsvn 0.1.6 to easy-install.pth file
Installing hgimportsvn script to /usr/bin
Installing hgpullsvn script to /usr/bin
Installed /usr/lib/python2.5/site-packages/hgsvn-0.1.6-py2.5.egg
Processing dependencies for hgsvn
Finished processing dependencies for hgsvn
- The real staff:
* svn 'info' '--xml' 'http://marshal.com/trunk/project1'hgimportsvn http://marshal.com/trunk/project1
Password for 'marshal':
Then the program froze after you typed the password. (Well, it happened to me).
So I have to manually run:
And key in the user name/password there, it passed.svn info http://marshal.com/trunk/project1
- Import SVN project again:
This will import SVN's project1 into current directory and no authorization required any more.hgimportsvn http://marshal.com/trunk/project1
pulls all SVN history. Then the daily use of mercurial starts...cd project1
hgpullsvn
2 comments:
Just when "hg convert" bailed on me big time :) Thanks a lot for this!
Thanks a lot, very helpful
Post a Comment