Subversion (SVN) - Version Control

Date: 
Wednesday, January 13, 2010

Announcements:

Check out upcoming meetings page on uaweb.arizona.edu! All meetings are lined up for the year.

Presentation: SVN - Subversion

Presenter: Michael Gatto, College of Fine Arts

[Handout provided from addedbytes.com]

Why Subversion?

  • Industry standard for version control systems.

  • Track changes

  • Rollback mistakes

  • Experiment safely

  • Collaborate sanely

Key concepts

  • Revision (integer unique across the repository)

  • Repository (master)

  • Working copy (your own stuff)

Toolbox

  • Client (Windows: TortoiseSVN; OSX: SCPlugin; etc.)

Making a repository

  • Make an empty directory

  • Create repo in directory

  • Add 3 directories (trunk, branches, tags)

  • Create directory for working copy

Use Case: Lone Wolf

  • Keeps repo on local file system

  • Has a hard time sharing

  • Deploy files to web server with Capistrano, Phing, Ant, svn export.

Lone Wolf Workflow

  • Add files to repository

  • Hack, hack

  • Commit to repository

  • Client: What have you done today? A: svn log -r {2010-01-13}:HEAD

Use Case: Dream Team

  • Central repository on server

Dream Team Workflow

  • Dividing work between multiple people

http://subversion.tigris.org

http://svnbook.red-bean.com

Demo of TortoiseSVN

  • Must have files set up ahead of time.

  • Import them into the repository.

  • Then check out a working copy.

  • Merging

Q: Can you roll back just one page to a previous revision?

A: Not really, but you can check it out somewhere else and then overwrite it in your working copy.

Q: Will the repository revision increment on every file update?

A: No, it is per commit.

Q: What is the difference between branches and trunk?

A: There is not any real difference. It is up to you to create the meaning.

Read the Subversion book!