Kenneth Lo avatar Kenneth Lo committed 6a27da6 Draft

[zh-TW] Translated Chapter 5.

Comments (0)

Files changed (1)

 # working directory 工作目錄
 # identifiers	    識別碼
 # ...
-# Kenneth Lo <closer.tw@gmail.com>, 2011.
+# Kenneth Lo <closer.tw@gmail.com>, 2011, 2012.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: hgbook 1.2\n"
 "POT-Creation-Date: 2011-11-01 20:40+0800\n"
-"PO-Revision-Date: 2011-12-02 20:28+0800\n"
+"PO-Revision-Date: 2012-06-01 14:12+0800\n"
 "Last-Translator: Kenneth Lo <closer.tw@gmail.com>\n"
 "Language-Team: 漢語 <closer.tw@gmail.com>\n"
 "Language: zh_TW\n"
 #. type: Content of: <book><chapter><title>
 #: ../en/ch05-daily.xml:5
 msgid "Mercurial in daily use"
-msgstr ""
+msgstr "Mercurial 的日常應用"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:8
 msgid "Telling Mercurial which files to track"
-msgstr ""
+msgstr "告訴 Mercurial 要追踪哪些檔案"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:10
 "tell you which files Mercurial doesn't know about; it uses a <quote><literal>?"
 "</literal></quote> to display such files."
 msgstr ""
+"在儲存庫內的檔案,除非你特別指定,否則 Mercurial 不會自動處理它們的修改歷程。"
+"輸入 <command role=\"hg-cmd\">hg status</command> 這個指令,若是檔名前面有個 "
+"<quote><literal>?</literal></quote>,就表示該檔案目前未受 Mercurial 的控管。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:17
 "<command role=\"hg-cmd\">hg status</command> for that file changes from "
 "<quote><literal>?</literal></quote> to <quote><literal>A</literal></quote>."
 msgstr ""
+"我們可以使用 <command role=\"hg-cmd\">hg add</command> 這個指令要求 Mercurial "
+"開始追踪某個檔案。當這個檔案被加入後,我們再利用 <command role=\"hg-cmd\">hg "
+"status</command> 查看它的狀態,可以發現原本檔名前面的 <quote><literal>?</"
+"literal></quote> 已經變成 <quote><literal>A</literal></quote> 了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:26
 "is tracking, but that have not changed.  (You can still get this information; "
 "we'll return to this later.)"
 msgstr ""
+"當你執行 <command role=\"hg-cmd\">hg commit</command> 之後,你可以發現:在提交"
+"前加入的那些檔案現在都不在 <command role=\"hg-cmd\">hg status</command> 所列出"
+"的列表中了。原因是在預設情況下,<command role=\"hg-cmd\">hg status</command> "
+"只會列出你<quote>感興趣</quote>的那些檔案&emdash;例如那些被你修改過、移除或重"
+"新命名的檔案。如果儲存庫中有數千個檔案,你應該不會想知道那些已經被 Mercurial "
+"控管、而且也沒被修改過的檔案狀態。(你還是有辦法取得這些資訊;我們後面會提"
+"到。)"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:38
 "perform a commit.  It will then continue to track the changes you make to the "
 "file every time you commit, until you remove the file."
 msgstr ""
+"當你加入一個檔案時,Mercurial 不會立刻處理它,而是在你下次提交時,才把提交當時"
+"的檔案狀態存進儲存庫中。之後,每當你提交時,Mercurial 都會持續不斷地追踪這個檔"
+"案的狀態,直到你移除這個檔案為止。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:45
 msgid "Explicit versus implicit file naming"
-msgstr ""
+msgstr "是否明確指定檔案名稱"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:47
 "want to operate on every file in this directory and its subdirectories</"
 "quote>."
 msgstr ""
+"Mercurial 有個非常方便的特性:如果將目錄的名稱當成命令的參數,那麼 Mercurial "
+"就會將這個參數解讀為:<quote>我想要針對這個目錄下(包含子目錄中)的所有檔案執"
+"行這個命令</quote>。這個特性適用於所有 Mercurial 的命令。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:54
 "added, whereas it didn't do so when we added the file named <filename>myfile."
 "txt</filename> in the earlier example."
 msgstr ""
+"請注意:在這個範例中,Mercurial 把所新增的檔案檔名都列出來了;然而在前面的範例"
+"中,Mercurial 並沒有顯示我們新增的檔案 <filename>myfile.txt</filename>。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:59
 "add on the command line.  The assumption that Mercurial makes in such cases "
 "is that we know what we are doing, and it doesn't print any output."
 msgstr ""
+"這其中的差異在於:在前面的例子中,我們明確地指定了要執行命令的檔案檔名。因此 "
+"Mercurial 假設我們很清楚我們在做什麼,就不印出任何的訊息了。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:64
 "happening, and reduces the likelihood of a silent and nasty surprise.  This "
 "behavior is common to most Mercurial commands."
 msgstr ""
+"然而,當我們透過「指定上層目錄」的方式<emphasis>暗示</emphasis>我們要操作的檔"
+"案時,Mercurial 就會執行額外的步驟,將所有被處理的檔案檔名列出來。如此一來,我"
+"們可以更清楚剛剛發生了什麼事,避免發生問題我們卻沒有察覺。大部份的 Mercurial "
+"命令都有相同的行為模式。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:73
 msgid "Mercurial tracks files, not directories"
-msgstr ""
+msgstr "Mercurial 只追踪檔案,不追踪目錄"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:75
 "distinction, but it has one minor practical consequence: it is not possible "
 "to represent a completely empty directory in Mercurial."
 msgstr ""
+"Mercurial 不記錄目錄的資訊,只會記錄檔案的路徑。在建立檔案之前,Mercurial 會先"
+"建立檔案路徑中所有不存在的子目錄,然後再建立該檔案。在刪除檔案之後,若是該檔案"
+"所在的目錄中沒有其他的檔案,Mercurial 會將這個目錄一併刪除。聽起來好像很合理,"
+"但這樣的設計有個小問題:Mercurial 無法記錄裡面沒有任何檔案(或子目錄)的空目"
+"錄。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:84
 "Mercurial thus felt that the complexity that would be required to manage "
 "empty directories was not worth the limited benefit this feature would bring."
 msgstr ""
