21

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?

Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
Mark Roddy
  • 27,122
  • 19
  • 67
  • 71

2 Answers2

8

Have you looked at this page in Mercurial wiki ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Macke
  • 24,812
  • 7
  • 82
  • 118
  • 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 May 01 '09 at 02:18
  • Hm. Too bad. Git has better support for svn integration, if you're just looking for DVCS<->SVN workflow. – Macke May 01 '09 at 08:49
5

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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Martin Geisler
  • 72,968
  • 25
  • 171
  • 229