CVSU - CVS Utilities PLEASE NOTE, THAT ALTHOUGH THIS SOFTWARE WORKS FOR ITS AUTHOR, IT MAY OR MAY NOT WORK FOR YOU. PLEASE BE CAREFUL. SOME OF THE INCLUDED FILES MAY REMOVE RESULTS OF YOUR WORK. PLEASE MAKE SURE THAT YOU UNDERSTAND HOW THEY WORK BEFORE USING THEM. CVSU is licensed under the terms of the GNU Public License, version 2. See file COPYING and http://www.gnu.org/copyleft/gpl.html for details. The homepage of CVSU is http://www.red-bean.com/cvsutils/ The original author of CVSU is Tom Tromey Currently CVSU is maintained by Pavel Roskin Introduction The idea of CVS Utilities is to facilitate working with the files in the working directory of a developer using CVS (Concurrent Versions System) From the point of view of CVS, working directories have low value, since they can easily be recreated using the "cvs checkout" command. Also the "cvs update" command will show the status of the files, i.e. whether they have been modified, added or removed. CVS by its design is a client-server system that does most of its work on the server side. CVS provides only a few (if any) means for managing the working directory without communicating with the server. There are, however, several reasons why such means are necessary. - There is enough information on the client side to create fast tools for sorting and purging the working directory without contacting the CVS server. - Checking out a big module over a slow line can take too much time. Working directories are valuable if it takes hours to check them out. - There should be some support for disconnected operations. - CVS poses certain unnecessary restrictions on read-only users, e.g. "cvs add" command doesn't work for them, although this command is essential for "cvs diff" showing new files. Following scripts are included: cvsu Offline "cvs update" simulator. It lists the files found in the current directory (or in the directories which you specify). Following is taken into account: - Attributes of the file. - Information about the file in CVS/Entries Timestamp of the file is compared to the timestamp stored in CVS/Entries. Run "cvsu --help" to see supported command line options. The options can be abbreviated. This functionality is provided by Perl, and may vary from one machine to another. cvsco When you want to remove the working directory and check it out anew, use cvsco instead. Essentially, cvsco removes results of compilation and discards local changes. It deletes all the files except the listed unmodified ones and updates everything which seems to be missing. Note that the existing unmodified files are not updated - cvsco only reloads missing and modified files. It's a good idea to run "cvs update" after cvsco. cvsdiscard The easiest way to discard local changes. cvsdiscard discards local changes but keeps results of compilation. It works like "cvsco", but it only deletes files which are likely to cause merge conflicts. cvspurge cvspurge is CVS-based "make maintainer-clean" In other words, it removes results of compilation but keeps local changes intact. It removes unknown files, but keeps changes in the files known to CVS. Unknown directories are also kept. cvstrim cvstrim removes files and directories unknown to CVS. Unlike cvspurge, files listed in .cvsignore are not removed. The idea is to remove the files that are not produced by the normal build process - backups and files copied temporarily to the working directory. cvstrim relies on .cvsignore files being correct. Note that the backups of modified files are removed. cvschroot cvschroot makes it possible to change CVS/Root in all subdirectories to the given value. The only argument accepted is the new CVSROOT value. Old-style CVS/Repository files that contain the full path to the repository are updated to reflect the change. New-style CVS/Repository don't need to be changed. If the environment variable CVSROOT is defined, it overrides the contents of CVS/Root. In other words, it is treated as the _old_ CVS root. cvsrmadm cvsrmadm removes all CVS directories in the project. It is safer if you occasionally make mistakes in the "find" commands. cvsdo cvsdo simulates some of the CVS commands (currently add, remove and diff) without any access to the CVS server. Using "cvsdo add" and "cvsdo remove" allows you to create diffs with "cvs diff -N", in which all removed and added files will appear in the diff correctly, as is you had used "cvs add" and "cvs remove" respectively. "cvsdo diff" tries to locate the backup copies of the modified files. If they can be found, they are compared with the current version using "diff". Only those backup copies are used that have the modification date equal to the date listed in CVS/Entries for the modified file. "cvsdo diff" patches the diff output to make it easier to read and safer to use with patch. An exception is made for files named "ChangeLog" - in this case "diff" will try to omit as much context as possible, so that the patch can be applied even if other changes have been made to the ChangeLog. Also the added files are handled properly a bit better by "cvsdo diff" than by "cvs diff". The header of the "diff" output is patched in such way that at least GNU patch will create a new file when the resulting patch is applied and remove that file when the patch is reverted.