SlideShare a Scribd company logo
1 of 45
Download to read offline
Versioning for developers
            Michelangelo van Dam
   Macq Electronique 2010 Brussels, Belgium
Michelangelo van Dam

ā€¢ Independent Consultant
ā€¢ Zend Certiļ¬ed Engineer (ZCE)
 - PHP 4 & PHP 5
 - Zend Framework
ā€¢ Co-Founder of PHPBenelux
ā€¢ Shepherd of ā€œelephpantā€ herds
T AIL O RM A D E S O L U T I O N S




                                         Macq Ć©lectronique, manufacturer and developer, proposes
                                         you a whole series of electronic and computing-processing
                                         solutions for industry, building and road traffic.

                                         Macq Ć©lectronique has set itself two objectives which are
                                         essential for our company :

                                              developing with competence and innovation
                                              earning the confidence of our customers

                                         Macq Ć©lectronique presents many references carried out
                                         the last few years which attest to its human and
                                         technical abilities to meet with the greatest efficiency
                                         the needs of its customers.




For more information, please check out our website
              http://www.macqel.eu
About this presentation
ā€¢ Concepts of version control
ā€¢ Management with subversion
ā€¢ Life cycle of a project in subversion
ā€¢ Parts and structures within subversion
ā€¢ Advanced subversion tools
ā€¢ New in release 1.5
What is version control ?


ā€œRevision control (also known as version control ...) is
the management of multiple revisions of the same unit
of information.ā€
(source: Wikipedia:RevisionControl)
Versioning for developers
ā€¢- version control provides
    management of versions of information
   ā€¢ code/tests
   ā€¢ conļ¬guration ļ¬les
 -
   ā€¢ documentation
     in a structured, standardized way
 -   with repositories
     ā€¢ centralized (SVN, CVS)
     ā€¢ decentralized (GIT)
