Concurrent Version Systempeople.apache.org/~sgoeschl/download/jugat/2001-11-20_2.pdf · –...

Preview:

Citation preview

21.11.01

DI Roland TRIENDL (rt@sysis.at)DI Siegfried GOESCHL (siegfried.goeschl@itserv.at)

Concurrent Version System

CVS in the Enterprise

2 2CVS within the Enterprise

Overview

§ A Closer Look at CVS

§ Acceptance of Configuration Management

§ Usability of CVS front-ends– WinCVS– Tortoise

§ Server Administration– Configuration– User Management– Tips and Tricks

3 3CVS within the Enterprise

A Closer Look at CVS

§ Used for virtually all open source project§ Client/Server enabled version control system

– Usually UNIX server– Windows NT/2000 port available

§ Supports multiple stand-alone frontends– Command line for hardliners and tools– WebCVS using browser– TkCVS using TCL/Tk– WinCVS as Win32 frontend with TCL support

§ CVS client can be integrated seamlessly with– Jbuilder– Netbeans– Together/J– Microsoft Explorer (Tortoise)

4 4CVS within the Enterprise

A Closer Look at CVS

§ Different client authentication modules available– Kerberos– Password Authentication

§ Customization with server side scripts§ Unreserved checkouts

– No file locking– Multiple developers can work on one file simultanously– Watches can be used to notify other developers– Manual file locking is still possible

§ Simple user management§ CVS and ANT make a good combination for

automated build

5 5CVS within the Enterprise

Acceptance of CM

Forces of Configuration Management

– structured work

– binding deliveries

– binding schedules

– well organized workspace

– where is the source material

6 6CVS within the Enterprise

Acceptance of CM

workflows (RUP)– Core Process Workflows

• Business Modelling (Geschäftsprozeß Modellierung)• Requirements (Anforderungs Management)• Analysis & Design (Analyse und Design)• Implementierung• Test• Deployment (Verteilung)

– Core Supporting Workflows• Change- und Configurationmanagement <-- you are here• Projektmanagement• Environment Setup

7 7CVS within the Enterprise

Acceptance of CM

packages of domain engineering

customerrequirements

domainanalysis

domaindesign

domainimplementation

domain model architecture

domainknowledge

requirementsanalysis

productconfiguration integration & test

special designspecial

development new requirements

characteristics

product

domainspecific languages,components and generators

8 8CVS within the Enterprise

Acceptance of CM

source distribution (object code)

*.dir *.dxr

*.fla *.swf

*.html *.html

*.jsp *.jsp, *.class

*.psd *.gif, *.jpg

*.mid *.au, *.wav, *.mp3

*.java *.class

Sourcecode vs. Object Code

9 9CVS within the Enterprise

Acceptance of CM

§ configuration management– iterative process, based on the material created during the

production of software

§ parts of a release

Source Material Distribution Material Release Package Installed Productproduce/compile packaging install/deploy

*.jpg

*.wml

*.jsp

*.xml

*.wbmp

*.prop

*.html

*.class

*.gif

Release

10 10CVS within the Enterprise

Acceptance of CM

§ Configuration Management

– management of documents and source code– production if installable versions of a software– tool supported production of documents– distributed teamwork– concurrent access to documents and sourcecode– management of software versions– freezing a certain state of the development process– working on serveral versions of a product at the same time

11 11CVS within the Enterprise

Acceptance of CM

Advantages of CM

– increased team productivity

– improved individual productivity

– simplified software maintenance

– recovering at a defined level of development possible

– authorized and supervised modifications

12 12CVS within the Enterprise

Acceptance of CM

rules for working in a local workspace

1. working locally is completely OK (CVS)

2. hand over complete state of work at certain times

3. hand over complete work including source daily

4. project management needs to have access to your revisionsof work

5. automatic backup possible for the CVS repository

13 13CVS within the Enterprise

Acceptance of CVS

Checkout Module

Update CommitAdd

Remove

Create Tag

Erase (filesys)

Edit / Unedit

Modify

Merge

Import Module

Update

Working with CVS

Export

14 14CVS within the Enterprise

Acceptance of CM

