- I have create a local directory, and made some sub-directories and file in it.
- registered by project on code.google.com/hosting
- install Mercurial and did
hg init
- copied the auto-generated password from Google, still don't know for what.
Now how do i upload files my local to the repository on Google. Tired googling a lot, almost all the information is available for SVN users.
Do i have to create a branch on mercurial first. I am sorry if it is too silly, but how do I create one, the site does say anything create or upload or add.
Can anyone please share, how he started/uploaded his project?
pgs is entirely correct. When you create a project at Google (or other hosting services), they will create a repository for you. You need to copy over your code, add it / commit (after tweaking
.hgignore
, of course!) andhg commit -Am "Inintial checkin of project"
If you try to push another repository that you create to Google, it will not work. This is because your newly created repository is not related to (derived from) the one that Google created for you. Since you don't have CLI access to Google, you can't do the usual work-around for unrelated pulls by cherry picking particular revisions.
This is frustrating when you already have a repository with history. In that case, you have to clone the empty Google repo, then
hg pull
(path / url to your repo) to get your revisions, then commit, then push. Good luck with that if you have extensive branches, be sure you have no unresolved heads before you push to Google.This is why I host my own hg repos on my own site, much less hassle.
From reading the help pages, I think you need to go to your project's Source page and clone the repository (instead of
hg init
). Then I believe you can checkin code, andhg push
it up to google.Actually, you can push into a Google Code repository without having to clone from it first. Either just do
hg push http://$projectname.googlecode.com/hg
from the local repo, or edit your .hg/hgrc and add a section like this:and then run
hg push
as usual.