views:

926

answers:

2

We are using a Subversion server at my job for source control. I was thinking that rather than keeping up with my own branch, I would run Mercurial on my workstation, commit locally, and then commit to the Subversion trunk whenever I’m done with whatever feature I’m working on.

From my understanding of DVCS this is theoretically possible. Can anyone offer reference to any tutorials on this specific type of integration, or point to any tools that will make such a process as seamless as possible?

+4  A: 

Have you looked at http://www.selenic.com/mercurial/wiki/index.cgi/WorkingWithSubversion ?

Marcus Lindblom
A good reference. Thanks for the reference. Unfortunately it seems that feature is not yet mature. The relevant web pages say "not yet ready for production use". I tried it on my Ubuntu Jaunty box, and got an error message about encoding (a known bug it seems).
Craig McQueen
Hm. Too bad. Git has better support for svn integration, if you're just looking for DVCS<->SVN workflow.
Marcus Lindblom
+3  A: 

You should really give hgsubversion a try, despite the warning. It is the only two-way bridge between Subversion and Mercurial.

When I tried it months ago it worked very well and there has been a lot of development done sine. That is why the extension is tracking the development version of Mercurial (hence the error about encoding in the comment above).

Luckily, Mercurial is very easy and non-intrusive to install. Download the latest Mercurial, unpack it and run

% make local

That will compile the C modules. Then symlink hg into your path and add the present working directory to your PYTHONPATH:

% export PYTHONPATH=$PWD:$PYTHONPATH

Now install and active hgsubversion. When Mercurial 1.3 is released on July 1st you can just use that version. I believe hgsubversion will then make a stable repository and track the stable Mercurial releases.

Martin Geisler