# HG changeset patch # User Yoshiki Yazawa # Date 1219026105 -32400 # Node ID 5a5419eeab7086a457d35915d8a2f45f9246696d # Parent 84ae26ab0ac3c1feb14fc97a5e087d6f45f5831a more mq-collab.tex diff -r 84ae26ab0ac3 -r 5a5419eeab70 ja/mq-collab.tex --- a/ja/mq-collab.tex Sat Aug 16 12:45:25 2008 +0900 +++ b/ja/mq-collab.tex Mon Aug 18 11:21:45 2008 +0900 @@ -85,53 +85,86 @@ %\subsection{Tempting approaches that don't work well} \subsection{やってしまいがちな間違った方法} -There are two ``standard'' ways to maintain a piece of software that -has to target many different environments. +%There are two ``standard'' ways to maintain a piece of software that +%has to target many different environments. + +さまざまな環境をターゲットにしたソフトウェアを管理する2つの標準的な方法 +がある. + +%The first is to maintain a number of branches, each intended for a +%single target. The trouble with this approach is that you must +%maintain iron discipline in the flow of changes between repositories. +%A new feature or bug fix must start life in a ``pristine'' repository, +%then percolate out to every backport repository. Backport changes are +%more limited in the branches they should propagate to; a backport +%change that is applied to a branch where it doesn't belong will +%probably stop the driver from compiling. -The first is to maintain a number of branches, each intended for a -single target. The trouble with this approach is that you must -maintain iron discipline in the flow of changes between repositories. -A new feature or bug fix must start life in a ``pristine'' repository, -then percolate out to every backport repository. Backport changes are -more limited in the branches they should propagate to; a backport -change that is applied to a branch where it doesn't belong will -probably stop the driver from compiling. +第1の方法は,単一のターゲット向けの複数のブランチを維持することである.こ +の方法の問題点は,リポジトリ間での変更の流れについて厳格な規律を維持しな +ければならないことである.新機能やバグ修正は,きれいな状態のリポジトリで +開始し,バックポートリポジトリに浸透する必要がある.バックポート変更は波 +及すべきブランチ内に限定されていなければならない.必要のないブランチへの +バックポートの波及はおそらくドライバをコンパイル不能にしてしまうだろう. + +%The second is to maintain a single source tree filled with conditional +%statements that turn chunks of code on or off depending on the +%intended target. Because these ``ifdefs'' are not allowed in the +%Linux kernel tree, a manual or automatic process must be followed to +%strip them out and yield a clean tree. A code base maintained in this +%fashion rapidly becomes a rat's nest of conditional blocks that are +%difficult to understand and maintain. -The second is to maintain a single source tree filled with conditional -statements that turn chunks of code on or off depending on the -intended target. Because these ``ifdefs'' are not allowed in the -Linux kernel tree, a manual or automatic process must be followed to -strip them out and yield a clean tree. A code base maintained in this -fashion rapidly becomes a rat's nest of conditional blocks that are -difficult to understand and maintain. +第2の方法は,チャンクやコードを,目的とするターゲット毎にon/offする条件文 +を追加した単一のソースツリーを維持する方法である.これらの``ifdef''は +linuxカーネルツリーでは許されていないため,手動または自動でこれらのコード +を除去し,クリーンなツリーを作るプロセスが必要になる.このようなやり方で +管理されたコードベースはすぐに条件節の巣窟と化し、理解や管理の妨げとなる。 + +%Neither of these approaches is well suited to a situation where you +%don't ``own'' the canonical copy of a source tree. In the case of a + +%Linux driver that is distributed with the standard kernel, Linus's +%tree contains the copy of the code that will be treated by the world +%as canonical. The upstream version of ``my'' driver can be modified +%by people I don't know, without me even finding out about it until +%after the changes show up in Linus's tree. -Neither of these approaches is well suited to a situation where you -don't ``own'' the canonical copy of a source tree. In the case of a -Linux driver that is distributed with the standard kernel, Linus's -tree contains the copy of the code that will be treated by the world -as canonical. The upstream version of ``my'' driver can be modified -by people I don't know, without me even finding out about it until -after the changes show up in Linus's tree. +あなたが正式なソースツリーを所有しているのでなければ、これらのやり方のど +ちらもそぐわないだろう。標準のlinuxカーネルに同梱されているドライバの場 +合,Linusのツリーは世界中で正式なコードとして扱われるコピーを含んでいる. +``私''のドライバの上流版は,知らない人によって変更され得るし,自分の変更 +がLinusのツリーに入ったあとでさえも変更され得る. + +%These approaches have the added weakness of making it difficult to +%generate well-formed patches to submit upstream. -These approaches have the added weakness of making it difficult to -generate well-formed patches to submit upstream. +これらのアプローチは,うまく書かれたパッチを上流へ提出することを困難にし +てしまう. -In principle, Mercurial Queues seems like a good candidate to manage a -development scenario such as the above. While this is indeed the -case, MQ contains a few added features that make the job more -pleasant. +%In principle, Mercurial Queues seems like a good candidate to manage a +%development scenario such as the above. While this is indeed the +%case, MQ contains a few added features that make the job more +%pleasant. + +Mercurial Queuesは上記のような開発シナリオを管理するよい候補の一つである +といえる.このような場合のためにMQには作業をより快適にするいくつかの機能 +がある. %\section{Conditionally applying patches with guards} \section{ガードを使ったパッチの条件的な適用} -Perhaps the best way to maintain sanity with so many targets is to be -able to choose specific patches to apply for a given situation. MQ -provides a feature called ``guards'' (which originates with quilt's -\texttt{guards} command) that does just this. To start off, let's -create a simple repository for experimenting in. -\interaction{mq.guards.init} -This gives us a tiny repository that contains two patches that don't -have any dependencies on each other, because they touch different files. +%Perhaps the best way to maintain sanity with so many targets is to be +%able to choose specific patches to apply for a given situation. MQ +%provides a feature called ``guards'' (which originates with quilt's +%\texttt{guards} command) that does just this. To start off, let's +%create a simple repository for experimenting in. +%\interaction{mq.guards.init} +%This gives us a tiny repository that contains two patches that don't +%have any dependencies on each other, because they touch different files. + + + The idea behind conditional application is that you can ``tag'' a patch with a \emph{guard}, which is simply a text string of your