3
Most read
4
Most read
12
Most read
Subversion (SVN) Tutorial for CS421
Dan Fleck
Spring 2010
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
 Works with xp-dev.com (which we’ll use)
 I know little about the other recent tools  - truth
hurts
 Big difference is SVN has a single central repository
 Git/Mercurial are distributed (more peer-to-peer)
http://git.or.cz/gitwiki/GitSvnComparsion (if you’re
interested)
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 http://svn.xp-dev.com/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
Creating a new repository - Mac SCPlugin
Create Repository – Mac OSX
Create a repository using Tortoise SVN
 I need a tool that allows Windows screenshots with a
timer.
 See:
http://tortoisesvn.tigris.org/ExplorerIntegration.html#c
ontextmenus
 Open Windows Explorer
 Select a directory where you want your repository
 Right-click and select “Create Repository Here…”
Add a file into repository
 Copy a new file into the “trunk” directory
 Tell SVN to include the file as part of the repository
 Command line
 svn add yourFile.ppt
 GUI
 Windows: right click choose: TortoiseSVN->Add
 Mac OSX: right click choose:More->Subversion->Add
 This does NOT upload the file yet! The commit
command will upload all new files and changed files
Commit changes
 Modify a file contained in your repository
 Command Line:
 svn commit -m ’Added a new sequence diagram.’
 GUI
 Windows: right click choose: TortoiseSVN->commit
 Mac OSX: right click choose:More->Subversion->commit
 Update the message with what was changed in the file. This
should be a meaningful statement someone can look at to
determine what was changed
Update
 Update gets all new changes from the repository.
 svn update
 GUI Users: you should get it by now
 What happens if there is a conflict?
 User A has version 3 of the file, modifies it, commits it creating
version 4.
 User B has version 3 of the file, modifies it, commits it
 CONFLICT – User B’s copy of the file was out of date. User B must merge
their changes into Version 4
 For text files (like source code) SVN can help do this in an
automated way
 For binary files SVN cannot help… must be done manually
 Lesson: Always ensure you have the latest version (update
frequently). If multiple people are editing the same file you
could have problems
Subversion Directories
 trunk – main working files
 branches – place to put other copies people are
working on off the main trunk
 tags – place to put a labeled “release”. You will turn
in your project by tagging a version as “TurnInOne”
 Command Line:
 go to the directory of your project
 svn copy trunk tags/TurnInOne
 Windows GUI
 right-click on “trunk”
 select TortoiseSVN->Branch/Tag
 change “To URL” to http://svn.xp-dev.com/svn/<<your
project>>/tags/TurnInOne
Subversion Tags/Branches
 Tags/Branches really work as copying the repository to a
new directory (url)
 You will turn in your project by tagging versions
(example: “TurnInOne”)
 Command Line:
 go to the directory of your project
 svn copy trunk tags/TurnInOne
 Windows GUI
 right-click on “trunk”
 select TortoiseSVN->Branch/Tag
 change “To URL” to http://svn.xp-dev.com/svn/<<your
project>>/tags/TurnInOne
 Mac OSX SCPlugin GUI
 Does not seem to work for me on xp-dev.com (use command line)
Summary – Turning things in
1. Create the repository by “svn checkout”
2. Copy your documents into “trunk” directory
3. Use “svn add” to mark files to include in the
repository
1. Use “svn commit” to send the files to the repository
4. Modify files, “svn commit” as needed until your
deliverable is complete
5. Update turn in sheet (in repository)
6. svn commit (don’t forget the final commit!)
7. svn copy trunk tags/TurnInXYZ
Other notes
 log command shows the log of changes to a file
 diff command can shows changes between revisions
(for text files only)
 These commands are all built-in to IDEs: eclipse,
netbeans
 Mac Users: the SVN command line that is bundled
with Mac (at least Leopard) is old (and wasn’t
compatible for SCPlugin). You can update the
command line tool at :
http://www.open.collab.net/downloads/subversion.ht

More Related Content

PPTX
SVN Information
PPT
SVN Tool Information : Best Practices
PPT
Totalsvn Usage And Administration By Gopi
PPT
Part 4 - Managing your svn repository using jas forge
PPTX
Subversion
PDF
Versioning for Developers
PPTX
Getting Started With Subversion
PPTX
Source version control using subversion
SVN Information
SVN Tool Information : Best Practices
Totalsvn Usage And Administration By Gopi
Part 4 - Managing your svn repository using jas forge
Subversion
Versioning for Developers
Getting Started With Subversion
Source version control using subversion

Similar to subversion.ppt (20)

PPT
Source control
PPT
Subversion client
PPT
Introduction to Subversion and Google Project Hosting
ODP
Subversionn Introduction at SuperMondays 2009-09-01
PPTX
Version Control System
PPTX
Random House
PPT
Subversion (SVN)
ODP
Svn Basic Tutorial
PDF
Version Control with SVN
PDF
Git your life for fun & profit
ODP
Practical SVN for PHP Developers
PPT
How to setup Svn in system
PDF
ODP
Burlington, VT PHP Users Group Subversion Presentation
PPTX
Subversion
PPTX
PPT
Subversion Overview
PDF
Git your life for fun & profit
ODP
Introduction to Version Control
PPT
SVN Usage & Best Practices
Source control
Subversion client
Introduction to Subversion and Google Project Hosting
Subversionn Introduction at SuperMondays 2009-09-01
Version Control System
Random House
Subversion (SVN)
Svn Basic Tutorial
Version Control with SVN
Git your life for fun & profit
Practical SVN for PHP Developers
How to setup Svn in system
Burlington, VT PHP Users Group Subversion Presentation
Subversion
Subversion Overview
Git your life for fun & profit
Introduction to Version Control
SVN Usage & Best Practices
Ad