+"空目錄一般來說用處不大,而且有很多方法可以達到相近的效果。因此,Mercurial 的開"
+"發人員覺得:不值得為了「管理空目錄」所帶來的有限好處,增加 Mercurial 開發與維"
+"護的複雜度。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:91
 "literal></quote>) is treated as hidden by most commands and GUI tools.  This "
 "approach is illustrated below."
 msgstr ""
+"如果儲存庫中真的需要空目錄,有幾個變通的方法。其中一種方法是建立目錄,然後在裡"
+"面 <command role=\"hg-cmd\">hg add</command> 一個<quote>隱藏</quote>檔案。在 "
+"Unix 類的系統中,大部份的命令列或圖形使用者介面的檔案管理程式,都會把「以 "
+"<quote><literal>.</literal></quote> 開頭的檔案」當成是隱藏檔案。詳細方法如下所"
+"述。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:102
 "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."
 msgstr ""
+"另一個處理空目錄的方法是:利用你的自動化編譯工具(例如:make),在需要空目錄之"
+"前,先將它建出來。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:109
 msgid "How to stop tracking a file"
-msgstr ""
+msgstr "如何要求 Mercurial 停止追踪檔案"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:111
 "commit).  A removed file is represented in the output of <command role=\"hg-"
 "cmd\">hg status</command> with a <quote><literal>R</literal></quote>."
 msgstr ""
+"若是你想把某個檔案從儲存庫中移除,你可以使用 <command role=\"hg-cmd\">hg "
+"remove</command> 這個指令,它會將檔案移除,同時告訴 Mercurial 不要再追踪這個檔"
+"案的狀況了(下次提交時會生效)。若是我們用 <command role=\"hg-cmd\">hg "
+"status</command> 觀察檔案狀況,可以看到被移除的檔案前面會有個 "
+"<quote><literal>R</literal></quote>。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:121
 "\">hg add</command> it. Mercurial will know that the newly added file is not "
 "related to the old file of the same name."
 msgstr ""
+"當你把檔案 <command role=\"hg-cmd\">hg remove</command> 之後,Mercurial 就不會"
+"再去追踪、記錄這個檔案的變化,即使你在相同的目錄中重新建立一個相同檔名的檔案也"
+"是一樣。如果你真的重新建立了這樣的檔案,而且希望 Mercurial 去追踪這個檔案,你"
+"可以重新 <command role=\"hg-cmd\">hg add</command> 這個檔案。Mercurial 會知道"
+"這個檔案和之前那個同名的檔案是不一樣的。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:130
 msgid "Removing a file does not affect its history"
-msgstr ""
+msgstr "將檔案移除並不會移除它的歷史記錄"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:132
 msgid "It is important to understand that removing a file has only two effects."
 msgstr ""
+"有件事情很重要。使用 <command role=\"hg-cmd\">hg remove</command> 移除檔案只會"
+"發生兩件事:"
 
 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:135
 msgid "It removes the current version of the file from the working directory."
-msgstr ""
+msgstr "工作目錄中,目前版本的這個檔案會被刪除。"
 
 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:138
 msgid ""
 "It stops Mercurial from tracking changes to the file, from the time of the "
 "next commit."
-msgstr ""
+msgstr "從下一次提交開始,Mercurial 不會再追蹤這個檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:141
 "Removing a file <emphasis>does not</emphasis> in any way alter the "
 "<emphasis>history</emphasis> of the file."
 msgstr ""
+"使用 <command role=\"hg-cmd\">hg remove</command> 移除檔案<emphasis>並不會</"
+"emphasis>將檔案的<emphasis>歷史記錄</emphasis>一併刪除。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:144
 "which the file had been removed, Mercurial will once again remove the file "
 "from the working directory."
 msgstr ""
+"如果你將工作目錄更新至移除檔案之前的某個變更集合,那個檔案會重新出現在工作目錄"
+"中,內容為當次提交時的內容。此時再將工作目錄更新至移除檔案之後的變更集合,"
+"Mercurial 又會再度把那個檔案從工作目錄中移除。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:155
 msgid "Missing files"
-msgstr ""
+msgstr "遺失的檔案"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:157
 "quote> in the output of <command role=\"hg-cmd\">hg status</command>.  "
 "Mercurial commands will not generally do anything with missing files."
 msgstr ""
+"若是你把某個檔案刪掉了,但不是利用 <command role=\"hg-cmd\">hg remove</"
+"command> 這個指令刪掉的,Mercurial 會將這樣的檔案視為<emphasis>遺失</"
+"emphasis>。若是我們用 <command role=\"hg-cmd\">hg status</command> 觀察檔案狀"
+"況,遺失的檔案檔名前會出現 <quote><literal>!</literal></quote> 這個符號。一般"
+"來說,Mercurial 的命令不會對遺失的檔案做任何事。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:167
 "option></command> at any time later on, to tell Mercurial that you really did "
 "mean to remove the file."
 msgstr ""
+"要是你的儲存庫中有遺失的檔案,而且你真的是想要把這些檔案刪除的話,你可以在之後"
+"的任何時間點執行 <command role=\"hg-cmd\">hg remove <option role=\"hg-opt-"
+"remove\">--after</option></command> 這個命令,告訴 Mercurial 你真的想要把那些"
+"檔案刪除。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:177
 "role=\"hg-cmd\">hg revert</command> the name of the file to recover.  It will "
 "reappear, in unmodified form."
 msgstr ""
+"反過來說,如果你是不小心把檔案刪掉的,那麼你可以利用 <command role=\"hg-cmd"
+"\">hg revert</command> 加上檔案名稱救回該檔案。檔案會重新出現,並回到未被修改"
+"的狀態。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:186
 msgid "Aside: why tell Mercurial explicitly to remove a file?"
-msgstr ""
+msgstr "題外話:為什麼要明確地告訴 Mercrial 說要移除檔案?"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:189
 "command>, and stop tracking the file.  In practice, this made it too easy to "
 "accidentally remove a file without noticing."
 msgstr ""
+"你可能會很好奇:為什麼 Mercurial 會要求你一定要表明你想要將某個檔案刪除。在 "
+"Mercurial 開發初期,想要刪除一個檔案的確只要直接刪掉就好;當你執行 <command "
+"role=\"hg-cmd\">hg commit</command> 時,Mercurial 會自動偵測到檔案不見了,然後"
+"停止追蹤這個檔案。然而在實際運用上,這麼做很容易發生誤刪檔案卻沒被發覺的情況。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:200
 msgid "Useful shorthand&emdash;adding and removing files in one step"
