32
CVS Selim Çıracı Ahmet Kara Metin Tekkalmaz

CVS Selim Çıracı Ahmet Kara Metin Tekkalmaz. CVS – Open Source Version Control System Outline What are Version Control Systems? And why do we need them?

  • View
    226

  • Download
    2

Embed Size (px)

Citation preview

CVS

Selim ÇıracıAhmet Kara

Metin Tekkalmaz

CVS – Open Source Version Control System

Outline What are Version Control Systems?

And why do we need them? Introduction to CVS

Creating Repositories Basic Functions

Login, logout, checkout, check in

CVS and IDE’s

Team Development

Parallel Development Multiple developers on same project Access to other members’ files Building code at the same time

Needs a tool Version Control Systems

What is Version Control? A method for maintaining information. The ability to make controlled changes to

electronic information. A way to track the changes that were

made and who made them. One or more methods of comparing any

two versions of the same information. A way to undo changes when they cause

problems.

Why Use Version Control? It provides one method for an entire team to use;

Everybody operates under the same 'ground rules'. Changes are orderly vs. chaotic,

Saving development time The ability to track changes A list of exact changes made can be generated

quickly and easily, Making it easier to advise users of the information on

how it has changed from version to version. It is easy to 'roll back' to an earlier version of the

information, If a serious mistake was made during a change

Software Quality

Version Control not enough for quality

Software Configuration Management Systems (SCM) are needed

What is SCM? Version Management

Version Control Systems

Build Automation Produced files = f(source files, options)

Change Management All changes automatically connected to Change

Requests

Release Management Specifying Change Requests – files included

automatically

CVS – Open Source Version Control System

Does everything RCS is able to do: Store history of source files User based security Track changes Apply locks on files Allows programmers to enter

comments Reverting to a version

CVS – Success?

Why not use RCS then? CVS is build on client – server

paradigm CVS enables developers scattered by

geography or slow modems to function as a single team

Stored files have RCS format – Backward compatibility

CVS - Extras Allows developers to create branches

CVS can then merge the branches into main branch

Allows Unreserved checkouts Multiple developers can work on the

same file. Changes are then merged by CVS

Collusions are marked by CVS Offers collusion correction according given

rules

CVS - Principles All source files and their history is

stored in one server Each called repository

A server may be used to maintain more then one repository.

Each developer working on a repository gets a local copy of the source – which are synchronized with the server

CVS – How to? Has many features and commands We will focus on:

Creating repositories Logging into a repository Checking out Checking in

Many GUI tools for CVS is present but we will focus on command line tools

CVS – Creating Repositories

When CVS is installed on a Linux machine: A CVS administrator user is created

(named cvs most of the time) A CVSROOT directory is created -

/cvsroot most of the time The CVS admin user owns this

directory

CVS – Creating a repository

A repository is created by creating a directory under the cvsroot directory. The name of the repository is set as

the name of the directory Under the newly created directory

place another CVSROOT (capital is required) directory

CVS – Creating repositories

Under the CVSROOT directory place the following two files writers – the developers that are able

to checkout and change the source. Plain text file with writers names

passwd – the encrypted user password lookup file. Tools like genpwd can be used to generate the password

CVS – Creating Repository

Giver 777 permission to the repository (required for some cases, if cvs is config is worng!)

Add the repository to CVS config Edit the cvs-pserver.conf file located

at /etc

CVS – Repository Creation Example

CVS – Check in the initial version

Go to the directory where the source files are located

Login to the CVS repository Run: cvs

–d:pserver:username@server:/cvsroot/repositoryname login

CVS will do the authentication

CVS – Creating initial version

Add the files to the repository Run: cvs –

d:pserver:username@server:/cvsroot/repositoryname add [filename]

Commit Run: cvs –

d:pserver:username@server:/cvsroot/repositoryname commit

CVS – Initial check-in example

CVS – Getting the repository Create the directory where you want to

store your source files Login to the cvs repository

Run: cvs –d:pserver:username@server:/cvsroot/repositoryname login

Checkout all the files Run:

d:pserver:username@server:/cvsroot/repositoryname checkout .

CVS – Getting the repository example

CVS – Changing files Run an update to tell cvs what files

are changed Run:

d:pserver:username@server:/cvsroot/repositoryname update

Run CVS commit Run:

d:pserver:username@server:/cvsroot/repositoryname commit

CVS – Changing files example

Ways to access CVS

Two other (and maybe easier) ways to access CVS server for Windows users Not integrated w/ your IDE

A tool seperate from your development environment is used

Integrated w/ your IDE Integration w/ MS development environments Integration w/ Eclipse

Not Integrated Access (1/2)

As CVS client an external tool seperated ftom your IDE is used

Check-in/out and other operations are caried using this tool

You should “manually” check-in/out before/after using files w/ the IDE

Not Integrated Access (2/2)

One of such tools is WinCvs Can be accessed via www.wincvs.org

Integrated Access

CVS access is a part of your IDE Easier check-in/out (and access to

some other functionality such as file comparison) using your IDE

Complimentarily, not integrated access for more complicated functionality can still be used

Integrated access w/ MS IDEs (1/2)

Microsoft uses a standart way to access source control tools

If a tool implemets this standart way, it should theoritically be used by all Microsoft IDEs

There is not many such free tools to be used with CVS

Integrated access w/ MS IDEs (2/2)

One such tool is “PushOK's CVS SCC Proxy plug-in”

Can be accessed via www.pushok.com/soft_cvs.php

Integrated access w/ Eclipse Eclipse is a very commonly used IDE for Java Eclipse has built-in CVS access functionality Can be accessed via www.eclipse.org

CVS – Questions?