SlideShare a Scribd company logo
SVN BASIC TUTORIAL

Formatvorlage des Untertitelmasters
      Avoiding headaches ™
     durch Klicken bearbeiten
Direct deploy

Developer 1   Staging   Live

Developer 2   Staging   Live

Designer 1    Staging   Live

Designer 2    Staging   Live
Removal of direct deploy

Developer 1   Staging   Live

Developer 2   Staging   Live

 Designer 1   Staging   Live

 Designer 2   Staging   Live
Why not to directly deploy
• Can’t check the status of the environment
• Race conditions (DEV1 and DEV2 work on a
  same file => collisions)
• Can’t easily update the environment (full
  replace of the entire working copy needed)
SVN
• Subversion (SVN) is a SCM (Software
  Configuration Management) implementation
• It allows to track changes in files and
  directories
• It allows concurrent development on the
  same files
• It is centralized (one server)
SVN Interaction
                           Designer 2
              Designer 1                Staging Server



   Developer 2                                     Issue Tracker




Developer 1            SVN Server                    Production Server
SVN development cycle

             Get last project status from SVN server




Send work to SVN server                      Develop/Design




                              Test
SVN development (in SVN terms)

                 svn update




    svn commit                edit files




                    Test
How it works


Will make some examples with TortoiseSVN and
       the command line to explain SVN
Fetching an existing project
Fetching an existing project
Fetching an existing project
Fetching an existing project
Fetching an existing project




The «.svn» directory is used by subversion to keep track of changes in the current
directory tree.
Do not change it, copy it somewhere else or delete it!
Fetching an existing project
Adding some files to the project
Adding some files to the project
Adding some files to the project
Adding some files to the project
Adding some files to the project
Updating working copy
Updating working copy
Updating working copy
Deploy with SVN
When having SSH access to a server, deploying
and updating becomes as easy as:

 $ ssh user@server.com
 $ cd path/to/project
 $ svn update
(Or "svn co" if the project is not yet deployed)
Merging and conflicts
In the following schema, two developers try to
commit changes to a same file:
                    echo ‘hello to’;
Developer 1         echo $username;

                    echo ‘hello world ’;
Developer 2         echo $_GET[‘username’];


RED = changed by developer
How merging works
When Developer 2 tries to commit, SVN will tell him
that his copy is outdated, he will have to update it
How merging works
How merging works
Merging won’t cause any changes on the server, you will first
get all the changes locally, so that you can review them. Here’s
the result of this merge case:




 We can then

 $ svn commit -m "Merged changes of marco’s commit"
Merging workflow
                           svn commit




Developer verifies merge         Can’t commit (outdated working copy)




           svn tries to merge           svn update
What if SVN can’t merge?
                        svn commit




SVN couldn’t merge
                              Can’t commit (outdated working copy)
    ????????




        svn tries to merge           svn update
SVN Conflicts
SVN conflicts happen when two developers act on a
same file in the same line:

                    echo ‘hello everybody’;
Developer 1         echo $_GET[‘username’];

                    echo ‘goodbye everybody’;
Developer 2         echo $_GET[‘username’];

RED = changed by developer
SVN Conflicts
SVN Conflicts
• index.php is a merged view of the conflict:

•
• index.php.r8 is the version before the update
• index.php.r9 is the version as in SVN server
• index.php.mine is the version you had in your
  directory before committing
SVN Conflicts
We can edit the files until all conflicts are solved,
then tell SVN it should accept our new working
copy:
SVN Conflicts
                                 svn commit




    Mark conflicts as resolved                Can’t commit (outdated working copy)




Manually edit conflicts                                         svn update




               SVN couldn’t merge         svn tries to merge
Parallel development
SVN branching
Main project

                       Next major version update
The main project and it’s features
                                             Bugfix for a known bug
                      Keeps track of changes to be merged into the next major release of the software
                                                                    New feature that has to be added
                                            Work in progress to fix a known bug
                                                                                         Alternate version to show to the customer
                                                                   A new feature that requires some work without being influenced b

                                                                                          A slightly different version of the site that t
This is actually how
git-flow by nvie.com
handles development,
but SVN could also use
it!
What is a branch?
In SVN terms, a branch is just a copy of a
  current tree. Let’s create a branch to
  develop an alternate layout for the site:
  svn copy -m “creating green site dev branch”
      svn://path/to/repo/trunk
      svn://path/to/repo/branches/wide-layout

  (in TortoiseSVN it is under “branch/tag” in
     context menu)
Switching working copy
Given that you checked out:


   svn://project/path/trunk

