Consortium    Solutions    Middleware    Forge    MyObjectWeb 
ObjectWeb Consortium
Print

Advanced - Powered by Google






OpenCCM

Project Links
· Home
· Download
· Documentation
· Mailing Lists
· Wiki
· Partners
· License
· History
· Related projects

Developers' Corner
· How to Contribute
· Workplan
· Resources
· CVS Repository
· Bug Tracking
· ObjectWeb Forge Site
· User Mailing List
· Team Mailing List

About
· Team
· Contacts

How to use CVS?

This tutorial will give you short explanations for using basic functions of CVS.
We will take the example of the OpenCCM platform.

Table of Contents

  1. Getting Access to CVS
    1. Anonymous Access
    2. Developer Access
    3. Registering Authentication Key
    4. List of available modules
  2. Basic CVS Commands
    1. checkout
    2. commit
    3. update
    4. add
    5. remove
    6. Move or Rename
    7. tag
    8. release
    9. export
    10. log
  3. Interfaces for CVS
    1. CVSweb
    2. WinCVS/gCVS
    3. LinCVS
    4. Cervisia
    5. Pharmacy
    6. TkCVS
    7. jCVS
    8. SmartCVS

Getting Access to CVS

Anonymous Access

This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set.
When prompted for a password for anonymous, simply press the Enter key.

$ cvs -d:pserver:anonymous@cvs.openccm.forge.objectweb.org:/cvsroot/openccm login

The module you wish to check out must be specified as the ModuleName.

$ cvs -z3 -d:pserver:anonymous@cvs.openccm.forge.objectweb.org:/cvsroot/openccm
checkout <ModuleName>

Developer Access

Only project developers can access the CVS tree via this method.
SSS1 must be installed on your client machine.

$ export CVS_RSH=ssh # For bash shells.
$ setenv CVS_RSH ssh # For csh shells.

Substitute ModuleName and DeveloperName with the proper values.
Enter your site password when prompted.

$ cvs -z3 -d:ext:<DeveloperName>@cvs.openccm.forge.objectweb.org:/cvsroot/openccm
checkout <ModuleName>

Registering Authentication Key

To avoid having to type your password every time for your CVS/SSH developer account, you may upload your public key(s) here and they will be placed on the CVS server in your ~/.ssh/authorized_keys file.

First you have to login at the ObjectWeb Forge Page.
Click on 'Login via SSL' and check your login and password.
Then click on 'Account Options' and '[Edit Keys]' at the bottom of the page.

To generate a public key, run the program 'ssh-keygen' (or 'ssh-keygen1'). The public key will be placed at '~/.ssh/identity.pub'.

You have just to copy and paste the content of the '~/.ssh/identity.pub' file in the text area of the Debian SourceForge Site.

Now you can use CVS command without entering your SourceForge password.

Note:

  • Registration process could take 6 hours before you can be automatically authentified.

List of modules

The following list gives you the names of modules used in the OpenCCM project:

modulename description
. Full OpenCCM Project (OpenCCM platform, OpenCCM website, others modules)
openccm OpenCCM platform
site (or web) OpenCCM Web site (for documentation)
utils General utilities used in OpenCCM and other projects
browser Generic ObjectWeb Browser Framework
openccm-pat OpenCCM's Packaging/Assembling Tool

Basic CVS Commands

This part will present you the most used commands of CVS:

checkout

Requires: repository
Changes: working directory
Synonyms: co, get

Create or update a working directory containing copies of the source files specified by modulename.
You must execute checkout before using most of the other CVS commands, since most of them operate on your working directory.

Note that running checkout on a directory that was already build by a prior checkout is also permitted. So new directories that have been created in the repository will appear in your work area.

$ cvs checkout <ModuleName>

Warning:

  • checkout must be run from the top-level directory.

commit

Requires: working directory, repository
Changes: repository
Synonyms: ci

Use commit when you want to incorporate changes from your working source files into the source repository.

$ cvs commit [files]

or you could use

$ cvs commit -m "log message" [files]

Note:

  • commit will create a new version number for all committed files.
  • commit could be executed from any directory. The files concerned by the commit process will be the current directory and the sub-directories ones.
  • commit doesn't update your working directory. If you want to reconcile your work with eventual revisions, you have to run the update command.

update

Requires: working directory, repository
Changes: working directory

After you've run checkout to create your own copy of source from the common repository, other developers will continue changing the central source. From time to time, when it is convenient in your development process, you can use the update command from within your directory to reconcile your work with any revisions applied to the source repository since your last checkout or update.

$ cvs update [DirectoryName]

Note:

  • update could be executed from any directory. The files concerned by the update process will be the current directory and the sub-directories ones.
  • cvs update: conflicts found in build.xml update could fail if one of the files of your working directory is an older version than the repository one. In this case, a conflict file is created and you have to solve the conflict by yourself before running again the update process.

add

Requires: working directory
Changes: working directory

Schedule files to be added to the repository.

$ cvs add <FileName>

next you validate the modification in the repository:

$ cvs commit -m "First version"

Note:

  • The directories specified with add must already exist in the current directory.
  • The added files are not placed in the source directory until you use commit to make the change permanent.

