Commits

Kenneth Lo  committed 7445255 Draft

[zh-TW] Translated 12.1-12.3.

  • Participants
  • Parent commits dcec917

Comments (0)

Files changed (1)

 msgstr ""
 "Project-Id-Version: hgbook 1.2\n"
 "POT-Creation-Date: 2011-11-01 20:40+0800\n"
-"PO-Revision-Date: 2011-11-27 13:34+0800\n"
+"PO-Revision-Date: 2011-12-02 20:28+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><sect1><title>
 #: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187
 msgid "Understanding patches"
-msgstr "了解<quote>修補 (patches)</quote>"
+msgstr "了解補丁"
 
 #. type: Content of: <book><chapter><sect1><tip><para>
 #: ../en/ch02-tour-basic.xml:520
 #. type: Content of: <book><chapter><title>
 #: ../en/ch12-mq.xml:5
 msgid "Managing change with Mercurial Queues"
-msgstr ""
+msgstr "使用 Mercurial Queues 管理變更"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch12-mq.xml:8
 msgid "The patch management problem"
-msgstr ""
+msgstr "補丁管理的問題"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:10
 "extract your fix from the older source tree and apply it against the newer "
 "version.  This is a tedious task, and it's easy to make mistakes."
 msgstr ""
+"下面是一個常見的情況:你需要從原始碼開始安裝某個軟體套件,但你在安裝的過程中,"
+"發現了非修正不可的問題。你修正了這個問題,就把這個問題拋在腦後。幾個月之後,你"
+"需要升級這個套件到最新的版本。要是之前的那個問題在最新版本中還是存在,你就得把"
+"修正的方法從舊版本中找出來,然後再加回新的版本之中。這個工作很煩人,而且很容易"
+"出錯。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:20
 "able to keep those changes separate, so that you can apply them to newer "
 "versions of the upstream source."
 msgstr ""
+"這是<quote>補丁管理</quote>問題中的一個簡單範例。你無法修改來自<quote>上游</"
+"quote>的專案內容;你需要在來自上游的專案內容中加上自己專屬的變更;而且你想要單"
+"獨管理這些變更,這樣來自上游的內容更新時,你才可以很快地套用回去。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:27
 "visible is that a user of an open source software project will contribute a "
 "bug fix or new feature to the project's maintainers in the form of a patch."
 msgstr ""
+"很多情況下都會發生補丁管理的問題。最常見的情況可能是:在開放原始碼的專案中,使"
+"用者會利用補丁的方式貢獻新功能或是錯誤修正碼給該專案的維護者。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:32
 "need to make changes to the packages they distribute so that they will build "
 "properly in their environments."
 msgstr ""
+"若是某個作業系統的發行版中含有開放原始碼的軟體,發行版的維護人員常常需要配合發"
+"行版修改軟體套件的原始碼,好讓這些套件能順利地在他們的發行版中編譯執行。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:37
 "release, you can simply drop that single patch when you're updating to the "
 "newer release."
 msgstr ""
+"當你需要管理的變更很少時,你可以很單純地利用標準的  <command>diff</command> "
+"及 <command>patch</command> 程式管理單一補丁(這些工具的詳細說明請參考 <xref "
+"linkend=\"sec:mq:patch\"/>)。當變更的數量越來越多時,你可能就會開始想要用獨立"
+"的<quote>一份工作</quote>為單位去管理補丁了。舉例來說,一個補丁只包含了一個問"
+"題的修正方法(可能包含好幾個檔案的修改內容,但它只做<quote>一件事情</"
+"quote>),然後你的手上有好幾個類似的補丁,分別修正不同的問題,或是配合你專有平"
+"台的修改內容。在這樣的情況下,若是你提交某個錯誤修正內容,上游的維護人員接受並"
+"加到接下來的版本的話,你在更新到新版本後,就可以直接把那個補丁丟了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:52
 "than a tiny number of patches in hand, understanding which ones you have "
 "applied and maintaining them moves from messy to overwhelming."
 msgstr ""
+"維護一個上游來源中沒有的補丁雖然又煩又容易出錯,但至少不是難事。然而,要是你需"
+"要維護的補丁越來越多,維護的複雜度就會很快地增加。只要手邊有幾個這樣的補丁要維"
+"護,光是要判斷哪個補丁已經加了、哪個還沒加,就已經會成為一場大災難了。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:59
 "simply <quote>MQ</quote>), that massively simplifies the patch management "
 "problem."
 msgstr ""
