CVS (Concurrent Versioning System)

CVS (Concurrent Versioning System)

The CVS integration included in GForge AS allows for full integration with GForge, including: creating blank repositories when a Project is created; adding users and groups to the Perforce repository so the users can commit changes to code; enforcing the requirement of a Tracker Item ID on commit if chosen by the Project Administrator; linking commits to Tracker Items, so the changed files and other commit information displays on the Commits tab of the Tracker Item; emailing differences of commits to the commits mailing list if the Project Administrator chooses; and displaying commits on the Activity Report for the Project.

The CVS tab displays files, directories, and revisions that currently exist in the repository.


Access Info Directions to checkout files through an anonymous (pserver) CVS with command line instructions.

Browse This page displays the web interface for CVS. GForge can automatically create blank repositories for projects that choose to use CVS, or administrators can create an external repository and link it to GForge using the external SCM scripts provided. You can browse the repository to make quick references to the code without opening another application.

Statistics History detailing the number of commits and files added to the repository

CVS Reference Click to display the CVS user manual.

Index of Shows the directory in the repository that you are viewing.

Files Shown Number of files in the Index.

Sticky Tag You can browse the contents of a repository at a point in its past history by choosing a Sticky Tag. When set, directory and log pages only show revisions preceding the specified point in history. When a Sticky Tag refers to a branch or a revision on a branch, only revisions from the branch history are shown, including branch points and their preceding revisions.

CVS Repositories adds artificial tags HEAD and MAIN to tag listings and accepts them in place of revision numbers and real tag names in all URLs. MAIN acts like a branch tag pointing at the default branch, while HEAD acts like a revision tag pointing to the latest revision on the default branch. The default branch is usually just the trunk, but may be set to other branches inside individual repository files. CVS will always check out revisions from a file’s default branch when no other branch is specified on the command line.

Set Commits the new revision number to the database.

File Name of the file.

Rev Version of the file.

Age Age of the file.

Author User that created the file.

Last Log Entry Last time the file was updated.

Access Info

Click the Access Info to display access information to use the repository.

Browsing the CVS Repository

This page displays the web interface for CVS repositories. GForge administrators create Projects and (CVS) repositories. You can browse the repository to make quick references to the code without opening another application.

Browsing the CVS tree provides a view into the current status of this Project’s code. You may also view the complete histories of any file in the repository.

To browse the CVS repository:

  • Navigate to the Project that contains the code you desire to browse.
  • Click the CVS tab.
  • Click the Browse link.
  • Click the File name.


Statistics

Statistics displays information about the CVS of this Project.


User Developer that the Statistic is about.

Adds Number of times the developer added to the CVS.

Commits Number of commits by the user.

 Linking a Commit to a Tracker Item

Commits can be linked to a Tracker Item by referencing the Tracker Item id in the commit message. For example, this command will link your changes to Tracker Item #1000:

cvs commit -m "[#1000] linking this change to defect"

Click the Commits tab in the Tracker Item view the changed files.

 Linking a Commit to other Plugin Items

Commits also can be linked to Documents, Releases and Wiki Pages by referencing the id in the commit message preceded by any of the following section modificators

  • Documents: d
  • Release items: r
  • Wiki Pages: w

For example: cvs commit -m "[#d1000] linking this change to document"

Click the Associations tab in the Document view to see the references.

CVS over SSH for Linux

Use the Secure Shell (SSH) client program to log into a remote GForge machine and execute commands to download and upload (commit) files to GForge. SSH provides secure encrypted communications between two un-trusted hosts over an insecure network. SSH connects and logs into the specified host name with the GForge Login Name. If a command is specified, the command is executed on the remote host instead of the login shell.

    • Note: Remember that all Linux commands are case sensitive.

Configuring CVS over SSH for Linux

To communicate using your Linux Shell account to communicate to the CVS server where the code resides, you must generate an SSH Key to communicate with your GForge Account.

To configure CVS over SSH for Linux:

  1. Login to your GForge Account.
  2. Launch the Linux Command Line in your Linux Shell account to generate a SSH Key for authentication.
  3. Type ssh-keygen -b 1024 -t dsa and press <Enter>. -b command is optional with the default of 1024 bit and -t dsa is the type of key to generate.


  • Press <Enter> twice to use the default file in which to save the key and not use a passphrase. The SSH Key is generated.
  • Type less .ssh/id_dsa.pub and press <Enter> to view the SSH Key fingerprint that was generated.


  • Select the SSH Key and select Copy.


  • Select your GForge Account > My Stuff tab.
  • Click the Edit SSH Keys link.
  • Select Edit > Paste in the Authorized keys field to copy the SSH Key into your GForge Account.
  • Remove all extraneous line breaks except for the spaces and click the Update button.
  • Note: Spaces appear at the beginning of the SSH Key (ssh-dss) and at the end of the SSH Key before your Login Name.
  • Launch your Linux Command Line after the cronjob has run (1 hour), which enables you access to the system.
  • Type export CVS RSH=ssh and press <Enter> to setup CVS to use SSH.
  • Copy the CVS RSH=ssh command and press <Enter>.
  • Type vim .bashrc and press <Enter> to copy the file so it automatically runs during login.


The bashrc file runs.


  • Copy and Paste the export CVS RSH=ssh command into the bashrc file.