remove

Requires: working directory
Changes: working directory

Directories change. New files are added, and old files disappear. Still, you want to be able to retrieve an exact copy of old releases.

So remove schedule file(s) to be removed from the repository.

$ rm Res1.java Res2.java
$ cvs remove
$ cvs commit -m "Removed unneeded files"

Note:

  • The removed files are not disabled in the source directory until you use commit to make the change permanent.
  • The best way to remove a directory is to remove all the files in it. You don't remove the directory itself; there is no way to do that. Instead you specify the -P option to cvs checkout or cvs update, which will cause CVS to remove empty directories from working directories.

Move or Rename

The move command is a combinaison of remove and add:

$ mv old.java new.java
$ cvs remove old.java
$ cvs add new.java
$ cvs commit -m "Moving from old.java to new.java" old.java new.java

tag

Requires: working directory, repository
Changes: repository

Sometimes, we want to define for example a stable state of the project in order to access to it later even if the state will evolve. This is a way to define a form of release version of the project.

$ cvs tag -c openccm-0-4

The tag openccm-0-4 will permit us to retrieve this state even if other tags have been defined.
The option -c tells CVS to check that no local files concerned by tag command are different from the repository ones. If one of them is different, the command failed.

For example, for retrieving an old version, you can use the command:

$ cvs export -r openccm-0-4 <ModuleName>

release

Requires: working directory
Changes: working directory, history log

Indicates that a Module is no longer in use.

This command is meant to safely cancel the effect of cvs checkout. Since CVS doesn't lock files, it isn't necessary to use this command. You can always simply your working directory, if you like; but you risk losing changes you may have forgotten, and you've abandoned your checkout.

Use cvs release to avoid these problems. This command checks that no uncommitted changes are present; that you are executing it from immediately above a CVS working directory; and that the repository recorded for your files is the same as the repository defined in the module database.

$ cvs release <directories>

The -d option deletes your working copy of the file if the release succeeds. If this flag is not given your files will remain in your working directory.

$ cvs release -d <directories>

export

Requires: repository
Changes: current directory

This command is a variant of checkout; you can use it when you want to a copy of the source for module without the CVS administrative directories. For example, you might use export to prepare source for shipment off-site. This command requires that you specify a date or a tag.

$ cvs export -r <tag> <ProjectName>

or you could use

$ cvs export -D <date> <ProjectName>

The possible options for export are:

  • -r <tag> Use revision tag (ex: openccm-0-4)
  • -D <date> Use the most recent revision no later than date (ex: 2001-05-29)

log

Requires: repository, working directory
Changes: nothing

Displays log information for files (version, date, ...)

$ cvs log [files]

Interfaces for CVS

CVSweb

CVSweb a simple Web interface for browsing CVS Repositories. You can a use diff function which shows you modifications between two versions of a same file. You can access to file annotations and file source code.

WinCVS/gCVS

WinCVS/gCVS Web site.

LinCVS

LinCVS acts as a reliable (!) graphical frontend for the CVS-client supporting both CVS-versions 1.9 and 1.10, perhaps even older ones.... It allows you to check out a module from and import of a module to a repository, to update or retrieve the status of a working directory or single files and common operations like add, remove and commit, diff against the repository or view of the log messages in list form.

Cervisia

Cervisia is a graphical frontend for the CVS client. It provides access to the following features:

  • Updating or retrieving the status of a working directory or single files. Files are displayed in different colors depending on their status, and the shown files can be filtered according to their status.
  • Common operations like adding, removing and commiting files.
  • Advanced operations like adding and removing watches, editing and unediting files, locking and unlocking.
  • Checking out and importing modules.
  • Graphical diff against the repository and between different revisions.
  • Blame-annotated view of a file.
  • View of the log messages in tree and list form.
  • Resolving of conflicts in a file.
  • Tagging and branching.
  • Updating to a tag, branch or date.
  • A Changelog editor coupled with the commit dialog.

Cervisia is distributed freely under the Q Public License.

Pharmacy

Pharmacy intends to be a GNOME compliant front-end to CVS for free operating systems, such as Linux and FreeBSD. Currently, it provides a limited user interface to CVS commands and a "console" for the lazy power-user.

TkCVS

TkCVS is a Tcl/Tk-based graphical interface to the CVS configuration management system. It displays the status of the files in the current working directory, and provides buttons and menus to execute CVS commands on the selected files. TkDiff is included for browsing and merging your changes.

TkCVS extends CVS with a method to produce a browsable, "user friendly" listing of modules in the repository. This requires that the CVSROOT/modules file actually lists some modules. Additional comment fields can be added to make the browser more informative.

TkCVS runs on Unix (including Darwin) and on Windows.

jCVS

jCVS is a CVS client package written entirely in Java.

JCVS provides a complete CVS client/server protocol package that allows any Java program to implement the complete suite of CVS operations. JCVS also provides a Swing based client that provides a commercial quality GUI client for CVS. Finally, jCVS provides a Servlet that allows any Servlet enabled web server to present any CVS repository on the Internet for browsing and download.

SmartCVS

SmartCVS Web site.


Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster | Last modified at 2005-07-07 02:04 PM