Skip to main content
This revision made November 08, 2010 00:40, by kenaiadmin
« earlier revision revert to this « later revision

Using CVS on UNIX and Mac Systems

Once you have a CVS client installed on your local system, you can check out code and check it back into your project repository. Kenai supports only SSH-based access. For full instructions on using CVS, see http://ximbiot.com/cvs/manual/.

Using SSH With Command-Line CVS

  1. 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.
  2. By default, CVS attempts to use the BSD remote shell protocol to operate on remote repositories. To enable the use of SSH instead, set the environment variable CVS_RSH to ssh:
    > CVS_RSH=ssh ; export CVS_RSH
  3. To check out the source code for a project, 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 repository named cvs, the CVSROOT for SSH access to the repository would look like this:
    :ext:<your-username>@java.net/cvs/bluebird~cvs
  4. Change directories to the location on your local machine where the repository will be checked out. For example:
    cd ~/bluebird
  5. Check out the server repository into a new directory.
    > cvs -d:ext:<your-username>@java.net/cvs/bluebird~cvs co .
  6. Copy a file to the local directory and then add it in cvs.
    > cp helloworld.java ~/bluebird-cvs
    > cd ~/bluebird-cvs
    > cvs add helloworld.java

    You should see the following acknowledgment, which means that the file has been added and is ready to be checked in:
    cvs add: scheduling file `helloworld.java' for addition
    cvs add: use 'cvs commit' to add this file permanently
  7. Update your local working copy (in case someone has checked files in while you were working):
    > cvs update
  8. Check the file into your project repository on the server:
    > cvs commit -m "First commit to bluebird repository" helloworld.java
  9. When the system accepts your entries, you see the following responses for the initial helloworld.java checkin:
    RCS file: /cvs/bluebird~cvs-repo/helloworld.java,v
    done
    Checking in helloworld.java;
    /cvs/bluebird~cvs-repo/helloworld.java,v <-- helloworld.java
    initial revision: 1.1
    done
Difference compared to previous revision
# 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]]. # By default, CVS attempts to use the BSD remote shell protocol to operate on remote repositories. To enable the use of SSH instead, set the environment variable CVS_RSH to ssh:
> CVS_RSH=ssh ; export CVS_RSH # To check out the source code for a project, 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 repository named cvs, the CVSROOT for SSH access to the repository would look like this:
:ext:"<your-username">@java.net/cvs/bluebird~cvs # Change directories to the location on your local machine where the repository will be checked out. For example:
cd ~/bluebird # Check out the server repository into a new directory.
> cvs -d:ext:"<your-username">@java.net/cvs/bluebird~cvs co . # Copy a file to the local directory and then add it in cvs.
> cp helloworld.java ~/bluebird-cvs
> cd ~/bluebird-cvs
> cvs add helloworld.java

You should see the following acknowledgment, which means that the file has been added and is ready to be checked in:
cvs add: scheduling file `helloworld.java' for addition
cvs add: use 'cvs commit' to add this file permanently # Update your local working copy (in case someone has checked files in while you were working):
> cvs update # Check the file into your project repository on the server:
> cvs commit -m "First commit to bluebird repository" helloworld.java # When the system accepts your entries, you see the following responses for the initial helloworld.java checkin:
RCS file: /cvs/bluebird~cvs-repo/helloworld.java,v
done
Checking in helloworld.java;
/cvs/bluebird~cvs-repo/helloworld.java,v <-- helloworld.java
initial revision: 1.1
done
 
 
Close
loading
Please Confirm
Close