-msgstr ""
+msgstr "快速命令&emdash;單步完成檔案新增與移除"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:203
 "addremove</command>, that adds untracked files and marks missing files as "
 "removed."
 msgstr ""
+"Mercurial 提供了一個組合命令,叫做 <command role=\"hg-cmd\">hg addremove</"
+"command>,可以一次新增所有未被追蹤的檔案全部,同時移除所有遺失的檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:209
 "<option role=\"hg-opt-commit\">-A</option> option that performs this same add-"
 "and-remove, immediately followed by a commit."
 msgstr ""
+"<command role=\"hg-cmd\">hg commit</command> 這個命令也提供了 <option role="
+"\"hg-opt-commit\">-A</option> 這個選項,相當於先執行一次 <command role=\"hg-"
+"cmd\">hg addremove</command>,然後立刻提交當前的變更狀態。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:219
 msgid "Copying files"
-msgstr ""
+msgstr "複製檔案"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:221
 "original file.  It treats these copied files specially when you merge your "
 "work with someone else's."
 msgstr ""
+"Mercurial 提供了 <command role=\"hg-cmd\">hg copy</command> 這個命令,讓使用者"
+"可以複製檔案。當你使用這個命令複製檔案之後,Mercurial 會特別記錄新的檔案是從原"
+"本的哪個檔案複製過來的。之後,當你要合併人別人的儲存庫時,Mercurial 會用特別的"
+"方法處理這些檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:229
 msgid "The results of copying during a merge"
-msgstr ""
+msgstr "合併複製過的檔案"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:231
 "best illustrate what this means, let's create an example.  We'll start with "
 "the usual tiny repository that contains a single file."
 msgstr ""
+"檔案複製<quote>之後</quote>所做的變更,在合併時會怎麼處理?我們用個例子來說"
+"明。首先,我們先建立只有一個檔案的小小儲存庫。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:238
 msgid ""
 "We need to do some work in parallel, so that we'll have something to merge.  "
 "So let's clone our repository."
-msgstr ""
+msgstr "我們需要同時在兩邊做些事情,才能進行合併。所以我們拓製一份儲存庫。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:244
 "Back in our initial repository, let's use the <command role=\"hg-cmd\">hg "
 "copy</command> command to make a copy of the first file we created."
 msgstr ""
+"回到我們原本的儲存庫,使用 <command role=\"hg-cmd\">hg copy</command> 命令複製"
+"原本的那個檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:250
 "If we look at the output of the <command role=\"hg-cmd\">hg status</command> "
 "command afterwards, the copied file looks just like a normal added file."
 msgstr ""
+"此時,若是我們利用 <command role=\"hg-cmd\">hg status</command> 觀察儲存庫狀"
+"態,複製出來的那個檔案看起來就像個普通的新增檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:256
 "output: this is the file that our newly-added file was copied <emphasis>from</"
 "emphasis>."
 msgstr ""
+"但若是我們在 <command role=\"hg-cmd\">hg status</command> 後面加上 <option "
+"role=\"hg-opt-status\">-C</option> 這個選項,我們就會看到另外一行的輸出:表示"
+"這個檔案是<emphasis>從</emphasis>哪個檔案複製過來的。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:264
 msgid ""
 "Now, back in the repository we cloned, let's make a change in parallel.  "
 "We'll add a line of content to the original file that we created."
-msgstr ""
+msgstr "現在,回到拓製出來的儲存庫中。我們在原始的檔案中加上一行內容。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:270
 "Mercurial will propagate the changes that we made locally to <filename>file</"
 "filename> into its copy, <filename>new-file</filename>."
 msgstr ""
+"現在,在這個儲存庫中,我們有修改過的 <filename>file</filename>。當我們從第一個"
+"儲存庫中將變更拉取過來、合併之後,Mercurial 會將我們對 <filename>file</"
+"filename> 所做的修改內容同步移植到複製出來的 <filename>new-file</filename> 之"
+"中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:280
 msgid "Why should changes follow copies?"
-msgstr ""
+msgstr "為什麼變更內容要跟著複製的檔案跑?"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:282
 "This behavior&emdash;of changes to a file propagating out to copies of the "
 "file&emdash;might seem esoteric, but in most cases it's highly desirable."
 msgstr ""
+"「對單一檔案的變更會被移植到該檔案的複本中」這樣的行為看起來有點怪,但在大部份"
+"的情況下,其實都是使用者想要的結果。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:286
 "a file, and subsequently modify the original file during the normal course of "
 "your work, nothing will happen."
 msgstr ""
+"首先,這樣的移植動作<emphasis>只會</emphasis>發生在合併的時候。所以如果你  "
+"<command role=\"hg-cmd\">hg copy</command> 了一個檔案,然後開始修改原始的那個"
+"檔案,這些修改內容不會發生在複本中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:292
 "copy as long as the changeset that you're merging changes from "
 "<emphasis>hasn't yet seen</emphasis> the copy."
 msgstr ""
+"其次,只有在合併來源的變更集中<emphasis>還不知道</emphasis>檔案被複製的前提"
+"下,變更內容才會被移植過去。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:297
 "repository, without knowing about the bug or having seen the fix, and you "
 "have started hacking on your copy of the file."
 msgstr ""
+"Mercurial 這麼做的理由如下。假設我修正了原始檔案中某個很嚴重的錯誤,然後將變更"
+"內容提交。同時,你決定要在你的儲存庫中 <command role=\"hg-cmd\">hg copy</"
+"command> 這個檔案。在不知道這個錯誤(或是不知道我已經修正)的情況下,你開始修"
+"改這個檔案的複本。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:304
 "contain the bug, and unless you knew to propagate the bug fix by hand, the "
 "bug would <emphasis>remain</emphasis> in your copy of the file."
 msgstr ""
+"如果你將我的變更拉回去,和你的修改內容合併,但 Mercurial <emphasis>沒有</"
+"emphasis>將變更移植到檔案複本中,那麼這個臭蟲就仍存在你的新版檔案中。除非你知"
+"道有這件事,並手動將變更移植過去,否則這個臭蟲就會<emphasis>一直留存</"
+"emphasis>在複製出來的檔案中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:310
 "Mercurial is the <emphasis>only</emphasis> revision control system that "
 "propagates changes across copies like this."
 msgstr ""
