====== CVS On SDF ======

===== Table of Contents =====

  * [[#sec-1|1 Introduction]]
  * [[#sec-2|2 Creating A Repository]]
  * [[#sec-3|3 Importing A Directory:]]
  * [[#sec-4|4 Checking It Out]]
  * [[#sec-5|5 Accessing It Remotely]]
  * [[#sec-6|6 More info on CVS ]]

===== 1 Introduction =====

This tutorial is not about using a version control system, or about using cvs, but about how to get started with cvs on SDF

===== 2 Creating A Repository =====

The cvs repository is just a simple directory. Our repository will be made in our home directory, and we will name it "cvs".

cvs requires that you use an absolute path to the repository. To learn the full path to your home directory type:

   cd; pwd

In the rest of this document you will need to replace '/path/to/homedir/' by the output of the previous command.

Creating our repository is very simple:

    cd
    mkdir cvs
    cvs -d /path/to/homedir/cvs init

That's it.

===== 3 Importing A Directory: =====

Let's add our website into our repository:

    cd html
    cvs -d /path/to/homedir/cvs import -m "initial import" html user start

In this command

  * '-d /path/to/homedir/cvs' specify the path to our repository. Alternatively you can add:
      export CVSROOT='/path/to/homedir/cvs'  to your ~/.profile file. You must use an   absolute path.
  * 'import' is our cvs command
  * '-m "initial import" is a message that will appear in the log.
  * 'html' is the name of our new module
  * 'user' is a vendor tag, you can use your username or SDF or whatever
  * 'start' is a release tag.

You can modify the message, the module name and the tags to your liking, just keep in mind that in the rest of this tutorial we will use 'html' for the module name.

===== 4 Checking It Out =====

   cd
   mkdir tmp
   cd tmp
   cvs -d /path/to/homedir/cvs co html

This should be enough to convince ourselves that the directory is now under version control.

===== 5 Accessing It Remotely =====

We can access our repository from the outside using ssh, to do this we need to set the environment variable CVS_RSH so that cvs will use ssh, using for instance:

   export CVS_RSH=ssh

And then use for the variable CVS_ROOT, or the -d switch: ':ext:user@freeshell.org:/path/to/homedir/cvs/', where

  * 'user' is your login name at SDF a
  * 'freeshell.org' is your prefered host at SDF
  * '/path/to/homedir/cvs' is the full path to our repository at SDF.

For instance to check out our html module:

   cvs -d ':ext:user@freeshell.org:/path/to/homedir/cvs' co html

After having made our modifications, we just need to check our changes back in:

   cvs update # if we made some changes elsewhere
   cvs -d  ':ext:user@freeshell.org:/path/to/homedir/cvs' ci html

===== 6 More info on CVS  =====

  * [[http://www.cvshome.org|cvs home]]
  * [[http://www.cvshome.org/cvs/manual/cvs-1.11.21/cvs.html|Version Management with CVS by Per Cederqvist]]
  * man cvs

$Id: cvs_on_sdf.html,v 1.3 2015/01/28 01:01:52 grobe0ba Exp $