hgbook
diff en/ch10-hook.xml @ 645:1114da00d30e
Fix '<programlisting>' in ch02-tour-basic.xml
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Wed Mar 18 19:43:46 2009 +0800 (2009-03-18) |
parents | 13513d2a128d |
children | d0160b0b1a9e |
line diff
1.1 --- a/en/ch10-hook.xml Mon Mar 09 23:37:29 2009 -0700 1.2 +++ b/en/ch10-hook.xml Wed Mar 18 19:43:46 2009 +0800 1.3 @@ -1,6 +1,6 @@ 1.4 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : --> 1.5 1.6 -<chapter id="chap:hook"> 1.7 +<chapter id="chap.hook"> 1.8 <?dbhtml filename="handling-repository-events-with-hooks.html"?> 1.9 <title>Handling repository events with hooks</title> 1.10 1.11 @@ -19,7 +19,7 @@ 1.12 1.13 <para>Here is a brief list of the hooks that Mercurial supports. 1.14 We will revisit each of these hooks in more detail later, in 1.15 - section <xref linkend="sec:hook:ref"/>.</para> 1.16 + section <xref linkend="sec.hook.ref"/>.</para> 1.17 1.18 <itemizedlist> 1.19 <listitem><para><literal role="hook">changegroup</literal>: This 1.20 @@ -343,7 +343,7 @@ 1.21 1.22 </sect2> 1.23 </sect1> 1.24 - <sect1 id="sec:hook:simple"> 1.25 + <sect1 id="sec.hook.simple"> 1.26 <title>A short tutorial on using hooks</title> 1.27 1.28 <para>It is easy to write a Mercurial hook. Let's start with a 1.29 @@ -400,11 +400,11 @@ 1.30 message that contains the hook name and extension, so using a 1.31 descriptive extension could give you an immediate hint as to 1.32 why the hook failed (see section <xref 1.33 - linkend="sec:hook:perm"/> for an example). 1.34 - </para> 1.35 - 1.36 - </sect2> 1.37 - <sect2 id="sec:hook:perm"> 1.38 + linkend="sec.hook.perm"/> for an example). 1.39 + </para> 1.40 + 1.41 + </sect2> 1.42 + <sect2 id="sec.hook.perm"> 1.43 <title>Controlling whether an activity can proceed</title> 1.44 1.45 <para>In our earlier examples, we used the <literal 1.46 @@ -459,7 +459,7 @@ 1.47 message before it calls each hook. 1.48 </para> 1.49 1.50 - <sect2 id="sec:hook:lang"> 1.51 + <sect2 id="sec.hook.lang"> 1.52 <title>Choosing how your hook should run</title> 1.53 1.54 <para>You can write a hook either as a normal 1.55 @@ -490,7 +490,7 @@ 1.56 </para> 1.57 1.58 </sect2> 1.59 - <sect2 id="sec:hook:param"> 1.60 + <sect2 id="sec.hook.param"> 1.61 <title>Hook parameters</title> 1.62 1.63 <para>Mercurial calls each hook with a set of well-defined 1.64 @@ -888,7 +888,7 @@ 1.65 </para> 1.66 </listitem></itemizedlist> 1.67 1.68 - <sect3 id="sec:hook:bugzilla:config"> 1.69 + <sect3 id="sec.hook.bugzilla.config"> 1.70 <title>Configuring the <literal role="hook">bugzilla</literal> 1.71 hook</title> 1.72 1.73 @@ -1101,7 +1101,7 @@ 1.74 </para> 1.75 1.76 <para>Recall from section <xref 1.77 - linkend="sec:hook:bugzilla:config"/> above that the user 1.78 + linkend="sec.hook.bugzilla.config"/> above that the user 1.79 that runs the Mercurial process on the server is also the 1.80 one that will run the <filename>processmail</filename> 1.81 script. The <filename>processmail</filename> script 1.82 @@ -1259,7 +1259,7 @@ 1.83 out email about changes that remote users pushed into 1.84 this repository via a server, for example. See section 1.85 <xref 1.86 - linkend="sec:hook:sources"/> for the sources you can 1.87 + linkend="sec.hook.sources"/> for the sources you can 1.88 specify here. 1.89 </para> 1.90 </listitem></itemizedlist> 1.91 @@ -1318,7 +1318,7 @@ 1.92 </sect3> 1.93 </sect2> 1.94 </sect1> 1.95 - <sect1 id="sec:hook:ref"> 1.96 + <sect1 id="sec.hook.ref"> 1.97 <title>Information for writers of hooks</title> 1.98 1.99 <sect2> 1.100 @@ -1426,7 +1426,7 @@ 1.101 transferred to or from. 1.102 </para> 1.103 1.104 - <sect3 id="sec:hook:sources"> 1.105 + <sect3 id="sec.hook.sources"> 1.106 <title>Sources of changesets</title> 1.107 1.108 <para>Mercurial will tell a hook what means are, or were, used 1.109 @@ -1458,7 +1458,7 @@ 1.110 </listitem></itemizedlist> 1.111 1.112 </sect3> 1.113 - <sect3 id="sec:hook:url"> 1.114 + <sect3 id="sec.hook.url"> 1.115 <title>Where changes are going&emdash;remote repository 1.116 URLs</title> 1.117 1.118 @@ -1500,7 +1500,7 @@ 1.119 <sect1> 1.120 <title>Hook reference</title> 1.121 1.122 - <sect2 id="sec:hook:changegroup"> 1.123 + <sect2 id="sec.hook.changegroup"> 1.124 <title><literal role="hook">changegroup</literal>&emdash;after 1.125 remote changesets added</title> 1.126 1.127 @@ -1535,26 +1535,26 @@ 1.128 </listitem> 1.129 <listitem><para><literal>source</literal>: A string. The 1.130 source of these changes. See section <xref 1.131 - linkend="sec:hook:sources"/> for details. 1.132 + linkend="sec.hook.sources"/> for details. 1.133 </para> 1.134 </listitem> 1.135 <listitem><para><literal>url</literal>: A URL. The location 1.136 of the remote repository, if known. See section <xref 1.137 - linkend="sec:hook:url"/> for more 1.138 + linkend="sec.hook.url"/> for more 1.139 information. 1.140 </para> 1.141 </listitem></itemizedlist> 1.142 1.143 <para>See also: <literal role="hook">incoming</literal> (section 1.144 - <xref linkend="sec:hook:incoming"/>), <literal 1.145 + <xref linkend="sec.hook.incoming"/>), <literal 1.146 role="hook">prechangegroup</literal> (section <xref 1.147 - linkend="sec:hook:prechangegroup"/>), <literal 1.148 + linkend="sec.hook.prechangegroup"/>), <literal 1.149 role="hook">pretxnchangegroup</literal> (section <xref 1.150 - linkend="sec:hook:pretxnchangegroup"/>) 1.151 - </para> 1.152 - 1.153 - </sect2> 1.154 - <sect2 id="sec:hook:commit"> 1.155 + linkend="sec.hook.pretxnchangegroup"/>) 1.156 + </para> 1.157 + 1.158 + </sect2> 1.159 + <sect2 id="sec.hook.commit"> 1.160 <title><literal role="hook">commit</literal>&emdash;after a new 1.161 changeset is created</title> 1.162 1.163 @@ -1580,13 +1580,13 @@ 1.164 </listitem></itemizedlist> 1.165 1.166 <para>See also: <literal role="hook">precommit</literal> 1.167 - (section <xref linkend="sec:hook:precommit"/>), <literal 1.168 + (section <xref linkend="sec.hook.precommit"/>), <literal 1.169 role="hook">pretxncommit</literal> (section <xref 1.170 - linkend="sec:hook:pretxncommit"/>) 1.171 - </para> 1.172 - 1.173 - </sect2> 1.174 - <sect2 id="sec:hook:incoming"> 1.175 + linkend="sec.hook.pretxncommit"/>) 1.176 + </para> 1.177 + 1.178 + </sect2> 1.179 + <sect2 id="sec.hook.incoming"> 1.180 <title><literal role="hook">incoming</literal>&emdash;after one 1.181 remote changeset is added</title> 1.182 1.183 @@ -1599,7 +1599,7 @@ 1.184 1.185 <para>You can use this hook for the same purposes as the 1.186 <literal role="hook">changegroup</literal> hook (section <xref 1.187 - linkend="sec:hook:changegroup"/>); it's simply 1.188 + linkend="sec.hook.changegroup"/>); it's simply 1.189 more convenient sometimes to run a hook once per group of 1.190 changesets, while other times it's handier once per changeset. 1.191 </para> 1.192 @@ -1613,26 +1613,26 @@ 1.193 </listitem> 1.194 <listitem><para><literal>source</literal>: A string. The 1.195 source of these changes. See section <xref 1.196 - linkend="sec:hook:sources"/> for details. 1.197 + linkend="sec.hook.sources"/> for details. 1.198 </para> 1.199 </listitem> 1.200 <listitem><para><literal>url</literal>: A URL. The location 1.201 of the remote repository, if known. See section <xref 1.202 - linkend="sec:hook:url"/> for more 1.203 + linkend="sec.hook.url"/> for more 1.204 information. 1.205 </para> 1.206 </listitem></itemizedlist> 1.207 1.208 <para>See also: <literal role="hook">changegroup</literal> 1.209 - (section <xref linkend="sec:hook:changegroup"/>) <literal 1.210 + (section <xref linkend="sec.hook.changegroup"/>) <literal 1.211 role="hook">prechangegroup</literal> (section <xref 1.212 - linkend="sec:hook:prechangegroup"/>), <literal 1.213 + linkend="sec.hook.prechangegroup"/>), <literal 1.214 role="hook">pretxnchangegroup</literal> (section <xref 1.215 - linkend="sec:hook:pretxnchangegroup"/>) 1.216 - </para> 1.217 - 1.218 - </sect2> 1.219 - <sect2 id="sec:hook:outgoing"> 1.220 + linkend="sec.hook.pretxnchangegroup"/>) 1.221 + </para> 1.222 + 1.223 + </sect2> 1.224 + <sect2 id="sec.hook.outgoing"> 1.225 <title><literal role="hook">outgoing</literal>&emdash;after 1.226 changesets are propagated</title> 1.227 1.228 @@ -1656,7 +1656,7 @@ 1.229 </listitem> 1.230 <listitem><para><literal>source</literal>: A string. The 1.231 source of the of the operation (see section <xref 1.232 - linkend="sec:hook:sources"/>). If a remote 1.233 + linkend="sec.hook.sources"/>). If a remote 1.234 client pulled changes from this repository, 1.235 <literal>source</literal> will be 1.236 <literal>serve</literal>. If the client that obtained 1.237 @@ -1669,17 +1669,17 @@ 1.238 </listitem> 1.239 <listitem><para><literal>url</literal>: A URL. The location 1.240 of the remote repository, if known. See section <xref 1.241 - linkend="sec:hook:url"/> for more 1.242 + linkend="sec.hook.url"/> for more 1.243 information. 1.244 </para> 1.245 </listitem></itemizedlist> 1.246 1.247 <para>See also: <literal role="hook">preoutgoing</literal> 1.248 - (section <xref linkend="sec:hook:preoutgoing"/>) 1.249 - </para> 1.250 - 1.251 - </sect2> 1.252 - <sect2 id="sec:hook:prechangegroup"> 1.253 + (section <xref linkend="sec.hook.preoutgoing"/>) 1.254 + </para> 1.255 + 1.256 + </sect2> 1.257 + <sect2 id="sec.hook.prechangegroup"> 1.258 <title><literal 1.259 role="hook">prechangegroup</literal>&emdash;before starting 1.260 to add remote changesets</title> 1.261 @@ -1706,26 +1706,26 @@ 1.262 <itemizedlist> 1.263 <listitem><para><literal>source</literal>: A string. The 1.264 source of these changes. See section <xref 1.265 - linkend="sec:hook:sources"/> for details. 1.266 + linkend="sec.hook.sources"/> for details. 1.267 </para> 1.268 </listitem> 1.269 <listitem><para><literal>url</literal>: A URL. The location 1.270 of the remote repository, if known. See section <xref 1.271 - linkend="sec:hook:url"/> for more 1.272 + linkend="sec.hook.url"/> for more 1.273 information. 1.274 </para> 1.275 </listitem></itemizedlist> 1.276 1.277 <para>See also: <literal role="hook">changegroup</literal> 1.278 - (section <xref linkend="sec:hook:changegroup"/>), <literal 1.279 + (section <xref linkend="sec.hook.changegroup"/>), <literal 1.280 role="hook">incoming</literal> (section <xref 1.281 - linkend="sec:hook:incoming"/>), , <literal 1.282 + linkend="sec.hook.incoming"/>), , <literal 1.283 role="hook">pretxnchangegroup</literal> (section <xref 1.284 - linkend="sec:hook:pretxnchangegroup"/>) 1.285 - </para> 1.286 - 1.287 - </sect2> 1.288 - <sect2 id="sec:hook:precommit"> 1.289 + linkend="sec.hook.pretxnchangegroup"/>) 1.290 + </para> 1.291 + 1.292 + </sect2> 1.293 + <sect2 id="sec.hook.precommit"> 1.294 <title><literal role="hook">precommit</literal>&emdash;before 1.295 starting to commit a changeset</title> 1.296 1.297 @@ -1759,13 +1759,13 @@ 1.298 </para> 1.299 1.300 <para>See also: <literal role="hook">commit</literal> (section 1.301 - <xref linkend="sec:hook:commit"/>), <literal 1.302 + <xref linkend="sec.hook.commit"/>), <literal 1.303 role="hook">pretxncommit</literal> (section <xref 1.304 - linkend="sec:hook:pretxncommit"/>) 1.305 - </para> 1.306 - 1.307 - </sect2> 1.308 - <sect2 id="sec:hook:preoutgoing"> 1.309 + linkend="sec.hook.pretxncommit"/>) 1.310 + </para> 1.311 + 1.312 + </sect2> 1.313 + <sect2 id="sec.hook.preoutgoing"> 1.314 <title><literal role="hook">preoutgoing</literal>&emdash;before 1.315 starting to propagate changesets</title> 1.316 1.317 @@ -1783,27 +1783,27 @@ 1.318 <listitem><para><literal>source</literal>: A string. The 1.319 source of the operation that is attempting to obtain 1.320 changes from this repository (see section <xref 1.321 - linkend="sec:hook:sources"/>). See the documentation 1.322 + linkend="sec.hook.sources"/>). See the documentation 1.323 for the <literal>source</literal> parameter to the 1.324 <literal role="hook">outgoing</literal> hook, in section 1.325 - <xref linkend="sec:hook:outgoing"/>, for possible values 1.326 + <xref linkend="sec.hook.outgoing"/>, for possible values 1.327 of 1.328 this parameter. 1.329 </para> 1.330 </listitem> 1.331 <listitem><para><literal>url</literal>: A URL. The location 1.332 of the remote repository, if known. See section <xref 1.333 - linkend="sec:hook:url"/> for more 1.334 + linkend="sec.hook.url"/> for more 1.335 information. 1.336 </para> 1.337 </listitem></itemizedlist> 1.338 1.339 <para>See also: <literal role="hook">outgoing</literal> (section 1.340 - <xref linkend="sec:hook:outgoing"/>) 1.341 - </para> 1.342 - 1.343 - </sect2> 1.344 - <sect2 id="sec:hook:pretag"> 1.345 + <xref linkend="sec.hook.outgoing"/>) 1.346 + </para> 1.347 + 1.348 + </sect2> 1.349 + <sect2 id="sec.hook.pretag"> 1.350 <title><literal role="hook">pretag</literal>&emdash;before 1.351 tagging a changeset</title> 1.352 1.353 @@ -1834,15 +1834,15 @@ 1.354 <para>If the tag to be created is revision-controlled, the 1.355 <literal role="hook">precommit</literal> and <literal 1.356 role="hook">pretxncommit</literal> hooks (sections <xref 1.357 - linkend="sec:hook:commit"/> and <xref 1.358 - linkend="sec:hook:pretxncommit"/>) will also be run. 1.359 + linkend="sec.hook.commit"/> and <xref 1.360 + linkend="sec.hook.pretxncommit"/>) will also be run. 1.361 </para> 1.362 1.363 <para>See also: <literal role="hook">tag</literal> (section 1.364 - <xref linkend="sec:hook:tag"/>) 1.365 - </para> 1.366 - </sect2> 1.367 - <sect2 id="sec:hook:pretxnchangegroup"> 1.368 + <xref linkend="sec.hook.tag"/>) 1.369 + </para> 1.370 + </sect2> 1.371 + <sect2 id="sec.hook.pretxnchangegroup"> 1.372 <title><literal 1.373 role="hook">pretxnchangegroup</literal>&emdash;before 1.374 completing addition of remote changesets</title> 1.375 @@ -1889,26 +1889,26 @@ 1.376 </listitem> 1.377 <listitem><para><literal>source</literal>: A string. The 1.378 source of these changes. See section <xref 1.379 - linkend="sec:hook:sources"/> for details. 1.380 + linkend="sec.hook.sources"/> for details. 1.381 </para> 1.382 </listitem> 1.383 <listitem><para><literal>url</literal>: A URL. The location 1.384 of the remote repository, if known. See section <xref 1.385 - linkend="sec:hook:url"/> for more 1.386 + linkend="sec.hook.url"/> for more 1.387 information. 1.388 </para> 1.389 </listitem></itemizedlist> 1.390 1.391 <para>See also: <literal role="hook">changegroup</literal> 1.392 - (section <xref linkend="sec:hook:changegroup"/>), <literal 1.393 + (section <xref linkend="sec.hook.changegroup"/>), <literal 1.394 role="hook">incoming</literal> (section <xref 1.395 - linkend="sec:hook:incoming"/>), <literal 1.396 + linkend="sec.hook.incoming"/>), <literal 1.397 role="hook">prechangegroup</literal> (section <xref 1.398 - linkend="sec:hook:prechangegroup"/>) 1.399 - </para> 1.400 - 1.401 - </sect2> 1.402 - <sect2 id="sec:hook:pretxncommit"> 1.403 + linkend="sec.hook.prechangegroup"/>) 1.404 + </para> 1.405 + 1.406 + </sect2> 1.407 + <sect2 id="sec.hook.pretxncommit"> 1.408 <title><literal role="hook">pretxncommit</literal>&emdash;before 1.409 completing commit of new changeset</title> 1.410 1.411 @@ -1951,11 +1951,11 @@ 1.412 </listitem></itemizedlist> 1.413 1.414 <para>See also: <literal role="hook">precommit</literal> 1.415 - (section <xref linkend="sec:hook:precommit"/>) 1.416 - </para> 1.417 - 1.418 - </sect2> 1.419 - <sect2 id="sec:hook:preupdate"> 1.420 + (section <xref linkend="sec.hook.precommit"/>) 1.421 + </para> 1.422 + 1.423 + </sect2> 1.424 + <sect2 id="sec.hook.preupdate"> 1.425 <title><literal role="hook">preupdate</literal>&emdash;before 1.426 updating or merging working directory</title> 1.427 1.428 @@ -1983,11 +1983,11 @@ 1.429 </listitem></itemizedlist> 1.430 1.431 <para>See also: <literal role="hook">update</literal> (section 1.432 - <xref linkend="sec:hook:update"/>) 1.433 - </para> 1.434 - 1.435 - </sect2> 1.436 - <sect2 id="sec:hook:tag"> 1.437 + <xref linkend="sec.hook.update"/>) 1.438 + </para> 1.439 + 1.440 + </sect2> 1.441 + <sect2 id="sec.hook.tag"> 1.442 <title><literal role="hook">tag</literal>&emdash;after tagging a 1.443 changeset</title> 1.444 1.445 @@ -2016,15 +2016,15 @@ 1.446 1.447 <para>If the created tag is revision-controlled, the <literal 1.448 role="hook">commit</literal> hook (section <xref 1.449 - linkend="sec:hook:commit"/>) is run before this hook. 1.450 + linkend="sec.hook.commit"/>) is run before this hook. 1.451 </para> 1.452 1.453 <para>See also: <literal role="hook">pretag</literal> (section 1.454 - <xref linkend="sec:hook:pretag"/>) 1.455 - </para> 1.456 - 1.457 - </sect2> 1.458 - <sect2 id="sec:hook:update"> 1.459 + <xref linkend="sec.hook.pretag"/>) 1.460 + </para> 1.461 + 1.462 + </sect2> 1.463 + <sect2 id="sec.hook.update"> 1.464 <title><literal role="hook">update</literal>&emdash;after 1.465 updating or merging working directory</title> 1.466 1.467 @@ -2054,7 +2054,7 @@ 1.468 </listitem></itemizedlist> 1.469 1.470 <para>See also: <literal role="hook">preupdate</literal> 1.471 - (section <xref linkend="sec:hook:preupdate"/>) 1.472 + (section <xref linkend="sec.hook.preupdate"/>) 1.473 </para> 1.474 1.475 </sect2>