Go to the first, previous, next, last section, table of contents.


8 CVS in brief

http://www.loria.fr/~molli/cvs/cvs-FAQ/cvsfaq0.html

8.1 Commands summary

8.1.1 Create a new module

If the files are ascii:

  1. enter the directory where the files are
  2. execute: cvs import -m"my message" module_name pippo pappo

If the module files are binary:

  1. enter the directory where the files are
  2. execute: cvs import -kb -m"my message" module_name pippo pappo

The labels pippo and pappo are useless.

8.1.2 Add a directory

Create the directory. Move in the parent directory and simply issue the command cvs add directory_name.

8.1.3 Add an ASCII file

Create the file. Issue the commands

  1. cvs add filename
  2. cvs commit filename

8.1.4 Add a binary file

If you need to add a binary file (for example a `.gif' file) you have to do the following:

  1. cvs add -kb <file>
    This tells cvs to add the file without changing the characters (other files are normally treated to substitute line terminators on the different platforms)
  2. cvs commit <file>
    This commits the file. You don't have to repeat the -kb option because it is a sticky options (it is sticked, i.e., attached to your current version of <file> in your current directory.
  3. cvs admin -kb <file>
    This tells cvs that any other user will see this file as an object file in the future. So it will be checked out without platform-dependent character translations.

All files in `GDT/man_html/pictures/' are added in this way.

8.1.5 Remove a file

Do the following

  1. cvs edit <file>
  2. rm <file>
  3. cvs remove <file>
  4. cvs commit <file>

8.1.6 Rename a file

To rename /<old_dir>/<old_file> in /<new_dir>/<new_file> do the following:

  1. Execute cp $CVSROOT/<odir>/<ofile>,v $CVSROOT/<ndir>/<nfile>,v to create a duplicate entry in the repository.
  2. Remove old_file (but allowing to retrieve it by tag or date) by doing:
    cd <working-dir>/<old_dir>
    rm <old_file>
    cvs remove <old_file>
    cvs commit <old_file>
  3. Retrieve <new_file> and remove all tags from it by doing
    cd <working-dir>/<new_dir>
    cvs update <new_file>
    cvs log <new_file> # Save the list of Tags
    cvs tag -d <tag1> <new_file>
    cvs tag -d <tag2> <new_file>
    . . .

    8.2 CVS remote access

    To make possible a remote connection to cvs you have to make the following

    1. start a cvs server
    2. use a cvs client

    In the following the two operations are described:

    8.2.1 Start a cvs server

    Edit the file `/etc/services' and add the line
    cvspserver 2401/tcp

    If you DO NOT not have an AFS file system, then:

    If you HAVE an AFS distributed file system, then you have a further problem (root can not read user directories). Then you have to wrap the commands in an appropriate script by doing the following:

    8.3 CVS troubleshooting

    8.3.1 Forcing a commit

    If your
    cvs commit <file>
    fails to do the job, then you can force the commit by issuing the command:
    cvs commit -f <file>.

    8.3.2 Retriving an old version of a file

    To obtain the version of the file `GDT/incl/GDT/rm3_globals.h' as was on, say, February 3rd 1999, you have to retrive the whole `GDT/incl/GDT/' directory by executing:
    cvs export -D 1999-02-02 GDT/incl/GDT


    Go to the first, previous, next, last section, table of contents.