Last updated November 07, 2012 19:13, by nvause
Feedicon  
[[Home|&raquo; Project Kenai Documentation and Training]] &nbsp;&nbsp; [[Howdoi|&raquo; How Do I ...]] &nbsp;&nbsp; [[SourceControl#About_Mercurial|&raquo; Source Code Management]] ==Using Mercurial on UNIX and Mac Systems== Once you have a <a href="SourceControl#About_Mercurial">Mercurial client</a> 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 [[ProfileSettings#SSH_Keys|SSH Keys tab]] in your user profile. For more information on generating SSH keys, see [[GeneratingAnSSHKey|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 <tt>bluebird</tt> with a Mercurial repository named <tt>bluebird~mercurial-code-repository</tt>, the secure read-write URL would be:<br/><tt> &nbsp;<nowiki>ssh://</nowiki>''your-username''<nowiki>@hg.kenai.com/bluebird~mercurial-code-repository</nowiki></tt> # Change directories to where you want your new hg repository directory to be created, then do the initial clone and create:<br/><tt>&nbsp;> cd ~</tt><br/><tt>&nbsp;> hg clone <nowiki>ssh://</nowiki>''your-username''<nowiki>@hg.kenai.com/bluebird~mercurial-code-repository</nowiki> bluebird-hg</tt> # Change directories to the new directory:<br/><tt>&nbsp;> cd bluebird-hg</tt> # Copy a file to the local working copy and then add it in hg.<br/><tt>&nbsp;> cp ~/myjavafiles/helloworld.java helloworld.java</tt><br/><tt>&nbsp;> hg add helloworld.java</tt> # Commit the file to the local repository.<br/><tt>&nbsp;> hg commit -m"First commit to bluebird repository" helloworld.java</tt> # Pull any changes from the server repository:<br/><tt>&nbsp;> hg pull </tt> # Update the local working copy:<br/><tt>&nbsp;> hg update</tt> # Check the file into your project repository on the server:<br/><tt>&nbsp;> hg push</tt> # When the system accepts your entries, you see the following responses for the initial <tt>helloworld.java</tt> checkin:<br/><tt>&nbsp;adding changesets</tt><br/><tt>&nbsp;adding manifests</tt><br/><tt>&nbsp;adding file changes</tt><br/><tt>&nbsp;added 1 changesets with 1 changes to 1 files</tt>

Project Features

Wiki Controls

About this Project

Help for netbeans.org Site Tools was started in November 2009, is owned by kenaiadmin, and has 17 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close