Sophia Antipolis Introduction to version control David Rey – DREAM – 15 dec. 2004.

Slides:



Advertisements
Similar presentations
1 IST 410/420 Software Version Control 2 DevelopmentIntegration Test System Test User Acceptance Testing ProductionArchive DEVELOPMENTUSERS - Developers.
Advertisements

Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Concurrent Versions System Overview of CVS architecture. Repository structure.
Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Concurrent Versions System Overview of CVS architecture. Repository structure.
Version Control System (Sub)Version Control (SVN).
Concurrent Versioning System Chapter 8 (ALBING’s).
CVS Selim Çıracı Ahmet Kara Metin Tekkalmaz. CVS – Open Source Version Control System Outline What are Version Control Systems? And why do we need them?
CS 501 : An Introduction to SCM & GForge An Introduction to SCM & GForge Lin Guo
6/27/20151 Doris Lee Concurrent Version System (CVS)
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.
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
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)
European Organization for Nuclear Research Source Control Management Service (Subversion) Brice Copy, Michel Bornand EN-ICE 13 May 2009.
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 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.
©Kwan Sai Kit, All Rights Reserved Windows Small Business Server 2003 Features.
Source Code Management with CVS Kurt Wiersma December 2004.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Warmup A programmer’s wife tells him, “Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.” The programmer.
CVS 簡介 數位芝麻網路公司蔡志展 2001/8/18 大綱 • CVS 簡介 • CVS 安裝 • CVS 設定 (Linux/Windows) • CVS 指令簡介 • CVS 多人環境的應用.
Version control Using Git Version control, using Git1.
Subversion (SVN) Tutorial Source:
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
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.
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.
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.
DireXions – Your Tool Box just got Bigger PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
CSE 219 Computer Science III CVS
Visual SourceSafe Seamless Integration. 2 Agenda  Version Control  Architecture  Features  Integration  Configuration & Maintenance  Questions.
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.
1 MSTE Visual SourceSafe For more information, see:
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
Version Control System
Part 4: FCM and the UM University of Reading, December 2015.
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.
22 Copyright © 2008, Oracle. All rights reserved. Multi-User Development.
Warren Jones, Fluke Co., Eugene Kramer, Remedy Co. Introduction to CVS 1999 Revised by David Svoboda 2003 Concurrent Versions System Overview of CVS architecture.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
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.
Concurrent Versions System User guide for CS408
CVS – concurrent versions system
CVS – concurrent versions system
SVN intro (review).
An Intro to Concurrent Versions System (CVS)
Subversion.
Revision Control Daniel Daugherty
Concurrent Version System (CVS)
Amandeep Jawa Worker Bee Software
Concurrent Versions System
Introduction to The Git Version Control System
Presentation transcript:

Sophia Antipolis Introduction to version control David Rey – DREAM – 15 dec. 2004

Sophia Antipolis Overview l Collaborative work and version control l Main CVS user commands l Advanced use of CVS l CVS server at INRIA Sophia Antipolis

Sophia Antipolis Overview l Collaborative work and version control l Main CVS user commands l Advanced use of CVS l CVS server at INRIA Sophia Antipolis

Sophia Antipolis Collaborative work and version control: examples l Development Source files: C, C++, java, Fortran, Tcl, Python, shell scripts, … Build/config files: Makefile, ant, … l Text documents/articles/bibliographies Plain text Latex/bibtex l Web pages Html Php, javascripts, … l XML documents l...  ASCII documents

Sophia Antipolis A software development process at INRIA l INRIA recommandations about software development: l In particular, concerning version control:

Sophia Antipolis Version control main ideas l Distributed documents/collaborative work Automatic merging Alarms on conflicts Ease the communication between users (log messages, s, …) l Version control: incremental versions All previous versions available Minimal necessary disk space (incremental) History of changes/logs