You can now switch to a branch by doing


   svn switch svn://project/path/branches/red

and you will be working on that copy
Merging branches
Once completed developing on a branch, you may
 want to merge changes back:
Merging branches



Like normal conflict merging!
First you switch to the branch you want
        changes to be merged to:



 $ svn switch svn://path/to/target/branch
Then you merge a set of revision from the
  branch you developed on (here 25 to
                latest):

$ svn merge -r25:HEAD svn://path/to/merged/branch
Then SVN will merge any conflicts or set
 conflicted state and allow you to check
  what happened. After fixing conflicts:


$ svn ci -m “merging changes from new-layout branch”
Tags
Tags are markers used for deployment,
  mainly for major release versions:
Tags
Tags are copies, exactly like branches:


  $ svn copy
      -m “tagging version 1.1 of the project”
      svn://path/to/project
      svn://path/to/tags/1.1


Except that you NEVER commit on tags!
svn:externals
Externals are “links” to other repositories:

 $ svn propset svn:externals
    “css/common svn://company/common/css/files”
    ./


    Externals are not part of the repository, they are
 just fetched with the repository (useful for deploying
 applications!)
Best practices
Update your projects before working
Do not commit broken code/functionality!

  (Test before committing if possible!)
Commit as soon as a piece of the
   functionality is completed
Branch life should not be too long



  Long living branches increase merge
                 conflicts!



This forces you to keep small units of work
Every commit should have a purpose.
 Commits with no purpose to be avoided!


   If possible, avoid multiple commits on
separate files being part of one functionality
Never commit generated code/data!



Generated code can produce dozens of useless commits,
          conflicts and generally, headaches!
EVERY
  COMMIT
  MUST
   HAVE
DESCRIPTION
Examples of BAD commit messages:

-
    “Fixed bug”
-
    “Updated”
-
    “Saved work”
-
    “Updating”
-
    “Merging changes”
-
    “Saving work of 10/3/2010”
Examples of GOOD commit messages:

-
    “Adding CSS definitions needed to create a lightbox
    overlay when focus is on the offers iframe”
-
    “Fixed bug with session expiring after browser restart on
    IE7”
-
    “Updated the logo with the new colors provided”
-
    “Adding interfaces for the new blog feature

    The interfaces are still quite lightweight, but should be
    refreshed in the next days”
-
If using an issue tracker (Jira, Trac,
Bugzilla, Redmine, etc.), write the
 issue ID in the commit message:

   «Fixed iframe width causing
  scrollbars to appear when not
      needed as of PRJ-123»
Optimal process
Update working copy


                         Build (test first)


If there’s errors, fix them first! (do not work on broken projects)


                             Develop


                          Test changes


              Commit (with appropriate message)


                 Resolve conflicts immediately
Suggested Workflow
This is actually how
git-flow by nvie.com
handles development,
but SVN could also use
it!
Svn Basic Tutorial
Svn Basic Tutorial
Svn Basic Tutorial

More Related Content

What's hot

ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
Abhishek Srivastava
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
Michal Sedlak
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
Atul Jha
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
Raghu nath
 
Backup & restore in windows
Backup & restore in windowsBackup & restore in windows
Backup & restore in windows
Jab Vtl
 
Comparison of SVN and Git
Comparison of SVN and GitComparison of SVN and Git
Comparison of SVN and Git
Daniel Wieth
 
Bash shell
Bash shellBash shell
Bash shellxylas121
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
sbmguys
 
Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7
Devin Olson
 
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
panagenda
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
Marian Marinov
 
Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)
Ramola Dhande
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
Brendan Gregg
 
Source Code management System
Source Code management SystemSource Code management System
Source Code management System
Karthikeyan Annamalai
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
 

What's hot (20)

ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
 
Linux: LVM
Linux: LVMLinux: LVM
Linux: LVM
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
Bash Shell Scripting
Bash Shell ScriptingBash Shell Scripting
Bash Shell Scripting
 
Backup & restore in windows
Backup & restore in windowsBackup & restore in windows
Backup & restore in windows
 
Comparison of SVN and Git
Comparison of SVN and GitComparison of SVN and Git
Comparison of SVN and Git
 
Bash shell
Bash shellBash shell
Bash shell
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Lvm advanced topics
Lvm advanced topicsLvm advanced topics
Lvm advanced topics
 
Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7Installing and Configuring Domino 10 on CentOS 7
Installing and Configuring Domino 10 on CentOS 7
 
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
Von A bis Z-itrix: Installieren Sie den stabilsten und schnellsten HCL Notes-...
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 
Source Code management System
Source Code management SystemSource Code management System
Source Code management System
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 

Viewers also liked

SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best PracticesAshraf Fouad
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practicesabackstrom
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
Matt Wood
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overviewpolarion
 
Using svn
Using svnUsing svn
Using svn
Shiva Somvanshi
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
Marco De Stefano
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
Priyabrata Sahu
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn Workshop
Bastian Feder
 
Code Management (Version Control)
Code Management (Version Control)Code Management (Version Control)
Code Management (Version Control)
Y. Thong Kuah
 
Version Control != Dependency Management
Version Control != Dependency ManagementVersion Control != Dependency Management
Version Control != Dependency Management
Patrick van Dissel
 
Apache contribution-bar camp-colombo
Apache contribution-bar camp-colomboApache contribution-bar camp-colombo
Apache contribution-bar camp-colomboSagara Gunathunga
 
CS589 paper presentation - What is in unison? A formal specification and refe...
CS589 paper presentation - What is in unison? A formal specification and refe...CS589 paper presentation - What is in unison? A formal specification and refe...
CS589 paper presentation - What is in unison? A formal specification and refe...
Sergii Shmarkatiuk
 
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
Asavin Wattanajantra
 
Tortoise svn 1.8.1-en
Tortoise svn 1.8.1-enTortoise svn 1.8.1-en
Tortoise svn 1.8.1-en
Vaibhav Sakhalkar
 
Sql server 2012 tutorials reporting services
Sql server 2012 tutorials   reporting servicesSql server 2012 tutorials   reporting services
Sql server 2012 tutorials reporting servicesSteve Xu
 
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
Vu Hung Nguyen
 

Viewers also liked (20)

SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
Using svn
Using svnUsing svn
Using svn
 
05 - Merge Management
05 - Merge Management05 - Merge Management
05 - Merge Management
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
Eclipse HandsOn Workshop
Eclipse HandsOn WorkshopEclipse HandsOn Workshop
Eclipse HandsOn Workshop
 
Code Management (Version Control)
Code Management (Version Control)Code Management (Version Control)
Code Management (Version Control)
 
Version Control != Dependency Management
Version Control != Dependency ManagementVersion Control != Dependency Management
Version Control != Dependency Management
 
Apache contribution-bar camp-colombo
Apache contribution-bar camp-colomboApache contribution-bar camp-colombo
Apache contribution-bar camp-colombo
 
CS589 paper presentation - What is in unison? A formal specification and refe...
CS589 paper presentation - What is in unison? A formal specification and refe...CS589 paper presentation - What is in unison? A formal specification and refe...
CS589 paper presentation - What is in unison? A formal specification and refe...
 
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
 
Tortoise svn 1.8.1-en
Tortoise svn 1.8.1-enTortoise svn 1.8.1-en
Tortoise svn 1.8.1-en
 
Sql server 2012 tutorials reporting services
Sql server 2012 tutorials   reporting servicesSql server 2012 tutorials   reporting services
Sql server 2012 tutorials reporting services
 
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
 

Similar to Svn Basic Tutorial

How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
Pablo Arriazu
 
Subversion
SubversionSubversion
Subversion
Tomy Ismail
 
Subversion
SubversionSubversion
Subversion
Vaibhav Sakhalkar
 
SVN Information
SVN Information  SVN Information
SVN Information
RAHUL TRIPATHI
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
Dan Hinojosa
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN Tutorial
enggHeads
 
Feature Based Web Development with Bazaar
Feature Based Web Development with BazaarFeature Based Web Development with Bazaar
Feature Based Web Development with Bazaar
yogomozilla
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
shalom938
 
Intro To Version Control
Intro To Version ControlIntro To Version Control
Intro To Version Control
ceardach
 
Maven, Archiva, Subversion and Team City
Maven, Archiva, Subversion and Team CityMaven, Archiva, Subversion and Team City
Maven, Archiva, Subversion and Team City
Boy Tech
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingPhilip Johnson
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
gopinathkarangula
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
Luismi Amorós Martínez
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
Trong Dinh
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
Trong Dinh
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Simplilearn
 
Subversion
SubversionSubversion
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
Jasmine Conseil
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code Hosting
Narendra Sisodiya
 
subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
TahaKhayyam
 

Similar to Svn Basic Tutorial (20)

How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
 
Subversion
SubversionSubversion
Subversion
 
Subversion
SubversionSubversion
Subversion
 
SVN Information
SVN Information  SVN Information
SVN Information
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN Tutorial
 
