NALINI S. NAUTIYAL SYSTEM SOFTWARE DIVISION Subversion
Change Management (Version Control) Know and control what goes into a release Develop versions in parallel Work with any previous code-base Apply change where it is needed
Collaboration Function as a team without losing work Merge automatically where possible Resolve conflicts interactively Autonomous off-line or distance working
Responsibility Audit log of what was changed by whom Legal & professional conduct Standards & certification compliance Individual responsibility for contributions
Change Management ( Why) Automated build & deployment Continuous integration testing It’s the foundation of Software Configuration Management
Software versioning Models Lock modify unlock ( Not practical and has bottlenecks) Copy modify merge (Subversion)
Subversion Open source, cross platform Stable, widely used Copy-modify-merge model Integration via additional tools Transactional and atomic commit mechanism Off-line support Efficient use of network & disk
Terminology Repository : Central store located on a server. Updated through commits. Client : A person with a computer or terminal that wants to work on the project. Working Copy : A copy of the repository’s contents, local to the client Change Set : Any revision No. N can be considered a change set
How Subversion Works
Repository Activities Import : Import a new file or directory into the repository Commit : Send the changes back to the repository Checkout : Get the latest revision from the repository Update : Update working copy with the changes made by the other developers
Trunks Primary path used for development Active and potentially unstable Should still compile ideally...and pass automated tests
Branch Copy of trunk, a branch or tag for isolation When preparing for a release...and trunk needs to carry on When change is too disruptive...and will hinder other developers Merge changes back to trunk later
Tag Copy of trunk or a branch for information Each tag represents a specific release Easier than remembering revision & path No further commits...so control /tags/ with security
Working Copy Partial or full checkout of the repository Local copy for a single developer Native file formats - edit as usual Subversion client data in.svn directories
Access Protocols File directive ( On the server ) Through apache (http and https access) Through svn server (standalone SVN server Svn + ssh (ssh tunnelling)
How to Access repositories ? Command-line, cross platform Linux Command Line (svn, svnadmin etc) Linux GUI (RapidSVN,KDEsvn etc) Desktop Intergration(Tortoise SVN) IDE intergration Subclipse for eclipse AnkhSVN for visual studio
Best Practices One versioned app per trunk Trunk/tags/branches Add everything required for the project to build Tag all successful builds with version number Don’t commit to a tag Branch from a Tagged revision. Merge branches into the trunk. Always author a commit log entry.