Navigation: ()

Commit Guidelines

  1. Commit related changed together (example, all changes related to a bug or feature). Please avoid committing unrelated changes in one submit. It makes it harder to read log history and roll back changes if needed.
  2. Please ensure the check-in log message states exactly what the commit is about so other developers can read and understand
  3. Please specify the ticket number (bug/task/clarification/ etc.) in the commit message if the check-in is related to it. See below for more

Since commit messages can be viewed in trac, there are a couple things to note:

  1. You can use wiki-syntax in commit messages.
  2. You can comment on or close tickets in commit messages.

Wiki Syntax

Trac will recognize and format any wiki syntax in commit messages when you view them in trac. This is very useful (see for example [83]). But, since the messages can also be view via normal subversion commands, this feature should not be overused. Luckily the wiki markup often does not reduce the readability of the unformatted message. But here are some suggestions:

  • Do use: lists (*, 1.), blockquotes, preformatted text ({{{ }}}), trac-links (tickets (#N), changesets ([N]))
  • Don't use: tables, processors, macros

Closing/Commenting-on Tickets

You can automatically comment on or close one or more tickets by including special "commands" in the commit message. These can be anywhere, as the whole commit message is searched. The message is searched for strings of the form:

  • command #1
  • command #1, #2
  • command #1 & #2
  • command #1 and #2

where 'command' is one of "close", "closes", "closed", "fix", "fixes", "fixed", "addresses", "re", "refs", "references", or "see", and N in #N is the ticket number. All of these cause the commit message to be added as a note to the tickets; additionally the close* and fix* commands cause the corresponding tickets to be closed.

Note that you can both fix and reference as many tickets as desired in the commit message.