# HG changeset patch # User Yoshiki Yazawa # Date 1219141948 -32400 # Node ID 89a903605c7445e354fc617b4ac402816d339783 # Parent 4cbbb68d7840d477651687a0511afa366c95c26b more mq-collab.tex diff -r 4cbbb68d7840 -r 89a903605c74 ja/mq-collab.tex --- a/ja/mq-collab.tex Tue Aug 19 16:06:16 2008 +0900 +++ b/ja/mq-collab.tex Tue Aug 19 19:32:28 2008 +0900 @@ -196,103 +196,176 @@ %\section{Controlling the guards on a patch} \section{パッチ内のガードを操作する} -The \hgxcmd{mq}{qguard} command lets you determine which guards should -apply to a patch, or display the guards that are already in effect. -Without any arguments, it displays the guards on the current topmost -patch. +%The \hgxcmd{mq}{qguard} command lets you determine which guards should +%apply to a patch, or display the guards that are already in effect. +%Without any arguments, it displays the guards on the current topmost +%patch. +%\interaction{mq.guards.qguard} +%To set a positive guard on a patch, prefix the name of the guard with +%a ``\texttt{+}''. +%\interaction{mq.guards.qguard.pos} +%To set a negative guard on a patch, prefix the name of the guard with +%a ``\texttt{-}''. +%\interaction{mq.guards.qguard.neg} + +\hgxcmd{mq}{qguard}コマンドでどのガードがパッチに適用されるかを指定した +り,すでに有効になっているガードを表示させることができる.引数なしでこの +コマンドを使うと,現在の最上位のパッチのガードを表示する. \interaction{mq.guards.qguard} -To set a positive guard on a patch, prefix the name of the guard with -a ``\texttt{+}''. +パッチにポジティブガードを設定するには,ガード名の前に``\texttt{+}''をつ +ける. \interaction{mq.guards.qguard.pos} -To set a negative guard on a patch, prefix the name of the guard with -a ``\texttt{-}''. +パッチにネガティブガードを設定するには,ガード名の前に``\texttt{-}''をつ +ける. \interaction{mq.guards.qguard.neg} +%\begin{note} +% The \hgxcmd{mq}{qguard} command \emph{sets} the guards on a patch; it +% doesn't \emph{modify} them. What this means is that if you run +% \hgcmdargs{qguard}{+a +b} on a patch, then \hgcmdargs{qguard}{+c} on +% the same patch, the \emph{only} guard that will be set on it +% afterwards is \texttt{+c}. +%\end{note} + \begin{note} - The \hgxcmd{mq}{qguard} command \emph{sets} the guards on a patch; it - doesn't \emph{modify} them. What this means is that if you run - \hgcmdargs{qguard}{+a +b} on a patch, then \hgcmdargs{qguard}{+c} on - the same patch, the \emph{only} guard that will be set on it - afterwards is \texttt{+c}. + \hgxcmd{mq}{qguard} コマンドはパッチにガードを\emph{設定する}がパッチ自 + 体を\emph{変更しない}点に注意されたい.パッチに対して + \hgcmdargs{qguard}{+a +b}を実行し,同じパッチに\hgcmdargs{qguard}{+c}を + 実行すると,このパッチへのガードは\texttt{+c}のみになる. \end{note} -Mercurial stores guards in the \sfilename{series} file; the form in -which they are stored is easy both to understand and to edit by hand. -(In other words, you don't have to use the \hgxcmd{mq}{qguard} command if -you don't want to; it's okay to simply edit the \sfilename{series} -file.) +%Mercurial stores guards in the \sfilename{series} file; the form in +%which they are stored is easy both to understand and to edit by hand. +%(In other words, you don't have to use the \hgxcmd{mq}{qguard} command if +%you don't want to; it's okay to simply edit the \sfilename{series} +%file.) +%\interaction{mq.guards.series} + +Mercurialはガードを\sfilename{series}ファイルに保存する.書式は理解しや +すく,手で変更するのも簡単である.(つまり,\hgxcmd{mq}{qguard}コマンド +を使いたくなければ,直接\sfilename{series}を編集して済ますこともできる.) \interaction{mq.guards.series} %\section{Selecting the guards to use} \section{使用するガードを選ぶ} -The \hgxcmd{mq}{qselect} command determines which guards are active at a -given time. The effect of this is to determine which patches MQ will -apply the next time you run \hgxcmd{mq}{qpush}. It has no other effect; in -particular, it doesn't do anything to patches that are already -applied. +%The \hgxcmd{mq}{qselect} command determines which guards are active at a +%given time. The effect of this is to determine which patches MQ will +%apply the next time you run \hgxcmd{mq}{qpush}. It has no other effect; in +%particular, it doesn't do anything to patches that are already +%applied. + +\hgxcmd{mq}{qselect}コマンドを実行することで,その時点でアクティブなガー +ドを指定することができる.このコマンドによって,次に\hgxcmd{mq}{qpush}が +実行されたときにどのパッチがMQによって適用されるかが指定される.それ以外 +の効果はなく,特にすでに適用されているパッチに対しては何も行わない. -With no arguments, the \hgxcmd{mq}{qselect} command lists the guards -currently in effect, one per line of output. Each argument is treated -as the name of a guard to apply. +%With no arguments, the \hgxcmd{mq}{qselect} command lists the guards +%currently in effect, one per line of output. Each argument is treated +%as the name of a guard to apply. +%\interaction{mq.guards.qselect.foo} +%In case you're interested, the currently selected guards are stored in +%the \sfilename{guards} file. +%\interaction{mq.guards.qselect.cat} +%We can see the effect the selected guards have when we run +%\hgxcmd{mq}{qpush}. +%\interaction{mq.guards.qselect.qpush} + +引数なしで\hgxcmd{mq}{qselect}コマンドを実行すると,現在有効なガードのリ +ストを1行に1つずつ表示する.各々の引数は適用されるガードの名前として解釈 +される. \interaction{mq.guards.qselect.foo} -In case you're interested, the currently selected guards are stored in -the \sfilename{guards} file. +現在選択されているガードに興味がある場合,これは\sfilename{guards}ファイ +ルに保存されている. \interaction{mq.guards.qselect.cat} -We can see the effect the selected guards have when we run -\hgxcmd{mq}{qpush}. +選択されたガードの効果は\hgxcmd{mq}{qpush}の実行時に見ることができる. \interaction{mq.guards.qselect.qpush} -A guard cannot start with a ``\texttt{+}'' or ``\texttt{-}'' -character. The name of a guard must not contain white space, but most -othter characters are acceptable. If you try to use a guard with an -invalid name, MQ will complain: -\interaction{mq.guards.qselect.error} -Changing the selected guards changes the patches that are applied. -\interaction{mq.guards.qselect.quux} -You can see in the example below that negative guards take precedence -over positive guards. +%A guard cannot start with a ``\texttt{+}'' or ``\texttt{-}'' +%character. The name of a guard must not contain white space, but most +%othter characters are acceptable. If you try to use a guard with an +%invalid name, MQ will complain: +%\interaction{mq.guards.qselect.error} +%Changing the selected guards changes the patches that are applied. +%\interaction{mq.guards.qselect.quux} +%You can see in the example below that negative guards take precedence +%over positive guards. +%\interaction{mq.guards.qselect.foobar} + +ガードを``\texttt{+}''や``\texttt{-}''の文字で始めることはできない.ガー +ド名は空白を含んではならないが,その他の殆んどの文字を含むことができる. +もし使用不可の文字を含む場合は、MQが警告を表示する。 +\interaction{mq.guards.qselect.error} +選択されたガードを変更することは、適用されるパッチの変更を意味する。 +\interaction{mq.guards.qselect.quux} +下の例でネガティブガードがポジティブガードよりも優先度を持つことがわかる。 \interaction{mq.guards.qselect.foobar} %\section{MQ's rules for applying patches} \section{MQのパッチ適用ルール} -The rules that MQ uses when deciding whether to apply a patch -are as follows. +%The rules that MQ uses when deciding whether to apply a patch +%are as follows. +MQが適用するパッチを決定する規則は下記のとおりである。 +%\begin{itemize} +%\item A patch that has no guards is always applied. +%\item If the patch has any negative guard that matches any currently +% selected guard, the patch is skipped. +%\item If the patch has any positive guard that matches any currently +% selected guard, the patch is applied. +%\item If the patch has positive or negative guards, but none matches +% any currently selected guard, the patch is skipped. +%\end{itemize} \begin{itemize} -\item A patch that has no guards is always applied. -\item If the patch has any negative guard that matches any currently - selected guard, the patch is skipped. -\item If the patch has any positive guard that matches any currently - selected guard, the patch is applied. -\item If the patch has positive or negative guards, but none matches - any currently selected guard, the patch is skipped. +\item ガードのないパッチは常に適用する +\item パッチに現在選択されているガードにマッチするネガティブガードがあれ + ば、そのパッチをスキップする +\item パッチに現在選択されているガードにマッチするポジティブガードがあれ + ば、そのパッチを適用する +\item パッチがポジティブ・ネガティブいずれかのガードを持つが、現在選択さ + れているガードとマッチするものがなければ、そのパッチをスキップする \end{itemize} %\section{Trimming the work environment} \section{作業環境を縮小する} -In working on the device driver I mentioned earlier, I don't apply the -patches to a normal Linux kernel tree. Instead, I use a repository -that contains only a snapshot of the source files and headers that are -relevant to Infiniband development. This repository is~1\% the size -of a kernel repository, so it's easier to work with. +%In working on the device driver I mentioned earlier, I don't apply the +%patches to a normal Linux kernel tree. Instead, I use a repository +%that contains only a snapshot of the source files and headers that are +%relevant to Infiniband development. This repository is~1\% the size +%of a kernel repository, so it's easier to work with. + +以前言及したデバイスドライバでの作業では、Linuxカーネルツリーにパッチを適 +用していなかった.その代わり,Infinibandドライバの開発に関連したソースと +ヘッダファイルだけを持つリポジトリを用いた.このリポジトリはカーネルリポ +ジトリの~1\%ほどのサイズで,作業が容易である. -I then choose a ``base'' version on top of which the patches are -applied. This is a snapshot of the Linux kernel tree as of a revision -of my choosing. When I take the snapshot, I record the changeset ID -from the kernel repository in the commit message. Since the snapshot -preserves the ``shape'' and content of the relevant parts of the -kernel tree, I can apply my patches on top of either my tiny -repository or a normal kernel tree. +%I then choose a ``base'' version on top of which the patches are +%applied. This is a snapshot of the Linux kernel tree as of a revision +%of my choosing. When I take the snapshot, I record the changeset ID +%from the kernel repository in the commit message. Since the snapshot +%preserves the ``shape'' and content of the relevant parts of the +%kernel tree, I can apply my patches on top of either my tiny +%repository or a normal kernel tree. -Normally, the base tree atop which the patches apply should be a -snapshot of a very recent upstream tree. This best facilitates the -development of patches that can easily be submitted upstream with few -or no modifications. +ここでパッチを適用するための``base''バージョンを選ぶ.これは任意に選んだ +Linuxカーネルツリーのスナップショットで,作成する際,カーネルリポジトリの +チェンジセットIDをコミットメッセージに記録しておく.スナップショットはカー +ネルツリーの関連する部分の原型を保っているため,自分のパッチを開発用の個 +別のリポジトリに適用するのと同様に通常のカーネルツリーに適用することがで +きる. + +%Normally, the base tree atop which the patches apply should be a +%snapshot of a very recent upstream tree. This best facilitates the +%development of patches that can easily be submitted upstream with few +%or no modifications. + +通常,パッチが適用されるベースツリーは上流のツリーのごく最近のスナップ +ショットであるべきだ.こうすることで,開発したパッチを修正することなく, +あるいはごく僅かな修正のみで,上流へ提出することが可能になる. %\section{Dividing up the \sfilename{series} file} -\section{\sfilename{series}ファイルへダイブする} +\section{\sfilename{series}ファイルを分割する} I categorise the patches in the \sfilename{series} file into a number of logical groups. Each section of like patches begins with a block