raja
raja

Reputation: 11

Mercurial usage throws error. please tell me what's wrong?

https://www.mercurial-scm.org/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:~$ 

step:2

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!
embdes@embdes-laptop:~/project$ 

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,

/home/embdes/workspace

The following is the android sdk directory

 /home/embdes/project/android/android-sdk/platform-tools/

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.

Thanks

Upvotes: 1

Views: 510

Answers (4)

tamizhgeek
tamizhgeek

Reputation: 1401

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,

/home/embdes/project

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 :)

Upvotes: 0

PedroC88
PedroC88

Reputation: 3839

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.

Upvotes: 0

VonC
VonC

Reputation: 1329292

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.

Upvotes: 1

JenEriC
JenEriC

Reputation: 758

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

Upvotes: 2

Related Questions