SlideShare a Scribd company logo
1 of 16
Download to read offline
SVN Best Practices
                              Derek Gallo - NFi Studios




Friday, November 7, 2008                                  1
Introduction
                           • What is version control?
                           •  Why use it?
                             • Revisions/Backup
                             • Logs
                             • Version/Release Management
                             • COLLABORATION


Friday, November 7, 2008                                    2
Basics

                           • Repository
                           • Checkout
                           • Commit
                           • Update
                           • Merge



Friday, November 7, 2008                           3
Basic Rules of Thumb

                           •   Comment, Comment, Comment

                           •   Update and TEST before Commit

                           •   Work from your own local copy

                           •   Commit small autonomous changes

                           •   Validate the files you are committing, you actually changed

                           •   Watch for Conflicts




Friday, November 7, 2008                                                                    4
SVN Clients

                           • Windows = TortoiseSVN
                           • *NIX = command line
                           • IDE Integration
                           • There is no complete replacement for the command
                             line. Learn how to use it.



Friday, November 7, 2008                                                        5
Starting a Project
                           •       Create the project folder structure

                               •       Trunk

                                   •     Main development location

                               •       Branches

                                   •     For temporary isolation or codebase splits.

                               •       Tags

                                   •     Snapshots of code at a given point in time




Friday, November 7, 2008                                                               6
Repository Layout
                           •       Single Project - One project per repository location.

                               •       Pros

                                   •     Isolated revision numbers

                                   •     Isolated codebase

                                   •     Isolated security model

                               •       Cons

                                   •     Isolated codebase

                                   •     Multiple Urls to remember

                                   •     Multiple locations to maintain




Friday, November 7, 2008                                                                   7
Repository Layout
                           •       Multi-Project Layout - Several projects in one repository

                               •       Pros

                                   •     Easy to merge code between projects

                                   •     Single url for all projects

                                   •     One repository to maintain

                               •       Cons

                                   •     Revision numbers span across all projects

                                   •     Harder to isolate users to appropriate repositories




Friday, November 7, 2008                                                                       8
Use SVN Properties
                           •       Link external libraries via svn externals

                               •      Easier to update libraries or change versions.

                               •      Helps enforce library separation

                               •      More granular security model

                           •       Use svn ignore appropriately

                               •      configurations files

                               •      os dependent files

                               •      IDE project files

                               •      User generated data

                               •      Temporary folders & logs




Friday, November 7, 2008                                                               9
Use Migrations

                           • They are not just for Rails
                           • Allows you to easily version your DB schema
                           • Doctrine for PHP supports migrations
                           • Be careful about migration numbers when committing

Friday, November 7, 2008                                                          10
Branching/Tagging

                           •   SVN and your development process/release cycle go hand in hand.

                           •   Tag the completion of every milestone/sprint

                           •   Create a tag for every version number

                           •   Create a tag for the latest production release

                           •   NEVER modify tags!




Friday, November 7, 2008                                                                         11
Branching/Tagging

                           •   Create Branches to isolate experimental work.

                           •   Create a Branch for every phase of your release cycle (QA, Staging, Beta, etc.)

                           •   Make necessary fixes/changes in branch and “merge down” to trunk

                           •   Keep branches for every released version

                           •   “Freeze” externals when moving to release branches




Friday, November 7, 2008                                                                                         12
Administration

                           • Apache mod_svn vs. svnserve
                           • Use SSL
                           • Use mod_authz
                           • Regular dumps to backup

Friday, November 7, 2008                                   13
Integrate w/ Project
                                         Management
                           •    Use software with SVN Browser
                               • Trac
                               • Unfuddle
                           • Log revision number in ticket updates
                           • Log ticket number in commit logs



Friday, November 7, 2008                                             14
Automation
                           • SVN Api and Hooks
                           • Policy enforcement using pre-commit
                           • Email notifications using post-commit
                           • Automate changelogs
                           • Track code-reviews using properties
                           • Automate Unit Tests at pre-commit


Friday, November 7, 2008                                            15
Additional Reading

                           •       Version Control With Subversion

                               •     O'Reilly Media.

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

                           •       Subversion Version Control

                               •     by William Nagel

                               •     Prentice Hall




Friday, November 7, 2008                                             16

More Related Content

Viewers also liked

Getting your open source company to contribution
Getting your open source company to contributionGetting your open source company to contribution
Getting your open source company to contributionAsavin Wattanajantra
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesVu Hung Nguyen
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overviewpolarion
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
Enonic Content Repository built on elasticsearch
Enonic Content Repository built on elasticsearchEnonic Content Repository built on elasticsearch
Enonic Content Repository built on elasticsearchenonic
 
Elastic{on} - Tracking of events within ING
Elastic{on} - Tracking of events within INGElastic{on} - Tracking of events within ING
Elastic{on} - Tracking of events within INGING-IT
 
Changing Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven DevelopmentChanging Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven DevelopmentViget Labs
 
Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGrant Goodale
 
Getting Started With Agile
Getting Started With AgileGetting Started With Agile
Getting Started With AgileMike Cottmeyer
 
Tuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for LogsTuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for LogsSematext Group, Inc.
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to ElasticsearchRuslan Zavacky
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화NAVER D2
 
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Spark Summit
 
