Basics of branching, tagging and packaging 
for product release management with SVN 
Ted Steinmann 
APPLICATION 
VERSIONING
About Me 
 Building & Deploying CF Web apps for 4 years 
 ImageTrend, Inc. Lead Developer 
 Employee 3+ years 
 cf.Objective() attendee 3 years running 
 MAX 2008 (San Francisco) Attendee 
 Avid hiker, snowboarder & single-track rider
Experience 
 Involved, at some point, in most stages of the 
ColdFusion based development, design, 
implementation & support of large scale enterprise 
applications for ImageTrend’s Emergency Data 
Systems solutions 
 EMS, Fire, Trauma, Emergency Preparedness, 
Licensing 
 Strong proponent of SVN, versioning and iterative 
release processes using the unstable branching 
strategy who has been involved with company 
wide implementation throughout various projects.
Summary 
 Why SVN? 
 Environmental 
Considerations 
 Branching 
 Strategies 
 Branching 
 Tagging 
 Versioning 
 Packaging 
 Publishing
Why SVN? 
 Open source/free 
 Widely used & supported 
 Many Eclipse plugins 
 Supports 
 Remote disconnected development 
 Continuous/Synchronous development 
 Distributed Development 
 Extendable integrations 
 Properties such as bug tracking id 
 Atomic commits 
 Project wide undue button
Environmental Considerations 
 Development 
 Alpha 
 Beta 
 Staging 
 Production 
 Source control server 
 SVN 
 Visual SVN 
 Source control client 
 Tortoise SVN 
 Build Script 
 Automated deployment 
Application 
Environments 
Supporting Environments & 
considerations
Environmental Considerations 
 Developers copy 
 Checkout – Trunk 
 Alpha 
 Checkout – Trunk 
 Auto update – post-commit-hook 
 Beta 
 Checkout – Release Branch or Trunk (switch) 
 Staging or production 
 Export from tagged release
Alpha Auto Update 
 DEMO 
 Code 
 post-commit-hook.bat 
 Environments 
 http://tsteinmann.samples/svn/project1/trunk/src/ 
 http://tsteinmann.samples/svn/alpha/project1/
Branching 
 Enables independent lines of development 
 Share a common history with the mainline/trunk 
 New feature development, release 
prep/management 
 Isolated development environments 
 Copy of another branch/trunk at a point in time
Branching Strategies 
 The Unstable Trunk 
 Serial Releases 
 The Stable Trunk 
 Parallel Releases 
Branching strategies can be 
intermingled, but choosing one and 
sticking with it creates transparency, 
simplicity, & consistency. 
Strategies are suggested usage or best 
practices but not enforced by 
subversion. 
 The Agile Branching Strategy 
 Delayed definition 
 Features that may never 
make it into the product 
All strategies support Agile 
development practices, agile 
branching supports more 
reactive undefined chaotic 
development and places 
more time & effort on 
branching & merging than 
development.
Unstable Trunk Strategy 
 Trunk 
 Main line development of a product 
 On going development for next release 
 Feature branch 
 Safe place for development of features in isolation 
 Development delivered later, NOT for next release 
 Copy of branch (or Trunk) at a point in time 
 Release Branch 
 Stable releasable/feature complete code set 
 created to prepare for release 
 Bug/defect fixes development performed or merged here 
 Tags are created from here 
• Simplest most 
usable 
• Payload 
development 
• Serial development
Unstable Trunk Diagram
Tagging 
 Snap shot of a repository at a point in time 
 Commonly a version number 
 REL-1.0 
 A tag is effectively the same thing as a branch 
 Best practices suggest NEVER committing to a 
tag 
 Tortoise will warn you but not prevent 
 You can tag a branch & branch a tag 
 It’s easier to just create a branch from a branch 
(or the trunk) at a revision that lines corresponds 
to a tag.
Versioning 
 Wikipedia: 
 Software versioning is the process of assigning 
either unique version names or unique version 
numbers to unique states of computer software. 
 Generally numeric, and increasing order 
 Every subsequent version contains all fixes & 
