Basic commands of Mercurial
These commands are very much to the subversion. 1. Creating a repository (hg init) Create a mercurial repository in an empty directory by using the init command: [root@localhost ~]# mkdir Test [root@localhost ~]# cd Test [root@localhost Test]# hg init [root@localhost Test]# ls -lar total 12 drwxr-xr-x. 3 root root 4096 May 21 06:42 .hg dr-xr-x---. 36 root root 4096 May 21 06:40 .. drwxr-xr-x. 3 root root 4096 May 21 06:42 . Now there is an empty repository created, locally in your directory. The repository contains both a working copy, and the repository data (the history information). 2. Adding a file (hg add) Schedule a file for addition [root@localhost Test]# echo "Testing1" >>test.txt [root@localhost Test]# ls -lar total 16 -rw-r--r--. 1 root root 9 May 21 06:47 test.txt drwxr-xr-x. 3 root root 4096 May 21 06:42 .hg dr-xr-x---. 36 root root 4096 May 21 06:40 .. drwxr-xr-x. 3 root root ...