# HG changeset patch # User Yoshiki Yazawa # Date 1206866784 -32400 # Node ID db3aa48f2f73a2d0f147b2ad706b125153130273 # Parent 9ad5d69c4a37c4142200691f36f73ae263c9ca2b more mq.tex diff -r 9ad5d69c4a37 -r db3aa48f2f73 ja/mq.tex --- a/ja/mq.tex Sun Mar 30 16:54:49 2008 +0900 +++ b/ja/mq.tex Sun Mar 30 17:46:24 2008 +0900 @@ -50,43 +50,28 @@ ケージが彼らの環境で正しくビルドできるようにパッケージへ変更を加えること が多い. -When you have few changes to maintain, it is easy to manage a single -patch using the standard \command{diff} and \command{patch} programs -(see section~\ref{sec:mq:patch} for a discussion of these tools). -Once the number of changes grows, it starts to make sense to maintain -patches as discrete ``chunks of work,'' so that for example a single -patch will contain only one bug fix (the patch might modify several -files, but it's doing ``only one thing''), - -and you may have a number -of such patches for different bugs you need fixed and local changes -you require. - - - -In this situation, if you submit a bug fix patch to the -upstream maintainers of a package and they include your fix in a -subsequent release, you can simply drop that single patch when you're -updating to the newer release. +%When you have few changes to maintain, it is easy to manage a single +%patch using the standard \command{diff} and \command{patch} programs +%(see section~\ref{sec:mq:patch} for a discussion of these tools). Once +%the number of changes grows, it starts to make sense to maintain patches +%as discrete ``chunks of work,'' so that for example a single patch will +%contain only one bug fix (the patch might modify several files, but it's +%doing ``only one thing''), and you may have a number of such patches for +%different bugs you need fixed and local changes you require. In this +%situation, if you submit a bug fix patch to the upstream maintainers of +%a package and they include your fix in a subsequent release, you can +%simply drop that single patch when you're updating to the newer release. もしメンテナンスしている変更がごくわずかなら,標準の\command{diff}コマン ドと\command{patch}コマンドを使って単一のパッチを管理するのが簡単だ.(こ -れらのツールについては~\ref{sec:mq:patch}の節を参照.) - -変更の数が増えてくると,単一のバグフィックスだけを含む個別のパッチを集合 -として管理することが現実味を帯びてくる.(各々のパッチは複数のファイルを -変更するかもしれないが,目的は1つきりである.) - -修正したい異なるバグと必要なローカルな変更のための,数多くのそのようなパッ -チを持つことになるかもしれない. - -この状況ではアップストリームのメンテナにバグ修正パッチを送り,彼らがあな -たの修正を - - - - - +れらのツールについては~\ref{sec:mq:patch}の節を参照.)変更の数が増えてく +ると,単一のバグフィックスを含む個々のパッチを一塊の集合として管理するこ +とが現実味を帯びてくる.(各々のパッチは複数のファイルを変更するかもしれ +ないが,目的は1つきりである.)修正したいバグがいくつもあったり,ローカル +での様々な変更の必要のため,数多くのそのようなパッチを持つことになるかも +しれない.この状況で,アップストリームのメンテナにバグ修正パッチを送り, +彼らがあなたの修正を後のリリースに取り込めば,手元で新しいリリースに切替 +えた時には単純にそのパッチを破棄すれば良い. %Maintaining a single patch against an upstream tree is a little %tedious and error-prone, but not difficult. However, the complexity @@ -617,49 +602,75 @@ これまでの議論は``known''と``applied''パッチに違いがあることを暗黙に仮定 していた.MQは差異のないパッチをリポジトリに対して適用することもできる. -An \emph{applied} patch has a corresponding changeset in the -repository, and the effects of the patch and changeset are visible in -the working directory. You can undo the application of a patch using -the \hgxcmd{mq}{qpop} command. MQ still \emph{knows about}, or manages, a -popped patch, but the patch no longer has a corresponding changeset in -the repository, and the working directory does not contain the changes -made by the patch. Figure~\ref{fig:mq:stack} illustrates the -difference between applied and tracked patches. +%An \emph{applied} patch has a corresponding changeset in the +%repository, and the effects of the patch and changeset are visible in +%the working directory. You can undo the application of a patch using +%the \hgxcmd{mq}{qpop} command. MQ still \emph{knows about}, or manages, a +%popped patch, but the patch no longer has a corresponding changeset in +%the repository, and the working directory does not contain the changes +%made by the patch. Figure~\ref{fig:mq:stack} illustrates the +%difference between applied and tracked patches. + +\emph{適用された}パッチはリポジトリ内に対応するチェンジセットを持ち,パッ +チの効果とチェンジセットはワーキングディレクトリ内で見ることができる.パッ +チの適用は\hgxcmd{mq}{qpop}コマンドで取り消すことができる.ポップされたパッ +チは対応するチェンジセットを持たず,変更もワーキングディレクトリに残って +いないが,MQはポップされたパッチを依然として記憶し,管理している. +図~\ref{fig:mq:stack}は適用されたパッチと管理されているパッチの違いを示 +す. \begin{figure}[ht] \centering \grafix{mq-stack} - \caption{Applied and unapplied patches in the MQ patch stack} +% \caption{Applied and unapplied patches in the MQ patch stack} + \caption{MQパッチスタックの中の適用されたパッチと適用されないパッチ} \label{fig:mq:stack} \end{figure} -You can reapply an unapplied, or popped, patch using the \hgxcmd{mq}{qpush} -command. This creates a new changeset to correspond to the patch, and -the patch's changes once again become present in the working -directory. See figure~\ref{ex:mq:qpop} for examples of \hgxcmd{mq}{qpop} -and \hgxcmd{mq}{qpush} in action. Notice that once we have popped a patch -or two patches, the output of \hgxcmd{mq}{qseries} remains the same, while -that of \hgxcmd{mq}{qapplied} has changed. +%You can reapply an unapplied, or popped, patch using the \hgxcmd{mq}{qpush} +%command. This creates a new changeset to correspond to the patch, and +%the patch's changes once again become present in the working +%directory. See figure~\ref{ex:mq:qpop} for examples of \hgxcmd{mq}{qpop} +%and \hgxcmd{mq}{qpush} in action. Notice that once we have popped a patch +%or two patches, the output of \hgxcmd{mq}{qseries} remains the same, while +%that of \hgxcmd{mq}{qapplied} has changed. + +適用を外したパッチやポップしたパッチを\hgxcmd{mq}{qpush}コマンドで再適用 +することができる.このコマンドは,パッチに対応した新しいチェンジセットを +作り,パッチによる変更はもう一度ワーキングディレクトリに現れる. +\hgxcmd{mq}{qpop}と\hgxcmd{mq}{qpush}の使用例を図~\ref{ex:mq:qpop}に示す. +1つまたは複数のパッチをポップすると\hgxcmd{mq}{qapplied}の出力は変化する +が,\hgxcmd{mq}{qseries}の出力は同じまま残るのに注意されたい. \begin{figure}[ht] \interaction{mq.tutorial.qpop} - \caption{Modifying the stack of applied patches} +% \caption{Modifying the stack of applied patches} + \caption{適用されたパッチのスタックを変更する} \label{ex:mq:qpop} \end{figure} %\subsection{Pushing and popping many patches} \subsection{パッチのプッシュとポップ} -While \hgxcmd{mq}{qpush} and \hgxcmd{mq}{qpop} each operate on a single patch at -a time by default, you can push and pop many patches in one go. The -\hgxopt{mq}{qpush}{-a} option to \hgxcmd{mq}{qpush} causes it to push all -unapplied patches, while the \hgxopt{mq}{qpop}{-a} option to \hgxcmd{mq}{qpop} -causes it to pop all applied patches. (For some more ways to push and -pop many patches, see section~\ref{sec:mq:perf} below.) +%While \hgxcmd{mq}{qpush} and \hgxcmd{mq}{qpop} each operate on a single patch at +%a time by default, you can push and pop many patches in one go. The +%\hgxopt{mq}{qpush}{-a} option to \hgxcmd{mq}{qpush} causes it to push all +%unapplied patches, while the \hgxopt{mq}{qpop}{-a} option to \hgxcmd{mq}{qpop} +%causes it to pop all applied patches. (For some more ways to push and +%pop many patches, see section~\ref{sec:mq:perf} below.) + +\hgxcmd{mq}{qpush}と\hgxcmd{mq}{qpop}は一度に各々のパッチ一つずつを操作す +る(これはデフォルト動作である)一方,複数のパッチを一度にポップ・プッシュ +する操作もある.\hgxcmd{mq}{qpush}コマンドの\hgxopt{mq}{qpush}{-a}オプショ +ンは,未適用のパッチ全体をプッシュし,\hgxcmd{mq}{qpop}コマンドの +\hgxopt{mq}{qpop}{-a} オプションは適用済みのパッチ全体をポップする. +(他の複数のパッチを同時にプッシュ・ポップする方法については下 +の~\ref{sec:mq:perf}を参照のこと) \begin{figure}[ht] \interaction{mq.tutorial.qpush-a} - \caption{Pushing all unapplied patches} +% \caption{Pushing all unapplied patches} + \caption{適用されていないパッチを全てプッシュする} \label{ex:mq:qpush-a} \end{figure}