Home arrow Site Administration arrow Page 3 - Making Changes in the CVS

Adding Files - Administration

In this conclusion to a three-part series on the Concurrent Versions System (CVS), you'll learn how to commit changes and add and remove files. This article is excerpted from chapter two of Essential CVS, Second Edition, written by Jennifer Vesperman (O'Reilly; ISBN: 0596527039). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

  1. Making Changes in the CVS
  2. Updating Sandboxes
  3. Adding Files
  4. Removing Files
  5. Exporting and Building Projects
By: O'Reilly Media
Rating: starstarstarstarstar / 2
April 24, 2008

print this article



To add a file to a project in the repository, first create the file in your sandbox. Be sure to consider your project’s structure and place the file in the correct directory. Then, issue the following command from the sandbox directory containing the file:

  cvs add filename

This command marks the new file for inclusion in the repository. Directories are added with the same command. Files within a directory can’t be added until the directory itself is added. A file is only marked for addition when you run cvs add; it is actually added to the repository when the next cvs commit is run. A directory is added to the repository immediately. Example 2-19 shows a file being created and added to the repository. Remember that the file is not actually stored in the repository until the cvs commit command is run. Figure 2-10 shows the same file addition in gCVS.

Example 2-19. Adding files

$ touch file3
$ cvs add file3
cvs add: scheduling file `file3' for addition
cvs add: use 'cvs commit' to add this file permanently
$ cvs commit
Log message editor opens
RCS file: /var/lib/cvsroot/example/file3,v done
Checking in file3;
/var/lib/cvsroot/example/file3,v <--  file3 initial revision: 1.1

Figure 2-10.  Adding files with gCVS

If you have binary files or other files that are not plain text, please see the section “Binary Files and Wrappers” in Chapter 3 before adding them to the repository. These files should be added with the -kb command option.

As with committing for other reasons, an editor window will open asking you to enter a log message describing the files to be added.

>>> More Site Administration Articles          >>> More By O'Reilly Media

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: