Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrent Versions System

Similar presentations


Presentation on theme: "Concurrent Versions System"— Presentation transcript:

1 Concurrent Versions System
Overview of CVS architecture. Repository structure. Basic development tasks in WinCvs. Branching and merging. Other CVS interfaces CVS internals

2 CVS Features Concurrent access by multiple developers
Multiple development lines in a single repository Grouping sources into modules Symbolic source tagging Diffs between versions Configurable logging support Binary files support Repository event triggers

3 Client-server architecture
separate server (UNIX or NT) no shared filesystems a server process per connection ewacvs

4 The CVS Repository ewacvs:/data1/cvsroot CVSROOT
shr project1 project2 project3 devkits ar cgi doc install reports util web cgipr unix nt esapps forms Resides on a server No working files inside the repository

5 CVS Usage Model Checkout, Commit, Update
Checkout Makes private copy in working directory Can check out anywhere Check out multiple copies, multiple versions Commit Commit changes to the repository when finished Working copies must be up to date with repository Update Brings working copy up to date with repository

6 Checkout does not lock the files in repository
Concurrent checkout Checkout does not lock the files in repository Master Repository foo.c checkout latest checkout branch rel_1_fix checkout V1.1 checkout V1.2 checkout latest Karen Patrick Michael Chris Brigid Working Copy V1.7 Working Copy V Working Copy V1.1 Working Copy V1.2 Working Copy V1.7 checkin checkin checkin X X V1.8 or 1.9 V checkin prohibited V1.8 or 1.9

7 CVS and the Development Cycle
1. Check out source files in working directory. 2. Edit source files. 3. Unit test your code. 4. Update working files to merge in changes from other developers (if necessary). 5. Test again if the sources were merged on step 4. 6. Commit changes. 7. Repeat from step 2 until you have a new release. 8. Tag the release. 9. Submit the module name and release tag for integration build.

8 Ideal development with CVS
Developer A development update checkout checkin repository Developer B

9 Real development with CVS
checkin Developer A conflict resolution update checkin X repository Developer B conflict

10 WinCVS on your desktop Configuration Main screen Checking out the sources Viewing source history Diff Commit Update Tag

11 WinCVS: Configuration
Your UNIX login

12 WinCvs: Main screen revision number branch name state icon file type
file view modules status view

13 Checking out the sources

14 Source history & diff

15 Commit, Update & Tag commit update tag

16 When to commit Commit to mark a working state that you might want to return to later. Commit related files in a single operation. Use a common log message for all the files. Commit to backup your sources. Commit from an office desktop to be able to access the files from home much faster than through filesystem sharing.

17 Working on branches 1.2.2.1 1.2.2.2 patch rel_1_fix
cvs tag -b rel_1_fix cvs up -r rel_1_fix 1.1 1.2 1.3 1.4 release_2 cvs tag release_2 release_1 cvs tag release_1

18 Branch if you need ... to create sustaining (patch) releases
to have multiple development lines from a single repository to do experimental development to merge later or forget about it to keep temporary state of development without affecting builds

19 Common CVS commands cvs [cvs-options] command [cmd-options] [files]
cvs checkout Check out source for editing. cvs add Add new file/directory to repository. cvs remove Remove an entry from the repository. cvs status Show status of checked out files. cvs log Show revision history for files. cvs diff Compare working files to version in repository or versions inside the repository. cvs update Bring working files into sync with repository. cvs commit check files into the repository cvs tag Label the sources.

20 Diff between 2 versions of the file
Other CVS clients Diff between 2 versions of the file Directory listing CVSweb

21 Diff between 2 versions of the file
Other CVS clients Directory listing Diff between 2 versions of the file jCVS

22 CVS online Official CVS site: http://www.cyclic.com
CVS Bubbles: CVS for Web development: WinCvs: jCVS: Netscape’s Mozilla under CVS: FreeBSD CVS repository:

23 CVS Internals Server is started via inetd (UNIX) with a process per connection Client-server protocol has embedded compression Update sends file’s diff across the line, not the whole file (when possible) UNIX authentication, optional CVS specific passwords/groups, Kerberos and SSH support CVS does not have to run as root SCCI and OLE support are in development Event triggers are implemented via external programs (Perl, sh, C, anything else)

24 Reserved Checkouts and CVS
Exclusive file locking prevents parallel development and is not recommended for plain text files advisory locks: implemented via cvs edit and cvs watch. Get notification when someone edits or checks in the file. all-o-nothing advisory locks: cvs edit does not succeed if files are already edited by someone else. Implemented using a patch to cvs edit exclusive locks (RCS style): implemented via cvs admin. You cannot commit unless you’ve locked the file. One lock per file per branch.

25 Advisory locks Developer A email alert CVS server edit/watch edit
Developer B Editors: Developer A Developer B Editors: Developer A


Download ppt "Concurrent Versions System"

Similar presentations


Ads by Google