versioncontrol:logreview

This is an old revision of the document!


At certain times it is necessary to enforce certain conventions on committers.

One of those conventions is that log messages should follow a particular format, or contain a particular string.

For example, during a code freeze, commits to the branch that contains the release must contain the string “Approved by: re”, otherwise the commit will be rejected.

There should be a flexible mechanism to enforce arbitrary standards on log messages, enabled on a per-path basis in the repository.

CVS can automatically run scripts in the repository in response to various end-user actions. One of those scripts receives the log message prior to the commit, and can approve or deny the commit accordingly.

Subversion operates in a similar fashion to CVS. In particular, an executable called pre-commit-hook, placed in the hooks/ subdirectory at the top level of the repository storage area (note: not committed to the repository, but in a subdirectory that contains the repository's files) will automatically be executed prior to every commit.

This program may then examine the in-progress commit, review the commit log, and choose to allow or deny the commit.

  • versioncontrol/logreview.1158598454.txt.gz
  • Last modified: 2006/09/18 16:54
  • by NikClayton