Top Banner
CVS Selim Çıracı Ahmet Kara Metin Tekkalmaz
32

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?

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 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?

CVS

Selim ÇıracıAhmet Kara

Metin Tekkalmaz

Page 2: 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?

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

Page 3: 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?

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

Page 4: 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?

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.

Page 5: 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?

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

Page 6: 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?

Software Quality

Version Control not enough for quality

Software Configuration Management Systems (SCM) are needed

Page 7: 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?

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

Page 8: 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?

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

Page 9: 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?

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

Page 10: 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?

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

Page 11: 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?

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

Page 12: 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?

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

Page 13: 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?

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

Page 14: 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?

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

Page 15: 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?

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

Page 16: 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?

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

Page 17: 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?

CVS – Repository Creation Example

Page 18: 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?

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

Page 19: 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?

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

Page 20: 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?

CVS – Initial check-in example

Page 21: 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?

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 .

Page 22: 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?

CVS – Getting the repository example

Page 23: 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?

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

Page 24: 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?

CVS – Changing files example

Page 25: 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?

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

Page 26: 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?

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

Page 27: 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?

Not Integrated Access (2/2)

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

Page 28: 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?

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

Page 29: 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?

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

Page 30: 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?

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

Page 31: 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?

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

Page 32: 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?

CVS – Questions?