|
Disclaimer:
These pages about different languages / apis / best practices were mostly jotted down quckily and rarely corrected afterwards. The languages / apis / best practices may have changed over time (e.g. the facebook api being a prime example), so what was documented as a good way to do something at the time might be outdated when you read it (some pages here are over 15 years old). Just as a reminder. How to use set up and use CVS, developer tips and tricksDeveloper notes I made about CVS as version control system Note: Subversion is a good alternative to CVS, so if you currently are not using CVS you might want to look into using Subversion instead,
How to use CVS1 MAKE SURE THE USER IS ALLOWED TO USE CVSThe CVS repository reside on the server myserver in the directory /cvs To be able to access that directory and its files you need to be user someuser In the file /cvs/data/CVSROOT/writers you need to add the userids for those who should be able to write to CVS. In the file /cvs/data/CVSROOT/passwd you need to add the password for the new user. To generate the password you can use this perl script: #!/usr/bin/perl $passwd = crypt("$USER","whatever"); print "$passwd "; here the password will be the same as the $USER. Once you have added the user to writers, and added the password to passwd, you are done here. 2 SETTING UP THE ENVIRONMENTThe variable $CVSROOT has to be set. Add the following line to ~/.profile export CVSROOT=":pserver:${USER}@myserver:/cvs/data" Before you check out the files for the first time; make sure that you do NOT have a directory ~/theFiles/ If you do, please rename that directory. To check out the source code for all programs that are used in the release process, do the following: check that the variable $CVSROOT is set, then execute the following commands % cd % cvs login % cvs co theFiles You shall now see information which files that are checked out. All the code appears in ~/theFiles/ From now on, only work on the files in the directory ~/theFiles/ 3 WORKING ON THE FILESIMPORTANT: Always make sure that you are working on the latest versions of the files! E.g. do a "cvs up" before you start modfiying any files. And always make sure that someone else has not made any changes to the file you modified, before you check in the files. E.g. do a "cvs st" before you commit the file, to make sure that there arent any new changes to the files When you have changed files, test them and check them back into the repository. After you have checked in a file, you should try to release the file as soon as possible. Note: Binaries will NOT be checked in into cvs. That means that the binaries manually have to be copied to the correct directory on the machine. See the document install.html for information on how to handle binaries. 4 GENERAL INFOThe full documentation for CVS you will find at, it is recommended that you browse through it to get a grasp how cvs works: http://www.cvshome.org/docs/manual/ The most common tasks: cvs up filename check out the latest version of a file cvs co dir check out a whole directory cvs st filename show the status of the file (which version/if it is modified) cvs log filename show a log of all changes made to the file cvs add filename will add a NEW file to the repository cvs commit -m "your comment what you have done" filename will check in the file in the repository again, please do a cvs st filename first to make sure that you have the latest copy of the file A VERY useful flag is -n which can be used with most (all?) commands, It will not execute the command, it will only show what will happen if you do execute the command. e.g. cvs -n up filename will not update filename, it will just display a message what would happen if you update "filename". If you have files that shall be included in the repository, you can add those filenames to the file ".cvsignore", then cvs will not complain about them all the time. 5 BackupsI have made a script to be able to do backups of the CVS.More programming related pages |
|