1 / 16

Concurrent Version System (CVS)

Concurrent Version System (CVS). Doris Lee http://pyre.third-bit.com/gforge/presentations/cvs.ppt Email : ywlee@pyre.third-bit.com. Agenda. Introduction Useful Commands Tagging and Branching Case Studies Do and Don’t. What is CVS?. Dominant version control system Time machine.

Download Presentation

Concurrent Version System (CVS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Concurrent Version System (CVS) Doris Lee http://pyre.third-bit.com/gforge/presentations/cvs.ppt Email : ywlee@pyre.third-bit.com

  2. Agenda • Introduction • Useful Commands • Tagging and Branching • Case Studies • Do and Don’t

  3. What is CVS? • Dominant version control system • Time machine Why we need CVS? • Create a repository • To coordinate code

  4. Introduction • Setup : download software and set the environment variables • CVSROOT • CVS_RSH • Files in the repository • All program source files • All non-code project artifacts • Exclude files that can be reconstituted easily

  5. Introduction (Cont’d) • Keyword e.g. $Author$, $Name$, $Date$ • $Author$ $Author : ywlee$ • Created “CVS” Subdirectory

  6. Useful Commands • Command Usage: • cvs [cvs-options] command [command-options-and-arguments] • checkout - retrieve file(s) • add - add file(s) to repository • update - download changes • commit - upload changes • diff - view differences • log - display log info

  7. Note • Binary file “cvs add TextFile” vs “cvs add -kb BinaryFile” • NO way to delete directories in CVS ! • Sticky Bit - when checkout old version of file • impact : can’t overwrite current version at repository

  8. Tagging • Marking a group of file revisions cvs tag Rel_1_beta File3.java Ver 1.1 Ver 1.2 File1.java Ver 1.1 Ver 1.2 Ver 1.3 File2.java Ver 1.1 : Ver 2.1 Ver 2.2

  9. Branching • Branch : a fork of the repository • experimental work, release, or bug fixing cvs rtag –b BR_1 projectName 2.6.2.1 BR_1 Trunk 2.5 2.6 2.7 2.8

  10. Case Study (1) 4 2 cvs update cvs commit cvs update cvs commit Test.java revision 1.1 : Total+=amount; : Test.java revision 1.1 : Total+=amount; : if (amount > 10) { Total+=amount; } : - new revision: 1.2 done Total++; 3 1 - Merging differences between 1.1 and 1.2 into Test.java - new revision: 1.3 done Alan Mary

  11. Case Study (2) 4 2 cvs update cvs commit cvs update Test.java revision 1.1 : Total+=amount; : Test.java revision 1.1 : Total+=amount; : Total+=subtotal; Total+=tax; - new revision: 1.2 done 3 1 - Merging differences between 1.1 and 1.2 into Test.java -rcsmerge: warning: conflicts during merge - cvs update:conflicts found Mary Alan

  12. Case Study (2) (cont’d) • Resolve conflicts by communications, and • I) if the repository is the correct one, • Remove local copy and do update • II) if different codes are preferred, • Edit the code <<<<<< Test.java Total+=subtotal; ========= Total+=tax; >>>>>> • III) cvs commit

  13. Case Study (3) • cvs diff • Why? Test.txt(repository) Blue Yellow Orange Test.txt(sandbox) Blue Yellow Orange ! ! ! Tab and Spaces are different in CVS!

  14. Do and Don’t • Do • Enter meaningful comments • Check in only when files are stable • “cvs update” before “cvs commit” • Don’t • Change files in the ‘CVS’ subdirectory • Change or create files in repository directly • Change layout of a shared file

  15. References • Books : • Pragmatic Version Control Using CVS by David Thomas • Essential CVS by Jennifer Vesperman • Online : • http://www.cvshome.org/docs/manual/ • CSC207, CSC408 websites • man pages

  16. Question and Answer

More Related