How to initialize google-code project in Mercurial

3.8k Views Asked by At

I have started a Mercurial based project on google code. I have worked in subversion for sometime, but I am confused with what to do what in Hg.

I would like help on the following:

  1. How do I initialize project (first on my local machine) (then from my local copy to google's server)
  2. How do I get my copy of a build from the server
  3. How do I update(merge/sync) my local changes back to the server

My project is in PHP and I am using netbeans

5

There are 5 best solutions below

1
On BEST ANSWER

Both barkmadley and RC touch on it, but what you're explicitly missing is that your order is wrong in step one. Create the empty repo on google, clone it to local, and then commit locally and push. Don't try to create it locally and then push to google. There's nothing inherently wrong with the idea of doing it that way, but it's not the workflow for which google is set up.

0
On

Hg Book should help.

when you create a project you can select the version control system used.

from there you should be able to get hg clone instructions from google code on the downloads tab.

this will give you an initial checkout of the system. Then you copy your work into it, and hg push and hg pull to sync between the google repository. To save changesets to your local copy use hg commit

0
On

Here's some infos:

  • For #1: initialize the project on google-code, then clone the repository locally (hg clone ...), add you files to the directory created by the clone process and commit that (hg commit -m 'your message' then push (hg push).
  • For #2: see #1
  • For #3: to update you local copy (hg pull -u) and to commit your change hg commit followed by hg push

As mentioned by barkmadley, Hg Book is worth reading

0
On

Try reading this user contributed wiki. It is quite straigtforward I reckon.

0
On

For what it's worth, I wrote a blog post about Managing a Google Code project with Mercurial