You are on page 1of 33

Consulting Technology

SCM using Subversion(SVN)


User level Awareness
www.oakton.com.au

Consulting Technology

Agenda & Schedule


Agenda
SVN Overview SVN Getting Started SVN - References QA Session

Time/Duration
hh:mmAM / xxmins hh:mmAM / xxmins hh:mmAM / xxmins hh:mmAM / xxmins

www.oakton.com.au

Consulting Technology

Life without Version Control


User A gets a copy of file X from the data store User B gets a copy of file X from the data store User A changes X writes the new X back into the data store User B changes his older version of X and writes this into the data store, overwriting A s Changes

www.oakton.com.au

Consulting Technology

What is Version Control?


A method for centrally storing files. Keeping a record of changes. Who did what, when in the system Historical Record. Covering yourself when things inevitably go wrong. Synchronization between Developers.

www.oakton.com.au

Consulting Technology

Why Version Control?


To allow multiple Developers(in remote locations) to work on the same codebase. To answer who did what. To merge changes across same files after collision. Backup Methodology.

www.oakton.com.au

Consulting Technology

Version Control - Example

www.oakton.com.au

Consulting Technology

Version Control tools


CVS (Concurrent Version System) SVN (Subversion) VSS (Visual Source Safe) TFS (Team Foundation Server) ClearCase StarTeam
7 www.oakton.com.au

Consulting Technology

What is Subversion (SVN)?


Subversion (or SVN) is a Version Control System. Allows users to manage files, directories, and the changes made to them. Can manage changes to all file types (not only source code).

www.oakton.com.au

Consulting Technology

Why SVN?
Open Source (freeware) tool Atomic Commits Checkin All or Nothing True Client-Server Model Directory Versioning with Rename & Move Faster Network-access Maintains File & Directory metadata
9 www.oakton.com.au

Consulting Technology

SVN Architecture

10

www.oakton.com.au

Consulting Technology

SVN Getting Started

www.oakton.com.au

Consulting Technology

Repository VS Working-copy
Project codebase, along with the metadata, stored in server is referred to as Repository . Developers Checkout desired version of project codebase into their local workspace. This local copy of the codebase is referred as Working Copy .

12

www.oakton.com.au

Consulting Technology

SVN Installation pre-requisites


Install SVN Client tool TortoiseSVN on your desktop. SVN Installation Shares:
\\10.4.30.202\share\TortoiseSVN http://tortoisesvn.sourceforge.net/

Note: TortoiseSVN requires admin rights for installation

13

www.oakton.com.au

Consulting Technology

SVN repository details


Server Name: speosdevsvmvm2 (IP address 10.4.30.202) Repository Name: oknsvnpoc URL for Developer access: http://10.4.30.202:9881/oknsvnpoc

14

www.oakton.com.au

Consulting Technology

How to connect to SVN server?


Available via a simple right-click from Windows Explorer s context menu Type the SVN repository URL and click OK

15

www.oakton.com.au

Consulting Technology

SVN repository organization

There re 03 sub-directories per project, namely Trunk , Tags and Branches .  Trunk: Main branch with cumulative codebase  Tags: Read-only Release/Milestone snapshots  Branches: Development stream for various releases

16

www.oakton.com.au

Consulting Technology

DEV-cycle using SVN


1. Checkout Working-copy 2. Update your Working-copy 3. Make necessary changes 4. Examine your changes 5. Commit your changes

17

www.oakton.com.au

Consulting Technology

1. Checkout Working-copy

18

www.oakton.com.au

Consulting Technology

2. Update Working-copy

19

www.oakton.com.au

Consulting Technology

3. Make necessary changes


Add new files and directories

20

www.oakton.com.au

Consulting Technology

Make necessary changes (contd.)


Rename files

21

www.oakton.com.au

Consulting Technology

Make necessary changes (contd.)


Delete Files

22

www.oakton.com.au

Consulting Technology

4. Examine your changes


Show your modifications

23

www.oakton.com.au

Consulting Technology

5. Commit your changes

24

www.oakton.com.au

Consulting Technology

Merging
Merging takes places on the Working-copy. Merging enables applying codebase from one branch to another. Invoke Merge Wizard

25

www.oakton.com.au

Consulting Technology

Merge types

26

www.oakton.com.au

Consulting Technology

Merge types (contd.)


Merge a range of revisions

In other words, you re asking SVN Calculate the changes necessary to get [FROM] Revision 1 of Branch A [TO] Revision 7 of Branch A, and apply those changes to my working-copy .
27 www.oakton.com.au

Consulting Technology

Merge types (contd.)


Re-Integrate a branch

28

www.oakton.com.au

Consulting Technology

Merge types (contd.)


Merge two different trees

29

www.oakton.com.au

Consulting Technology

Merge - Conflict Resolution


Merge conflict is not resolved automatically for binary/text files and you ve to carry out copy-merge. Select Prefer local to select your working-copy as mergetarget else Prefer repository to select repositoryrepository-copy (or source-copy) as a merge-target version.

30

www.oakton.com.au

Consulting Technology

References
SVN Home
http://svn.subversion.com/

SVN handbook
http://subversion.tigris.org/files/documents/15/576/svn-handbook.html

SVN quick reference guide


http://subversion.tigris.org/files/documents/15/177/foo.ps

SVN document folder


http://subversion.tigris.org/servlets/ProjectDocumentList

SVN project status


http://subversion.tigris.org/project_status.html

SVN source code and binary downloads


http://subversion.tigris.org/servlets/ProjectDocumentList

31

www.oakton.com.au

Consulting Technology

QA Session
32 www.oakton.com.au

Consulting Technology

What problem do you want defined? What problem do you want defined?
Melbourne Sydney Canberra Brisbane Hyderabad 23 years 9 key industry sectors 800 plus clients 10,000 plus projects Strategic partners Microsoft Oracle SAP IBM
Thank you and Q&A

www.oakton.com.au

You might also like