enhancements from previous versions 
 Versioning needs to make sense for 
developers, marketing & existing customers
Packaging 
 Gathering artifacts that make up a product 
 Source Code 
 Store version info in source code 
 Database scripts 
 Store version info in database 
Write scripts to be re-runnable 
 Repeatable process 
 Automated/Scripted build & delivery
Packaging (continued) 
 ANT 
 Another Neat Tool 
 Built into Eclipse 
 svn.exe 
 command line utility 
 CollabNet (one of many) 
 SVNKit 
 Java Library 
 Database script compilation or versioning
Packaging (continued) 
 Steps 
1. Compile database scripts 
2. Export code from a tag 
3. Strip out any un-necessary config or logs 
4. Deliver package
Packaging 
 DEMO 
 package.bat 
 build.xml
Merging 
 Copy differences from between 2 trees, and 
applying to a working copy for commit 
 Feature Branch 
 Feature complete 
 Expected in next release 
 Release Branch 
 Merge when tagged 
 Apply hot fixes to on going dev in Trunk
Merging (continued) 
 Range of revisions 
 Reintegrate Branch 
 Merge two different trees 
 DEMO – Time Permitting
Pointers 
 Merge as often as possible 
 The longer a branch exists in isolation the more 
difficult the merge 
 KISS 
 Do EVERYTHING from a working copy 
 If you find yourself doing the same thing over 
and over… script it… most of us are 
developers.
Questions?
Resources 
 Branching Strategy Questioned (Bob w/Collabnet) 
 http://blogs.open.collab.net/svn/2007/11/branching-strat.html 
 Pragmatic version control using subversion 
 http://www.pragprog.com/titles/svn2/pragmatic-version-control-using-subversion 
 Tortoise SVN Docs 
 http://tortoisesvn.net/docs/release/TortoiseSVN_en/index.html 
 Wikipedia (Software Versioning) 
 http://en.wikipedia.org/wiki/Software_versioning 
 Collabnet SVN (download) 
 http://www.open.collab.net/downloads/subversion/ 
 Eclipse – ANT & External tools tutorial 
 http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.user/gettingStarted/qs- 
80_ant.htm 
 SVNKit (Java Library Integration – Jared Rypka-Hauer) 
 http://www.alagad.com/blog/post.cfm/svnkit-coldfusion-and-you--very-cool-java-cf-stuff

