SlideShare a Scribd company logo
Subversion
SVN
Md. Maidul Islam
What is version control?

Version management allows you to control and monitor
changes to files
− What changes were made?
− Revert to pervious versions
− When were changes made
− What code was present in release 2.7?

Earliest tools were around 1972 (SCCS)

Older tools – RCS, CVS, Microsoft Source Safe, PVCS
Version Manager, etc…

Current tools – Subversion, Mercurial, Git, Bazaar
We will use subversion (svn)

Why?

Because it’s popular

It’s well supported
− IDEs - Netbeans, Eclipse
− Numerous GUI tools
− Command line
− XP Dev has support for it (you will use this for your semester
projects)
subversion concepts

checkout – get a local copy of the files
− I have no files yet, how do I get them?

add – add a new file into the repository
− I created a new file and want to check it in

commit – send locally modified files to the repository
− I’ve made changes, how do I send them to the group?

update – update all files with latest changes
− Other people made changes, how do I get them?

tag / branch – label a “release”
− I want to “turn in” a set of files
Creating a new repository

Command Line:
− Open command prompt
− Go to a directory where you want your files to be stored
− svn checkout <<location>>/svn/<<your project>>/

GUI Mac OSX SCPlugin
− Adds commands to right-click menu in Finder

GUI Windows Tortoise SVN
− Adds commands to right-click menu in Explorer
How to Use Version Control
checkout (first time)
(do some work, test)
update
commit
(do more work, test)
serverclient
send current revision ( n )
update your local copy with any
changes in the repo.
save your changes and log entry
check status
any changes since revision n?
(resolve conflicts)
tags
branches
trunk
Project 1
Root
Project 2
Subversion Repository Layout
tags
branches
trunk
tags
trunk
Project 1
Repository parent dir
Project 2
tags
trunk
One repository, many projects One project per repository
branches
branches
Subversion "repository"

Typically one "repository" per project.

Server can have an unlimited number of
"repositories".
/var/svn/kuclock
revision 1
(initial repo structure)
revision 2
revision 3
revision 3:
 content diffs
 author
 date
 reason for change (comment)
revision 4
"KUClock" Project Repository
revision 2:
 initial project check-in
 ...etc...
Revision numbers
0 1 2 3
Revision number is
increased for every
transaction that
changes the repository.
Properties of a Repository

History of all changes to files and directories.
− you can recover any previous version of a file
− remembers "moved" and "deleted" files

Access Control
− Read / write permission for users and groups
− Permissions can apply to repo, directory, or file

Logging
− author of the change
− date of the change
− reason for the change
URLs and Protocols
http://myhost.com:port/path/to/repository
Protocol:
svn
svn+ssh
http
https
file
Host name or
IP address
127.0.0.1
localhost
host:8443
optional port
number
Repository
relative
path
(1) Check Out using TortoiseSVN
Using Windows Explorer, right-click in a directory.
If not sure of path to check-out
then use Repo-browser first.
In Repo-browser, right-click on
folder or file you want to check-
out.
(1) Check out using Eclipse
Many ways to do it. Here is a simple way:
1. Switch to "SVN Repository Exploring Mode".
2. Right click and choose
New => Repository Location
3. Enter URL and (optional)
authentication info.
(1) Check out using Eclipse

Now you can browse the repository.

Choose the part you want to check-out
(usually "trunk")

Right click and choose "Check Out as..."
("Check Out as..." gives you a chance to
change local project name if you want.)
Merging
 Merging from a Branch
 Merge Tracking
 Best Practices