Feature Based Web Development with Bazaar
Feature Based Web Development with BazaarFeature Based Web Development with Bazaar
Feature Based Web Development with Bazaar
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
Intro To Version Control
Intro To Version ControlIntro To Version Control
Intro To Version Control
 
Maven, Archiva, Subversion and Team City
Maven, Archiva, Subversion and Team CityMaven, Archiva, Subversion and Team City
Maven, Archiva, Subversion and Team City
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
Subversion
SubversionSubversion
Subversion
 
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
 
Develop FOSS project using Google Code Hosting
Develop FOSS project using Google Code HostingDevelop FOSS project using Google Code Hosting
Develop FOSS project using Google Code Hosting
 
subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Svn Basic Tutorial

  • 1. SVN BASIC TUTORIAL Formatvorlage des Untertitelmasters Avoiding headaches ™ durch Klicken bearbeiten
  • 2. Direct deploy Developer 1 Staging Live Developer 2 Staging Live Designer 1 Staging Live Designer 2 Staging Live
  • 3. Removal of direct deploy Developer 1 Staging Live Developer 2 Staging Live Designer 1 Staging Live Designer 2 Staging Live
  • 4. Why not to directly deploy • Can’t check the status of the environment • Race conditions (DEV1 and DEV2 work on a same file => collisions) • Can’t easily update the environment (full replace of the entire working copy needed)
  • 5. SVN • Subversion (SVN) is a SCM (Software Configuration Management) implementation • It allows to track changes in files and directories • It allows concurrent development on the same files • It is centralized (one server)
  • 6. SVN Interaction Designer 2 Designer 1 Staging Server Developer 2 Issue Tracker Developer 1 SVN Server Production Server
  • 7. SVN development cycle Get last project status from SVN server Send work to SVN server Develop/Design Test
  • 8. SVN development (in SVN terms) svn update svn commit edit files Test
  • 9. How it works Will make some examples with TortoiseSVN and the command line to explain SVN
  • 14. Fetching an existing project The «.svn» directory is used by subversion to keep track of changes in the current directory tree. Do not change it, copy it somewhere else or delete it!
  • 16. Adding some files to the project
  • 17. Adding some files to the project
  • 18. Adding some files to the project
  • 19. Adding some files to the project
  • 20. Adding some files to the project
  • 24. Deploy with SVN When having SSH access to a server, deploying and updating becomes as easy as: $ ssh user@server.com $ cd path/to/project $ svn update (Or "svn co" if the project is not yet deployed)
  • 25. Merging and conflicts In the following schema, two developers try to commit changes to a same file: echo ‘hello to’; Developer 1 echo $username; echo ‘hello world ’; Developer 2 echo $_GET[‘username’]; RED = changed by developer
  • 26. How merging works When Developer 2 tries to commit, SVN will tell him that his copy is outdated, he will have to update it
  • 28. How merging works Merging won’t cause any changes on the server, you will first get all the changes locally, so that you can review them. Here’s the result of this merge case: We can then $ svn commit -m "Merged changes of marco’s commit"
  • 29. Merging workflow svn commit Developer verifies merge Can’t commit (outdated working copy) svn tries to merge svn update
  • 30. What if SVN can’t merge? svn commit SVN couldn’t merge Can’t commit (outdated working copy) ???????? svn tries to merge svn update
  • 31. SVN Conflicts SVN conflicts happen when two developers act on a same file in the same line: echo ‘hello everybody’; Developer 1 echo $_GET[‘username’]; echo ‘goodbye everybody’; Developer 2 echo $_GET[‘username’]; RED = changed by developer
  • 33. SVN Conflicts • index.php is a merged view of the conflict: • • index.php.r8 is the version before the update • index.php.r9 is the version as in SVN server • index.php.mine is the version you had in your directory before committing
  • 34. SVN Conflicts We can edit the files until all conflicts are solved, then tell SVN it should accept our new working copy:
  • 35. SVN Conflicts svn commit Mark conflicts as resolved Can’t commit (outdated working copy) Manually edit conflicts svn update SVN couldn’t merge svn tries to merge
  • 37. SVN branching Main project Next major version update The main project and it’s features Bugfix for a known bug Keeps track of changes to be merged into the next major release of the software New feature that has to be added Work in progress to fix a known bug Alternate version to show to the customer A new feature that requires some work without being influenced b A slightly different version of the site that t
  • 38. This is actually how git-flow by nvie.com handles development, but SVN could also use it!
  • 39. What is a branch? In SVN terms, a branch is just a copy of a current tree. Let’s create a branch to develop an alternate layout for the site: svn copy -m “creating green site dev branch” svn://path/to/repo/trunk svn://path/to/repo/branches/wide-layout (in TortoiseSVN it is under “branch/tag” in context menu)
  • 40. Switching working copy Given that you checked out: svn://project/path/trunk You can now switch to a branch by doing svn switch svn://project/path/branches/red and you will be working on that copy
  • 41. Merging branches Once completed developing on a branch, you may want to merge changes back:
  • 42. Merging branches Like normal conflict merging!
  • 43. First you switch to the branch you want changes to be merged to: $ svn switch svn://path/to/target/branch
  • 44. Then you merge a set of revision from the branch you developed on (here 25 to latest): $ svn merge -r25:HEAD svn://path/to/merged/branch
  • 45. Then SVN will merge any conflicts or set conflicted state and allow you to check what happened. After fixing conflicts: $ svn ci -m “merging changes from new-layout branch”
  • 46. Tags Tags are markers used for deployment, mainly for major release versions:
  • 47. Tags Tags are copies, exactly like branches: $ svn copy -m “tagging version 1.1 of the project” svn://path/to/project svn://path/to/tags/1.1 Except that you NEVER commit on tags!
  • 48. svn:externals Externals are “links” to other repositories: $ svn propset svn:externals “css/common svn://company/common/css/files” ./ Externals are not part of the repository, they are just fetched with the repository (useful for deploying applications!)
  • 50. Update your projects before working
  • 51. Do not commit broken code/functionality! (Test before committing if possible!)
  • 52. Commit as soon as a piece of the functionality is completed
  • 53. Branch life should not be too long Long living branches increase merge conflicts! This forces you to keep small units of work
  • 54. Every commit should have a purpose. Commits with no purpose to be avoided! If possible, avoid multiple commits on separate files being part of one functionality
  • 55. Never commit generated code/data! Generated code can produce dozens of useless commits, conflicts and generally, headaches!
  • 56. EVERY COMMIT MUST HAVE DESCRIPTION
  • 57. Examples of BAD commit messages: - “Fixed bug” - “Updated” - “Saved work” - “Updating” - “Merging changes” - “Saving work of 10/3/2010”
  • 58. Examples of GOOD commit messages: - “Adding CSS definitions needed to create a lightbox overlay when focus is on the offers iframe” - “Fixed bug with session expiring after browser restart on IE7” - “Updated the logo with the new colors provided” - “Adding interfaces for the new blog feature The interfaces are still quite lightweight, but should be refreshed in the next days” -
  • 59. If using an issue tracker (Jira, Trac, Bugzilla, Redmine, etc.), write the issue ID in the commit message: «Fixed iframe width causing scrollbars to appear when not needed as of PRJ-123»
  • 61. Update working copy Build (test first) If there’s errors, fix them first! (do not work on broken projects) Develop Test changes Commit (with appropriate message) Resolve conflicts immediately
  • 63. This is actually how git-flow by nvie.com handles development, but SVN could also use it!

