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.

Hg supports multiple entry points for hooks during operations. The complete list is [http://www.selenic.com/hg/?f=-1;style=raw;file=doc/hgrc.5.txt there].

For our purposes, I see local hooks for local modifications (developers' branches and private areas) and use of the [“Patch Queue Manager”] as the main workflow manager.

Git also supports hooks stored in ${REPO_DIR}/hooks/

Using the same process as for SVN and CVS.

  • versioncontrol/logreview.1158849803.txt.gz
  • Last modified: 2006/09/21 14:43
  • by OllivierRobert