0
Mercurial is an SCM( Source Control Management ) system designed for software developers to efficient handling of very large distributed packages. It keeps all the history of changes and modifications of an project. It is developed in Python. It is easy to use.

Installation :

For Ubuntu based distro users

sudo apt-get install mercurial

For Fedora users

sudo yum install mercurial

For OpenSUSE users

sudo zypper install mercurial

For Gentoo users
 
sudo emerge mercurial

Working on Version Control System :

First create new directory to configure the repository of the version of the program. So just create new directory by,

mkdir hg

Move to this hg directory by

cd hg

Just create some program files or text files. Here i'm gonna  to create a.txt file

gedit a.txt

Then type anything in this files, save it and close it.

After the file creation, Create repository of your hg directory by

hg init

Then add a.txt file to version tracking system by

hg add a.txt

Now save the current position of the file details using commit command.

hg commit -u author -m "message"

When you saved the current position, open the same file and edit it by adding or deleting some texts in it, save it and close it.

Now check the changes of the file contents by

cat a.txt

It will show the a.txt file contents after you modified.

If you wanna to go to previous version, then just revert it by

hg revert a.txt

Now check the file contents by

cat a.txt

it will show the previous version contents.

Check the log file details by

hg log

Check the differences between two versions by

hg diff --rev 0:1

That's all. Enjoy. I hope you got some basic ideas of working on Version control system.  If you wanna to know more details check the links given below.

LINK 1

LINK 2

Post a Comment

 
Top