# HG changeset patch # User Yoshiki Yazawa # Date 1202402502 -32400 # Node ID b2d447356c427ed70ee9916e487e3467a91c1aa7 # Parent 3b1291f24c0dc26d7b7f24158353c200478f178a - completed cmdref.tex - minor temporal changes. diff -r 3b1291f24c0d -r b2d447356c42 ja/00book.tex --- a/ja/00book.tex Thu Feb 07 23:11:10 2008 +0900 +++ b/ja/00book.tex Fri Feb 08 01:41:42 2008 +0900 @@ -42,8 +42,8 @@ \include{preface} \include{intro} -%\include{tour-basic} -%\include{tour-merge} +\include{tour-basic} +\include{tour-merge} \include{concepts} \include{daily} \include{collab} diff -r 3b1291f24c0d -r b2d447356c42 ja/cmdref.tex --- a/ja/cmdref.tex Thu Feb 07 23:11:10 2008 +0900 +++ b/ja/cmdref.tex Fri Feb 08 01:41:42 2008 +0900 @@ -33,7 +33,7 @@ diffヘッダから日付と時間情報を省略する. -\optref{diff}{B}{ignore-blank-lines} +\optref{diff}{B}{空行を無視する} %Do not print changes that only insert or delete blank lines. A line %that contains only whitespace is not considered blank. @@ -206,48 +206,80 @@ differ?} \label{cmdref:diff-vs-status} -When you run the \hgcmd{status} command, you'll see a list of files -that Mercurial will record changes for the next time you perform a -commit. If you run the \hgcmd{diff} command, you may notice that it -prints diffs for only a \emph{subset} of the files that \hgcmd{status} -listed. There are two possible reasons for this. +%When you run the \hgcmd{status} command, you'll see a list of files +%that Mercurial will record changes for the next time you perform a +%commit. If you run the \hgcmd{diff} command, you may notice that it +%prints diffs for only a \emph{subset} of the files that \hgcmd{status} +%listed. There are two possible reasons for this. + +\hgcmd{status}を実行した時,Mercurialは次回のコミットで記録する変更のリ +ストを表示する.\hgcmd{diff}を実行すると,\hgcmd{status}の\emph{一部 +の}diffが表示されることに気付くだろう.これには二つの理由が考えられる. -The first is that \hgcmd{status} prints some kinds of modifications -that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command -normally outputs unified diffs, which don't have the ability to -represent some changes that Mercurial can track. Most notably, -traditional diffs can't represent a change in whether or not a file is -executable, but Mercurial records this information. +%The first is that \hgcmd{status} prints some kinds of modifications +%that \hgcmd{diff} doesn't normally display. The \hgcmd{diff} command +%normally outputs unified diffs, which don't have the ability to +%represent some changes that Mercurial can track. Most notably, +%traditional diffs can't represent a change in whether or not a file is +%executable, but Mercurial records this information. -If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will -display \command{git}-compatible diffs that \emph{can} display this -extra information. +1つ目は\hgcmd{status}が\hgcmd{diff}が通常表示しない何種類かの変更を表示す +るためである.\hgcmd{diff}は通常unified diff形式で出力するが,これは +Mercurialが追跡できる変更のいくつかを追跡できない.特に,古いdiffではファ +イルが実行かのうかどうかを表現できないが,Mercurialはこの情報を記録する. + +%If you use the \hgopt{diff}{--git} option to \hgcmd{diff}, it will +%display \command{git}-compatible diffs that \emph{can} display this +%extra information. + +\hgcmd{diff}コマンドで\hgopt{diff}{--git}オプションを使っている場合, +この情報を表示できる\command{git}互換のdiffを出力する. -The second possible reason that \hgcmd{diff} might be printing diffs -for a subset of the files displayed by \hgcmd{status} is that if you -invoke it without any arguments, \hgcmd{diff} prints diffs against the -first parent of the working directory. If you have run \hgcmd{merge} -to merge two changesets, but you haven't yet committed the results of -the merge, your working directory has two parents (use \hgcmd{parents} -to see them). While \hgcmd{status} prints modifications relative to -\emph{both} parents after an uncommitted merge, \hgcmd{diff} still -operates relative only to the first parent. You can get it to print -diffs relative to the second parent by specifying that parent with the -\hgopt{diff}{-r} option. There is no way to print diffs relative to -both parents. +%The second possible reason that \hgcmd{diff} might be printing diffs +%for a subset of the files displayed by \hgcmd{status} is that if you +%invoke it without any arguments, \hgcmd{diff} prints diffs against the +%first parent of the working directory.If you have run \hgcmd{merge} +%to merge two changesets, but you haven't yet committed the results of +%the merge,your working directory has two parents (use \hgcmd{parents} +%to see them).While \hgcmd{status} prints modifications relative to +%\emph{both} parents after an uncommitted merge, \hgcmd{diff} still +%operates relative only to the first parent. You can get it to print +%diffs relative to the second parent by specifying that parent with the +%\hgopt{diff}{-r} option. There is no way to print diffs relative to +%both parents. + +2つ目の考えられる理由は,\hgcmd{diff}を引数なしで呼んでいるため, +\hgcmd{diff}がワーキングディレクトリの直接の親との差分を取っているためで +ある.チェンジセットをマージするために\hgcmd{merge}を実行すると,ワーキン +グディレクトリは2つの親を持つことになる.(親を表示するには +\hgcmd{parents}を使う.)\hgcmd{status}はコミットされていないマージの +\emph{両方}の親との差分を取るのに対して,\hgcmd{diff}は順序的に先の親と +の差分を取る.後の親との差分を取るためには\hgopt{diff}{-r}オプションを使 +う.両方の親との差分を取る方法は存在しない. + -\subsubsection{Generating safe binary diffs} +%\subsubsection{Generating safe binary diffs} +\subsubsection{バイナリの差分を安全に取得する} + +%If you use the \hgopt{diff}{-a} option to force Mercurial to print +%diffs of files that are either ``mostly text'' or contain lots of +%binary data, those diffs cannot subsequently be applied by either +%Mercurial's \hgcmd{import} command or the system's \command{patch} +%command. -If you use the \hgopt{diff}{-a} option to force Mercurial to print -diffs of files that are either ``mostly text'' or contain lots of -binary data, those diffs cannot subsequently be applied by either -Mercurial's \hgcmd{import} command or the system's \command{patch} -command. +大半がテキストであるファイル同士や,多くのバイナリデータが含まれるファイ +ル同士の差分を取るために\hopt{diff}{-a}を指定する場合,生成された差分は +Mercurialの\hgcmd{import}コマンドやシステムの\command{patch}に用いること +ができない. -If you want to generate a diff of a binary file that is safe to use as -input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you -generate the patch. The system \command{patch} command cannot handle -binary patches at all. +%If you want to generate a diff of a binary file that is safe to use as +%input for \hgcmd{import}, use the \hgcmd{diff}{--git} option when you +%generate the patch. The system \command{patch} command cannot handle +%binary patches at all. + +\hgcmd{import}で利用できるバイナリファイルの差分を生成するには, +パッチ生成に\hgcmd{diff}{--git}オプションを指定すればよい.システムの +\command{patch}コマンドからはこの差分は利用できない. %%% Local Variables: %%% mode: yatex diff -r 3b1291f24c0d -r b2d447356c42 ja/concepts.tex --- a/ja/concepts.tex Thu Feb 07 23:11:10 2008 +0900 +++ b/ja/concepts.tex Fri Feb 08 01:41:42 2008 +0900 @@ -38,7 +38,8 @@ \begin{figure}[ht] \centering - \grafix{filelog} +% \grafix{filelog} + \includegraphics{filelog} \caption{Relationships between files in working directory and filelogs in repository} \label{fig:concepts:filelog} @@ -76,7 +77,7 @@ \begin{figure}[ht] \centering - \grafix{metadata} + \includegraphics{metadata} \caption{Metadata relationships} \label{fig:concepts:metadata} \end{figure} @@ -143,7 +144,7 @@ \begin{figure}[ht] \centering - \grafix{snapshot} + \includegraphics{snapshot} \caption{Snapshot of a revlog, with incremental deltas} \label{fig:concepts:snapshot} \end{figure} @@ -229,7 +230,7 @@ \begin{figure}[ht] \centering - \grafix{revlog} + \includegraphics{revlog} \caption{} \label{fig:concepts:revlog} \end{figure} @@ -270,7 +271,7 @@ \begin{figure}[ht] \centering - \grafix{wdir} + \includegraphics{wdir} \caption{The working directory can have two parents} \label{fig:concepts:wdir} \end{figure} @@ -282,7 +283,7 @@ \begin{figure}[ht] \centering - \grafix{wdir-after-commit} + \includegraphics{wdir-after-commit} \caption{The working directory gains new parents after a commit} \label{fig:concepts:wdir-after-commit} \end{figure} @@ -315,7 +316,7 @@ \begin{figure}[ht] \centering - \grafix{wdir-pre-branch} + \includegraphics{wdir-pre-branch} \caption{The working directory, updated to an older changeset} \label{fig:concepts:wdir-pre-branch} \end{figure} @@ -331,7 +332,7 @@ \begin{figure}[ht] \centering - \grafix{wdir-branch} + \includegraphics{wdir-branch} \caption{After a commit made while synced to an older changeset} \label{fig:concepts:wdir-branch} \end{figure} @@ -363,7 +364,7 @@ \begin{figure}[ht] \centering - \grafix{wdir-merge} + \includegraphics{wdir-merge} \caption{Merging two heads} \label{fig:concepts:wdir-merge} \end{figure}