Background
There are many source code versioning tools. Some of them which I have previously used are perforce(p4), git, svn. There are more like cvs, mercurial and the list goes on.... In this post we will see how to install and configure mercurial.
Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface. (official site)
Mercurial is a cross-platform, distributed revision control tool for software developers. It is mainly implemented using the Python programming language, but includes a binary diff implementation written in C. It is supported on MS Windows and Unix-like systems, such as FreeBSD, Mac OS X and Linux. Mercurial is primarily a command line program but graphical user interface extensions are available. All of Mercurial's operations are invoked as arguments to its driver program hg, a reference to the chemical symbol of the element mercury. (More on Wiki)
Installation
You can easily to the installation using a package manager
sudo apt-get install mercurial
But for me it installed a very old version (2.0.2) which is clearly not the way to go. So you can install the latest version as follows -
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial
sudo easy_install -U mercurial
This installed the latest version for me (3.0.1). You can view the version installed by
hg version
Configuration file for the same can be found in /etc/mercurial/hgrc. You can edit it to suit your requirements.
I have added external diff program called kdiff3 ( How to Install Kdiff3 on Ubuntu ). So my hgrc file contents are as follows
I have added external diff program called kdiff3 ( How to Install Kdiff3 on Ubuntu ). So my hgrc file contents are as follows
# system-wide mercurial configuration file # See hgrc(5) for more information [merge-tools] kdiff3.args=--auto -L1 base --L2 local --L3 other $base $local $other -o $output kdiff3.regkey=Software\KDiff3 kdiff3.regappend=\kdiff3.exe kdiff3.fixeol=True kdiff3.gui=True