Due to the fact that I am starting to need a Version Control System at home for my own work and the company I currently work for during the day could potentially benefit from a real Version Control System.
I’ve set out to do an R&D spike on what is available and would best suite the above mentioned needs.
I’ve looked at a large range of products available.
At this stage, due to my research and in talking to some highly regarded technical friends and other people about their experiences with different systems, I’ve narrowed them down to the following.
Subversion, Git and Mercurial (or hg)
Subversion is server based.
Git and hg are distributed (Distributed Version Control System (DVCS)).
The two types of VCS and some of their attributes.
Centralised (or traditional)
- Is better than no version control.
- Serves as a single backup.
- Server maintenance can be time consuming and costly.
- You should be able to be confident that the server has your latest changeset.
- Maintenance needs are significantly reduced, due to a number of reasons. One of which is… No central server is required.
- Each peer’s working copy of the codebase is a complete clone.
- There is no need to be connected to a central network. Which means users can work productively, even when network connectivity is unavailable.
- Uses a peer-to-peer approach rather than a client-server approach that the likes of Subversion use.
- Removes the need to rely on a single machine as a single point of failure.
Although it is often a good idea to have a server that is always online and ready to accept changesets.
As you don’t always know whether another peer has accepted all your changes or is online.
- Most operations are much faster than the centralised model, as no network is involved.
- Each copy of the repository effectively acts as a remote backup. Which has multiple benefits.
- There is no canonical code base, only working copies.
- Operations such as commits, viewing history and rolling back are fast, because there is no need to communicate with a central server.
- A web of trust is used to merge code from disparate repositories.
- Branching and Merging made easier.
- No forced structure: a central server can be implemented or peers can control the codebase.
- Although I don’t see huge benefits for a central server in my target scenario.
- Buddy builds. A team member can pass a change set to another member to try before committing to a central location.
This would stop broken CI builds.
- There is a huge amount of flexibility with your layout.
- With a well planned layout a Distributed Version Control System can do anything a Centralised system can do, with the additional benefit of easy merges.
In weighing up the pros and cons of distributed versus the centralised model.
I think for my target requirements,
a distributed system has more to offer in the way of time savings and hardware savings.
This page has a good explanation of the differences between Centralised and Distributed.
Here is a detailed list of comparisons of some of the more common systems.
Mercurial is ticking quite a few boxes for me.
Mercurial has a VisualStudio plug-in.
There is a GUI available for windows platforms and others that integrates Mercurial directly into your explorer.
It’s free, open, and being actively maintained.
Projects using Mercurial.
Mercurial is written in Python, which is another plus for me.
Binaries are freely available for Windows, GNU/Linux, Mac OS X, OpenSolaris.
The source is also available, so you can build it for most platforms.
Installation and Configuration. Covering Windows, Debian and more.
TortoiseHg has binaries for windows and debian, but only for Squeeze onwards by the look of it.
If your running Lenny, you can just use hg. apt-get install mercurial.
When I downloaded and installed the 64 bit version of TortoiseHg (v1.1.3 hg v1.6.3), it came with 4 comprehensive documents.
- Mercurial: The Definitive Guide 2010-02-21 as pdf
- TortoiseHg v1.1.3 Documentation in both pdf and chm
- Mercurial Command Reference
Turn off the indexing service on the working copies and repositories, and exclude them from virus scans.
Can also get TortoiseHg here (For Debian, TortoiseHq isn’t available for Lenny).
Click the Tutorial link for the Quick start guide to TortoiseHg.
Once installed, start working through the following links.
Comments or thoughts?