Editor's Notes

  1. 28.03.2012
  2. 28.03.2012
  3. 28.03.2012
  4. 28.03.2012
  5. 28.03.2012
  6. 28.03.2012
  7. 28.03.2012
  8. 28.03.2012
  9. 28.03.2012
  10. 28.03.2012
  11. 28.03.2012
  12. 28.03.2012
  13. 28.03.2012
  14. 28.03.2012
  15. 28.03.2012
  16. 28.03.2012
  17. 28.03.2012
  18. 28.03.2012
  19. 28.03.2012
  20. 28.03.2012
  21. 28.03.2012
  22. 28.03.2012
  23. 28.03.2012
  24. 28.03.2012
  25. 28.03.2012
  26. 28.03.2012
  27. 28.03.2012
  28. 28.03.2012
  29. 28.03.2012
  30. 28.03.2012
  31. 28.03.2012
  32. 28.03.2012
  33. 28.03.2012
  34. 28.03.2012
  35. 28.03.2012
  36. 28.03.2012
  37. 28.03.2012
  38. 28.03.2012
  39. 28.03.2012
  40. 28.03.2012
  41. 28.03.2012
  42. 28.03.2012
  43. 28.03.2012
  44. 28.03.2012
  45. 28.03.2012
  46. 28.03.2012
  47. 28.03.2012
  48. 28.03.2012
  49. 28.03.2012
  50. 28.03.2012
  51. 28.03.2012
  52. 28.03.2012
  53. 28.03.2012
  54. 28.03.2012
  55. 28.03.2012