SlideShare a Scribd company logo
1 of 27
Download to read offline
A day with Subversion (SVN)

            Sebastian Heimann

Institut f¨r Geophysik, Arbeitsgruppe Seismologie
          u


             February 15, 2007
Outline




    1. Concepts (by example)
    2. Vocabulary
    3. Benefits
    4. Further reading
The initial work


   Let’s assume we have just made a quick and dirty hack, which we
   now want to put under version contol for further development:

   > ls /my/hack
Create an empty repository


   > svnadmin create --fs-type fsfs /my/repos



                                        Repository
The initial import

   > svn import /my/hack file:///my/repos/hack/trunk 
              -m ’Initial import’



                                        Repository




                                   1
Checkout a working copy of hack


   > svn checkout file:///my/repos/hack/trunk /work/hack



                                        Repository
         Working copy



                                   1
Add a new feature to hack

   > cd /work/hack ; vi hack



                                   Repository
         Working copy



                               1
Commit your changes to the repository

   > svn commit



                                            Repository
         Working copy

                                        2




                                        1
More than one person can now work on hack



                          Repository


  Fu’s working copy   2                Fara’s working copy




                      1
Both implement their improvements



                          Repository


  Fu’s working copy   2                Fara’s working copy




                      1
Fu commits his changes to the repository



                        Repository
  > svn commit
                         3


                                       Fara’s working copy
   Fu’s working copy
                         2




                         1
Fara commits her changes to the repository

                        Repository

                         4



                                       > svn commit
   Fu’s working copy
                         3

                                       Fara’s working copy


                         2




                         1
To get each others changes

                        Repository

                        4



  > svn update                       > svn update

                        3

  Fu’s working copy                  Fara’s working copy


                        2




                        1
Fu and Fara can go back to any previous revision

                        Repository

                         4



  > svn update -r 1                     > svn update -r 3

                         3

   Fu’s working copy                    Fara’s working copy


                         2




                         1
Internally the repository will only store differences...

                           Repository

                           4




                           3




                           2




                           1
...but it pretends to make a new copy on every commit.

                        Repository

                         4




                         3




                         2




                         1
Sometimes it may be useful to branch the project...




   > svn cp -r 2 file:///my/repos/hack/trunk 
                 file:///my/repos/hack/branches/mad
...this creates a copy directly in the repository.


                       4




                       3




           .../trunk                         .../branches/mad
                       2         5




                       1
Check out a working copy of the branch




   > svn checkout file:///my/repos/hack/branches/mad 
                  /work/mad-hack
You can now safely experiment with mad-hack, while
maintaining a stable version of hack in the trunk.


                              4


 > cd /work/mad-hack

 > # edit it                  3        6




                              2        5




                              1

 > svn commit
Tagging: You can also use the branching mechanism to
mark a specific revisions as somehow special.




   > svn cp -r 2 file:///my/repos/hack/trunk 
                 file:///my/repos/hack/tags/stable-v1
Tagged stable version 1 of hack


                      4




                      3




          .../trunk               .../tags/stable-v1
                      2       5




                      1
Vocabulary




      repository
      revision
      working copy
      to check out
      to commit
      to update
Vocabulary




      to branch
      to merge
      to tag
Conventions




      hack/trunk
      hack/branches/mad
      hack/tags/stable-v1
Benefits




      Unlimited undo!
      Collaborate with others!
      Enforces structured development
      Makes you document what you are doing
      Automatic changelog!
      Helps you organize your mess in $HOME
Further reading


   Tutorial
       http://artis.imag.fr/~Xavier.Decoret/resources/svn/



   Documentation (A good intro is in Chapter 2)
       http://svnbook.red-bean.com/nightly/en/


   Online help
       > svn help
       > svn [command] help

More Related Content

What's hot

Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
Buland Singh
 

What's hot (20)

Linux con europe_2014_f
Linux con europe_2014_fLinux con europe_2014_f
Linux con europe_2014_f
 
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
도커 없이 컨테이너 만들기 5편 마운트 네임스페이스와 오버레이 파일시스템
 
Ansible ex407 and EX 294
Ansible ex407 and EX 294Ansible ex407 and EX 294
Ansible ex407 and EX 294
 
