Sub Version Intro
Upcoming SlideShare
Loading in...5
×
 

Sub Version Intro

on

  • 2,001 views

 

Statistics

Views

Total Views
2,001
Slideshare-icon Views on SlideShare
1,723
Embed Views
278

Actions

Likes
1
Downloads
56
Comments
0

8 Embeds 278

http://exploringsvn.wordpress.com 94
http://kanchilug.wordpress.com 82
http://mahalakshmiperumal.wordpress.com 82
http://sraji.wordpress.com 14
http://www.slideshare.net 3
url_unknown 1
http://translate.googleusercontent.com 1
https://kanchilug.wordpress.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Sub Version Intro Sub Version Intro Presentation Transcript

    • 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