Real-Time Data Exploration and Analytics with Amazon Elasticsearch Service
Real-Time Data Exploration and Analytics with Amazon Elasticsearch ServiceReal-Time Data Exploration and Analytics with Amazon Elasticsearch Service
Real-Time Data Exploration and Analytics with Amazon Elasticsearch ServiceAmazon Web Services
 

Viewers also liked (20)

Using svn
Using svnUsing svn
Using svn
 
Getting your open source company to contribution
Getting your open source company to contributionGetting your open source company to contribution
Getting your open source company to contribution
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practices
 
svn
svnsvn
svn
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
SVN Basics
SVN BasicsSVN Basics
SVN Basics
 
Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Enonic Content Repository built on elasticsearch
Enonic Content Repository built on elasticsearchEnonic Content Repository built on elasticsearch
Enonic Content Repository built on elasticsearch
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Elastic{on} - Tracking of events within ING
Elastic{on} - Tracking of events within INGElastic{on} - Tracking of events within ING
Elastic{on} - Tracking of events within ING
 
Changing Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven DevelopmentChanging Your Mindset: Getting Started With Test-Driven Development
Changing Your Mindset: Getting Started With Test-Driven Development
 
Getting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.jsGetting Started with MongoDB and Node.js
Getting Started with MongoDB and Node.js
 
Getting Started With Agile
Getting Started With AgileGetting Started With Agile
Getting Started With Agile
 
Tuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for LogsTuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for Logs
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
 
Real-Time Data Exploration and Analytics with Amazon Elasticsearch Service
Real-Time Data Exploration and Analytics with Amazon Elasticsearch ServiceReal-Time Data Exploration and Analytics with Amazon Elasticsearch Service
Real-Time Data Exploration and Analytics with Amazon Elasticsearch Service
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Svn Best Practices

  • 1. SVN Best Practices Derek Gallo - NFi Studios Friday, November 7, 2008 1
  • 2. Introduction • What is version control? • Why use it? • Revisions/Backup • Logs • Version/Release Management • COLLABORATION Friday, November 7, 2008 2
  • 3. Basics • Repository • Checkout • Commit • Update • Merge Friday, November 7, 2008 3
  • 4. Basic Rules of Thumb • Comment, Comment, Comment • Update and TEST before Commit • Work from your own local copy • Commit small autonomous changes • Validate the files you are committing, you actually changed • Watch for Conflicts Friday, November 7, 2008 4
  • 5. SVN Clients • Windows = TortoiseSVN • *NIX = command line • IDE Integration • There is no complete replacement for the command line. Learn how to use it. Friday, November 7, 2008 5
  • 6. Starting a Project • Create the project folder structure • Trunk • Main development location • Branches • For temporary isolation or codebase splits. • Tags • Snapshots of code at a given point in time Friday, November 7, 2008 6
  • 7. Repository Layout • Single Project - One project per repository location. • Pros • Isolated revision numbers • Isolated codebase • Isolated security model • Cons • Isolated codebase • Multiple Urls to remember • Multiple locations to maintain Friday, November 7, 2008 7
  • 8. Repository Layout • Multi-Project Layout - Several projects in one repository • Pros • Easy to merge code between projects • Single url for all projects • One repository to maintain • Cons • Revision numbers span across all projects • Harder to isolate users to appropriate repositories Friday, November 7, 2008 8
  • 9. Use SVN Properties • Link external libraries via svn externals • Easier to update libraries or change versions. • Helps enforce library separation • More granular security model • Use svn ignore appropriately • configurations files • os dependent files • IDE project files • User generated data • Temporary folders & logs Friday, November 7, 2008 9
  • 10. Use Migrations • They are not just for Rails • Allows you to easily version your DB schema • Doctrine for PHP supports migrations • Be careful about migration numbers when committing Friday, November 7, 2008 10
  • 11. Branching/Tagging • SVN and your development process/release cycle go hand in hand. • Tag the completion of every milestone/sprint • Create a tag for every version number • Create a tag for the latest production release • NEVER modify tags! Friday, November 7, 2008 11
  • 12. Branching/Tagging • Create Branches to isolate experimental work. • Create a Branch for every phase of your release cycle (QA, Staging, Beta, etc.) • Make necessary fixes/changes in branch and “merge down” to trunk • Keep branches for every released version • “Freeze” externals when moving to release branches Friday, November 7, 2008 12
  • 13. Administration • Apache mod_svn vs. svnserve • Use SSL • Use mod_authz • Regular dumps to backup Friday, November 7, 2008 13
  • 14. Integrate w/ Project Management • Use software with SVN Browser • Trac • Unfuddle • Log revision number in ticket updates • Log ticket number in commit logs Friday, November 7, 2008 14
  • 15. Automation • SVN Api and Hooks • Policy enforcement using pre-commit • Email notifications using post-commit • Automate changelogs • Track code-reviews using properties • Automate Unit Tests at pre-commit Friday, November 7, 2008 15
  • 16. Additional Reading • Version Control With Subversion • O'Reilly Media. • http://svnbook.red-bean.com/ • Subversion Version Control • by William Nagel • Prentice Hall Friday, November 7, 2008 16