+"Mercurial 透過自動將變更從原始檔案移植到複本的方法,避開了這類的問題。據我所"
+"知,Mercurial 是<emphasis>唯一一套</emphasis>會這樣移植變更內容的版本控制系"
+"統。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:316
 "original file to the copied file, and that's why Mercurial only propagates "
 "changes across copies at the first merge, and not afterwards."
 msgstr ""
+"只要你的變更歷史中有「複製、然後合併」的記錄,通常之後針對原始檔案的變更就不需"
+"要再移植到複本檔案中了。這也就是為何 Mercurial 只會在複製後的第一次合併時幫你"
+"移植變更內容,之後就不會再這麼做的原因。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:324
 msgid "How to make changes <emphasis>not</emphasis> follow a copy"
-msgstr ""
+msgstr "如何要求變更內容<emphasis>不要</emphasis>被移植到複本去"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:327
 "\"sec:daily:why-copy\"/>, and make an informed decision that this behavior is "
 "not appropriate to your specific case."
 msgstr ""
+"如果你基於某些理由,覺得 Mercurial 這種自動移植的作法非你所願,你可以直接使用"
+"系統的複製指令(例如 Unix 類系統中的 <command>cp</command> 指令)直接複製檔"
+"案,然後再手動將複本 <command role=\"hg-cmd\">hg add</command> 進儲存庫中。當"
+"你打算這麼做之前,建議你重讀 <xref linkend=\"sec:daily:why-copy\"/> 一節,確"
+"定 Mercurial 的行為並不適用於你的特殊個案中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:340
 msgid "Behavior of the <command role=\"hg-cmd\">hg copy</command> command"
-msgstr ""
+msgstr "<command role=\"hg-cmd\">hg copy</command> 命令的行為"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:343
 "have made up until that point.  (I find this behavior a little "
 "counterintuitive, which is why I mention it here.)"
 msgstr ""
+"當你執行 <command role=\"hg-cmd\">hg copy</command> 命令時,Mercurial 會複製檔"
+"案目前在工作目錄中的狀態。這個意思是說:假設你修改了某個檔案,在提交之前,"
+"<command role=\"hg-cmd\">hg copy</command> 了這個檔案,那麼產生出來的複本內容"
+"會和執行 <command role=\"hg-cmd\">hg copy</command> 當時來源檔案的內容一樣。"
+"(我覺得這個行為不太直覺,因此我特別在此說明。)"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:353
 "arguments, of which the last is treated as the <emphasis>destination</"
 "emphasis>, and all others are <emphasis>sources</emphasis>."
 msgstr ""
+"Mercurial 的 <command role=\"hg-cmd\">hg copy</command> 命令行為模式和 Unix "
+"的 <command>cp</command> 指令類似(你也可以使用 <command role=\"hg-cmd\">hg "
+"cp</command> 這樣的別名命令)。我們必須提供兩個以上的引數,其中最後一個表示複"
+"製的<emphasis>目的地</emphasis>,其他的則都是<emphasis>來源</emphasis>。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:361
 "source, and the destination does not exist, it creates a new file with that "
 "name."
 msgstr ""
+"要是 <command role=\"hg-cmd\">hg copy</command> 的來源引數是單一的檔案,然後目"
+"的地不存在,那麼 Mercurial 就會以目的地名稱為檔名,建立一個新的檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:367
 msgid ""
 "If the destination is a directory, Mercurial copies its sources into that "
 "directory."
-msgstr ""
+msgstr "如果目的地是目錄,Mercurial 會將所有來源的檔案複製到那個目錄中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:372
 msgid ""
 "Copying a directory is recursive, and preserves the directory structure of "
 "the source."
-msgstr ""
+msgstr "Mercurial 會以遞迴的方式複製整個目錄,並且保留目錄的完整結構。 "
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:378
 msgid ""
 "If the source and destination are both directories, the source tree is "
 "recreated in the destination directory."
-msgstr ""
+msgstr "要是來源和目的地都是目錄,那麼來源的目錄樹會在目的地目錄中完整重建。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:383
 "simply use the <option role=\"hg-opt-copy\">--after</option> option to "
 "<command role=\"hg-cmd\">hg copy</command>."
 msgstr ""
+"和 <command role=\"hg-cmd\">hg remove</command> 一樣,若是你手動複製了一個檔"
+"案,然後希望 Mercurial 知道你剛剛複製了這個檔案,你可以在 <command role=\"hg-"
+"cmd\">hg copy</command> 後面加上 <option role=\"hg-opt-copy\">--after</"
+"option> 這個選項。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:394
 msgid "Renaming files"
-msgstr ""
+msgstr "變更檔案名稱"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:396
 "essentially the same way as a copy.  Therefore, knowing what Mercurial does "
 "when you copy a file tells you what to expect when you rename a file."
 msgstr ""
+"和複製檔案比起來,其實我們變更檔案名稱的機會還比較多一點。那為什麼在談變更檔名"
+"之前,要先討論 <command role=\"hg-cmd\">hg copy</command> 呢?因為 Mercurial "
+"其實基本上就是把變更檔名當作檔案複製來處理的。因此,在了解 Mercurial 怎麼處理"
+"檔案的複製後,你就知道變更檔名後會發生什麼事了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:404
 "Mercurial makes a copy of each source file, then deletes it and marks the "
 "file as removed."
 msgstr ""
+"當你執行 <command role=\"hg-cmd\">hg rename</command> 這個命令時,Mercurial 會"
+"複製一份所有的來源檔案,然後再把這些來源檔案標記為「移除」。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:410
 "The <command role=\"hg-cmd\">hg status</command> command shows the newly "
 "copied file as added, and the copied-from file as removed."
 msgstr ""
+"我們可以利用 <command role=\"hg-cmd\">hg status</command> 命令看到:新產生出來"
+"的檔案被標記為「新增」;而原本的來源檔案則是被標為「移除」。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:416
 "\"hg-cmd\">hg status</command> to see that the added file is really being "
 "tracked by Mercurial as a copy of the original, now removed, file."
 msgstr ""