Docker 101, Alexander Ryabtsev
Docker 101, Alexander RyabtsevDocker 101, Alexander Ryabtsev
Docker 101, Alexander Ryabtsev
 
Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1 Make container without_docker_6-overlay-network_1
Make container without_docker_6-overlay-network_1
 
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OS
 
Lec7
Lec7Lec7
Lec7
 
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
 
Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7
 
Samba 4 - debian instalacao
Samba 4 - debian instalacaoSamba 4 - debian instalacao
Samba 4 - debian instalacao
 
Docker advance1
Docker advance1Docker advance1
Docker advance1
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
inotify
inotifyinotify
inotify
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Cache profiling on ARM Linux
Cache profiling on ARM LinuxCache profiling on ARM Linux
Cache profiling on ARM Linux
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
Tonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rarTonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rar
 

Viewers also liked (8)

open source intro
open source introopen source intro
open source intro
 
പഞ്ചായത്തു് കമ്പ്യൂട്ടര്‍വല്ക്കരണവും ഭരണഭാഷയും - ചില ചിന്തകള്‍
പഞ്ചായത്തു് കമ്പ്യൂട്ടര്‍വല്ക്കരണവും ഭരണഭാഷയും - ചില ചിന്തകള്‍പഞ്ചായത്തു് കമ്പ്യൂട്ടര്‍വല്ക്കരണവും ഭരണഭാഷയും - ചില ചിന്തകള്‍
പഞ്ചായത്തു് കമ്പ്യൂട്ടര്‍വല്ക്കരണവും ഭരണഭാഷയും - ചില ചിന്തകള്‍
 
Bajji An Intro
Bajji An IntroBajji An Intro
Bajji An Intro
 
OpenOffice-SpreadSheet
OpenOffice-SpreadSheetOpenOffice-SpreadSheet
OpenOffice-SpreadSheet
 
Radio An Intro
Radio An IntroRadio An Intro
Radio An Intro
 
Cloud Compt
Cloud ComptCloud Compt
Cloud Compt
 
PHP an intro -1
PHP an intro -1PHP an intro -1
PHP an intro -1
 
Basic Commands 1 By Thanigai
Basic Commands  1 By ThanigaiBasic Commands  1 By Thanigai
Basic Commands 1 By Thanigai
 

Similar to Sub Version Intro

Subversion
SubversionSubversion
Subversion
rchakra
 
Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2
narkoza
 

Similar to Sub Version Intro (20)

Subversion last minute survival crash course
Subversion  last minute survival crash courseSubversion  last minute survival crash course
Subversion last minute survival crash course
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Tsvn17
Tsvn17Tsvn17
Tsvn17
 
Difference between team foundation server and subversion
Difference between team foundation server and subversionDifference between team foundation server and subversion
Difference between team foundation server and subversion
 
SVN Information
SVN Information  SVN Information
SVN Information
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell
 
Welcome to the Symfony2 World - FOSDEM 2013
 Welcome to the Symfony2 World - FOSDEM 2013 Welcome to the Symfony2 World - FOSDEM 2013
Welcome to the Symfony2 World - FOSDEM 2013
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Debian packaging
Debian packagingDebian packaging
Debian packaging
 
Subversion User Guide
Subversion User GuideSubversion User Guide
Subversion User Guide
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Svn workflow
Svn workflowSvn workflow
Svn workflow
 
Subversion
SubversionSubversion
Subversion
 
Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2
 
Subversion
SubversionSubversion
Subversion
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
bash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdfbash_1_2021-command line introduction.pdf
bash_1_2021-command line introduction.pdf
 

More from Kanchilug (16)

Perl intro
Perl introPerl intro
Perl intro
 
Ltsp talk
Ltsp talkLtsp talk
Ltsp talk
 
Kanchilug Boot camp
Kanchilug Boot campKanchilug Boot camp
Kanchilug Boot camp
 
Perl Basics
Perl BasicsPerl Basics
Perl Basics
 
Gnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 finalGnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 final
 
Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0
 
ubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilugubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilug
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
 
SFD '09 Article in Tamil
SFD '09 Article in TamilSFD '09 Article in Tamil
SFD '09 Article in Tamil
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By Vishnu
 
