hgbook
changeset 40:b2fe9964b21b
More content for hook reference.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed Jul 19 23:25:30 2006 -0700 (2006-07-19) |
parents | 576fef93bb49 |
children | d1a3394f8bcf |
files | en/hook.tex |
line diff
1.1 --- a/en/hook.tex Wed Jul 19 16:32:10 2006 -0700 1.2 +++ b/en/hook.tex Wed Jul 19 23:25:30 2006 -0700 1.3 @@ -442,27 +442,200 @@ 1.4 \subsection{The \hook{changegroup} hook} 1.5 \label{sec:hook:changegroup} 1.6 1.7 -Parameters to this hook: 1.8 -\begin{itemize} 1.9 -\item[\texttt{node}] The changeset ID of the first changeset in the 1.10 - group that was added. All changesets between this and 1.11 - \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by a 1.12 - single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}. 1.13 -\end{itemize} 1.14 - 1.15 +This hook is run after a group of pre-existing changesets has been 1.16 +added to the repository, for example via a \hgcmd{pull} or 1.17 +\hgcmd{unbundle}. This hook is run once per operation that added one 1.18 +or more changesets. 1.19 + 1.20 +Parameters to this hook: 1.21 +\begin{itemize} 1.22 +\item[\texttt{node}] A changeset ID. The changeset ID of the first 1.23 + changeset in the group that was added. All changesets between this 1.24 + and \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by 1.25 + a single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}. 1.26 +\end{itemize} 1.27 + 1.28 +See also: \hook{incoming} (section~\ref{sec:hook:incoming}), 1.29 +\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup}), 1.30 +\hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup}) 1.31 1.32 \subsection{The \hook{commit} hook} 1.33 \label{sec:hook:commit} 1.34 1.35 -Parameters to this hook: 1.36 -\begin{itemize} 1.37 -\item[\texttt{node}] The changeset ID of the newly committed 1.38 +This hook is run after a new changeset has been created. 1.39 + 1.40 +Parameters to this hook: 1.41 +\begin{itemize} 1.42 +\item[\texttt{node}] A changeset ID. The changeset ID of the newly 1.43 + committed changeset. 1.44 +\item[\texttt{parent1}] A changeset ID. The changeset ID of the first 1.45 + parent of the newly committed changeset. 1.46 +\item[\texttt{parent2}] A changeset ID. The changeset ID of the second 1.47 + parent of the newly committed changeset. 1.48 +\end{itemize} 1.49 + 1.50 +See also: \hook{precommit} (section~\ref{sec:hook:precommit}), 1.51 +\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit}) 1.52 + 1.53 +\subsection{The \hook{incoming} hook} 1.54 +\label{sec:hook:incoming} 1.55 + 1.56 +This hook is run after a pre-existing changeset has been added to the 1.57 +repository, for example via a \hgcmd{push}. If a group of changesets 1.58 +was added in a single operation, this hook is called once for each 1.59 +added changeset. 1.60 + 1.61 +Parameters to this hook: 1.62 +\begin{itemize} 1.63 +\item[\texttt{node}] A changeset ID. The ID of the newly added 1.64 changeset. 1.65 -\item[\texttt{parent1}] The changeset ID of the first parent of the 1.66 - newly committed changeset. 1.67 -\item[\texttt{parent2}] The changeset ID of the second parent of the 1.68 - newly committed changeset. 1.69 -\end{itemize} 1.70 +\end{itemize} 1.71 + 1.72 +See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}) \hook{prechangegroup} (section~\ref{sec:hook:prechangegroup}), \hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup}) 1.73 + 1.74 +\subsection{The \hook{outgoing} hook} 1.75 +\label{sec:hook:outgoing} 1.76 + 1.77 +This hook is run after a group of changesets has been propagated out 1.78 +of this repository, for example by a \hgcmd{push} or \hgcmd{bundle} 1.79 +command. 1.80 + 1.81 +Parameters to this hook: 1.82 +\begin{itemize} 1.83 +\item[\texttt{node}] A changeset ID. The changeset ID of the first 1.84 + changeset of the group that was sent. 1.85 +\item[\texttt{source}] A string. The source of the of the operation. 1.86 + If a remote client pulled changes from this repository, 1.87 + \texttt{source} will be \texttt{serve}. If the client that obtained 1.88 + changes from this repository was local, \texttt{source} will be 1.89 + \texttt{bundle}, \texttt{pull}, or \texttt{push}, depending on the 1.90 + operation the client performed. 1.91 +\end{itemize} 1.92 + 1.93 +See also: \hook{preoutgoing} (section~\ref{sec:hook:preoutgoing}) 1.94 + 1.95 +\subsection{The \hook{prechangegroup} hook} 1.96 +\label{sec:hook:prechangegroup} 1.97 + 1.98 +This hook is not passed any parameters. 1.99 + 1.100 +See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}), 1.101 +\hook{incoming} (section~\ref{sec:hook:incoming}), , 1.102 +\hook{pretxnchangegroup} (section~\ref{sec:hook:pretxnchangegroup}) 1.103 + 1.104 +\subsection{The \hook{precommit} hook} 1.105 +\label{sec:hook:precommit} 1.106 + 1.107 +This hook is invoked before Mercurial has obtained any of the metadata 1.108 +for the commit, such as the commit message or date. 1.109 + 1.110 +Parameters to this hook: 1.111 +\begin{itemize} 1.112 +\item[\texttt{parent1}] A changeset ID. The changeset ID of the first 1.113 + parent of the working directory. 1.114 +\item[\texttt{parent2}] A changeset ID. The changeset ID of the second 1.115 + parent of the working directory. 1.116 +\end{itemize} 1.117 +If the commit proceeds, the parents of the working directory will 1.118 +become the parents of the new changeset. 1.119 + 1.120 +See also: \hook{commit} (section~\ref{sec:hook:commit}), 1.121 +\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit}) 1.122 + 1.123 +\subsection{The \hook{preoutgoing} hook} 1.124 +\label{sec:hook:preoutgoing} 1.125 + 1.126 +This hook is invoked before Mercurial knows the identities of the 1.127 +changesets to be transmitted. 1.128 + 1.129 +Parameters to this hook: 1.130 +\begin{itemize} 1.131 +\item[\texttt{source}] A string. The source of the operation that is 1.132 + attempting to obtain changes from this repository. See the 1.133 + documentation for the \texttt{source} parameter to the 1.134 + \hook{outgoing} hook, in section~\ref{sec:hook:outgoing}, for 1.135 + possible values of this parameter.. 1.136 +\end{itemize} 1.137 + 1.138 +See also: \hook{outgoing} (section~\ref{sec:hook:outgoing}) 1.139 + 1.140 +\subsection{The \hook{pretag} hook} 1.141 +\label{sec:hook:pretag} 1.142 + 1.143 +Parameters to this hook: 1.144 +\begin{itemize} 1.145 +\item[\texttt{local}] A boolean. Whether the tag is local to this 1.146 + repository instance (i.e.~stored in \sfilename{.hg/tags}) or managed 1.147 + by Mercurial (stored in \sfilename{.hgtags}). 1.148 +\item[\texttt{node}] A changeset ID. The ID of the changeset to be tagged. 1.149 +\item[\texttt{tag}] A string. The name of the tag to be created. 1.150 +\end{itemize} 1.151 + 1.152 +If the tag to be created is revision-controlled, the \hook{precommit} 1.153 +and \hook{pretxncommit} hooks (sections~\ref{sec:hook:commit} 1.154 +and~\ref{sec:hook:pretxncommit}) will also be run. 1.155 + 1.156 +See also: \hook{tag} (section~\ref{sec:hook:tag}) 1.157 + 1.158 +\subsection{The \hook{pretxnchangegroup} hook} 1.159 +\label{sec:hook:pretxnchangegroup} 1.160 + 1.161 +Parameters to this hook are the same as for the \hook{changegroup} 1.162 +hook; see section~\ref{sec:hook:changegroup} for details. 1.163 + 1.164 +See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}), 1.165 +\hook{incoming} (section~\ref{sec:hook:incoming}), 1.166 +\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup}) 1.167 + 1.168 +\subsection{The \hook{pretxncommit} hook} 1.169 +\label{sec:hook:pretxncommit} 1.170 + 1.171 +Parameters to this hook are the same as for the \hook{commit} hook; 1.172 +see section~\ref{sec:hook:commit} for details. 1.173 + 1.174 +See also: \hook{precommit} (section~\ref{sec:hook:precommit}) 1.175 + 1.176 +\subsection{The \hook{preupdate} hook} 1.177 +\label{sec:hook:preupdate} 1.178 + 1.179 +Parameters to this hook: 1.180 +\begin{itemize} 1.181 +\item[\texttt{parent1}] A changeset ID. The ID of the parent that the 1.182 + working directory is to be updated to. If the working directory is 1.183 + being merged, it will not change this parent. 1.184 +\item[\texttt{parent2}] A changeset ID. Only set if the working 1.185 + directory is being merged. The ID of the revision that the working 1.186 + directory is being merged with. 1.187 +\end{itemize} 1.188 + 1.189 +See also: \hook{update} (section~\ref{sec:hook:update}) 1.190 + 1.191 +\subsection{The \hook{tag} hook} 1.192 +\label{sec:hook:tag} 1.193 + 1.194 +Parameters to this hook are the same as for the \hook{pretag} hook; 1.195 +see section~\ref{sec:hook:pretag} for details. 1.196 + 1.197 +If the created tag is revision-controlled, the \hook{commit} hook 1.198 +(section~\ref{sec:hook:commit}) will also be run. 1.199 + 1.200 +See also: \hook{pretag} (section~\ref{sec:hook:pretag}) 1.201 + 1.202 +\subsection{The \hook{update} hook} 1.203 +\label{sec:hook:update} 1.204 + 1.205 +\begin{itemize} 1.206 +\item[\texttt{error}] A boolean. Indicates whether the update or 1.207 + merge completed successfully. 1.208 +\item[\texttt{parent1}] A changeset ID. The ID of the parent that the 1.209 + working directory was updated to. If the working directory was 1.210 + merged, it will not have changed this parent. 1.211 +\item[\texttt{parent2}] A changeset ID. Only set if the working 1.212 + directory was merged. The ID of the revision that the working 1.213 + directory was merged with. 1.214 +\end{itemize} 1.215 + 1.216 +See also: \hook{preupdate} (section~\ref{sec:hook:preupdate}) 1.217 1.218 %%% Local Variables: 1.219 %%% mode: latex