# HG changeset patch # User Yoshiki Yazawa # Date 1247113964 -32400 # Node ID 5276f40fca1c9ffc02c903192d619db4729cd8f7 # Parent de41429834452d0b45b0de2efa90dbec5d70f582 Propagate e6c99cbd0abd Updates to chapters 5, 6, and 7 diff -r de4142983445 -r 5276f40fca1c ja/branch.tex --- a/ja/branch.tex Sun Jun 21 09:20:47 2009 +0900 +++ b/ja/branch.tex Thu Jul 09 13:32:44 2009 +0900 @@ -180,19 +180,19 @@ しいリビジョンにタグを付ければよい. %Mercurial stores tags in a normal revision-controlled file in your -%repository.If you've created any tags, you'll find them in a file -%named \sfilename{.hgtags}.When you run the \hgcmd{tag} command, -%Mercurial modifies this file, then automatically commits the change to -%it.This means that every time you run \hgcmd{tag}, you'll see a -%corresponding changeset in the output of \hgcmd{log}. +%repository. If you've created any tags, you'll find them in a file in +%the root of your repository named \sfilename{.hgtags}.When you run the +%\hgcmd{tag} command, Mercurial modifies this file, then automatically +%commits the change to it.This means that every time you run \hgcmd{tag}, +%you'll see a corresponding changeset in the output of \hgcmd{log}. %\interaction{tag.tip} Mercurialはタグをリポジトリの中の通常のリビジョン管理ファイルに保存する. -タグを作成した時,\sfilename{.hgtags}というファイルにタグが保存されてい -るのが分かるだろう.\hgcmd{tag}コマンドを実行するとMercurialはこのファイ -ルを変更し,変更をこのファイルにコミットする.つまり\hgcmd{tag}を実行す -るといつも\hgcmd{log}の出力の中に対応するチェンジセットを見ることになる. -\interaction{tag.tip} +タグを作成した時,リポジトリのルートにある\sfilename{.hgtags}というファイ +ルにタグが保存されているのが分かるだろう.\hgcmd{tag}コマンドを実行すると +Mercurialはこのファイルを変更し,変更をこのファイルにコミットする.つまり +\hgcmd{tag}を実行するといつも\hgcmd{log}の出力の中に対応するチェンジセッ +トを見ることになる. \interaction{tag.tip} %\subsection{Handling tag conflicts during a merge} \subsection{マージの際にタグのコンフリクトを解決する} diff -r de4142983445 -r 5276f40fca1c ja/collab.tex --- a/ja/collab.tex Sun Jun 21 09:20:47 2009 +0900 +++ b/ja/collab.tex Thu Jul 09 13:32:44 2009 +0900 @@ -25,15 +25,18 @@ %For interactive use, the web interface lets you browse a single %repository or a collection of repositories. You can view the history %of a repository, examine each change (comments and diffs), and view -%the contents of each directory and file. +%the contents of each directory and file. You can even get a view of +%history that gives a graphical view of the relationships between +%individual changes and merges. 対話的な利用では,ウェブインタフェースにより1つのリポジトリまたはいくつか のリポジトリのコレクションを閲覧することができる.リポジトリの履歴を見た り,各々の変更(コメントや差分を含む)を調べたり,ディレクトリやファイル -の内容を見ることができる. +の内容を見ることができる.また,履歴を表示し,個々の変更やマージの関係を +グラフィカルに表示することも可能である. -%Also for human consumption, the web interface provides an RSS feed of -%the changes in a repository. This lets you ``subscribe'' to a +%Also for human consumption, the web interface provides Atom and RSS feed +%of the changes in a repository. This lets you ``subscribe'' to a %repository using your favorite feed reader, and be automatically %notified of activity in that repository as soon as it happens. I find %this capability much more convenient than the model of subscribing to @@ -41,11 +44,11 @@ %additional configuration on the part of whoever is serving the %repository. -ウェブインタフェースは閲覧用にリポジトリの変更のRSSフィードを提供する.こ -れを使えば,リポジトリの変化を好みのフィードリーダによって``購読''するこ -とができ,リポジトリでの活動が起こるとすぐさま通知を受けられる.この機能 -は誰がリポジトリのサービスを行っても追加の設定を必要としないため,メーリ -ングリストを購読して通知を受けるモデルよりもずっと便利である. +ウェブインタフェースは閲覧用にリポジトリの変更のAtomおよびRSSフィードを提 +供する.これを使えば,リポジトリの変化を好みのフィードリーダによって``購 +読''することができ,リポジトリでの活動が起こるとすぐさま通知を受けられ +る.この機能は誰がリポジトリのサービスを行っても追加の設定を必要としない +ため,メーリングリストを購読して通知を受けるモデルよりもずっと便利である. %The web interface also lets remote users clone a repository, pull %changes from it, and (when the server is configured to permit it) push @@ -62,15 +65,20 @@ %The easiest way to get started with the web interface is to use your %web browser to visit an existing repository, such as the master %Mercurial repository at -%\url{http://www.selenic.com/repo/hg?style=gitweb}. +%\url{http://www.selenic.com/repo/hg}. ウェブインタフェースの最も簡単な始め方はウェブブラウザを使ってMercurialの -マスタリポジトリ\url{http://www.selenic.com/repo/hg?style=gitweb}のような -既存のリポジトリを参照することである. +マスタリポジトリ\url{http://www.selenic.com/repo/hg}のような既存のリポジ +トリを参照することである. %If you're interested in providing a web interface to your own -%repositories, Mercurial provides two ways to do this. The first is -%using the \hgcmd{serve} command, which is best suited to short-term +%repositories, there are several good ways to do this. + +自分のリポジトリにウェブインタフェースを用意する場合,いくつか良い方法が +ある. + +%The easiest and fastest way to get started in an informal environment is +%to use the \hgcmd{serve} command, which is best suited to short-term %``lightweight'' serving. See section~\ref{sec:collab:serve} below for %details of how to use this command. If you have a long-lived %repository that you'd like to make permanently available, Mercurial @@ -78,13 +86,12 @@ %which all common web servers support. See %section~\ref{sec:collab:cgi} for details of CGI configuration. -自分のリポジトリにウェブインタフェースを用意する場合,2通りのやり方があ -る. 1つ目の方法は\hgcmd{serve}コマンドを使う方法で,これは短期間の``手軽 -な''サービスに的している.このコマンドの詳細な使用法については下記 -の~\ref{sec:collab:serve}節を参照のこと.リポジトリを長期間にわたり永続的 -にサービスしたい場合は,Mercurialに内蔵のCGI(Common Gateway Interface)サ -ポートを利用することができる. CGIの設定については~\ref{sec:collab:cgi}節 -を参照のこと. +公式ではない環境で行う最も簡単で早い方法は,\hgcmd{serve}コマンドを使う方 +法で,これは短期間の``手軽な''サービスに的している.このコマンドの詳細な +使用法については下記の~\ref{sec:collab:serve}節を参照のこと.リポジトリを +長期間にわたり永続的にサービスしたい場合は,Mercurialに内蔵のCGI(Common +Gateway Interface)サポートを利用することができる. CGIの設定について +は~\ref{sec:collab:cgi}節を参照のこと. %\section{Collaboration models} \section{共同作業モデル} @@ -173,37 +180,37 @@ 議室,ホテルのミーティングルームのような)一カ所に集まって数日間にわたっ て少数のプロジェクトを集中的にハックする. -%A sprint is the perfect place to use the \hgcmd{serve} command, since -%\hgcmd{serve} does not requires any fancy server infrastructure. You -%can get started with \hgcmd{serve} in moments, by reading -%section~\ref{sec:collab:serve} below. Then simply tell the person -%next to you that you're running a server, send the URL to them in an -%instant message, and you immediately have a quick-turnaround way to -%work together. They can type your URL into their web browser and -%quickly review your changes; or they can pull a bugfix from you and -%verify it; or they can clone a branch containing a new feature and try -%it out. +%A sprint or a hacking session in a coffee shop are the perfect places to +%use the \hgcmd{serve} command, since \hgcmd{serve} does not requires any +%fancy server infrastructure. You can get started with \hgcmd{serve} in +%moments, by reading section~\ref{sec:collab:serve} below. Then simply +%tell the person next to you that you're running a server, send the URL +%to them in an instant message, and you immediately have a +%quick-turnaround way to work together. They can type your URL into +%their web browser and quickly review your changes; or they can pull a +%bugfix from you and verify it; or they can clone a branch containing a +%new feature and try it out. -スプリントは\hgcmd{serve}コマンドを使うのまさににうってつけの環境である. -\hgcmd{serve}は手の込んだサーバ設備を必要としない.下の -\ref{sec:collab:serve}セクションを読んですぐに\hgcmd{serve}コマンドを使う -ことができる.サーバを起動していることを隣の開発者に話したり,グループに -URLをインスタントメッセージで送れば,すぐに迅速な共同作業ができる. -送ったURLを他の開発者がブラウザに入力すれば,彼らは簡単にあなたの変更をレ -ビューすることができるし,あなたの行ったバグフィックスをpullして検証する -こともできる.さらに,新機能の実装されたブランチをクローンして試すことも -できる. +スプリントやコーヒーショップでのハッキングセッションは\hgcmd{serve}コマン +ドを使うのまさににうってつけの環境である. \hgcmd{serve}は手の込んだサー +バ設備を必要としない.下の\ref{sec:collab:serve}セクションを読んですぐに +\hgcmd{serve}コマンドを使うことができる.サーバを起動していることを隣の開 +発者に話したり,グループにURLをインスタントメッセージで送れば,すぐに迅速 +な共同作業ができる.送ったURLを他の開発者がブラウザに入力すれば,彼らは簡 +単にあなたの変更をレビューすることができるし,あなたの行ったバグフィック +スをpullして検証することもできる.さらに,新機能の実装されたブランチをク +ローンして試すこともできる. %The charm, and the problem, with doing things in an ad hoc fashion %like this is that only people who know about your changes, and where %they are, can see them. Such an informal approach simply doesn't %scale beyond a handful people, because each individual needs to know -%about $n$ different repositories to pull from. +%about \emph{n} different repositories to pull from. アドホックなやり方で行う共同作業の魅力と問題は,あなたの変更を知ってい て,場所も分かっている人々しか変更を参照できないことである.このような非 -公式なアプローチは,各人が$n$個の異なったリポジトリのどれからpullを行えば -いいか分かっている必要があるため,少人数以上にスケールしない. +公式なアプローチは,各人が\emph{n}個の異なったリポジトリのどれからpullを +行えばいいか分かっている必要があるため,少人数以上にスケールしない. %\subsection{A single central repository} @@ -246,20 +253,50 @@ この方法を取ることで,最低限のテストを行うまで,問題のある可能性のある変 更を公開することを引き延ばすことができる. -%In this kind of scenario, people usually use the \command{ssh} -%protocol to securely push changes to the central repository, as -%documented in section~\ref{sec:collab:ssh}. It's also usual to -%publish a read-only copy of the repository over HTTP using CGI, as in -%section~\ref{sec:collab:cgi}. Publishing over HTTP satisfies the +%If a team is hosting its own repository in this kind of scenario, people +%usually use the \command{ssh} protocol to securely push changes to the +%central repository, as documented in section~\ref{sec:collab:ssh}. It's +%also usual to publish a read-only copy of the repository over HTTP, as +%in section~\ref{sec:collab:cgi}. Publishing over HTTP satisfies the %needs of people who don't have push access, and those who want to use %web browsers to browse the repository's history. この状況では,開発者たちは通常,中央のリポジトリへ変更をプッシュするため に,~\ref{sec:collab:ssh}節で説明したように\command{ssh}プロトコルを用い る.また~\ref{sec:collab:cgi}節で述べたように,リポジトリの読み取り専用コ -ピーをCGIを用いたHTTPで公開するのも一般的である. HTTPによる公開で,プッ -シュアクセス権を持たない人々やリポジトリの履歴をブラウザで参照したい人の -ニーズを満たすことができる. +ピーをHTTPで公開するのも一般的である. HTTPによる公開で,プッシュアクセス +権を持たない人々やリポジトリの履歴をブラウザで参照したい人のニーズを満た +すことができる. + +%\subsection{A hosted central repository} +\subsection{ホスティングによる中央リポジトリサービス} + +%A wonderful thing about public hosting services like Bitbucket +%(\url{http://bitbucket.org}) is that not only do they handle the +%fiddly server configuration details, such as user accounts, +%authentication, and secure wire protocols, they provide additional +%infrastructure to make this model work well. + +Bitbucket(\url{http://bitbucket.org})のような公共のホスティングサービスで +は,ユーザアカウントの設定,認証,セキュアな通信プロトコルなどの面倒なサー +バ設定を肩代りしてくれるだけでなく,このモデルがもっと良く機能するための +インフラを提供している. + +%For instance, a well-engineered hosting service will let +%people clone their own copies of a repository with a single +%click. This lets people work in separate spaces and share +%their changes when they're ready. + +例えば,うまく構成されたホスティングサービスは,1クリックでリポジトリのコ +ピーをクローンできるようになっている.これにより,別々の場所で作業を行 +い,準備が出来次第変更を共有することができるようになる. + +%In addition, a good hosting service will let people communicate with +%each other, for instance to say ``there are changes ready for you to +%review in this tree''. + +また,良いホスティングサービスは,開発者同士が``このツリーにレビューして +貰いたい変更がある''などのやりとりをできるような機能も提供している. %\subsection{Working with multiple branches} \subsection{複数のブランチでの作業} @@ -288,7 +325,7 @@ %changes from one to another as the need arises. Because repositories %are independent of each other, unstable changes in a development %branch will never affect a stable branch unless someone explicitly -%merges those changes in. +%merges those changes into the stable branch. Mercurialは複数ブランチによる同時開発を取り扱うことに特に適している.各々 の``開発方向''は中央リポジトリに置くことが可能で,必要になる度にあるブラ @@ -329,9 +366,9 @@ キングディレクトリを復元することができる. \interaction{branching.update} -%In addition, immediately after the main branch is tagged, someone can -%then clone the main branch on the server to a new ``stable'' branch, -%also on the server. +%In addition, immediately after the main branch is tagged, we can then +%clone the main branch on the server to a new ``stable'' branch, also on +%the server. %\interaction{branching.clone} さらに,メインブランチがタグ付けされた直後からサーバ上のメインブランチを @@ -339,40 +376,44 @@ である. \interaction{branching.clone} -%Someone who needs to make a change to the stable branch can then clone -%\emph{that} repository, make their changes, commit, and push their -%changes back there. +%If we need to make a change to the stable branch, we can then clone +%\emph{that} repository, make our changes, commit, and push our changes +%back there. %\interaction{branching.stable} %Because Mercurial repositories are independent, and Mercurial doesn't %move changes around automatically, the stable and main branches are -%\emph{isolated} from each other. The changes that you made on the +%\emph{isolated} from each other. The changes that we made on the %main branch don't ``leak'' to the stable branch, and vice versa. stableブランチに変更を加えたい場合,\emph{その}リポジトリをクローンし, -変更を行い,コミットした後にその変更をサーバにpushして戻すことができる. +変更を行い,コミットした後にその変更をサーバにpushすることができる. \interaction{branching.stable} Mercurialリポジトリは独立で,変更を自動的に波及させることもないので, stableとmainブランチは互いに\emph{隔離されている}.メインブランチに行っ た変更がstableブランチに漏れ出したり,その逆になったりすることはない. -%You'll often want all of your bugfixes on the stable branch to show up - +%We'll often want all of your bugfixes on the stable branch to show up %on the main branch, too. Rather than rewrite a bugfix on the main -%branch, you can simply pull and merge changes from the stable to the -%main branch, and Mercurial will bring those bugfixes in for you. +%branch, we can simply pull and merge changes from the stable to the +%main branch, and Mercurial will bring those bugfixes in for us. %\interaction{branching.merge} -%The main branch will still contain changes that are not on the stable -%branch, but it will also contain all of the bugfixes from the stable -%branch. The stable branch remains unaffected by these changes. 多くの場合,stableブランチに対して行ったバグ修正をメインブランチに対して も取り込みたいと考えるだろう.バグ修正をメインブランチでもう一度行うので はなく,Mercurialを使って変更をstableブランチからpullして簡単にメインブラ ンチへマージすることができる. \interaction{branching.merge} -メインブランチにはstableブランチにない変更があるが,stableブランチにある -バグ修正はすべて取り込んでいる.この操作の後でもstableブランチは以前と変 -わらないままである. + +%The main branch will still contain changes that are not on the stable +%branch, but it will also contain all of the bugfixes from the stable +%branch. The stable branch remains unaffected by these changes, since +%changes are only flowing from the stable to the main branch, and not the +%other way. + +メインブランチはstableブランチにあるバグ修正をすべて取り込んでいるだけで +なく, stableブランチにはない変更も持っている.この操作を行ってもstableブ +ランチはこれらの変更による影響を受けない.なぜなら変更はstableブランチか +らメインブランチへの一方向のみに波及し,逆向きには波及しないからである. %\subsection{Feature branches} \subsection{機能によるブランチ} @@ -569,14 +610,14 @@ これらのツールでは共有pushモデルを使う他なく,それ以外の何かをしたいので あれば,(自力でパッチを当てるなどの方法で)外部で行う必要がある. -%A good distributed revision control tool, such as Mercurial, will -%support both models. You and your collaborators can then structure -%how you work together based on your own needs and preferences, not on -%what contortions your tools force you into. +%A good distributed revision control tool will support both models. You +%and your collaborators can then structure how you work together based on +%your own needs and preferences, not on what contortions your tools force +%you into. -Mercurialのような良い分散リビジョンコントロールツールは,両方のモデルをサ -ポートする.ユーザや協力者はツールによって強要されるモデルではなく,要求 -や好みに応じた共同作業の構成を決めることができる. +良い分散リビジョンコントロールツールは,両方のモデルをサポートする.ユー +ザや協力者はツールによって強要されるモデルではなく,要求や好みに応じた共 +同作業の構成を決めることができる. %\subsection{Where collaboration meets branch management} \subsection{共同作業がブランチ管理と直面するところ} @@ -599,11 +640,10 @@ %\section{The technical side of sharing} \section{共有の技術的側面} -%The remainder of this chapter is devoted to the question of serving -%data to your collaborators. +%The remainder of this chapter is devoted to the question of sharing +%changes with your collaborators. -この章の残りの部分では,協力者にデータをサービスする際の疑問点について述 -べる. +この章の残りの部分では,協力者と変更を共有する際の疑問点について述べる. %\section{Informal sharing with \hgcmd{serve}} \section{\hgcmd{serve}による非公式な共有} @@ -724,15 +764,16 @@ 安全にpushできる.このプロトコルの利用には,クライアント側かサーバ側に少々 設定が必要である. -%If you're not familiar with ssh, it's a network protocol that lets you -%securely communicate with another computer. To use it with Mercurial, -%you'll be setting up one or more user accounts on a server so that -%remote users can log in and execute commands. +%If you're not familiar with ssh, it's the name of both a command and a +%network protocol that let you securely communicate with another +%computer. To use it with Mercurial, you'll be setting up one or more +%user accounts on a server so that remote users can log in and execute +%commands. -sshをあまり使ったことがないユーザのために説明すると,sshは他のコンピュー -タと安全に通信を行うためのネットワークプロトコルである. Mercurialで使う -ためには,1つ以上のアカウントをサーバに設定し,リモートユーザがログイン -し,コマンドを実行できるようにする必要がある. +sshに馴染みのないユーザのために説明すると,sshは他のコンピュータと安全に +通信を行うためのコマンドおよびネットワークプロトコルの名称である. +Mercurialで使うためには,1つ以上のアカウントをサーバに設定し,リモートユー +ザがログインし,コマンドを実行できるようにする必要がある. %(If you \emph{are} familiar with ssh, you'll probably find some of the %material that follows to be elementary in nature.) @@ -827,57 +868,52 @@ トールされているはずだ.)万が一インストールされていなかった場合は,シス テムのドキュメントを参照してインストール方法を調べて欲しい. -%On Windows, you'll first need to choose download a suitable ssh -%client. There are two alternatives. -Windowsでは,まず適切なsshクライアントをダウンロードする必要がある.利用 -可能なクライアントは2つある. -\begin{itemize} -%\item Simon Tatham's excellent PuTTY package~\cite{web:putty} provides -% a complete suite of ssh client commands. - \item Simon Tathamによる非常に優れたPuTTYパッケージ~\cite{web:putty}は - sshクライアントの完全なコマンド群を提供する. -%\item If you have a high tolerance for pain, you can use the Cygwin -% port of OpenSSH. - \item 面倒を厭わないのであれば,Cygwin版のOpenSSHを使うこともできる. -\end{itemize} -%In either case, you'll need to edit your \hgini\ file to tell -%Mercurial where to find the actual client command. For example, if -%you're using PuTTY, you'll need to use the \command{plink} command as -%a command-line ssh client. +%On Windows, the TortoiseHg package is bundled with a version of Simon +%Tatham's excellent \command{plink} command, and you should not +%need to do any further configuration. -どの場合も\hgini\ ファイルを編集し,Mercurialに実際のコマンドがどこにある -のかを指示しなければならない.例えばPuTTYを使う場合は,\command{plink}コ -マンドをコマンドライン版sshクライアントとして使用する. - - -\begin{codesample2} - [ui] - ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key" -\end{codesample2} - -\begin{note} -% The path to \command{plink} shouldn't contain any whitespace -% characters, or Mercurial may not be able to run it correctly (so -% putting it in \dirname{C:\\Program Files} is probably not a good -% idea). -\command{plink}へのパスは空白文字を含んではならない.空白を含むと -Mercurialは正しく実行することができない.(従って\dirname{C:\\Program -Files}へ置くのはいい考えとは言えない.) -\end{note} +Windowsでは,TortoiseHgパッケージにSimon Tathamによる優れたコマンドである +\command{plink}が同梱されており,何も設定することなく利用可能である. %\subsection{Generating a key pair} \subsection{鍵ペアの作成} -%To avoid the need to repetitively type a password every time you need -%to use your ssh client, I recommend generating a key pair. On a -%Unix-like system, the \command{ssh-keygen} command will do the trick. -%On Windows, if you're using PuTTY, the \command{puttygen} command is -%what you'll need. +%To avoid the need to repetitively type a password every time you need to +%use your ssh client, I recommend generating a key pair. sshクライアントを使う度に繰返しパスワードを入力するのを避けるために,鍵 -ペアを作成することを勧める.Unix系システムでは,\command{ssh-keygen}コマ -ンドで作成できる.WindowsでPuTTYを使っているのであれ -ば,\command{puttygen}で作成できる. +ペアを作成することを勧める. + +\begin{note} +%Key pairs are not mandatory +鍵ペアは必須ではない + +%Mercurial knows nothing about ssh authentication or key pairs. You can, +%if you like, safely ignore this section and the one that follows until +%you grow tired of repeatedly typing ssh passwords. + +Mercurial自身はsshでの認証や鍵ペアについては一切関知しない.sshパスワード +の入力に倦むことがなければ,この節と後の節を無視しても差し支えない. +\end{note} + +\begin{itemize} +% \item On a Unix-like system, the \command{ssh-keygen} command will do +% the trick. + \item Unix系システムでは,\command{ssh-keygen}コマンドで鍵ペアを作成できる. +% \item On Windows, if you're using TortoiseHg, you may need to download +% a command named \command{puttygen} from the PuTTY web site +% \url{http://www.chiark.greenend.org.uk/~sgtatham/putty} to +% generate a key pair. See the \command{puttygen} documentation +% \url{http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.htm} +% for details of how use the command. + \item WindowsでTortoiseHgを使っているのであれば,PuTTYのウェブサイト + \url{http://www.chiark.greenend.org.uk/~sgtatham/putty}からダウン + ロードできる\command{puttygen}というコマンドで鍵ペア + を作成できる.このコマンドの使用法の詳細については + \command{puttygen}のドキュメント + \url{http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.htm} + を参照されたい. +\end{itemize} %When you generate a key pair, it's usually \emph{highly} advisable to %protect it with a passphrase. (The only time that you might not want @@ -944,31 +980,44 @@ %On Unix-like systems, the agent is called \command{ssh-agent}, and %it's often run automatically for you when you log in. You'll need to %use the \command{ssh-add} command to add passphrases to the agent's -%store. On Windows, if you're using PuTTY, the \command{pageant} -%command acts as the agent. It adds an icon to your system tray that -%will let you manage stored passphrases. +%store. Unix系システムではエージェントは\command{ssh-agent}と呼ばれ,ログインする と自動的に起動される.\command{ssh-add}コマンドを用いてパスフレーズをエー -ジェントに記憶させる.WindowsでPuTTYを使っている場合は,\command{pageant}コ -マンドがエージェントとして動作する.このコマンドは記憶したパスフレーズを -管理するためにシステムトレイにアイコンを追加する. +ジェントに記憶させる. +%On Windows, if you're using TortoiseHg, the pageant +%command acts as the agent. As with \command{puttygen}, you'll need to +%download \command{pageant} +%\url{http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html} +%from the PuTTY web site and read its documentation +%\url{http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter9.html#pageant}. +%The \command{pageant} command adds an icon to your system tray that will +%let you manage stored passphrases. + +WindowsでTortoiseHgを使っている場合は,\command{pageant}コマンドがエージェ +ントとして動作する. \command{puttygen}コマンドの時と同様に +\command{pageant}コマンドはPuTTYのウェブサイト +\url{http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html}から +ダウンロードできる.使用法については +\url{http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter9.html#pageant} +を参照されたい. \command{pageant}コマンドは記憶したパスフレーズを管理す +るためにシステムトレイにアイコンを追加する. %\subsection{Configuring the server side properly} \subsection{サーバの正しい設定} -%Because ssh can be fiddly to set up if you're new to it, there's a -%variety of things that can go wrong. Add Mercurial on top, and -%there's plenty more scope for head-scratching. Most of these -%potential problems occur on the server side, not the client side. The -%good news is that once you've gotten a configuration working, it will -%usually continue to work indefinitely. +%Because ssh can be fiddly to set up if you're new to it, a variety of +%things can go wrong. Add Mercurial on top, and there's plenty more +%scope for head-scratching. Most of these potential problems occur on +%the server side, not the client side. The good news is that once you've +%gotten a configuration working, it will usually continue to work +%indefinitely. -sshは慣れていないと設定が難しいため,間違いを犯す余地はいたる所にある. -Mercurialと共に動かす場合,さらに多くが待ち構えている.これらの殆んどがク -ライアント側ではなくサーバ側で起きる.しかし一度きちんと動作する設定をし -てしまえば,動作はずっと続く. +sshは慣れていないと設定が難しいため,新たに使い始める場合,様々な不具合が +起きる可能性がある.Mercurialと共に動かす場合,さらに多くが待ち構えてい +る.これらの殆んどがクライアント側ではなくサーバ側で起きる.しかし一度き +ちんと動作する設定をしてしまえば,動作はずっと続く. %Before you try using Mercurial to talk to an ssh server, it's best to %make sure that you can use the normal \command{ssh} or \command{putty} @@ -1185,39 +1234,56 @@ %Both \command{ssh} and \command{plink} accept a \cmdopt{ssh}{-C} %option which turns on compression. You can easily edit your \hgrc\ to %enable compression for all of Mercurial's uses of the ssh protocol. +%Here is how to do so for regular \command{ssh} on Unix-like systems, for +%example. + \command{ssh}コマンドも\command{plink}コマンドも圧縮を有効にする -\cmdopt{ssh}{-C}オプションが使える.\hgrc\ ファイルを編集してMercurialが -圧縮つきのsshプロトコルを使用するように設定することができる. +\cmdopt{ssh}{-C}オプションが使える. \hgrc\ ファイルを編集してMercurialが +圧縮つきのsshプロトコルを使用するように設定することができる. Unix系シス +テムで通常の\command{ssh}コマンドを設定する例は次のようになる. \begin{codesample2} [ui] ssh = ssh -C \end{codesample2} -%If you use \command{ssh}, you can configure it to always use -%compression when talking to your server. To do this, edit your -%\sfilename{.ssh/config} file (which may not yet exist), as follows. -\command{ssh}でサーバへ接続する時に常に圧縮を使用するように設定することが -できる.\sfilename{.ssh/config}ファイル(存在しない場合は作成する)を次 -のように編集する. +%If you use \command{ssh} on a Unix-like system, you can configure it to +%always use compression when talking to your server. To do this, edit +%your \sfilename{.ssh/config} file (which may not yet exist), as follows. + +Unix系システムで\command{ssh}を用いてサーバへ接続している場合,サーバへの +接続時に常に圧縮を使用するように設定することができる.設定には +\sfilename{.ssh/config}ファイル(存在しない場合は作成する)を次のように編 +集する. + \begin{codesample2} Host hg Compression yes HostName hg.example.com \end{codesample2} -%This defines an alias, \texttt{hg}. When you use it on the -%\command{ssh} command line or in a Mercurial \texttt{ssh}-protocol -%URL, it will cause \command{ssh} to connect to \texttt{hg.example.com} -%and use compression. This gives you both a shorter name to type and -%compression, each of which is a good thing in its own right. -これはalias \texttt{hg}を定義する.このaliasを\command{ssh}のコマンドライ -ンで使うかMercurial \texttt{ssh}-プロトコル URLで使用すると\command{ssh} -コマンドhは\texttt{hg.example.com}へ圧縮を用いて接続を行う.短縮形のホス -ト名と圧縮の設定を同時に行うことができる. + +%This defines a hostname alias, \texttt{hg}. When you use that hostname +%on the \command{ssh} command line or in a Mercurial +%\texttt{ssh}-protocol URL, it will cause \command{ssh} to connect to +%\texttt{hg.example.com} and use compression. This gives you both a +%shorter name to type and compression, each of which is a good thing in +%its own right. + +これはホスト名のエイリアス\texttt{hg}を定義する.このホスト名を +\command{ssh}のコマンドラインまたはMercurial \texttt{ssh}-プロトコルでの +URLで使用すると,\command{ssh}コマンドは\texttt{hg.example.com}への接続に +圧縮を用いる.この方法で短縮形のホスト名と圧縮の設定を同時に行うことがで +きる. %\section{Serving over HTTP using CGI} \section{CGIを使用したHTTPによるサービス} \label{sec:collab:cgi} +%The simplest way to host one or more repositories in a permanent way is +%to use a web server and Mercurial's CGI support. + +一つまたは複数のリポジトリを永続的にサービスする最も簡単な方法は,ウェブ +サーバでMercurialのCGIサポートを利用することである. + %Depending on how ambitious you are, configuring Mercurial's CGI %interface can take anything from a few moments to several hours. @@ -1234,17 +1300,29 @@ だろう. \begin{note} -% Configuring a web server is a complex, fiddly, and highly -% system-dependent activity. I can't possibly give you instructions -% that will cover anything like all of the cases you will encounter. -% Please use your discretion and judgment in following the sections -% below. Be prepared to make plenty of mistakes, and to spend a lot -% of time reading your server's error logs. +High pain tolerance required + +%Configuring a web server is a complex, fiddly, and highly +%system-dependent activity. I can't possibly give you instructions that +%will cover anything like all of the cases you will encounter. Please use +%your discretion and judgment in following the sections below. Be +%prepared to make plenty of mistakes, and to spend a lot of time reading +%your server's error logs. + ウェブサーバの設定は複雑かつ厄介でシステム依存の作業である. 読者が遭遇するすべてのケースについて手引きをすることはできないだろう. 以下のセクションでは,読みながら読者自身の思慮と判断を働かせて欲しい. たくさんのミスを犯し,サーバのエラーログの解読に多くの時間を割くことにな るのを肝に銘じておいて欲しい. + +%If you don't have a strong stomach for tweaking configurations over and +%over, or a compelling need to host your own services, you might want to +%try one of the public hosting services that I mentioned earlier. + +延々と設定の手直しを続けることが我慢できなかったり,自前のサービスが必須 +でなかったりする場合は,前述の公共ホスティングサービスを検討した方が良い +だろう. + \end{note} %\subsection{Web server configuration checklist} @@ -1255,11 +1333,12 @@ ここから先へ進む前に,読者のシステムについて確認をしておこう. \begin{enumerate} -%\item Do you have a web server installed at all? Mac OS X ships with -% Apache, but many other systems may not have a web server installed. - \item ウェブサーバはすでにインストールされているか? Mac OS Xには標準で - Apacheがインストールされているが,他のシステムではウェブサーバが - インストールされていないこともある. +% \item Do you have a web server installed at all? Mac OS X and some +% Linux distributions ship with Apache, but many other systems may +% not have a web server installed. + \item ウェブサーバはすでにインストールされているか? Mac OS Xやいくつか + のLinuxディストリビューションでは標準でApacheがインストールされて + いるが,ウェブサーバがインストールされていないシステムも多くある. %\item If you have a web server installed, is it actually running? On % most systems, even if one is present, it will be disabled by % default. @@ -1679,13 +1758,18 @@ 同時に用いることもできる. %\begin{note} -% If multiple repositories have the same virtual path, -% \sfilename{hgwebdir.cgi} will not report an error. Instead, it will -% behave unpredictably. +%Beware duplicate virtual paths + +%If several repositories have the same virtual path, +%\sfilename{hgwebdir.cgi} will not report an error. Instead, it will +%behave unpredictably. %\end{note} + \begin{note} -複数のリポジトリが同じ仮想パスを持つ場合,\sfilename{hgwebdir.cgi}はエラー - を生じないが,挙動は予測のつかないものとなる. +仮想パスの重複に注意 + +複数のリポジトリが同じ仮想パスを持つ場合でも\sfilename{hgwebdir.cgi}はエラー +を表示しないが,挙動は予測のつかないものとなる. \end{note} %\subsection{Downloading source archives} @@ -1701,10 +1785,11 @@ %By default, this feature is not enabled. To enable it, you'll need to %add an \rcitem{web}{allow\_archive} item to the \rcsection{web} -%section of your \hgrc. +%section of your \hgrc; see below for details. + デフォルトではこの機能は無効にされている.有効にするには \rcitem{web}{allow\_archive}項目を\hgrc の\rcsection{web}セクションに追 -加する必要がある. +加する必要がある.(詳細については下記を参照.) %\subsection{Web configuration options} \subsection{Web設定オプション} @@ -1803,18 +1888,39 @@ 値でそれぞれのストライプの行数を設定する. %\item[\rcitem{web}{style}] Controls the template Mercurial uses to -% display the web interface. Mercurial ships with two web templates, -% named \texttt{default} and \texttt{gitweb} (the latter is much more -% visually attractive). You can also specify a custom template of -% your own; see chapter~\ref{chap:template} for details. Here, you -% can see how to enable the \texttt{gitweb} style. +% display the web interface. Mercurial ships with several web +% templates. +% +% \begin{itemize} +% \item \texttt{coal} is monochromatic. +% \item \texttt{gitweb} emulates the visual style of git's +% web interface. +% \item \texttt{monoblue} uses solid blues and greys. +% \item \texttt{paper} is the default. +% \item \texttt{spartan} was the default for a long time. +% \end{itemize} +% +% You can also specify a custom template of your own; see +% chapter~\ref{chap:template} for details. Here, you can see +% how to enable the \texttt{gitweb} style. + \item[\rcitem{web}{style}] Mercurialがウェブインターフェースを表示するた - めに使用するテンプレートを制御する.Mercurialには - \texttt{default}と\texttt{gitweb}という2つのウェブテンプレー - トが同梱されている.(後者の方が見栄えがする.)独自のテンプ - レートを指定することも可能である.詳細は~\ref{chap:template}を - 参照のこと.ここでは\texttt{gitweb}スタイルを有効にする方法 - を示す. + めに使用するテンプレートを制御する.Mercurialにはいくつかの + ウェブテンプレートが同梱されている. + + \begin{itemize} + \item \texttt{coal} 単色のテンプレート. + \item \texttt{gitweb} gitのウェブインターフェースを模倣し + たデザインのもの. + \item \texttt{monoblue} 単色の青とグレー. + \item \texttt{paper} デフォルト + \item \texttt{spartan} これまで長らくデフォルトとして使わ + れてきたもの. + \end{itemize} + + 独自のテンプレートを指定することも可能である.詳細 + は~\ref{chap:template}を参照のこと.ここでは\texttt{gitweb}ス + タイルを有効にする方法を示す. \begin{codesample4} [web] style = gitweb @@ -1927,6 +2033,75 @@ トリに\hgrc\ ファイルを作り,設定をシステムの\hgrc\ ファイルにも追加する 必要がある. +%\section{System-wide configuration} +\section{システムワイドの設定} + +%On Unix-like systems shared by multiple users (such as a server to which +%people publish changes), it often makes sense to set up some global +%default behaviors, such as what theme to use in web interfaces. + +複数のユーザが使用するUnix系のシステム(ユーザが変更を公開するサーバな +ど)では,ウェブインタフェースで使用するテーマのように,システム全体での +デフォルトの挙動を定義するとよい場合がある. + +%If a file named \filename{/etc/mercurial/hgrc} exists, Mercurial will +%read it at startup time and apply any configuration settings it finds in +%that file. It will also look for files ending in a \texttt{.rc} +%extension in a directory named \filename{/etc/mercurial/hgrc.d}, and +%apply any configuration settings it finds in each of those files. + +\filename{/etc/mercurial/hgrc}というファイルがあると,Mercurialは起動時に +これを読み,全ての設定を適用する.また,\filename{/etc/mercurial/hgrc.d} +ディレクトリ内のファイル名が\texttt{.rc}で終るファイルを探し,書かれた設 +定を適用する. + +%\subsection{Making Mercurial more trusting} +\subsection{Mercurialの信頼性を上げる} + +%One situation in which a global \filename{hgrc} can be useful is if +%users are pulling changes owned by other users. By default, Mercurial +%will not trust most of the configuration items in a \filename{.hg/hgrc} +%file inside a repository that is owned by a different user. If we clone +%or pull changes from such a repository, Mercurial will print a warning +%stating that it does not trust their \filename{.hg/hgrc}. + +システム全体の\filename{hgrc}ファイルが有用な場合の一例に,他のユーザが所 +有数rリポジトリからpullする場合がある.デフォルトではMercurialは別のユー +ザの所有するリポジトリ内にある\filename{.hg/hgrc}ファイルのほとんどの項目 +を信頼しない.そのようなリポジトリからクローンや変更のpullを行う +と,Mercurialは\filename{.hg/hgrc}を信頼しないという警告を表示する. + +%If everyone in a particular Unix group is on the same team and +%\emph{should} trust each other's configuration settings, or we want to +%trust particular users, we can override Mercurial's skeptical defaults +%by creating a system-wide \filename{hgrc} file such as the following: + +Unixで特定のグループに入っているユーザ全てが同じチームに属し,互いに他の +ユーザの設定を信頼\emph{すべき}場合や,特定のユーザたちの設定を信頼すべき +場合は,次のようなシステム全体の\filename{hgrc}ファイルを作成 +し,Mercurialの懐疑的な設定をオーバライドすることができる. + +%\begin{codesample2} +%# Save this as e.g. /etc/mercurial/hgrc.d/trust.rc +%[trusted] +%# Trust all entries in any hgrc file owned by the "editors" or +%# "www-data" groups. +%groups = editors, www-data +% +%# Trust entries in hgrc files owned by the following users. +%users = apache, bobo +%\end{codesample2} + +\begin{codesample2} +# この内容を /etc/mercurial/hgrc.d/trust.rc などとして保存する +[trusted] +# 所有者が "editors" または "www-data" である hgrc ファイルを信頼する +groups = editors, www-data + +# 次のユーザの所有する hgrc ファイルのエントリを信頼する +users = apache, bobo +\end{codesample2} + %%% Local Variables: %%% mode: yatex %%% TeX-master: "00book" diff -r de4142983445 -r 5276f40fca1c ja/filenames.tex --- a/ja/filenames.tex Sun Jun 21 09:20:47 2009 +0900 +++ b/ja/filenames.tex Thu Jul 09 13:32:44 2009 +0900 @@ -126,15 +126,15 @@ %The principle here is of \emph{least surprise}. If you've exactly %named a file on the command line, there's no point in repeating it -%back at you. If Mercurial is acting on a file \emph{implicitly}, +%back at you. If Mercurial is acting on a file \emph{implicitly}, e.g. %because you provided no names, or a directory, or a pattern (see -%below), it's safest to tell you what it's doing. +%below), it is safest to tell you what it's operating on. \emph{できるだけびっくりさせない}というのがここでの原則である.コマンドラ インでファイル名を完全に指定した場合,ファイル名が表示されることはない. -Mercurialは,名前を与えないか,ディレクトリ名,以下で解説するパターンを与 -えたために\emph{暗黙的に}指定されたファイルに対してアクションする場合は, -最も安全なやり方として,現在していることを表示する. +Mercurialは,名前を与えないか,ディレクトリ名や,以下で説明するようなパター +ンを与え,ファイルが\emph{暗黙的に}指定された場合は,安全のために現在操 +作しているファイル名を表示する. %For commands that behave this way, you can silence them using the %\hggopt{-q} option. You can also get them to print the name of every @@ -378,10 +378,92 @@ 読み替えるのが最も相応しい. \interaction{filenames.filter.exclude} -%\section{Ignoring unwanted files and directories} -\section{不要なファイルやディレクトリを無視する} + +%\section{Permanently ignoring unwanted files and directories} +\section{不必要なファイルやディレクトリを永久的に無視する} + +%When you create a new repository, the chances are that over time it will +%grow to contain files that ought to \emph{not} be managed by Mercurial, +%but which you don't want to see listed every time you run +%\hgcmd{status}. For instance, ``build products'' are files that are +%created as part of a build but which should not be managed by a revision +%control system. The most common build products are output files +%produced by software tools such as compilers. As another example, many +%text editors litter a directory with lock files, temporary working +%files, and backup files, which it also makes no sense to manage. + +新しいリポジトリを作成し,開発作業を続けると,時間の経過とともにビルド生 +成物などのようにリビジョン管理システムで管理すべきでないファイルがリポジ +トリに多く含まれるようになる.Mercurialの管理外にあるこれらのファイル +は,\hgcmd{status}を実行するといちいち画面に表示されてしまう.最も典型的 +なビルド生成物は,コンパイラなどのツールで生成される出力ファイルである. +その他には,多くのテキストエディタがディレクトリに置くロックファイルや, +一時的なワーキングファイル,バックアップファイルなどがある. + +%To have Mercurial permanently ignore such files, create a file named +%\filename{.hgignore} in the root of your repository. You \emph{should} +%\hgcmd{add} this file so that it gets tracked with the rest of your +%repository contents, since your collaborators will probably find it +%useful too. + +Mercurialにこれらを永久的に無視させるためには,リポジトリのルートディレク +トリに\filename{.hgignore}という名前のファイルを作成する.このファイルは +おそらく他の協力者達にとっても有用であるから,リポジトリの他の残りの部分 +と同様に管理されるよう, \hgcmd{add}すべきである. + +%By default, the \filename{.hgignore} file should contain a list of +%regular expressions, one per line. Empty lines are skipped. Most people +%prefer to describe the files they want to ignore using the ``glob'' +%syntax that we described above, so a typical \filename{.hgignore} file +%will start with this directive: -XXX. +デフォルトでは\filename{.hgignore}ファイルは1行に1つずつ正規表現のリスト +を受け付けるようになっている.空行は無視される.殆んどのユーザは無視すべ +きファイルを前述の``glob''構文を用いて記述することを好むので, +\filename{.hgignore}の最初は次のようなディレクティブで始める. + +\begin{codesample2} +syntax: glob +\end{codesample2} + +%This tells Mercurial to interpret the lines that follow as glob +%patterns, not regular expressions. + +これは後続の行を正規表現ではなくglobパターンとして解釈するようMercurialに +指示する. + +%Here is a typical-looking \filename{.hgignore} file. + +典型的な\filename{.hgignore}ファイルの例を示す. + +\begin{codesample2} +syntax: glob +%# This line is a comment, and will be skipped. +%# Empty lines are skipped too. +# この行はコメントで,スキップされる. +# 空行も同様にスキップされる. + +%# Backup files left behind by the Emacs editor. +# Emacsエディタによって残されるバックアップファイル. +*~ + +%# Lock files used by the Emacs editor. +%# Notice that the "#" character is quoted with a backslash. +%# This prevents it from being interpreted as starting a comment. +# Emacsエディタが使用するロックファイル +# "#"文字がバックスラッシュでエスケープされていることに注意. +# これによってコメントの開始文字として解釈されるのを防いでいる. +.\#* + +%# Temporary files used by the vim editor. +# vimエディタが使用する一時ファイル +.*.swp + +%# A hidden file created by the Mac OS X Finder. +# Mac OS Xのファインダーによって作られる隠しファイル +.DS_Store +\end{codesample2} + %\section{Case sensitivity} \section{大文字小文字の影響} @@ -548,15 +630,6 @@ に残っており, WindowsやMacOSしすてむではそのチェンジセットへ \hgcmd{update}することはできないものの,問題なく開発を続けることができる. -\begin{note} -% Prior to version~0.9.3, Mercurial did not use a case safe repository -% storage mechanism, and did not detect case folding conflicts. If -% you are using an older version of Mercurial on Windows or MacOS, I -% strongly recommend that you upgrade. -0.9.3より前のMercurialはcaseセーフのストレージ機構を使っておらず,caseの - 衝突を検出できなかった.WindowsやMacOSで古いバージョンのMercurialを使っ - ているならば,アップデートすることを強く勧める. -\end{note} %%% Local Variables: %%% mode: yatex