CSC/Sun CCS Subversion tutorial -...
Transcript of CSC/Sun CCS Subversion tutorial -...
![Page 1: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/1.jpg)
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
![Page 2: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/2.jpg)
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)
![Page 3: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/3.jpg)
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
![Page 4: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/4.jpg)
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
![Page 5: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/5.jpg)
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
![Page 6: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/6.jpg)
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
![Page 7: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/7.jpg)
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)
![Page 8: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/8.jpg)
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
![Page 9: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/9.jpg)
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}
![Page 10: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/10.jpg)
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
![Page 11: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/11.jpg)
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
![Page 12: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/12.jpg)
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)
![Page 13: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/13.jpg)
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/
![Page 14: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/14.jpg)
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
![Page 15: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/15.jpg)
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
![Page 16: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/16.jpg)
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. . .
![Page 17: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/17.jpg)
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
![Page 18: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/18.jpg)
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. . .
![Page 19: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/19.jpg)
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
![Page 20: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/20.jpg)
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. . .
![Page 21: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/21.jpg)
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
![Page 22: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/22.jpg)
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
![Page 23: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/23.jpg)
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
![Page 24: CSC/Sun CCS Subversion tutorial - quadium.netquadium.net/~vsync/barcamp/orlando/2009/ccs_svn_tutorial_handou… · CSC/Sun CCS Subversion tutorial Tim Howe Overview of Subversion](https://reader034.fdocuments.net/reader034/viewer/2022050608/5faf68d90e3e4c5364731b57/html5/thumbnails/24.jpg)
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