Search code examples
mercurialsourceforge

How to commit to Sourceforge using Mercurial


I have directory named "Proyectos" with Django code inside.

I need to commit the project to Source Forge so my teacher can "download" all the code to his computer.

I think I should use some of these address:

http://phone-apps-djan.hg.sourceforge.net:8000/hgroot/phone-apps-djan/phone-apps-djan (read-only) 
 ssh://[email protected]/hgroot/phone-apps-djan/phone-apps-djan (read/write)

I did this on Kubuntu:

lucas@lucas-Satellite-L305:~/Desarrollo/Python/Django/Proyectos$ hg clone http://phone-apps-djan.hg.sourceforge.net:8000/hgroot/phone-apps-djan/django-mercurial

but only the folder is created.

I'm a novice and didn't find how to do this. I followed some tutorials but I can't understand a lot of concepts.

I would appreciate some assistance with this, please.

Thanks in advance.


Solution

  • Many thanks to Rob Sobers and Krtek for their answers. I finally could add all my files to SourceForge. I followed their instructions and everything went fine, although I had some minor complications.

    This is the answer to my questions step by step:

    Over the folder "Proyectos" I did:

    • hg clone ssh://[email protected]/hgroot/phone-apps-djan/phone-apps-djan and entered the password for my SourceForge account. A folder "phone-apps-djan" was created.

    • hg add after I cd into phone-apps-djan and copied all the files of my project into that folder.

    • hg commit. There was an error at this point: abort: no username supplied (see "hg help config"). So I created a file named .hgrc in my home dir and added these lines:

      [ui]
      username = my username at sourceforce <the mail address I supplied when registering>
      verbose = True
      

    Then I re-entered hg commit.

    • hg push. The follow error message was displayed: abort: repository default-push not found!. Then I just re-edited the .hgrc file created on the last step and added:

      [paths]
      default = ssh://[email protected]/hgroot/phone-apps-djan/phone-apps-dja
      

    I really don't understand what happened here because the .hg directory in my repo already contains a hgrc file with that path :(. Anyway, I did hg push again.

    And that was all.