Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrent Version System (CVS)

Similar presentations


Presentation on theme: "Concurrent Version System (CVS)"— Presentation transcript:

1 Concurrent Version System (CVS)
Doris Lee 12/1/2018

2 Agenda Introduction Useful Commands Tagging and Branching Case Studies
Do and Don’t 12/1/2018

3 What is CVS? Why we need CVS? Dominant version control system
Time machine Why we need CVS? Create a repository To coordinate code 12/1/2018

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 12/1/2018

5 Introduction (Cont’d)
Keyword e.g. $Author$, $Name$, $Date$ $Author$ $Author : ywlee$ Created “CVS” Subdirectory Keyword – metadata about latest revision of file 12/1/2018

6 Useful Commands Command Usage: checkout - retrieve file(s)
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 12/1/2018

7 Note Binary file NO way to delete directories in CVS !
“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 12/1/2018

8 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 At a particular point of time 12/1/2018

9 Branching Branch : a fork of the repository
experimental work, release, or bug fixing cvs rtag –b BR_1 projectName BR_1 Trunk 2.5 2.6 2.7 2.8 12/1/2018

10 Case Study (1) 4 2 3 1 Alan Mary cvs update cvs commit cvs update
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 12/1/2018 Alan Mary

11 Case Study (2) 4 2 3 1 Mary Alan 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/1/2018

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 12/1/2018

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

14 Do and Don’t Do Don’t Check in only when files are stable
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 12/1/2018

15 References Books : Online :
Pragmatic Version Control Using CVS by David Thomas Essential CVS by Jennifer Vesperman Online : CSC207, CSC408 websites man pages 12/1/2018

16 Question and Answer 12/1/2018


Download ppt "Concurrent Version System (CVS)"

Similar presentations


Ads by Google