CVS & Version Control Presenter: Eric Seidel ‘03, Math Major Brought to you by your LU CS Club Part of the mini-course series: “The Liberal CS Major.”

Slides:



Advertisements
Similar presentations
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Advertisements

Version Control CS440 – Introduction to Software Engineering © 2014 – John Bell Based on slides prepared by Jason Leigh for CS 340 University.
Simple Git Steve Pieper. Topics Git considerations and Slicer Git as if it were svn Git the way it is meant to be.
Software Configuration Management Donna Albino LIS489, December 3, 2014.
Version Control System Sui Huang, McMaster University Version Control SystemSui Huang, McMaster University Version Control System -- base on Subversion.
2/6/2008Prof. Hilfinger CS164 Lecture 71 Version Control Lecture 7.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
CVS II: Parallelizing Software Development Author: Brian Berliner John Tully.
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
1 CMPT 275 Software Engineering Revision Control.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Software Configuration Management CSC-532 Chandra Shekar Kandi Chandra Shekar Kandi.
David Stotts UNC Computer Science (2013) with slides from a talk by Karsten Dambekalns (2005)
SubVersioN – the new Central Service at DESY by Marian Gawron.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Version control Using Git 1Version control, using Git.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
1 Topics for this Lecture Software maintenance in general Source control systems (intro to svn)
Software Engineering Modern Approaches
Source Code Management with CVS Kurt Wiersma December 2004.
Introduction to Version Control
1 Lecture 19 Configuration Management Software Engineering.
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱 • CVS 簡介 • CVS 安裝 • CVS 設定 (Linux/Windows) • CVS 指令簡介 • CVS 多人環境的應用.
Version control Using Git Version control, using Git1.
1 SEG4912 University of Ottawa by Jason Kealey Software Engineering Capstone Project Tools and Technologies.
…using Git/Tortoise Git
Chris Onions Getting started with CVS in ATLAS 11 Getting started with CVS in ATLAS Chris Onions (Tutorial based on that of Raúl Ramos Pollán CERN / IT.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
An Intro to Concurrent Versions System (CVS) ECE 417/617: Elements of Software Engineering Stan Birchfield Clemson University.
Subversion (SVN) A Revision Control System Successor to CVS Carlos Armas Hervey Allen.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
CSE 219 Computer Science III CVS
1 Brief Introduction to Revision Control Ric Holt.
ClearCase Concepts and Terminology
11 Version Control Systems Mauro Jaskelioff (originally by Gail Hopkins)
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
CVS: Concurrent Version System Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third.
P51UST: Unix and SoftwareTools Unix and Software Tools (P51UST) Version Control Systems Ruibin Bai (Room AB326) Division of Computer Science The University.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control and SVN ECE 297. Why Do We Need Version Control?
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
JRA1 Meeting – 09/02/ Software Configuration Management and Integration EGEE is proposed as a project funded by the European Union under contract.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
NALINI S. NAUTIYAL SYSTEM SOFTWARE DIVISION Subversion.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
CS5220 Advanced Topics in Web Programming Version Control with Git
Information Systems and Network Engineering Laboratory II
LECTURE 2: Software Configuration Management
An Intro to Concurrent Versions System (CVS)
Version control, using Git
CS5220 Advanced Topics in Web Programming Version Control with Git
Concurrent Version Control
Version Control System
LECTURE 3: Software Configuration Management
Git started with git: 2018 edition
Systems Analysis and Design I
Presentation transcript:

CVS & Version Control Presenter: Eric Seidel ‘03, Math Major Brought to you by your LU CS Club Part of the mini-course series: “The Liberal CS Major.”

“The Liberal CS Major” Mini-Course series presented by the LU CS clubs to “fill the gaps” of the Lawrence CS Major Future Topics Administering Apache, CS Club Getting Around Linux/Unix, CS Club BSD Socket Programming, CS Club Topics in Networking, Robert Lowe

Tonight’s Outline The Problems of Development Understanding Version Control The Solution that is Version Control CVS: The Good/The Bad Other Version Control Technologies Further Information Q&A

The Problems of Development

Development Scenario #1 You are writing a paper in collaboration with another person. You wish to allow them to make corrections to your work, while still allowing you to continue changing your copy of the work. You also wish to allow your editor to work on paper copies of your work which might be as much as a week behind your latest corrections, and still be able to benefit from his changes! Is this possible?

Development Scenario #2 You’re working on the 2.0 version of “your great app.” But 2.0 doesn’t quite compile yet… and customer finds a critical bug in 1.0, which must be fixed ASAP. If you're smart, you have a copy of your 1.0 source.You make the change and release, but how to you merge your changes into your 2.0 code? If you're not so smart, you have NO source code saved. You have no way to track down the bug, and you loose face until 2.0 is ready.

Development Scenario #3 Your working on a large scale development project. But you believe one of your team members has added malicious code to the project. How do you monitor what they’ve changed in your 10,000 line, or 100,000 line project? i.e. How do you add accountability to a text file?

The Answers It is these questions and more, that version control tries to answer. But before we answer them, lets look a little at how version control works…

Understanding Version Control

Terminology SCM (Source Code Management) - Category of software including Version Control. RCS (Revision Control System) - The father of SCM. CVS (Concurrent Versions System) - The poster child for Version Control. Repository - The central storage location for files under version control. Workspace - Location of files “checked out” from a Version Control repository.

The General Idea Version Control allows you a place to store your work as it progresses, and allows you instant recall of any work from any point in time. It also can allow others to recall communal (or just your) work at any time, in a read only fashion, or also to make changes themselves.

Workspaces & Repository Your Workspace Cover.rtf(ver 1.2) Chapter 1.txt(ver 1.32) Chapter 2.txt(ver 1.20) Chapter 3.txt(ver 1.14) Repository Cover.rtf(ver 1.2) Chapter 1.txt(ver 1.32) Chapter 2.txt(ver 1.20) Chapter 3.txt(ver 1.15) Workspace

The Repository The repository holds information including dates, labels, branches, versions, etc. The repository holds just the changes between versions, saving space. Also referred to as the a “depot” or “root” Often held on a central server

Checkout & Commit Workspace Cover.rtf(ver Modified) Chapter 1.txt(ver 1.32) Chapter 2.txt(ver Modified) Chapter 3.txt(ver 1.14) Chapter 4.txt(ver New) Repository Cover.rtf(ver 1.2) Chapter 1.txt(ver 1.32) Chapter 2.txt(ver 1.20) Chapter 3.txt(ver 1.14) Commit Repository Cover.rtf(ver 1.3) Chapter 1.txt(ver 1.32) Chapter 2.txt(ver 1.21) Chapter 3.txt(ver 1.14) Chapter 4.txt(ver 1.1) Checkout & Modify

Checkout With checkout commands, one can summon files or sets of files from the repository based on date, tag, branch, or any of a number of other criteria.

Update Workspace Cover.rtf(ver Updated) Chapter 1.txt(ver 1.35) Chapter 2.txt(ver Conflict) Chapter 3.txt(ver 1.18) Chapter 4.txt(ver New) Repository Cover.rtf(ver 1.4) Chapter 1.txt(ver 1.35) Chapter 2.txt(ver 1.22) Chapter 3.txt(ver 1.18) Chapter 4.txt(ver 1.3) Update Workspace Cover.rtf(ver 1.2) Chapter 1.txt(ver 1.35) Chapter 2.txt(ver 1.21) Chapter 3.txt(ver 1.14)

Update Update commands will automatically bring your workspace up-to-date with the latest (or however you specify) files from the repository. Update automatically merges non-exclusive changes between files and initiates conflict resolution if necessary. Updates involving conflicts solicit information from the user how they wish to have a conflict resolve.

Simple Repository Files are stored and associated with version numbers: 1.1 (or 1.1.1) for the first, and then 1.2 for the second revision, etc. Only changes between files are stored. Version numbers: 1.. e.g for version 1 of a branch from 1.2

Branches Branches break one set of code from another. Are useful when “branching” before a release. Are useful for testing experimental code. Can be merged between branches or into the main trunk.

Tags Tags associate multiple files and can be used to mark versions, printings, special dates, etc. Developers can check out by tags Tags can affect 1 or many files.

A More Complex Repository network.cpp branch merge branch

Diff Results The Unix diff utility and built-in diff functionality in all SCM products allows you to see exactly what is different between any two files. Great for finding changes causing bugs! [seidele-1:~/proj/math_book] cvs diff Chapter1.txt cvs server: Diffing Chapter1.txt 1c1 < Using our Monotone Convergence Theorem, we now see that y must tend to 2 as x approaches infinity. --- > Using our monotone convergence theorem, we now see that x must tend to 2 as y approaches infinity. cvs server: diff complete.

History Information All SCM products provide some method by which a user can obtain the history of commands issued to the CVS server. Useful for tracing who did what at the command level.

File Annotation Allows you to see who changed what when, line by line. Useful for tracking bugs. Can be used in combination with diff and history for even more information.

Locking Most SCM implementations provide a method by which you can “lock” files you are working on if necessary. Thus disallowing anyone else to commit changes before you have made yours. Can be useful when writing prose - since changes tend to be more dramatic. Useful when editing sensitive parts of code - users are forced to look at your changes before making theirs.

The Solution that is Version Control

Development Scenario #1 You are writing a paper in collaboration with another person. You wish to allow them to make corrections to your work, while still allowing you to continue changing your copy of the work. You also wish to allow your editor to work on paper copies of your work which might be as much as a week behind your latest corrections, and still be able to benefit from his changes! Answer: Version Control

Scenario #1 Answers If you and your collaborators use version control, you can each make changes to the same file have them merge, and be able to monitor what each other have changed. You can also check out the same version from the repository that you printed for your publisher, make changes on that, and merge those into your most recent version.

Development Scenario #2 You’re working on the 2.0 version of “your great app.” But 2.0 doesn’t quite compile yet… and customer finds a critical bug in 1.0, which must be fixed ASAP. If you're smart, you have a copy of your 1.0 source.You make the change and release, but how to you merge your changes into your 2.0 code? If you're not so smart, you have NO source code saved. You have no way to track down the bug, and you loose face until 2.0 is ready. Answer: Version Control

Scenario #2 Answers Using Version Control, you can commit and tag your releases. You are then able to recall the exact code your customer is using at any time. Branches allow you to break off 1.x development, and later merge in the changes to benefit from your bug fixes. Version Control also helps in tracking bugs. Maybe it was in 1.0.2, but not in 1.0.1? Good place to check is a to diff.

Development Scenario #3 Your working on a large scale development project. But you believe one of your team members has added malicious code to the project. How do you monitor what they’ve changed in your 10,000 line, or 100,000 line project? i.e. How do you add accountability to a text file? Answer: Version Control

Scenario #3 Answers With diff and history functionality, you can track exactly what each of your contributors has done. 3rd party tools such as Tinderbox from the Apache project help developers “blame” the right people for bugs, etc. Using history functions, you can also prepare reports supporting how much (or little) effort you yourself have put into the project.

Other Common Uses Websites are often kept in Version Control, especially when maintained by more than one person. Individuals often use Version Control even for small projects to help with bug isolation, and to prevent “getting lost in ones own code.”

CVS: The Good / The Bad

About CVS CVS is the most popular, and one of the oldest forms of Version Control. CVS started as a bunch of shell scripts written by Dick Grune, posted to the newsgroup comp.sources.unix in December, Much of the current CVS conflict resolution algorithms are derived from those scripts. In April, 1989, Brian Berliner designed and coded CVS in C. Jeff Polk later helped Brian with the design of the CVS module and vendor branch support. CVS has since grown to be the de facto standard for version control, despite a raft of design problems. CVS is open source and is maintained by developers at

The Good Extremely Popular Free & Open Source Simple & Effective Ships on nearly every Linux/Unix OS Many 3rd party tools designed for CVS A good start to Version Control Long history

The Bad Maintains NO file meta-data Serving was an afterthought Poor Branching Poor Permissions No “change sets” Non Atomic Security was an afterthought Slooooooower than molasses Single Repository No language support Only supports ASCII Text (not Unicode)

Other Version Control Technologies

Subversion Good Free & Open Source Designed to serve Host of improvements on CVS Fast Partially CVS Compatible Bad Apache dependant Still in 0.15 Beta

Perforce Good Free to Open Source High performance Great support Partially CVS Compatible Bad $$ Expensive Bigger & more complex than CVS Single Repository

Other Products BitKeeper - VOODOO Server- ClearCase - RCS (Revision Control System) Sun Forte/Teamware -

Further Information

Web Resources –The Home of CVS –Subversion Home –Perforce Home loperTools/cvs/cvs_stoc.htmlhttp://developer.apple.com/techpubs/macosx/Deve loperTools/cvs/cvs_stoc.html –Apple’s guide to using CVS.

Web Resources (cont) –A CVS GUI – Two CVS related tools. For kicks, just go to mozilla.org and look at tree status. Then you’ll understand the real use of Version Control. –The father’s of Free Software (as in speech). And tools such as RCM.

Conclusion Version Control tools such as CVS can be immensely helpful to developers and writers. SCM is mandatory in real world development. Hopefully you have at least a beginning idea of how Version Control might be helpful to you in your work.

Q & A Eric Seidel ‘03

Credits Parts of “About CVS” paraphrased from the CVS Graphs made with OmniGraffle from All other text is original work by the author. Those wishing to reproduce, or represent this work, are free to do so, and are asked as a curtousy to notify the author if possible.