the subversion version control system
play

The Subversion Version Control System An introduction for new users - PowerPoint PPT Presentation

The Subversion Version Control System An introduction for new users Clifford Wolf ROCK Linux - http://www.rocklinux.org/ Csync2 - http://oss.linbit.com/csync2/ SPL - http://www.clifford.at/ Clifford Wolf, February 12, 2007 SubMaster p.


  1. The Subversion Version Control System An introduction for new users Clifford Wolf ROCK Linux - http://www.rocklinux.org/ Csync2 - http://oss.linbit.com/csync2/ SPL - http://www.clifford.at/ Clifford Wolf, February 12, 2007 SubMaster – p. 1/16

  2. Introduction ● What is Subversion (1) ● What is Subversion (2) Using Subversion References Introduction Clifford Wolf, February 12, 2007 SubMaster – p. 2/16

  3. What is Subversion (1) ■ Subversion is a a version control system Introduction ● What is Subversion (1) ● What is Subversion (2) Using Subversion ■ The entire history of a project including all branches is stored References in a Database called Subversion Repository ■ A Subversion Repository can also be seen as a filesystem with special capabilities ■ Pleople can check out files or directories from a Subversion Repository, change them and commit the changes back to the repository ■ Some changes can be done directly on the repository without creating a working copy Clifford Wolf, February 12, 2007 SubMaster – p. 3/16

  4. What is Subversion (2) ■ Subversion Repositories can be accessed thru the Introduction ● What is Subversion (1) filesystem, using HTTP/WebDAV or by a special SVN:// ● What is Subversion (2) protocol Using Subversion References ■ The tool for creating and maintaining the database behind a Subversion Repository is called ’svnadmin’ ■ The tool for working with the Subversion Repository and Working copies is called ’svn’ ■ The calling convention for ’svn’ is simmilar to the calling convention for ’cvs’ Clifford Wolf, February 12, 2007 SubMaster – p. 4/16

  5. Introduction Using Subversion ● Creating a repository ● Creating a working copy ● Making changes (1) ● Making changes (2) Using Subversion ● Committing changes ● Branches and tags References Clifford Wolf, February 12, 2007 SubMaster – p. 5/16

  6. Creating a repository ■ Creating the repository itself is easy: Introduction svnadmin create /home/svn/repos Using Subversion ● Creating a repository ● Creating a working copy ● Making changes (1) ● Making changes (2) ■ If the repository should be accessable thru HTTP/WebDAV ● Committing changes ● Branches and tags (http://), you need to configure your apache to load the References Subversion module and set it up. ■ If the repository should be accessable thru the Subversion protocol (svn://), you need to set up the Subversion server svnserve . Clifford Wolf, February 12, 2007 SubMaster – p. 6/16

  7. Creating a working copy ■ Using the tool svn is very simmilar to using cvs . Introduction Using Subversion ● Creating a repository ● Creating a working copy ■ A Working copy can be created with: ● Making changes (1) ● Making changes (2) svn co file:///home/svn/repos localdir ● Committing changes ● Branches and tags cd localdir References ■ Note that no equivalent to $CVSROOT exists. ■ Within the working copy, every directory has a .svn subdirectory containing the Subversion metadata. Clifford Wolf, February 12, 2007 SubMaster – p. 7/16

  8. Making changes (1) ■ Modifying files: Introduction ◆ Just edit them as usual with your favorite editor Using Subversion ● Creating a repository ◆ Note that Subversion is using binary deltas and has good ● Creating a working copy ● Making changes (1) support for non-ascii files ● Making changes (2) ● Committing changes ● Branches and tags References ■ Adding files: ◆ First create the new file as usual ◆ Then execute svn add filename ■ Removing files: ◆ Just execute svn rm filename ◆ The file will automatically removed by svn Clifford Wolf, February 12, 2007 SubMaster – p. 8/16

  9. Making changes (2) ■ Moving/renaming files: Introduction ◆ Using svn mv instead of mv Using Subversion ● Creating a repository ● Creating a working copy ● Making changes (1) ● Making changes (2) ■ Copying files: ● Committing changes ● Branches and tags ◆ Using svn cp instead of cp References ■ Making changes without a working copy: ◆ Most operations can also be performed directly on the repository: ◆ svn copy -m "Commit message" \ file:///home/svn/repos/demo2.txt \ file:///home/svn/repos/demo3.txt Clifford Wolf, February 12, 2007 SubMaster – p. 9/16

  10. Committing changes ■ Commiting changes made in the working copy: Introduction svn commit Using Subversion ● Creating a repository ● Creating a working copy ● Making changes (1) ● Making changes (2) ■ Listing status (modified, etc) of files in working copy: ● Committing changes ● Branches and tags svn status References ■ Bringing changes from the repository into the working copy: svn up Clifford Wolf, February 12, 2007 SubMaster – p. 10/16

  11. Branches and tags ■ Subversion has no explicit support for branching. Introduction ■ But it has support for copying directories in O(1). Using Subversion ● Creating a repository ● Creating a working copy ● Making changes (1) ● Making changes (2) ■ Creating a branch is just the same as creating a copy: ● Committing changes ● Branches and tags svn copy -m "Creating branch dummy" \ References file:///home/svn/repos/trunk \ file:///home/svn/repos/branches/dummy ■ Merging changes from somewhere else to working copy: svn merge -r70:86 \ file:///svn/repos/branch/testing . svn merge file:///svn/repos/branch/stable \ file:///svn/repos/branch/testing . ■ A “tagged version” is also just a copy. It just never gets modified. Clifford Wolf, February 12, 2007 SubMaster – p. 11/16

  12. Introduction Using Subversion References ● Getting Help (1) ● Getting Help (2) References ● URLs - Subversion and SubMaster ● URLs - Related Projects Clifford Wolf, February 12, 2007 SubMaster – p. 12/16

  13. Getting Help (1) ■ The command svn help lists all subcommands for svn : Introduction add, blame (praise, annotate, ann), cat, Using Subversion checkout (co), cleanup, commit (ci), copy References ● Getting Help (1) (cp), delete (del, remove, rm), diff (di), ● Getting Help (2) ● URLs - Subversion and SubMaster export, help (?, h), import, info, list (ls), ● URLs - Related Projects lock, log, merge, mkdir, move (mv, rename, ren), propdel (pdel, pd), propedit (pedit, pe), propget (pget, pg), proplist (plist, pl), propset (pset, ps), resolved, revert, status (stat, st), switch (sw), unlock, update (up) ■ The command svn help subcommand gives a detailed description Clifford Wolf, February 12, 2007 SubMaster – p. 13/16

  14. Getting Help (2) ■ The command svnadmin help does it for svnadmin : Introduction create, deltify, dump, help (?, h), hotcopy, Using Subversion list-dblogs, list-unused-dblogs, load, References ● Getting Help (1) lslocks, lstxns, recover, rmlocks, rmtxns, ● Getting Help (2) ● URLs - Subversion and SubMaster setlog, verify ● URLs - Related Projects ■ The command svnadmin help subcommand gives a detailed description ■ The Subversion Handbook is a great Subversion tutorial: http://svnbook.red-bean.com/ Clifford Wolf, February 12, 2007 SubMaster – p. 14/16

  15. URLs - Subversion and SubMaster ■ The Subversion Handbook: Introduction http://svnbook.red-bean.com/ Using Subversion References ● Getting Help (1) ● Getting Help (2) ■ The Subversion Homepage: ● URLs - Subversion and SubMaster ● URLs - Related Projects http://subversion.tigris.org/ ■ The SubMaster Homepage: http://www.rocklinux.org/submaster.html Clifford Wolf, February 12, 2007 SubMaster – p. 15/16

  16. URLs - Related Projects ■ SVK: A decentralized system based on Subversion Introduction http://svk.elixus.org/ Using Subversion References ● Getting Help (1) ● Getting Help (2) ■ Transvn: A patch-scripts clone based on Subversion ● URLs - Subversion and SubMaster ● URLs - Related Projects http://alexm.here.ru/transvn/ ■ SVM: Mirror Remote Subversion Repository to local http://search.cpan.org/ clkao/SVN-Mirror/ Clifford Wolf, February 12, 2007 SubMaster – p. 16/16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend