changeset 779:69923723e7f9

more hook.tex
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 27 Apr 2009 17:31:54 +0900
parents 64858a216741
children 2a93b1d35990
files ja/hook.tex ja/todo.txt
diffstat 2 files changed, 620 insertions(+), 273 deletions(-) [+]
line wrap: on
line diff
--- a/ja/hook.tex	Sat Apr 25 00:04:19 2009 +0900
+++ b/ja/hook.tex	Mon Apr 27 17:31:54 2009 +0900
@@ -676,9 +676,18 @@
 %in-process hook returning boolean ``true''.  If an in-process hook
 %raises an exception, the hook is considered to have failed.
 
+$B@5$7$/F0:n$7$?30It%U%C%/$O%9%F!<%?%9$H$7$F%<%m$r!$%W%m%;%9Fb%U%C%/$N>l9g(B
+$B$O%V!<%kCM(B``false''$B$rJV$5$J$1$l$P$J$i$J$$!%$J$s$i$+$N<:GT$,$"$C$?>l9g$O!$(B
+$B30It%U%C%/$OHs%<%m$N=*N;%9%F!<%?%9$r!$%W%m%;%9Fb%U%C%/$O%V!<%kCM(B``true''
+$B$rJV$9!%$b$7%W%m%;%9Fb%U%C%/$,Nc30$rH/@8$7$?>l9g$O!$%U%C%/$O<:GT$7$?$H8+(B
+$B$J$5$l$k!%(B
+
 %For a hook that controls whether an activity can proceed, zero/false
 %means ``allow'', while non-zero/true/exception means ``deny''.
 
+$BF0:n$N7QB3$r@)8f$9$k%U%C%/$N>l9g$O!$%<%m!?(Bfalse$B$O7QB3$N5v2D$r!$Hs%<(B
+$B%m!?(Btrue$B!?Nc30$N>l9g$O6X;_$r0UL#$9$k!%(B
+
 %\subsection{Writing an external hook}
 \subsection{$B30It%U%C%/$r:n@.$9$k(B}
 
@@ -1358,37 +1367,60 @@
 %\subsubsection{Configuring the text that gets added to a bug}
 \subsubsection{$B%P%0$KDI2C$5$l$?J8;zNs$r@_Dj$9$k(B}
 
-You can configure the text that this hook adds as a comment; you
-specify it in the form of a Mercurial template.  Several \hgrc\
-entries (still in the \rcsection{bugzilla} section) control this
-behaviour.
+%You can configure the text that this hook adds as a comment; you
+%specify it in the form of a Mercurial template.  Several \hgrc\
+%entries (still in the \rcsection{bugzilla} section) control this
+%behaviour.
+$B%U%C%/$,DI2C$9$k%3%a%s%HJ8;zNs$O(BMercurial$B%F%s%W%l!<%H$H$7$F;XDj$9$k$3$H$,(B
+$B$G$-$k!%(B\hgrc $B$N%(%s%H%j(B(\rcsection{bugzilla}$B%;%/%7%g%s$K4^$^$l$F$$$k$b$N(B
+$B$r4^$`(B)$B$G5sF0$r%3%s%H%m!<%k$G$-$k!%(B
+%\begin{itemize}
+%\item[\texttt{strip}] The number of leading path elements to strip
+%  from a repository's path name to construct a partial path for a URL.
+%  For example, if the repositories on your server live under
+%  \dirname{/home/hg/repos}, and you have a repository whose path is
+%  \dirname{/home/hg/repos/app/tests}, then setting \texttt{strip} to
+%  \texttt{4} will give a partial path of \dirname{app/tests}.  The
+%  hook will make this partial path available when expanding a
+%  template, as \texttt{webroot}.
+%\item[\texttt{template}] The text of the template to use.  In addition
+%  to the usual changeset-related variables, this template can use
+%  \texttt{hgweb} (the value of the \texttt{hgweb} configuration item
+%  above) and \texttt{webroot} (the path constructed using
+%  \texttt{strip} above).
+%\end{itemize}
 \begin{itemize}
-\item[\texttt{strip}] The number of leading path elements to strip
-  from a repository's path name to construct a partial path for a URL.
-  For example, if the repositories on your server live under
-  \dirname{/home/hg/repos}, and you have a repository whose path is
-  \dirname{/home/hg/repos/app/tests}, then setting \texttt{strip} to
-  \texttt{4} will give a partial path of \dirname{app/tests}.  The
-  hook will make this partial path available when expanding a
-  template, as \texttt{webroot}.
-\item[\texttt{template}] The text of the template to use.  In addition
-  to the usual changeset-related variables, this template can use
-  \texttt{hgweb} (the value of the \texttt{hgweb} configuration item
-  above) and \texttt{webroot} (the path constructed using
-  \texttt{strip} above).
+\item[\texttt{strip}] URL$B@8@.MQ$NItJ,%Q%9L>$r:n$k$?$a$K%j%]%8%H%j$N%Q%9L>(B
+	     $B$+$i<h$j=|$+$l$k@h9TMWAG$N?t!%%5!<%P>e$N(B
+	     \dirname{/home/hg/repos}$B$K%j%]%8%H%j72$,$"(B
+	     $B$j!$(B\dirname{/home/hg/repos/app/tests}$B$H$$$&%j%]%8%H%j$r;}$C(B
+	     $B$F$$$k>l9g!$(B\texttt{strip}$B$r(B\texttt{4}$B$K$9$k$HItJ,%Q%9L>(B
+	     \dirname{app/tests}$B$,F@$i$l$k!%%U%C%/$O$3$NItJ,%Q%9$r%F%s%W(B
+	     $B%l!<%H$N(B\texttt{webroot}$B$KE,MQ$9$k!%(B
+
+\item[\texttt{template}] $B%F%s%W%l!<%H$K;HMQ$5$l$k%F%-%9%H!%DL>o$N%A%'%s%8(B
+	     $B%;%C%H4XO"$NJQ?t$K2C$($F!$(B\texttt{hgweb}$B!J>e5-$N(B
+	     \texttt{hgweb}$B$N@_DjCM!K$H(B\texttt{webroot}$B!J>e5-$N(B
+	     \texttt{strip}$B$r;H$C$F:n$C$?%Q%9!K$,MxMQ$G$-$k(B.
 \end{itemize}
 
-In addition, you can add a \rcitem{web}{baseurl} item to the
-\rcsection{web} section of your \hgrc.  The \hgext{bugzilla} hook will
-make this available when expanding a template, as the base string to
-use when constructing a URL that will let users browse from a Bugzilla
-comment to view a changeset.  Example:
+%In addition, you can add a \rcitem{web}{baseurl} item to the
+%\rcsection{web} section of your \hgrc.  The \hgext{bugzilla} hook will
+%make this available when expanding a template, as the base string to
+%use when constructing a URL that will let users browse from a Bugzilla
+%comment to view a changeset.  Example:
+$B$5$i$K!$(B\rcitem{web}{baseurl}$B9`L\$r(B\hgrc $B$N(B\rcsection{web}$B%;%/%7%g%s$KDI(B
+$B2C$G$-$k!%$3$l$O%F%s%W%l!<%H$N3HD%;~$K(B\hgext{bugzilla}$B%U%C%/$K$h$j(B
+Bugzilla$B%3%a%s%H$+$i%A%'%s%8%;%C%H$r;2>H$9$k:]$N(BURL$B@8@.$N%Y!<%9J8;zNs$H$7(B
+$B$FMxMQ$5$l$k!%(B
+
 \begin{codesample2}
   [web]
   baseurl = http://hg.domain.com/
 \end{codesample2}
 
-Here is an example set of \hgext{bugzilla} hook config information.
+%Here is an example set of \hgext{bugzilla} hook config information.
+\hgext{bugzilla}$B%U%C%/$N@_Dj>pJs$NNc$r<($9!%(B
 \begin{codesample2}
   [bugzilla]
   host = bugzilla.example.com
@@ -1408,131 +1440,248 @@
 %\subsubsection{Testing and troubleshooting}
 \subsubsection{$B%F%9%H$HLdBj2r7h(B}
 
-The most common problems with configuring the \hgext{bugzilla} hook
-relate to running Bugzilla's \filename{processmail} script and mapping
-committer names to user names.
+%The most common problems with configuring the \hgext{bugzilla} hook
+%relate to running Bugzilla's \filename{processmail} script and mapping
+%committer names to user names.
+
+\hgext{bugzilla}$B%U%C%/$r@_Dj$9$k:]$K(BBugzilla$B$N(B\filename{processmail}$B%9%/(B
+$B%j%W%H$N<B9T$H%3%_%C%?!<L>$N%f!<%6L>$X$N%^%C%T%s%0$,$h$/LdBj$K$J$k!%(B
+
+%Recall from section~\ref{sec:hook:bugzilla:config} above that the user
+%that runs the Mercurial process on the server is also the one that
+%will run the \filename{processmail} script.  The
+%\filename{processmail} script sometimes causes Bugzilla to write to
+%files in its configuration directory, and Bugzilla's configuration
+%files are usually owned by the user that your web server runs under.
 
-Recall from section~\ref{sec:hook:bugzilla:config} above that the user
-that runs the Mercurial process on the server is also the one that
-will run the \filename{processmail} script.  The
-\filename{processmail} script sometimes causes Bugzilla to write to
-files in its configuration directory, and Bugzilla's configuration
-files are usually owned by the user that your web server runs under.
+\ref{sec:hook:bugzilla:config}$B@a$G!$%5!<%P>e$G(BMercurial$B$rF0:n$5$;$F$$$k%f!<(B
+$B%6$H(B\filename{processmail}$B%9%/%j%W%H$rF0$+$7$F$$$k%f!<%6$,F1$8$@$H=R$Y$?!%(B
+\filename{processmail}$B%9%/%j%W%H$O(BBugzilla$B$K@_Dj%G%#%l%/%H%jFb$N%U%!%$%k(B
+$B$K=q$-9~$^$;$k$3$H$,$"$k!%(B Bugzilla$B$N@_Dj%U%!%$%k$ODL>o!$%&%'%V%5!<%P$r5/(B
+$BF0$7$F$$$k%f!<%6$N=jM-$G$"$k!%(B
 
-You can cause \filename{processmail} to be run with the suitable
-user's identity using the \command{sudo} command.  Here is an example
-entry for a \filename{sudoers} file.
+%You can cause \filename{processmail} to be run with the suitable
+%user's identity using the \command{sudo} command.  Here is an example
+%entry for a \filename{sudoers} file.
+%\begin{codesample2}
+%  hg_user = (httpd_user) NOPASSWD: /var/www/html/bugzilla/processmail-wrapper %s
+%\end{codesample2}
+%This allows the \texttt{hg\_user} user to run a
+%\filename{processmail-wrapper} program under the identity of
+%\texttt{httpd\_user}.
+
+\command{sudo}$B%3%^%s%I$r;H$&$3$H$G(B\filename{processmail}$B$rE,@Z$J%f!<%6$N(B
+$B8"8B$G<B9T$9$k$3$H$,$G$-$k!%(B\filename{sudoers}$B%U%!%$%k$N5-=RNc$r<($9!%(B
 \begin{codesample2}
   hg_user = (httpd_user) NOPASSWD: /var/www/html/bugzilla/processmail-wrapper %s
 \end{codesample2}
-This allows the \texttt{hg\_user} user to run a
-\filename{processmail-wrapper} program under the identity of
-\texttt{httpd\_user}.
+$B$3$NNc$G$O!$%f!<%6(B\texttt{hg\_user}$B$,(B\filename{processmail-wrapper}$B%W%m%0(B
+$B%i%`$r%f!<%6(B\texttt{httpd\_user}$B$N8"8B$N85$G<B9T$9$k$3$H$,$G$-$k!%(B
 
-This indirection through a wrapper script is necessary, because
-\filename{processmail} expects to be run with its current directory
-set to wherever you installed Bugzilla; you can't specify that kind of
-constraint in a \filename{sudoers} file.  The contents of the wrapper
-script are simple:
+%This indirection through a wrapper script is necessary, because
+%\filename{processmail} expects to be run with its current directory
+%set to wherever you installed Bugzilla; you can't specify that kind of
+%constraint in a \filename{sudoers} file.  The contents of the wrapper
+%script are simple:
+%\begin{codesample2}
+%  #!/bin/sh
+%  cd `dirname $0` && ./processmail "$1" nobody@example.com
+%\end{codesample2}
+%It doesn't seem to matter what email address you pass to
+%\filename{processmail}.
+
+$B$3$N%i%C%Q!<%9%/%j%W%H$+$i<B9T$9$k4V@\<B9T$OI,MW$G$"(B
+$B$k!%(B\filename{processmail}$B$O(BBugzilla$B$r$I$3$K%$%s%9%H!<%k$7$F$b%+%l%s%H%G%#(B
+$B%l%/%H%j$+$i<B9T$5$l$k$?$a$G$"$k!%<B9T@)8B$N<oN`$r(B\filename{sudoers}$B%U%!(B
+$B%$%k$K5-=R$9$k!%%i%C%Q!<%9%/%j%W%H$NFbMF$O%7%s%W%k$J$b$N$G$"$k!%(B
 \begin{codesample2}
   #!/bin/sh
   cd `dirname $0` && ./processmail "$1" nobody@example.com
 \end{codesample2}
-It doesn't seem to matter what email address you pass to
-\filename{processmail}.
+\filename{processmail}$B$KEO$9(Bemail$B%"%I%l%9$O$I$s$J$b$N$G$b$h$$!%(B
 
-If your \rcsection{usermap} is not set up correctly, users will see an
-error message from the \hgext{bugzilla} hook when they push changes
-to the server.  The error message will look like this:
+%If your \rcsection{usermap} is not set up correctly, users will see an
+%error message from the \hgext{bugzilla} hook when they push changes
+%to the server.  The error message will look like this:
+%\begin{codesample2}
+%  cannot find bugzilla user id for john.q.public@example.com
+%\end{codesample2}
+%What this means is that the committer's address,
+%\texttt{john.q.public@example.com}, is not a valid Bugzilla user name,
+%nor does it have an entry in your \rcsection{usermap} that maps it to
+%a valid Bugzilla user name.
+
+\rcsection{usermap}$B$,@5$7$/@_Dj$5$l$F$$$J$$>l9g!$JQ99$r%5!<%P$K%W%C%7%e$9(B
+$B$k:]$K(B\hgext{bugzilla}$B%U%C%/$+$i$N%(%i!<%a%C%;!<%8$,%f!<%6$KAw$i$l$k!%(B
+$B%(%i!<%a%C%;!<%8$O(B
 \begin{codesample2}
   cannot find bugzilla user id for john.q.public@example.com
 \end{codesample2}
-What this means is that the committer's address,
-\texttt{john.q.public@example.com}, is not a valid Bugzilla user name,
-nor does it have an entry in your \rcsection{usermap} that maps it to
-a valid Bugzilla user name.
+$B$N$h$&$JFbMF$G$"$k!%$3$l$O!$%3%_%C%?$N%"%I%l%9(B
+\texttt{john.q.public@example.com}$B$,M-8z$J(BBugzilla$B%f!<%6%M!<%`$G$J$/!$$^(B
+$B$?M-8z$J(BBugzilla$B%f!<%6L>$X$N%^%C%W%U%!%$%k$G$"$k(B\rcsection{usermap}$B$K$b(B
+$B5-=R$,$J$$$H$$$&0UL#$G$"$k!%(B
 
 %\subsection{\hgext{notify}---send email notifications}
 \subsection{\hgext{notify}---$B%a!<%k$GDLCN$r9T$&(B}
 
-Although Mercurial's built-in web server provides RSS feeds of changes
-in every repository, many people prefer to receive change
-notifications via email.  The \hgext{notify} hook lets you send out
-notifications to a set of email addresses whenever changesets arrive
-that those subscribers are interested in.
+%Although Mercurial's built-in web server provides RSS feeds of changes
+%in every repository, many people prefer to receive change
+%notifications via email.  The \hgext{notify} hook lets you send out
+%notifications to a set of email addresses whenever changesets arrive
+%that those subscribers are interested in.
+
+Mercurial$B$NAH$_9~$_%&%'%V%5!<%P$OA4$F$N%j%]%8%H%j$NJQ99$N(BRSS$B%U%#!<%I$rDs(B
+$B6!$9$k$,!$JQ99$NDLCN$r%a!<%k$G<u$1<h$k$3$H$r9%$`%f!<%6$bB?$$!%(B\hgext{notify}
+\hgext{notify}$B%U%C%/$O!$%A%'%s%8%;%C%H$,E~Ce$7$?;~$K4X?4$r;}$D%f!<%6$N%a!<(B
+$B%k%"%I%l%9$KDLCN$rAw$k!%(B
 
-As with the \hgext{bugzilla} hook, the \hgext{notify} hook is
-template-driven, so you can customise the contents of the notification
-messages that it sends.
+%As with the \hgext{bugzilla} hook, the \hgext{notify} hook is
+%template-driven, so you can customise the contents of the notification
+%messages that it sends.
+
+\hgext{bugzilla}$B$HF1MM$K(B\hgext{notify}$B%U%C%/$b%F%s%W%l!<%H$r;H$C$FAw?.$5(B
+$B$l$kDLCN%a%C%;!<%8$NFbMF$r%+%9%?%^%$%:$9$k$3$H$,$G$-$k!%(B
 
-By default, the \hgext{notify} hook includes a diff of every changeset
-that it sends out; you can limit the size of the diff, or turn this
-feature off entirely.  It is useful for letting subscribers review
-changes immediately, rather than clicking to follow a URL.
+%By default, the \hgext{notify} hook includes a diff of every changeset
+%that it sends out; you can limit the size of the diff, or turn this
+%feature off entirely.  It is useful for letting subscribers review
+%changes immediately, rather than clicking to follow a URL.
+
+$B%G%U%)%k%H$G$O(B\hgext{notify}$B%U%C%/$OAw?.$5$l$kA4$F$N%A%'%s%8%;%C%H$N(Bdiff
+$B$r4^$`!%$3$N(Bdiff$B$N%5%$%:$N>e8B$r@_Dj$7$?$j!$Aw?.<+BN$rDd;_$9$k$3$H$,$G$-(B
+$B$k!%(Bdiff$B$rAw?.$9$k$H!$9VFI<T$,(BURL$B$r%/%j%C%/$9$k$3$H$J$/JQ99$r$9$0$K%l%S%e!<(B
+$B$G$-$kMxE@$,$"$k!%(B
 
 %\subsubsection{Configuring the \hgext{notify} hook}
 \subsubsection{\hgext{notify}$B%U%C%/$N@_Dj(B}
 
-You can set up the \hgext{notify} hook to send one email message per
-incoming changeset, or one per incoming group of changesets (all those
-that arrived in a single pull or push).
+%You can set up the \hgext{notify} hook to send one email message per
+%incoming changeset, or one per incoming group of changesets (all those
+%that arrived in a single pull or push).
+
+\hgext{notify}$B%U%C%/$r@_Dj$7!$E~Ce$7$?%A%'%s%8%;%C%HKh$d!J0lEY$N(Bpull$B$d(B
+push$B$GE~Ce$7$?!K0lO"$N%A%'%s%8%;%C%HKh$K(Bemail$B$rAw?.$9$k$3$H$,$G$-(B
+$B$k!%(B
 \begin{codesample2}
   [hooks]
-  # send one email per group of changes
+  # $B0lO"$NJQ99Kh$K%a!<%k$rAw?.$9$k(B
   changegroup.notify = python:hgext.notify.hook
-  # send one email per change
+  # $BJQ990l$DKh$K%a!<%k$rAw?.$9$k(B
   incoming.notify = python:hgext.notify.hook
 \end{codesample2}
 
-Configuration information for this hook lives in the
-\rcsection{notify} section of a \hgrc\ file.
+%Configuration information for this hook lives in the
+%\rcsection{notify} section of a \hgrc\ file.
+
+$B$3$N%U%C%/$N@_Dj$O(B\hgrc\ $B%U%!%$%k$N(B\rcsection{notify}$B%;%/%7%g%s$K=q$/!%(B
 \begin{itemize}
-\item[\rcitem{notify}{test}] By default, this hook does not send out
-  email at all; instead, it prints the message that it \emph{would}
-  send.  Set this item to \texttt{false} to allow email to be sent.
-  The reason that sending of email is turned off by default is that it
-  takes several tries to configure this extension exactly as you would
-  like, and it would be bad form to spam subscribers with a number of
-  ``broken'' notifications while you debug your configuration.
-\item[\rcitem{notify}{config}] The path to a configuration file that
-  contains subscription information.  This is kept separate from the
-  main \hgrc\ so that you can maintain it in a repository of its own.
-  People can then clone that repository, update their subscriptions,
-  and push the changes back to your server.
-\item[\rcitem{notify}{strip}] The number of leading path separator
-  characters to strip from a repository's path, when deciding whether
-  a repository has subscribers.  For example, if the repositories on
-  your server live in \dirname{/home/hg/repos}, and \hgext{notify} is
-  considering a repository named \dirname{/home/hg/repos/shared/test},
-  setting \rcitem{notify}{strip} to \texttt{4} will cause
-  \hgext{notify} to trim the path it considers down to
-  \dirname{shared/test}, and it will match subscribers against that.
-\item[\rcitem{notify}{template}] The template text to use when sending
-  messages.  This specifies both the contents of the message header
-  and its body.
-\item[\rcitem{notify}{maxdiff}] The maximum number of lines of diff
-  data to append to the end of a message.  If a diff is longer than
-  this, it is truncated.  By default, this is set to 300.  Set this to
-  \texttt{0} to omit diffs from notification emails.
-\item[\rcitem{notify}{sources}] A list of sources of changesets to
-  consider.  This lets you limit \hgext{notify} to only sending out
-  email about changes that remote users pushed into this repository
-  via a server, for example.  See section~\ref{sec:hook:sources} for
-  the sources you can specify here.
+%\item[\rcitem{notify}{test}] By default, this hook does not send out
+%  email at all; instead, it prints the message that it \emph{would}
+%  send.  Set this item to \texttt{false} to allow email to be sent.
+%  The reason that sending of email is turned off by default is that it
+%  takes several tries to configure this extension exactly as you would
+%  like, and it would be bad form to spam subscribers with a number of
+%  ``broken'' notifications while you debug your configuration.
+\item[\rcitem{notify}{test}] $B%G%U%)%k%H$G$O$3$N%U%C%/$O%a!<%k$rA4$/Aw?.$7(B
+	     $B$J$$!%$=$NBe$o$j!$Aw?.$5$l$N$HF1$8FbMF$rI=<($9$k!%$3$N9`L\$r(B
+	     \texttt{false}$B$K@_Dj$9$k$H%a!<%k$,Aw?.$5$l$k!%%G%U%)%k%H$G%a!<(B
+	     $B%kAw?.$,%*%U$K$5$l$F$$$kM}M3$O!$0U?^$9$kDL$j$K$3$N@_Dj$r9T$&(B
+	     $B$?$a$K$O?t2s$N;n9T$,I,MW$J$?$a$G$"$k!%%G%P%C%0Cf$K9VFI<T$K2u(B
+	     $B$l$?DLCN$rAw$k$N$O%9%Q%`$^$,$$$G9%$^$7$/$J$$!%(B
+
+%\item[\rcitem{notify}{config}] The path to a configuration file that
+%  contains subscription information.  This is kept separate from the
+%  main \hgrc\ so that you can maintain it in a repository of its own.
+%  People can then clone that repository, update their subscriptions,
+%  and push the changes back to your server.
+\item[\rcitem{notify}{config}] $B9VFI<T>pJs$r4^$`@_Dj%U%!%$%k$X$N%Q%9!%%a%$(B
+	     $B%s$N(B\hgrc\ $B$HJ,N%$9$k$3$H$G!$%j%]%8%H%jKh$K%j%]%8%H%jFb$G4I(B
+	     $BM}$G$-$k!%6(NO<T$O%j%]%8%H%j$r%/%m!<%s$7!$9VFI<T$r%"%C%W%G!<(B
+	     $B%H$7$FJQ99$r%5!<%P$K(Bpush$B$G$-$k!%(B
+
+%\item[\rcitem{notify}{strip}] The number of leading path separator
+%  characters to strip from a repository's path, when deciding whether
+%  a repository has subscribers.  For example, if the repositories on
+%  your server live in \dirname{/home/hg/repos}, and \hgext{notify} is
+%  considering a repository named \dirname{/home/hg/repos/shared/test},
+%  setting \rcitem{notify}{strip} to \texttt{4} will cause
+%  \hgext{notify} to trim the path it considers down to
+%  \dirname{shared/test}, and it will match subscribers against that.
+\item[\rcitem{notify}{strip}] $B%j%]%8%H%j$K9VFI<T$,$$$k$+$I$&$+H=Dj$9$k:](B
+	     $B$K!$%j%]%8%H%j$N%Q%9$+$i=|5n$9$k@h9TItJ,$r%Q%96h@Z$jJ8;z$G<((B
+	     $B$7$??t!%Nc$($P!$%5!<%P$G%j%]%8%H%j72$,(B
+	     \dirname{/home/hg/repos}$B$KCV$+$l$F$*$j!$(B \hgext{notify}$B$,(B
+	     \dirname{/home/hg/repos/shared/test}$B$H$$$&%j%]%8%H%j$rBP>]$H(B
+	     $B$9$k;~!$(B\rcitem{notify}{strip} $B$r(B \texttt{4}$B$K@_Dj$9$k$H(B
+	     \hgext{notify}$B$O%Q%9$r(B\dirname{shared/test}$B$KC;=L$7!$$3$l$r(B
+	     $BMQ$$$F9VFI<T$N%^%C%A$r9T$&!%(B
+
+%\item[\rcitem{notify}{template}] The template text to use when sending
+%  messages.  This specifies both the contents of the message header
+%  and its body.
+\item[\rcitem{notify}{template}] $B%a%C%;!<%8$rAw?.$9$k;~$K;H$o$l$k%F%-%9(B
+	     $B%H$N%F%s%W%l!<%H!%%a%C%;!<%8$N%X%C%@$H%\%G%#N>J}$r@_Dj$9$k(B
+	     $B$3$H$,$G$-$k!%(B
+
+%\item[\rcitem{notify}{maxdiff}] The maximum number of lines of diff
+%  data to append to the end of a message.  If a diff is longer than
+%  this, it is truncated.  By default, this is set to 300.  Set this to
+%  \texttt{0} to omit diffs from notification emails.
+\item[\rcitem{notify}{maxdiff}] $B%a%C%;!<%8$NKvHx$KE:IU$5$l$k(Bdiff$B%G!<%?$N(B
+	     $B:GBg9T?t!%(Bdiff$B$,$3$NCM$h$jBg$-$$>l9g$O@Z$j5M$a$i$l$k!%%G%U%)(B
+	     $B%k%H$G$O(B300$B9T!%$3$NCM$r(B\texttt{0}$B$K$9$k$3$H$GDLCN(Bemail$B$X$N(B
+	     diff$B$NE:IU$rM^@)$9$k$3$H$,$G$-$k!%(B
+
+%\item[\rcitem{notify}{sources}] A list of sources of changesets to
+%  consider.  This lets you limit \hgext{notify} to only sending out
+%  email about changes that remote users pushed into this repository
+%  via a server, for example.  See section~\ref{sec:hook:sources} for
+%  the sources you can specify here.
+\item[\rcitem{notify}{sources}] $BBP>]%A%'%s%8%;%C%H$N%=!<%9$N%j%9%H!%Nc$((B
+	     $B$P!$$3$N%j%9%H$G%j%b!<%H%f!<%6$,%5!<%P7PM3$G%j%]%8%H%j$X%W%C(B
+	     $B%7%e$7$?JQ99$K4X$7$F$N$_DLCN$r9T$&$h$&$K@)8B$9$k$3$H$,$G$-(B
+	     $B$k!%$3$3$G;XDj$G$-$k%=!<%9$K$D$$$F$O(B\ref{sec:hook:sources}
+	     $B@a$r;2>H$N$3$H!%(B
 \end{itemize}
 
-If you set the \rcitem{web}{baseurl} item in the \rcsection{web}
-section, you can use it in a template; it will be available as
-\texttt{webroot}.
+%If you set the \rcitem{web}{baseurl} item in the \rcsection{web}
+%section, you can use it in a template; it will be available as
+%\texttt{webroot}.
+
+\rcsection{web}$B%;%/%7%g%s$N(B\rcitem{web}{baseurl}$B9`L\$r@_Dj$7$F$$$k$J$i!$(B
+$B$3$l$r(B\texttt{webroot}$B$H$7$F%F%s%W%l!<%HFb$G;H$&$3$H$,$G$-$k!%(B
 
-Here is an example set of \hgext{notify} configuration information.
+%Here is an example set of \hgext{notify} configuration information.
+\hgext{notify}$B@_Dj$NNc$r<($9!%(B
+%\begin{codesample2}
+%  [notify]
+%  # really send email
+%  test = false
+%  # subscriber data lives in the notify repo
+%  config = /home/hg/repos/notify/notify.conf
+%  # repos live in /home/hg/repos on server, so strip 4 "/" chars
+%  strip = 4
+%  template = X-Hg-Repo: \{webroot\}
+%    Subject: \{webroot\}: \{desc|firstline|strip\}
+%    From: \{author\}
+%
+%    changeset \{node|short\} in \{root\}
+%    details: \{baseurl\}\{webroot\}?cmd=changeset;node=\{node|short\}
+%    description:
+%      \{desc|tabindent|strip\}
+%
+%  [web]
+%  baseurl = http://hg.example.com/
+%\end{codesample2}
+
 \begin{codesample2}
   [notify]
-  # really send email
+  # $B<B:]$K%a!<%k$rAw?.$9$k$+(B
   test = false
-  # subscriber data lives in the notify repo
+  # $B9VFI<T%G!<%?$,DLCN%j%]%8%H%jFb$K$"$k(B
   config = /home/hg/repos/notify/notify.conf
-  # repos live in /home/hg/repos on server, so strip 4 "/" chars
+  # $B%j%]%8%H%j72$O%5!<%P$N(B /home/hg/repos $B$K$"$k$N$G(B 4$B$D$N(B "/" $BJ8;z$r%9%H%j%C%W$9$k(B
   strip = 4
   template = X-Hg-Repo: \{webroot\}
     Subject: \{webroot\}: \{desc|firstline|strip\}
@@ -1547,7 +1696,8 @@
   baseurl = http://hg.example.com/
 \end{codesample2}
 
-This will produce a message that looks like the following:
+%This will produce a message that looks like the following:
+$B@8@.$5$l$k%a%C%;!<%8$O<!$N$h$&$K$J$k!'(B
 \begin{codesample2}
   X-Hg-Repo: tests/slave
   Subject: tests/slave: Handle error case when slave has no buffers
@@ -1569,10 +1719,16 @@
 %\subsubsection{Testing and troubleshooting}
 \subsubsection{$B%F%9%H$HLdBj2r7h(B}
 
-Do not forget that by default, the \hgext{notify} extension \emph{will
-  not send any mail} until you explicitly configure it to do so, by
-setting \rcitem{notify}{test} to \texttt{false}.  Until you do that,
-it simply prints the message it \emph{would} send.
+%Do not forget that by default, the \hgext{notify} extension \emph{will
+
+%  not send any mail} until you explicitly configure it to do so, by
+%setting \rcitem{notify}{test} to \texttt{false}.  Until you do that,
+%it simply prints the message it \emph{would} send.
+
+$B%G%U%)%k%H$G$O(B\hgext{notify}$B%(%/%9%F%s%7%g%s$O(B\emph{$B%a!<%k$rAw?.$7$J$$(B}$B$3(B
+$B$H$KN10U$9$k$3$H!%<B:]$KAw?.$5$;$k$?$a$K$OL@<(E*$K(B\rcitem{notify}{test}$B$r(B
+\texttt{false}$B$K@_Dj$7$J$1$l$P$J$i$J$$!%$3$N@_Dj$r$7$J$1$l$P!$Aw?.$9$k$N(B
+$B$HF1$8%a%C%;!<%8$rI=<($9$k$@$1$G$"$k!%(B
 
 %\section{Information for writers of hooks}
 \section{$B%U%C%/:n@=<T$X$N>pJs(B}
@@ -1581,41 +1737,69 @@
 %\subsection{In-process hook execution}
 \subsection{$B%W%m%;%9Fb%U%C%/$N<B9T(B}
 
-An in-process hook is called with arguments of the following form:
+%An in-process hook is called with arguments of the following form:
+$B%W%m%;%9Fb%U%C%/$O<!$N$h$&$J7A<0$N0z?t$rH<$C$F8F$S=P$5$l$k!'(B
 \begin{codesample2}
   def myhook(ui, repo, **kwargs):
       pass
 \end{codesample2}
-The \texttt{ui} parameter is a \pymodclass{mercurial.ui}{ui} object.
-The \texttt{repo} parameter is a
-\pymodclass{mercurial.localrepo}{localrepository} object.  The
-names and values of the \texttt{**kwargs} parameters depend on the
-hook being invoked, with the following common features:
+%The \texttt{ui} parameter is a \pymodclass{mercurial.ui}{ui} object.
+%The \texttt{repo} parameter is a
+%\pymodclass{mercurial.localrepo}{localrepository} object.  The
+%names and values of the \texttt{**kwargs} parameters depend on the
+%hook being invoked, with the following common features:
+\texttt{ui}$B%Q%i%a!<%?$O(B\pymodclass{mercurial.ui}{ui}$B$N%*%V%8%'%/%H$G$"$k!%(B
+\texttt{repo}$B%Q%i%a!<%?$O(B
+\pymodclass{mercurial.localrepo}{localrepository}$B$N%*%V%8%'%/%H$G$"$k!%(B
+\texttt{**kwargs}$B%Q%i%a!<%?$NL>A0$HCM$O!$8F$S=P$5$l$k%U%C%/$K0MB8$7!$<!(B
+$B$N$h$&$J6&DL$7$?FCD'$r;}$D!%(B
+%\begin{itemize}
+%\item If a parameter is named \texttt{node} or
+%  \texttt{parent\emph{N}}, it will contain a hexadecimal changeset ID.
+%  The empty string is used to represent ``null changeset ID'' instead
+%  of a string of zeroes.
+%\item If a parameter is named \texttt{url}, it will contain the URL of
+%  a remote repository, if that can be determined.
+%\item Boolean-valued parameters are represented as Python
+%  \texttt{bool} objects.
+%\end{itemize}
 \begin{itemize}
-\item If a parameter is named \texttt{node} or
-  \texttt{parent\emph{N}}, it will contain a hexadecimal changeset ID.
-  The empty string is used to represent ``null changeset ID'' instead
-  of a string of zeroes.
-\item If a parameter is named \texttt{url}, it will contain the URL of
-  a remote repository, if that can be determined.
-\item Boolean-valued parameters are represented as Python
-  \texttt{bool} objects.
+\item $B%Q%i%a!<%?$,(B\texttt{node}$B$^$?$O(B\texttt{parent\emph{N}}$B$HL>IU$1$i$l(B
+      $B$?>l9g!$(B16$B?J?t$N%A%'%s%8%;%C%H(BID$B$r;}$D!%(B ``$B%L%k%A%'%s%8%;%C%H(BID''$B$r(B
+      $BI=$9$?$a$K(B0$B$G$O$J$/6u$NJ8;zNs$,MQ$$$i$l$k!%(B
+\item $B%Q%i%a!<%?$,(B\texttt{url}$B$HL>IU$1$i$l$?>l9g!$%j%b!<%H%j%]%8%H%j$,FC(B
+      $BDj$5$l$k$J$i$P$=$N(BURL$B$r;}$D!%(B
+\item $B%V!<%kCM$r;}$D%Q%i%a!<%?$O(BPython$B$N(B\texttt{bool}$B%*%V%8%'%/%H$H$7$F(B
+      $BI=8=$5$l$k!%(B
 \end{itemize}
 
-An in-process hook is called without a change to the process's working
-directory (unlike external hooks, which are run in the root of the
-repository).  It must not change the process's working directory, or
-it will cause any calls it makes into the Mercurial API to fail.
+%An in-process hook is called without a change to the process's working
+%directory (unlike external hooks, which are run in the root of the
+%repository).  It must not change the process's working directory, or
+%it will cause any calls it makes into the Mercurial API to fail.
+
+$B%W%m%;%9Fb%U%C%/$O!$%j%]%8%H%j$N%k!<%H$G<B9T$5$l$k30It%U%C%/$H0[$J$j%W%m(B
+$B%;%9$N%o!<%-%s%0%G%#%l%/%H%j$NJQ99$J$7$K8F$S=P$5$l$k!%%W%m%;%9Fb%U%C%/$O(B
+$B%W%m%;%9%o!<%-%s%0%G%#%l%/%H%j$rJQ99$7$F$O$J$i$J$$!%$5$b$J$1$l(B
+$B$P!$(BMercurial API$B$X$N8F$S=P$7$OA4$F<:GT$9$k!%(B
 
-If a hook returns a boolean ``false'' value, it is considered to have
-succeeded.  If it returns a boolean ``true'' value or raises an
-exception, it is considered to have failed.  A useful way to think of
-the calling convention is ``tell me if you fail''.
+%If a hook returns a boolean ``false'' value, it is considered to have
+%succeeded.  If it returns a boolean ``true'' value or raises an
+%exception, it is considered to have failed.  A useful way to think of
+%the calling convention is ``tell me if you fail''.
+
+$B%U%C%/$,%V!<%kCM(B``false''$B$rJV$7$?>l9g!$%U%C%/$N<B9T$O@.8y$7$?$H8+$J$5$l(B
+$B$k!%%V!<%kCM(B``true''$B$rJV$7$?>l9g$*$h$SNc30$rH/@8$5$;$?>l9g$O<:GT$7$?$H8+(B
+$B$J$5$l$k!%8F$S=P$74{Ls$O(B ``$B<:GT$7$?;~$O65$($k(B''$B$H3P$($k$H$h$$!%(B
 
-Note that changeset IDs are passed into Python hooks as hexadecimal
-strings, not the binary hashes that Mercurial's APIs normally use.  To
-convert a hash from hex to binary, use the
-\pymodfunc{mercurial.node}{bin} function.
+%Note that changeset IDs are passed into Python hooks as hexadecimal
+%strings, not the binary hashes that Mercurial's APIs normally use.  To
+%convert a hash from hex to binary, use the
+%\pymodfunc{mercurial.node}{bin} function.
+
+Python$B%U%C%/$KEO$5$l$k%A%'%s%8%;%C%H(BID$B$O!$(BMercurial API$B$,DL>oMQ$$$k%P%$%J(B
+$B%j%O%C%7%eCM$G$O$J$/(B16$B?J?tJ8;zNs$G$"$k$3$H$KCm0U!%%O%C%7%eCM$r(B16$B?J?tJ8;z(B
+$BNs$+$i%P%$%J%j$KJQ49$9$k$K$O(B\pymodfunc{mercurial.node}{bin}$B4X?t$rMQ$$$k!%(B
 
 %\subsection{External hook execution}
 \subsection{$B%U%C%/$N30It<B9T(B}
@@ -1841,76 +2025,131 @@
 \subsection{\hook{precommit}---$B%A%'%s%8%;%C%H$r%3%_%C%H$9$kA0(B}
 \label{sec:hook:precommit}
 
-This hook is run before Mercurial begins to commit a new changeset.
-It is run before Mercurial has any of the metadata for the commit,
-such as the files to be committed, the commit message, or the commit
-date.
+%This hook is run before Mercurial begins to commit a new changeset.
+%It is run before Mercurial has any of the metadata for the commit,
+%such as the files to be committed, the commit message, or the commit
+%date.
+
+$B$3$N%U%C%/$O(BMercurial$B$,?7$7$$%A%'%s%8%;%C%H$r%3%_%C%H$9$kA0$K<B9T$5$l$k!%(B
+$B<B9T$O(BMercurial$B$,%3%_%C%H$5$l$k%U%!%$%kL>!$%3%_%C%H%a%C%;!<%8!$%3%_%C%HF|(B
+$B;~$N$h$&$J%3%_%C%H$N$?$a$N%a%?%G!<%?$r;}$DA0$G$"$k!%(B
 
-One use for this hook is to disable the ability to commit new
-changesets, while still allowing incoming changesets.  Another is to
-run a build or test, and only allow the commit to begin if the build
-or test succeeds.
+%One use for this hook is to disable the ability to commit new
+%changesets, while still allowing incoming changesets.  Another is to
+%run a build or test, and only allow the commit to begin if the build
+%or test succeeds.
+
+$B$3$N%U%C%/$r;H$C$F!$30It$+$i$N%A%'%s%8%;%C%H$N<h$j9~$_$r5v2D$9$k0lJ}$G!$(B
+$B?7$7$$%A%'%s%8%;%C%H$r%3%_%C%H$G$-$J$$$h$&$K$9$k$3$H$b$G$-$k!%$^$?!$%S%k(B
+$B%I$d%F%9%H$r<B9T$7$?$j!$$=$l$,@.8y$7$?;~$N$_%3%_%C%H$r9T$&$h$&$K$9$k$3$H(B
+$B$b$G$-$k!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
+%\begin{itemize}
+%\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
+%  parent of the working directory.
+%\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
+%  parent of the working directory.
+%\end{itemize}
 \begin{itemize}
-\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
-  parent of the working directory.
-\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
-  parent of the working directory.
+\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$N(B1$B$DL\$N(B
+	     $B?F$N%A%'%s%8%;%C%H(BID$B!%(B
+\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$N(B2$B$DL\$N(B
+	     $B?F$N%A%'%s%8%;%C%H(BID$B!%(B
 \end{itemize}
-If the commit proceeds, the parents of the working directory will
-become the parents of the new changeset.
+%If the commit proceeds, the parents of the working directory will
+%become the parents of the new changeset.
+
+$B%3%_%C%H$,?J9T$9$k$H%o!<%-%s%0%G%#%l%/%H%j$N?F$O?7$7$$%A%'%s%8%;%C%H$N?F(B
+$B$H$J$k!%(B
 
-See also: \hook{commit} (section~\ref{sec:hook:commit}),
-\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit})
+%See also: \hook{commit} (section~\ref{sec:hook:commit}),
+%\hook{pretxncommit} (section~\ref{sec:hook:pretxncommit})
+
+$B;29M!'(B\hook{commit} (\ref{sec:hook:commit}$B@a(B)$B!$(B\hook{pretxncommit}
+(\ref{sec:hook:pretxncommit}$B@a(B)
 
 %\subsection{\hook{preoutgoing}---before starting to propagate
 %changesets}
 \subsection{\hook{preoutgoing}---$B%A%'%s%8%;%C%H$rGH5Z$5$;$kA0$K(B}
 \label{sec:hook:preoutgoing}
 
-This hook is invoked before Mercurial knows the identities of the
-changesets to be transmitted.
+%This hook is invoked before Mercurial knows the identities of the
+%changesets to be transmitted.
+
+$B$3$N%U%C%/$O(BMercurial$B$,Aw?.$9$k%A%'%s%8%;%C%H$r<1JL$9$kA0$K<B9T$5$l$k!%(B
+
+%One use for this hook is to prevent changes from being transmitted to
+%another repository.
+
+$B$3$N%U%C%/$rMQ$$$F!$B>$N%j%]%8%H%j$XJQ99$rAw?.$7$J$$$h$&$K$9$k$3$H$b$G$-(B
+$B$k!%(B
 
-One use for this hook is to prevent changes from being transmitted to
-another repository.
-
-Parameters to this hook:
+%Parameters to this hook:
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
+%\begin{itemize}
+%\item[\texttt{source}] A string.  The source of the operation that is
+%  attempting to obtain changes from this repository (see
+%  section~\ref{sec:hook:sources}).  See the documentation for the
+%  \texttt{source} parameter to the \hook{outgoing} hook, in
+%  section~\ref{sec:hook:outgoing}, for possible values of this
+%  parameter.
+%\item[\texttt{url}] A URL.  The location of the remote repository, if
+%  known.  See section~\ref{sec:hook:url} for more information.
+%\end{itemize}
 \begin{itemize}
-\item[\texttt{source}] A string.  The source of the operation that is
-  attempting to obtain changes from this repository (see
-  section~\ref{sec:hook:sources}).  See the documentation for the
-  \texttt{source} parameter to the \hook{outgoing} hook, in
-  section~\ref{sec:hook:outgoing}, for possible values of this
-  parameter.
-\item[\texttt{url}] A URL.  The location of the remote repository, if
-  known.  See section~\ref{sec:hook:url} for more information.
+\item[\texttt{source}] $BJ8;zNs!%$3$N%j%]%8%H%j$+$iJQ99$r<hF@$7$h$&$H$9$kF0(B
+	     $B:n$N%=!<%9!J(B\ref{sec:hook:sources}$B$r;2>H!K!%$3$N%Q%i!<%a%?$,(B
+	     $B<h$jF@$kCM$K$D$$$F$O!$(B \ref{sec:hook:outgoing}$B@a$N(B
+	     \hook{outgoing}$B%U%C%/$X$N(B\texttt{source}$B%Q%i%a!<%?$N9`L\$r;2(B
+	     $B>H$N$3$H!%(B
+\item[\texttt{url}] URL$B!%%j%b!<%H%j%]%8%H%j$,FCDj$G$-$k>l9g$O$=$N%"%I%l(B
+	     $B%9!%>\:Y$K$D$$$F$O(B\ref{sec:hook:url}$B$r;2>H$N$3$H!%(B
 \end{itemize}
 
-See also: \hook{outgoing} (section~\ref{sec:hook:outgoing})
+%See also: \hook{outgoing} (section~\ref{sec:hook:outgoing})
+$B;29M!'(B \hook{outgoing} (\ref{sec:hook:outgoing}$B@a(B)
 
 %\subsection{\hook{pretag}---before tagging a changeset}
 \subsection{\hook{pretag}---$B%A%'%s%8%;%C%H$K%?%0$r$D$1$kA0$K(B}
 \label{sec:hook:pretag}
 
-This controlling hook is run before a tag is created.  If the hook
-succeeds, creation of the tag proceeds.  If the hook fails, the tag is
-not created.
+%This controlling hook is run before a tag is created.  If the hook
+%succeeds, creation of the tag proceeds.  If the hook fails, the tag is
+%not created.
+
+$B$3$N@)8f%U%C%/$O%?%0$,:n@.$5$l$kA0$K<B9T$5$l$k!%%U%C%/$N<B9T$,@.8y$7$?>l(B
+$B9g$O%?%0$,:n@.$5$l$k!%%U%C%/$N<B9T$,<:GT$7$?>l9g$O%?%0$O:n@.$5$l$J$$!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+$B$3$N%U%C%/$X$N%Q%i%a!<%?(B
+%\begin{itemize}
+%\item[\texttt{local}] A boolean.  Whether the tag is local to this
+%  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
+%  managed by Mercurial (stored in \sfilename{.hgtags}).
+%\item[\texttt{node}] A changeset ID.  The ID of the changeset to be tagged.
+%\item[\texttt{tag}] A string.  The name of the tag to be created.
+%\end{itemize}
+
 \begin{itemize}
-\item[\texttt{local}] A boolean.  Whether the tag is local to this
-  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
-  managed by Mercurial (stored in \sfilename{.hgtags}).
-\item[\texttt{node}] A changeset ID.  The ID of the changeset to be tagged.
-\item[\texttt{tag}] A string.  The name of the tag to be created.
+\item[\texttt{local}] $B%V!<%kCM!%?7$7$$%?%0$,%j%]%8%H%j%m!<%+%k$J$b$N(B
+	     (\sfilename{.hg/localtags}$B$KJ]B8$5$l$k(B)$B$+(BMercurial$B$K4IM}(B
+	     $B$5$l$k$b$N(B(\sfilename{.hgtags}$B$KJ]B8$5$l$k(B)$B$+$r<($9!%(B
+\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!%%?%0IU$1$5$l$k%A%'%s%8%;%C%H$N(BID.
+\item[\texttt{tag}] $BJ8;zNs!%@8@.$5$l$?%?%0$NL>A0!%(B
 \end{itemize}
 
-If the tag to be created is revision-controlled, the \hook{precommit}
-and \hook{pretxncommit} hooks (sections~\ref{sec:hook:commit}
-and~\ref{sec:hook:pretxncommit}) will also be run.
+%If the tag to be created is revision-controlled, the \hook{precommit}
+%and \hook{pretxncommit} hooks (sections~\ref{sec:hook:commit}
+%and~\ref{sec:hook:pretxncommit}) will also be run.
 
-See also: \hook{tag} (section~\ref{sec:hook:tag})
+$B@8@.$5$l$?%?%0$,%j%S%8%g%s%3%s%H%m!<%k$5$l$F$$$k>l9g!$(B\hook{precommit}$B%U%C(B
+$B%/$H(B\hook{pretxncommit}$B%U%C%/(B(\ref{sec:hook:commit}$B@a$*$h$S(B
+\ref{sec:hook:pretxncommit})$B@a(B)$B$NN>J}$,<B9T$5$l$k!%(B
+
+%See also: \hook{tag} (section~\ref{sec:hook:tag})
+$B;29M!'(B \hook{tag} (\ref{sec:hook:tag}$B@a(B)
 
 %\subsection{\hook{pretxnchangegroup}---before completing addition of
 %remote changesets}
@@ -1918,41 +2157,75 @@
   $BN;$9$kA0$K(B}
 \label{sec:hook:pretxnchangegroup}
 
-This controlling hook is run before a transaction---that manages the
-addition of a group of new changesets from outside the
-repository---completes.  If the hook succeeds, the transaction
-completes, and all of the changesets become permanent within this
-repository.  If the hook fails, the transaction is rolled back, and
-the data for the changesets is erased.
+%This controlling hook is run before a transaction---that manages the
+%addition of a group of new changesets from outside the
+%repository---completes.  If the hook succeeds, the transaction
+%completes, and all of the changesets become permanent within this
+%repository.  If the hook fails, the transaction is rolled back, and
+%the data for the changesets is erased.
+
+$B$3$N@)8f%U%C%/$O!$30It$+$i?7$7$$%A%'%s%8%;%C%H$rDI2C$9$k%H%i%s%6%/%7%g%s(B
+$B$,40N;$9$kA0$K<B9T$5$l$k!%%U%C%/$N<B9T$,@.8y$7$?>l9g!$%H%i%s%6%/%7%g%s$O(B
+$B40N;$7!$A4$F$N%A%'%s%8%;%C%H$O%j%]%8%H%jFb$G1JB3E*$K$J$k!%%U%C%/$N<B9T$,(B
+$B<:GT$7$?>l9g!$%H%i%s%6%/%7%g%s$O%m!<%k%P%C%/$5$l!$%A%'%s%8%;%C%H$N%G!<%?(B
+$B$O>C5n$5$l$k!%(B
 
-This hook can access the metadata associated with the almost-added
-changesets, but it should not do anything permanent with this data.
-It must also not modify the working directory.
+%This hook can access the metadata associated with the almost-added
+%changesets, but it should not do anything permanent with this data.
+%It must also not modify the working directory.
+
+$B$3$N%U%C%/$O%H%i%s%6%/%7%g%sCf$N%A%'%s%8%;%C%H$N%a%?%G!<%?$K%"%/%;%9$9$k(B
+$B$3$H$,$G$-$k$,!$$3$N%G!<%?$r;H$C$F1JB3E*$J$3$H$O0l@Z$7$F$O$J$i$J$$!%%o!<(B
+$B%-%s%0%G%#%l%/%H%j$NJQ99$b$7$F$O$J$i$J$$!%(B
+
+%While this hook is running, if other Mercurial processes access this
+%repository, they will be able to see the almost-added changesets as if
+%they are permanent.  This may lead to race conditions if you do not
+%take steps to avoid them.
+
+$B$3$N%U%C%/$N<B9TCf!$B>$N(BMercurial$B%W%m%;%9$,%j%]%8%H%j$K%"%/%;%9$9$k$H!$%H(B
+$B%i%s%6%/%7%g%sCf$N%A%'%s%8%;%C%H$r1JB3E*$J$b$N$H8+$J$92DG=@-$,$"$k!%E,@Z(B
+$B$J2sHr:v$r9V$8$J$1$l$P!$$3$l$,6%9g>uBV$r0z$-5/$3$92DG=@-$,$"$k!%(B
 
-While this hook is running, if other Mercurial processes access this
-repository, they will be able to see the almost-added changesets as if
-they are permanent.  This may lead to race conditions if you do not
-take steps to avoid them.
+%This hook can be used to automatically vet a group of changesets.  If
+%the hook fails, all of the changesets are ``rejected'' when the
+%transaction rolls back.
 
-This hook can be used to automatically vet a group of changesets.  If
-the hook fails, all of the changesets are ``rejected'' when the
-transaction rolls back.
+$B$3$N%U%C%/$O0lO"$N%A%'%s%8%;%C%H$r<+F0E*$KGS=|$9$k$?$a$K;H$&$3$H$b$G$-(B
+$B$k!%$3$N%U%C%/$N<B9T$,<:GT$7$?>l9g!$%H%i%s%6%/%7%g%s$,%m!<%k%P%C%/$5$l$k(B
+$B;~$K%A%'%s%8%;%C%HA4BN$,%j%8%'%/%H$5$l$k!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+%\begin{itemize}
+%\item[\texttt{node}] A changeset ID.  The changeset ID of the first
+%  changeset in the group that was added.  All changesets between this
+%  and \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by
+%  a single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}.
+%\item[\texttt{source}] A string.  The source of these changes.  See
+%  section~\ref{sec:hook:sources} for details.
+%\item[\texttt{url}] A URL.  The location of the remote repository, if
+%  known.  See section~\ref{sec:hook:url} for more information.
+%\end{itemize}
+
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
 \begin{itemize}
-\item[\texttt{node}] A changeset ID.  The changeset ID of the first
-  changeset in the group that was added.  All changesets between this
-  and \index{tags!\texttt{tip}}\texttt{tip}, inclusive, were added by
-  a single \hgcmd{pull}, \hgcmd{push} or \hgcmd{unbundle}.
-\item[\texttt{source}] A string.  The source of these changes.  See
-  section~\ref{sec:hook:sources} for details.
-\item[\texttt{url}] A URL.  The location of the remote repository, if
-  known.  See section~\ref{sec:hook:url} for more information.
+\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!%DI2C$5$l$k0lO"$N%A%'%s%8%;%C%H$N(B
+	     $B$&$A!$:G=i$N%A%'%s%8%;%C%H(BID$B!%$3$l$H(B
+	     \index{tags!\texttt{tip}}\texttt{tip}$B$N4V$NA4$F$N%A%'%s%8%;%C(B
+	     $B%H$,0lEY$N(B\hgcmd{pull}, \hgcmd{push} $B$^$?$O(B
+\item[\texttt{source}] $BJ8;zNs!%$3$l$i$NJQ99$N%=!<%9!%>\:Y$K$D$$$F$O(B
+	     \ref{sec:hook:sources}$B@a$r;2>H$N$3$H!%(B
+\item[\texttt{url}] URL$B!%4{CN$N%j%b!<%H%j%]%8%H%j$N>l=j!%>\:Y$K$D$$$F$O(B
+	     \ref{sec:hook:url}$B@a$r;2>H$N$3$H!%(B
 \end{itemize}
 
-See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}),
-\hook{incoming} (section~\ref{sec:hook:incoming}),
-\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup})
+%See also: \hook{changegroup} (section~\ref{sec:hook:changegroup}),
+%\hook{incoming} (section~\ref{sec:hook:incoming}),
+%\hook{prechangegroup} (section~\ref{sec:hook:prechangegroup})
+
+$B;29M!'(B \hook{changegroup} (\ref{sec:hook:changegroup}$B@a(B),
+\hook{incoming} (\ref{sec:hook:incoming}$B@a(B),
+\hook{prechangegroup} (\ref{sec:hook:prechangegroup}$B@a(B)
 
 %\subsection{\hook{pretxncommit}---before completing commit of new
 %changeset}
@@ -1960,32 +2233,56 @@
   $B$kA0$K(B}
 \label{sec:hook:pretxncommit}
 
-This controlling hook is run before a transaction---that manages a new
-commit---completes.  If the hook succeeds, the transaction completes
-and the changeset becomes permanent within this repository.  If the
-hook fails, the transaction is rolled back, and the commit data is
-erased.
+%This controlling hook is run before a transaction---that manages a new
+%commit---completes.  If the hook succeeds, the transaction completes
+%and the changeset becomes permanent within this repository.  If the
+%hook fails, the transaction is rolled back, and the commit data is
+%erased.
 
-This hook can access the metadata associated with the almost-new
-changeset, but it should not do anything permanent with this data.  It
-must also not modify the working directory.
+$B$3$N@)8f%U%C%/$O?7$?$J%3%_%C%H$N$?$a$N%H%i%s%6%/%7%g%s$N40N;A0$K<B9T$5$l(B
+$B$k!%$3$N%U%C%/$N<B9T$,@.8y$7$?>l9g!$%H%i%s%6%/%7%g%s$,40N;$5$l!$%A%'%s%8(B
+$B%;%C%H$O%j%]%8%H%jFb$G1JB3E*$K$J$k!%%U%C%/$N<B9T$,<:GT$7$?>l9g$O%H%i%s%6(B
+$B%/%7%g%s$O%m!<%k%P%C%/$5$l!$%3%_%C%H%G!<%?$O>C5n$5$l$k!%(B
+
+%This hook can access the metadata associated with the almost-new
+%changeset, but it should not do anything permanent with this data.  It
+%must also not modify the working directory.
+
+$B$3$N%U%C%/$O%H%i%s%6%/%7%g%sCf$N%A%'%s%8%;%C%H$N%a%?%G!<%?$K%"%/%;%9$9$k(B
+$B$3$H$,$G$-$k$,!$$3$N%G!<%?$r;H$C$F1JB3E*$J$3$H$O0l@Z$7$F$O$J$i$J$$!%%o!<(B
+$B%-%s%0%G%#%l%/%H%j$NJQ99$b$7$F$O$J$i$J$$!%(B
 
-While this hook is running, if other Mercurial processes access this
-repository, they will be able to see the almost-new changeset as if it
-is permanent.  This may lead to race conditions if you do not take
-steps to avoid them.
+%While this hook is running, if other Mercurial processes access this
+%repository, they will be able to see the almost-new changeset as if it
+%is permanent.  This may lead to race conditions if you do not take
+%steps to avoid them.
+
+$B$3$N%U%C%/$N<B9TCf!$B>$N(BMercurial$B%W%m%;%9$,%j%]%8%H%j$K%"%/%;%9$9$k$H!$%H(B
+$B%i%s%6%/%7%g%sCf$N%A%'%s%8%;%C%H$r1JB3E*$J$b$N$H8+$J$92DG=@-$,$"$k!%E,@Z(B
+$B$J2sHr:v$r9V$8$J$1$l$P!$$3$l$,6%9g>uBV$r0z$-5/$3$92DG=@-$,$"$k!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+%\begin{itemize}
+%\item[\texttt{node}] A changeset ID.  The changeset ID of the newly
+%  committed changeset.
+%\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
+%  parent of the newly committed changeset.
+%\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
+%  parent of the newly committed changeset.
+%\end{itemize}
+
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
 \begin{itemize}
-\item[\texttt{node}] A changeset ID.  The changeset ID of the newly
-  committed changeset.
-\item[\texttt{parent1}] A changeset ID.  The changeset ID of the first
-  parent of the newly committed changeset.
-\item[\texttt{parent2}] A changeset ID.  The changeset ID of the second
-  parent of the newly committed changeset.
+\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!%?7$?$K$38+$s$H$5$l$?%A%'%s%8%;%C(B
+	     $B%H$N(BID$B!%(B
+\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!%?7$?$K%3%_%C%H$5$l$?%A%'%s%8%;%C(B
+	     $B%H$N(B1$B$DL\$N?F$N%A%'%s%8%;%C%H(BID$B!%(B
+\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!%?7$?$K%3%_%C%H$5$l$?%A%'%s%8%;%C(B
+	     $B%H$N(B2$B$DL\$N?F$N%A%'%s%8%;%C%H(BID$B!%(B
 \end{itemize}
 
-See also: \hook{precommit} (section~\ref{sec:hook:precommit})
+%See also: \hook{precommit} (section~\ref{sec:hook:precommit})
+$B;29M!'(B\hook{precommit} (\ref{sec:hook:precommit}$B@a(B)
 
 %\subsection{\hook{preupdate}---before updating or merging working
 %directory}
@@ -1993,44 +2290,77 @@
   $B$O%^!<%8$NA0$K(B}
 \label{sec:hook:preupdate}
 
-This controlling hook is run before an update or merge of the working
-directory begins.  It is run only if Mercurial's normal pre-update
-checks determine that the update or merge can proceed.  If the hook
-succeeds, the update or merge may proceed; if it fails, the update or
-merge does not start.
+%This controlling hook is run before an update or merge of the working
+%directory begins.  It is run only if Mercurial's normal pre-update
+%checks determine that the update or merge can proceed.  If the hook
+%succeeds, the update or merge may proceed; if it fails, the update or
+%merge does not start.
+
+$B$3$N@)8f%U%C%/$O%o!<%-%s%0%G%#%l%/%H%j$N%"%C%W%G!<%H$^$?$O%^!<%8$,;O$^$k(B
+$BA0$K<B9T$5$l$k!%(B Mercurial$B$NDL>o$N%"%C%W%G!<%HA0%A%'%C%/$,%"%C%W%G!<%H$^(B
+$B$?$O%^!<%8$r<B9T$G$-$k$HH=CG$7$?>l9g$K$N$_<B9T$5$l$k!%%U%C%/$N<B9T$,@.8y(B
+$B$7$?>l9g!$%"%C%W%G!<%H$^$?$O%^!<%8$,9T$o$l$k!%<:GT$7$?>l9g$O%"%C%W%G!<%H(B
+$B$^$?$O%^!<%8$O3+;O$5$l$J$$!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+%\begin{itemize}
+%\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
+%  working directory is to be updated to.  If the working directory is
+%  being merged, it will not change this parent.
+%\item[\texttt{parent2}] A changeset ID.  Only set if the working
+%  directory is being merged.  The ID of the revision that the working
+%  directory is being merged with.
+%\end{itemize}
+
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
 \begin{itemize}
-\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
-  working directory is to be updated to.  If the working directory is
-  being merged, it will not change this parent.
-\item[\texttt{parent2}] A changeset ID.  Only set if the working
-  directory is being merged.  The ID of the revision that the working
-  directory is being merged with.
+\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$,%"%C%W(B
+	     $B%G!<%H$5$l$k?F(BID.$B%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8$5$l$k>l9g!$(B
+	     $B?F(BID$B$OJQ99$5$l$J$$!%(B
+\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8(B
+	     $B$5$l$k>l9g$N$_%;%C%H$5$l$k!%%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8(B
+	     $B$5$l$k%j%S%8%g%s(BID$B!%(B
 \end{itemize}
 
-See also: \hook{update} (section~\ref{sec:hook:update})
+%See also: \hook{update} (section~\ref{sec:hook:update})
+
+$B;29M!'(B \hook{update} (\ref{sec:hook:update}$B@a(B)
 
 %\subsection{\hook{tag}---after tagging a changeset}
 \subsection{\hook{tag}---$B%A%'%s%8%;%C%H$K%?%0IU$1$7$?8e$K(B}
 \label{sec:hook:tag}
 
-This hook is run after a tag has been created.
+%This hook is run after a tag has been created.
+$B$3$N%U%C%/$O%?%0$,@8@.$5$l$?8e$K<B9T$5$l$k!%(B
 
-Parameters to this hook:
+%Parameters to this hook:
+%\begin{itemize}
+%\item[\texttt{local}] A boolean.  Whether the new tag is local to this
+%  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
+%  managed by Mercurial (stored in \sfilename{.hgtags}).
+%\item[\texttt{node}] A changeset ID.  The ID of the changeset that was
+%  tagged.
+%\item[\texttt{tag}] A string.  The name of the tag that was created.
+%\end{itemize}
+
+$B$3$N%U%C%/$X$N%Q%i%a!<%?!'(B
 \begin{itemize}
-\item[\texttt{local}] A boolean.  Whether the new tag is local to this
-  repository instance (i.e.~stored in \sfilename{.hg/localtags}) or
-  managed by Mercurial (stored in \sfilename{.hgtags}).
-\item[\texttt{node}] A changeset ID.  The ID of the changeset that was
-  tagged.
-\item[\texttt{tag}] A string.  The name of the tag that was created.
+\item[\texttt{local}] $B%V!<%kCM!%?7$7$$%?%0$,%j%]%8%H%j%m!<%+%k$J$b$N(B
+	     (\sfilename{.hg/localtags}$B$KJ]B8$5$l$k(B)$B$+(BMercurial$B$K4IM}(B
+	     $B$5$l$k$b$N(B(\sfilename{.hgtags}$B$KJ]B8$5$l$k(B)$B$+$r<($9!%(B
+\item[\texttt{node}] $B%A%'%s%8%;%C%H(BID$B!%%?%0IU$1$5$l$k%A%'%s%8%;%C%H$N(BID.
+\item[\texttt{tag}] $BJ8;zNs!%@8@.$5$l$?%?%0$NL>A0!%(B
 \end{itemize}
 
-If the created tag is revision-controlled, the \hook{commit} hook
-(section~\ref{sec:hook:commit}) is run before this hook.
+%If the created tag is revision-controlled, the \hook{commit} hook
+%(section~\ref{sec:hook:commit}) is run before this hook.
 
-See also: \hook{pretag} (section~\ref{sec:hook:pretag})
+$B@8@.$5$l$?%?%0$,%j%S%8%g%s%3%s%H%m!<%k$5$l$F$$$k>l9g!$(B\hook{commit}$B%U%C(B
+$B%/(B(\ref{sec:hook:commit}$B@a(B)$B$O$3$N%U%C%/$NA0$K<B9T$5$l$k!%(B
+
+%See also: \hook{pretag} (section~\ref{sec:hook:pretag})
+
+$B;29M!'(B \hook{pretag} (\ref{sec:hook:pretag}$B@a(B)
 
 %\subsection{\hook{update}---after updating or merging working
 %directory}
@@ -2038,23 +2368,40 @@
   $B8e$K(B}
 \label{sec:hook:update}
 
-This hook is run after an update or merge of the working directory
-completes.  Since a merge can fail (if the external \command{hgmerge}
-command fails to resolve conflicts in a file), this hook communicates
-whether the update or merge completed cleanly.
+%This hook is run after an update or merge of the working directory
+%completes.  Since a merge can fail (if the external \command{hgmerge}
+%command fails to resolve conflicts in a file), this hook communicates
+%whether the update or merge completed cleanly.
+
+$B$3$N%U%C%/$O%o!<%-%s%0%G%#%l%/%H%j$N%"%C%W%G!<%H$^$?$O%^!<%8$,40N;$7$?8e(B
+$B$K<B9T$5$l$k!%%^!<%8$O<:GT$9$k$3$H$b$"$k!J30It$N(B\command{hgmerge}$B%3%^%s%I(B
+$B$O%U%!%$%kFb$N%3%s%U%j%/%H$r2r7h$G$-$J$$$3$H$,$"$k!K$N$G!$$3$N%U%C%/$O%"%C(B
+$B%W%G!<%H$^$?$O%^!<%8$,@5>o$K40N;$7$?$+$I$&$+$rLd$$9g$o$;$k!%(B
+
+%\begin{itemize}
+%\item[\texttt{error}] A boolean.  Indicates whether the update or
+%  merge completed successfully.
+%\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
+%  working directory was updated to.  If the working directory was
+%  merged, it will not have changed this parent.
+%\item[\texttt{parent2}] A changeset ID.  Only set if the working
+%  directory was merged.  The ID of the revision that the working
+%  directory was merged with.
+%\end{itemize}
 
 \begin{itemize}
-\item[\texttt{error}] A boolean.  Indicates whether the update or
-  merge completed successfully.
-\item[\texttt{parent1}] A changeset ID.  The ID of the parent that the
-  working directory was updated to.  If the working directory was
-  merged, it will not have changed this parent.
-\item[\texttt{parent2}] A changeset ID.  Only set if the working
-  directory was merged.  The ID of the revision that the working
-  directory was merged with.
+\item[\texttt{error}] $B%V!<%kCM!%%"%C%W%G!<%H$^$?$O%^!<%8$,@5>o$K40N;$7$?(B
+	     $B$+$I$&$+$r<($9!%(B
+\item[\texttt{parent1}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$,%"%C%W(B
+	     $B%G!<%H$5$l$k?F(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8$5$l$k>l9g!$?F(B
+	     ID$B$OJQ2=$7$J$$!%(Bxxx
+\item[\texttt{parent2}] $B%A%'%s%8%;%C%H(BID$B!%%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8(B
+	     $B$5$l$k;~$N$_%;%C%H$5$l$k!%%o!<%-%s%0%G%#%l%/%H%j$,%^!<%8$5$l(B
+	     $B$k%j%S%8%g%s(BID$B!%(B
 \end{itemize}
 
-See also: \hook{preupdate} (section~\ref{sec:hook:preupdate})
+%See also: \hook{preupdate} (section~\ref{sec:hook:preupdate})
+$B;29M(B: \hook{preupdate} (\ref{sec:hook:preupdate}$B@a(B)
 
 %%% Local Variables:
 %%% mode: yatex
--- a/ja/todo.txt	Sat Apr 25 00:04:19 2009 +0900
+++ b/ja/todo.txt	Mon Apr 27 17:31:54 2009 +0900
@@ -7,9 +7,9 @@
 filenames.tex	100%
 hg_id.tex	noneed
 hgext.tex	100%
-hook.tex	50%
+hook.tex	80%
 intro.tex	100%
-license.tex
+license.tex	-
 mq-collab.tex   100%
 mq-ref.tex	100%
 mq.tex		100%