+"還好,Mercurial 內建了一套功能強大的擴充套件,叫做 Mercurial Queues(或簡稱"
+"<quote>MQ</quote>),可以大大簡化補丁管理的問題。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch12-mq.xml:65
 msgid "The prehistory of Mercurial Queues"
-msgstr ""
+msgstr "Mercurial Queues 的歷史延革"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:67
 "Some of these series were focused on stability, some on feature coverage, and "
 "others were more speculative."
 msgstr ""
+"在 1990 年代晚期,一群 Linux kernel 的開發人員開始維護<quote>補丁序列 (patch "
+"series)</quote>,可以用來修改 Linux kernel 的行為。有些序列著重在穩定性,有些"
+"著重在功能性,有些則是純粹實驗性質的東西。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:73
 "managing his patch queues.  Andrew was successfully using these scripts to "
 "manage hundreds (sometimes thousands) of patches on top of the Linux kernel."
 msgstr ""
+"這些補丁序列的體積越來越龐大。在 2002 年時,Andrew Morton 發表了一套 shell 腳"
+"本程式,是他拿來自動管理自己的補丁佇列 (patch queues) 用的。Andrew 已經成功地"
+"利用這套腳本程式管理 Linux kernel 上數百(甚至數千)套的補丁。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch12-mq.xml:80
 msgid "A patchwork quilt"
-msgstr ""
+msgstr "Patchwork Quilt"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:82
 "quilt substantially automated patch management, it rapidly gained a large "
 "following among open source software developers."
 msgstr ""
+"2003 年年初,Andreas Gruenbacher 和 Martin Quinson 參考了 Andrew 的腳本程式的"
+"作法,發表了一套叫做 <quote>patchwork quilt</quote> <citation>web:quilt</"
+"citation>(或直接簡稱為 <quote>quilt</quote>)的工具程式(可以參考 "
+"<citation>gruenbacher:2005</citation> 這份論文)。由於 quilt 在本質上將補丁管"
+"理自動化,因此很快地就得到許多開放原始碼軟體開發人員的青睞。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:91
 "files.  To fix a bug, you create a new patch (using a single command), edit "
 "the files you need to fix, then <quote>refresh</quote> the patch."
 msgstr ""
+"Quilt 在目錄樹狀結構之上加上一份<emphasis>補丁的堆疊 (stack of patches)</"
+"emphasis>。一開始,你告訴 quilt 要管理哪個目錄,然後告訴它要管理其中的哪些檔"
+"案;它就會把那些檔案的檔名及內容存起來。要修正一個錯誤,你可以利用一個命令建立"
+"新的補丁,修改需要修改的地方,然後<quote>重新更新</quote>這份補丁。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:99
 "from <quote>tree with one patch applied</quote> to <quote>tree with two "
 "patches applied</quote>."
 msgstr ""
+"在重新更新的時候,quilt 會去掃描整個目錄,把所有有修改的地方加到補丁之中。你可"
+"以在第一個補丁之上再建立新的補丁,幫你記錄從<quote>專案中套用了一個補丁</"
+"quote>,到<quote>專案中套用了兩個</quote>間所需要修改的地方。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:106
 "any time, change both which patches are applied and what modifications those "
 "patches make."
 msgstr ""
+"哪些補丁要套用到目錄的樹狀結構中,你可以自行<emphasis>修改</emphasis>。如果你 "
+"<quote>取出 (pop)</quote> 出一份補丁,那麼該補丁的變更內容就會從目錄中消失。不"
+"過 quilt 會記得你取出了哪些補丁,所以你可以再要求 quilt <quote>推入 (push)</"
+"quote> 剛剛取出的補丁,這樣該份補丁的變更內容又會再重新回到目錄中。最重要的"
+"是:你隨時都可以執行 <quote>重新整理</quote> 命令,然後已經被套用的補丁中最上"
+"層的那個補丁就會被更新。這意味著:你隨時都可以變更「哪些補丁要被套用」,以及"
+"「這些補丁修改的內容」。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:118
 "Quilt knows nothing about revision control tools, so it works equally well on "
 "top of an unpacked tarball or a Subversion working copy."
 msgstr ""
+"Quilt 和版本控制工具完錯無關,所以你可以把它用在從 tar ball 中解開的原始碼上,"
+"也可以用在 Subversion 的工作複本中。"
 
 #. type: Content of: <book><chapter><sect1><sect2><title>
 #: ../en/ch12-mq.xml:124
 msgid "From patchwork quilt to Mercurial Queues"
