2016/02/07 - Apache Onami has been retired.

For more information, please explore the Attic.

SVN Convention

This document describes how developers should use SVN, our SCM.

Subversion Configuration

Before committing files in subversion repository, you need to read the Committer Subversion Access document and you must set your svn client with this config file by copying it under ~/.subversion.

Commit Message Template

Commits should be focused on one issue at a time, because that makes it easier for others to review the commit.

A commit message should use this template:

[ISSUE-1] <<Summary field from JIRA>> - patch contributed by <<Name of non-committer>>

o Comments

Where:

  • ISSUE-1 can be omitted if there was no relevant JIRA issue, though you are strongly encouraged to create one for significant changes.
  • patch contributed by only needs to be specified when a patch is being applied for a non-committer.
  • Comments some optional words about the solution.

eg:

[MNG-1456] Added the foo to the bar - patch contributed by Baz Bazman

o Applied without change

Apply User Patch

By default, the committer should apply the patch without any major modifications. In a second step, the committer could apply any changes as usual.

Edit Commit Message

If you want to edit a commit message, you could call:

svn pe svn:log --revprop -r XXX

where XXX is the wanted version

Other useful Subversion commands while developing

If you've done a chunk of work and you would like ditch your changes and start from scratch use this command to revert to the original checkout:

$ svn revert -R .

The -R argument means that the command will recurse down all directories and revert all changes.

Before committing code to the Subversion repository we always set the svn:ignore property on the directory to prevent some files and directories to be checked in. We always exclude the IDE project files and the target/ directory. Instead of keeping all of the excludes in mind all the time it's useful to put them all in a file and reference the file with the -F option:

$ svn propset svn:ignore -F ~/bin/svnignore .

A typical svnignore file:

target
*~
*.log
.classpath
.project
.settings
.wtpmodules
.idea
*.ipr
*.iws
*.iml
.git
.gitignores