+"和執行過 <command role=\"hg-cmd\">hg copy</command> 的情形一樣,若是我們在 "
+"<command role=\"hg-cmd\">hg status</command> 加上 <option role=\"hg-opt-status"
+"\">-C</option> 這個選項,我們可以發現:這些新增的檔案對 Mercurial 來說其實是和"
+"原始的檔案(現在已經被移除了)有關連的。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:425
 "command> command, and the options it accepts, are similar to the <command "
 "role=\"hg-cmd\">hg copy</command> command."
 msgstr ""
+"和 <command role=\"hg-cmd\">hg remove</command> 以及 <command role=\"hg-cmd"
+"\">hg copy</command> 一樣,你也可以先直接變更檔名,然後再利用 <option role="
+"\"hg-opt-rename\">--after</option> 這個選項,告訴 Mercurial 你已經這麼做了。在"
+"大部份的情況下,<command role=\"hg-cmd\">hg rename</command> 和 <command role="
+"\"hg-cmd\">hg copy</command> 的行為模式以及可以用的參數都差不多。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:434
 "<command role=\"hg-cmd\">hg rename</command> command can be invoked as "
 "<command role=\"hg-cmd\">hg mv</command>."
 msgstr ""
+"如果你相當熟悉 Unix 的命令列指令,那麼這個小技巧對你來說應該很親切:你可以用 "
+"<command role=\"hg-cmd\">hg mv</command> 取代 <command role=\"hg-cmd\">hg "
+"rename</command>,效果完全一模一樣。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:440
 msgid "Renaming files and merging changes"
-msgstr ""
+msgstr "變更檔名並合併變更內容"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:442
 "Since Mercurial's rename is implemented as copy-and-remove, the same "
 "propagation of changes happens when you merge after a rename as after a copy."
 msgstr ""
+"因為 Mercurial 是利用「複製+移除」方式實作變更檔名功能的,所以當你合併變更檔名"
+"後的檔案時,和複製後一樣,Mercurial 會幫你移植變更內容到新的檔案中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:446
 "expect to <quote>simply work,</quote> but not all revision control systems "
 "actually do this.)"
 msgstr ""
+"假設我修改了某個檔案,而你在另一個儲存庫中變更了同一個檔案的名稱。當我們合併儲"
+"存庫時,我在原始檔案中所做的修改內容,就會被移植到你改過檔名的檔案中。(這樣的"
+"行為聽起來好像<quote>非常直覺</quote>,但不是所有的版本控制系統都會這麼做。)"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:453
 "it would simply be too easy for changes to become orphaned when files are "
 "renamed."
 msgstr ""
+"在前面我們提到修改內容會跟著被複製的檔案跑時,你可能只是對對頭說:「嗯,這功能"
+"可能有點用吧!」但對於變更檔名這個功能來說,這個特性明顯得再重要不過了!要是沒"
+"有這個特性,當檔案名稱被變更時,其他人所做的修改內容就不知該何去何從了。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:462
 msgid "Divergent renames and merging"
-msgstr ""
+msgstr "檔名變更分歧與合併"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:464
 "file&emdash;let's call it <filename>foo</filename>&emdash;in their respective "
 "repositories."
 msgstr ""
+"舉個例子來說明檔案變更分歧是怎麼發生的。假設有兩個開發人員在各自的儲存庫中處理"
+"同一個檔案&emdash;姑且叫它<filename>foo</filename>吧。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:471
 msgid "Anne renames the file to <filename>bar</filename>."
-msgstr ""
+msgstr "安妮把檔名改為 <filename>bar</filename>。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:475
 "<command role=\"hg-cmd\">hg mv</command> is an alias for <command role=\"hg-"
 "cmd\">hg rename</command>.)"
 msgstr ""
+"在此同時,包伯把檔名改成 <filename>quux</filename>。(提醒一下:<command role="
+"\"hg-cmd\">hg mv</command> 是 <command role=\"hg-cmd\">hg rename</command> 的"
+"別名用法。)"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:482
 "I like to think of this as a conflict because each developer has expressed "
 "different intentions about what the file ought to be named."
 msgstr ""
+"我通常會將這樣的情況視為衝突,因為不同的開發人員對於檔案應該叫什麼名字有不同的"
+"想法。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:486
 "actual behavior is that it always preserves <emphasis>both</emphasis> names "
 "when it merges changesets that contain divergent renames."
 msgstr ""
+"當他們合併工作成果時,你覺得會發生什麼事呢?當兩個要合併在一起的變更集中發生貝"
+"檔名變更分歧的時候,Mercurial 的做法是:兩個不同檔名的檔案<emphasis>一併保留</"
+"emphasis>。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:493
 "Notice that while Mercurial warns about the divergent renames, it leaves it "
 "up to you to do something about the divergence after the merge."
 msgstr ""
+"你可以看到:Mercurial 遇到檔名變更分歧時會產生警告訊息,然後在合併完成後,由使"
+"用者自行決定要怎麼處理這個問題。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:499
 msgid "Convergent renames and merging"
-msgstr ""
+msgstr "收斂式檔名變更與合併"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:501
 "<emphasis>destination</emphasis>. In this case, Mercurial runs its normal "
 "merge machinery, and lets you guide it to a suitable resolution."
 msgstr ""
+"還有另一種不同的檔案名稱變更衝突:兩個人將不同的<emphasis>來源檔案</emphasis>"
+"檔名變更為相同的<emphasis>目的地檔案</emphasis>名稱。在這種情況下,Mercurial "
+"會依一般的方式進行合併,然後讓使用者自行決定要如何解決這樣的問題。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:509
 msgid "Other name-related corner cases"
-msgstr ""
+msgstr "其他和名稱相關的特殊個案"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:511
 "same name.  This is documented as <ulink role=\"hg-bug\" url=\"http://www."
 "selenic.com/mercurial/bts/issue29\">issue 29</ulink>."
 msgstr ""
+"Mercurial 有個存在已久的問題:若是在合併時,其中一個儲存庫中的<emphasis>目錄</"
+"emphasis>名稱、和另一個儲存庫中相同位置的<emphasis>檔案</emphasis>名稱相同,那"
+"麼 Mercurial 就沒辦法合併。詳細的文件可以參閱 <ulink role=\"hg-bug\" url="
+"\"http://www.selenic.com/mercurial/bts/issue29\">issue 29</ulink>。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:524
 msgid "Recovering from mistakes"
-msgstr ""
+msgstr "從錯誤中復原"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:526
 msgid ""
 "Mercurial has some useful commands that will help you to recover from some "
 "common mistakes."
