Introductory Concurrent Version System (CVS) UCR Technical Seminar 10/23/03 Dan Berger

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

Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Concurrent Versions System Overview of CVS architecture. Repository structure.
Concepts of Version Control A Technology-Independent View.
Version Control with CVS Peter Dinda Department of Computer Science Northwestern University.
Using subversion COMP 2400 Prof. Chris GauthierDickey.
Version Control using Subversion Albert Young-Sun Kim November 2 nd, 2005 Available at entations/ subversion/
Source Code Revision Control with Subversion Christophe Dupré May 13, 2005 Update KEJ May 10, 2006 Scientific Computation Research Center Rensselaer Polytechnic.
Concurrent Versioning System Chapter 8 (ALBING’s).
CVS II: Parallelizing Software Development Author: Brian Berliner John Tully.
Version Control and Subversion Chris Coakley. Outline What is Version Control? Why use it? Using Subversion (SVN)
CVS Workshop I Arthur Chan. This workshop CVS overview (10%) Basic CVS commands (40%) Practical Issues in using CVS (50%) My experience in real-life For.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
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)
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
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 with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Subversion. What is Subversion? A Version Control System A successor to CVS and SourceSafe Essentially gives you a tracked, shared file system.
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.
CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱 • CVS 簡介 • CVS 安裝 • CVS 設定 (Linux/Windows) • CVS 指令簡介 • CVS 多人環境的應用.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
…using Git/Tortoise Git
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
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.
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.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
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.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
CSE 219 Computer Science III CVS
Refactoring and Synchronization with the StarTeam Plug-in for Eclipse  Jim Wogulis  Principal Architect, Borland Software Corporation.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
CVS – concurrent versions system AROC Guatemala July 19-23, 2010 Guatemala City, Guatemala.
1 CSE306 Operating Systems Projects CVS/SSH tutorial.
WinCvs. WinCVS WinCvs is a window based version control system. Use WinCvs when  You want to save every version of your file you have ever created. CVS.
CVS: Concurrent Version System Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third.
GIT.
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
Version Control *Slides are modified from Prof. Necula from CS169.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
Part 4: FCM and the UM University of Reading, December 2015.
Presentation OLOMOLA,Afolabi( ). Update Changes in CSV/SVN.
CVS Commands 數位芝麻網路公司蔡志展 2001/8/18 CVS Commands • add • Add a new file/directory to the repository • admin • Administration front end for rcs • annotate.
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.
Unified Noah LSM Code Management Using CVS Mukul Tewari 1, Mike Ek 2, Kevin Manning 1, Fei Chen 1 and Ken Mitchell 2 1 NCAR, Boulder, CO 2 NCEP/EMC, Camp.
A primer to using CVS Rob M Baxter, Stephen P Booth, Joachim Hein.
Add New File or a Directory to a Project in the Repository.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Revised by David Svoboda 2003 Concurrent Versions System Overview of CVS architecture.
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.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Problem Solving With C++ SVN ( Version Control ) April 2016.
CVS – concurrent versions system
CVS – concurrent versions system
SVN intro (review).
An Intro to Concurrent Versions System (CVS)
Subversion.
Concurrent Version Control
CVS Concurrent Versioning System
Amandeep Jawa Worker Bee Software
Git started with git: 2018 edition
Commit The Changes By: Swetha Kendyala
Presentation transcript:

Introductory Concurrent Version System (CVS) UCR Technical Seminar 10/23/03 Dan Berger

Adgenda Introduction –What is configuration management? –Key concepts. CVS Workflow –Copy-Modify-Merge Getting Started with CVS –Creating a repository –Importing assets –Checking in & Checking Out Using CVS –Managing Change

Introduction: What is CM? Record Keeping –What assets (source, binary) went into producing some product? –What did this asset look like at some point in the past? Collaboration –Who's working on which assets? –Who worked on this asset last? –Who made a specific change to this asset (and when?)

Introduction: Key Concepts Repository: The “master” copy of the assets. –Contains all revision history for all assets. Working Directory (aka sandbox): a developers private copy of the assets. –Contains a copy of a particular version of assets.

CVS Workflow CVS allows multiple people to be working on the same set of assets at the same time. Copy-Modify-Merge means you take a copy of the assets, modify your local copy, and merge your changes back in to the master repository.

CVS Workflow (cont.) cvs checkout –edit to your hearts content… cvs update –resolve conflicts cvs commit

Getting Started w/ CVS Creating a Repository (one time only) Importing Assets Checking out a working copy Viewing changes Committing changes Working with previous versions

Creating a Repository % export CVSROOT=~/CVSRoot % cvs init % ls –l ${CVSROOT} drwx CVSROOT/ There are some magic files in ${CVSROOT}/CVSROOT – ignore them for now.

Importing Assets importing places a copy of an existing directory tree (rooted at `pwd`) into the repository cvs import mod-path vendor release –mod-path is the directory under $CVSROOT to import the files into –vendor and release are more complicated but (for our purposes) less important. I suggest vendor=`whoami`, release=“initial”.

Importing Assets Example % cvs import cvs-seminar/hello- world\ `whoami` initial \ –m “initial import” N cvs-seminar/hello-world/hello.C N cvs-seminar/hello-world/Makefile No conflicts created by this import

Importing Assets (Cont.) Importing assets doesn’t touch the files in the current directory. That also means changes to the files in the working directory aren’t tracked. We need to get a copy from the repository first…

Getting a Working Copy % cvs checkout \ cvs-seminar/hello-world cvs checkout: Updating cvs-seminar/hello-world U cvs-seminar/hello-world/Makefile U cvs-seminar/hello-world/hello.C % ls –l cvs-seminar/ CVS/ % ls –l cvs-seminar/hello-world CVS/ hello.C Makefile

