Zaki Aziz
Zaki Aziz

Reputation: 3852

Adding files to a mercurial controlled repository

I've recently started using mercurial (it's actually my first experience with version control) but having a very hard time wrapping my head around the concept. But thats another issue...

What I needed help with was adding files I have on my computer to a repository. I am currently trying to host my source on bitbucket and have tortoiseHG installed. I use Aptana as my IDE, and use the terminal in Aptana. I have a piece of PHP software written that I want to deploy. I added all the file to be committed via the terminal in Aptana. E.g. hg add index.php ...

After adding all the files I enttered hg commit and then a notepad popped up with all the files that were added to the queue to be committed. After closing out of there the terminal tells me the operation was aborted. This is the exact message I receive:

$ hg commit
abort: empty commit message

I am very new to this and I have no idea what is going on. What am I doing wrong?

Upvotes: 3

Views: 731

Answers (2)

Lazy Badger
Lazy Badger

Reputation: 97270

If you have already TortoiseHG, you can get better and faster (I hope) results, if will use Workbench for all Mercurial-related tasks

Another idea is to have and use Aptana-Mercurial integration (Aptana Studio, if it matter)

Upvotes: 0

Nikolay
Nikolay

Reputation: 163

You need to write commit message. After notepad popped out you see something like:

HG: Enter commit message.  Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: root@localhost
HG: branch 'default'
HG: changed src/messaging.js

You should leave message before lines starting with "HG:". For example:

Mercurial rocks!
HG: Enter commit message.  Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: root@localhost
HG: branch 'default'
HG: changed src/messaging.js

Another way to commit is to execute:

$ hg commit -m '<message here>'

Upvotes: 6

Related Questions