In general the combination has been pretty awesome. Almost all our problems have stemmed from already being familiar with Subversion and treating Mercurial as if it should work the same.
The migration process
We wanted to migrate our Subversion repository (with all its projects and version history) into Mercurial. This is perfectly possible but not always painless.
The first thing to note is that you are best making a separate repository for each project, unlike Subversion where you have lots of projects in a single repository. Fogcreek provide a free (Windows only) migration tool. The tool is a little flakey but the Fogcreek support was brilliant (and they know the pitfalls in the process/utility) so I would recommend contacting them if you need any help.
Version control in action
As seasoned Subversion users we are probably still using Mercurial in a very Subversion-like way. Mercurial gives us a repository on our local machines as well as the remote server. We push or pull changes from the local repository to the server and then update or commit any code changes we have made. So my usage of Mercurial is pretty much:-
1. Pull from server to ensure aligned and update
2. Write some code.
3. Commit my changes to local repository.
4. Pull and update from server
5. Merge any changes in my local repository.
6. Push changes back to server.
One thing which can confuse is that when you do a merge you may suddenly see some new commits or conflicts appear. You revert these, thinking that there is something wrong (after all you did not actually edit any code). This is a mistake! These are the changes being rolled in – just resolve/commit or you will lose code.
How does Kiln work in daily usage?
Kiln is very slick and the code review feature is very good. It is also fantastic to be able to link code commits to cases in Fogbugz. You can use Mercurial from lots of development environments, and integrate nicely with your bugtracking in Fogbugz. If you do not use Fogbugz, it still offers a very slick and polished web front end on Mercurial.
Mercurial and Java
We do all our development in Java using Eclipse, NetBeans and IDEA. All three have some support for Mercurial. IDEA’s support is very disappointing – there is a bug in the plugin so you cannot see the code commits and so we have stopped using IDEA for development. I would love to see better Mercurial support as IDEA is an awesome development tool (unless you are using Mercurial).
NetBeans has much better support but seems to have decided to use different terms to the standard Mercurial. As we are beginners, we wanted as little confusion as possible.
Eclipse has good Mercurial support but it seems to be very slow 🙁
We are still very much beginners with Mercurial, but the added value we can already see from using it makes it a worthwhile transition. I am sure there will be plenty of material for another post before too long.
IDRsolutions develop a Java PDF library, a PDF forms to HTML5 converter, a PDF to HTML5 or SVG converter and a Java Image Library that doubles as an ImageIO replacement. On the blog our team post about anything interesting they learn about.