Why need versioning ?
ā€¢ enables collaboration between developers
ā€¢ centralized ā€œmain codeā€ (trunk)
ā€¢ custom code alongside main code (branching)
ā€¢ eases release management (tags)
ā€¢ rollback to previous revisions
ā€¢ integration with other tools
Subversion (SVN)
ā€¢ Subversion (http://subversion.tigris.org)
ā€¢ more advanced than CVS
ā€¢ less complex than GIT
ā€¢ integrates well with other tools
  (trac, gforge, jira, ...)
ā€¢ supported by many tools
  (Zend Studio, TortoiseSVN, Subversion CLI)
An example project in trac
SVN browser Zend Studio
Code managing with SVN
ā€¢ many developers create much code
ā€¢- code is committed to a central repository
    conļ¬‚icts trigger warnings
ā€¢ user and groups can be deļ¬ned
ā€¢ different versions can co-exist
ā€¢ access management for named and anonymous
  access rights
Subversion authentication
ā€¢ svnserve server
  $ svn svn://server/project/trunk
ā€¢ svnserve server over SSH
  $ svn svn+ssh://server/project/trunk
ā€¢ Apache webserver
  http://svn.server/project/trunk
Version management
ā€¢ all code resides in ā€œtrunkā€
ā€¢ code revisions are detached in ā€œbranchesā€
ā€¢ snapshots for releases are ā€œtaggedā€
Subversion Schema
Putting a project into SVN
Say youā€™ve started project FooBar with following ļ¬les:
/FooBar
   /Foo.php
   /Bar.php

To put it on a Subversion repository:
$ svn import -m ā€œnew projectā€ FooBar http://svn.server/
FooBar/trunk
Getting code from SVN
A new team member needs to work on the FooBar project

He needs to get the project from Subversion

To get it from a Subversion repository:
$ svn checkout http://svn.server/FooBar/trunk FooBar

This will fetch the latest revision (HEAD) from the TRUNK
and creates a local FooBar directory
Updating code in SVN
After a well deserved holiday, you need to continue working
on the FooBar project

You need to get updates of the project from Subversion

To update your working copy from Subversion repository:
$ svn update /FooBar

This will update your working copy with the latest revision
(HEAD) from the TRUNK
Committing back to SVN
Youā€™re working hard on FooBar and you need to commit
your changes back to Subversion.

To commit changes back to Subversion repository:
$ svn commit -m ā€œAdded some cool stuffā€

This will commit changes in your code to the TRUNK.
Best practice


   Update before committing
    Update after committing
Commit small development chunks
        Commit often
Release management
ā€¢ a release is a snapshot of a version branch
ā€¢ are being deployed to server environments
   (DEV, TEST, ACC, PROD, ...)
ā€¢- 2 common methods to release code
     symlink deployment
 -   subversion export
Symlink Deployment
ā€¢- On production server(s):
   use release folders
   svn co svn://server/myproj/tags/rel-1.0 /web/
   myproj-rel-1.0
 - create symlink to it
   ln -s /web/myproj-rel-1.0 /web/myproj
ā€¢ Pro:
 - simple
ā€¢ Contra:
 - renaming folders on server
 - enabling FollowSymlinks
Subversion Export
ā€¢ Exporting a release from subversion
  svn export http://svn.server/project/tags/
  release-1.0.2
ā€¢ Pro:
 - scheduled (automated) upgrades possible
 - no further modiļ¬cations necessary
ā€¢ Contra:
 - takes longer to switch back to previous release
SVN life cycle
                        feature branch

        v1.0 v1.1
Trunk
                                         bug ļ¬x

                            rel-1.1.1       rel-1.1.2

                    rel-1.0.1       rel-1.0.2
Trunk
ā€¢- trunk is where all code resides
     except custom development
ā€¢ has always the latest version
ā€¢ is not always the most stable version
Branch
ā€¢- two kind of branches exists
     feature branches
 -   release branches
Feature Branches
ā€¢ code that changes many things in trunk
ā€¢ are best put in a separate branch
ā€¢ maintained by their developer(s)
ā€¢- and merged back into trunk
    after the merge, the branch is removed
ā€¢ when changes are done and tested
Release Branches
ā€¢ are maintained in branches
ā€¢ have a long lifetime cycle (several years)
ā€¢- differ from each other
    because of new code base, framework, language
ā€¢ have a common base = trunk
ā€¢ ļ¬xes from versions go into trunk
ā€¢ back port ļ¬xes go from trunk into version
Tags
ā€¢ tags are snapshots
ā€¢ usually made on version branches
ā€¢ can also be made on ā€œtrunkā€
ā€¢ are deployed to server environments
ā€¢ are used to keep track whatā€™s happened between
  releases (change log)
More than just versioning
ā€¢- Subversion provides more features
     File portability
 -   Keyword substitution
 -   Locking
 -   Externals
 -   Peg and Operative revisions
 -   Network model
 -   Hooks
File portability
ā€¢- Line endings differ on different OSā€™s
     are ignored when checking modiļ¬cations
ā€¢- Mime-types differ from their extensions
    binary and non-binary ļ¬les are tested on content
Keyword substitution
ā€¢- Only a few keywords are substituted
     $Date:$ ā€ŗ $Date: 2008-10-22 20:00:00 +0100
     (Wed, 22 Oct 2008) $
 -   $Revision:$ ā€ŗ $Revision: 144 $
 -   $Author:$ ā€ŗ $Author: svnusername $
 -   $HeadUrl:$ ā€ŗ $HeadUrl: http://svn.test.be/trunk $
 -   $Id:$ ā€ŗ $Id: ļ¬le.php 148 2008-10-22 20:00:00Z
     svnusername $
Locking
ā€¢- working copy locks
   exclusive right to a working copy
 - clears with ā€œsvn cleanupā€
ā€¢ database locks
 - ensures database integrity
 - only admins can remove this lock

ā€¢ conļ¬‚icts with the purpose of revision control
Externals
ā€¢- Externals provide an easy way to
   include other internal or external projects
 - without having to care about their revisions
ā€¢ Examples:
 - Zend Framework as svn:externals on library path
 - project that includes many smaller projects
Peg & Operative revisions
ā€¢- automated handling of
   moving ļ¬les
 - deleting and creating new ļ¬les with same name
ā€¢ Using speciļ¬c syntax
 - $ svn command -r OPERATIVE-REV item@PEG-
   REV
Network model
ā€¢- Can run its own svnserve
   pros: no dependencies, works with ssh for extra
   security
 - contras: need svnclient to connect
ā€¢ Or in combination with Apache webserver
 - pros: works with any http-client
 - contras: overkill for small projects, requires
   mod_dav_svn, more difļ¬cult to set up
Hooks
ā€¢- Hooks facilitate actions to be taken
   before a commit starts (validate rights)
 - after a commit (send e-mail, update tracker, ...)
 - before or after a revision change (notiļ¬cations)
ā€¢ Can easily be incorporated with tools
 - tracking tools
 - integration tools (Lorna Janeā€™s Nabaztag)
 - mailing and logging systems
Hooks execute moments
ā€¢- basic commit moments:
    start-commit:
   ā€¢ runs before commit transaction started
 - pre-commit:
   ā€¢ runs right before commit transaction is
        promoted
 -   post-commit:

 -
   ā€¢    runs after the commit transaction is ļ¬nished
     ...
Cool things w/ SVN hooks
   Lorna Janeā€™s Nabaztag
                     Responding on SVN commits




http://www.ļ¬‚ickr.com/photos/lornajane/2592602734/
Automated builds
ā€¢- With SVN and Phing (PHP Build tool)
     nightly checkout of code base
 -   running tools to enhance code
   ā€¢  PHPDocumentator (automated API docs)
   ā€¢  PHP_CodeSniffer (checks code for standards)
   ā€¢  PHPLint (checks code for syntax errors)
   ā€¢  PHPUnit (unit testing for PHP)

 -
   ā€¢  ā€¦
     creating a package (including docs, tests, reports)
New features in SVN v1.5
ā€¢ Merge tracking (foundational)
ā€¢ Sparse checkouts (via new --depth option)
ā€¢ Interactive conļ¬‚ict resolution
ā€¢ Changelist support
ā€¢ Relative URLs, peg revisions in svn:externals
ā€¢ Cyrus SASL support for ra_svn and svnserve
ā€¢ ... (more on http://subversion.tigris.org/
  svn_1.5_releasenotes.html)
Summary
ā€¢ manageable ļ¬le change history
ā€¢ better collaboration between developers
ā€¢ clearer release management
ā€¢ more than one version of same code base
ā€¢ easier to rollback in case of emergency
Recommended Reading
  Version Control with Subversion, 2nd Edition
  (Oā€™Reilley Media, Inc)

  by C. Michael Pilato; Ben Collins-Sussman; Brian W. Fitzpatrick

  also online: http://svnbook.red-bean.com




  Managing Software Development with Trac and Subversion
  (Packt Publishing)

  by David J Murphy
Recommended Reading
  Subversion Version Control:
  Using the Subversion Version Control System in Development Projects
  (Bruce Perens' Open Source Series)

  by William Nagel
Credits


                    Wikipedia Logo
http://commons.wikimedia.org/wiki/File:Wikipedia-logo.png
Thank you !


         Slides on Slideshare
http://www.slideshare.net/group/macqel

      Give feedback on Joind.in
         http://joind.in/1260

More Related Content

What's hot

Atril-DĆ©jĆ  Vu Tea mserver 2 general presentation
Atril-DĆ©jĆ  Vu Tea mserver 2   general presentationAtril-DĆ©jĆ  Vu Tea mserver 2   general presentation
Atril-DĆ©jĆ  Vu Tea mserver 2 general presentationcohlmann
Ā 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Michal Ziarnik
Ā 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with SubversionGuy K. Kloss
Ā 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best PracticesAshraf Fouad
Ā 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forgeJasmine Conseil
Ā 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
Ā 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
Ā 
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2Qualcomm Developer Network
Ā 
Pipeline based deployments on Jenkins
Pipeline based deployments  on JenkinsPipeline based deployments  on Jenkins
Pipeline based deployments on JenkinsKnoldus Inc.
Ā 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic TutorialMarco Pivetta
Ā 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - JavaAnkit Chohan
Ā 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Malcolm Groves
Ā 
Testing fƔcil con Docker: Gestiona dependencias y unifica entornos
Testing fƔcil con Docker: Gestiona dependencias y unifica entornosTesting fƔcil con Docker: Gestiona dependencias y unifica entornos
Testing fƔcil con Docker: Gestiona dependencias y unifica entornosMicael Gallego
Ā 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftYaniv cohen
Ā 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practicesabackstrom
Ā 
BKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTBKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTLinaro
Ā 
What is the merge window?
What is the merge window?What is the merge window?
What is the merge window?Macpaul Lin
Ā 

What's hot (20)

Atril-DĆ©jĆ  Vu Tea mserver 2 general presentation
Atril-DĆ©jĆ  Vu Tea mserver 2   general presentationAtril-DĆ©jĆ  Vu Tea mserver 2   general presentation
Atril-DĆ©jĆ  Vu Tea mserver 2 general presentation
Ā 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
Ā 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with Subversion
Ā 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
Ā 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forge
Ā 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
Ā 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
Ā 
svn
svnsvn
svn
Ā 
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoardā„¢ 410c: Session 2
Ā 
Pipeline based deployments on Jenkins
Pipeline based deployments  on JenkinsPipeline based deployments  on Jenkins
Pipeline based deployments on Jenkins
Ā 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
Ā 
Ankit Chohan - Java
Ankit Chohan - JavaAnkit Chohan - Java
Ankit Chohan - Java
Ā 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101
Ā 
Testing fƔcil con Docker: Gestiona dependencias y unifica entornos
Testing fƔcil con Docker: Gestiona dependencias y unifica entornosTesting fƔcil con Docker: Gestiona dependencias y unifica entornos
Testing fƔcil con Docker: Gestiona dependencias y unifica entornos
Ā 
SVN Basics
SVN BasicsSVN Basics
SVN Basics
Ā 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
Ā 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
Ā 
BKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTBKK16-205 RDK-B IoT
BKK16-205 RDK-B IoT
Ā 
SUSE KVM Ecosystem
SUSE KVM EcosystemSUSE KVM Ecosystem
SUSE KVM Ecosystem
Ā 
What is the merge window?
What is the merge window?What is the merge window?
What is the merge window?
Ā 

Viewers also liked

Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010
Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010
Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010Atlassian
Ā 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systemsTim Staley
Ā 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & GitCraig Smith
Ā 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?Leonid Mamchenkov
Ā 
Intro To Git
Intro To GitIntro To Git
Intro To Gitkyleburton
Ā 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control SystemKMS Technology
Ā 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
Ā 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to gitJoel Krebs
Ā 

Viewers also liked (10)

Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010
Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010
Distributed Version Control Systems in the Enterprise - Atlassian Summit 2010
Ā 
Subversion
SubversionSubversion
Subversion
Ā 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systems
Ā 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
Ā 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?
Ā 
Intro To Git
Intro To GitIntro To Git
Intro To Git
Ā 
Alfresco in an hour
Alfresco in an hourAlfresco in an hour
Alfresco in an hour
Ā 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
Ā 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
Ā 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Ā 

Similar to Versioning for Developers

Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkinsecubemarketing
Ā 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous IntegrationGeff Henderson Chang
Ā 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
Ā 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
Ā 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Gilad Garon
Ā 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to knowdaveymni
Ā 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
Ā 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
Ā 
Mantis Code Deployment Process
Mantis Code Deployment ProcessMantis Code Deployment Process
Mantis Code Deployment ProcessJen Wei Lee
Ā 
223: Modernization and Migrating from the ESB to Containers
223: Modernization and Migrating from the ESB to Containers223: Modernization and Migrating from the ESB to Containers
223: Modernization and Migrating from the ESB to ContainersTrevor Dolby
Ā 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack SummitDocker, Inc.
Ā 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 WorkflowsRyan Street
Ā 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013dotCloud
Ā 
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)ITCamp
Ā 
321 codeincontainer brewbox
321 codeincontainer brewbox321 codeincontainer brewbox
321 codeincontainer brewboxLino Telera
Ā 
Open Audit
Open AuditOpen Audit
Open Auditncspa
Ā 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
Ā 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionJeffrey Ellin
Ā 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Chocolatey Software
Ā 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Michel Buczynski
Ā 

Similar to Versioning for Developers (20)

Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
Ā 
Version Control and Continuous Integration
Version Control and Continuous IntegrationVersion Control and Continuous Integration
Version Control and Continuous Integration
Ā 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
Ā 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
Ā 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Ā 
Source control - what you need to know
Source control - what you need to knowSource control - what you need to know
Source control - what you need to know
Ā 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Ā 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
Ā 
Mantis Code Deployment Process
Mantis Code Deployment ProcessMantis Code Deployment Process
Mantis Code Deployment Process
Ā 
223: Modernization and Migrating from the ESB to Containers
223: Modernization and Migrating from the ESB to Containers223: Modernization and Migrating from the ESB to Containers
223: Modernization and Migrating from the ESB to Containers
Ā 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
Ā 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
Ā 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Ā 
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Ā 
321 codeincontainer brewbox
321 codeincontainer brewbox321 codeincontainer brewbox
321 codeincontainer brewbox
Ā 
Open Audit
Open AuditOpen Audit
Open Audit
Ā 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
Ā 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Ā 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Ā 
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Facilitating continuous delivery in a FinTech world with Salt, Jenkins, Nexus...
Ā 

More from Michelangelo van Dam

GDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultGDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultMichelangelo van Dam
Ā 
Moving from app services to azure functions
Moving from app services to azure functionsMoving from app services to azure functions
Moving from app services to azure functionsMichelangelo van Dam
Ā 
Let your tests drive your code
Let your tests drive your codeLet your tests drive your code
Let your tests drive your codeMichelangelo van Dam
Ā 
General Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyGeneral Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyMichelangelo van Dam
Ā 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageMichelangelo van Dam
Ā 
Open source for a successful business
Open source for a successful businessOpen source for a successful business
Open source for a successful businessMichelangelo van Dam
Ā 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me laterMichelangelo van Dam
Ā 
Deploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesDeploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesMichelangelo van Dam
Ā 
Azure and OSS, a match made in heaven
Azure and OSS, a match made in heavenAzure and OSS, a match made in heaven
Azure and OSS, a match made in heavenMichelangelo van Dam
Ā 
Getting hands dirty with php7
Getting hands dirty with php7Getting hands dirty with php7
Getting hands dirty with php7Michelangelo van Dam
Ā 
Zf2 how arrays will save your project
Zf2   how arrays will save your projectZf2   how arrays will save your project
Zf2 how arrays will save your projectMichelangelo van Dam
Ā 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeatMichelangelo van Dam
Ā 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsMichelangelo van Dam
Ā 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an apiMichelangelo van Dam
Ā 

More from Michelangelo van Dam (20)

GDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and defaultGDPR Art. 25 - Privacy by design and default
GDPR Art. 25 - Privacy by design and default
Ā 
Moving from app services to azure functions
Moving from app services to azure functionsMoving from app services to azure functions
Moving from app services to azure functions
Ā 
Privacy by design
Privacy by designPrivacy by design
Privacy by design
Ā 
DevOps or DevSecOps
DevOps or DevSecOpsDevOps or DevSecOps
DevOps or DevSecOps
Ā 
Privacy by design
Privacy by designPrivacy by design
Privacy by design
Ā 
Continuous deployment 2.0
Continuous deployment 2.0Continuous deployment 2.0
Continuous deployment 2.0
Ā 
Let your tests drive your code
Let your tests drive your codeLet your tests drive your code
Let your tests drive your code
Ā 
General Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's storyGeneral Data Protection Regulation, a developer's story
General Data Protection Regulation, a developer's story
Ā 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantage
Ā 
The road to php 7.1
The road to php 7.1The road to php 7.1
The road to php 7.1
Ā 
Open source for a successful business
Open source for a successful businessOpen source for a successful business
Open source for a successful business
Ā 
Decouple your framework now, thank me later
Decouple your framework now, thank me laterDecouple your framework now, thank me later
Decouple your framework now, thank me later
Ā 
Deploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutesDeploy to azure in less then 15 minutes
Deploy to azure in less then 15 minutes
Ā 
Azure and OSS, a match made in heaven
Azure and OSS, a match made in heavenAzure and OSS, a match made in heaven
Azure and OSS, a match made in heaven
Ā 
Getting hands dirty with php7
Getting hands dirty with php7Getting hands dirty with php7
Getting hands dirty with php7
Ā 
Zf2 how arrays will save your project
Zf2   how arrays will save your projectZf2   how arrays will save your project
Zf2 how arrays will save your project
Ā 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
Ā 
The Continuous PHP Pipeline
The Continuous PHP PipelineThe Continuous PHP Pipeline
The Continuous PHP Pipeline
Ā 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the tests
Ā 
Easily extend your existing php app with an api
Easily extend your existing php app with an apiEasily extend your existing php app with an api
Easily extend your existing php app with an api
Ā 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
Ā 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
Ā 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
Ā 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
Ā 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
Ā 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
Ā 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
Ā 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
Ā 
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Patryk Bandurski
Ā 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
Ā 
Nellā€™iperspazio con Rocket: il Framework Web di Rust!
Nellā€™iperspazio con Rocket: il Framework Web di Rust!Nellā€™iperspazio con Rocket: il Framework Web di Rust!
Nellā€™iperspazio con Rocket: il Framework Web di Rust!Commit University
Ā 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
Ā 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
Ā 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
Ā 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
Ā 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
Ā 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
Ā 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
Ā 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Ā 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Ā 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Ā 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Ā 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Ā 
Hot Sexy call girls in Panjabi Bagh šŸ” 9953056974 šŸ” Delhi escort Service
Hot Sexy call girls in Panjabi Bagh šŸ” 9953056974 šŸ” Delhi escort ServiceHot Sexy call girls in Panjabi Bagh šŸ” 9953056974 šŸ” Delhi escort Service
Hot Sexy call girls in Panjabi Bagh šŸ” 9953056974 šŸ” Delhi escort Service
Ā 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
Ā 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
Ā 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Ā 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Ā 
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Ā 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Ā 
Nellā€™iperspazio con Rocket: il Framework Web di Rust!
Nellā€™iperspazio con Rocket: il Framework Web di Rust!Nellā€™iperspazio con Rocket: il Framework Web di Rust!
Nellā€™iperspazio con Rocket: il Framework Web di Rust!
Ā 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Ā 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Ā 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
Ā 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Ā 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Ā 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Ā 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Ā 

Versioning for Developers

  • 1. Versioning for developers Michelangelo van Dam Macq Electronique 2010 Brussels, Belgium
  • 2. Michelangelo van Dam ā€¢ Independent Consultant ā€¢ Zend Certiļ¬ed Engineer (ZCE) - PHP 4 & PHP 5 - Zend Framework ā€¢ Co-Founder of PHPBenelux ā€¢ Shepherd of ā€œelephpantā€ herds
  • 3. T AIL O RM A D E S O L U T I O N S Macq Ć©lectronique, manufacturer and developer, proposes you a whole series of electronic and computing-processing solutions for industry, building and road traffic. Macq Ć©lectronique has set itself two objectives which are essential for our company : developing with competence and innovation earning the confidence of our customers Macq Ć©lectronique presents many references carried out the last few years which attest to its human and technical abilities to meet with the greatest efficiency the needs of its customers. For more information, please check out our website http://www.macqel.eu
  • 4. About this presentation ā€¢ Concepts of version control ā€¢ Management with subversion ā€¢ Life cycle of a project in subversion ā€¢ Parts and structures within subversion ā€¢ Advanced subversion tools ā€¢ New in release 1.5
  • 5. What is version control ? ā€œRevision control (also known as version control ...) is the management of multiple revisions of the same unit of information.ā€ (source: Wikipedia:RevisionControl)
  • 6. Versioning for developers ā€¢- version control provides management of versions of information ā€¢ code/tests ā€¢ conļ¬guration ļ¬les - ā€¢ documentation in a structured, standardized way - with repositories ā€¢ centralized (SVN, CVS) ā€¢ decentralized (GIT)
  • 7. Why need versioning ? ā€¢ enables collaboration between developers ā€¢ centralized ā€œmain codeā€ (trunk) ā€¢ custom code alongside main code (branching) ā€¢ eases release management (tags) ā€¢ rollback to previous revisions ā€¢ integration with other tools
  • 8. Subversion (SVN) ā€¢ Subversion (http://subversion.tigris.org) ā€¢ more advanced than CVS ā€¢ less complex than GIT ā€¢ integrates well with other tools (trac, gforge, jira, ...) ā€¢ supported by many tools (Zend Studio, TortoiseSVN, Subversion CLI)
  • 11. Code managing with SVN ā€¢ many developers create much code ā€¢- code is committed to a central repository conļ¬‚icts trigger warnings ā€¢ user and groups can be deļ¬ned ā€¢ different versions can co-exist ā€¢ access management for named and anonymous access rights
  • 12. Subversion authentication ā€¢ svnserve server $ svn svn://server/project/trunk ā€¢ svnserve server over SSH $ svn svn+ssh://server/project/trunk ā€¢ Apache webserver http://svn.server/project/trunk
  • 13. Version management ā€¢ all code resides in ā€œtrunkā€ ā€¢ code revisions are detached in ā€œbranchesā€ ā€¢ snapshots for releases are ā€œtaggedā€
  • 15. Putting a project into SVN Say youā€™ve started project FooBar with following ļ¬les: /FooBar /Foo.php /Bar.php To put it on a Subversion repository: $ svn import -m ā€œnew projectā€ FooBar http://svn.server/ FooBar/trunk
  • 16. Getting code from SVN A new team member needs to work on the FooBar project He needs to get the project from Subversion To get it from a Subversion repository: $ svn checkout http://svn.server/FooBar/trunk FooBar This will fetch the latest revision (HEAD) from the TRUNK and creates a local FooBar directory
  • 17. Updating code in SVN After a well deserved holiday, you need to continue working on the FooBar project You need to get updates of the project from Subversion To update your working copy from Subversion repository: $ svn update /FooBar This will update your working copy with the latest revision (HEAD) from the TRUNK
  • 18. Committing back to SVN Youā€™re working hard on FooBar and you need to commit your changes back to Subversion. To commit changes back to Subversion repository: $ svn commit -m ā€œAdded some cool stuffā€ This will commit changes in your code to the TRUNK.
  • 19. Best practice Update before committing Update after committing Commit small development chunks Commit often
  • 20. Release management ā€¢ a release is a snapshot of a version branch ā€¢ are being deployed to server environments (DEV, TEST, ACC, PROD, ...) ā€¢- 2 common methods to release code symlink deployment - subversion export
  • 21. Symlink Deployment ā€¢- On production server(s): use release folders svn co svn://server/myproj/tags/rel-1.0 /web/ myproj-rel-1.0 - create symlink to it ln -s /web/myproj-rel-1.0 /web/myproj ā€¢ Pro: - simple ā€¢ Contra: - renaming folders on server - enabling FollowSymlinks
  • 22. Subversion Export ā€¢ Exporting a release from subversion svn export http://svn.server/project/tags/ release-1.0.2 ā€¢ Pro: - scheduled (automated) upgrades possible - no further modiļ¬cations necessary ā€¢ Contra: - takes longer to switch back to previous release
  • 23. SVN life cycle feature branch v1.0 v1.1 Trunk bug ļ¬x rel-1.1.1 rel-1.1.2 rel-1.0.1 rel-1.0.2
  • 24. Trunk ā€¢- trunk is where all code resides except custom development ā€¢ has always the latest version ā€¢ is not always the most stable version
  • 25. Branch ā€¢- two kind of branches exists feature branches - release branches
  • 26. Feature Branches ā€¢ code that changes many things in trunk ā€¢ are best put in a separate branch ā€¢ maintained by their developer(s) ā€¢- and merged back into trunk after the merge, the branch is removed ā€¢ when changes are done and tested
  • 27. Release Branches ā€¢ are maintained in branches ā€¢ have a long lifetime cycle (several years) ā€¢- differ from each other because of new code base, framework, language ā€¢ have a common base = trunk ā€¢ ļ¬xes from versions go into trunk ā€¢ back port ļ¬xes go from trunk into version
  • 28. Tags ā€¢ tags are snapshots ā€¢ usually made on version branches ā€¢ can also be made on ā€œtrunkā€ ā€¢ are deployed to server environments ā€¢ are used to keep track whatā€™s happened between releases (change log)
  • 29. More than just versioning ā€¢- Subversion provides more features File portability - Keyword substitution - Locking - Externals - Peg and Operative revisions - Network model - Hooks
  • 30. File portability ā€¢- Line endings differ on different OSā€™s are ignored when checking modiļ¬cations ā€¢- Mime-types differ from their extensions binary and non-binary ļ¬les are tested on content
  • 31. Keyword substitution ā€¢- Only a few keywords are substituted $Date:$ ā€ŗ $Date: 2008-10-22 20:00:00 +0100 (Wed, 22 Oct 2008) $ - $Revision:$ ā€ŗ $Revision: 144 $ - $Author:$ ā€ŗ $Author: svnusername $ - $HeadUrl:$ ā€ŗ $HeadUrl: http://svn.test.be/trunk $ - $Id:$ ā€ŗ $Id: ļ¬le.php 148 2008-10-22 20:00:00Z svnusername $
  • 32. Locking ā€¢- working copy locks exclusive right to a working copy - clears with ā€œsvn cleanupā€ ā€¢ database locks - ensures database integrity - only admins can remove this lock ā€¢ conļ¬‚icts with the purpose of revision control
  • 33. Externals ā€¢- Externals provide an easy way to include other internal or external projects - without having to care about their revisions ā€¢ Examples: - Zend Framework as svn:externals on library path - project that includes many smaller projects
  • 34. Peg & Operative revisions ā€¢- automated handling of moving ļ¬les - deleting and creating new ļ¬les with same name ā€¢ Using speciļ¬c syntax - $ svn command -r OPERATIVE-REV item@PEG- REV
  • 35. Network model ā€¢- Can run its own svnserve pros: no dependencies, works with ssh for extra security - contras: need svnclient to connect ā€¢ Or in combination with Apache webserver - pros: works with any http-client - contras: overkill for small projects, requires mod_dav_svn, more difļ¬cult to set up
  • 36. Hooks ā€¢- Hooks facilitate actions to be taken before a commit starts (validate rights) - after a commit (send e-mail, update tracker, ...) - before or after a revision change (notiļ¬cations) ā€¢ Can easily be incorporated with tools - tracking tools - integration tools (Lorna Janeā€™s Nabaztag) - mailing and logging systems
  • 37. Hooks execute moments ā€¢- basic commit moments: start-commit: ā€¢ runs before commit transaction started - pre-commit: ā€¢ runs right before commit transaction is promoted - post-commit: - ā€¢ runs after the commit transaction is ļ¬nished ...
  • 38. Cool things w/ SVN hooks Lorna Janeā€™s Nabaztag Responding on SVN commits http://www.ļ¬‚ickr.com/photos/lornajane/2592602734/
  • 39. Automated builds ā€¢- With SVN and Phing (PHP Build tool) nightly checkout of code base - running tools to enhance code ā€¢ PHPDocumentator (automated API docs) ā€¢ PHP_CodeSniffer (checks code for standards) ā€¢ PHPLint (checks code for syntax errors) ā€¢ PHPUnit (unit testing for PHP) - ā€¢ ā€¦ creating a package (including docs, tests, reports)
  • 40. New features in SVN v1.5 ā€¢ Merge tracking (foundational) ā€¢ Sparse checkouts (via new --depth option) ā€¢ Interactive conļ¬‚ict resolution ā€¢ Changelist support ā€¢ Relative URLs, peg revisions in svn:externals ā€¢ Cyrus SASL support for ra_svn and svnserve ā€¢ ... (more on http://subversion.tigris.org/ svn_1.5_releasenotes.html)
  • 41. Summary ā€¢ manageable ļ¬le change history ā€¢ better collaboration between developers ā€¢ clearer release management ā€¢ more than one version of same code base ā€¢ easier to rollback in case of emergency
  • 42. Recommended Reading Version Control with Subversion, 2nd Edition (Oā€™Reilley Media, Inc) by C. Michael Pilato; Ben Collins-Sussman; Brian W. Fitzpatrick also online: http://svnbook.red-bean.com Managing Software Development with Trac and Subversion (Packt Publishing) by David J Murphy
  • 43. Recommended Reading Subversion Version Control: Using the Subversion Version Control System in Development Projects (Bruce Perens' Open Source Series) by William Nagel
  • 44. Credits Wikipedia Logo http://commons.wikimedia.org/wiki/File:Wikipedia-logo.png
  • 45. Thank you ! Slides on Slideshare http://www.slideshare.net/group/macqel Give feedback on Joind.in http://joind.in/1260