Viewing Changes Imagine we changed the files – fixing the typo in hello.C and adding a default target to the Makefile. Before we commit these changes, we’d like to see what we actually changed: cvs can show us which files have changed, and/or the specific changes to the files.

cvs -n update % cvs –n update cvs update: Updating. M Makefile M hello.C ? hello the leading “M” indicates the file has been Modified. The “?” means the file isn’t being managed by CVS.

cvs diff % cvs diff hello.C Index: hello.C ========================================= RCS file: … retrieving version diff –r hello.C 11c11 < cout << “Helllo, world!” << endl; --- > cout << “Hello, world!” << endl;

cvs status cvs status will tell you the status of a file in your working copy. % cvs status hello.C =================================== File: hello.C Status: Up-to-date Working revision: x.x Repository revision: x.x …

Adding Files CVS will essentially “ignore” new files, until you tell it they’re important and should be managed. % cvs add README cvs add: scheduling file ‘README’ for addition cvs add: use ‘cvs commit’ to add this file permanently

Deleting Files first, remove the file from your working copy (with rm), then % cvs delete file cvs remove: scheduling `FILE’ for removal cvs remove: use ‘cvs commit’ to remove \ this file permanently % cvs commit Removing FILE; …/FILE,v <-- FILE new revision: delete; previous revision: 1.1 done

Removing Files (cont.) CVS doesn’t actually remove the file, it places it into the Attic. –You can still retrieve any version of the “deleted” file: % cvs up –r X.Y FILE U FILE

Renaming One place where CVS makes life difficult*. Renaming files is non-trivial. Two methods: –one that preserves change history, but requires file system access to the repository, –and one that breaks change history but can be done completely through the client.

Renaming: The Easy Way % cp old-name new-name % rm old-name % cvs delete old-name % cvs add new-name % cvs commit You can explain the rename in the log message, and point viewers to the old- name for complete revision history.

Committing Changes Once we’re happy with our changes, we need to commit them to the repository. We can commit all our changes, or changes to an individual file (often dangerous).

Checking In Example % cvs commit cvs commit: Examining. Checking in Makefile; …/Makefile,v <-- Makefile new revision 1.2; previous revision 1.1 RCS file: …/README,v done Checking in README: …/README,v <-- README initial revision 1.1 done Checking in hello.C …/hello.C,v <-- hello.C new revision 1.2; previous revision 1.1 done

Working with Versions the –r tag can be provided to CVS commands, and it will cause them to affect a specific version of the named asset. For example: % cvs diff –r 1.1 Makefile You can also check out previous versions of files ( cvs co –r x.x filename ), and even commit to (branch from) previous versions of files.

Diff and Patch Not strictly CVS related, but terribly valuable tools. diff generates the differences between two (sets of) files. patch can apply that set of differences to another file

Diff Example Say I have two copies of my project: –unmodified-copy and modified-copy % diff –Naurw unmodified-copy \ modified-copy CVS will do this also, without having two versions checked out: % cvs diff –auw –r other-version

Patch Example Once I have a unified diff (the –u to diff), I can apply the changes specified in the diff to another file: % patch < diff-file This also works with trees of files. Read the man page to patch for more options.

CVS Version Numbers Imported files have an initial version of – there’s a reason, but for now just ignore it. “Normal” version numbers are w.x – cvs automatically increments x each time you commit changes to the file. It never automatically increments w. –If you branch a file, it’s version number becomes w.x.y.z. We’re not going to talk about branches in this talk. (Advanced CVS, anyone?)

CVS Magic Strings Some strings have special meaning to CVS, and if they appear in your files, CVS will “evaluate” them during checkout. –$Id:$ is the most common/useful, it gets evaluated to a string of the form: $Id: Makefile,v /10/20 \ 23:08:20 dberger Exp $

CVS and Binary Files CVS assumes that files are text unless told otherwise. This can cause issues if a binary file (like a jpg, PDF, etc.) contains one of the magic strings mentioned above. This can be handled two ways: file-by-file, or by file extension: % cvsadmin –kb file or adding the extension to cvswrappers (more later)

${CVSROOT}/CVSROOT CVSROOT/ contains control files – many of which are only interesting if you’re using CVS in a group. –CVSROOT is just another module – so you can check it out/diff it/commit to it. –DON’T TOUCH THESE FILES DIRECTLY! Remember “cvswrappers”? It lives here – it allows hooks to run when files go in or out of CVS. There’s a sample linked from the tech seminar page.

Accessing CVS Remotely Three methods, pserver, rsh, ext. pserver is a cvs-specific network protocol, it’s not encrypted and has to be setup by the remote admin – so we’re going to ignore it. rsh is just too horrible for words, which leaves ext: % export CVS_RSH=ssh % export CVSROOT= \ note that cvsroot is the directory containing CVSROOT/

Remote CVS (cont.) Note that if your CVS repository is NFS exported and always available directly (I.e. it’s in your home directory), you don’t need to use the ext method to reach it. % export CVSROOT=/home/…/CVSRoot

What We Didn’t Cover cvs watchers and editors anonymous cvs CVS and IDE’s (emacs/eclipse, etc) Permissions Tagging Branching Merging Detecting and Resolving Conflicts …

Subversion a “better” CVS You can’t set it up for yourself (it’s repository can’t live on an NFS share, like your home directory). The command line interface is very similar (intentionally).

Where to Find More CVS Home Page: CVS Online Book: CVS GUI’s: –TortoiseCVS (Windows Explorer Extension): Subversion Home Page: Subversion Online Book (draft): bean.comhttp://svnbook.red- bean.com