SlideShare a Scribd company logo
1 of 40
Subversion (SVN) Tutorial Version control with Subversion  & its Administration how to set it up, use it, and save your sanity how to set it up, use it, and save your sanity By Gopinath Karangula E-mail : gopinathkarangula@gmail.com
What is version control? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We will use subversion (svn) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
subversion concepts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Advantages of Version Control ,[object Object],[object Object],[object Object],[object Object],[object Object]
Version Control Steps ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
Version control models
File sharing: the problem to avoid
Lock-Modify-Unlock Lock-Modify-Unlock
Copy-Modify-Merge
Copy-Modify-Merge (cont’d)
Working with Tortoise SVN ,[object Object],[object Object],[object Object]
Tortoise SVN Client Daily Tasks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Create a repository using Tortoise SVN ,[object Object],[object Object],[object Object]
 
[object Object],[object Object],[object Object],[object Object]
Adding a  new file to the Repository ,[object Object],[object Object],[object Object]
TortoiseSVN:  Add a new file to the repository (continued) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tortoise SVN:  Add a new file to the repository (continued) ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
TortoiseSVN:  Modify an existing file in the repository ,[object Object],[object Object],[object Object],[object Object]
TortoiseSVN:  Modifying a file (continued) ,[object Object],[object Object],[object Object]
TortoiseSVN:  Modifying a file (continued) ,[object Object],[object Object],[object Object],[object Object]
TortoiseSVN:  Modifying a file (continued) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TortoiseSVN:  Modifying a file (continued) ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
SVN Update ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary – Checking things in ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SVN Administration : Trunk : Updated and major code of the project Tag : Showcase  of Release versions and ready to pack Branches : Contain Total source code, which was divided and distributed to the workforce, where a  source code commits happens on the branches for development and merged to test branch to bug fix, and add patches to stabilize the code ( Quality analysis), merged to release branch and deployed to production safely.
Project Repository Creation using Visual Svn server : Using Visual SVN Server : we can perform: 1. Fresh creation of Repository with default structure of the Project 2. Creation of the Project Folder with out default Project structure. 3.User management and manging the privileges on branches, trees and tags. 4. Hook scripts management – post-commit scripts for E-mail notification to the testing team Precommit hook – To block the developers with empty log message commits, using command line also we can manage the repository by installing the subversion package, but for easy administration we use this visual svn server.
SVN Repository Backup: Backs up are available of three types in svn : 1. svndump : Dumping ( taking backup of the entire repository). 2. Hotbackup : It is a kind of backup where the entire project repository can be imported in very less time compared to the restroing the repository from svn dump. 3. Incremental Backup : Taking a range of versions backup
Commands to take the Project Repository Backup: Commands : 1. Svn dump : Entire repository : 1.  c:/ProgramFiles/Visualsvn/bin/svnadmin  dump  C:/Repository/Repo_name  > [Target Folder].dump 2. Svn Hot-copy :  c:/ProgramFiles/Visualsvn/bin/svnadmin  hot copy  C:/Repository/Repo_name   [Target Folder].dump
SVN Repository Backup: 3. Incremental Backup :  c:/ProgramFiles/Visualsvn/bin/svnadmin  dump -r:15:30  C:/Repository/Repo_name  > [Target Folder].dump  Here 15 indicated the starting version and 30 indicates the end version.
SVN Repository Backup: Backs up are available of two types in svn : 1. svndump : Dumping ( taking backup of the entire repository). 2. Hot backup : It is a kind of backup where the entire project repository can be imported in very less time compared to the restoring the repository from svn dump.
SVN Repository Restore: Commands : 1. Svn load : Entire repository : 1.  c:/ProgramFiles/Visualsvn/bin/svnadmin  load  C:/Repositories/repositoryname  < repobackup.dump This command leads to restore of the entire repository. 2. The second way of restoring the hot copy backup dump file : Open the visual svn server and create a repository folder and select the import tab and browse to the location where the dump file located and press ok, the hot copy backup repository wil be restored.
Hook Scripts to manage the Project repositories : What is Hook: Hook is a group of policies for a effective management of the project repository. There are serveral Hooks scripts available in the subversion ( SVN) 1. Pre-Commit Hook ( Check the policy before the commit happen to the repository) Eg: Empty log messages can be blocked using this pre commit hook 2. Post Commit Hook  ( Check the policy after the happen to the repository) Eg: Email notifications to each commit to testing team for quality analysis.
Hook Scripts : Pre Commit Hook to block the Empty Log Messages : &quot;C:rogram FilesisualSVN Serverinvnlook.exe&quot; log -t %2 %1 | FindStr [a-zA-Z0-9] IF %ERRORLEVEL% EQU 0 GOTO OK echo &quot;Commit Comments are Required, Dear developer please give the task details in detail for this commit&quot; >&2 exit 1 :OK exit 0
Post Commit Hook for Email Notifications to testing team : &quot;C:rogram FilesisualSVN ServerinisualSVNServerHooks.exe&quot; ^ commit-notification &quot;%1&quot; -r %2 ^ --from gopinath.karangula@ghoom.com --to xxxx@mic.co.in,xxxxxi@domain.in,xxxxx@domain.com ^ --smtp-server smtpout.secureserver.net ^ --smtp-user XXXXXXX@domain.com ^ --smtp-password XXXXXXXX
 

