# HG changeset patch # User Yoshiki Yazawa # Date 1202378202 -32400 # Node ID f72e4be6dd37d1c7891cdf9ce2bdfd8269a5856f # Parent 504f23b4f6257694fbf90e7da3b483812574564f intermediate commit. diff -r 504f23b4f625 -r f72e4be6dd37 ja/Makefile --- a/ja/Makefile Thu Feb 07 15:52:15 2008 +0900 +++ b/ja/Makefile Thu Feb 07 18:56:42 2008 +0900 @@ -55,6 +55,7 @@ image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) +image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png) example-sources := \ backout \ @@ -108,16 +109,33 @@ hg-version = $(shell hg version -q | \ sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,') -all: pdf html +all: dvi + +dvi: $(sources) $(image-eps) examples + platex 00book.tex + + bibtex hgbook + + platex 00book.tex + platex 00book.tex + platex 00book.tex + + + + + pdf: pdf/hgbook.pdf define pdf mkdir -p $(dir $@) TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + cp 99book.bib $(dir $@) + cd $(dir $@) && bibtex $(basename $(notdir $@)) cd $(dir $@) && makeindex $(basename $(notdir $@)) + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi @@ -212,5 +230,3 @@ cp html/split/*.{css,html,png} dist cp $(dist-sources) dist -rsync: install - rsync -avz --delete dist sp.red-bean.com:public_html/hgbook diff -r 504f23b4f625 -r f72e4be6dd37 ja/Makefile.orig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ja/Makefile.orig Thu Feb 07 18:56:42 2008 +0900 @@ -0,0 +1,216 @@ +# This makefile requires GNU make. + +sources := \ + 00book.tex \ + 99book.bib \ + 99defs.tex \ + build_id.tex \ + branch.tex \ + cmdref.tex \ + collab.tex \ + concepts.tex \ + daily.tex \ + filenames.tex \ + hg_id.tex \ + hgext.tex \ + hook.tex \ + intro.tex \ + mq.tex \ + mq-collab.tex \ + mq-ref.tex \ + preface.tex \ + srcinstall.tex \ + template.tex \ + tour-basic.tex \ + tour-merge.tex \ + undo.tex + +image-sources := \ + feature-branches.dot \ + filelog.svg \ + kdiff3.png \ + metadata.svg \ + mq-stack.svg \ + note.png \ + revlog.svg \ + snapshot.svg \ + tour-history.svg \ + tour-merge-conflict.svg \ + tour-merge-merge.svg \ + tour-merge-pull.svg \ + tour-merge-sep-repos.svg \ + undo-manual.dot \ + undo-manual-merge.dot \ + undo-non-tip.dot \ + undo-simple.dot \ + wdir.svg \ + wdir-after-commit.svg \ + wdir-branch.svg \ + wdir-merge.svg \ + wdir-pre-branch.svg + +image-dot := $(filter %.dot,$(image-sources)) +image-svg := $(filter %.svg,$(image-sources)) +image-png := $(filter %.png,$(image-sources)) + +image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png) +image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png) + +example-sources := \ + backout \ + bisect \ + branching \ + branch-named \ + branch-repo \ + cmdref \ + daily.copy \ + daily.files \ + daily.rename \ + daily.revert \ + extdiff \ + filenames \ + hook.msglen \ + hook.simple \ + hook.ws \ + issue29 \ + mq.guards \ + mq.qinit-help \ + mq.dodiff \ + mq.id \ + mq.tarball \ + mq.tools \ + mq.tutorial \ + rename.divergent \ + rollback \ + tag \ + template.simple \ + template.svnstyle \ + tour \ + tour-merge-conflict + +example-prereqs := \ + /usr/bin/merge + +dist-sources := \ + ../html/hgicon.png \ + ../html/index.html.var \ + ../html/index.en.html + +latex-options = \ + -interaction batchmode \ + -output-directory $(dir $(1)) \ + -jobname $(basename $(notdir $(1))) + +hg = $(shell which hg) + +hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n') + +hg-version = $(shell hg version -q | \ + sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,') + +all: pdf html + +pdf: pdf/hgbook.pdf + +define pdf + mkdir -p $(dir $@) + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + cp 99book.bib $(dir $@) + cd $(dir $@) && bibtex $(basename $(notdir $@)) + cd $(dir $@) && makeindex $(basename $(notdir $@)) + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1) + if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi +endef + +pdf/hgbook.pdf: $(sources) $(image-pdf) examples + $(call pdf) + +html: onepage split + +onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) + +html/onepage/%: % + cp $< $@ + +split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%) + +html/split/%: % + cp $< $@ + +# This is a horrible hack to work around the fact that the htlatex +# command in tex4ht is itself a horrible hack. I really don't want to +# include verbatim the big wad of TeX that is repeated in that script, +# but I've given up and run a hacked copy as htlatex.book here. + +define htlatex + mkdir -p $(dir $(1)) + cp 99book.bib $(dir $(1)) + TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1) + cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf + cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1))) + ./fixhtml.py $(dir $(1))/*.html + rm $(dir $(1))/hgbook.css +endef + +html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg + $(call htlatex,$@,$<) + +html/split/hgbook.html: $(sources) examples bookhtml.cfg + $(call htlatex,$@,$<,2) + +# Produce 90dpi PNGs for the web. + +%.png: %.svg + inkscape -D -e $@ $< + +%.svg: %.dot + dot -Tsvg -o $@ $< + +# Produce eps & pdf for the pdf + +%.pdf: %.eps + epstopdf $< + +%.eps: %.svg + inkscape -E $@ $< + +%.eps: %.dot + dot -Tps -o $@ $< + +examples: $(example-prereqs) examples/.run + +examples/.run: $(example-sources:%=examples/%.run) + touch examples/.run + +examples/%.run: examples/% examples/run-example + cd examples && ./run-example $(notdir $<) + +changelog := $(wildcard ../.hg/store/00changelog.[id]) +ifeq ($(changelog),) +changelog := $(wildcard ../.hg/00changelog.[id]) +endif + +build_id.tex: $(changelog) + echo -n '$(hg-id)' > build_id.tex + +hg_id.tex: $(hg) + echo -n '$(hg-version)' > hg_id.tex + +clean: + rm -rf dist html pdf \ + $(image-dot:%.dot=%.pdf) \ + $(image-dot:%.dot=%.png) \ + $(image-svg:%.svg=%.pdf) \ + $(image-svg:%.svg=%.png) \ + examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex + +install: pdf split $(dist-sources) + rm -rf dist + mkdir -p dist + cp pdf/hgbook.pdf dist + cp html/split/*.{css,html,png} dist + cp $(dist-sources) dist + +rsync: install + rsync -avz --delete dist sp.red-bean.com:public_html/hgbook diff -r 504f23b4f625 -r f72e4be6dd37 ja/cmdref.tex --- a/ja/cmdref.tex Thu Feb 07 15:52:15 2008 +0900 +++ b/ja/cmdref.tex Thu Feb 07 18:56:42 2008 +0900 @@ -90,69 +90,116 @@ \optref{diff}{p}{show-function} -Display the name of the enclosing function in a hunk header, using a -simple heuristic. This functionality is enabled by default, so the -\hgopt{diff}{-p} option has no effect unless you change the value of -the \rcitem{diff}{showfunc} config item, as in the following example. +%Display the name of the enclosing function in a hunk header, using a +%simple heuristic. This functionality is enabled by default, so the +%\hgopt{diff}{-p} option has no effect unless you change the value of +%the \rcitem{diff}{showfunc} config item, as in the following example. +%\interaction{cmdref.diff-p} + +ハンクヘッダの中に含まれている関数の名前を表示する.検索は単純な発見的方 +法で行なう.この機能はデフォルトで有効にされており,\hgopt{diff}{-p}オプ +ションは下の例のように\rcitem{diff}{showfunc}設定を変更されるまで意味をな +さない. \interaction{cmdref.diff-p} \optref{diff}{r}{rev} -Specify one or more revisions to compare. The \hgcmd{diff} command -accepts up to two \hgopt{diff}{-r} options to specify the revisions to -compare. +%Specify one or more revisions to compare. The \hgcmd{diff} command +%accepts up to two \hgopt{diff}{-r} options to specify the revisions to +%compare. + +比較する対象のリビジョンを一つ以上指定する.\hgcmd{diff}コマンドは, +比較するリビジョンを指定するために\hgopt{diff}{-r}オプションを2つま +で受け付ける. + +%\begin{enumerate} +%\setcounter{enumi}{0} +%\item Display the differences between the parent revision of the +% working directory and the working directory. +%\item Display the differences between the specified changeset and the +% working directory. +%\item Display the differences between the two specified changesets. +%\end{enumerate} \begin{enumerate} \setcounter{enumi}{0} -\item Display the differences between the parent revision of the - working directory and the working directory. -\item Display the differences between the specified changeset and the - working directory. -\item Display the differences between the two specified changesets. +\item 親リビジョンのワーキングディレクトリと,現在のワーキングディレクト + リの差分を表示. +\item 指定されたチェンジセットと現在のワーキングディレクトリの差分を表示. +\item 指定された2つのチェンジセット間の差分を表示. \end{enumerate} -You can specify two revisions using either two \hgopt{diff}{-r} -options or revision range notation. For example, the two revision -specifications below are equivalent. +%You can specify two revisions using either two \hgopt{diff}{-r} +%options or revision range notation. For example, the two revision +%specifications below are equivalent. + +2つのリビジョンを指定する方法として,\hgopt{diff}{-r}を2つ使ってもいいし, +リビジョンレンジ記法を使っても良い.例えば,下の2つのリビジョン指定は等 +価である. \begin{codesample2} hg diff -r 10 -r 20 hg diff -r10:20 \end{codesample2} -When you provide two revisions, Mercurial treats the order of those -revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will -produce a diff that will transform files from their contents as of -revision~10 to their contents as of revision~20, while -\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will -transform files from their revision~20 contents to their revision~10 -contents. You cannot reverse the ordering in this way if you are -diffing against the working directory. +%When you provide two revisions, Mercurial treats the order of those +%revisions as significant. Thus, \hgcmdargs{diff}{-r10:20} will +%produce a diff that will transform files from their contents as of +%revision~10 to their contents as of revision~20, while +%\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will +%transform files from their revision~20 contents to their revision~10 +%contents. You cannot reverse the ordering in this way if you are +%diffing against the working directory. + +2つのリビジョンを指定する時,リビジョン指定の順序には意味がある. +\hgcmdargs{diff}{-r10:20}はファイルの内容がリビジョン10からリビジョン20 +に変わったとして差分を作成する.\hgcmdargs{diff}{-r20:10}であれば逆の意 +味になる.ワーキングディレクトリの差分を取る場合にはこのようにリビジョン +の順序を逆にすることはできない. \optref{diff}{w}{ignore-all-space} -\cmdref{version}{print version and copyright information} +\cmdref{version}{バージョン情報とコピーライト情報を表示する} -This command displays the version of Mercurial you are running, and -its copyright license. There are four kinds of version string that -you may see. +%This command displays the version of Mercurial you are running, and +%its copyright license. There are four kinds of version string that +%you may see. +このコマンドは現在動作中のMercurialのバージョンとコピーライトライセンス +を表示する.メッセージは4種類ある. +%\begin{itemize} +%\item The string ``\texttt{unknown}''. This version of Mercurial was +% not built in a Mercurial repository, and cannot determine its own +% version. +%\item A short numeric string, such as ``\texttt{1.1}''. This is a +% build of a revision of Mercurial that was identified by a specific +% tag in the repository where it was built. (This doesn't necessarily +% mean that you're running an official release; someone else could +% have added that tag to any revision in the repository where they +% built Mercurial.) +%\item A hexadecimal string, such as ``\texttt{875489e31abe}''. This +% is a build of the given revision of Mercurial. +%\item A hexadecimal string followed by a date, such as +% ``\texttt{875489e31abe+20070205}''. This is a build of the given +% revision of Mercurial, where the build repository contained some +% local changes that had not been committed. +%\end{itemize} \begin{itemize} -\item The string ``\texttt{unknown}''. This version of Mercurial was - not built in a Mercurial repository, and cannot determine its own - version. -\item A short numeric string, such as ``\texttt{1.1}''. This is a - build of a revision of Mercurial that was identified by a specific - tag in the repository where it was built. (This doesn't necessarily - mean that you're running an official release; someone else could - have added that tag to any revision in the repository where they - built Mercurial.) -\item A hexadecimal string, such as ``\texttt{875489e31abe}''. This - is a build of the given revision of Mercurial. -\item A hexadecimal string followed by a date, such as - ``\texttt{875489e31abe+20070205}''. This is a build of the given - revision of Mercurial, where the build repository contained some - local changes that had not been committed. +\item 文字列``\texttt{unknown}''. このバージョンのMercurialはMercurialリ + ポジトリの中でビルドされたのではないため,自分自身のリビジョンは分 + からない +\item ``\texttt{1.1}''のような短い数値文字列.これはビルドリポジトリ内で + タグ付けされた特定のリビジョンのMercurialであることを示す.(これは + 正式リリース版であるということを必ずしも意味しない.Mercurialをビル + ドするリポジトリでタグを付けるのは誰でもどのリビジョンに対しても可 + 能である) +\item ``\texttt{875489e31abe}''のような16進数文字列.これはMercurialが表 + 示されたリビジョンのビルドであることを示す. + +\item ``\texttt{875489e31abe+20070205}''のような16進文字列+日付.これは + そのリビジョンに対してコミットされていないローカルな変更を加えたソー + スからビルドされたMercurialであることを示す. \end{itemize} +%\subsection{Tips and tricks} \subsection{Tips and tricks} \subsubsection{Why do the results of \hgcmd{diff} and \hgcmd{status} @@ -203,6 +250,6 @@ binary patches at all. %%% Local Variables: -%%% mode: latex +%%% mode: yatex %%% TeX-master: "00book" %%% End: diff -r 504f23b4f625 -r f72e4be6dd37 ja/htlatex.book --- a/ja/htlatex.book Thu Feb 07 15:52:15 2008 +0900 +++ b/ja/htlatex.book Thu Feb 07 18:56:42 2008 +0900 @@ -5,8 +5,12 @@ # pain reading it causes. latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + (cd $4 && bibtex hgbook) (cd $4 && makeindex hgbook) -latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + +latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1 + echo status $$