Application versioning

  • 1.
    Basics of branching,tagging and packaging for product release management with SVN Ted Steinmann APPLICATION VERSIONING
  • 2.
    About Me Building & Deploying CF Web apps for 4 years  ImageTrend, Inc. Lead Developer  Employee 3+ years  cf.Objective() attendee 3 years running  MAX 2008 (San Francisco) Attendee  Avid hiker, snowboarder & single-track rider
  • 3.
    Experience  Involved,at some point, in most stages of the ColdFusion based development, design, implementation & support of large scale enterprise applications for ImageTrend’s Emergency Data Systems solutions  EMS, Fire, Trauma, Emergency Preparedness, Licensing  Strong proponent of SVN, versioning and iterative release processes using the unstable branching strategy who has been involved with company wide implementation throughout various projects.
  • 4.
    Summary  WhySVN?  Environmental Considerations  Branching  Strategies  Branching  Tagging  Versioning  Packaging  Publishing
  • 5.
    Why SVN? Open source/free  Widely used & supported  Many Eclipse plugins  Supports  Remote disconnected development  Continuous/Synchronous development  Distributed Development  Extendable integrations  Properties such as bug tracking id  Atomic commits  Project wide undue button
  • 6.
    Environmental Considerations Development  Alpha  Beta  Staging  Production  Source control server  SVN  Visual SVN  Source control client  Tortoise SVN  Build Script  Automated deployment Application Environments Supporting Environments & considerations
  • 7.
    Environmental Considerations Developers copy  Checkout – Trunk  Alpha  Checkout – Trunk  Auto update – post-commit-hook  Beta  Checkout – Release Branch or Trunk (switch)  Staging or production  Export from tagged release
  • 8.
    Alpha Auto Update  DEMO  Code  post-commit-hook.bat  Environments  http://tsteinmann.samples/svn/project1/trunk/src/  http://tsteinmann.samples/svn/alpha/project1/
  • 9.
    Branching  Enablesindependent lines of development  Share a common history with the mainline/trunk  New feature development, release prep/management  Isolated development environments  Copy of another branch/trunk at a point in time
  • 10.
    Branching Strategies The Unstable Trunk  Serial Releases  The Stable Trunk  Parallel Releases Branching strategies can be intermingled, but choosing one and sticking with it creates transparency, simplicity, & consistency. Strategies are suggested usage or best practices but not enforced by subversion.  The Agile Branching Strategy  Delayed definition  Features that may never make it into the product All strategies support Agile development practices, agile branching supports more reactive undefined chaotic development and places more time & effort on branching & merging than development.
  • 11.
    Unstable Trunk Strategy  Trunk  Main line development of a product  On going development for next release  Feature branch  Safe place for development of features in isolation  Development delivered later, NOT for next release  Copy of branch (or Trunk) at a point in time  Release Branch  Stable releasable/feature complete code set  created to prepare for release  Bug/defect fixes development performed or merged here  Tags are created from here • Simplest most usable • Payload development • Serial development
  • 12.
  • 13.
    Tagging  Snapshot of a repository at a point in time  Commonly a version number  REL-1.0  A tag is effectively the same thing as a branch  Best practices suggest NEVER committing to a tag  Tortoise will warn you but not prevent  You can tag a branch & branch a tag  It’s easier to just create a branch from a branch (or the trunk) at a revision that lines corresponds to a tag.
  • 14.
    Versioning  Wikipedia:  Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software.  Generally numeric, and increasing order  Every subsequent version contains all fixes & enhancements from previous versions  Versioning needs to make sense for developers, marketing & existing customers
  • 15.
    Packaging  Gatheringartifacts that make up a product  Source Code  Store version info in source code  Database scripts  Store version info in database Write scripts to be re-runnable  Repeatable process  Automated/Scripted build & delivery
  • 16.
    Packaging (continued) ANT  Another Neat Tool  Built into Eclipse  svn.exe  command line utility  CollabNet (one of many)  SVNKit  Java Library  Database script compilation or versioning
  • 17.
    Packaging (continued) Steps 1. Compile database scripts 2. Export code from a tag 3. Strip out any un-necessary config or logs 4. Deliver package
  • 18.
    Packaging  DEMO  package.bat  build.xml
  • 19.
    Merging  Copydifferences from between 2 trees, and applying to a working copy for commit  Feature Branch  Feature complete  Expected in next release  Release Branch  Merge when tagged  Apply hot fixes to on going dev in Trunk
  • 20.
    Merging (continued) Range of revisions  Reintegrate Branch  Merge two different trees  DEMO – Time Permitting
  • 21.
    Pointers  Mergeas often as possible  The longer a branch exists in isolation the more difficult the merge  KISS  Do EVERYTHING from a working copy  If you find yourself doing the same thing over and over… script it… most of us are developers.
  • 22.
  • 23.
    Resources  BranchingStrategy Questioned (Bob w/Collabnet)  http://blogs.open.collab.net/svn/2007/11/branching-strat.html  Pragmatic version control using subversion  http://www.pragprog.com/titles/svn2/pragmatic-version-control-using-subversion  Tortoise SVN Docs  http://tortoisesvn.net/docs/release/TortoiseSVN_en/index.html  Wikipedia (Software Versioning)  http://en.wikipedia.org/wiki/Software_versioning  Collabnet SVN (download)  http://www.open.collab.net/downloads/subversion/  Eclipse – ANT & External tools tutorial  http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.user/gettingStarted/qs- 80_ant.htm  SVNKit (Java Library Integration – Jared Rypka-Hauer)  http://www.alagad.com/blog/post.cfm/svnkit-coldfusion-and-you--very-cool-java-cf-stuff