Recently uploaded (20)

PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PDF
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
PPTX
Pilar Kemerdekaan dan Identi Bangsa.pptx
PPTX
Topic 5 Presentation 5 Lesson 5 Corporate Fin
PDF
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
PDF
Navigating the Thai Supplements Landscape.pdf
PPT
lectureusjsjdhdsjjshdshshddhdhddhhd1.ppt
PDF
[EN] Industrial Machine Downtime Prediction
PPTX
Introduction to Inferential Statistics.pptx
PPTX
Lesson-01intheselfoflifeofthekennyrogersoftheunderstandoftheunderstanded
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PPTX
New ISO 27001_2022 standard and the changes
PPTX
sac 451hinhgsgshssjsjsjheegdggeegegdggddgeg.pptx
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PDF
Microsoft Core Cloud Services powerpoint
PPTX
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
PDF
Microsoft 365 products and services descrption
PPTX
IMPACT OF LANDSLIDE.....................
PDF
Global Data and Analytics Market Outlook Report
PDF
Transcultural that can help you someday.
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
Pilar Kemerdekaan dan Identi Bangsa.pptx
Topic 5 Presentation 5 Lesson 5 Corporate Fin
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
Navigating the Thai Supplements Landscape.pdf
lectureusjsjdhdsjjshdshshddhdhddhhd1.ppt
[EN] Industrial Machine Downtime Prediction
Introduction to Inferential Statistics.pptx
Lesson-01intheselfoflifeofthekennyrogersoftheunderstandoftheunderstanded
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
New ISO 27001_2022 standard and the changes
sac 451hinhgsgshssjsjsjheegdggeegegdggddgeg.pptx
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
Microsoft Core Cloud Services powerpoint
DS-40-Pre-Engagement and Kickoff deck - v8.0.pptx
Microsoft 365 products and services descrption
IMPACT OF LANDSLIDE.....................
Global Data and Analytics Market Outlook Report
Transcultural that can help you someday.
Ad

subversion.ppt

  • 1. Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010
  • 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  Works with xp-dev.com (which we’ll use)  I know little about the other recent tools  - truth hurts  Big difference is SVN has a single central repository  Git/Mercurial are distributed (more peer-to-peer) http://git.or.cz/gitwiki/GitSvnComparsion (if you’re interested)
  • 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 http://svn.xp-dev.com/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. Creating a new repository - Mac SCPlugin
  • 8. Create a repository using Tortoise SVN  I need a tool that allows Windows screenshots with a timer.  See: http://tortoisesvn.tigris.org/ExplorerIntegration.html#c ontextmenus  Open Windows Explorer  Select a directory where you want your repository  Right-click and select “Create Repository Here…”
  • 9. Add a file into repository  Copy a new file into the “trunk” directory  Tell SVN to include the file as part of the repository  Command line  svn add yourFile.ppt  GUI  Windows: right click choose: TortoiseSVN->Add  Mac OSX: right click choose:More->Subversion->Add  This does NOT upload the file yet! The commit command will upload all new files and changed files
  • 10. Commit changes  Modify a file contained in your repository  Command Line:  svn commit -m ’Added a new sequence diagram.’  GUI  Windows: right click choose: TortoiseSVN->commit  Mac OSX: right click choose:More->Subversion->commit  Update the message with what was changed in the file. This should be a meaningful statement someone can look at to determine what was changed
  • 11. Update  Update gets all new changes from the repository.  svn update  GUI Users: you should get it by now  What happens if there is a conflict?  User A has version 3 of the file, modifies it, commits it creating version 4.  User B has version 3 of the file, modifies it, commits it  CONFLICT – User B’s copy of the file was out of date. User B must merge their changes into Version 4  For text files (like source code) SVN can help do this in an automated way  For binary files SVN cannot help… must be done manually  Lesson: Always ensure you have the latest version (update frequently). If multiple people are editing the same file you could have problems
  • 12. Subversion Directories  trunk – main working files  branches – place to put other copies people are working on off the main trunk  tags – place to put a labeled “release”. You will turn in your project by tagging a version as “TurnInOne”  Command Line:  go to the directory of your project  svn copy trunk tags/TurnInOne  Windows GUI  right-click on “trunk”  select TortoiseSVN->Branch/Tag  change “To URL” to http://svn.xp-dev.com/svn/<<your project>>/tags/TurnInOne
  • 13. Subversion Tags/Branches  Tags/Branches really work as copying the repository to a new directory (url)  You will turn in your project by tagging versions (example: “TurnInOne”)  Command Line:  go to the directory of your project  svn copy trunk tags/TurnInOne  Windows GUI  right-click on “trunk”  select TortoiseSVN->Branch/Tag  change “To URL” to http://svn.xp-dev.com/svn/<<your project>>/tags/TurnInOne  Mac OSX SCPlugin GUI  Does not seem to work for me on xp-dev.com (use command line)
  • 14. Summary – Turning things in 1. Create the repository by “svn checkout” 2. Copy your documents into “trunk” directory 3. Use “svn add” to mark files to include in the repository 1. Use “svn commit” to send the files to the repository 4. Modify files, “svn commit” as needed until your deliverable is complete 5. Update turn in sheet (in repository) 6. svn commit (don’t forget the final commit!) 7. svn copy trunk tags/TurnInXYZ
  • 15. Other notes  log command shows the log of changes to a file  diff command can shows changes between revisions (for text files only)  These commands are all built-in to IDEs: eclipse, netbeans  Mac Users: the SVN command line that is bundled with Mac (at least Leopard) is old (and wasn’t compatible for SCPlugin). You can update the command line tool at : http://www.open.collab.net/downloads/subversion.ht

Editor's Notes

  • #13: got here Early class Jan 21, 2010