subversion -- getting started - folk.uio.nofolk.uio.no/jonkn/epf/svn_tutorial.pdf · subversion –...
TRANSCRIPT
Subversion – Getting started
Jon K. Nilsen
Department of Physics and Scientific Computing GroupUniversity of Oslo, N-0316 Oslo, Norway
13.02.09
SVN tutorial svn.uio.no/svnroot/fys-epf
Outline
1 Introducing version control
2 Introducing Subversion
3 SVN Tutorial
4 More information
SVN tutorial svn.uio.no/svnroot/fys-epf
Outline
1 Introducing version control
2 Introducing Subversion
3 SVN Tutorial
4 More information
SVN tutorial svn.uio.no/svnroot/fys-epf
Outline
1 Introducing version control
2 Introducing Subversion
3 SVN Tutorial
4 More information
SVN tutorial svn.uio.no/svnroot/fys-epf
Outline
1 Introducing version control
2 Introducing Subversion
3 SVN Tutorial
4 More information
SVN tutorial svn.uio.no/svnroot/fys-epf
CERN to SVN
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Introducing version control
From wikipediaRevision control (also known as version control (system)(VCS), source control or (source) code management (SCM)) isthe management of multiple revisions of the same unit ofinformation.
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Introducing version control
From wikipediaMost commonly used in software developmentFor managing source code, documents, revisions, releasesetc.Embedded in Microsoft Word, OpenOffice.org Writer,KOffice, Pages, Google Docs, . . .Very useful tool in any project with one or more personsinvolved
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Introducing version control
Versioning toolsLots of tools, some even useful:
Darcs – decentralised, written in the Haskell language, can keeptrack of inter-patch dependencies and automatically rearrangeand ”cherry-pick” them using a ”theory of patches”Git – designed by Linus Torvalds based on the needs of the Linuxkernel project. Decentralised, and aims to be fast, flexible, androbustRevision Control System (RCS) – A 1980s source code controlsystem that features separate backward deltas (patches)Concurrent Versions System (CVS) – Originally built on theRevision Control SystemSubversion (AKA SVN) – An open source version control toolinitially released in 2004, designed to replace CVSand at least 100 more. . .
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
But what is this Subversion anyway?
SVN in a nutshellA mostly-compatible successor to CVSCentralized – One server, many clientsCommits are atomic (no inconsistency)Every file change (rename, copy, move) is revisionedWhen editing a file, only the changes are storedOpen source, freeVery popular in open source community (Apache, KDE,GNOME, FreeBSD, GCC, Python, Ruby, SourceForge.net,NorduGrid, . . . )
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
But what is this Subversion anyway?
SVN in a nutshell
Three dimensional:Directories and files fromtraditional 2D directory treeThird dimension is revisionsEach revision hasits own root, used to accesscontents of that revisionFiles are stored as linksto the most recent changeMovethrough directories with cdMovethrough replicas with svnupdate --revision
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
So what’s in it for us?
svn.uio.nosvn.uio.no is a Subversion server hosted by USITMent to serve as a tool for collaboration and developmentfor groups at UiONewly created project svn.uio.no/svnroot/fys-epf(but earlier than CERN’s move to SVN)Intended to use for EPFers developing code, docs, PhDs,papers, . . .Files are only accesible for members of the fysepf groupWe have 5 GB of space (enough for source code and textdocuments, not for AODs)
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Did anyone mention tutorial?
TaskYou have a directory with some files in it (could be a thesis,paper, presentation, application, . . . ). Call this a project.You know you will probably work with this project oversome time.Possibly other EPFers will give some contributions to theproject.You will probably test out new ideas and want to discardsome of them.You don’t want to kill the project by accidently deleting it.So you want to move this project to SVN!
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Getting started
SVN Cheat Sheetsvn import: Start a new project (or move an old one into SVN)
svn checkout: Check out an existing project from SVN, creates aworking copy
working copy is your local version of the project
svn add: Adds a file or directory to the project
svn {move, delete, copy, mkdir}: Operations on files anddirectories within the project (after they are added)
svn commit: Uploads changes from working copy to SVN
svn update: Downloads changes from SVN
svn diff: Shows uncommited changes in your working copy (orbetween revisions in SVN)
svn blame: Displays who did what and at which revision
svn help: Shows help on all SVN commandsSVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Tutorial
Create project: http://folk.uio.no/jonkn/epf/svn_tutorial_mkrepo.ogv(and remove project: http://folk.uio.no/jonkn/epf/svn_tutorial_rmrepo.ogv)
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
Tortoise
SVN tutorial svn.uio.no/svnroot/fys-epf
Introducing version controlIntroducing Subversion
SVN TutorialMore information
More information
This presentation: svn+ssh://svn.uio.no/svnroot/fys-epf/tutorial/presentation(and here if you didn’t remember everything: https://lys.uio.no/twiki/bin/view/EPFWeb/WednesdaySeminars)
http://www.usit.uio.no/it/subversion/ (Norwegian)
http://svnbook.red-bean.com/
http://www.isg.inf.ethz.ch/twiki/pub/Main/Documents/SVN-Quick-Reference.pdf
http://en.wikipedia.org/wiki/Subversion_(software)
http://svn.collab.net/repos/svn/trunk/doc/user/
svn-best-practices.html
SVN tutorial svn.uio.no/svnroot/fys-epf