Subversion%20for%20Smarties - PowerPoint PPT Presentation

About This Presentation
Title:

Subversion%20for%20Smarties

Description:

So you know how to Branch and Tag, but you have a sneaky suspicion there is more ... Changelist: How To Tortoise. Example... By the way: Perforce Also Has... Labels ... – PowerPoint PPT presentation

Number of Views:132
Avg rating:3.0/5.0
Slides: 34
Provided by: came72
Category:

less

Transcript and Presenter's Notes

Title: Subversion%20for%20Smarties


1
Subversion for Smarties
  • Cameron Childress
  • cameronc_at_sumoc.com

2
Intro
  • ColdFusion, since 1996
  • ACFUG since, 1998
  • Foosball, since 2001
  • Sumo Consulting, since 2002

3
Session Description
  • So you know how to Branch and Tag, but you have
    a sneaky suspicion there is more you could be
    doing with SVN. Come find out what you've been
    missing out on and how to make Subversion do more
    for you!

4
Preview
  • Review of SVN basics
  • A few non-SVN things
  • Interesting bits built into SVN
  • External tools
  • Some examples

5
Review Key Advantages vs. VSS or CVS
  • SVN Server runs on many platforms
  • Many clients available for SVN
  • SVN is free open source
  • Too many more to list

6
Subversion vs. Git Basics
  • Created by Linus Torvalds
  • Replaced BitKeeper
  • Used for Linux Kernel, PERL, RoR, Android OS
  • Download athttp//git-scm.com

7
Subversion vs. Git Git Wins
  • SVN is Centralized, Git is distributed
  • Local operations are faster
  • Branching Handling
  • Merge Handling
  • Smaller HD Footprint (Mozilla 12 GiB in SVN,
    420 MiB in Git)

8
Subversion vs Git SVN Wins
  • Better IDE support
  • SVN has a de-facto single Repository
  • Centralized access control
  • Version numbers are easier in SVN
  • Git / SVN Comparisonhttp//git.or.cz/gitwiki/GitS
    vnComparsion

9
Review Subversion Basics
  • Conventional Project Structure
  • Branches
  • Tags
  • Trunk
  • Typical Exposure
  • Comit
  • Update
  • Resolve Conflicts
  • Branch / Merge (maybe)

10
Review Key Subversion Features
  • Revision numbers apply to entire tree
  • Directories are versioned
  • Working Copy vs. Repository
  • Caches pristine copy which allows
  • Revert
  • Diff
  • Status
  • Branches and tags are normal directories
  • Binary files are stored as difference data

11
Something New in SVN Changelists
  • Introduced in SVN 1.5 (currently at 1.6)
  • Also a feature in Perforce
  • Groups files for operations
  • Commit
  • Diff
  • Great for grouping files for bug resolution

12
Changelists You Should Know
  • Part of working copy, not repository
  • Only works with files, not directories
  • One changelist assignment per file
  • Changelists cleared on commit
  • Override using flag --keep-changelists

13
Changelist How To Command Line
  • Syntax svn changelist listname filelist
  • Listname can be any string
  • Filelist supports wildcards
  • Morehttp//svnbook.red-bean.com/nightly/en/svn.
    advanced.changelists.html

14
Changelist How To Tortoise
  • Example

15
By the way Perforce Also Has
  • Labels
  • Similar to Tags, but not simply convention
  • ClientSpecs
  • Maps repo / directories
  • Together
  • Very powerful for deployment
  • Great for large teams w/distributed roles

16
SVN Properties
  • Think metadata for each file
  • Stored in .svn/props
  • Checked into repo with file
  • Versioned
  • Special Properties
  • svnignore
  • svnkeywords
  • svnneeds-lock
  • svnexecutable

17
Special SVN Property svnkeywords
  • Used for keyword substitution
  • Must be explicitly turned on
  • svnkeywords
  • Date
  • Revision
  • Author
  • HeadURL
  • Id
  • Example

18
Automate Keyword Substitution
  • Config file miscellany section
  • Applies to working copy, not repo
  • On windows, found in
  • /AppData/Subversion
  • More
  • http//svnbook.red-bean.com/nightly/en/
  • svn.advanced.props.special.keywords.html

19
Hooks
  • Run a program at certain points in commit process
  • Implemented as bat file in Windows
  • Live in repo, not working copy
  • Examples by default found in repo/hooks
  • http//svnbook.red-bean.com/nightly/en/
  • svn.reposadmin.create.htmlsvn.reposadmin.create.h
    ooks

20
Hook Types
  • start-commit
  • pre-commit / post-commit
  • pre-revprop-change / post-revprop-change
  • pre-lock / post-lock
  • pre-unlock / post-unlock

21
Hooks Tips
  • Hook programs execute with an empty environment
  • Do not modify a commit transaction using hook
    scripts
  • Permissions, permissions, permissions

22
Hooks Ideas
  • Push code to staging server
  • Send notification emails to dev team
  • Update issue / project management software

23
Resources for Hooks
  • Brad Woods Bloghttp//www.codersrevolution.com/i
    ndex.cfm/2008/9/15/Creating-a-postcommit-hook-for-
    Subversion
  • Dan Switzers Blog
  • http//blog.pengoworks.com/index.cfm/2008/2/5/Debu
    gging-Subversion-Repository-Hooks-in-Windows

24
Visual SVN Server
  • Windows installer (visualsvn.com)
  • Installs Apache based Service
  • HTTPS/SSL Capable
  • Internally _at_ SVN 1.6.4 (current) as of 8/12/09
  • Take a Look

25
SVN Abstration Layer
  • Provides abstraction for RIA ForgeBy Rob Gonda
  • Configure via XML
  • Uses Apache by default, partial support for
    SVNServe
  • http//svnservice.riaforge.org/

26
SVN Abstraction Layer
  • Repositories
  • Create, delete, list
  • Users
  • Create, delete, list, changepassword
  • History
  • List

27
SVN Abstraction Layer Example Code
  • svnService createObject('component',
    'models.svnService').init('config/config.xml')
  • svnService.listRepos()
  • svnService.create(myRepo)
  • svnService.getLog(myRepo', 10)
  • svnService.addUser(myRepo', username',
    password')

28
SVN Sync
  • SVNSync Repo BrowserBy Tom de Manincor
  • Configure via XML (X2)
  • config/environment.xml
  • model/svnAPI/config.xml
  • http//svnsync.riaforge.org/

29
SVN Sync
  • Lets check it out

30
Roundup RIA Forge Projects
  • Deployment builder - ANT/SVNBy Matt
    Rileyhttp//deploymentbuilder.riaforge.org/
  • Skweegee - TRAC more(formerly Trac_Fu)By
    Russ Johnsonhttp//skweegee.riaforge.org/

31
Roundup RIA Forge Projects
  • SVNAuthz.cfc Manipulate authz filesBy
    Terrance Ryanhttp//svnauthz.riaforge.org/
  • SVNUtil AIR App, Removes .svn infoBy Omar
    Gonzalezhttp//svnutil.riaforge.org/

32
Resources
  • Book - Version Control with Subversionhttp//svnb
    ook.red-bean.com
  • Windows Installer / Admin - VisualSVNhttp//www.v
    isualsvn.com

33
Questions?
  • Contact
  • cameronc_at_sumoc.com
  • cameroncf (YIM / AIM)
  • Presentation available NOW via
  • USB Thumbdrive
  • http//www.sumoc.com/downloads/files/svn.zip
  • Take the Surveyhttp//tinyurl.com/cfunitedsurvey
Write a Comment
User Comments (0)
About PowerShow.com