Who likes mercurial? I do. Lately, I even started using mercurial as a client for subversion repositories. Let me describe the hgsubversion installation steps that worked for me; on my laptop that is boldly supplied with The Only Right operation system…
I heavily borrow from excellent entry by Ben Collins-Sussman and from outrageously diligent post by Dave Cameron. I want to focus on the smallest possible installation routine on windows. Also, I want to emphasize that you don’t have to build anything on windows. All the prepackaged installables or binaries are ready, waiting for you to grab them.
Oh right, here are the steps that worked for me:
- Install svn
- Install python
- Install python svn bindings
- Install mercurial
- Clone hgsubversion
- Configure hgsubversion extension
- Start cloning svn repos!
- Understand the gotchas
- Stay happy
1. Install svn command line client and put it on path. I downloaded, unzipped and PATH’ed svn 1.6.5.
Your cmd should react nicely to: svn help
2. Install python. I installed Python 2.6.2. Your cmd should happily execute: python -V
3. Install svn python bindings. I installed svn-python 1.6.5 py2.6. Your cmd should print ‘6′ when you execute:
python -c “import svn.core; print svn.core.SVN_VER_MINOR”
4. Install mercurial. I installed TortoiseHg (mercurial + tortoise). Your cmd should nicely take: hg version
hg clone http://bitbucket.org/durin42/hgsubversion SomeFantasticFolder
In my case SomeFantasticFolder is c:\projects\open-source\hgsubversion. At the moment I cloned hgsubversion the tip was the changeset 500.
6. Configure hgsubversion extension. Add extensions to your USER_HOME/.hgrc, which on windows is Documents and Settings\SomeFabulousName. In my case SomeFabulousName is sg0897xxx (after years in IT industry I’m still just a number…). Note that hgsubversion is duplicated at the end – that’s fine. Your .hgrc should contain something like:
[extensions] rebase= svn=c:\projects\open-source\hgsubversion\hgsubversion
Your cmd should print enabled extensions at the bottom of the screen when you do: hg help extensions
7. Start cloning svn repos! For example:
hg clone http://example-for-hgsubversion.googlecode.com/svn example-for-hgsubversion
- gotcha 1. If svn requires authentication, you may be asked to enter user/password… 3 times. Don’t worry, just enter correct credentials patiently. Three shall be the number thou shalt count, and the number of the counting shall be three. (update) Augie Fackler, the mastermind of hgsubversion points out svn+http or svn+https can be used to work around this gotcha
- gotcha 2: After updating changes from svn (hg pull, hg update) never use ‘hg merge’, instead use ‘hg rebase’. Merges are not yet supported by hgsubversion I heard. If you accidentally do hg merge you probably have to rollback the merge in order to push.
- gotcha 3: I’m not a mercurial expert so feel free to comment & give feedback. Also, newer (different) versions of before mentioned installables should work as well.
9. Stay happy. Are you kidding me? You know what to do =)
Posted by szczepiq 

Posted by szczepiq
Posted by szczepiq 