Merging From a Branch
• What’s with the bug you've fixed on the bug-
fix-branch?
• What about your current development?
• You have to merge the
changes made in the branch
back to the main line.
RELEASE 1.0.0
BUGFIX_BRANCH
Merge back
267
RELEASE
1.0.1
Merge From a Branch via CLI
You can merge the changes from the branch
into your current working copy with the
following command:
svn merge -r 267:HEAD branchnamebranchname
(1) The Subversion “merge”-command.
(2) The revision in which we created the branch (267) and HEAD
for the complete branch.
(3) The branch-name you like to merge into your current
working copy.
Merge From a Branch via CLI
You can find the revision number when the
branch was created using the command:
svn log --verbose --stop-on-copy branchnamebranchname
(1) The Subversion “log”-command.
(2) Print out much information (verbose).
(3) Stop the log-output at the revision the branch was copied.
(4) The branch-name you like to merge into your current
working copy.
Merge From a Branch via CLI
Extract the start point of the branch via CLI:
Merge From a Branch via CLI
Merging of a branch via CLI:
Merge From a Branch via
TortoiseSVN
Merging of a branch via TortoiseSVN:
Merge From a Branch via
TortoiseSVN
Merging of a branch via TortoiseSVN:
Merge From a Branch via
TortoiseSVN
Merging of a branch via TortoiseSVN:
Merge Tracking
Merge tracking:
• Subversion does notnot have any function to
track merges that have already been done,
i.e., to prevent you to merge a branch a
second time.
• You have to do it yourself!
•Example: after merging, create a README-
merged file in the branch stating that it was
merged into trunk revision r99.
From the technical view branch and tag are the
same.
BUT:
• The intention of a tag is that it should be used as
read-only area whereas a branch is used to
continue development (interim code, bug-fixing,
release candidate etc.).
• Technically you can use a tag to continue
development and check in etc. but you shouldn’t
do it.
• So in other words the difference between a tag
and a branch is just an agreement.
Merge Warning
Developer Branches
• Separation of team members can be realized
with branches.
• One branch per team member or several
members on a branch - the decision is
based on the size of the teams.
Member 2
Main line
Member 1
Developer Branches
• Advantages using branches for team work:
•No changes during development on the main line
needed => Code stability.
•Every team member can work in its own environment.
• Disadvantages:
•Sometimes the mainline and the branch will diverge if
the branch lives too long.
Feature Branches
• Separation by features (one branch each).
Feature 2
Main line
Feature 1
Thank You

More Related Content

PPTX
SVN Basics
PDF
最新情報でわかる Windows 10 の導入と展開 (2017/9/19 開催分)
PPTX
USB3.0ドライバ開発の道
PPTX
Git and Github
PDF
Lightweight Virtualization: LXC containers & AUFS
PDF
(Declarative) Jenkins Pipelines
PDF
[Cloud OnAir] エンタープライズでのマイグレーション 組織とリソース管理 2019年07月25日 放送
PPTX
Github
SVN Basics
最新情報でわかる Windows 10 の導入と展開 (2017/9/19 開催分)
USB3.0ドライバ開発の道
Git and Github
Lightweight Virtualization: LXC containers & AUFS
(Declarative) Jenkins Pipelines
[Cloud OnAir] エンタープライズでのマイグレーション 組織とリソース管理 2019年07月25日 放送
Github

What's hot (20)

PDF
BlingTech - Gitlab
PDF
Versionskontrolle mit Subversion und Git
PDF
Redmineを使ってみよう
PPTX
AKS と ACI を組み合わせて使ってみた
PDF
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
PPTX
Version control system and Git
PDF
超簡単! Bitnami RedmineをWindowsにインストール
PPTX
Using GitHub Actions to Deploy your Workloads to Azure
PDF
IT エンジニアのための 流し読み Microsoft 365 - 入門!Microsoft Defender ATP
PPTX
ODS ってなんだ?
PPTX
Git branching strategies
PDF
WordPressのCDN化
PPT
Introduction to Git and Github
PPTX
新登場! Windows Defender Application Guard 解説 ~ Microsoft Edge がセキュア ブラウザーに!?~
PDF
AlmaLinux と Rocky Linux の誕生経緯&比較
PDF
AndroidとSELinux
PDF
Proxmox VE 開源虛擬化平台實際應用架構與案例 [2025/06/02] @vLAB線上研討會
PPTX
Maven Basics - Explained
PDF
DX 時代の新たなソフトウェア工学に向けて: SWEBOK と SE4BS の挑戦
PDF
FreeBSD Capsicum
BlingTech - Gitlab
Versionskontrolle mit Subversion und Git
Redmineを使ってみよう
AKS と ACI を組み合わせて使ってみた
Javaでやってみる The Twelve Factor App JJUG-CCC 2014 Fall 講演資料
Version control system and Git
超簡単! Bitnami RedmineをWindowsにインストール
Using GitHub Actions to Deploy your Workloads to Azure
IT エンジニアのための 流し読み Microsoft 365 - 入門!Microsoft Defender ATP
ODS ってなんだ?
Git branching strategies
WordPressのCDN化
Introduction to Git and Github
新登場! Windows Defender Application Guard 解説 ~ Microsoft Edge がセキュア ブラウザーに!?~
AlmaLinux と Rocky Linux の誕生経緯&比較
AndroidとSELinux
Proxmox VE 開源虛擬化平台實際應用架構與案例 [2025/06/02] @vLAB線上研討會
Maven Basics - Explained
DX 時代の新たなソフトウェア工学に向けて: SWEBOK と SE4BS の挑戦
FreeBSD Capsicum
Ad

Viewers also liked (6)