1. checkout project (module) into your lokal workspace2. unlock required files if necessary3. add new files into cvs database (repository)4a. modify files in your workspace using your preferred tools4b. there is no renaming, remove files with cvs tool and add new once

again5. commit modified files to store new revision in cvs database

x. periodically update the whole module to get modifications of teammembers

y. dont forget to commit and update your modified files before leaving theoffice

z. periodically create tagged releases with assigned version numbers(freezing the product)

note: most actions require a final commit

15 15CVS within the Enterprise

Usability of CVS Frontends

WinCVS, MacCVS Tortoise

16 16CVS within the Enterprise

Usability of CVS Frontends

NetbeansIntegration

17 17CVS within the Enterprise

TortoiseCVS

checkout module

18 18CVS within the Enterprise

Tortoise CVS

checkout module

19 19CVS within the Enterprise

Tortoise CVS

Add &Commitfile

20 20CVS within the Enterprise

CVSWeb viewing revisions of files

21 21CVS within the Enterprise

CVS modules

Motivation

– seperate cvs modules for every development project

– you can label (tag) a project on module level to freeze it

– support cross unit teamwork for customer projects

– support domain engineering process

– support reuse

22 22CVS within the Enterprise

CVS export and java

Manifest File (MANIFEST.MF)Specification-Title: MessagingPlatform2Specification-Version: 2.1Specification-Vendor: sysis agImplementation-Title: MessagingPlatform2Implementation-Version: 2.1Implementation-Vendor: sysis agPackage-Name: at.sysis.messagingCM-module: messaging2CM-tag: $Name: $

23 23CVS within the Enterprise

User Management

§ Usage of PSERVER allows user authentication– Password is sent unencrypted– Potential security breach

§ PSERVER allows simple user management– CVSROOT/passwd contains CVS users with encrypted

password and map them to existing Unix user accounts– The Unix user accounts either belong to cvs and cvsadmin– CVSROOT/readers contains all readers– CVSROOT/writers contains all writers– Certain commands can only be executed by members of

group cvsadmin

§ How do you create an encrypted password ?!

24 24CVS within the Enterprise

User Management

cryptout.pl

#!/usr/bin/perl# Create encrytped password manually without changing the# password of an existing user

srand (time());my $randletter =

"(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);my $plaintext = shift;my $crypttext = crypt ($plaintext, $salt);

print "${crypttext}\n";

25 25CVS within the Enterprise

User Management

Group Write Access Update CVSROOT Delete Revisions

READER CVS No No No

WRITER CVS Yes No No

ADMIN CVSADMIN Yes Yes Yes

The best you can achieve (without too many tricks)

26 26CVS within the Enterprise

Server Administration Tips and Tricks

§ Executable files under UNIX– If „x“ is set in the repository you get an executable copy

§ Removing a directory– You have to delete all files and then update with the –P

option (prune empty directories)

§ Moving files without losing revision history– Copy the RCS files into the new directory– Remove the files in the working copy– Remove files from CVS– Commit

§ Export of projects– No CVS directories and metadata– cvs -d $CVSROOT export -r LABEL -d DIR

27 27CVS within the Enterprise

Server Administration Tips and Tricks

§ Turning on the historical logging– We sometimes would like to know what our users are

doing?!– Enable usage of history file in CVSROOT/config– set “LogHistory=TOFEWGCMAR” or “All”Make

CVSROOT/history writeable for everybody

28 28CVS within the Enterprise

This is the End, my Friend ....

Any questions !?

29 29CVS within the Enterprise

Resources

Online Resources

§ CVS Home : http://www.cvshome.org§ CVS Frontends : http://www.cvsgui.org§ CVS Bubbles : http://www.loria.fr/~molli/cvs-index.html§ CVS FAQ : http://www.loria.fr/~molli/fom-serve/cache/1.html§ Cederqvist et al : http://www.loria.fr/~molli/cvs/doc/cvs_toc.html§ CVS Book : http://cvsbook.red-bean.com/cvsbook.html§ WinCVS Guide : http://www.computas.com/pub/wincvs-howto§ WebCVS : http://stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/

Tools§ WinMerge: http://winmerge.sourceforge.net/

Recommended