CSC/Sun CCS Subversion tutorial -...

Preview:

Citation preview

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

CSC/Sun CCS Subversion tutorial

Tim Howe

May 28, 2008

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

What is Subversion?

I version control system

I “new and improved” CVS (not vastly different)

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Generic SCM benefits to development

SCM Software Configuration Management

I track changes between versions

I audit ownership of code (can relate to Sarbanes-Oxleyrequirements)

I when performed correctly: track test results, supportedsystems, etc.

I repeatability, shared development

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Subversion-specific benefits to development

I cheap branching

I based on HTTP, WebDAV

I local mirror

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Collaboration benefits

I everyone has working copy

I cross-platform

I easy Web access to files

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Quirks of Subversion

I “branches” and “tags” are arbitrary

I locking discouraged

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Subversion workflow overview

1. import initial version (can be skeleton) into repository

2. check out working copy

3. make all changes in working copy

4. update working copy with all changes from others,ensure everything still works

5. commit working copy to repository

6. rinse and repeat from step #2 (can be doneconcurrently and asynchronously by many developers)

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Subversion commands

svn import import a file/directory tree into repository

svn checkout check out a tree from the repository

svn update get changes from repository

svn status show any local changes since last commit

svn diff get diff of local changes since last commit

svn add schedule a new file to be entered into therepository at commit

svn mkdir create a directory in the working copy

svn mv rename a file or move it in the working copy

svn rm delete a file from the working copy

svn commit commit all changes from working copy

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Server

I Hosted on rattrap.sfbay

I Canonical hostname is csc-ccs-svn.sfbay

I Access control in /mnt/web/svn/{htpasswd,access}

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Custom Tools

TaskMaster Java app to manage active projectshttp://csc-ccs-svn.sfbay/

I manages a local mirror of all activeprojects

I project creationI codebase creationI branch managementI create dependency of project on codebase

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository access

http://csc-ccs-svn.sfbay.sun.com/svn/

I HTTP authentication requiredI access via:

I Web browserI ViewSVN Web interfaceI command-line svn clientI TortoiseSVN for WindowsI TaskMaster

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository layout

util Utilities for interacting with this repository

codebase Storage of all branches of each codebase (e.g.,firefox, thunderbird, nct)

work Individual projects (SR1234567)

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository layout example

codebase/nct/trunk/branches/tags/1.1/1.2/1.3/

work/SR162210/codebase/nct/thunderbird/wificonfig/

project/

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Integration with other tools

I Tracker

I atombomb repositories

I deantool

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Actions → Update work area

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository → New codebase. . .

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Enter name of codebase

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository → New work. . .

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Enter name of work

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Repository → Import codebase. . .

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Commit changes

1. svn commit

2. enter log message

I new files must be svn added first

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Releasing a new codebase version

1. commit all changes to the project branch

2. merge changes into the codebase trunk

3. tag codebase from trunk

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Releasing a milestone of a project

1. commit all changes to the project

2. create project tag from project trunk

3. generate Tracker artifact

CSC/Sun CCSSubversion tutorial

Tim Howe

Overview ofSubversion

Development benefits

Collaboration benefits

Quirks

Working withSubversion

Our Setup

Server

Tools

Repository

Integration

Workflow

Keeping up to date

Creating codebase

Creating project

Committing changes

Creating a release

Closing down

Closing down

1. delete project root directory

I deleted projects, like any file, can be restored

I codebase tags are not deleted