PPTX
Application Automation with Habitat
PDF
Jenkins vs GitLab CI
PDF
Version Control With Subversion
PPT
Subversion Overview
PPTX
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
PDF
Gitlab Training with GIT and SourceTree
Application Automation with Habitat
Jenkins vs GitLab CI
Version Control With Subversion
Subversion Overview
Orchestration? You Don't Need Orchestration. What You Want Is Choreography by...
Gitlab Training with GIT and SourceTree
Ad

Similar to SVN Tool Information : Best Practices (20)

PPTX
SVN Information
PPTX
Source version control using subversion
PPTX
Subversion
PPTX
JavaEdge 2008: Your next version control system
PPT
subversion.ppt
PDF
Version control 101
ODP
Practical SVN for PHP Developers
ODP
Subversionn Introduction at SuperMondays 2009-09-01
PPT
Totalsvn Usage And Administration By Gopi
PPT
Subversion client
PPTX
Subversion
PDF
Git your life for fun & profit
ODP
Svn Basic Tutorial
PPTX
PDF
Git your life for fun & profit
PPT
SVN Usage & Best Practices
PPT
Part 4 - Managing your svn repository using jas forge
PDF
SVN essentials
ODP
Burlington, VT PHP Users Group Subversion Presentation
SVN Information
Source version control using subversion
Subversion
JavaEdge 2008: Your next version control system
subversion.ppt
Version control 101
Practical SVN for PHP Developers
Subversionn Introduction at SuperMondays 2009-09-01
Totalsvn Usage And Administration By Gopi
Subversion client
Subversion
Git your life for fun & profit
Svn Basic Tutorial
Git your life for fun & profit
SVN Usage & Best Practices
Part 4 - Managing your svn repository using jas forge
SVN essentials
Burlington, VT PHP Users Group Subversion Presentation

Recently uploaded (20)

PDF
Software Development Methodologies in 2025
PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
Transforming Manufacturing operations through Intelligent Integrations
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
Google’s NotebookLM Unveils Video Overviews
PDF
SparkLabs Primer on Artificial Intelligence 2025
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
DevOps & Developer Experience Summer BBQ
PDF
Chapter 2 Digital Image Fundamentals.pdf
Software Development Methodologies in 2025
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
Automating ArcGIS Content Discovery with FME: A Real World Use Case
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Revolutionize Operations with Intelligent IoT Monitoring and Control
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
Transforming Manufacturing operations through Intelligent Integrations
Understanding_Digital_Forensics_Presentation.pptx
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
Google’s NotebookLM Unveils Video Overviews
SparkLabs Primer on Artificial Intelligence 2025
madgavkar20181017ppt McKinsey Presentation.pdf
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
NewMind AI Weekly Chronicles - August'25 Week I
CroxyProxy Instagram Access id login.pptx
NewMind AI Monthly Chronicles - July 2025
DevOps & Developer Experience Summer BBQ
Chapter 2 Digital Image Fundamentals.pdf

