# HG changeset patch # User Yoshiki Yazawa # Date 1202404440 -32400 # Node ID b8105146706fa618ba3275427b9d8ddb11394354 # Parent 89db0aaf6a290b5df56edf2949db6dad008e96cd more undo.tex diff -r 89db0aaf6a29 -r b8105146706f ja/undo.tex --- a/ja/undo.tex Fri Feb 08 01:56:29 2008 +0900 +++ b/ja/undo.tex Fri Feb 08 02:14:00 2008 +0900 @@ -214,40 +214,72 @@ %\section{Reverting the mistaken change} \section{間違った変更を元に戻す} -If you make a modification to a file, and decide that you really -didn't want to change the file at all, and you haven't yet committed -your changes, the \hgcmd{revert} command is the one you'll need. It -looks at the changeset that's the parent of the working directory, and -restores the contents of the file to their state as of that changeset. -(That's a long-winded way of saying that, in the normal case, it -undoes your modifications.) +%If you make a modification to a file, and decide that you really +%didn't want to change the file at all, and you haven't yet committed +%your changes, the \hgcmd{revert} command is the one you'll need. It +%looks at the changeset that's the parent of the working directory, and +%restores the contents of the file to their state as of that changeset. +%(That's a long-winded way of saying that, in the normal case, it +%undoes your modifications.) + +ファイルに変更を加えた後で,変更が必要でないと分かり,まだコミットされて +いない時は\hgcmd{revert}コマンドを使うことができる.このコマンドはワーキ +ングディレクトリの親チェンジセットを参照し,ファイルの内容をチェンジセッ +トの状態に戻す.(これはあなたが加えた変更をくどくどしく述べたものであ +る.) -Let's illustrate how the \hgcmd{revert} command works with yet another -small example. We'll begin by modifying a file that Mercurial is -already tracking. +%Let's illustrate how the \hgcmd{revert} command works with yet another +%small example. We'll begin by modifying a file that Mercurial is +%already tracking. +%\interaction{daily.revert.modify} +%If we don't want that change, we can simply \hgcmd{revert} the file. +%\interaction{daily.revert.unmodify} +%The \hgcmd{revert} command provides us with an extra degree of safety +%by saving our modified file with a \filename{.orig} extension. +%\interaction{daily.revert.status} + +\hgcmd{revert}コマンドがどのように動作するか,別の小さな例で説明する. +すでにMercurialが管理しているファイルを変更したところから始める. \interaction{daily.revert.modify} -If we don't want that change, we can simply \hgcmd{revert} the file. +この変更が必要でない場合,単にファイルに\hgcmd{revert}を実行すればよい. \interaction{daily.revert.unmodify} -The \hgcmd{revert} command provides us with an extra degree of safety -by saving our modified file with a \filename{.orig} extension. +\hgcmd{revert}コマンドは安全のため\filename{.orig}というファイル名で変更 +をセーブする. \interaction{daily.revert.status} -Here is a summary of the cases that the \hgcmd{revert} command can -deal with. We will describe each of these in more detail in the -section that follows. +%Here is a summary of the cases that the \hgcmd{revert} command can +%deal with. We will describe each of these in more detail in the +%section that follows. +%\begin{itemize} +%\item If you modify a file, it will restore the file to its unmodified +% state. +%\item If you \hgcmd{add} a file, it will undo the ``added'' state of +% the file, but leave the file itself untouched. +%\item If you delete a file without telling Mercurial, it will restore +% the file to its unmodified contents. +%\item If you use the \hgcmd{remove} command to remove a file, it will +% undo the ``removed'' state of the file, and restore the file to its +% unmodified contents. +%\end{itemize} + +\hgcmd{revert}コマンドが扱えるケースについてまとめる.より詳しい説明は, +後の節で行なう. + \begin{itemize} -\item If you modify a file, it will restore the file to its unmodified - state. -\item If you \hgcmd{add} a file, it will undo the ``added'' state of - the file, but leave the file itself untouched. -\item If you delete a file without telling Mercurial, it will restore - the file to its unmodified contents. -\item If you use the \hgcmd{remove} command to remove a file, it will - undo the ``removed'' state of the file, and restore the file to its - unmodified contents. +\item ファイルを変更した場合,\hgcmd{revert}はファイルを変更される前の状 + 態に戻す. + +\item \hgcmd{add}を実行した場合,\hgcmd{revert}はaddを取り消すが,ファイ + ル自体はそのまま手を触れずに残す. +\item Mercurialを操作せずにファイルを消去していた場合,\hgcmd{revert}は + ファイルを変更前の状態で復元する +\item \hgcmd{remove}コマンドでファイルを消去していた場合,変更前の状態で + ファイルを復元する. \end{itemize} -\subsection{File management errors} + +%\subsection{File management errors} +\subsection{ファイル管理のミス} \label{sec:undo:mgmt} The \hgcmd{revert} command is useful for more than just modified