1.15k likes | 1.27k Views
CVS USING AND ADMINISTRATION. AGENDA. Purpose of Configuration management Work with CVS – philosophy Using CVS with Eclipse CVS Administration Q&A. INTRODUCTION TO CONFIGURATION MANAGEMENT. CONFIGURATION MANAGEMENT.
E N D
AGENDA • Purpose of Configuration management • Work with CVS – philosophy • Using CVS with Eclipse • CVS Administration • Q&A
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.
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
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.
IMPORTANT TERMS II • Product directory structure • Serves as a logically nested placeholder for all versionable product-related artifacts.
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.
The methods, processes, and tools used to provide change and configuration management for an organization can be considered as the organization’s CM System. 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
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
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
ANOTHER CM TOOLS • BitKeeper • Microsoft Visual Source Safe (VSS) • RCS • The CVS ancestor • Uses „Lock-Modify-Unlock“ system • SCCS • ClearCase • Subversion
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
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
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
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
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
CHECKOUT • Overview
COMMIT • Overview
UPDATE • Overview
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
REVISIONS II • Changes & revisions
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!
TAGGING I • Tagging is made under the files in the CVS
TAGGING II • Tags & revisions
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
CONFLICT II • Users are checking project from CVS
CONFLICT III • Both users modify the same file
CONFLICT IV • First user is able to commit changes, the second no
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
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)
BRANCHING II • Branches and commits
BRANCHING III • Merging changes into the head
REVISIONS & BRANCHES I • Revision with branches
REVISIONS & BRANCHING II • Branches and their revisions
PREREQUISITIES • Eclipse platform, version 3.0.1 (last stable) • J2SDK 1.4.2 • Shared repository /CVSTrain • Private repository (/cvs/TrainXX )
TRAIN PROJECT STRUCTURE I • Overview
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
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
ADD NEW CVS REPOSITORY II • In CVS perspective we must add new repository • Click by right mouse button into the CVS Repositories view
ADD NEW CVS REPOSITORY III • Now we add new repository location
ADD NEW CVS REPOSITORY IV • Now we see complete CVSROOT path in the CVS repositories view
SHARING A PROJECT • We will append the project in the Java perspective • Right click on the project Application and choose Team/Share project
Leave opinion “Use project name …” and choose “Next” button SHARING A PROJECT • Leave “Use existing …” and choose “Next” button
Now press No button SHARING A PROJECT • Now you can see, what project is appended into the CVS repository