# HG changeset patch # User Yoshiki Yazawa # Date 1225517820 -32400 # Node ID 7ef84661e43e5c8a89f6a2ab061a3443f09ad236 # Parent 586bd91d0c8498f5b6a887a0c3e2188dfd002720 started daily.tex either. diff -r 586bd91d0c84 -r 7ef84661e43e ja/daily.tex --- a/ja/daily.tex Sat Nov 01 13:53:05 2008 +0900 +++ b/ja/daily.tex Sat Nov 01 14:37:00 2008 +0900 @@ -1,7 +1,9 @@ -\chapter{Mercurial in daily use} +%\chapter{Mercurial in daily use} +\chapter{Mercurialでの日常作業} \label{chap:daily} -\section{Telling Mercurial which files to track} +%\section{Telling Mercurial which files to track} +\section{追跡すべきファイルのMercurialへの登録} Mercurial does not work with files in your repository unless you tell it to manage them. The \hgcmd{status} command will tell you which @@ -28,7 +30,8 @@ changes you make to the file every time you commit, until you remove the file. -\subsection{Explicit versus implicit file naming} +%\subsection{Explicit versus implicit file naming} +\subsection{明示的なファイル命名対暗黙のファイル命名} A useful behaviour that Mercurial has is that if you pass the name of a directory to a command, every Mercurial command will treat this as @@ -50,7 +53,8 @@ is happening, and reduces the likelihood of a silent and nasty surprise. This behaviour is common to most Mercurial commands. -\subsection{Aside: Mercurial tracks files, not directories} +%\subsection{Aside: Mercurial tracks files, not directories} +\subsection{こぼれ話: Mercurialはディレクトリではなくファイルを追跡する} Mercurial does not track directory information. Instead, it tracks the path to a file. Before creating a file, it first creates any @@ -82,7 +86,8 @@ Another way to tackle a need for an empty directory is to simply create one in your automated build scripts before they will need it. -\section{How to stop tracking a file} +%\section{How to stop tracking a file} +\section{ファイル追跡の停止} Once you decide that a file no longer belongs in your repository, use the \hgcmd{remove} command; this deletes the file, and tells Mercurial @@ -97,7 +102,8 @@ Mercurial will know that the newly added file is not related to the old file of the same name. -\subsection{Removing a file does not affect its history} +%\subsection{Removing a file does not affect its history} +\subsection{ファイル削除は履歴に影響を与えない} It is important to understand that removing a file has only two effects. @@ -117,7 +123,8 @@ changeset, in which the file had been removed, Mercurial will once again remove the file from the working directory. -\subsection{Missing files} +%\subsection{Missing files} +\subsection{欠落したファイル} Mercurial considers a file that you have deleted, but not used \hgcmd{remove} to delete, to be \emph{missing}. A missing file is @@ -136,8 +143,9 @@ reappear, in unmodified form. \interaction{daily.files.recover-missing} -\subsection{Aside: why tell Mercurial explicitly to - remove a file?} +%\subsection{Aside: why tell Mercurial explicitly to remove a file?} +\subsection{こぼれ話: なぜMercurialへファイルの削除を明示的に指示しなけ + ればならないか} You might wonder why Mercurial requires you to explicitly tell it that you are deleting a file. Early during the development of Mercurial, @@ -146,26 +154,33 @@ \hgcmd{commit}, and stop tracking the file. In practice, this made it too easy to accidentally remove a file without noticing. -\subsection{Useful shorthand---adding and removing files - in one step} +%\subsection{Useful shorthand---adding and removing files in one step} +\subsection{役に立つ簡略法---ファイルの追加と削除を1ステップで行う} Mercurial offers a combination command, \hgcmd{addremove}, that adds -untracked files and marks missing files as removed. +untracked files and marks missing files as removed. \interaction{daily.files.addremove} The \hgcmd{commit} command also provides a \hgopt{commit}{-A} option that performs this same add-and-remove, immediately followed by a commit. \interaction{daily.files.commit-addremove} -\section{Copying files} +%\section{Copying files} +\section{ファイルのコピー} -Mercurial provides a \hgcmd{copy} command that lets you make a new -copy of a file. When you copy a file using this command, Mercurial -makes a record of the fact that the new file is a copy of the original -file. It treats these copied files specially when you merge your work -with someone else's. +%Mercurial provides a \hgcmd{copy} command that lets you make a new +%copy of a file. When you copy a file using this command, Mercurial +%makes a record of the fact that the new file is a copy of the original +%file. It treats these copied files specially when you merge your work +%with someone else's. -\subsection{The results of copying during a merge} +Mercurialには,ファイルの新しいコピーを作る\hgcmd{copy}コマンドがある. +このコマンドを使ってファイルをコピーすると,Mercurialは新しいファイルが +オリジナルの複製であることを記録する.複製されたファイルは,別の人による +変更をマージする時に特別な取り扱いがなされる. + +%\subsection{The results of copying during a merge} +\subsection{マージ中のコピーの結果} What happens during a merge is that changes ``follow'' a copy. To best illustrate what this means, let's create an example. We'll start @@ -196,7 +211,8 @@ \filename{file} into its copy, \filename{new-file}. \interaction{daily.copy.merge} -\subsection{Why should changes follow copies?} +%\subsection{Why should changes follow copies?} +\subsection{変更はなぜコピーに従わなければならないか} \label{sec:daily:why-copy} This behaviour, of changes to a file propagating out to copies of the @@ -233,7 +249,8 @@ only propagates changes across copies until this point, and no further. -\subsection{How to make changes \emph{not} follow a copy} +%\subsection{How to make changes \emph{not} follow a copy} +\subsection{変更がコピーにし側内容にする方法} If, for some reason, you decide that this business of automatically propagating changes across copies is not for you, simply use your @@ -243,7 +260,8 @@ section~\ref{sec:daily:why-copy}, and make an informed decision that this behaviour is not appropriate to your specific case. -\subsection{Behaviour of the \hgcmd{copy} command} +%\subsection{Behaviour of the \hgcmd{copy} command} +\subsection{\hgcmd{copy}コマンドの挙動} When you use the \hgcmd{copy} command, Mercurial makes a copy of each source file as it currently stands in the working directory. This @@ -274,7 +292,8 @@ the \hgopt{copy}{--after} option to \hgcmd{copy}. \interaction{daily.copy.after} -\section{Renaming files} +%\section{Renaming files} +\section{ファイルのリネーム} It's rather more common to need to rename a file than to make a copy of it. The reason I discussed the \hgcmd{copy} command before talking @@ -299,7 +318,8 @@ most other respects, the behaviour of the \hgcmd{rename} command, and the options it accepts, are similar to the \hgcmd{copy} command. -\subsection{Renaming files and merging changes} +%\subsection{Renaming files and merging changes} +\subsection{ファイルのリネームと変更のマージ} Since Mercurial's rename is implemented as copy-and-remove, the same propagation of changes happens when you merge after a rename as after @@ -317,7 +337,8 @@ this facility, it would simply be too easy for changes to become orphaned when files are renamed. -\subsection{Divergent renames and merging} +%\subsection{Divergent renames and merging} +\subsection{名前とマージの発散} The case of diverging names occurs when two developers start with a file---let's call it \filename{foo}---in their respective @@ -340,42 +361,60 @@ Notice that Mercurial does warn about the divergent renames, but it leaves it up to you to do something about the divergence after the merge. -\subsection{Convergent renames and merging} +%\subsection{Convergent renames and merging} +\subsection{リネームとマージによる収束} Another kind of rename conflict occurs when two people choose to rename different \emph{source} files to the same \emph{destination}. In this case, Mercurial runs its normal merge machinery, and lets you guide it to a suitable resolution. -\subsection{Other name-related corner cases} +%\subsection{Other name-related corner cases} +\subsection{名前に関連したいくつかの問題} Mercurial has a longstanding bug in which it fails to handle a merge where one side has a file with a given name, while another has a directory with the same name. This is documented as~\bug{29} . \interaction{issue29.go} -\section{Recovering from mistakes} +%\section{Recovering from mistakes} +\section{ミスからの回復} + +%Mercurial has some useful commands that will help you to recover from +%some common mistakes. -Mercurial has some useful commands that will help you to recover from -some common mistakes. +Mercurialには一般的なミスからの回復を助けるいくつかの有用なコマンドがある. + +%The \hgcmd{revert} command lets you undo changes that you have made to +%your working directory. For example, if you \hgcmd{add} a file by +%accident, just run \hgcmd{revert} with the name of the file you added, +%and while the file won't be touched in any way, it won't be tracked +%for adding by Mercurial any longer, either. You can also use +%\hgcmd{revert} to get rid of erroneous changes to a file. -The \hgcmd{revert} command lets you undo changes that you have made to -your working directory. For example, if you \hgcmd{add} a file by -accident, just run \hgcmd{revert} with the name of the file you added, -and while the file won't be touched in any way, it won't be tracked -for adding by Mercurial any longer, either. You can also use -\hgcmd{revert} to get rid of erroneous changes to a file. +\hgcmd{revert}コマンドはワーキングディレクトリ内で行った変更を取り消す. +たとえば,誤って\hgcmd{add}を行った場合,追加したファイル名と共に +\hgcmd{revert}を実行すればファイルは何も変更されず,Mercurialの管理から外 +される.また\hgcmd{revert}はファイルへの間違った変更を消去するのも使える. + +%It's useful to remember that the \hgcmd{revert} command is useful for + +%changes that you have not yet committed. Once you've committed a +%change, if you decide it was a mistake, you can still do something +%about it, though your options may be more limited. -It's useful to remember that the \hgcmd{revert} command is useful for -changes that you have not yet committed. Once you've committed a -change, if you decide it was a mistake, you can still do something -about it, though your options may be more limited. +\hgcmd{revert}コマンドは未コミットの変更に対して有効であることを覚えてお +くと良い.変更をコミットしたあとで,これが間違いであったことに気づいた場 +合は,とれる手段はやや限られる. -For more information about the \hgcmd{revert} command, and details -about how to deal with changes you have already committed, see -chapter~\ref{chap:undo}. +%For more information about the \hgcmd{revert} command, and details +%about how to deal with changes you have already committed, see +%chapter~\ref{chap:undo}. -%%% Local Variables: +\hgcmd{revert}コマンドについてのより詳細な情報と,すでにコミットした変更 +への操作については~\ref{chap:undo}の章を参照されたい. + +%%% Local Variables: %%% mode: yatex %%% TeX-master: "00book" -%%% End: +%%% End: