Version Control with CVS Peter Dinda Department of Computer Science Northwestern University.

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

 Please sit next to your partner.  If you don’t have a partner, please find one now.
Version Control System (Sub)Version Control (SVN).
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Software Configuration Management Donna Albino LIS489, December 3, 2014.
SOFTWARE REVISION CONTROL WITH SUBVERSION Evan Dickinson & Andy Huang – 9 March 2011.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
A Crash Course in CVS 19 November 2003 Joe Vornehm Northwestern University ECE Department.
6/27/20151 Doris Lee Concurrent Version System (CVS)
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Introductory Concurrent Version System (CVS) UCR Technical Seminar 10/23/03 Dan Berger
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
G51FSE Version Control Naisan Benatar. Lecture 5 - Version Control 2 On today’s menu... The problems with lots of code and lots of people Version control.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Version Control. What is Version Control? Manages file sharing for Concurrent Development Keeps track of changes with Version Control SubVersion (SVN)
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 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 CVS Concurrent Versioning System CRASH COURSE! presented by Axel Polleres with improvements by Holger Lausen and Eyal Oren cf.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
Introduction to Version Control
Version Control with Subversion Quick Reference of Subversion.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Git – versioning and managing your software L. Grewe.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Object-Oriented Software Engineering Using UNIX groups and Subversion Estimated Time: minutes “Unix is user-friendly. It's just very selective about.
Object-Oriented Software Engineering Using UNIX groups and CVS Estimated Time: minutes.
Subversion (SVN) Tutorial Source:
…using Git/Tortoise Git
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.
DireXions – Your Tool Box just got Bigger PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond.
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.
Study for Migration from CVS to SubVersion (SVN) Gunter Folger CERN/PH/SFT.
CSE 219 Computer Science III CVS
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
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.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
WinCVS Training è Basic Concepts è Download & Setup è Importing a new module into CVS Repository è Getting new module from CVS è Getting Latest version.
Recitation 2: Abhijit Warkhedi2/25/20161 Today’s Agenda u CVS u GDB.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Lecture 5 Remotes Sign in on the attendance sheet! Turn in homework at the front!
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
© CGI Group Inc. User Guide Subversion client TortoiseSVN.
NALINI S. NAUTIYAL SYSTEM SOFTWARE DIVISION Subversion.
Using Subversion for Source Code Control Michael McLennan HUBzero® Platform for Scientific Collaboration Purdue University This work licensed under Creative.
1 Subversion Kate Hedstrom April Version Control Software System for managing source files –For groups of people working on the same code –When.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Subversion Subversion is a brand of version control software that is frequently used to store the code and documentation of a project so as to permit.
Version Control with Subversion
CVS – concurrent versions system
CVS – concurrent versions system
SVN intro (review).
An Intro to Concurrent Versions System (CVS)
slides borrowed and adapted from Alex Mariakis and CSE 390a
CVS Concurrent Versioning System
Concurrent Versions System
Presentation transcript:

Version Control with CVS Peter Dinda Department of Computer Science Northwestern University

What is Version Control? Go back in time –Undo nasty mistakes by you or others Coordinate among multiple developers –Avoid stepping on each others toes –Also for working on multiple machines Me: desktop, laptop, home machine Collective model of the “project” –Including multiple variants

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Add a new file (or directory) that everyone can see “OK” or “File already exists”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Commit my changes so everyone can see them “OK” or “Your files are out of date”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Update my local files to reflect all changes “OK” or “Your files conflict”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Call what I have “Release 1.0” “OK”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Create a separate version: “Release 1.0.joe” for local testing “OK”

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” “OK” Six Months Later Merge my special version back into the main product

What does it look like? Alice’s Local VersionJoe’s Local VersionJane’s Local Version All Versions of all the filesThe “Repository” Give me “Release 1.0” “OK” One Year Later Release 1.5-Joe causes injuries!

How do I get it? CVS –Free, works on Windows, Linux, Unix, etc. –Used a LOT, but has assorted cruft Subversion –Free, works on Windows, Linux, Unix, etc. –“A better CVS” – same commands, uses our old friend, Mr. Transaction, on top of BerkeleyDB Others (pay) –Visual Source Safe (MS) –Perforce (very highly regarded) –Generally pay to get better branching support

CVS The Easy Way Linux or Unix box –Probably already installed. Run “cvs”. –export EDITOR=“xemacs –nw” Default EDITOR is typically vi Windows box –Just install cygwin – it will just work –Various command-line and GUI-based cvs clients are also available

Do I need a special server? No. You just need a directory that’s accessible by all the developers. export CVSROOT=/home/pdinda/MYCVS No. Even if you want to use a remote machine, just use ssh: export CVS_RSH=ssh export CVSROOT= No. Even if you have multiple developers, just use Unix groups and the group sticky bit chown pdinda.mycvsgroup /home/pdinda/MYCVS chmod g+s /home/pdinda/MYCVS No. Don’t bother with “pserver” and “kserver” unless you need them. You almost certainly do not

Getting CVS Help cvs –help-commands –Does what you might expect cvs –H command –Tells you the details of the command There are lots of CVS commands. You only need to use a few: init, import, add, remove, checkout, commit, update, tag

Initializing the Repository Only done once cvs init Creates directory and initial files

Bringing a directory (module) into CVS cd btree_lab cvs import my_btree_lab PDINDA PDINDA0 –my_btree_lab – what I’m going to call it –PDINDA – my “Vendor tag” –PDINDA0 – my “Vendor release tag” IMPORTANT: btree_lab is *NOT* under the control of CVS. We must check out my_btree_lab first!

Checking Out a Module cvs checkout my_btree_lab cd my_btree_lab (start working)

How do I add files and directories? cvs add filesanddirectories cvs add –kb file –the file is binary –Most clients figure this out themselves, but it’s a good habit to have

How do I remove files and directories? cvs remove fileordirectory –“I don’t want cvs to manage this any more” cvs remove –f fileordirectory –“Not only should it not manage it, but delete my local copy too.” Note that remove and add affect the REPOSITORY. Recovery: The “Attic”

How do I commit? cvs commit [files] You may get “up to date check failed for..” –This means you need to update those files first and fix any conflicts before you can commit. Note that add/remove/edits/etc DO NOT GET REFLECTED IN THE REPOSITORY UNTIL YOUR COMMIT IS SUCCESSFUL

Getting Updates From The Repository cvs update [-d] [files] –-d => Get new subdirectories! –if files are not specified, everything in this directory and its subdirectories is updated

Understanding Updates An update MERGES the version of the file that’s in the repository into the one on your disk –You have A –Repository has B –After update, you have MERGE(A,B) Merges are not always possible automatically. –CVS punts to you if this happens, reporting a conflict –You have to resolve the conflict yourself –This is uncommon in most development because different developers are working on different files

What Versions do I have? cvs status [files] Each file and directory has a version number. –1.1, 1.2, … (first level) – , , … (one level branch)

What are all the versions? cvs log file cvs rlog module (directory)

How can I give versions names? Current version: –cvs tag name files –cvs rtag name module Other versions: –cvs tag –r version … –cvs rtag similar

How do I go back in time? cvs update –r version file cvs update –r tag file cvs update –D datetime file This makes the file “sticky”, meaning that subsequent updates will not move it to a newer version You can update out of the sticky version by using cvs update –A

Branching So far, we’ve treated each file/directory as having a sequence of versions (1.1, 1.2, etc) CVS lets you have parallel versions, turning the version “linked list” into a version “tree”. In theory, very useful for when one wants to take a large project and create a “side project” without affecting the main line of development

Merging Versions are actually DAGs. You can take your “side project” version and merge it back into the mainline of development. This all sounds awesome, but…

Branching/Merging has Problems Branching is easy, but merging is hard CVS basically gets this wrong And the problem is compounded because IT DOES NOT USE TRANSACTIONS FOR ANYTHING It also doesn’t really provide any tools for dealing with merge conflicts. So, a merge can end up half done! Blam: your project is in big trouble. Lack of transactions also bites you for updates and commits.

CVS Branch/Merge Advice Don’t use it. If you MUST use it, spend a lot of time making sure you understand it first. Buy a tool that supports this well^Wbetter if you need it.

Stupid Windows/Unix Issues Windows ends lines with \r\n –Sometimes likes to use Unicode too Unix ends lines in \n –And uses ASCII pretty much all the time CVS is line-oriented End result: be very careful in setting up your client on the foreign platform. Lots of web help on this, however.

Subversion An attempt to build a tool that has CVS’s command set but does not suffer from its problems –“svn” is the command –Big one: Transactions used throughout –Assorted bugs/misfeatures of CVS fixed in a way that is sensible Looks pretty good. We’re using it for developing a class. But I’m pretty happy with CVS too

For More Info / Downloads CVS: Subversion: –Free Book: Perforce: VSS: