Take the 2-minute tour ×

http://mercurial.selenic.com/guide/ please visit this link.....right now i successfully install mercurial but next step not i am clear.....

Initialize the project

Now you add a new folder in which you want to work:

$ hg init project

Add files and track them

$ cd project
$ (add files)
$ hg add
$ hg commit
(enter the commit message)

add file means i dont know...can u explain please

now i am using ubuntu....

mercurial installation step1:

embdes@embdes-laptop:~$ sudo apt-get install mercurial
[sudo] password for embdes: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mercurial is already the newest version.
The following packages were automatically installed and are no longer required:
libopenal1 wavpack kdelibs4c2a libdc1394-22 mppenc vorbis-tools libxvidcore4
libldns1 libsvga1 kdelibs-data mplayer kdemultimedia-kio-plugins liblualib50
libkcddb4 mp3gain vorbisgain speex libmp3lame0 faad libavahi-qt3-1 icedax
freepats ffmpeg libao2 liblzo2-2 libavfilter0 flac libev3 timidity libqt3-mt
liblua50 timidity-daemon libunbound2 libavdevice52
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 261 not upgraded.


embdes@embdes-laptop:~$ hg init project
abort: repository project already exists!
embdes@embdes-laptop:~$ cd project
embdes@embdes-laptop:~/project$ hg add
embdes@embdes-laptop:~/project$ hg commit
nothing changed
embdes@embdes-laptop:~/project$ hg init
abort: repository . already exists!

This is the output from my commandline. Please correct me if I have done anything wrong. The android project I develop will reside in the following directory,


The following is the android sdk directory


how to install mercurial? how to use android engine example project in my eclipse?

I am new in using commandline, so please help me in clearing above two doubts.


share|improve this question
add comment

4 Answers

You need to create files that are going to be version controlled. It is that simple.

share|improve this answer
ok how to create files please tell me... I am not familiar in command line... –  raja Mar 2 '11 at 6:29
@raja, you don't have to create them on the command line. Use your editor of choice to do so, and simply save the files to that folder. –  Matthew Flaschen Mar 2 '11 at 6:30
add comment

You will find a full step-by-step tutorial at hginit

enter image description here

For instance, after an hg add, you need an hg commit:

There’s still one more step… you have to commit your changes. What changes? The change of adding all those files.

Why do you have to commit?
With Mercurial, committing says “hey, the way the files look right now—please remember that.” It’s like making a copy of the whole directory… every time you have something that you’ve changed that you sorta like, you commit.

share|improve this answer
ok but now i am using ubuntu.... –  raja Mar 2 '11 at 6:47
@raja: the editor will change, the commands won't: see selenic.com/mercurial/hgrc.5.html#ui : default $EDITOR or vi. –  VonC Mar 2 '11 at 6:48
add comment

When you issue the init command you are telling mercurial to track changes within the directory for a list of files... with the add command you tell mercurial which are these files.

By issuing the add command without any parameters you're telling mercurial to revision-control ALL the files within the "project" directory (recursively).

At any given time you can "forget" a file... and it will still be within "project" (directly or not) but mercurial won't care about any changes to the file.

share|improve this answer
add comment

You have to first get a basic understanding of what mercurial is for. Mercurial is a version control system which can store the changes you make your files. In your commandline output it is obvious that you have no files inside the,


directory. That means you have made no change. Then what will mercurial store?? So only it says nothing has changed. You just create new files or directories there. Then do hg add. You will see the difference :)

share|improve this answer
add comment

Your Answer


