Thursday, July 09, 2009

migrating SVN history to Mercurial in BitBucket

I started setting up a Mercurial server tonight using and I got pretty far in and realized there was still a long way to go and I would only have a partially working solution. The easier way to test Mercurial for our team would be with BitBucket. The steps I did to create my own server are shown below just for historical reasons.

BitBucket supports private projects, has the Web interface for Hg already set up, and has a wiki and bug tracker available. I created an account (traditional because I couldn't get my OpenID URL working - I'm slow), set up a private repository, and then 'pushed' in our existing source.

$ mkdir buckets
$ hg convert svn+ssh://[my svn server].org/svn/buckets buckets
$ cd buckets
$ hg push https://[my username][my username]/[my private repo]

At this point, the BitBucket Overview and my private news feed show the repo history. Good stuff!

What I was doing...

$ wget
$ sudo rpm --import
$ sudo rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
$ sudo rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm
$ sudo yum install mercurial
$ sudo yum install httpd
$ cd
$ wget
$ tar xzf Mercurial-stable-branch--*.tar.gz
$ sudo mkdir /var/www/cgi-hg
$ sudo cp Mercurial-stable-branch--*/hgwebdir.cgi /var/www/cgi-hg && sudo chmod +x /var/www/cgi-hg/hgwebdir.cgi
$ sudo vi /etc/httpd/conf.d/hg.conf
ScriptAliasMatch ^/hg(.*) /var/www/cgi-hg/hgwebdir.cgi$1

<Directory /var/www/cgi-hg/>
Options ExecCGI FollowSymLinks
AllowOverride None
$ sudo touch /var/www/cgi-hg/hgweb.config
$ sudo /etc/init.d/httpd start
$ sudo chmod 755 /var/log/httpd

No comments: