The cvs utility is flexible and thus offers many options. Common operations performed with cvs are listed in the following paragraph. The option -z6 is included in all the commands. It enables compression of the information to be transferred between the server and the client. This can speed up transfers, especially over slow connections. In the following list, modulename refers to one of the module names listed earlier in this chapter (kdesupport, kdelibs, and so on) and BRANCH_NAME refers to one of the CVS branches (for example, HEAD). Unless otherwise stated, the option -r BRANCH_NAME is optional. If it is omitted, the default branch will be used. Within each module may be several applications or libraries, with one stored per subdirectory. In the following, appname refers to one of these subdirectory names. For example, the module kdeutils contains the subdirectories kjots, kedit, and kwrite (among others) which contain the respective applications. Unless otherwise noted, all commands given in this section assume that you want to use the current working directory for your local copy of CVS source code. copies modulename to a local subdirectory of the same name (which cvs creates, if necessary). | |
updates the CVS repository so that it matches your local code. In this case, the code in the current directory and its subdirectories will be updated. To commit a specific file or subdirectory, use or You should be sure that your code compiles and runs before committing it to CVS. This way, other developers will always have a running version of KDE to work with. | |
or updates your local code to match the CVS. If you use this regularly, you can keep up-to-date with CVS with minimal file-transfer time because only the differences between your local code and the CVS are transferred. | |
The option -l tells cvs not to recurse the subdirectories. Thus, in the first line, only the module-level Makefile, configure script and related files will be copied to the local disk. The second line copies only the subdirectory containing the application we are interested in. The admin module contains more configuration scripts and is used by all other modules. When a module is retrieved in its entirety, the admin directory is included as a subdirectory of the module. Here, it is placed instead at the same level as the module's directory. Therefore, in the last line, we make a symbolic link to admin in the module's directory. | |
adds the file mynewcode.cpp to CVS. Simply creating the file and running a commit is not enough! Doing this will update all the files you have changed, but it will not include new files. This means that, typically, the application will be broken in CVS. Be sure to add your new files. (Don't use -z6 when adding, because add makes only local changes; it marks the file as "to be added.") | |
removes the file oldcode.cpp from the current directory and then from CVS. | |
adds the directory newdir and its source file newsource.cpp to CVS. Note that you need to do cvs add newdir/newsource.cpp for each source file before committing. You cannot add an empty directory. | |
First, remove all files in the directory from CVS as described previously in "Remove a File." Then, removes the directory from CVS and from your local disk. | |
This cannot be done directly with cvs, but you can get a good approximation of a list of all the modules by typing | |
| |