cvs_QuickRef.txt - in $CASE/cvs, original from 97sbde2ht/bcasas/WORK/. Rev. 2k0507 - RJL [This assumes the top-level node of the checkout tree is 97s523. with CVSROOT as given below; you can tailor these for other repositories.] Refs to Kogel p# are to "OpenSourceDev with CVS", Corioulis Press 1999. A short Quick Reference to How-To-Use-CVS ----------------------------------------- CVS Quick Reference FOR HELP cvs -H (describes all cvs commands) If you make a mistake and want to get out without making any changes to our project cvs release ALWAYS: setenv CVSROOT $CASE/97s523/bde2ht1/bde2htm/base/Master work from your working directory, You only go to the repository to double check entries... work should never ever ever be done there!!!! 1) Create a directory where you are going to working. mkdir ~/work (or mkdir $CASE/project/user/work) 2) Checkout files that you need into ~/work directory YOU ARE IN : ~/work not in the REPOSITORY cvs checkout 97s523 or if you have a specific file in mind e.g pr_load.c cvs checkout 97s523/pr_load.c 3) Make the changes/fix bugs/etc YOU ARE IN : ~/work not in the REPOSITORY [DON'T EVEN THINK ABOUT CHECKIN UNTIL YOU THOROUGHLY TEST CHANGES! - RJL] 4a) AFTER your local version works, and BEFORE doing cvs commit: make sure your work is compatible with other changes that may have sneaked in between your checkout and now, by doing cvs update (works recursively) CVS will merge its changes (made by others) into your versions, (stdout shows file names tagged in column 1 by U, C, M, A or D. A means you added a new file, D means you have deleted it, M or C means your file has changed (by you and/or others). M means multiple no-overlapoping changes were merged. C means CONFLICT - changes DO overlap. U means your copy is up-to-date(already agrees with the repository) G may be possible (later versions?) as a variant of U (Kogel p. 254). C is the significant one: it means you have to edit the file to merge the changes. CVS shows differences as paired groups of lines. These diffs show up as syntax errors to g++ if you try to recompile: <<<<<< .....one version ====== .....conflicting version >>>>>> 4b) After merging the above diffs with a syntactically correct result, you can RETEST the combined changes. (DO NOT just erase others' changes.) AFTER retesting, you can go to next step: 4c) ----- To put files back after changes were made YOU ARE IN : ~/work not in the REPOSITORY CVS will catch a last-minute revision checkin by someone else while you were merging (or at lunch :-): The following command will ask for an update if needed cvs commit -m "change function x because.." filename 5) If you created a brand new file nonexistent in the repository YOU ARE IN : ~/work not in the REPOSITORY cvs add filename cvs commit -m "added new file to 97s523 repository to do bla bla" filename 6) To delete a file from the repository YOU ARE IN : ~/work not in the REPOSITORY remember : back up all your work!!!! a. remove unwanted file from your working directory b. cvs remove filename c. cvs commit -m "removed file because not need it anymore" filename 7) When you want to get rid of your working directory, instead of or before deleting files, do YOU ARE IN : ~/work/97s523 not in the REPOSITORY!!! cd .. (here you are in 97s523 in your working dir) cvs release -d * This lets CVS (and others) know that you no longer plan to modify your checked-out tree. OTHER COMMANDS cvs diff : This command shows the differences between your directory and the cvs repository cvs rdiff : Shows a collection of differences between two releases in the repository. rcsview : This tool displays updates to sections of one file from distinct revision numbers in different colors so you can see them in context. Its documentation and executable are in $CASE/cvs/rcsview/*. 8) To get files from the ATTIC: (CVS remove moves a file to the 'Attic' subdirectory so you can recover older versions. THE ONLY COMMAND THAT WE WORK INSIDE THE REPOSITORY: mv 97s523/Attic/filename 97s523 NOW GO TO : ~/work/97s523 and do: cvs checkout 97s523/filename This will merge the Attic copy of filename and CVS' empty copy and it can be checked backin.