At Sony we're looking for a distributed version control system to replace Subversion—primarily Git and Mercurial. I'm very familiar with Git but hadn't done much with Mercurial so it seemed like a good idea to use it for a couple of weeks and learn the quirks. Since I'm stuck using Subversion I decided to see if it would be feasible to use Mercurial as a "super client" working locally then pushing changes back to svn. A little Googling turned up two candidates hgsvn and
hgsubversion. hgsubversion extends the commands pushing and pulling changes, giving a more native experience, so it seemed like the best choice for learning the system.
The setup is actually pretty simple but I'm documenting it for my own future reference.
Use MacPorts to Install hgsubversion:
sudo port install py26-hgsubversionEnable the rebase and hgsubversion extensions:
printf "[extensions]\nrebase=\nhgsubversion =\n" >> ~/.hgrcCheck that the extension was enabled:
hg help extensionsIt should list something like:
enabled extensions:
hgsubversion
integration with Subversion repositoriesNow you're good to checkout from SVN (note: using the svn+ prefix in the URL lets you use passwords stored in your keychain):
hg clone svn+http://example.com/svn/repo/trunkI actually ran into an issue where the clone was exploding with a stack trace. The bug had been fixed in 1.1.2 but MacPorts hadn't yet been updated so I rolled a patch to update it.