migrating your source code to subversion

30
Migrating your source code to Subversion A. Ibrahim & J. Yao Monday, September 22, 2013 ECE750 - Fall 2013

Upload: ahmed-ibrahim

Post on 17-May-2015

344 views

Category:

Education


3 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Migrating your source code to Subversion

Migrating your source code to Subversion

A. Ibrahim & J. Yao

Monday, September 22, 2013ECE750 - Fall 2013

Page 2: Migrating your source code to Subversion

Working in software project

Page 3: Migrating your source code to Subversion

Having collaboration problem

Page 4: Migrating your source code to Subversion

Subversion

• Subversion(SVN) is a centralized SCM (Software

Configuration Management) implementation.

• It allows to track changes and concurrent development

on the same files.

Page 5: Migrating your source code to Subversion

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

Page 6: Migrating your source code to Subversion

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.

Page 7: Migrating your source code to Subversion

Subversion clients

Windows:TortoiseSVN, VisualSVN

Linux: SVNclient

Eclipse:Subclipse, Subversive

Visual Studio:AnkhSVN, Team Foundation Server

Page 8: Migrating your source code to Subversion

How are weusing TortoiseSVN

(Subversion)?

Page 9: Migrating your source code to 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

Page 10: Migrating your source code to Subversion

Repository location

[local]

[remote]

Page 11: Migrating your source code to Subversion

Centralized VC flow /1

Page 12: Migrating your source code to Subversion

Centralized VC flow /2

Page 13: Migrating your source code to Subversion

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

Page 14: Migrating your source code to Subversion

Demo

Page 15: Migrating your source code to Subversion

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

Page 16: Migrating your source code to Subversion

Branching

Page 17: Migrating your source code to Subversion

What is branching

Page 18: Migrating your source code to Subversion

Merging

Page 19: Migrating your source code to Subversion

What is merging

Page 20: Migrating your source code to Subversion

You need a demo

Page 21: Migrating your source code to Subversion

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

Page 22: Migrating your source code to Subversion

Developers Collaboration

Page 23: Migrating your source code to Subversion

Collaboration /1

Page 24: Migrating your source code to Subversion

Collaboration /2

Page 25: Migrating your source code to Subversion

You need a demo

Page 26: Migrating your source code to Subversion

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

Page 27: Migrating your source code to Subversion

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

Page 28: Migrating your source code to Subversion

Subversion hosting

http://www.svnhostingcomparison.com/

Page 29: Migrating your source code to Subversion

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.

Page 30: Migrating your source code to Subversion

Questions?