Accepting selected projects for Q2 2024 Check availability →
SERVER 02SYSTEM ONLINELAST SYNC: 03:17:44RSS 2.0 — ONLINE
HALF ASSEDTECHNICAL NOTES_
EST. 1999ISSUE 04.2BEST VIEWED AT 1024 × 768
TECHNICAL NOTES / PRACTICAL GUIDES / VERSION CONTROL / RECORD d7408f
[VERSION CONTROL]GUIDE

Using Subversion for a small web team

POSTED: 16.09.2004AUTHOR: ADMIN3 MIN READCOMMENTS: 0

Move the site’s source into a central repository and give each developer a separate working copy. The initial aim is straightforward: identify what changed, recover earlier revisions and reproduce the files that were approved for release.

Separate source from running data

Put templates, scripts, stylesheets and database change instructions under version control. Keep uploads, logs, generated caches and live credentials out of the repository. Supply an example configuration containing harmless values and document how the real one is installed. Make a backup before the initial import and inspect the file list for forgotten database exports.

Establish a simple repository layout

Use trunk for normal development, branches for work that needs a separate line and tags for named releases. These are directory conventions, not different kinds of Subversion object. A tag is a repository copy that the team agrees to leave unchanged. Give every user an individual account and keep a backup of the repository itself.

Review and commit one change at a time

Use svn status to see local modifications and svn diff to review text changes. Add new source files explicitly. Update the working copy, resolve conflicts and test before committing a coherent change with a useful message. An update can merge changes into your files; a commit does not automatically bring every other file in the working copy up to date.

Release from a recorded revision

Choose the tested repository revision and create a release tag from it. Export that tag into a clean directory so the web server does not publish working-copy metadata. Apply the site-specific configuration separately and record any database steps. Check the exported files on a staging server, then retain the previous release and its configuration for rollback.

Keep branch work explicit

Subversion 1.0 does not maintain automatic merge tracking. Record the revision ranges merged into a branch so the next merge does not repeat them. Keep branches short-lived where possible. Reverting a local file discards uncommitted edits; undoing a committed change requires a new change to the repository. Review the result before recording that reversal.

RELEASE RECORD

Write down the tag, repository revision, configuration version and database changes for every deployment. A tag alone cannot restore data altered by an application upgrade.

References

Version Control with Subversion: basic usage and branching