# HG changeset patch # User Bryan O'Sullivan # Date 1177524155 25200 # Node ID 54ca4e00e56992afb7e1bd4d9df3e81f67ecee32 # Parent 6519f3b983b49570e6525ae9b81dc0d2b10f3e3c Add an example hook to enforce branch naming. diff -r 6519f3b983b4 -r 54ca4e00e569 en/branch.tex --- a/en/branch.tex Mon Apr 23 15:28:13 2007 -0700 +++ b/en/branch.tex Wed Apr 25 11:02:35 2007 -0700 @@ -379,11 +379,16 @@ gives you a more context when you're trying to follow the history of a long-lived branchy project. -If you're working with multiple shared repositories, you can set up a -hook on each that will block incoming changes that have the ``wrong'' -branch name. This provides a simple, but effective, defence against -people accidentally pushing changes from a ``bleeding edge'' branch to -a ``stable'' branch. +If you're working with shared repositories, you can set up a +\hook{pretxnchangegroup} hook on each that will block incoming changes +that have the ``wrong'' branch name. This provides a simple, but +effective, defence against people accidentally pushing changes from a +``bleeding edge'' branch to a ``stable'' branch. Such a hook might +look like this inside the shared repo's \hgrc. +\begin{codesample2} + [hooks] + pretxnchangegroup.branch = hg heads --template '{branches} ' | grep mybranch +\end{codesample2} %%% Local Variables: %%% mode: latex