views:

1084

answers:

5

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

+1  A: 

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

barkmadley
+2  A: 

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

RC
+3  A: 

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.

Ry4an
The username/password for logging in can be found on your google code settings page (https://code.google.com/hosting/settings) --this tripped me up, so I thought I'd share.
nlucaroni
A: 

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

jpartogi
+1  A: 

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

Andreas Grech