Once you have a Mercurial client installed on your local system, you can check out code and check it back into your project repository. The following instructions for command-line Mercurial should get you started. For full instructions on using Mercurial, see http://hgbook.red-bean.com/.
Note: Because of better security and better handling of large files, it's best to use the SSH protocol to check files into your project repository. Before using SSH with Project Kenai, you have to generate an SSH key pair and save the public key to the SSH Keys tab in your user profile. For more information on generating SSH keys, see Generating an SSH Key.
- To initially set up your kenai.com repository, you need to know the name of the project and the name of the source repository. For example, for a project named bluebird with a Mercurial repository named bluebird~mercurial-code-repository, the secure read-write URL would be:
- Change directories to where you want your new hg repository directory to be created, then do the initial clone and create:
> cd ~
> hg clone ssh://firstname.lastname@example.org/bluebird~mercurial-code-repository bluebird-hg
- Change directories to the new directory:
> cd bluebird-hg
- Copy a file to the local working copy and then add it in hg.
> cp ~/myjavafiles/helloworld.java helloworld.java
> hg add helloworld.java
- Commit the file to the local repository.
> hg commit -m"First commit to bluebird repository" helloworld.java
- Pull any changes from the server repository:
> hg pull
- Update the local working copy:
> hg update
- Check the file into your project repository on the server:
> hg push
- When the system accepts your entries, you see the following responses for the initial helloworld.java checkin:
adding file changes
added 1 changesets with 1 changes to 1 files