migrating your source code to subversion

Post on 17-May-2015

345 Views

Category:

Education

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

This presentation is a basic introduction to Subversion and what it does.

TRANSCRIPT

Migrating your source code to Subversion

A. Ibrahim & J. Yao

Monday, September 22, 2013ECE750 - Fall 2013

Working in software project

Having collaboration problem

Subversion

• Subversion(SVN) is a centralized SCM (Software

Configuration Management) implementation.

• It allows to track changes and concurrent development

on the same files.

Immediate Benefits

● Backup - change-by-change log of your work

● synchronization - easy to keep team members

always up-to-date

● accountability - know who make each change

and why

● conflict detection - keep the repository clean

every time

History

● Subversion project founded in 2000 by CollabNet as an

effort to write an open-source version-control system.

● Subversion found to overcome the disadvantage of first

centralized version control system called CVS

(concurrent versioning system - 1986 - file focused).

● Subversion improves better functionality with regard to

the tracking changes in directory structures, binary, and

text files.

Subversion clients

Windows:TortoiseSVN, VisualSVN

Linux: SVNclient

Eclipse:Subclipse, Subversive

Visual Studio:AnkhSVN, Team Foundation Server

How are weusing TortoiseSVN

(Subversion)?

Terminology

● Repository - a “database” where changes are tracked

● Working set - local files potential changes not yet in

repository

● Trunk - original line of development (main branch)

● Tag / label - name a specific state of the repository

● Branch / fork - make a clone of a repository

Repository location

[local]

[remote]

Centralized VC flow /1

Centralized VC flow /2

Essential commands

● commit / check-in add or update repository from your working set

● check-out / update - copy from repository to your working set

● merge - integrate your branch (clone) back into the

original repository

● revert / rollback - overwrite files in your working set with specific version

Demo

Demo agenda

1. Creating a repository.

2. Create a temp

directory.

3. check out the temp

directory.

4. add a dummy file

5. edit the file with a

function.

6. Commit a Working

Copy

7. Making Changes

8. update files from the

repository

Branching

What is branching

Merging

What is merging

You need a demo

Demo agenda

1. Create a new branch2. Edit a file3. Merge it back into the trunk4. Show change happened in the trunk using

Diff5. Switch the trunk into its previous state before

merging.6. Display the log of the repository

Developers Collaboration

Collaboration /1

Collaboration /2

You need a demo

Demo agenda1. Login by Harry2. Harry checks-out the repository3. Harry edits a file then commit4. Login by Sally5. Sally checks-out the repository6. Sally makes changes to the file and tries to commit7. Sally needs to update first before she commits8. Conflict happens between the two version9. Solve the conflict

10. Locking and release locking

Best Practice• Use a separate subversion repository for each project• Commit often• Commit in small, discrete chunks• Use consistent log messages• Send commit emails to team• Create tags before big changes• Test your code before committing

Subversion hosting

http://www.svnhostingcomparison.com/

Recommended Reading• Version Control with Subversion, 2nd

Edition by C. Michael Pilato; Ben Collins-

Sussman; Brian W. Fitzpatrick (http:

//svnbook.red-bean.com).

• Managing Software Development with

Trac and Subversion by David J Murphy.

Questions?

top related