Download presentation
Presentation is loading. Please wait.
1
6/27/20151 Doris Lee http://pyre.third-bit.com/gforge/presentations/cvs.ppt Email : ywlee@pyre.third-bit.com Concurrent Version System (CVS)
2
6/27/20152 Agenda Introduction Useful Commands Tagging and Branching Case Studies Do and Don’t
3
6/27/20153 What is CVS? Dominant version control system Time machine Why we need CVS? Create a repository To coordinate code
4
6/27/20154 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
6/27/20155 Introduction (Cont’d) Keyword e.g. $Author$, $Name$, $Date$ –$Author$ $Author : ywlee$ Created “CVS” Subdirectory
6
6/27/20156 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
6/27/20157 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
6/27/20158 Tagging Marking a group of file revisions cvs tag Rel_1_beta File1.java Ver 1.1 Ver 1.2 Ver 1.3 File2.java Ver 1.1 : Ver 2.1 Ver 2.2 File3.java Ver 1.1 Ver 1.2
9
6/27/20159 Branching Branch : a fork of the repository experimental work, release, or bug fixing cvs rtag –b BR_1 projectName Trunk BR_1 2.62.5 2.6.2.1 2.72.8
10
6/27/201510 Case Study (1) AlanMary Test.java revision 1.1 : Total+=amount; : Test.java revision 1.1 : Total+=amount; : if (amount > 10) { Total+=amount; } : Total++; cvs update cvs commit - new revision: 1.2 done cvs update - new revision: 1.3 done - Merging differences between 1.1 and 1.2 into Test.java cvs commit 1 2 3 4
11
6/27/201511 Case Study (2) Alan Mary Test.java revision 1.1 : Total+=amount; : Test.java revision 1.1 : Total+=amount; : Total+=tax; cvs update cvs commit - new revision: 1.2 done cvs update - Merging differences between 1.1 and 1.2 into Test.java - rcsmerge: warning: conflicts during merge - cvs update:conflicts found 1 2 3 4 Total+=subtotal;
12
6/27/201512 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
6/27/201513 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
6/27/201514 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
6/27/201515 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
6/27/201516 Question and Answer
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.