-msgstr ""
+msgstr "從 Patchwork Quilt 到 Mercurial Queues"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:126
 "In mid-2005, Chris Mason took the features of quilt and wrote an extension "
 "that he called Mercurial Queues, which added quilt-like behavior to Mercurial."
 msgstr ""
+"在 2005 年年中,Christ Mason 參考了 quilt 的功能,撰寫了一套叫做 Mercurial "
+"Queues 的擴充套件,為 Mercurial 加上類似 quilt 的功能。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:130
 "Mercurial.  Each patch that you push is represented as a Mercurial "
 "changeset.  Pop a patch, and the changeset goes away."
 msgstr ""
+"Quilt 和 MQ 之間最大的不同在於:quilt 完全不考慮版本控制系統是否存在,而 MQ 則"
+"是和 Mercurial <emphasis>整合</emphasis>在一起。每個被推入的補丁,都是以 "
+"Mercurial 的變更集形式儲存。若是補丁被 pop 出來,那個變更集就從儲存庫中消失"
+"了。"
 
 #. type: Content of: <book><chapter><sect1><sect2><para>
 #: ../en/ch12-mq.xml:136
 "tremendously useful piece of software to know about for situations where you "
 "cannot use Mercurial and MQ."
 msgstr ""
+"由於 quilt 和版本控制系統無關,因此,若是你無法使用 Mercurial 和 MQ,它還是一"
+"套很好用的軟體工具。"
 
 #. type: Content of: <book><chapter><sect1><title>
 #: ../en/ch12-mq.xml:144
 msgid "The huge advantage of MQ"
-msgstr ""
+msgstr "MQ 的絕對優勢"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:146
 msgid ""
 "I cannot overstate the value that MQ offers through the unification of "
 "patches and revision control."
-msgstr ""
+msgstr "我不能過份誇飾 MQ 整合了補丁管理與版本控制後所帶來的價值。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:149
 "revision control tools over the years&emdash;is the <emphasis>agility</"
 "emphasis> they offer."
 msgstr ""
+"補丁系統能持續存在於自由軟體和開發原始碼社群中&emdash;先不管這些年來能力越來越"
+"強的版本控制工具&emdash;最主要的原因之一,是因為它<emphasis>靈活</emphasis>的"
+"特性。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:155
 "misleading or destabilising&emdash;traces of your missteps and errors in the "
 "permanent revision record."
 msgstr ""
+"傳統的版本控制系統會將你所做的事永遠地記錄下來,無法任意地抹除。雖然這是個很棒"
+"的特性,但有時候還是會讓人覺得很麻煩。假設你想做一項非常天馬行空的實驗,你的每"
+"一步都得非常小心,否則很有可能會在修訂版記錄中留下一些不想要的&emdash;甚至是會"
+"誤導別人、或是造成不穩定的&emdash;錯誤嘗試。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:163
 "it to be, simply fix it&emdash;as many times as you need to, until you have "
 "refined it into the form you desire."
 msgstr ""
+"反過來說,MQ 將分散式版本控制工具和補丁系統做了完美的結合,讓我們可以更容易地"
+"將工作獨立出來。你的補丁存在於一般修訂版歷程的上面,你可以任意地把補丁拿掉或加"
+"回來。如果你不喜歡某個補丁,你可以把它丟掉。如果某個補丁的內容不如預期,你可以"
+"單獨修改它&emdash;要修幾次都可以,直到你滿意為止。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:171
 "role=\"hg-cmd\">hg annotate</command> command to see which changeset or patch "
 "modified a particular line of a source file.  And so on."
 msgstr ""
+"舉例來說,補丁系統和版本控制系統工具結合之後,我們可以<emphasis>更更更更加</"
+"emphasis>容易地了解補丁的內容、了解它們對於整份程式碼有什麼影響,進而幫助我們"
+"除錯。因為每個套用的補丁都和某個變更集結合,所以你可以利用 <command role=\"hg-"
+"cmd\">hg log</command> 查看某個檔案的記錄,看哪些變更集或補丁會改到它;你可以"
+"利用 <command role=\"hg-cmd\">hg bisect</command> 命令,對所有的變更集做二分逼"
+"近法,找出某個臭蟲是因為哪個補丁而產生(或修正)的;你也可以用 <command role="
+"\"hg-cmd\">hg annotate</command> 命令找到是哪個變更集或是補丁修改了某個檔案中"
+"的某一行……等各種的應用。"
 
 #. type: Content of: <book><chapter><sect1><para>
 #: ../en/ch12-mq.xml:189