cvs using and administration. purpose of configuration management work with cvs – philosophy using...

114
CVS USING AND ADMINISTRATION

Upload: clarissa-pope

Post on 16-Jan-2016

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS USING AND ADMINISTRATION

Page 2: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A

AGENDA

Page 3: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

© UNICORN 2004

INTRODUCTION TO CONFIGURATION MANAGEMENT

Page 4: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFIGURATION MANAGEMENT

Configuration Management (CM) is the process of defining and controlling a product structure and its related documentation. CM includes maintaining revision control and history information about all changes to a document or product.

The process of identifying and defining Configuration Items in a system, recording and reporting the status of Configuration Items and Requests For Change, and verifying the completeness and correctness of Configuration Items.

Management of the various versions of files that contribute towards a working system.

Page 5: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CM PURPOSE

A CM System is essential for controlling the numerous artifacts produced by the many people who work on a common project. Control helps avoid costly confusion, and ensures that resultant artifacts are not in conflict due to some of the following kinds of problems:

Simultaneous update– When two or more team members work separately on the same

artifact, the last one to make changes destroys the work of the former

Limited notification– When a problem is fixed in artifacts shared by several

developers, and some of them are not notified of the change. Multiple versions

Page 6: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

IMPORTANT TERMS

Baseline (build) Is a 'snapshot' in time of one version of each artifact in the

project repository. It provides an official standard on which subsequent work is

to be based, and to which only authorized changes can be made.

After an initial baseline is established every subsequent change to a baseline is recorded as a delta until the next baseline is set.

Page 7: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

IMPORTANT TERMS II

Product directory structure Serves as a logically nested placeholder for all versionable

product-related artifacts.

Page 8: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

IMPORTANT TERMS III

Workspace Refer to ‘private’ areas where developers can implement and

test code in accordance with the project’s adopted standards in relative isolation from other developers.

Configuration Manager needs to create a workspace environment for each developer on the project.

Page 9: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CM & RUP

Page 10: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CM IN RUP - OVERVIEW

Page 11: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CM IN RUP - ACTIVITIES / ROLES

Page 12: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CM AND CRM

Involves Identifying configuration items Restricting changes to those items Auditing changes made to those items Defining and managing configurations of those items

The methods, processes, and tools used to provide change and configuration management for an organization can be considered as the organization’s CM System.

Page 13: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

© UNICORN 2004

CVS PHILOSOPHY

Page 14: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

WHAT IS CVS

Concurrent version system Version control system Network-transparent program that allows developers to keep

track of different development versions of source code Its client-server access method lets developers access the

latest code from anywhere there's an Internet connection Useful, when a group of people work on the same project

even for individual developers Uses “Copy-Modify-Merge” model Primarily determined for storing text files It easy retrieve old version of the files Basic tool for team development and for Configuration

Management work

Page 15: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

WHAT CVS IS NOT

CVS is not a build system CVS is not a substitute for management CVS is not a substitute for developer communication CVS is not an automated testing program CVS does not have change control CVS does not have a built-in process model CVS does not use a „Lock-Modify-Unlock“ model

Page 16: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ANOTHER CM TOOLS

BitKeeper Microsoft Visual Source Safe (VSS) RCS

The CVS ancestor Uses „Lock-Modify-Unlock“ system

SCCS ClearCase Subversion

Page 17: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BASIC CVS TERMS I

CVS repository The master copy, where CVS stores a projects full revision

history Stores a complete copy of all the files and directories which

are under version control Each project should have exactly one repository Resources are placed in modules, modules can be divide into

folders

Working copy This directory contains local copy of the repository In this place we actually make changes to a project Each developer has his own working copy

Page 18: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BASIC CVS TERMS II

Checkout It’s the process of getting your own working copy of the CVS

resource (module) from the repository Commit

Release changes from working copy into the repository Update

Bring others changes from the repository into own working copy

Also shows, whether our project has uncommitted changes

Page 19: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BASIC CVS TERMS III

Revision Committed change of the history of a file (set of files) “Snapshot” of the permanently changing project

Conflict Situation, when two developer try to commit changes to the

same region of the same file

Page 20: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & FILE TYPES

Text files CVS is primary intended to manage files of this types Files, which contains only characters (.txt, .java, .xml, …) Commit cause, that into the file is stored information only

about changes (not whole file content) It is possible to compare changes between revisions

Binary files Files, which do not contains only textual information (pictures,

database files, archives – jars, zip, … ) Commit cause, that new changed file version is stored into

