This year I had the fortune of being able to try out some modern Distributed Version Control Systems. Both Git and Mercurial that are distributed were very appealing to me. Since it seemed that Mercurial might be easier to learn, a decision was made that the current project should use just that, Mercurial.
All nice and sweet in the beginning. A free, private repository at BitBucket worked great for the first period when all we did was tech tryouts and learning. After a honeymoon it was time to get serious and we had to switch from cloud repository to an IT department controlled and backup enabled server as a main repository.
Since we’re working with Linux but the other 99% of the business works with windows the IT department demanded that our server should be a windows server. How hard could it be? On Linux it was a snap to set it up!
Two+ days later and a lot of teeth grinding we’re back to Subversion for the whole lot of us…
First: Another group needed a Subversion setup on that same server. OK 30 minutes later, tops, it was up and running thanks to the awsome (and free) VisualSVN server.
Second: Install Mercurial, and try to put up a https access through IIS. Two days later I gave up. All the tutorials, blogs etc were outdated, referring to Mercurial 1.5.1 or earlier and I just couldn’t get the damn thing up and working. For those who might be interested these are the blogs that I followed:
- StackOverflow (2009): How to setup Mercurial and hgwebdir on IIS? (with referenced links)
- Vampire Basic’s blog (2009): Running Mercurial on Windows
- Germán Schuager’s blog (2010): How to setup Mercurial server on Windows/IIS
I think it was just too many steps that could go wrong. IIS on a windows server is probably easy if you’ve worked with it before. If you haven’t it’s a piece of non-intuitive junk. IMO. Apparently I’m not the only one who has these problems judging from all the hits I got when I googled for the solutions.
In the end I got the http and https to work for cloning and browsing at the server but from another computer only the http was shown, https always timed out and push never worked either on http or https (server and outside server).
Third: Since the VisualSVN server was already up and running I figured that the Apache running the publishing and access control of that repository could be used for Mercurial as well. StackOverflow: Hosting Mecurial HG via VisualSVN Server gave me hope that this could be done. Wrong. It didn’t matter. Whenever I did a restart of the VisualSVN server it always crashed. 3 hours later I figured it wasn’t worth it let’s just use the simplest method possible.
Fourth: Just using hg serve on the windows server and worry later about how to work out the IT security details with the IT department once it was up and running. Joel on Software’s tutorial was great with very good instructions for repository setup.
Nah. This didn’t work either. It simply refused to play ball. Now http was not even available from outside the server to the other computers. A desperate proxy issue inquiry to the IT-department was met with the wall of silence (sigh) so I gave up this appealing solution pretty fast.
.. So what now? Let’s go super simple. Let’s go medieval although maybe not so safe from a user mess-up point of view.
Fifth: Using a shared folder on Windows for the hg repository. The downside is that it’s not as “safe” to use since user’s have full access to the shared folder and not through a Mercurial command restricted environment — i.e. they could potentially mess it up unintentionally since direct access to the shared folder was given.
Easy to setup on the windows server, just needed to add the users in question. Easy to setup on the Linux side with automatically mounted directories to the shared repository. Reading writing to the shared folder without using Mercurial worked like a snap.
hg clone worked like a snap. hg push from Linux to Windows did not work at all. Operation aborted kept coming up. Googling found that Mercurial, mounting to windows and Cifs has issues when it comes to hard links. Apparently that should already be fixed in Mercurial 1.7.1 but to me it appeard to be still obvious and ongoing issues with it.
Sixth: Enough with this nonsense. If it takes 2.5 days and it still doesn’t work than that’s it. Setup of 2 more repositories on the already running VisualSVN server took 30 minutes. And that included cloning the existing Mercurial repositories on BitBucket, restructuring them and committing them to the new Subversion repositories, writing a quick Howto to the rest of the team and starting the water boiler for a cup of tea.
I hope to be able to use Mercurial or Git on other projects. If it’s an all Linux environment then I wouldn’t hesitate a bit since distributed VCS seems to be the future but for mixed OS:es I think I stick with subversion for now.