Version Control and Subversion Chris Coakley Outline What is - - PowerPoint PPT Presentation

version control and subversion
SMART_READER_LITE
LIVE PREVIEW

Version Control and Subversion Chris Coakley Outline What is - - PowerPoint PPT Presentation

Version Control and Subversion Chris Coakley Outline What is Version Control? Why use it? Using Subversion (SVN) What is Version Control? Alphabet Soup VCS, CVS, SVN, RCS A versioned backup system Restore project to a


slide-1
SLIDE 1

Version Control and Subversion

Chris Coakley

slide-2
SLIDE 2

Outline

 What is Version Control?  Why use it?  Using Subversion (SVN)

slide-3
SLIDE 3

What is Version Control?

 Alphabet Soup

 VCS, CVS, SVN, RCS

 A versioned backup system

 Restore project to a previous, working state

 A synchronized control system

 You can’t edit the same files I am editing  Well, not without making sure it works

slide-4
SLIDE 4

Intelligent Backups

 Reverse-Delta format

 Compression Scheme

  • Stores only differences (diff, patch)

 Most Recent Version is fastest retrieval

  • Applies patches to get old versions

 Attributes

 Who to blame / give credit  Named Versions

slide-5
SLIDE 5

Synchronized Control

 One person can edit a “file” at a time  Check-out/Check-in Model

 Nobody actually uses that (SourceSafe)  Dangling Check-out

 Check-in / Merge Model

 Make your changes  Fix Conflicts

 Fork Model

slide-6
SLIDE 6

Subversion Specifics

 Subversion fixes CVS problems

 Moving files to different directories  Atomic commits  Versioned Metadata

slide-7
SLIDE 7

Why?

 Can you think of any reason why not?

slide-8
SLIDE 8

Typical Subversion Uses

 Create a repository (once)  Import or Checkout repository (once)  Update and Checkin  Merge  Label

slide-9
SLIDE 9

Create a Repository

 Determine Structure  Determine Permissions

slide-10
SLIDE 10

Import or Checkout

 Import - I have the files and I want to put

them into the initial repository

 Checkout - I want to start working on an

existing repository

slide-11
SLIDE 11

Update and Check-in

 Update - Updates the local files to match

the central repository

 Check-in - Update the central repository

to match your local files

 Always update before checking in (svn

enforces this)

 Always test with the latest update before

checking in (not enforced)

slide-12
SLIDE 12

Merge

 We both update the same file at the same

  • time. What happens?

 Update tells me there is a conflict

 You checked yours in first

 I have to merge the two updates together.

 Before checking in

slide-13
SLIDE 13

Label a Version

 Interim Releases

 AKA - Hey, this one works!

 How do you maintain releases?

slide-14
SLIDE 14

Infrequent Uses

 Blame  Fork  Roll back

slide-15
SLIDE 15

Example Uses

 svn help import  svn import final-paper

http://192.168.1.102:8888/svn/xcp -m "Initial Import”

 svn checkout http://192.168.1.102/svn/re  svn status  svn up  svn add foo.c  svn ci -m “Program now cures cancer”  svn resolved conflictedfile.cpp

slide-16
SLIDE 16

Additional Help

 The Subversion book

 http://svnbook.red-bean.com/

 The Subversion website

 http://subversion.tigris.org/

 Tortoise svn client (Windows)

 http://tortoisesvn.tigris.org/