the CVS as whole It is not possible to compare changes between revisions

Page 21: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

REPOSITORY LOCATIONS

/usr/local/UES_AF Local managed repository Used if repository is located on the same machine

:pserver:vigc22@usocvs:2401/opt/cvs/CVSTrain Used if repository is located on the remote server

CVS connect string contains Service, which provide a access to the CVS CVS username Name/IP address of the computer with CVS Port on which CVS service operate Repository location

Page 22: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CHECKOUT

Overview

Page 23: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

COMMIT

Overview

Page 24: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

UPDATE

Overview

Page 25: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

REVISIONS I

When the file is committed into the CVS, it is marked with a “revision” number

When the file is founded into the head, its revision number is 1.1

When the commit is performed, CVS server automatically increase the rightmost number by one

Page 26: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

REVISIONS II

Changes & revisions

Page 27: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

TAGGING

Tag gives a label to the collection of revisions represented by one developer’s working copy

Tag is a designation for a user version Tag is applied under the file committed in the

repository, not committed files are not tagged! Tag in the CVS is always connected to the file(s), does

not exist without files!

Page 28: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

TAGGING I

Tagging is made under the files in the CVS

Page 29: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

TAGGING II

Tags & revisions

Page 30: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT I

Developer A work on the file1, version 1.1 Developer B work on the file1, version 1.2 too They both work on the same part of the document Developer A commit changes into the repository Developer B is trying commit his changes too – CVS

will be report problem Developer B must merge his changes with changes from

developer A

Page 31: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT II

Users are checking project from CVS

Page 32: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT III

Both users modify the same file

Page 33: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT IV

First user is able to commit changes, the second no

Page 34: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SOLVING A CONFLICT

What conflict mean and how to solve it Conflict is rise because of parallel development – CVS does

not lock modifying files Conflict is solved with communication between developers

– CVS is not a communication tool ! File is modified, marked as merged and committed into the

CVS again

Page 35: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING I

When we use branches We made a release and develop a new functionality to the

head of the CVS After some time the customer require a patch for his release We cannot make a patch under the version, which is in the

head – change may be incompatible and unstable We make a “branch” under the version, that we released and

patches will be committed in this branch It is the independent development line and with no influence

to the head and other branch It is the good idea to merge a patch into the head too (if the

error is not repaired yet in the head)

Page 36: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING II

Branches and commits

Page 37: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING III

Merging changes into the head

Page 38: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

REVISIONS & BRANCHES I

Revision with branches

Page 39: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

REVISIONS & BRANCHING II

Branches and their revisions

Page 40: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

© UNICORN 2004

USING CVS WITH ECLIPSE

Page 41: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

PREREQUISITIES

Eclipse platform, version 3.0.1 (last stable) J2SDK 1.4.2 Shared repository /CVSTrain Private repository (/cvs/TrainXX )

Page 42: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

TRAIN PROJECT STRUCTURE I

Overview

Page 43: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

TRAIN PROJECT STRUCTURE II

Application src/java

– Java sources bat

– *.bat files xml

– Xml configuration files build.xml

– Ant building file

Database contains train database files (*.sql)

THIRDPARTY Contains external (thirdparty ) libraries - *.jar files

Page 44: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ADD NEW CVS REPOSITORY I

If we want to use a CVS, we have to define a path to the new CVS – add a new CVS repository location

This can be done by open new perspective (CVS) or open existing

In the upper right corner

Page 45: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ADD NEW CVS REPOSITORY II

In CVS perspective we must add new repository Click by right mouse button into the CVS Repositories

view

Page 46: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ADD NEW CVS REPOSITORY III

Now we add new repository location

Page 47: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ADD NEW CVS REPOSITORY IV

Now we see complete CVSROOT path in the CVS repositories view

Page 48: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SHARING A PROJECT

We will append the project in the Java perspective Right click on the project Application and choose

Team/Share project

Page 49: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SHARING A PROJECT

Leave opinion “Use project name …” and choose “Next” button

Leave “Use existing …” and choose “Next” button

Page 50: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SHARING A PROJECT

Now you can see, what project is appended into the CVS repository

Now press No button

Page 51: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

COMMIT CHANGES I

In the package Explorer now we can see uncommitted files – marked with ‘>’ character

For commit – mark requested files and choose with right click Team/commit

Page 52: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

COMMIT CHANGES II

In the next window write a commit comment

Now we can see a commit result

Page 53: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS IGNORE FILES I