How to Install Ubuntu as Dual
How to  Install Ubuntu as DualHow to  Install Ubuntu as Dual
How to Install Ubuntu as Dual
 
Kanchi Lug Pam-let
Kanchi Lug Pam-letKanchi Lug Pam-let
Kanchi Lug Pam-let
 
An Intro To Television
An Intro To Television An Intro To Television
An Intro To Television
 
How To Use Open Office WordProcessor
How To Use Open Office WordProcessorHow To Use Open Office WordProcessor
How To Use Open Office WordProcessor
 
How To Use Open Office. Impress
How To Use Open Office. ImpressHow To Use Open Office. Impress
How To Use Open Office. Impress
 

Recently uploaded

MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
Krashi Coaching
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 

Recently uploaded (20)

ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
MSc Ag Genetics & Plant Breeding: Insights from Previous Year JNKVV Entrance ...
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 

Sub Version Intro

  • 1. A day with Subversion (SVN) Sebastian Heimann Institut f¨r Geophysik, Arbeitsgruppe Seismologie u February 15, 2007
  • 2. Outline 1. Concepts (by example) 2. Vocabulary 3. Benefits 4. Further reading
  • 3. The initial work Let’s assume we have just made a quick and dirty hack, which we now want to put under version contol for further development: > ls /my/hack
  • 4. Create an empty repository > svnadmin create --fs-type fsfs /my/repos Repository
  • 5. The initial import > svn import /my/hack file:///my/repos/hack/trunk -m ’Initial import’ Repository 1
  • 6. Checkout a working copy of hack > svn checkout file:///my/repos/hack/trunk /work/hack Repository Working copy 1
  • 7. Add a new feature to hack > cd /work/hack ; vi hack Repository Working copy 1
  • 8. Commit your changes to the repository > svn commit Repository Working copy 2 1
  • 9. More than one person can now work on hack Repository Fu’s working copy 2 Fara’s working copy 1
  • 10. Both implement their improvements Repository Fu’s working copy 2 Fara’s working copy 1
  • 11. Fu commits his changes to the repository Repository > svn commit 3 Fara’s working copy Fu’s working copy 2 1
  • 12. Fara commits her changes to the repository Repository 4 > svn commit Fu’s working copy 3 Fara’s working copy 2 1
  • 13. To get each others changes Repository 4 > svn update > svn update 3 Fu’s working copy Fara’s working copy 2 1
  • 14. Fu and Fara can go back to any previous revision Repository 4 > svn update -r 1 > svn update -r 3 3 Fu’s working copy Fara’s working copy 2 1
  • 15. Internally the repository will only store differences... Repository 4 3 2 1
  • 16. ...but it pretends to make a new copy on every commit. Repository 4 3 2 1
  • 17. Sometimes it may be useful to branch the project... > svn cp -r 2 file:///my/repos/hack/trunk file:///my/repos/hack/branches/mad
  • 18. ...this creates a copy directly in the repository. 4 3 .../trunk .../branches/mad 2 5 1
  • 19. Check out a working copy of the branch > svn checkout file:///my/repos/hack/branches/mad /work/mad-hack
  • 20. You can now safely experiment with mad-hack, while maintaining a stable version of hack in the trunk. 4 > cd /work/mad-hack > # edit it 3 6 2 5 1 > svn commit
  • 21. Tagging: You can also use the branching mechanism to mark a specific revisions as somehow special. > svn cp -r 2 file:///my/repos/hack/trunk file:///my/repos/hack/tags/stable-v1
  • 22. Tagged stable version 1 of hack 4 3 .../trunk .../tags/stable-v1 2 5 1
  • 23. Vocabulary repository revision working copy to check out to commit to update
  • 24. Vocabulary to branch to merge to tag
  • 25. Conventions hack/trunk hack/branches/mad hack/tags/stable-v1
  • 26. Benefits Unlimited undo! Collaborate with others! Enforces structured development Makes you document what you are doing Automatic changelog! Helps you organize your mess in $HOME
  • 27. Further reading Tutorial http://artis.imag.fr/~Xavier.Decoret/resources/svn/ Documentation (A good intro is in Chapter 2) http://svnbook.red-bean.com/nightly/en/ Online help > svn help > svn [command] help