Tuesday, December 14, 2010

Ok if you reached this page I can imagine your frustration.You wasted reading the official guides for using mercurial and google code and finally realized that all that was a waste of time.If that is the feeling then you reached the right page.

Let us go straight to work without wasting your time.(I had wasted a lot of time when I started)
This is your first time to using any sort of version control system and you do not want to read ugly man pages (in fact most of the man pages were pieces of crap written in 1960's or 70s).

First create an account with Google Code (which you might have done that is why you are reading this guide)

Then you run following command in an empty subdirectory

hg clone https://yourproject.googlecode.com/hg/ yourproject

you will see a directory yourproject now.

Inside this you will see a .hg directory which has hgrc file.
So

vi testproject/.hg/hgrc

is the file you might have been wondering on internet as how to use.

Now copy your code in what ever location from your laptop to this directory
i.e.

bash$ cp -rv /whereever/your/code/on/laptop/ testproject/

now

cd testproject

then

hg add ./*

and then hg push this the command that you should do so that the code on your laptop can be seen on internet on Google code.

Right upto here if every thing was Ok then

hg commit -A

after some conversation with this command you should be fine.

Here is a good linkhttp://www.trisis.co.uk/blog/?p=580
which told me when you run
hg push then the password that you will enter is not the same as the password you use on gmail.
excerpts from the above link

"This will prompt you for a user name and password, the password IS NOT YOUR DEFAULT PASSWORD. Go to your accounts hosting page to find it."
the link to find your password is