Sometimes we need, that the CVS ignore some project files/directories (e.g. class output folder)

We can tell Eclipse to add this files to the cvsignore list

In the case, we choose Commit under the whole project, “ignored” files will not be committed and will not be marked as uncommitted

Page 54: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS IGNORE FILES II

Choose the Resource view Mark all files and directories, except bin directory

(output folder) Commit this files into the repository Now mark bin directory Now add files to .cvsignore

Page 55: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS IGNORE FILES III

Now the only uncommitted file is file: .cvsignore – let’s commit it

On the next screen you can choose possibilities for adding files to the cvsignore list

Add exactly defined file name Wildcard extension – file extension (e.g. *.class files) Custom pattern (regular expression for file names)

We will choose Resource(s) by name

Page 56: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS CHECKOUT

It’s the process of getting your own working copy of the CVS resource (module) from the repository

Change perspective to “CVS repositories“ Unfold the CVS repository/HEAD Choose checkout on the project THIRDPARTY Project THIRDPARTY will appear in the

workspace

Page 57: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG I

For tag – mark requested files (project) and choose with right click Team/Tag as Version

Page 58: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG II

There are uncommitted files in the project – tag will be applied only on the existing revisions

Page 59: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG III

Choose the tag name – it should use some system and be descriptive

Page 60: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG VI

File and its CVS history

Page 61: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG V

Show projects tags – refresh must be performed

Page 62: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS TAG VI

Project tags menu

Page 63: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CHECKOUT FROM TAG

Overview

Page 64: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

COMMIT TO THE TAG

It is unable to commit changes to the tagged version – tag is only mark

Page 65: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING I

Choose branching from menu

Page 66: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING II

Choose branch name

Page 67: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

BRANCHING III

File version after commit

Page 68: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. I

It is a process of comparing changes in your working copy of repository to the repository

According to the result of synchronization you can provide commit, update, add files to version control etc. on any resource or on all of them together

It is also possible to see the conflict places and you can resolve them one by one

After synchronizing you will see all differences between repository and your

workspace new view is open and you can switch between three

modes– Incoming Mode– Outgoing Mode– Incoming/Outgoing Mode

Page 69: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. II

Choose synchronization

Page 70: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. III

Incoming mode Files are marked with black arrows Files were changed and committed into the CVS by another user

and there is no conflict You can update your workspace files from repository You can compare file by double-clicking on it

Page 71: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. IV

Outgoing mode Files are marked with black arrows Show files, which are changed against the repository You can compare file by double-clicking on them

Page 72: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. V

Incoming-Outgoing mode Show both – incoming and outgoing mode together Files are marked with different arrows

Page 73: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. VI

Incoming mode Update

– This operation retake changes from repository – files are synchronized

Override and commit– This explicitly replace file in the repository with your local copy– Usually this is not a good practise

Outgoing mode Commit

– This will be propagate changes from your local copy into the repository

Override and Update– This will ignore changes, you have done in the workspace and

replace files from repository

Page 74: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

SYNCHRONIZATION WITH R. VII

File comparison You can compare incoming either outgoing files by double-

clicking on it For incoming files you can simply retake needed file lines

from repository file

Page 75: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

MERGE BRANCH INTO HEAD I

Checkout head version of the project Choose merge from Team menu

Page 76: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

MERGE BRANCH INTO HEAD II

Select start point

Page 77: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

MERGE BRANCH INTO HEAD III

Select point, from which to merge

Page 78: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

MERGE BRANCH INTO HEAD IV

Synchronize changes

Page 79: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT I

Developer A work on the file1, version 1.1 Developer B work on the file1, version 1.2 too They both work on the same part of the document Developer A commit changes into the repository Developer B is trying commit his changes too – CVS

will be report problem Developer B must merge his changes with changes from

developer A

Page 80: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT II

After synchronization

Page 81: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT III

Conflict lines

Page 82: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT VI

File after update

Page 83: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CONFLICT V

Merging changes

Page 84: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

DELETING A FILE I

Delete file from workspace

Page 85: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

DELETING A FILE II

Enter a commit info and commit

Page 86: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

DELETING A DIRECTORY I

When we want to delete a directory, its enough to delete all files in this directory

It is unable physically delete a directory from the CVS (from client application)

Page 87: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES I

Eclipse menu

Page 88: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES II

Team properties

Page 89: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES III

CVS properties

Page 90: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES IV

Team properties

Page 91: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES V

CVS properties

Page 92: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES VI

Ext Connection method

