# HG changeset patch # User Yoshiki Yazawa # Date 1206617569 -32400 # Node ID 4301500fca37efefad7bc90064c46c92b2f82c84 # Parent 2b25fe6e4331907d792fb9646fc2de8467f90cca started mq.tex. it's a quite massive chank. diff -r 2b25fe6e4331 -r 4301500fca37 ja/mq.tex --- a/ja/mq.tex Thu Mar 27 18:35:07 2008 +0900 +++ b/ja/mq.tex Thu Mar 27 20:32:49 2008 +0900 @@ -1,7 +1,9 @@ -\chapter{Managing change with Mercurial Queues} +%\chapter{Managing change with Mercurial Queues} +\chapter{Mercurial Queuesで変更を管理する} \label{chap:mq} -\section{The patch management problem} +%\section{The patch management problem} +\section{パッチ管理の問題} \label{sec:mq:patch-mgmt} Here is a common scenario: you need to install a software package from @@ -52,7 +54,8 @@ (or simply ``MQ''), that massively simplifies the patch management problem. -\section{The prehistory of Mercurial Queues} +%\section{The prehistory of Mercurial Queues} +\section{Mercurial Queues前史} \label{sec:mq:history} During the late 1990s, several Linux kernel developers started to @@ -66,7 +69,8 @@ scripts to manage hundreds (sometimes thousands) of patches on top of the Linux kernel. -\subsection{A patchwork quilt} +%\subsection{A patchwork quilt} +\subsection{パッチワークのキルト} \label{sec:mq:quilt} In early 2003, Andreas Gruenbacher and Martin Quinson borrowed the @@ -101,7 +105,8 @@ Quilt knows nothing about revision control tools, so it works equally well on top of an unpacked tarball or a Subversion working copy. -\subsection{From patchwork quilt to Mercurial Queues} +%\subsection{From patchwork quilt to Mercurial Queues} +\subsection{パッチワークキルトからMercurial Queuesへ} \label{sec:mq:quilt-mq} In mid-2005, Chris Mason took the features of quilt and wrote an @@ -117,7 +122,8 @@ a tremendously useful piece of software to know about for situations where you cannot use Mercurial and MQ. -\section{The huge advantage of MQ} +%\section{The huge advantage of MQ} +\section{MQの大きな利点} I cannot overstate the value that MQ offers through the unification of patches and revision control. @@ -152,7 +158,8 @@ command to see which changeset or patch modified a particular line of a source file. And so on. -\section{Understanding patches} +%\section{Understanding patches} +\section{パッチとは何か} \label{sec:mq:patch} Because MQ doesn't hide its patch-oriented nature, it is helpful to @@ -208,7 +215,8 @@ section~\ref{sec:mq:adv-patch}), but you should have enough information now to use MQ. -\section{Getting started with Mercurial Queues} +%\section{Getting started with Mercurial Queues} +\section{Mercurial Queuesを使ってみる} \label{sec:mq:start} Because MQ is implemented as an extension, you must explicitly enable @@ -256,7 +264,8 @@ \label{ex:mq:qnew} \end{figure} -\subsection{Creating a new patch} +%\subsection{Creating a new patch} +\subsection{新しいパッチの作成} To begin work on a new patch, use the \hgxcmd{mq}{qnew} command. This command takes one argument, the name of the patch to create. MQ will @@ -283,7 +292,8 @@ commands, such as \hgcmd{diff} and \hgcmd{annotate}, work exactly as they did before. -\subsection{Refreshing a patch} +%\subsection{Refreshing a patch} +\subsection{パッチの再生} When you reach a point where you want to save your work, use the \hgxcmd{mq}{qrefresh} command (figure~\ref{ex:mq:qnew}) to update the patch @@ -308,7 +318,8 @@ \label{ex:mq:qrefresh2} \end{figure} -\subsection{Stacking and tracking patches} +%\subsection{Stacking and tracking patches} +\subsection{パッチの集積と追跡} Once you have finished working on a patch, or need to work on another, you can use the \hgxcmd{mq}{qnew} command again to create a new patch. @@ -344,7 +355,8 @@ \label{ex:mq:qseries} \end{figure} -\subsection{Manipulating the patch stack} +%\subsection{Manipulating the patch stack} +\subsection{パッチスタックの操作} The previous discussion implied that there must be a difference between ``known'' and ``applied'' patches, and there is. MQ can @@ -380,7 +392,8 @@ \label{ex:mq:qpop} \end{figure} -\subsection{Pushing and popping many patches} +%\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 @@ -395,7 +408,8 @@ \label{ex:mq:qpush-a} \end{figure} -\subsection{Safety checks, and overriding them} +%\subsection{Safety checks, and overriding them} +\subsection{安全性チェックとオーバライド} Several MQ commands check the working directory before they do anything, and fail if they find any modifications. They do this to @@ -420,7 +434,8 @@ files affected by the patch that it is popping. Be sure to read the documentation for a command's \option{-f} option before you use it! -\subsection{Working on several patches at once} +%\subsection{Working on several patches at once} +\subsection{複数のパッチを一度に扱う} The \hgxcmd{mq}{qrefresh} command always refreshes the \emph{topmost} applied patch. This means that you can suspend work on one patch (by @@ -438,14 +453,16 @@ \hgxcmd{mq}{qrefresh} the core patch, and \hgxcmd{mq}{qpush} back to the UI patch to continue where you left off. -\section{More about patches} +%\section{More about patches} +\section{さらにパッチについて} \label{sec:mq:adv-patch} MQ uses the GNU \command{patch} command to apply patches, so it's helpful to know a few more detailed aspects of how \command{patch} works, and about patches themselves. -\subsection{The strip count} +%\subsection{The strip count} +\subsection{ストリップカウント} If you look at the file headers in a patch, you will notice that the pathnames usually have an extra component on the front that isn't @@ -493,7 +510,9 @@ to apply their patch, followed by \hgcmd{addremove} to pick up any files added or removed by the patch, followed by \hgxcmd{mq}{qrefresh}. This complexity may become unnecessary; see~\bug{311} for details. -\subsection{Strategies for applying a patch} + +%\subsection{Strategies for applying a patch} +\subsection{パッチ適用のための戦略} When \command{patch} applies a hunk, it tries a handful of successively less accurate strategies to try to make the hunk apply. @@ -527,7 +546,8 @@ \filename{foo.rej} containing one hunk, and \filename{foo}, containing the changes made by the five successful five hunks. -\subsection{Some quirks of patch representation} +%\subsection{Some quirks of patch representation} +\subsection{パッチ表現の奇妙な点} There are a few useful things to know about how \command{patch} works with files. @@ -551,7 +571,9 @@ a patch to represent the notion ``I added this empty file to the tree''. \end{itemize} -\subsection{Beware the fuzz} + +%\subsection{Beware the fuzz} +\subsection{曖昧な点について} While applying a hunk at an offset, or with a fuzz factor, will often be completely successful, these inexact techniques naturally leave @@ -571,7 +593,8 @@ apply with some fuzz, provided you've verified the results of the patching process in such cases. -\subsection{Handling rejection} +%\subsection{Handling rejection} +\subsection{リジェクトの取り扱い} If \hgxcmd{mq}{qpush} fails to apply a patch, it will print an error message and exit. If it has left \sfilename{.rej} files behind, it is @@ -613,7 +636,8 @@ done its job, so that you can verify its work and finish off any remaining merges. -\section{Getting the best performance out of MQ} +%\section{Getting the best performance out of MQ} +\section{MQを最大限に活用する} \label{sec:mq:perf} MQ is very efficient at handling a large number of patches. I ran @@ -653,7 +677,8 @@ counted from zero; this means that the first patch is zero, the second is one, and so on. -\section{Updating your patches when the underlying code changes} +%\section{Updating your patches when the underlying code changes} +\section{下位コードの変化に合わせてパッチを更新する} \label{sec:mq:merge} It's common to have a stack of patches on top of an underlying @@ -722,7 +747,8 @@ or \hgcmd{strip}. You can delete \sdirname{.hg/patches.\emph{N}} once you are sure that you no longer need it as a backup. -\section{Identifying patches} +%\section{Identifying patches} +\section{パッチの識別} MQ commands that work with patches let you refer to a patch either by using its name or by a number. By name is obvious enough; pass the @@ -783,7 +809,8 @@ revisions. Figure~\ref{ex:mq:id} shows a few normal Mercurial commands in use with applied patches. -\section{Useful things to know about} +%\section{Useful things to know about} +\section{知っておくべきいくつかの点} There are a number of aspects of MQ usage that don't fit tidily into sections of their own, but that are good to know. Here they are, in @@ -802,7 +829,8 @@ MQ will become confused. \end{itemize} -\section{Managing patches in a repository} +%\section{Managing patches in a repository} +\section{リポジトリ内でのパッチの管理} \label{sec:mq:repo} Because MQ's \sdirname{.hg/patches} directory resides outside a @@ -830,7 +858,8 @@ each other, all on top of an underlying source base that they may or may not control. -\subsection{MQ support for patch repositories} +%\subsection{MQ support for patch repositories} +\subsection{MQによるパッチリポジトリサポート} MQ helps you to work with the \sdirname{.hg/patches} directory as a repository; when you prepare a repository for working with patches @@ -868,7 +897,8 @@ You can then issue commands of the form \cmdargs{mq}{pull} from the main repository. -\subsection{A few things to watch out for} +%\subsection{A few things to watch out for} +\subsection{監視しておくべきいくつかの点} MQ's support for working with a repository full of patches is limited in a few small respects. @@ -881,7 +911,8 @@ see those changes show up there. If you forget to do this, you can confuse MQ's idea of which patches are applied. -\section{Third party tools for working with patches} +%\section{Third party tools for working with patches} +\section{パッチ向けサードパーティツール} \label{sec:mq:tools} Once you've been working with patches for a while, you'll find @@ -913,7 +944,8 @@ only touches files whose names match a particular glob pattern. See section~\ref{mq-collab:tips:interdiff} for another example. -\section{Good ways to work with patches} +%\section{Good ways to work with patches} +\section{好ましいパッチ取り扱い方法} Whether you are working on a patch series to submit to a free software or open source project, or a series that you intend to treat as a @@ -943,9 +975,11 @@ changes your patch is making, while the latter makes it easy to splice hunks selectively out of one patch and into another. -\section{MQ cookbook} +%\section{MQ cookbook} +\section{MQクックブック} -\subsection{Manage ``trivial'' patches} +%\subsection{Manage ``trivial'' patches} +\subsection{``トリビアル''なパッチの管理} Because the overhead of dropping files into a new Mercurial repository is so low, it makes a lot of sense to manage patches this way even if @@ -970,7 +1004,8 @@ Finally, you can apply your patches on top of the new tree. \interaction{mq.tarball.repush} -\subsection{Combining entire patches} +%\subsection{Combining entire patches} +\subsection{パッチ同士を結合する} \label{sec:mq:combine} MQ provides a command, \hgxcmd{mq}{qfold} that lets you combine entire @@ -985,7 +1020,8 @@ effect as if you applied first \texttt{foo}, then \texttt{bar}, followed by \texttt{quux}. -\subsection{Merging part of one patch into another} +%\subsection{Merging part of one patch into another} +\subsection{パッチの一部分を別のパッチへマージする} Merging \emph{part} of one patch into another is more difficult than combining entire patches. @@ -1025,7 +1061,8 @@ destination patch and continue with the remainder of section~\ref{sec:mq:combine}. -\section{Differences between quilt and MQ} +%\section{Differences between quilt and MQ} +\section{キルトとMQの違い} If you are already familiar with quilt, MQ provides a similar command set. There are a few differences in the way that it works. diff -r 2b25fe6e4331 -r 4301500fca37 ja/todo.txt --- a/ja/todo.txt Thu Mar 27 18:35:07 2008 +0900 +++ b/ja/todo.txt Thu Mar 27 20:32:49 2008 +0900 @@ -1,4 +1,4 @@ -branch.tex 40% +branch.tex 100% collab.tex concepts.tex daily.tex