SlideShare a Scribd company logo
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

Similar to subversion.ppt

SVN Information
SVN Information  SVN Information
SVN Information
RAHUL TRIPATHI
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
Jordan Hatch
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best PracticesAshraf Fouad
 
FlashInTO SVN Presentation
FlashInTO SVN PresentationFlashInTO SVN Presentation
FlashInTO SVN Presentation
Matthew Fabb
 
Mercurial presentation
Mercurial presentationMercurial presentation
Mercurial presentation
dotNETUserGroupDnipro
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control with SubversionO. R. Kumaran
 
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
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
Marco Pivetta
 
groovy & grails - lecture 10
groovy & grails - lecture 10groovy & grails - lecture 10
groovy & grails - lecture 10
Alexandre Masselot
 
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
SubversionSubversion
Subversion client
Subversion clientSubversion client
Subversion clientrchakra
 
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
Massimo Menichinelli
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Massimo Menichinelli
 
ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
Abhishek Srivastava
 
Source control
Source controlSource control
Source control
anushka perera
 
Subversion User Guide
Subversion User GuideSubversion User Guide
Subversion User Guide
Muthuselvam RS
 

Similar to subversion.ppt (20)

SVN Information
SVN Information  SVN Information
SVN Information
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
 
SVN Usage & Best Practices
SVN Usage & Best PracticesSVN Usage & Best Practices
SVN Usage & Best Practices
 
An introduction to SVN
An introduction to SVNAn introduction to SVN
An introduction to SVN
 
FlashInTO SVN Presentation
FlashInTO SVN PresentationFlashInTO SVN Presentation
FlashInTO SVN Presentation
 
Mercurial presentation
Mercurial presentationMercurial presentation
Mercurial presentation
 
Version control with Subversion
Version control with SubversionVersion control with Subversion
Version control 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
 
Subversion
SubversionSubversion
Subversion
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
groovy & grails - lecture 10
groovy & grails - lecture 10groovy & grails - lecture 10
groovy & grails - lecture 10
 
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
SubversionSubversion
Subversion
 
Subversion client
Subversion clientSubversion client
Subversion client
 
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
 
svn
svnsvn
svn
 
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media FactoryDigital Fabrication Studio.02 _Information @ Aalto Media Factory
Digital Fabrication Studio.02 _Information @ Aalto Media Factory
 
ClearCase Basics
ClearCase BasicsClearCase Basics
ClearCase Basics
 
Source control
Source controlSource control
Source control
 
Subversion User Guide
Subversion User GuideSubversion User Guide
Subversion User Guide
 

Recently uploaded

Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 

Recently uploaded (20)

Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 

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

  1. got here Early class Jan 21, 2010