Page 93: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES VII

Label decorations

Page 94: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES VIII

Password management

Page 95: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES IX

Password management - general

Page 96: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES X

Password management – key management

Page 97: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES XI

File content

Page 98: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

ECLIPSE PROPERTIES XII

Ignored resources

Page 99: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

IMPORTANT NOTE

Be patient, when copy files(directories) from one directory to another

Directory contains CVS dir – information about directory placement in the repository

When commit is performed, the file from original location is modified

Page 100: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

© UNICORN 2004

CVS & COMMAND LINE

Page 101: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE I

Requirements Executable cvs in the path (cvs.exe in the Windows

systems) CVS connect string Work directory

Page 102: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE II

Define path to the CVS repository Externally – set environment variable CVSROOT

set CVSROOT= :pserver:vigc22@usocvs:2401/opt/cvs/CVSTrain

In the cvs command

cvs –d :pserver:vigc22@usocvs:2401/opt/cvs/CVSTrain …

Before we use cvs, we have to perform commandcvs login

Page 103: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE III

Checkout parameters-P – don’t check empty directories-D date – checkout file, not recent like date

-R recursive checkout (implicit parameter)-r tag – checkout with tag tag-d – checkout into the directory dir

Page 104: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE IV

Checkout – checkout THIRDPARTY from CVScvs checkout THIRDPARTY

Checkout only one filecvs checkout THIRDPARTY/lib/classes12.jar

Checkout project with tag and prune empty directoriescvs checkout –P –r TAG1 THIRDPARTY

Checkout project from Head from yesterdaycvs checkout –D yesterday THIRDPARTY

Update project cvs update

Page 105: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE V

Add new file(s) to the repository Add file as a text

Cvs add <filename> Add file as a binary

Cvs add –kb <filename>

The file has to be committed then

Page 106: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE VI

Commit (check-in) Commit is performed under the files in the module – the

working directory must be inside the project! When the comment is not set, the default editor is opened

and you have to write a commit comment Only changed files are committed into the repository When the project with branch is checked, the commit is

performed into the branch too

Commit all files in the current project (and in the subdirectories and add comment)

cvs commit –m “Bug ID 225 repaired”

Page 107: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE VII

Revisions – tagging in the checked projectcvs tag <tagname> Tag file with tag <tagname1> with tag <tagnamenew> toocvs tag –r <tagname1> <tagnamenew>

In the remote projectcvs rtag <tagname> <project-name>

Delete tag from projectcvs rtag –d <tagname> <project>

Page 108: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE VIII

Revisions – branching in the checked projectcvs tag –b <branchname> branch file with branch <b1> with branch <bnew> toocvs tag –b –r <b1> <bnew>

In the remote projectcvs rtag –b <branchname> <project-name>

Delete branch from projectcvs rtag –d <branchname> <project>

When branch is created, project has to be rechecked from CVScvs checkout –r <branchname>

Page 109: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS & COMMAND LINE IX

Removing files You should do:

Delete a file from disc cvs remove <filepath> Cvs commit

$ rm –f lib/classes12.jar$ cvs remove lib/classes12.jar

(cvs remove: Removing .cvs remove: scheduling lib/classes12.jar for removalcvs remove: use ’cvs commit’ to remove these files

permanently$ cvs commit –m “File removed”

Page 110: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS ENV VARIABLES I

$CVSIGNORE Whitespace-separated list of filename patterns,

which will be ignored $CVSWRAPPERS

Whitespace-separated list of filename patterns, which will be treat as wrappers

$CVSREAD Is set, checkout and update will try make files in

working directory as read-only $CVSUMASK

Controls permissions of files in the repository

Page 111: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS ENV VARIABLES II

$CVSROOT Full pathname to the CVS source repository

$EDITOR, $CVSEDITOR, $VISUAL Program for recording log messages during

commit $HOME, $HOMEPATH, $HOMEDRIVE

Used to locate directory with .cvsrc file $CVS_RSH

Specify external program, which cvs connect with, when :ext access method is used

Page 112: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

CVS ENV VARIABLES III

$CVS_PASSFILE Pass file, used when accessing server (or cvs

login server) $CVS_CLIENT_PORT

Port used for access to CVS server $CVS_CLIENT_LOG

File name used for debugging Comm from server $CVS_CLIENT_LOG.out Comm from server $CVS_CLIENT_LOG.in

Page 113: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA

Q & A

Page 114: CVS USING AND ADMINISTRATION. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A AGENDA