More Related Content

What's hot

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
Subversion on-the-fly replication
Subversion on-the-fly replicationSubversion on-the-fly replication
Subversion on-the-fly replicationnormanmaurer
 
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
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best PracticesMatt Wood
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to SubversionAtul Jha
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP DevelopersLorna Mitchell
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overviewpolarion
 
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
 
Subversion
SubversionSubversion
Subversionthebdot1
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With SubversionJordan Hatch
 
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 SOLabPablo Arriazu
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practicesabackstrom
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN TutorialenggHeads
 

What's hot (20)

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Subversion on-the-fly replication
Subversion on-the-fly replicationSubversion on-the-fly replication
Subversion on-the-fly replication
 
SVN Basics
SVN BasicsSVN Basics
SVN Basics
 
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
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
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
 
Subversion
SubversionSubversion
Subversion
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
 
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
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Subversion last minute survival crash course
Subversion  last minute survival crash courseSubversion  last minute survival crash course
Subversion last minute survival crash course
 
SVN Tutorial
SVN TutorialSVN Tutorial
SVN Tutorial
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
SVN
SVNSVN
SVN
 

Viewers also liked

Version controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn clientVersion controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn clientThet Aung Min Latt
 
02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for DevelopmentWANdisco Plc
 
Source Code Control System (SCCS)
Source Code Control System (SCCS)Source Code Control System (SCCS)
Source Code Control System (SCCS)Saurabh Kumar
 
Sql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersSql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersNadinKa Karimou
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVNPHPBelgium
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to SubversionJerryHe
 

Viewers also liked (10)

Tsvn17
Tsvn17Tsvn17
Tsvn17
 
Db2 tutorial
Db2 tutorialDb2 tutorial
Db2 tutorial
 
Version controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn clientVersion controls for php project with visual svn server and tortoisesvn client
Version controls for php project with visual svn server and tortoisesvn client
 
Rosettanet ppt
Rosettanet pptRosettanet ppt
Rosettanet ppt
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development02.19.13 WANDisco SVN Training: Branching Options for Development
02.19.13 WANDisco SVN Training: Branching Options for Development
 
Source Code Control System (SCCS)
Source Code Control System (SCCS)Source Code Control System (SCCS)
Source Code Control System (SCCS)
 
Sql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chaptersSql server-integration-services-ssis-step-by-step-sample-chapters
Sql server-integration-services-ssis-step-by-step-sample-chapters
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 

Similar to Totalsvn Usage And Administration By Gopi

Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationMassimo Menichinelli
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementPhilip Johnson
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld PresentationDan Hinojosa
 
FlashInTO SVN Presentation
FlashInTO SVN PresentationFlashInTO SVN Presentation
FlashInTO SVN PresentationMatthew Fabb
 
Burlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBurlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBradley Holt
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationMassimo Menichinelli
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego LeagueJeffrey T. Pollock
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control with SubversionO. R. Kumaran
 

Similar to Totalsvn Usage And Administration By Gopi (20)

subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Digital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 InformationDigital Fabrication Studio 0.3 Information
Digital Fabrication Studio 0.3 Information
 
Introduction to Version Control and Configuration Management
Introduction to Version Control and Configuration ManagementIntroduction to Version Control and Configuration Management
Introduction to Version Control and Configuration Management
 
Subversion
SubversionSubversion
Subversion
 
Subversion
SubversionSubversion
Subversion
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
FlashInTO SVN Presentation
FlashInTO SVN PresentationFlashInTO SVN Presentation
FlashInTO SVN Presentation
 
ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
 
Subversion
SubversionSubversion
Subversion
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
An introduction to SVN
An introduction to SVNAn introduction to SVN
An introduction to SVN
 
Subversion
SubversionSubversion
Subversion
 
Burlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBurlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion Presentation
 
Digital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: InformationDigital Fabrication Studio v.0.2: Information
Digital Fabrication Studio v.0.2: Information
 
Source control
Source controlSource control
Source control
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego League
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control with Subversion
 

Totalsvn Usage And Administration By Gopi

  • 1. Subversion (SVN) Tutorial Version control with Subversion & its Administration how to set it up, use it, and save your sanity how to set it up, use it, and save your sanity By Gopinath Karangula E-mail : gopinathkarangula@gmail.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9. File sharing: the problem to avoid
  • 13.
  • 14.
  • 15.
  • 16.  
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. SVN Administration : Trunk : Updated and major code of the project Tag : Showcase of Release versions and ready to pack Branches : Contain Total source code, which was divided and distributed to the workforce, where a source code commits happens on the branches for development and merged to test branch to bug fix, and add patches to stabilize the code ( Quality analysis), merged to release branch and deployed to production safely.
  • 31. Project Repository Creation using Visual Svn server : Using Visual SVN Server : we can perform: 1. Fresh creation of Repository with default structure of the Project 2. Creation of the Project Folder with out default Project structure. 3.User management and manging the privileges on branches, trees and tags. 4. Hook scripts management – post-commit scripts for E-mail notification to the testing team Precommit hook – To block the developers with empty log message commits, using command line also we can manage the repository by installing the subversion package, but for easy administration we use this visual svn server.
  • 32. SVN Repository Backup: Backs up are available of three types in svn : 1. svndump : Dumping ( taking backup of the entire repository). 2. Hotbackup : It is a kind of backup where the entire project repository can be imported in very less time compared to the restroing the repository from svn dump. 3. Incremental Backup : Taking a range of versions backup
  • 33. Commands to take the Project Repository Backup: Commands : 1. Svn dump : Entire repository : 1. c:/ProgramFiles/Visualsvn/bin/svnadmin dump C:/Repository/Repo_name > [Target Folder].dump 2. Svn Hot-copy : c:/ProgramFiles/Visualsvn/bin/svnadmin hot copy C:/Repository/Repo_name [Target Folder].dump
  • 34. SVN Repository Backup: 3. Incremental Backup : c:/ProgramFiles/Visualsvn/bin/svnadmin dump -r:15:30 C:/Repository/Repo_name > [Target Folder].dump Here 15 indicated the starting version and 30 indicates the end version.
  • 35. SVN Repository Backup: Backs up are available of two types in svn : 1. svndump : Dumping ( taking backup of the entire repository). 2. Hot backup : It is a kind of backup where the entire project repository can be imported in very less time compared to the restoring the repository from svn dump.
  • 36. SVN Repository Restore: Commands : 1. Svn load : Entire repository : 1. c:/ProgramFiles/Visualsvn/bin/svnadmin load C:/Repositories/repositoryname < repobackup.dump This command leads to restore of the entire repository. 2. The second way of restoring the hot copy backup dump file : Open the visual svn server and create a repository folder and select the import tab and browse to the location where the dump file located and press ok, the hot copy backup repository wil be restored.
  • 37. Hook Scripts to manage the Project repositories : What is Hook: Hook is a group of policies for a effective management of the project repository. There are serveral Hooks scripts available in the subversion ( SVN) 1. Pre-Commit Hook ( Check the policy before the commit happen to the repository) Eg: Empty log messages can be blocked using this pre commit hook 2. Post Commit Hook ( Check the policy after the happen to the repository) Eg: Email notifications to each commit to testing team for quality analysis.
  • 38. Hook Scripts : Pre Commit Hook to block the Empty Log Messages : &quot;C:rogram FilesisualSVN Serverinvnlook.exe&quot; log -t %2 %1 | FindStr [a-zA-Z0-9] IF %ERRORLEVEL% EQU 0 GOTO OK echo &quot;Commit Comments are Required, Dear developer please give the task details in detail for this commit&quot; >&2 exit 1 :OK exit 0
  • 39. Post Commit Hook for Email Notifications to testing team : &quot;C:rogram FilesisualSVN ServerinisualSVNServerHooks.exe&quot; ^ commit-notification &quot;%1&quot; -r %2 ^ --from gopinath.karangula@ghoom.com --to xxxx@mic.co.in,xxxxxi@domain.in,xxxxx@domain.com ^ --smtp-server smtpout.secureserver.net ^ --smtp-user XXXXXXX@domain.com ^ --smtp-password XXXXXXXX
  • 40.