CVS Tips ------------------- 1. Never use command "cvs import" unless you are absolutely sure. Command "cvs import" creates a new CVS module and adds all files and subdirectories in your current directory to the new module in the CVS repository. If you run this command in your home directory, and your CVSROOT points to a remote CVS repository such as a SourceForge.net project CVS repository, all files in your account will be uploaded to the public SourceForge CVS server. Note that this is not reversible. ------------------- 2. Always use "cvs add -kb FILENAME" to add binary files to a CVS repository. Otherwise, binary files will be damaged during the transmission. .TXT, .PS, .c, .h, .XML, .html, .htm, and .java files are common text files; .doc (MS Word), .pdf, .jpg, .gif, .dia, .zargo, .zip, .tar, and .tgz files are common binary files. On UNIX, the easiest way to find out whether or not a file is a binary one is to use command "file". Or one can use "vi" or another editor to open the file and take a look. On Windows, UltraEdit-32 and many other editors can tell you whether a file is a binary one. ------------------- 3. Always checkout a second tree to verify check-ins. This way, when you check in a damaged binary file, you will know immediately. Another way to make sure that you did not damage binary files is to look at file "Entries" under directory "CVS". If you see something like this: /RSS-cl88888.doc/1.1/Thu Sep 30 14:23:26 2004/-kb/ /HTML-cl88888.doc/1.2/Wed Oct 6 00:51:18 2004// you can tell that the first file is good but the second file could have been damaged. ------------------- 4. Meanings of one-letter CVS file status code: ?: Not recognized U: getting the entire file from the repository (Update) P: getting new changes of the file from the repository (Patch) M: Modified locally C: Conflict A: Scheduled to be added to the repository R: Scheduled to be removed T: Tagged ------------------- 5. Relevant environment variables: CVS_RSH This env var defines the remote access method for :ext: protocols. The usual value is "ssh". CVSROOT This env var defines the path of the default CVS repository. The -d option to "cvs" overrides the path defined in CVSROOT. CVS_SERVER Usually this should not be defined. If the CVS repository is on prime, to access it remotely, the value of CVS_SERVER should be "/usr/local/bin/cvs". ------------------- 6. Always supply a log message. The easiest way to do this is to always add a -m "LOG MESSAGE" option to command "cvs ci". This way, you can avoid the embarrassment you may face when "vi" shows up, in which case command ":q!" can help you exit the editor. ------------------- --By Chang Liu --Last Modified: Wed Oct 29 12:46:09 EST 2003