-msgstr ""
+msgstr "Mercurial 提供了一些有用的命令,可以幫助你從一些常見的錯誤中復原。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:529
 "for adding by Mercurial any longer, either.  You can also use <command role="
 "\"hg-cmd\">hg revert</command> to get rid of erroneous changes to a file."
 msgstr ""
+"<command role=\"hg-cmd\">hg revert</command> 這個命令可以復原所有對工作目錄所"
+"做的修改內容。舉例來說,如果你不小心用 <command role=\"hg-cmd\">hg add</"
+"command> 加入了一個檔案,只要執行 <command role=\"hg-cmd\">hg revert</"
+"command> 加上被加入的檔案名稱,Mercurial 就不會去追蹤這個檔案,而且檔案的內容"
+"也完全不會被修改。你也可以使用 <command role=\"hg-cmd\">hg revert</command> 命"
+"令把錯誤的修改內容從檔案中移除。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:539
 "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."
 msgstr ""
+"對於那些尚未提交的變更來說,<command role=\"hg-cmd\">hg revert</command> 是個"
+"非常好用的工具。當變更內容被提交之後才發現有問題,還是有辦法可以補救,不過這時"
+"候的選擇就相當有限了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:546
 "command, and details about how to deal with changes you have already "
 "committed, see <xref linkend=\"chap:undo\"/>."
 msgstr ""
+"更多 <command role=\"hg-cmd\">hg revert</command> 命令相關的資訊、以及如何處理"
+"已提交的內容的詳細說明,請參閱 <xref linkend=\"chap:undo\"/> 一節。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:553
 msgid "Dealing with tricky merges"
-msgstr ""
+msgstr "處理合併時所遇到的問題"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:555
 "inevitably going to result in conflicts, some of which can take a few tries "
 "to sort out."
 msgstr ""
+"在大型或架構複雜的專案中,合併變更內容時遇到問題算是很平常的事。假設專案中有個"
+"很大的檔案,合併來源的兩邊都修改了其中的內容,此時免不了會發生合併衝突。有些衝"
+"突得要試著合併好幾次才能完全解決。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:562
 "Let's develop a simple case of this and see how to deal with it.  We'll start "
 "off with a repository containing one file, and clone it twice."
 msgstr ""
+"我們來看一個簡單的例子,模擬衝突發生的情況,然後想辦法解決這個問題。首兒,我們"
+"建立一個只有一個檔案的儲存庫,然後拓製兩份。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:568
 msgid "In one clone, we'll modify the file in one way."
-msgstr ""
+msgstr "我們修改其中一個複本中的檔案。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:572
 msgid "In another, we'll modify the file differently."
-msgstr ""
+msgstr "然後,我們再把另一個複本中的檔案修改成另一個樣子。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:576
 msgid "Next, we'll pull each set of changes into our original repo."
-msgstr ""
+msgstr "接下來,我們把兩邊的變更內容分別拉回原本的儲存庫中。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:581
 msgid "We expect our repository to now contain two heads."
-msgstr ""
+msgstr "此時,原始的儲存庫中會有兩個 head。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:585
 "things for presentation here, we'd like the merge to fail immediately "
 "instead.  Here's one way we can do so."
 msgstr ""
+"一般來說,若是我們在這個時候執行 <command role=\"hg-cmd\">hg merge</command> "
+"的話,系統應該會帶出一個圖形使用者介面的編輯器,讓我們可以編輯 "
+"<filename>myfile.txt</filename>,手動解決衝突問題。不過在此,為了方便說明,我"
+"們打算讓合併作業直接失敗。要達成這樣的效果,其中一種方法如下。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:594
 "command> (which, as we desire, fails immediately) if it detects a merge that "
 "it can't sort out automatically."
 msgstr ""
+"這行是告訴 Mercurial:要是合併作業無法自動完成的話,就去執行 <command>merge</"
+"command>(譯註:原文為 <command>false</command>,應為筆誤)進行合併;而此時執"
+"行這個指令會失敗,正好符合我們的需求。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:599
 "If we now fire up <command role=\"hg-cmd\">hg merge</command>, it should "
 "grind to a halt and report a failure."
 msgstr ""
+"現在,若我們執行 <command role=\"hg-cmd\">hg merge</command> 的話,合併程序會"
+"停下來,然後出現一些錯誤訊息。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:605
 "Even if we don't notice that the merge failed, Mercurial will prevent us from "
 "accidentally committing the result of a failed merge."
 msgstr ""
+"就算我們沒有注意到合併失敗的錯誤訊息,Mercurial 也不會讓我們提交,以免我們不小"
+"心把合併失敗的結果存進儲存庫中。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:611
 "command> command.  As usual, <command role=\"hg-cmd\">hg help resolve</"
 "command> will print a helpful synopsis."
 msgstr ""
+"在現在這個情況下,當 <command role=\"hg-cmd\">hg commit</command> 執行失敗的時"
+"候,Mercurial 建議我們執行一個不怎麼眼熟的命令:<command role=\"hg-cmd\">hg "
+"resolve</command>。和其他的命令一樣,鍵入 <command role=\"hg-cmd\">hg help "
+"resolve</command> 的話,Mercurial 會列出一些有用的說明。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:618
 msgid "File resolution states"
-msgstr ""
+msgstr "檔案問題解決狀態"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:620
 "When a merge occurs, most files will usually remain unmodified.  For each "
 "file where Mercurial has to do something, it tracks the state of the file."
 msgstr ""
+"當我們進行合併的時候,大部份的檔案通常都不會被修改到;而那些需要 Mercurial 修"
+"改的檔案,Mercurial 會去追蹤它們的狀態。"
 
 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:626
 "A <emphasis>resolved</emphasis> file has been successfully merged, either "
 "automatically by Mercurial or manually with human intervention."
 msgstr ""
+"若是檔案被標為<emphasis>已解決 (resolved)</emphasis>,即表示該檔案已經成功合併"
+"了&emdash;可能是 Mercurial 自動完成的,也可能是人工手動修改完成的。"
 
 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:631
 "An <emphasis>unresolved</emphasis> file was not merged successfully, and "
 "needs more attention."
 msgstr ""
+"若檔案被標為<emphasis>未解決 (unresolved)</emphasis>,即表示該檔案尚未完成合"
+"併,需要我們多多關照一下。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:636
 "a merge, it considers the merge to have failed.  Fortunately, we do not need "
 "to restart the entire merge from scratch."
 msgstr ""
+"要是在合併之後,Mercurial 發現有<emphasis>任何</emphasis>未解決的檔案存在,這"
+"次的合併作業就算是失敗了。還好,我們不需要重新執行整個合併程序。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:641
 "resolve\">-l</option> option to <command role=\"hg-cmd\">hg resolve</command> "
 "prints out the state of each merged file."
 msgstr ""
+"我們可以利用 <command role=\"hg-cmd\">hg resolve</command> 命令再加上 <option "
+"role=\"hg-opt-resolve\">--list</option> 或是 <option role=\"hg-opt-resolve\">-"
+"l</option> 選項,查看每個被合併的檔案狀態。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:648
 "literal>, we know that an attempt to commit the results of the merge will "
 "fail."
 msgstr ""
+"在 <command role=\"hg-cmd\">hg resolve</command> 的輸出結果中,已解決的檔案會"
+"被標上 <literal>R</literal> 這個字母;而未解決的檔案前面則是 <literal>U</"
+"literal>。要是我們看到還有檔案的前面是 <literal>U</literal> 的話,就表示我們沒"
+"辦法提交目前的檔案狀態。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch05-daily.xml:657
 msgid "Resolving a file merge"
-msgstr ""
+msgstr "解決合併失敗的檔案"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:659
 "<option role=\"hg-opt-resolve\">-a</option> option, which will retry the "
 "merges of <emphasis>all</emphasis> unresolved files."
 msgstr ""
+"想要把檔案的狀態從「未解決」轉為「已解決」有好幾個方法。我們最常用的方法是重新"
+"執行 <command role=\"hg-cmd\">hg resolve</command>。若是我們在執行的時候後面加"
+"上檔案或是目錄的名稱的話,Mercurial 就會再次試著去合併指定位置中未解決的檔案。"
+"我們也可以在 <command role=\"hg-cmd\">hg resolve</command> 後面加上 <option "
+"role=\"hg-opt-resolve\">--all</option> 或是 <option role=\"hg-opt-resolve\">-"
+"a</option>,如此一來 Mercurial 就會再試著去合併<emphasis>所有</emphasis>未解決"
+"的檔案。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch05-daily.xml:669
 "particularly messy merge by hand, and to keep track of our progress with each "
 "file as we go."
 msgstr ""
+"Mercurial 也提供了直接修改解決狀態的方法。我們可以使用 <option role=\"hg-opt-"
+"resolve\">--mark</option> 這個選項,將檔案標為「已解決」;或是使用 <option "
+"role=\"hg-opt-resolve\">--unmark</option> 這個選項將檔案標為「未解決」。我們可"
+"以利用這種方法手動清理極度混亂的合併結果,讓 Mercurial 可以記錄我們處理每一個"
+"檔案的進度。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:680
 msgid "More useful diffs"
-msgstr ""
+msgstr "更好用的 diff"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:682
 "is backwards compatible with the regular <command>diff</command> command, but "
 "this has some drawbacks."
 msgstr ""
+"為了向前相容,<command role=\"hg-cmd\">hg diff</command> 的預設輸出結果和 "
+"<command>diff</command> 輸出的格式相同。但這麼做有幾個缺點。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:687
 "Consider the case where we use <command role=\"hg-cmd\">hg rename</command> "
 "to rename a file."
 msgstr ""
+"假設我們用 <command role=\"hg-cmd\">hg rename</command> 變更某個檔案的檔名。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:692
 "option>, to use a newer diff format that displays such information in a more "
 "readable form."
 msgstr ""
+"<command role=\"hg-cmd\">hg diff</command> 的輸出結果很難看出來我們只是在改檔"
+"名。<command role=\"hg-cmd\">hg diff</command> 命令接受 <option>--git</"
+"option> 或是 <option>-g</option> 這個選項,可以用比較新的 diff 格式,輸出比較"
+"容易閱讀的資訊。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:701
 "command>, but for which <command role=\"hg-cmd\">hg diff</command> prints "
 "nothing. This situation can arise if we change the file's execute permissions."
 msgstr ""
+"在某個很特殊的狀況,這個選項也很有用:在 <command role=\"hg-cmd\">hg status</"
+"command> 的輸出結果中,某個檔案被標為被修改過了;但若是我們用 <command role="
+"\"hg-cmd\">hg diff</command> 查看,卻發現什麼都沒有。這樣的情況在我們修改了檔"
+"案的可執行權限時會發生。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:710
 "nothing by default.  If we supply it with the <option>-g</option> option, it "
 "tells us what really happened."
 msgstr ""
+"正常的 <command>diff</command> 指令不會管檔案的權限,所以預設的 <command role="
+"\"hg-cmd\">hg diff</command> 不會印出任何差異。如果我們加上 <option>-g</"
+"option> 的話,就可以看出到底發生了什麼事。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:720
 msgid "Which files to manage, and which to avoid"
-msgstr ""
+msgstr "哪些檔案適合利用儲存庫管理,哪些不適合"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:722
 "from one revision to the next.  Some centralized revision control systems can "
 "also deal tolerably well with binary files, such as bitmap images."
 msgstr ""
+"一般來說,最適合利用版本控制系統管理的檔案是人類寫出來的純文字文件,例如程式的"
+"原始碼。因為這類檔案版本之間的差異不會太大。某些中央集權式的版本控制系統處理二"
+"進位檔案(例如圖片檔)也還算得心應手。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:728
 "code and all of its binary assets (e.g. geometry data, textures, map layouts) "
 "in a revision control system."
 msgstr ""
+"舉例來說,開發遊戲的團隊通常就會同時把程式碼以及其他的二進位格式資料(像是 3D "
+"模型、貼圖、地圖資料....等)送進版本控制系統中統一管理。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:733
 "allow a user to say <quote>I am the only person who can edit this file</"
 "quote>."
 msgstr ""
+"當二進位格式的檔案遇到合併衝突的時候,通常不可能直接合併,因此中央集權式的系統"
+"通常會提供「鎖定」的機制,讓使用者可以宣告<quote>現在我是唯一可以修改這個檔案"
+"的人</quote>。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:739
 "changes some of the factors that guide decisions over which files to manage "
 "and how."
 msgstr ""
+"分散式版本控制系統的許多特性和中央集權式系統不同,因此怎麼樣的檔案適合管理以及"
+"如何管理也大不相同。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:743
 "may not be a good idea to use Mercurial&emdash;or any other distributed "
 "revision control system&emdash;to manage those files."
 msgstr ""
+"舉例來說,基於分散式版本控制系統本身的天性,無法提供「鎖定檔案」這樣的功能,因"
+"此也沒有內建的機制可以避免兩個人同時修改同一個二進位檔案,最後造成衝突。如果你"
+"工作的團隊中有數個開發人員常會去修改同一個二進位檔案的話,也許這些檔案就不適合"
+"利用 Mercurial&emdash;或是其他任何的分散式版本控制系統&emdash;管理。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:751
 "efficiently.  This can affect both local storage needs and the amount of time "
 "it takes to clone a repository."
 msgstr ""
+"當 Mercurial 儲存修改內容時,通常只會儲存前後版本之間的差異。對於純文字檔案來"
+"說,這是最有效率的作法。然而,有些檔案(特別是二進位格式的檔案)只要(在邏輯上"
+"來說)修改一點點內容,幾乎整個檔案的資料都和前一個版本不一樣。舉例來說,經過壓"
+"縮的檔案就對這樣的修改相當敏感。如果每個前後版本的差距都這麼大,那麼 "
+"Mercurial 就沒有辦法很有效率地儲存檔案的版次歷史了。不但儲存庫佔用的磁碟空間會"
+"很龐大,在拓製儲存庫的時候也會浪費很多時間。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:764
 "friendly to Mercurial's storage assumptions can easily have an outsized "
 "effect on the size of the repository."
 msgstr ""
+"在實際應用上,這對我們會有什麼影響呢?我們來看個例子。假設你想要利用 "
+"Mercurial 去管理一份 OpenOffice 的文件。OpenOffice 的文件其實是以 zip 壓縮格式"
+"儲存的。即使你在 OpenOffice 中只修改了文件中的一個字母,存檔之後,幾乎整個檔案"
+"的每一個 byte 都不會一樣。現在假設這個檔案的大小為 2MB。因為每次你儲存的時候,"
+"幾乎整個檔案都有變動,所以每當你提交一次,Mercurial 就得存 2MB 的資料進儲存庫"
+"&emdash;雖然從你的角度來看,每次只修改了幾個字而已。若是儲存庫中有一個經常被修"
+"改、卻又不符合 Mercurial 的儲存假設(每次只變動一小部份),那麼儲存庫很容易就"
+"長得過度肥大。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:777
 "even a good way to tell what the differences are between your respective "
 "changes."
 msgstr ""
+"更慘的是:若是另一個同事也修改了這份 OpenOffice 的文件,那麼你們修改的部份完全"
+"沒辦法合併。事實上,甚至沒有什麼方法可以比較這類檔案的不同之處。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:782
 msgid ""
 "There are thus a few clear recommendations about specific kinds of files to "
 "be very careful with."
-msgstr ""
+msgstr "關於這些處理時要特別注意的檔案類型,在此歸納幾個要注意的地方。"
 
 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:787
 "Files that are very large and incompressible, e.g. ISO CD-ROM images, will by "
 "virtue of sheer size make clones over a network very slow."
 msgstr ""
+"非常龐大且無法壓縮的檔案(例如光碟片的 ISO 檔)會直接讓儲存庫的體積增加,透過"
+"網路拓製儲存庫會變得非常慢。"
 
 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
 #: ../en/ch05-daily.xml:792
 "store if you edit them frequently, and conflicts due to concurrent edits may "
 "be difficult to resolve."
 msgstr ""
+"那些前後版次之間差異非常大的檔案,若是你經常去編輯的話,也會花掉很多的儲存空"
+"間,而且若是發生合併衝突時,問題會很難解決。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch05-daily.xml:801
 msgid "Backups and mirroring"
-msgstr ""
+msgstr "備份與鏡像映射"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:803
 "of the repository from one contributor, and pulling any changes they may not "
 "have seen from others."
 msgstr ""
+"在每份被拓製的 Mercurial 儲存庫中,都有完整的儲存庫歷史資訊。因此,當災難發生"
+"的時候,每個利用 Mercurial 拓製儲存庫的專案成員都有資格提供備份的儲存庫。若是"
+"中央儲存庫出了問題,只要拓製其中一位成員的儲存庫回中央伺服器,便可取代原本的中"
+"央儲存庫。接下來只要從其他人那裡把這位成員所沒有的變更再拉進去就完成了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:811
 "master repositories you maintain changes frequently, in which case you'll "
 "need to do a little scripting to refresh the list of repositories to back up."
 msgstr ""
+"要做異地備份或是遠端鏡像映射也是小事一件。只要在遠端的電腦中設定定時作業(例如"
+"使用 <command>cron</command> 指令),每個小時去捉取一次主儲存庫的變更回來,就"
+"好了。在某些極端的狀況下情況可能複雜一點,像是你負責維護的主儲存庫的數量經常變"
+"動。若真的是這樣,你可能需要寫個腳本程式,隨時更新需要備份的儲存庫列表。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:820
 "option> option doesn't check out a working directory after the clone "
 "completes, since that would be superfluous and make the backup take longer."
 msgstr ""
+"若是你用傳統的方法,把主儲存庫(假設名稱叫做 <filename>myrepo</filename>)備份"
+"到磁帶或是磁碟上的話,你可以在開始備份之前,先執行 <command>hg clone -U "
+"myrepo myrepo.bak</command> 這個命令。拓製時加上 <option>-U</option> 這個選項"
+"的話,Mercurial 就不會在拓製後 check out 一份工作目錄出來,這樣可以減少不必要"
+"的空間,縮短備份所需的時間。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch05-daily.xml:829
 "snapshot of your repository that won't be pushed to by an insomniac developer "
 "in mid-backup."
 msgstr ""
+"若是你接下來備份的是 <filename>myrepo.bak</filename> 而非 <filename>myrepo</"
+"filename>,還有一個好處:這份儲存庫絕對是一份穩定的「快照」,不會在備份到一半"
+"的時候,遇到某個晚上不睡覺的開發人員想要把程式碼推進去。"
 
 #. type: Content of: <book><chapter><title>
 #: ../en/ch06-collab.xml:5
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.