SVN Tool Information : Best Practices

  • 2. What is version control?  Version management allows you to control and monitor changes to files − What changes were made? − Revert to pervious versions − When were changes made − What code was present in release 2.7?  Earliest tools were around 1972 (SCCS)  Older tools – RCS, CVS, Microsoft Source Safe, PVCS Version Manager, etc…  Current tools – Subversion, Mercurial, Git, Bazaar
  • 3. We will use subversion (svn)  Why?  Because it’s popular  It’s well supported − IDEs - Netbeans, Eclipse − Numerous GUI tools − Command line − XP Dev has support for it (you will use this for your semester projects)
  • 4. subversion concepts  checkout – get a local copy of the files − I have no files yet, how do I get them?  add – add a new file into the repository − I created a new file and want to check it in  commit – send locally modified files to the repository − I’ve made changes, how do I send them to the group?  update – update all files with latest changes − Other people made changes, how do I get them?  tag / branch – label a “release” − I want to “turn in” a set of files
  • 5. Creating a new repository  Command Line: − Open command prompt − Go to a directory where you want your files to be stored − svn checkout <<location>>/svn/<<your project>>/  GUI Mac OSX SCPlugin − Adds commands to right-click menu in Finder  GUI Windows Tortoise SVN − Adds commands to right-click menu in Explorer
  • 6. How to Use Version Control checkout (first time) (do some work, test) update commit (do more work, test) serverclient send current revision ( n ) update your local copy with any changes in the repo. save your changes and log entry check status any changes since revision n? (resolve conflicts)
  • 7. tags branches trunk Project 1 Root Project 2 Subversion Repository Layout tags branches trunk tags trunk Project 1 Repository parent dir Project 2 tags trunk One repository, many projects One project per repository branches branches
  • 8. Subversion "repository"  Typically one "repository" per project.  Server can have an unlimited number of "repositories". /var/svn/kuclock revision 1 (initial repo structure) revision 2 revision 3 revision 3:  content diffs  author  date  reason for change (comment) revision 4 "KUClock" Project Repository revision 2:  initial project check-in  ...etc...
  • 9. Revision numbers 0 1 2 3 Revision number is increased for every transaction that changes the repository.
  • 10. Properties of a Repository  History of all changes to files and directories. − you can recover any previous version of a file − remembers "moved" and "deleted" files  Access Control − Read / write permission for users and groups − Permissions can apply to repo, directory, or file  Logging − author of the change − date of the change − reason for the change
  • 11. URLs and Protocols http://myhost.com:port/path/to/repository Protocol: svn svn+ssh http https file Host name or IP address 127.0.0.1 localhost host:8443 optional port number Repository relative path
  • 12. (1) Check Out using TortoiseSVN Using Windows Explorer, right-click in a directory. If not sure of path to check-out then use Repo-browser first. In Repo-browser, right-click on folder or file you want to check- out.
  • 13. (1) Check out using Eclipse Many ways to do it. Here is a simple way: 1. Switch to "SVN Repository Exploring Mode". 2. Right click and choose New => Repository Location 3. Enter URL and (optional) authentication info.
  • 14. (1) Check out using Eclipse  Now you can browse the repository.  Choose the part you want to check-out (usually "trunk")  Right click and choose "Check Out as..." ("Check Out as..." gives you a chance to change local project name if you want.)
  • 15. Merging  Merging from a Branch  Merge Tracking  Best Practices
  • 16. Merging From a Branch • What’s with the bug you've fixed on the bug- fix-branch? • What about your current development? • You have to merge the changes made in the branch back to the main line. RELEASE 1.0.0 BUGFIX_BRANCH Merge back 267 RELEASE 1.0.1
  • 17. Merge From a Branch via CLI You can merge the changes from the branch into your current working copy with the following command: svn merge -r 267:HEAD branchnamebranchname (1) The Subversion “merge”-command. (2) The revision in which we created the branch (267) and HEAD for the complete branch. (3) The branch-name you like to merge into your current working copy.
  • 18. Merge From a Branch via CLI You can find the revision number when the branch was created using the command: svn log --verbose --stop-on-copy branchnamebranchname (1) The Subversion “log”-command. (2) Print out much information (verbose). (3) Stop the log-output at the revision the branch was copied. (4) The branch-name you like to merge into your current working copy.
  • 19. Merge From a Branch via CLI Extract the start point of the branch via CLI:
  • 20. Merge From a Branch via CLI Merging of a branch via CLI:
  • 21. Merge From a Branch via TortoiseSVN Merging of a branch via TortoiseSVN:
  • 22. Merge From a Branch via TortoiseSVN Merging of a branch via TortoiseSVN:
  • 23. Merge From a Branch via TortoiseSVN Merging of a branch via TortoiseSVN:
  • 24. Merge Tracking Merge tracking: • Subversion does notnot have any function to track merges that have already been done, i.e., to prevent you to merge a branch a second time. • You have to do it yourself! •Example: after merging, create a README- merged file in the branch stating that it was merged into trunk revision r99.
  • 25. From the technical view branch and tag are the same. BUT: • The intention of a tag is that it should be used as read-only area whereas a branch is used to continue development (interim code, bug-fixing, release candidate etc.). • Technically you can use a tag to continue development and check in etc. but you shouldn’t do it. • So in other words the difference between a tag and a branch is just an agreement. Merge Warning
  • 26. Developer Branches • Separation of team members can be realized with branches. • One branch per team member or several members on a branch - the decision is based on the size of the teams. Member 2 Main line Member 1
  • 27. Developer Branches • Advantages using branches for team work: •No changes during development on the main line needed => Code stability. •Every team member can work in its own environment. • Disadvantages: •Sometimes the mainline and the branch will diverge if the branch lives too long.
  • 28. Feature Branches • Separation by features (one branch each). Feature 2 Main line Feature 1

Editor's Notes

  • #10: Subversion Revision numbers are global across the whole repository Identify how the entire repository looks at that instant in time A commit creates a snapshot of the entire tree in the repository at that revision number Allows users to say, “Hey so-and-so, go get revision 1432 of XYZ and try to compile it.” Before an update, both bar.c and foo.c are at revision 25 Modify bar.c and commit Then update the working copy Now bar.c and foo.c are at revision 26, except that foo.c in revision 25 and 26 are identical No additional space in repository required, i.e. a cheap copy or a symbolic link is made