------ Committers - SVN Conventions ------ Apache Onami Documentation Team ------ 2012-11-16 ------ ~~ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ 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 {{{http://www.apache.org/dev/version-control.html#https-svn}Committer Subversion Access}} document and you must set your svn client with this {{{https://svn.apache.org/repos/asf/onami/committers/subversion/config}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] <> - patch contributed by <> o Comments ------- Where: * <> can be omitted if there was no relevant JIRA issue, though you are strongly encouraged to create one for significant changes. * <> only needs to be specified when a patch is being applied for a non-committer. * <> 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 <> 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 <> 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 <<>> property on the directory to prevent some files and directories to be checked in. We always exclude the IDE project files and the <<>> 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 ---