Sophia Antipolis Version control software l CVS: l Arch: l Subversion: l Forges that use version control software: ( GForge : Savannah : savannah.gnu.orgsavannah.gnu.org LibreSource : libresource.inria.frlibresource.inria.fr Visual Source Safe (pour Windows) : msdn.microsoft.com/vstudio/previous/ssafemsdn.microsoft.com/vstudio/previous/ssafe

Sophia Antipolis CVS: Concurrent Version System l Widely used on a lot of different platforms (Linux, Windows, …) l Open source license l For local and/or distant usage l Recommended for INRIA software developments l Several clients possible Command line GUI: tkCVS, jCVS, WebCvs, Jalindi igloo, WinCVS, TortoiseCVS

Sophia Antipolis What CVS is for ? l Several users work together at the same time on the same files (concurrency) l Version control Tags Version comparisons Multiple lines of development in the same base Branching Support for binary files Event control (e.g. notification)

Sophia Antipolis What CVS is not for ? l Backup l Bug tracking l Source documentation l Dependencies l …

Sophia Antipolis Overview l Collaborative work and version control l Main CVS user commands l Advanced use of CVS l CVS server at INRIA Sophia Antipolis

Sophia Antipolis CVS: client/server architecture 2 possibilities:  Shared directory CVS server CVS Clients Local Client/Server CVS Clients

Sophia Antipolis CVS hierarchy l Repository root or “CVSROOT” Looks like “cvs-sop.inria.fr:/CVS/SmartTools” set the CVSROOT environment variable on UNIX systems configure an item in the setup menus of a GUI client Use the command line: cvs –d CVSROOT l Modules For example SmartTools uses 3 modules: SmartTools, SmartToolsAddons, Documents l Directories Each module contains an arbitrary hierarchy of directories l Files (incremental diff versions of)

Sophia Antipolis CVS hierarchy : an example cvs-sop.inria.fr:/CVS/SmartTools REPOSITORY (CVSROOT) SmartToolsAddons SmartTools Documents ant demo doc src eg.exe web latex MODULES FOLDERS AND FILES

Sophia Antipolis CVS help cvs --help-commands (list available commands) cvs --help-options (list general options) cvs -H import (specific help for a command and its specific options, e.g. “import”)  CVS general options + specific command options are different : cvs [general options] [specific options]

Sophia Antipolis CVS --help-commands

Sophia Antipolis CVS --help-options

Sophia Antipolis CVS -H import

Sophia Antipolis Import l Used to synchronize a local tree as a whole with the server l Most often used to initialize the server tree l Can also be used after this initial step at any time (to avoid one-by-one files addition) l cd local_directory l cvs import –m “message” directory_on_base branch_name version_name

Sophia Antipolis Checkout and update l cvs -d cvsroot checkout module_name l cvs update –d directories/files U: updated P: the version on the server is newer and the local copy has been updated M: modified (or merged), the local file is different from the server file and merge was done in the local copy ?: unknown, this file is present locally and not in the CVS base A: added, this file is present locally and has been added (before commit) R: removed, this file is not present locally and has been removed (before commit) C: conflict, the local file has been marked with conflict markers which identify the different conflict locations

Sophia Antipolis Checkout: example

Sophia Antipolis Update: example

Sophia Antipolis Commit l cvs commit -m “my message” directories/files l Always use explicit messages !!! l List of forbidden messages: “my message” “”  ? “modification of file toto.tex”  which modification ? “bug fixed”  which bug ? …

Sophia Antipolis checkout Ideal Development (1/4) base Developer A Developer B

Sophia Antipolis development Ideal Development (2/4) base Developer A Developer B

Sophia Antipolis checkin Ideal Development (3/4) base Developer A Developer n

Sophia Antipolis update Ideal Development (4/4) base Developer A Developer B

Sophia Antipolis checkin Real Development (1/5) base Developer A Developer B

Sophia Antipolis checkin X Real Development (2/5) base Developer A Developer B

Sophia Antipolis Real Development (3/5) base Developer A Developer B update conflict

Sophia Antipolis Real Development (4/5) base Developer A Developer B Conflict Resolution

Sophia Antipolis Real Development (5/5) base Developer A Developer B checkin

Sophia Antipolis Conflicts l Do not panic! Many problems are easy to fix Generally, it does not require a lot of interaction l If necessary, discuss with people to find a compromise Meetings Phone … l Usually can be avoided with regular updates

Sophia Antipolis Status, log, diff, annotate l cvs status filename Gives information about local file with comparison to base file l cvs log filename Show all the previous versions number, comitter, date and number of lines modified l cvs diff filename Show lines where there are differences between local and base file l cvs annotate filename Gives information line by line: version of introduction, who, when

Sophia Antipolis Status examples

Sophia Antipolis Log examples

Sophia Antipolis Diff examples

Sophia Antipolis Annotate examples

Sophia Antipolis Tagging l Tag = string marker which is applied to the status of a part of the CVS hierarchy l Often used to mark a given version of the cvs repository with a string which refers to a version of the software released l Easily get back specific versions of the software Use/distribute a given released version Reproduce bugs for a given release version l Only files are tagged l cvs tag –r 1.2 tagname files cvs rtag tagname files (latest version in the base is tagged)

Sophia Antipolis Add, delete, and move files l cvs add filenames l Produces a message that explains that a commit is necessary l cvs commit -m “addition of files bla…” directories/files Files have to be locally deleted: rm filenames Produces a message that explains that a commit is necessary l cvs remove filenames l cvs commit -m “removed files bla…” directories/files l Trace of deleted files in Attic directories on the CVS base l Move = add + delete, with an explicit message to keep a trace of the old names

Sophia Antipolis Add, delete, and move folders l As simple as files for addition; do not need a commit command to take effect l Not possible to delete and/or move folders! Except with “hard” intervention, cf. advanced use of CVS section

Sophia Antipolis Summary of the main commands cvs [cvs-options] command [cmd-options] [directories/files] cvs importimport files from a local directory to the cvs base cvs checkoutcopy on a local disk a given version of the cvs base cvs commitapply the modifications of the local copy to the cvs base cvs updateupgrade the local copy with a version of the cvs base cvs addadd a file to the cvs base cvs removeremove a file from the cvs base cvs statusshow the status of a local file wrt the cvs base cvs logshow the different previous commit stages cvs diffshow lines in local and server files that differ cvs annotateshow information line by line of a version in the cvs base cvs tag (or rtag)put a tag to identify a given version of the cvs base

Sophia Antipolis Overview l Collaborative work and version control l Main CVS user commands l Advanced use of CVS l CVS server at INRIA Sophia Antipolis

Sophia Antipolis CVS Administration l Modules administration l Usage definition Events control ( s, …) Watch/edit

Sophia Antipolis CVS base configuration l CVSROOT Module (exists by default) cvs checkout CVSROOT l Configuration files modules, modules definitions cvswrapper binary files control cvsignore list which files CVS has to ignore (*.o, …) commitinfo, editinfo, loginfo, notify, rcsinfo, taginfo make it possible to configure actions with respect to specific CVS operations

Sophia Antipolis Binary files in CVS base l No real version control (diffs don’t work) l Binaries are corrupted if treated as ASCII files Can be done with command line: cvs add –kb filename l Can be forced for known extensions Configuration file: cvswrapper

Sophia Antipolis Configuration file for binary extensions: examples

Sophia Antipolis Recursion with CVS l Check each command to see if it is recursive or not Add is not recursive, update is recursive, … l Read the cvs manual (note we are in the « advanced section » of the expose)

Sophia Antipolis Windows users l Several CVS clients: webCVS, winCVS, … l Possible use of CVS with ssh under Windows via putty (Windows ssh client)  contact me l Problems with line ending … always edit files on the platform where the checkout has been done!

Sophia Antipolis Branching l Branching is easy… merging is not! l When ? Before a release (“freeze” the code in a branch) For parallel development that will not be integrated directly For someone developing during a training period For some “research code” For a specific application (e.g. dedicated to a given client)

Sophia Antipolis Direct manipulations on the server l To restructure a repository (e.g. move or delete folders) l To check for possible problems l For instance, administrators of a CVS repository at Sophia can connect to the server via ssh: ssh cvs-sop.inria.fr cd /CVS/SmartTools

Sophia Antipolis Overview l Collaborative work and version control l Main CVS user commands l Advanced use of CVS l CVS server at INRIA Sophia Antipolis

Sophia Antipolis Admistrated by the semir l Semir page about the INRIA cvs server: l Hotline SEMIR to open a new repository: “Logiciels/Outils” then “Agenda, CVS, FTP, MYSQL” Chose “CVS” and “Creation” …

Sophia Antipolis ssh access l Good level of security for the authentication l l In actual using, only few differences: cvs -d checkout web

Sophia Antipolis Administrative tasks l Standard CVS administration (cf. “CVSROOT” Module) l “Admin” module automatically in the repository when created by the SEMIR 3 files: group-def, modules-def, passwd-def l group-def: define and describe groups of users l modules-def: define access rights for each module wrt groups (ssh, anonymous) l passwd-def: define and describe accounts (username, crypted password and ) for non INRIA users

Sophia Antipolis References and links l CVS: l GUI: l INRIA server: l CVS Configuration et mise en œuvre. Frédéric Lepied. O’Reilly Eds. (available at the documentation centre of INRIA Sophia: ref. O356 )

Sophia Antipolis Closing remarks & Questions l Use version control systems from the start When working alone or in a group For development projects or scientific papers When tag released versions l Handy FAQ’s on the CVS home site Next seminar is next year! January 13th on Refactoring