# HG changeset patch # User Bryan O'Sullivan # Date 1278775286 -3600 # Node ID 613690ad6a9c19a08daa1b7702980d82e913cd3c # Parent 47f3810fd4fda0b57950b43b61edb62d22ec16f0# Parent 7764de86d22fcb01b7f25053969419fcb69f4e2d Merge with dongsheng diff -r 47f3810fd4fd -r 613690ad6a9c po/zh.po --- a/po/zh.po Sun Feb 21 22:08:42 2010 -0600 +++ b/po/zh.po Sat Jul 10 16:21:26 2010 +0100 @@ -36,12 +36,13 @@ # updated 更新到,同步到(适用于旧版本) # versioned 受版本控制 # working copy 工作副本 +# identifiers 标识符 # ... # msgid "" msgstr "" "Project-Id-Version: hgbook 1.2\n" -"POT-Creation-Date: 2009-05-21 14:26+0800\n" +"POT-Creation-Date: 2009-11-04 14:06+0800\n" "PO-Revision-Date: 2009-10-21 16:42+0800\n" "Last-Translator: 宋冬生 \n" "Language-Team: Simplified Chinese \n" @@ -177,6 +178,7 @@ "You can enable the extension in the usual way, by editing your ~/." "hgrc file." msgstr "" +"你可以通过常用的方式,编辑~./hgrc文件来使用这个扩展。" #. type: Content of: #: ../en/appA-svn.xml:59 @@ -1073,6 +1075,8 @@ ": Edit the commit message " "and patch description for the newly folded patch." msgstr "" +":为新创建的补丁编辑提交信" +"息和补丁说明。" #. type: Content of: #: ../en/appB-mq-ref.xml:116 @@ -1081,6 +1085,8 @@ "given file as the new commit message and patch description for the folded " "patch." msgstr "" +": 使用给定文件的内容作为创" +"建补丁新的提交信息和补丁说明。" #. type: Content of: #: ../en/appB-mq-ref.xml:121 @@ -2035,6 +2041,8 @@ "revision control is important, the field was then so new that there was " "almost no published literature to refer people to." msgstr "" +"数年之前,当我想解释为什么我相信分布式版本控制非常重要的时候,这个领域实在太新" +"了,几乎没有公开的文献供人们参考。" #. type: Content of: #: ../en/ch00-preface.xml:15 @@ -2045,6 +2053,10 @@ "idea that revision control ought to be distributed in nature. I publish the " "book online under a liberal license for the same reason: to get the word out." msgstr "" +"虽然在那个时候,我已经在Mercurial的内核上花了一些时间,我转而写这本书是因为我" +"发现这可能是帮助软件吸引更多用户,和让大家接受版本控制本质上就应该是分布式的最" +"有效的方式,我把这本书在网上以自由许可的方式发布也是基于同样的原因:让大家都了" +"解。" #. type: Content of: #: ../en/ch00-preface.xml:23 @@ -2054,6 +2066,9 @@ "How do I use it? In this book, I try to answer those questions for " "distributed revision control in general, and for Mercurial in particular." msgstr "" +"一本好的关于软件的书应该和讲故事类似:这是个什么东西?为什么需要它?它会怎样帮" +"助我?我怎么使用它?本书中,我会为分布式版本控制回答这些问题,特别是" +"Mercurial。" #. type: Content of: #: ../en/ch00-preface.xml:31 @@ -2071,6 +2086,10 @@ "which provides clerical and legal support to Mercurial and a number of other " "prominent and worthy open source software projects." msgstr "" +"通过购买此书,你支持了开源和自由软件的持续发展和自由,特别是Mercurial。" +"O'Reilly Media和我将本书的收入捐献给Software Freedom Conservancy (<ulink url=" +"\"http://www.softwarefreedom.org/\">http://www.softwarefreedom.org/</ulink>) ," +"这个组织为Mercurial和其他一些有潜力和价值的开源软件项目提供了办公和法律支持。" #. type: Content of: <book><preface><sect1><title> #: ../en/ch00-preface.xml:45 @@ -2084,6 +2103,8 @@ "author and project lead of Mercurial. He is ably assisted by hundreds of " "volunteer contributors across the world." msgstr "" +"没有Matt Mackall,Mercurial项目的开发者和领导的努力,这本书不可能存在。他得到" +"了全球数以百计的志愿者的帮助。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:52 @@ -2092,6 +2113,8 @@ "wonderful, madcap little-boy games. I'd also like to thank my ex-wife, " "Shannon, for her support." msgstr "" +"我的孩子Cian和Ruairi总是站在我旁边帮我解决奇妙的疯狂小男孩游戏。我同样也要感谢" +"我的前妻Shannon的帮助。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:56 @@ -2101,6 +2124,9 @@ "Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, " "Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." msgstr "" +"我的同事和朋友以各种方式提供了帮助和支持,这里的名单非常不全:Stephen Hahn, " +"Karyn Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley " +"Kuhn, Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:62 @@ -2112,6 +2138,9 @@ "the comment system was live for only about two months towards the end of the " "writing process." msgstr "" +"我以开放的方式完成了本书,当我完成各章的草稿后,就将其放在了网上。读者可以使用" +"我开发的一个网络程序提交反馈。到我完成本书时,有100多人提交了评论。考虑到评论" +"系统是在写作完成之前两个月才开放的,这是一个惊人的数字。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:70 @@ -2120,6 +2149,8 @@ "contributed over a third of the total number of comments. I would like to " "thank them for their care and effort in providing so much detailed feedback." msgstr "" +"我特别希望认识以下人员,他们中有的人提交了超过总数三分之一的评论。我要感谢他们" +"的关心和努力,提供了那么多详细的反馈。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:75 @@ -2134,7 +2165,7 @@ msgid "" "I also want to acknowledge the help of the many people who caught errors and " "provided helpful suggestions throughout the book." -msgstr "" +msgstr "我同样要感谢许多在书中找出错误和提供了有帮助的建议的人。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:84 @@ -2246,6 +2277,10 @@ "permission. Incorporating a significant amount of example code from this book " "into your product’s documentation does require permission." msgstr "" +"本书的目的是帮助你完成工作。基本上,你可以将书中的代码用于你的程序或文档。无需" +"取得我们的许可,除非你直接复制大量的代码。举例来说,在程序中使用几段书中的代码" +"无需许可。出售或发布含有O'Reilly书中示例的CD-ROM则需经许可。引用本书中的叙述或" +"示例代码来回答问题无需许可。将书中的大量代码合并到你的产品文档中则需经许可。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:181 @@ -2255,6 +2290,9 @@ "Title</emphasis> by Some Author. Copyright 2008 O’Reilly Media, Inc., 978-0-" "596-xxxx-x.”" msgstr "" +"虽然我们并不要求在引用本书的时候做版权归属声明,但如果你这样做了,我们将非常感" +"激。版权归属声明通常包含标题,作者,发行者和ISBN。例如: “<emphasis>书名</" +"emphasis> 某人著。 版权所有 2008 O’Reilly Media,Inc., 978-0-596-xxxx-x。”" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:187 @@ -2263,6 +2301,8 @@ "permission given above, feel free to contact us at <email>permissions@oreilly." "com</email>." msgstr "" +"如果你觉得你对书中示例代码的使用超出了正常范围,或者不符合以上描述的许可,尽管" +"用电子邮件跟我们联系:<email>permissions@oreilly.com</email>。" #. type: Content of: <book><preface><sect1><title> #: ../en/ch00-preface.xml:193 @@ -2276,6 +2316,8 @@ "technology book, that means the book is available online through the O’Reilly " "Network Safari Bookshelf." msgstr "" +"如果你在喜欢的技术图书的封面上看见Safari® Books Online的图标,这表示你你可以通" +"过O'Reilly Network Safari Bookshelf在网上使用此书。" #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:202 @@ -2287,6 +2329,11 @@ "ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." "safaribooksonline.com</ulink>." msgstr "" +"Safari提供了一个比电子书更好的解决方案。它是一所虚拟图书馆,你可以在上面轻松搜" +"索上千种顶级的技术书籍,剪切和复制示例代码,下载章节,当你需要最准确、最新的信" +"息时,让你更快地找到答案。可以通过下面链接免费试用<ulink role=\"orm:hideurl:" +"ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." +"safaribooksonline.com</ulink>。" #. type: Content of: <book><preface><sect1><title> #: ../en/ch00-preface.xml:211 @@ -2297,7 +2344,7 @@ #: ../en/ch00-preface.xml:213 msgid "" "Please address comments and questions concerning this book to the publisher:" -msgstr "" +msgstr "关于本书的任何问题或评论请发邮件给出版商:" #. type: Content of: <book><preface><sect1><simplelist><member> #: ../en/ch00-preface.xml:217 @@ -2335,6 +2382,8 @@ "We have a web page for this book, where we list errata, examples, and any " "additional information. You can access this page at:" msgstr "" +"我们将提供一个关于本书的主页,在那上面提供勘误表、示例以及其它附加信息。你可以" +"从这里访问到它:" #. type: Content of: <book><preface><sect1><simplelist><member> #: ../en/ch00-preface.xml:235 @@ -2350,7 +2399,7 @@ #. type: Content of: <book><preface><sect1><para> #: ../en/ch00-preface.xml:242 msgid "To comment or ask technical questions about this book, send email to:" -msgstr "" +msgstr "关于本书的任何技术问题或评论请发邮件给出版商:" #. type: Content of: <book><preface><sect1><simplelist><member> #: ../en/ch00-preface.xml:246 @@ -2363,6 +2412,8 @@ "For more information about our books, conferences, Resource Centers, and the " "O’Reilly Network, see our web site at:" msgstr "" +"如果想了解关于我们的图书、会议、资源中心以及O'Reilly Network的更多信息,可以浏" +"览以下站点:" #. type: Content of: <book><preface><sect1><simplelist><member> #: ../en/ch00-preface.xml:253 @@ -2387,6 +2438,9 @@ "hand: every time you modify a file, save it under a new name that contains a " "number, each one higher than the number of the preceding version." msgstr "" +"版本控制是管理一些信息的多个版本的过程。它最简单的形式莫过于:每次你修改一个文" +"件后都重新命名保存,文件名中包含一个数字,每次修改后这个数字都增加。这通常是许" +"多人手工完成的。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:16 @@ -2400,6 +2454,11 @@ "modern revision control tools have no problem coping with thousands of people " "working together on projects that consist of hundreds of thousands of files." msgstr "" +"然而,手工管理即使是一个文件的多个版本也是很容易出错的,所以很早就有软件工具来" +"使这个过程自动化。最早的自动化软件管理工具的目标是帮助一个用户管理一个文件的版" +"本。在过去的几十年里,版本控制工具的范围得到极大扩展;现在它们可以管理多个文" +"件,帮助许多人一起工作。最新的版本控制工具可以支持上包含成数十万个文件,几千个" +"人一起工作的项目。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:27 @@ -2408,6 +2467,8 @@ "this new field has grown due to people's willingness to explore ill-charted " "territory." msgstr "" +"分布式版本控制是最近才出现的,但是由于人们愿意探索新的疆域,目前这一新的领域已" +"经得到了长足的发展" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:31 @@ -2418,6 +2479,9 @@ "yet it scales to the demands of real, challenging environments where many " "other revision control tools buckle." msgstr "" +"我写这本关于分布式版本控制的书是因为我相信这个领域应该有一个指南。我选择" +"Mercurial是因为它是在这个领域中学习最容易上手的工具,并且它能够满足真实的,挑" +"战性的环境的要求,而其他版本控制工具只能望而兴叹。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:39 @@ -2430,6 +2494,7 @@ "There are a number of reasons why you or your team might want to use an " "automated revision control tool for a project." msgstr "" +"为什么你或者你的团队可能需要在项目中使用自动化版本控制工具呢?有很多理由。" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:46 @@ -2439,6 +2504,9 @@ "<emphasis>why</emphasis> they made it; <emphasis>when</emphasis> they made " "it; and <emphasis>what</emphasis> the change was." msgstr "" +"因为它能记录你的项目的历史和演化,所以你不必再给每个变更都记录日志,<emphasis>" +"谁</emphasis>做的;<emphasis>为什么</emphasis>他们这样做;<emphasis>什么时候</" +"emphasis>做的;做了<emphasis>什么</emphasis>修改。" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:53 @@ -2448,6 +2516,8 @@ "simultaneously make potentially incompatible changes, the software will help " "you to identify and resolve those conflicts." msgstr "" +"当你和其他人一起工作的时候,版本控制工具让你合作的更容易。例如,当许多人或多或" +"少的同时进行有可能冲突的修改的时候,软件可以帮助你确定和解决这些冲突。" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:59 @@ -2458,13 +2528,17 @@ "will even help you to efficiently figure out exactly when a problem was " "introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)." msgstr "" +"它能帮助你修正错误。如果你做了一个修改,但是后来发现这是个错误,你能恢复到一个" +"或者多个文件以前的版本。实际上,一个<emphasis>相当</emphasis>好的版本控制工具" +"甚至会帮助你找出什么什么是时候引入的这个问题(详细信息参考<xref linkend=\"sec:" +"undo:bisect\"/>)。 " #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:66 msgid "" "It will help you to work simultaneously on, and manage the drift between, " "multiple versions of your project." -msgstr "" +msgstr "它能帮助你同时工作于项目的多个版本,并管理它们的差异。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:71 @@ -2473,6 +2547,8 @@ "whether you're working on a project by yourself, or with a hundred other " "people." msgstr "" +"大多数这些理由都是等效的&emdash;至少在理论上&emdash;不管你是一个人做项目还是和" +"几百个人一起。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:76 @@ -2483,6 +2559,9 @@ "emphasis>. A revision control tool that's difficult to understand or use is " "going to impose a high cost." msgstr "" +"版本控制在在不同尺度上(<quote>单个黑客</quote>和<quote>一个大项目组</quote>)" +"实践的一个关键问题是它的<emphasis>性价</emphasis>比怎么样。一个很难理解和使用" +"的版本控制工具会让你的代价很高。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:84 @@ -2492,6 +2571,8 @@ "the cost of using revision control might hardly seem worth considering, since " "<emphasis>without</emphasis> it, failure is almost guaranteed." msgstr "" +"如果没有版本控制工具和过程,一个五百人的项目很快就可能就将自己压垮。在这种情况" +"下,版本控制的代价基本上不用考虑,因为没有它,失败几乎是一定的。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:91 @@ -2500,6 +2581,8 @@ "poor place to use a revision control tool, because surely the cost of using " "one must be close to the overall cost of the project. Right?" msgstr "" +"另一方面,一个人的<quote>快速编程</quote>看起来并不适合使用版本控制工具,因为" +"使用一个版本控制工具的代价就是整个项目的代价,对吧?" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:96 @@ -2513,6 +2596,11 @@ "performance and peer-to-peer nature let you scale painlessly to handle large " "projects." msgstr "" +"Mercurial的独特之处就是它<emphasis>同时</emphasis>支持这两种尺度的开发。你可以" +"在几分钟之内学会基本的使用,因为代价很小,你可以很方便的在最小的项目上应用版本" +"管理。它的简洁性意味着不会有很多艰深的概念和命令干扰你<emphasis>真正</" +"emphasis>的工作。同时,Mercurial高性能和点对点的特性可以让你轻易的应对大的项" +"目。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:106 @@ -2521,6 +2609,8 @@ "of tools can make a huge difference to the fluidity with which you can work " "on a project." msgstr "" +"没有一个版本控制工具能拯救一个糟糕的项目,但是在项目中选择好的工具会大大的提高" +"效率,正是工欲善其事,必先利其器。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:113 @@ -2534,6 +2624,8 @@ "many names and acronyms. Here are a few of the more common variations you'll " "encounter:" msgstr "" +"版本控制是一个各自为政的领域,以至于有很多名称和缩略语,下面是你可能遇到的一些" +"常用的术语:" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:119 @@ -2567,6 +2659,8 @@ "practice they overlap so much that there's no agreed or even useful way to " "tease them apart." msgstr "" +"有些人声称这些术语有不同的含义,但实际上它们的含义太重叠了,根本没有一致的,甚" +"至有用的方式来区别它们。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:135 @@ -2582,6 +2676,10 @@ "book is built from its sources, all the example scripts are automatically " "run, and their current results compared against their expected results." msgstr "" +"本书采用了一种非同寻常的示例编程方法。每个例子都是<quote>活的</quote>&emdash;" +"每一个示例都是一个shell脚本执行的实际结果,这个脚本执行了你看到的Mercurial命" +"令。每次从源代码构建本书的映像时,所有的示例脚本都自动执行,然后将预期结果和实" +"际执行结果比较。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:144 @@ -2592,6 +2690,9 @@ "of Mercurial that I'm documenting, and the output of some command changes, " "the build fails." msgstr "" +"这种方法的优点是每个例子都是永远精确的,它们是本书前面描述的Mercurial版本的" +"<emphasis>实际</emphasis>运行结果。如果我更新了描述的Mercurial的版本,同时有些" +"命令的输出变化了,创建就会失败。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:151 @@ -2603,6 +2704,9 @@ "resulting timestamps correspondingly spread out, my automated example scripts " "run many commands in one second." msgstr "" +"这种方法也有小的缺点,就是你在示例中看见的日期和时间被<quote>压缩</quote>了," +"看起来这些命令不是人输入的。人不可能再一秒之内执行一条以上的命令,相应的时间戳" +"都应该展开,我的自动化脚本中一秒之内可以执行很多命令。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:159 @@ -2612,6 +2716,9 @@ "<literal role=\"hg-ext\">bisect</literal> example in <xref linkend=\"sec:undo:" "bisect\"/>, for instance." msgstr "" +"举例来说,示例中的几个连续的提交可能显示发生于同一秒之内。你可以在<literal " +"role=\"hg-ext\">bisect</literal> 示例中看到例子<xref linkend=\"sec:undo:bisect" +"\"/>。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:165 @@ -2620,6 +2727,8 @@ "times you see in the output of commands. But <emphasis>do</emphasis> be " "confident that the behavior you're seeing is consistent and reproducible." msgstr "" +"所以当你研究这些例子的时候,不要太注意命令输出的日期和时间。但是<emphasis>要</" +"emphasis>保证你看到的结果是一致的和可以再现的。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:173 @@ -2633,6 +2742,8 @@ "control tools over the past four decades, as people have become familiar with " "the capabilities of their tools and constrained by their limitations." msgstr "" +"在过去的四十年中,随着人们越来越熟悉他们的工具的能力和限制,开发和使用版本控制" +"工具出现了明确的趋势。 " #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:180 @@ -2642,6 +2753,9 @@ "control, their locking model and reliance on a single computer limited them " "to small, tightly-knit teams." msgstr "" +"第一代软件开始于在个人计算机,人们用这些软件管理单个文件。虽然这些工具比手工管" +"理版本有了巨大的飞跃。但是加锁模型和依赖于单个计算机限制了他们使用范围,只用于" +"小的,组织严密的团队。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:186 @@ -2656,6 +2770,11 @@ "found that they could not use the tools to interact with a project in a " "natural way, as they could not record their changes." msgstr "" +"第二代软件放松了这些限制,因为它们采用了以网络为中心的结构,并且能够一次管理整" +"个项目。随着项目增长,又出现了新的问题。客户需要频繁的和服务器交互,服务器的可" +"伸缩性成为大项目的主要问题。不可靠的网络会妨碍客户和服务器的交互。随着开源项目" +"开始开放只读权限给匿名用户,没有提交权限的用户发现他们不能以自然的方式使用工具" +"和项目交互,因为他们不能记录他们的修改。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:198 @@ -2668,6 +2787,10 @@ "offline indefinitely and autonomously, with a network connection only needed " "when syncing changes with another repository." msgstr "" +"新一代的版本控制工具本质上是点对点的。所有的这些系统都抛弃了对单个中央服务器的" +"依赖,允许用户将他们的版本控制数据发布到任何需要的地方。通过互联网的协作摆脱了" +"技术的限制,走向选择和审查。现代的工具可以进行自治的,不受限制的离线操作。只需" +"要在有网络的时候和其他的版本库同步即可。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:210 @@ -2683,6 +2806,9 @@ "a number of ways in which distributed tools shine relative to centralised " "ones." msgstr "" +"与它们的上一代竞争者相比,虽然分布式版本控制工具多年来已经很稳定和实用了,但是" +"旧的工具的使用者还没有完全了解它们的优点,分布式的工具在很多方面明显由于集中式" +"的工具。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:220 @@ -2696,6 +2822,10 @@ "value of a snappy, responsive tool: you're going to spend a lot of time " "interacting with your revision control software." msgstr "" +"对于个人开发者,分布式工具几乎永远比集中式工具快的多。原因很简单:集中式工具的" +"很多操作需要网络交互,因为大部分元数据都只在中央服务器上有一份拷贝。而一个分布" +"式工具将所有的元数据保存在本地。其他的相同,通过网络的交互增加了集中式工具的负" +"担。不要低估了反应迅速的工具的价值:你要花很多时间和你的版本控制软件交互。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:231 @@ -2707,6 +2837,9 @@ "recent and actually worked. With a distributed tool, you have many backups " "available on every contributor's computer." msgstr "" +"分布式工具对你的服务器结构并不感冒,因为他们在将元数据复制到很多地方。如果你的" +"集中式系统和你的服务器着火了,你最好希望你的备份介质是可靠的,同时你最后的备份" +"是最近的,而且还能用。而对于分布式工具,你在贡献者的计算机上有很多备份。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:239 @@ -2720,6 +2853,11 @@ "with local operations. If you have a far-flung team of collaborators, this " "may be significant." msgstr "" +"网络的可靠性对分布式工具的影响要远远小于集中式工具。如果没有网络你根本不能使用" +"集中式工具,除了少数几个功能有限命令。而对于分布式工具,即使在你工作的时候网络" +"瘫痪了,你可能根本不会注意到。你不能做的事情仅仅是不能和其它计算机上的版本库交" +"互了,这种情况在本地操作相当罕见。而如果你的团队有异地的人员,那这就很有可能" +"了。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:250 @@ -2741,11 +2879,17 @@ "local modifications will be at risk of corruption any time you try to update " "your client's view of the repository." msgstr "" +"如果你喜欢一个开源项目并且决定准备开始改进它,同时这个项目使用分布式版本控制工" +"具的话,你立刻可以和其他人一样认为自己成为项目的<quote>核心</quote>。如果他们" +"发布了他们的版本库,你可以立即拷贝他们的项目。开始修改,记录你自己的工作,和内" +"部人员一样使用同样的工具。相比之下,如果使用集中式工具,除非有人给你向中央服务" +"器提交修改的权限,你只能用只读的方式使用软件。这样,你就不能记录你的修改,而且" +"当你从版本库更新的时候,本地的修改随时有崩溃的可能。 " #. type: Content of: <book><chapter><sect1><sect2><sect3><title> #: ../en/ch01-intro.xml:268 msgid "The forking non-problem" -msgstr "分叉不是问题" +msgstr "分支不是问题" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-intro.xml:270 @@ -2758,6 +2902,10 @@ "more or less complete copy of the project's source code, and goes off in its " "own direction." msgstr "" +"有人说分布式版本控制工具给开源项目带来了某种风险,因为在项目的发展过程中很容易" +"出现<quote>分支</quote>。当不同组的开发人员有不同的意见和看法,决定不再一起工" +"作的时候,就会产生新的分支,每个组的人都或多或少的获得项目代码的完整拷贝,然后" +"向自己的方向发展。" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-intro.xml:280 @@ -2769,6 +2917,10 @@ "quote>, and graft the other team's changes into the tree somehow. This " "usually loses some or all of one side's revision history." msgstr "" +"有时候,不同分支的阵营决定协调他们之间的分歧。如果使用了集中式版本控制系统 " +"<emphasis>技术</emphasis>上的问题使协调过程非常痛苦,大部分需要手动解决。你必" +"须决定那个版本历史<quote>赢</quote>了,然后将其它团队的更改合并到代码中。这通" +"常造成别的团队某些或者全部版本历史丢失。" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-intro.xml:289 @@ -2780,6 +2932,9 @@ "<emphasis>merging</emphasis> forks, because forks are absolutely fundamental: " "they happen all the time." msgstr "" +"分布式工具认为分支是项目开发的<emphasis>唯一</emphasis>方式。每个单独的变更都" +"是潜在的分支点。这种方法的巨大力量在于,分布式版本控制工具非常善于<emphasis>合" +"并</emphasis>分支,因为分支是非常基本的操作:它们随时都在发生。" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-intro.xml:298 @@ -2790,6 +2945,9 @@ "anything, distributed tools <emphasis>lower</emphasis> the likelihood of a " "fork:" msgstr "" +"如果所有的人在任何时候的做任何工作都这样使用合并和分支,那么对开源世界来讲," +"<quote>分支</quote>就变成了<emphasis>纯粹</emphasis>的社会事件。如果真的有什么" +"影响到话,就是分布式工具<emphasis>降低</emphasis>了分支的可能性:" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:305 @@ -2797,6 +2955,8 @@ "They eliminate the social distinction that centralised tools impose: that " "between insiders (people with commit access) and outsiders (people without)." msgstr "" +"消除了集中式工具带来的社会级别:有内部人员(有提交权限)和外部人员(没有权限)" +"之分。" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:309 @@ -2805,6 +2965,8 @@ "involved from the perspective of the revision control software is just " "another merge." msgstr "" +"在社会性分支之后很容易和解,因为从版本控制工具的角度来讲这仅仅是一次新的合并而" +"已。" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-intro.xml:314 @@ -2818,6 +2980,11 @@ "illusory, you are forgoing the ability to fluidly collaborate with whatever " "people feel compelled to mirror and fork your history." msgstr "" +"有些人拒绝分布式工具因为他们想保持对项目的控制,他们相信集中式工具会给他们这种" +"控制。如果你这种想法,并你将CVS或者Subversion版本库向大众发布了,那么别人可用" +"现有的很多工具将整个项目的历史抓取出来(可能很慢),在其它你控制不了的地方重建" +"版本库。这时你的控制只不过是一种幻觉罢了,一些人被迫从你的版本库创建映像和分" +"支,而你失去了和他们协作的机会。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:329 @@ -2837,6 +3004,11 @@ "site, so that there's no redundant communication between repositories over " "expensive long-haul network links." msgstr "" +"遍布全球的团队正在进行许多商业项目。远离中央服务器的贡献者会发现执行命令速度很" +"慢同时不怎么可靠。商业的版本控制系统改善这个问题的办法就是让你购买远程复制插" +"件,这通常很昂贵,并且很难管理。分布式系统首先不会有这样的问题。其次,你可以很" +"容易的建立多个授权服务器,假设每个站点一个,这样可以避免在昂贵的长途线路上的冗" +"余的通讯。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:343 @@ -2851,6 +3023,11 @@ "a much larger team, and replication to balance load becomes a simple matter " "of scripting." msgstr "" +"集中式的版本控制系统的扩展性相对较低。只要不多的并行用户的组合负载就可以将一个" +"昂贵的中央服务器压垮。同样,典型的反应就是昂贵笨重的复制设备。因为中央服务器的" +"最大负载&emdash;如果你有的话&emdash;比分布式工具低很多(因为所有的数据要北复制" +"到其它地方),一个廉价的服务器就可以满足一个相当大的团队的要求,为平衡负载而进" +"行的复制只需要简单的脚本就够了。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:355 @@ -2862,6 +3039,9 @@ "and regressions in the customer's environment, all without needing to connect " "to your company's network." msgstr "" +"如果你有员工需要在客户方解决问题,那么他们会受益于分布式版本控制。工具允许他们" +"创建定制的环境,互相独立的尝试不同的解决方案。并且可以高效的从历史代码中查找" +"bug的根源,在客户环境中进行回归,所有的这些都不需要连接公司的网络。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:366 @@ -2873,27 +3053,27 @@ msgid "" "Mercurial has a unique set of properties that make it a particularly good " "choice as a revision control system." -msgstr "" +msgstr "Mercurial是一个非常好的版本控制系统,因为它有很多独一无二的特点。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:371 msgid "It is easy to learn and use." -msgstr "" +msgstr "它易学易用。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:372 msgid "It is lightweight." -msgstr "" +msgstr "它轻量级。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:373 msgid "It scales excellently." -msgstr "" +msgstr "它扩展性很好。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:374 msgid "It is easy to customise." -msgstr "" +msgstr "它很容易定制。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:377 @@ -2904,6 +3084,9 @@ "feature sets are generally uniform and consistent, so you can keep track of a " "few general rules instead of a host of exceptions." msgstr "" +"如果你熟悉版本控制系统,你在五分钟之内只能就可以使用Mercurial工作了。即使你不" +"熟悉,也不过是再多花几分钟。Mercurial的命令和功能集非常统一一致,你只要遵守几" +"个通用的规则就够了,很少有例外。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:384 @@ -2914,6 +3097,9 @@ "attempts to stay nimble and largely out of your way by combining low " "cognitive overhead with blazingly fast operations." msgstr "" +"在很小的项目上,你马上就可以使用Mercurial开始工作。创建新的修改和分支;到处交" +"换修改(不管本机还是通过网络);获取历史和状态数据非常快。Mercurial努力保持小" +"巧灵活,在眨眼之间就能完成操作。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:391 @@ -2922,6 +3108,8 @@ "projects with hundreds to thousands of contributors, each containing tens of " "thousands of files and hundreds of megabytes of source code." msgstr "" +"不仅小的项目可以使用Mercurial:有成百上千的贡献者的项目也在使用它,这些项目每" +"个都有上万个文件和几百兆的源码。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:396 @@ -2933,6 +3121,9 @@ "already available, ranging from helping to identify bugs to improving " "performance." msgstr "" +"如果觉得Mercurial的核心功能不能满足要求,你很容易在现有基础上开发。Mercurial非" +"常适合于脚本任务,它的核心简洁,并且用Python实现,用扩展的方式增加新的功能非常" +"方便,现在已经有很多流行和有用的扩展了,像帮助你确定bug或者提高性能等。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:406 @@ -2947,6 +3138,8 @@ "one of the revision control tools listed below, in most cases for several " "years at a time." msgstr "" +"在你继续阅读之前,请理解本节完全反映了我的个人经验,兴趣,和偏好(我敢说)。下" +"面列的每个版本控制工具我都使用过,大多数情况下都用过好几年。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:418 @@ -2954,6 +3147,8 @@ "Subversion is a popular revision control tool, developed to replace CVS. It " "has a centralised client/server architecture." msgstr "" +"Subversion是一个流行的版本控制工具,是用来替代CVS的,它采用的是集中式的客户/服" +"务器结构。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:422 @@ -2962,6 +3157,8 @@ "same operations, so if you're familiar with one, it is easy to learn to use " "the other. Both tools are portable to all popular operating systems." msgstr "" +"Subversion和Mercurial相同操作的命令的命名上非常相似,所以如果你熟悉一个,很容" +"易学会另外一个,两个工具都可以在大多数平台上运行。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:427 @@ -2971,6 +3168,10 @@ "url=\"http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced." "html#svn.branchmerge.advanced.finalword\">complicated and buggy</ulink>." msgstr "" +"在1.5版之前,Subversion对合并的支持并不好。在我写本书的时候,它刚新增了并跟踪" +"的功能,出名的<ulink url=\"http://svnbook.red-bean.com/nightly/en/svn." +"branchmerge.advanced.html#svn.branchmerge.advanced.finalword\">复杂和容易出错" +"</ulink>。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:433 @@ -2985,6 +3186,12 @@ "Subversion does not have useful replication facilities, server capacity and " "network bandwidth become bottlenecks for modestly large projects." msgstr "" +"在我测量过的每个版本控制操作上Mercurial都比Subversion有很大的性能优势。差距从" +"两个数量级到六个数量级不等,我用的是Subversion 1.4.3的<emphasis>ra_local</" +"emphasis>文件存储方式,这是已知的最快的存取方式了。在实际的部署中包括网络存" +"储,那么Subversion的劣势更大。因为很多Subversion命令必须和主机交互,并且因为" +"Subversion没有好的复制机制,使得对于中的等大小的项目而言,服务器容量和网络带宽" +"成为主要瓶颈。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:446 @@ -2997,6 +3204,10 @@ "directory, even though the Mercurial repository contains a complete history " "of the project." msgstr "" +"另外,Subversion以在客户端使用了更多存储空间的方法,换取降低几个常用操作的网络" +"负载,例如查找修改过的文件(<literal>status</literal>)和显示对于当前版本的更" +"改(<literal>diff</literal>)。结果Subversion的工作副本经常和Mercurial的版本库" +"和工作目录一样大,或者更大,虽然Mercurial的版本库包括了项目的完整历史。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:456 @@ -3006,6 +3217,9 @@ "some of Mercurial's GUI tools now outshine their Subversion equivalents. " "Like Mercurial, Subversion has an excellent user manual." msgstr "" +"Subversion有很多的第三方工具支持。Mercurial现在在这方面稍微欠缺。然而差距正在" +"逐渐缩小,实际上一些有Mercurial的GUI工具比Subversion类似工具还略胜一筹。和" +"Mercurial一样,Subversion也有完善的用户手册。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:462 @@ -3017,6 +3231,10 @@ "distributed SCM will grow rapidly in proportion to the number of revisions, " "because the differences between each revision are large." msgstr "" +"Subversion并不在客户端存储版本历史,所以它很适合管理那些有很多大的二进制文件的" +"项目。如果你对一个未压缩的10MB文件检入了五十次,Subversion客户端的占用的磁盘空" +"间基本上保持不变。而对于分布式SCM软件,磁盘空间会随着版本数量的增加成而迅速增" +"长,因为每个版本之间的差异非常大。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:471 @@ -3027,6 +3245,9 @@ "to it, can be a significant advantage to a project where binary files are " "widely used." msgstr "" +"另外,合并不同版本的二进制文件非常困难,换句话说,基本上不可能。Subversion提供" +"了锁定功能,用户可以锁定一个文件,这样他就取得了对这个文件临时的独占的提交权," +"这对于广泛使用二进制文件的项目而言是个明显优势。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:478 @@ -3038,6 +3259,10 @@ "you can perform an initial conversion, then small additional conversions " "afterwards to bring in new changes." msgstr "" +"Mercurial可以从Subversion的版本库中导入历史版本。它也可以向Subversion的版本库" +"输出历史版本。这样在决定转换之前很容易先<quote>试一下水</quote>,同时并行的使" +"用Mercurial和Subversion。版本史的转换是递增的,你可以先构造一个初始版本,每次" +"有了新的更改后加入一个小的转换。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch01-intro.xml:490 ../en/ch01-intro.xml:629 @@ -3051,6 +3276,8 @@ "the Linux kernel source tree. Like Mercurial, its early design was somewhat " "influenced by Monotone." msgstr "" +"Git是为了管理Linux内核代码而开发的一个分布式版本控制工具。它和Mercurial一样在" +"设计上受了Monotone的影响。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:497 @@ -3059,6 +3286,8 @@ "commands. It has something of a reputation for being difficult to learn. " "Compared to Git, Mercurial has a strong focus on simplicity." msgstr "" +"Git有非常大的命令集,1.5.0版本提供了139个单独的命令。它以难学而闻名于世。与Git" +"相比,Mercurial力求简洁。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:502 @@ -3069,6 +3298,9 @@ "support that Git provides is, at the time of writing, far behind that of " "Mercurial." msgstr "" +"就性能而言,Git非常快。在很多情况下它都比Mercurial快,至少是在Linux上,但" +"Mercurial在其它操作上有优势。而在Windows上,Git不管是性能还是提供的支持,都比" +"Mercurial差很多,至少在本书写作的时候是这样。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:509 @@ -3082,6 +3314,11 @@ "freshly packed Git repository is slightly smaller than a Mercurial " "repository, but an unpacked repository is several orders of magnitude larger." msgstr "" +"Mercurial的版本库不需要维护,但Git的版本库需要频繁的手工维护,将其元数据" +"<quote>repacks</quote>,如果不这样做,性能就会下降,磁盘空间也会迅速增加。有多" +"个Git版本库的服务器需要严格和频繁的重新打包,否则在备份的时候就会成为严重的瓶" +"颈,曾经有过运行每日备份超过24小时的例子。一个新打包的Git版本库比Mercurial稍小" +"一些,但是未打包的版本库则会大几个数量级。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:520 @@ -3091,11 +3328,14 @@ "encountered several instances where scripts charged along blindly in the " "presence of errors that should have been fatal." msgstr "" +"Git的核心由C语言编写,许多Git命令是用shell或者perl脚本实现的,这些脚本的质量差" +"别很大。我碰到过好几次这样的情况,明明已经出现了致命错误了,脚本还在盲目的执" +"行。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:526 msgid "Mercurial can import revision history from a Git repository." -msgstr "" +msgstr "Mercurial可以从Git的版本库中导入版本历史。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:534 @@ -3104,6 +3344,8 @@ "to its age and internal untidiness, it has been only lightly maintained for " "many years." msgstr "" +"CVS可能是世界上使用最广泛的版本控制工具。因为它是太古老和内部实现很混乱,许多" +"年来都处于维护状态。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:538 @@ -3118,6 +3360,11 @@ "timestamps of the changes made to each file involved (if you even know what " "those files were)." msgstr "" +"CVS采用的是集中式客户/服务器结构。它不会将相关的文件变更一起作为原子提交,这使" +"得它很容易<quote>破坏构建</quote>:一个人成功的提交了一部分更改,然后要停下来" +"处理合并,这使得其他人只能看见他们的部分工作。这样也会影响你和项目历史的工作方" +"式。如果你想看到其他人针对他的那部分任务做的全部修改,你必须手动检查每个受影响" +"的文件的变更描述和时间戳(假如你知道是哪些文件)。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:550 @@ -3129,6 +3376,9 @@ "how a repository is corrupt. I would not recommend CVS for any project, " "existing or new." msgstr "" +"CVS的分支和标签的概念实在是太混乱了,我都不想给你介绍。它也不支持文件和目录的" +"重命名。这使得版本库非常容易崩溃。它几乎没任何的内部一致性检查功能,所以通常你" +"不可能知道版本库是不是崩溃了。不管是新项目还是老项目,我都不推荐使用CVS。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:558 @@ -3144,11 +3394,17 @@ "timestamps and files that have remained locked for over a decade are just two " "of the less interesting problems I can recall from personal experience)." msgstr "" +"Mercurial可以导入CVS的版本历史。然而,这里面有很多限制;对其版本控制工具的CVS" +"导入程序也是一样。因为CVS缺少原子更改并且不支持文件系统层次的版本控制,所以不" +"可能完全精确的重建CVS的历史。有些需要猜测,重命名通常发现不了。因为CVS的很多的" +"高级管理功能必须手动完成,因此非常容易出错。碰到崩溃的版本库,CVS导入程序通常" +"会出现很多问题(完全伪造的版本时间戳,若干文件被锁定十多年,这是我个人经历的两" +"个不太有趣的问题)。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:572 msgid "Mercurial can import revision history from a CVS repository." -msgstr "" +msgstr "Mercurial可以从CVS版本库导入版本历史。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:578 @@ -3163,6 +3419,8 @@ "that a user run a command to inform the server about every file they intend " "to edit." msgstr "" +"Perforce采用的是集中式客户/服务器结构,客户端不缓存任何数据。和现代的版本控制" +"工具不同,每次想要编辑的一个文件,用户必须运行一个命令通知Perforce服务器。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:586 @@ -3172,6 +3430,8 @@ "Perforce installations require the deployment of proxies to cope with the " "load their users generate." msgstr "" +"对于小的团队而言,Perforce相当好,但是当用户数目超过数十个以后,性能急剧下降。" +"中等大小Perforce安装需要部署代理来处理用户产生的负载。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch01-intro.xml:595 @@ -3185,6 +3445,7 @@ "strengths that suit them to particular styles of work. There is no single " "revision control tool that is best in all situations." msgstr "" +"除了CVS之外,以上列出的所有工具都各有所长,没有一个版本控制工具适合所有情况。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:602 @@ -3192,6 +3453,8 @@ "As an example, Subversion is a good choice for working with frequently edited " "binary files, due to its centralised nature and support for file locking." msgstr "" +"比如说,因为采用集中式的结构并且支持文件锁定,Subversion非常适合频繁编辑二进制" +"文件的场合。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch01-intro.xml:606 @@ -3200,6 +3463,8 @@ "merge support to be a compelling combination that has served me well for " "several years." msgstr "" +"我已经使用Mercurial很多年了,个人认为它有简洁,高性能,良好的合并支持诸多特" +"点。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:614 @@ -3216,6 +3481,9 @@ "the conversion later to obtain new changes that happened after the initial " "conversion." msgstr "" +"Mercurial包括一个叫<literal role=\"hg-ext\">convert</literal>的扩展,它可以递" +"增的从几个其他的版本控制工具导入版本历史。 <quote>增量</quote>的意思是你可以在" +"某天将整个项目历史转换,以后再次进行转换获得初始版本以后新增的变更。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:624 @@ -3232,6 +3500,9 @@ "Mercurial in parallel before committing to a switchover, without risking the " "loss of any work." msgstr "" +"另外<literal role=\"hg-ext\">convert</literal>可以从Mercurial向Subversion导出" +"历史,这可以让你在切换之前让Mercurial和Subversion并行工作,而不会丢失任何工" +"作。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:638 @@ -3242,6 +3513,9 @@ "After the initial conversion, just run the same command again to import new " "changes." msgstr "" +"<command role=\"hg-ext-convert\">convert</command>命令非常简单。只要给出源版本" +"库的URL或者路径,给出目标版本库的名称(可选),它就开始工作了。第一次转换之" +"后,只要运行同样的命令就可以导入新的变更。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:647 @@ -3260,6 +3534,10 @@ "unlock them, preventing anyone else from modifying those files without the " "help of an administrator." msgstr "" +"最有名史前的版本控制工具是SCCS(源代码控制系统),它是由Marc Rochkind于七十年" +"代在贝尔实验室完成的。SCCS只能控制单个文件,这就要求项目组人员只能使用一个系统" +"上的共享工作空间。任何时候一个文件只能由一个人修改;通过加锁来保证。人们很容易" +"锁定一个文件,然后忘了解锁,没有管理员的帮助,任何人都不能修改那些文件。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:660 @@ -3269,6 +3547,9 @@ "developers to work in a single shared workspace, and to lock files to prevent " "multiple people from modifying them simultaneously." msgstr "" +"Walter Tichy在八十年代早期开发了一个开源的SCCS替代软件;他称之RCS(版本控制系" +"统)。和SCCS一样,RCS要求开发人员在一个共享的工作空间工作,同时锁定文件,以防" +"止多个人他同时修改。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:666 @@ -3282,6 +3563,11 @@ "of every project file, and could modify their copies independently. They had " "to merge their edits prior to committing changes to the central repository." msgstr "" +"八十年代后期,Dick Grune在RCS的基础上开发了一套脚本,他开始称之为cmt,后来又改" +"名为CVS(并行版本系统)。CVS的最大的创新在于让开发人员可以在自己的工作空间里同" +"时而且独立的工作。私人的工作空间防止了开发人员总是互相干扰,这在SCCS和RCS的使" +"用中很常见。项目中的每个文件,开发者都有自己的拷贝,可以独立的修改自己的拷贝。" +"他们可以在提交到中央版本库之前合并更改。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:677 @@ -3296,6 +3582,11 @@ "successful; it is probably the world's most widely used revision control " "system." msgstr "" +"Brian Berliner接管了Grune的脚本,用C重写了一遍,并在1989年发布了这些代码,现在" +"的CVS就是从那时逐渐发展起来的。CVS随后增加了网络的功能,形成了客户/服务器结" +"构。CVS的结构是集中式的;仅在服务器上保存一份项目的历史拷贝。客户工作空间仅包" +"含项目中的文件的最近版本的拷贝,一些元数据告诉它们服务器的地址。CVS获得了极大" +"成功;它可能是世界上应用最广泛的版本控制系统。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:688 @@ -3306,6 +3597,9 @@ "repository. (CVS relied upon RCS for its history storage; TeamWare used " "SCCS.)" msgstr "" +"90年代早期,Sun公司开发了一个早期的分布式版本控制系统,叫做TeamWeare。TeamWare" +"的工作空间包括项目历史的完整拷贝。TeamWare没有中央版本库的概念。(CVS使用RCS存" +"储其历史,TeamWare使用SCCS。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:695 @@ -3318,6 +3612,9 @@ "and maintain, which made the <quote>pain level</quote> of fixing these " "architectural problems prohibitive." msgstr "" +"在90年代中,随着时间的流逝,CVS逐渐暴露出很多问题。它对多个文件同时发生的变更" +"不能一起记录,不能按照层次管理文件;对目录和文件的重命名很容易破坏版本库。更糟" +"的是,它的源代码很难阅读和维护,修复这些架构上的问题的非常困难。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:705 @@ -3330,6 +3627,11 @@ "generally better tool than CVS. Since its initial release, it has rapidly " "grown in popularity." msgstr "" +"2001年,原来维护过CVS的两个开发者Jim Blandy和Karl Fogel,开始了一个新项目,其" +"目标是替代CVS,新的软件将采用更好的架构和更整洁的代码。于是Subversion诞生了," +"它并保留了CVS集中式的客户/服务器模型,但是增加了多文件原子提交,更好的命名空间" +"管理,和其他一些功能。总而言之,它比CVS好的多。Subversion在发布后迅速流行起" +"来。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:714 @@ -3341,6 +3643,10 @@ "innovative ways. It uses cryptographic hashes as identifiers, and has an " "integral notion of <quote>trust</quote> for code from different sources." msgstr "" +"大概相同时间,Graydon Hoare开始了一个野心勃勃的分布式版本控制项目,他称之为" +"Monotone。Monotone解决了很多CVS设计上的漏洞并且采用了点对点的架构,它在创新方" +"面比以前(和以后)的版本控制系统走的更远。它使用加密哈希作为标识符,并且对于不" +"同源的代码有了完整的 <quote>信任</quote>概念。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-intro.xml:723 @@ -3349,6 +3655,8 @@ "influenced by Monotone, Mercurial focuses on ease of use, high performance, " "and scalability to very large projects." msgstr "" +"Mercurial诞生于2005年。设计方面受了Monotone的一些影响,Mercurial的目标是易用," +"高性能,对大的项目的良好扩展性。" #. type: Content of: <book><chapter><title> #: ../en/ch02-tour-basic.xml:5 @@ -3530,6 +3838,8 @@ "The repository for a project contains all of the files that <quote>belong to</" "quote> that project, along with a historical record of the project's files." msgstr "" +"在Mercurial中,所有的操作都在<emphasis>版本库</emphasis>中进行。项目的版本库包" +"括了属于该项目的所有文件和这些文件的历史记录。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:118 @@ -3539,6 +3849,8 @@ "rename or delete a repository any time you like, using either the command " "line or your file browser." msgstr "" +"版本库没有什么神秘的地方;仅仅是你系统中的一个目录树,Mercurial会将它们特殊处" +"理。你可以在任何喜欢的时候使用命令行或者文件浏览器删除版本库或者给它改名。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:125 @@ -3554,6 +3866,9 @@ "This command is called <command role=\"hg-cmd\">hg clone</command>, because " "it makes an identical copy of an existing repository." msgstr "" +"<emphasis>拷贝</emphasis>版本库有点特殊。虽然你可以使用文件拷贝命令来复制一般" +"版本库,最好还是用Mercurial内置的命令。这个命令叫做 <command role=\"hg-cmd" +"\">hg clone</command>,因为它创建了一个原来版本库的拷贝。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:136 @@ -3563,6 +3878,9 @@ "is that it remembers where we cloned from, which we'll find useful soon when " "we want to fetch new changes from another repository." msgstr "" +"如上所示,使用<command role=\"hg-cmd\">hg clone</command>的好处在于它能够让你" +"通过网络克隆版本库。另外一个好处你它会记得这个版本库是从哪里克隆的,稍后会看" +"到,当我们想从其他的版本库获取新的变更的时候这点这会非常有用。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:142 @@ -3570,13 +3888,15 @@ "If our clone succeeded, we should now have a local directory called <filename " "class=\"directory\">hello</filename>. This directory will contain some files." msgstr "" +"如果我们克隆成功,我们会得到一个本地目录,叫做 <filename class=\"directory" +"\">hello</filename>。这个目录会包括一些文件。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:148 msgid "" "These files have the same contents and history in our repository as they do " "in the repository we cloned." -msgstr "" +msgstr "这个版本库中的文件和我们刚才克隆的版本库中的文件相同的内容和版本历史" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:151 @@ -3587,6 +3907,9 @@ "was cloned from, but Mercurial will not communicate with that repository, or " "any other, unless you tell it to." msgstr "" +"每个Mercurial版本库都是完整的,自包含的,独立的。它包含了项目文件的一份私有拷" +"贝和全部历史。我们刚才已经提到,克隆的版本库会记住它克隆的那个版本库的地址,但" +"是Mercurial不会和那个或者其他任何一个版本库通信,除非你给它命令。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:158 @@ -3595,6 +3918,8 @@ "safe in the knowledge that it's a private <quote>sandbox</quote> that won't " "affect anyone else." msgstr "" +"这意味着,我们可以随意的在我们的版本库中做实验,非常安全,因为它是一个私有的" +"<quote>沙盒</quote>,不会影响任何人。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:164 @@ -3608,6 +3933,8 @@ "contains a directory named <filename class=\"directory\">.hg</filename>. " "This is where Mercurial keeps all of its metadata for the repository." msgstr "" +"当我们仔细观察版本库内部时,我们会发现它有一个叫<filename class=\"directory" +"\">.hg</filename>的目录。这就是Mercurial为版本库保存所有元数据的地方。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:173 @@ -3616,6 +3943,8 @@ "and its subdirectories are private to Mercurial. Every other file and " "directory in the repository is yours to do with as you please." msgstr "" +"目录<filename class=\"directory\">.hg</filename>中的内容和其子目录是Mercurial" +"私有的。版本库中的其他任何文件和目录你都可以随意操作。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:179 @@ -3629,6 +3958,11 @@ "directory</emphasis> contains a <emphasis>snapshot</emphasis> of your project " "at a particular point in history." msgstr "" +"介绍一点术语, <filename class=\"directory\">.hg</filename>目录是<quote>真正的" +"</quote>版本库,所有其他的文件和目录称为<emphasis>工作目录</emphasis>一个简单" +"的区分的方法就是<emphasis>版本库</emphasis>中包含了项目的<emphasis>历史</" +"emphasis>,而 <emphasis>工作目录</emphasis>则是项目组一个特定历史点上的" +"<emphasis>快照</emphasis>。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:194 @@ -3642,6 +3976,8 @@ "is understand its history. The <command role=\"hg-cmd\">hg log</command> " "command gives us a view of the history of changes in the repository." msgstr "" +"对于一个新的,我们不熟悉的版本库,我们想做的第一件事就是了解它的历史。命令" +"<command role=\"hg-cmd\">hg log</command>可以让我们浏览版本库中的历史变更。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:203 @@ -3651,6 +3987,9 @@ "these recorded events a <emphasis>changeset</emphasis>, because it can " "contain a record of changes to several files." msgstr "" +"缺省情况下,这个命令对项目中记录的每个变更都输出一段简介,在Mercurial的术语" +"中,我们将这些记录的事件成为<emphasis>变更集</emphasis>,因为每个记录都可能包" +"括几个文件的变更。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:209 @@ -3658,6 +3997,7 @@ "The fields in a record of output from <command role=\"hg-cmd\">hg log</" "command> are as follows." msgstr "" +" <command role=\"hg-cmd\">hg log</command>输出记录的各个字段的意义如下。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:213 @@ -3670,6 +4010,11 @@ "to type than the hex string, but it isn't unique: the same number in two " "different clones of a repository may identify different changesets." msgstr "" +"<literal>changeset</literal>:这个字段包括一个数字,接着一个冒号,然后是是一个" +"十六进制字符串。这是这个变更的<emphasis>标识符</emphasis>。十六进制字符串是唯" +"一标识符:在这个版本库的任何一个拷贝中,同一个字符串总是对应同一个变更集。数字" +"更短并且比十六进制字符串更容易书写,但它不是唯一的:一个版本库的两个不同的的克" +"隆中的同一个数字可能对应不同的变更集。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:224 @@ -3678,6 +4023,8 @@ "changeset. This is a free-form field, but it most often contains a person's " "name and email address." msgstr "" +"<literal>user</literal>:这个字段标识是谁创建了这个变更集。这个字段格式可以自" +"由定义,通常是一个人的姓名加上电子邮件地址。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:228 @@ -3687,13 +4034,15 @@ "local to that timezone; they display what time and date it was for the person " "who created the changeset.)" msgstr "" +"<literal>date</literal>:这是变更集创建的日期和时间,还有时区。(日期和时间是" +"相对于时区的;他们显示了创建变更的人的日期和时间。)" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:233 msgid "" "<literal>summary</literal>: The first line of the text message that the " "creator of the changeset entered to describe the changeset." -msgstr "" +msgstr "<literal>summary</literal>:创建者对该变更集的描述的第一行文本信息。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:237 @@ -3703,6 +4052,9 @@ "an easy-to-remember name. (The tag named <literal>tip</literal> is special: " "it always refers to the newest change in a repository.)" msgstr "" +"有些变更集,像上面的第一个,有一个<literal>标签</literal>字段。标签是区分变更" +"集的另外一种方法,给它一个容易记得名字。(叫做<literal>tip</literal>的标签有特" +"殊意义:总是指向版本库中的最新的变更。)" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:245 @@ -3710,6 +4062,8 @@ "The default output printed by <command role=\"hg-cmd\">hg log</command> is " "purely a summary; it is missing a lot of detail." msgstr "" +"缺省情况下,<command role=\"hg-cmd\">hg log</command>的输出仅仅是个摘要,没有" +"更详细的信息。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:249 @@ -3720,6 +4074,9 @@ "history is <quote>flowing</quote> in. We'll be returning to this figure " "several times in this chapter and the chapter that follows." msgstr "" +"<xref linkend=\"fig:tour-basic:history\"/>以图形化方式显示了版本库<filename " +"class=\"directory\">hello</filename>的历史,这样很容易看出历史的<quote>流向</" +"quote>。在本章和下面的章节中,我们会多次使用这个图。" #. type: Content of: <book><chapter><sect1><figure><title> #: ../en/ch02-tour-basic.xml:258 @@ -3759,7 +4116,7 @@ #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:267 msgid "Changesets, revisions, and talking to other people" -msgstr "修改集,版本,与其它用户交互" +msgstr "变更集,版本,与其它用户交互" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:270 @@ -3772,6 +4129,11 @@ "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a " "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>." msgstr "" +"英语是一种非常随便的语言,计算机史上也向来以混乱的术语为荣(如能用四个词为什么" +"要用一个呢?),就版本控制而言,有很多词和短语有相同的意思。如果你和别人讨论" +"Mercurial版本库的历史,你会发现<quote>变更集</quote>这个词常常被简化成<quote>" +"变更</quote>或者(写的时候)<quote>cset</quote>,有时候变更集也指一个<quote>版" +"本</quote>或者<quote>rev</quote>。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:280 @@ -3783,13 +4145,18 @@ "literal> field in the output from <command role=\"hg-cmd\">hg log</command> " "identifies a changeset using both a number and a hexadecimal string." msgstr "" +"实际上,用哪个<emphasis>词</emphasis>来描述<quote>变更集</quote>的概念并不重" +"要,重要的是如何用<emphasis>标识符</emphasis>来标识<quote>一个<emphasis>特定的" +"</emphasis>变更集</quote>。回忆一下<command role=\"hg-cmd\">hg log</command>命" +"令的输出,<literal>changeset</literal>字段里用一个数字和一个十六进制字符串来标" +"识一个变更集。" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:289 msgid "" "The revision number is a handy notation that is <emphasis>only valid in that " "repository</emphasis>." -msgstr "" +msgstr "版本号是一个方便的标识,它仅在<emphasis>当前版本库中有效</emphasis>。" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:292 @@ -3798,6 +4165,8 @@ "emphasis> that will always identify that exact changeset in <emphasis>every</" "emphasis> copy of the repository." msgstr "" +"十六进制字符串是<emphasis>永久的,不变的标识</emphasis>,它在该版本库的所有拷" +"贝中都指向同一个变更集。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:298 @@ -3811,6 +4180,11 @@ "literal> can easily appear in one repository as <literal>0,1,2</literal>, " "while in another as <literal>0,2,1</literal>." msgstr "" +"这个区别很重要。如果你通过邮件和别人讨论<quote>版本33</quote>,很有可能他们的" +"版本33和你的<emphasis>不一样</emphasis>。原因在于版本号依赖于相应变更进入版本" +"库的顺序。,不能保证同一个变更在不同的版本库中会有相同的次序。有可能三个变更" +"<literal>a,b,c</literal>在一个版本库中的次序是<literal>0,1,2</literal>,而在另" +"外一个版本库中则变成<literal>0,2,1</literal>" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:310 @@ -3820,11 +4194,13 @@ "some other reason (for example, in a bug report), use the hexadecimal " "identifier." msgstr "" +"Mercurial使用版本号纯粹是为了有些命令的方便,如果你要和别人讨论变更集,或者由" +"于某些原因为一个变更集做记录(如在bug报告中),请使用十六进制标识符。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:318 msgid "Viewing specific revisions" -msgstr "察看指定版本" +msgstr "查看指定版本" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:320 @@ -3835,6 +4211,10 @@ "number or a hexadecimal identifier, and you can provide as many revisions as " "you want." msgstr "" +"如果只想用<command role=\"hg-cmd\">hg log</command>查看一个版本的日志使用" +"<option role=\"hg-opt-log\">-r</option>(或者<option role=\"hg-opt-log\">--" +"rev</option>)选项。版本号和十六进制标识符都可以来指定版本,可以一次指定任意多" +"个版本。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:329 @@ -3844,6 +4224,9 @@ "express the idea <quote>I want all revisions between <literal>abc</literal> " "and <literal>def</literal>, inclusive</quote>." msgstr "" +"如果你想显示几个版本历史,但是不想一个一个的列出来,可以使用 <emphasis>范围标" +"记</emphasis>;它会显示包括<literal>abc</literal>和<literal>def</literal>,以" +"及它们之间的所有版本的版本历史。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:337 @@ -3852,6 +4235,9 @@ "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2." msgstr "" +"Mercurial还可以指定版本的输出顺序,如<command role=\"hg-cmd\">hg log -r 2:4</" +"command>输出2,3,4。而<command role=\"hg-cmd\">hg log -r 4:2</command>则输出" +"4,3,2。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:344 @@ -3869,6 +4255,11 @@ "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) " "option gives you this extra detail." msgstr "" +"当你知道你在找那个版本的时候,<command role=\"hg-cmd\">hg log</command>输出的" +"摘要是非常有用的,但有时候你不知道要找哪个版本,你想看到变更的完整描述,或者修" +"改过的文件的列表,<command role=\"hg-cmd\">hg log</command>命令的<option role=" +"\"hg-opt-global\">-v</option>(<option role=\"hg-opt-global\">--verbose</" +"option>)选项会给出更详细的信息。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:358 @@ -3879,13 +4270,17 @@ "<emphasis>unified diff</emphasis> (if you've never seen a unified diff " "before, see <xref linkend=\"sec:mq:patch\"/> for an overview)." msgstr "" +"如果你想同时看到变更的描述和内容,增加<option role=\"hg-opt-log\">-p</option>" +"(<option role=\"hg-opt-log\">--patch</option>)选项。这会将变更的内容以" +"<emphasis>unified diff</emphasis>的格式显示(如果你不知道unified diff,请参考" +"<xref linkend=\"sec:mq:patch\"/>。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:368 msgid "" "The <option role=\"hg-opt-log\">-p</option> option is tremendously useful, so " "it's well worth remembering." -msgstr "" +msgstr "<option role=\"hg-opt-log\">-p</option>选项非常有用,所以一定要记住。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:375 @@ -3899,6 +4294,8 @@ "pattern in the way that they work; you may find this useful to keep in mind " "as we continue our tour." msgstr "" +"我们休息一下,先不讨论Mercurial命令了,而是来看看它们工作的模式;这对以后的学" +"习会非常有帮助。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:381 @@ -3907,6 +4304,8 @@ "options that you can pass to commands. It follows the conventions for " "options that are common to modern Linux and Unix systems." msgstr "" +"Mercurial处理传递给它的命令选项的方法简单一致。它遵从现代Linux和Unix对选项的处" +"理习惯。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:388 @@ -3915,6 +4314,8 @@ "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" "opt-log\">--rev</option> option." msgstr "" +"每个选项有一个长名。例如,我们已经看到了,<command role=\"hg-cmd\">hg log</" +"command>命令接受<option role=\"hg-opt-log\">--rev</option>选项。" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:394 @@ -3924,6 +4325,9 @@ "reason that some options don't have short names is that the options in " "question are rarely used.)" msgstr "" +"大多数选项还有短名,除了使用<option role=\"hg-opt-log\">--rev</option>,我们还" +"可以用<option role=\"hg-opt-log\">-r</option>。(有些选项没有短名的原因是他们" +"很少用到。)" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> #: ../en/ch02-tour-basic.xml:401 @@ -3949,6 +4353,9 @@ "For example, the command <command role=\"hg-cmd\">hg log -v -p -r 2</command> " "can be written as <command role=\"hg-cmd\">hg log -vpr2</command>." msgstr "" +"如果使用短选项,你可以把它们放在一起以减少输入。例如,命令<command role=\"hg-" +"cmd\">hg log -v -p -r 2</command> 可以写成 <command role=\"hg-cmd\">hg log -" +"vpr2</command>。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:421 @@ -3957,6 +4364,8 @@ "long. This simply reflects my own preference, so don't read anything " "significant into it." msgstr "" +"在本书的例子中,我通常使用短选项,很少用长选项。这仅仅是我个人的习惯,你不一定" +"要这样。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:425 @@ -3970,7 +4379,7 @@ #. type: Content of: <book><chapter><sect1><note><title> #: ../en/ch02-tour-basic.xml:432 msgid "Option naming consistency" -msgstr "" +msgstr "选项命名的一致性" #. type: Content of: <book><chapter><sect1><note><para> #: ../en/ch02-tour-basic.xml:434 @@ -3985,7 +4394,7 @@ #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:445 msgid "Making and reviewing changes" -msgstr "创建和复审修改" +msgstr "创建和复审变更" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:447 @@ -3993,6 +4402,8 @@ "Now that we have a grasp of viewing history in Mercurial, let's take a look " "at making some changes and examining them." msgstr "" +"现在我们已经对查看Mercurial的版本历史有了一些了解,现在我们开始做些修改并且检" +"查这些修改。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:451 @@ -4014,6 +4425,9 @@ "you, don't worry: everything happens transparently and automatically, and you " "don't need to understand it." msgstr "" +"如果版本库的源和目标都在同一个文件系统上,将会节省很多空间。这种情况下," +"Mercurial会使用硬链接的方式来共享内部元数据,并使用写时拷贝的机制。如果你不明" +"白这句话的意思,没有关系:所有的事情都是自动和透明的,你不需要知道它们。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:468 @@ -4026,6 +4440,10 @@ "there's almost no overhead to cloning and destroying repositories whenever " "you want." msgstr "" +"说句题外话,保留远程版本库的一份<quote>原始</quote>拷贝是一个很好的习惯,这样" +"你就可以为每个任务都创建临时的克隆作为沙盒。直到认务完成并且你准备好提交到版本" +"库, 每个任务都和其他的独立,这样你可以并行工作。因为本地的克隆很方便,在任何时" +"候克隆和销毁一个版本库都只有很小的开销。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:477 @@ -4034,11 +4452,14 @@ "a file <filename>hello.c</filename> that contains the classic <quote>hello, " "world</quote> program." msgstr "" +"在我们的<filename class=\"directory\">my-hello</filename>版本库中,有一个叫" +"<filename>hello.c</filename>的文件,它包含了经典的<quote>hello, world</quote>" +"程序。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:483 msgid "Let's edit this file so that it prints a second line of output." -msgstr "" +msgstr "我们编辑这个文件,让它打印第二行输出。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:488 @@ -4046,6 +4467,8 @@ "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " "what Mercurial knows about the files in the repository." msgstr "" +"Mercurial的<command role=\"hg-cmd\">hg status</command>命令能告诉我们它对版本" +"库中的文件有多少了解。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:494 @@ -4056,6 +4479,10 @@ "\">hg status</command> will not print any output for files that have not been " "modified." msgstr "" +"<command role=\"hg-cmd\">hg status</command>命令对有些文件没有输出信息,但是对" +"文件<filename>hello.c</filename>,有一行以<quote><literal>M</literal></quote>" +"为开头的输出。除非你明确告诉它,命令<command role=\"hg-cmd\">hg status</" +"command>不会输出那些没有修改的文件的信息。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:501 @@ -4066,6 +4493,9 @@ "before we started, or that we had modified the file after we were done; it " "was able to figure this out itself." msgstr "" +"<quote><literal>M</literal></quote>表明Mercurial已经发现我们修改了" +"<filename>hello.c</filename>。我们不需要在改文件之前,或者在修改完之后" +"<emphasis>通知</emphasis>Mercurial;它自己能处理。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:509 @@ -4075,6 +4505,9 @@ "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg " "diff</command> command." msgstr "" +"知道文件<filename>hello.c</filename>被修改了很有用,但有时候我们想知道做了" +"<emphasis>什么</emphasis>样的修改。这时,我们应该使用 <command role=\"hg-cmd" +"\">hg diff</command>命令。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187 @@ -4086,7 +4519,7 @@ msgid "" "Remember to take a look at <xref linkend=\"sec:mq:patch\"/> if you don't know " "how to read output above." -msgstr "" +msgstr "如果你不知道如何理解以上信息,请参考<xref linkend=\"sec:mq:patch\"/>。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:526 @@ -4101,6 +4534,9 @@ "review our changes, until we're satisfied with what we've done and arrive at " "a natural stopping point where we want to record our work in a new changeset." msgstr "" +"我们可以修改文件,创建并测试我们的修改,使用命令<command role=\"hg-cmd\">hg " +"status</command>和<command role=\"hg-cmd\">hg diff</command>复审修改,直到我们" +"对修改满意,同时也达到了一个自然的停止点,然后用一个新的变更集记录我们的工作。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:535 @@ -4109,6 +4545,8 @@ "changeset; we'll usually refer to this as <quote>making a commit</quote> or " "<quote>committing</quote>." msgstr "" +"我们用命令<command role=\"hg-cmd\">hg commit</command>创建新的变更集;我们通常" +"把这个称为<quote>做一次提交</quote>或者<quote>提交</quote>。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:541 @@ -4125,6 +4563,10 @@ "figure out a sensible username to commit the change with. It will attempt " "each of the following methods, in order:" msgstr "" +"当你准备第一次运行<command role=\"hg-cmd\">hg commit</command>命令时,不一定会" +"成功。对于你提交的每个变更,Mercurial都会记录你的名字和邮件地址,这样你和其他" +"人以后就能分开是谁做的哪个变更。Mercurial会自动尝试找出一个有意义的用户名来提" +"交。它会依次尝试以下方法:" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> #: ../en/ch02-tour-basic.xml:552 @@ -4133,13 +4575,16 @@ "<command role=\"hg-cmd\">hg commit</command> command on the command line, " "followed by a username, this is always given the highest precedence." msgstr "" +"如果你给<command role=\"hg-cmd\">hg commit</command>命令加上了<option role=" +"\"hg-opt-commit\">-u</option>选项,接着是一个用户名,Mercurial会使用这个用户" +"名,这是最高的优先级。" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> #: ../en/ch02-tour-basic.xml:557 msgid "" "If you have set the <envar>HGUSER</envar> environment variable, this is " "checked next." -msgstr "" +msgstr "接下来测试你是否设定了<envar>HGUSER</envar>环境变量。" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> #: ../en/ch02-tour-basic.xml:560 @@ -4149,13 +4594,16 @@ "entry, that will be used next. To see what the contents of this file should " "look like, refer to <xref linkend=\"sec:tour-basic:username\"/> below." msgstr "" +"如果你在主目录创建了名字为<filename role=\"special\">.hgrc</filename>的文件," +"其中包括<envar role=\"rc-item-ui\">username</envar>条目,那就用它。如果想知道" +"这个文件的格式,请参考下面的<xref linkend=\"sec:tour-basic:username\"/>。" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> #: ../en/ch02-tour-basic.xml:568 msgid "" "If you have set the <envar>EMAIL</envar> environment variable, this will be " "used next." -msgstr "" +msgstr "如果你设置了<envar>EMAIL</envar>环境变量,那就用它。" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> #: ../en/ch02-tour-basic.xml:571 @@ -4165,6 +4613,8 @@ "results in a username that is not very useful, it will print a warning if it " "has to do this." msgstr "" +"Mercurial会查询你的系统,找出主机名和你的用户名,然后用他们创建一个用户名。这" +"样的用户名不怎么有用,所以在只能这样生成用户名的时候,它会打印出一条告警信息。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:578 @@ -4173,6 +4623,8 @@ "message. In this case, it will not let you commit until you set up a " "username." msgstr "" +"如果所有的这些机制都失败了,Mercurial会执行失败退出,打印出一条错误信息这种情" +"况下,只有你设定了用户名之后才能提交。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:582 @@ -4184,6 +4636,10 @@ "most robust way to set a username for yourself is by creating a <filename " "role=\"special\">.hgrc</filename> file; see below for details." msgstr "" +"当你需要覆盖Mercurial缺省的用户时,可以考虑<envar>HGUSER</envar>环境变量和" +"<command role=\"hg-cmd\">hg commit</command>命令的<option role=\"hg-opt-commit" +"\">-u</option>选项。正常使用的情况下,最简单实用的方法就是创建<filename role=" +"\"special\">.hgrc</filename>文件来设定用户名;步骤如下。" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> #: ../en/ch02-tour-basic.xml:591 @@ -4199,11 +4655,14 @@ "settings. The initial contents of your <filename role=\"special\">.hgrc</" "filename> should look like this." msgstr "" +"设定用户名的时候,使用你最喜欢的编辑器在你的主目录创建一个名为<filename role=" +"\"special\">.hgrc</filename>的文件。Mercurial将会从这个文件中查找你的个人配置" +"信息。你的<filename role=\"special\">.hgrc</filename>开始的时候应该是这样子。" #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><title> #: ../en/ch02-tour-basic.xml:602 msgid "<quote>Home directory</quote> on Windows" -msgstr "" +msgstr "Windows上的<quote>主目录</quote>" #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><para> #: ../en/ch02-tour-basic.xml:604 @@ -4214,6 +4673,9 @@ "name of your home directory by opening a command prompt window and running " "the following command." msgstr "" +"英文版的Windows的主目录通常是<filename>C:\\Documents and Settings</filename>下" +"你的用户名的那个文件夹。如果要找出你的主目录的确切位置,可以打开一个命令行窗" +"口,运行以下命令。" #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><prompt> #: ../en/ch02-tour-basic.xml:612 @@ -4236,6 +4698,10 @@ "file. Mercurial ignores empty lines and treats any text from " "<quote><literal>#</literal></quote> to the end of a line as a comment." msgstr "" +"配置文件中<quote><literal>[ui]</literal></quote>这行标识着一个<emphasis>字段</" +"emphasis>的开始,<quote><literal>username = ...</literal></quote>这行的意思是在" +"<literal>ui</literal>字段中设定项<literal>username</literal>的值。当出现一个新" +"的字段或者到达文件结尾的时候,当前的字段才结束。" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> #: ../en/ch02-tour-basic.xml:632 @@ -4250,6 +4716,9 @@ "not be interpreted by Mercurial. The convention that most people follow is " "to use their name and email address, as in the example above." msgstr "" +"<literal>username</literal>配置项的值可以是你喜欢的任意文字,因为这项信息主要" +"是给其他用户阅读的,所以Mercurial不会去解释它。大多数人的习惯是采用用户名加上" +"邮件地址的格式,就像上面的例子一样。" #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> #: ../en/ch02-tour-basic.xml:641 @@ -4259,6 +4728,9 @@ "likelihood that you'll start receiving more junk email if you publish a " "Mercurial repository on the web." msgstr "" +"Mercurial内置的网络服务器会混淆邮件地址,让垃圾邮件发送者用的邮件地址抓取工具" +"很难获取你的邮件地址。当你把Mercurial的版本库在网路上发布的时候,这可以减小你" +"接收到垃圾邮件的风险。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:650 @@ -4274,6 +4746,10 @@ "for readers of what we did and why, and it will be printed by <command role=" "\"hg-cmd\">hg log</command> after we've finished committing." msgstr "" +"我们提交一个变更的时候,Mercurial会打开一个编辑器,让我们输入一些信息来描述这" +"个变更集做的更改。这就是<emphasis>提交日志</emphasis>。它会告诉读者我们改了什" +"么以及修改的原因,我们提交之后,命令<command role=\"hg-cmd\">hg log</command>" +"会输出这些信息。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:662 @@ -4282,6 +4758,8 @@ "drops us into will contain an empty line or two, followed by a number of " "lines starting with <quote><literal>HG:</literal></quote>." msgstr "" +"<command role=\"hg-cmd\">hg commit</command>命令打开的编辑器包括一两个空行,接" +"着是以<quote><literal>HG:</literal></quote>开始的行。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:676 @@ -4290,11 +4768,13 @@ "quote>; it uses them only to tell us which files it's recording changes to. " "Modifying or deleting these lines has no effect." msgstr "" +"Mercurial会忽略以<quote><literal>HG:</literal></quote>为开始的行;它仅仅用来告" +"诉我们这个变更集中包括哪些文件。修改或者删除这行没有任何影响。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:682 msgid "Writing a good commit message" -msgstr "写好提交日志" +msgstr "写高质量的提交日志" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:684 @@ -4305,6 +4785,9 @@ "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary " "that is not readable." msgstr "" +"因为<command role=\"hg-cmd\">hg log</command>命令在缺省情况下仅会输出提交日志" +"的第一行,所以日志第一行最好是单独的一行。下面是一个日志的实例,它<emphasis>没" +"有</emphasis>遵守这个规则,因此摘要可读性很差。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:697 @@ -4314,6 +4797,8 @@ "about the contents of the commit message, though your project may have " "policies that dictate a certain kind of formatting." msgstr "" +"至于日志的其他部分的内容,没有严格的规定。Mercurial并不解释或者关心日志的内" +"容,虽然你的项目可能有某种格式的规定。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:702 @@ -4322,6 +4807,8 @@ "tell me something that I can't figure out with a quick glance at the output " "of <command role=\"hg-cmd\">hg log --patch</command>." msgstr "" +"我个人喜欢简短,而又信息量大的日志,它能告诉我一些我不能通过快速浏览<command " +"role=\"hg-cmd\">hg log --patch</command>的输出而得到的信息。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:706 @@ -4331,11 +4818,14 @@ "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " "diff</command>." msgstr "" +"如果我们运行<command role=\"hg-cmd\">hg commit</command>命令的时候没有指定文" +"件,它会提交我们做的所有修改,与<command role=\"hg-cmd\">hg status</command>和" +"<command role=\"hg-cmd\">hg diff</command>这两个命令的输出一样。" #. type: Content of: <book><chapter><sect1><sect2><note><title> #: ../en/ch02-tour-basic.xml:713 msgid "A surprise for Subversion users" -msgstr "" +msgstr "Subversion用户的困惑" #. type: Content of: <book><chapter><sect1><sect2><note><para> #: ../en/ch02-tour-basic.xml:715 @@ -4346,6 +4836,10 @@ "the Subversion or CVS world, since you might expect it to operate only on the " "current directory that you happen to be visiting and its subdirectories." msgstr "" +"和所有的Mercurial命令一样,如果我们不明确指出<command role=\"hg-cmd\">hg " +"commit</command>命令要提交的文件名,它会在整个版本库的工作目录上执行操作。如果" +"你以前使用过CVS或者Subversion,那一定要注意,你可能仅仅希望提交当前目录与其子" +"目录的修改。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:726 @@ -4360,6 +4854,8 @@ "it's editing. This will cause nothing to happen to either the repository or " "the working directory." msgstr "" +"如果你在编辑日志的时候决定不再提交,只要退出编辑器同时不保存文件就可以了。这对" +"版本库和当前目录都没有任何影响。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:736 @@ -4374,6 +4870,9 @@ "produces output that is identical to <command role=\"hg-cmd\">hg log</" "command>, but it only displays the newest revision in the repository." msgstr "" +"提交完成后,我们就可以用<command role=\"hg-cmd\">hg tip</command>命令显示刚刚" +"创建的变更集。这个命令和<command role=\"hg-cmd\">hg log</command>的输出一样," +"但是只显示版本库中最新的版本。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:746 @@ -4381,6 +4880,8 @@ "We refer to the newest revision in the repository as the <emphasis>tip " "revision</emphasis>, or simply the <emphasis>tip</emphasis>." msgstr "" +"我们通常把版本库中最新的版本称为<emphasis>tip版本</emphasis>或者简称为" +"<emphasis>tip</emphasis>。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:750 @@ -4392,11 +4893,16 @@ "patch</quote>. The use of <option role=\"hg-opt-tip\">-p</option> to print " "patches is another example of the consistent naming we mentioned earlier." msgstr "" +"顺便提一下,<command role=\"hg-cmd\">hg tip</command>命令可以接受很多和" +"<command role=\"hg-cmd\">hg log</command>命令一样的选项。如<option role=\"hg-" +"opt-global\">-v</option>选项的意思是<quote>详细的</quote>。<option role=\"hg-" +"opt-tip\">-p</option>的意思是<quote>输出补丁</quote>。使用<option role=\"hg-" +"opt-tip\">-p</option>输出补丁也是我们前面提到的一致性的另外一个例子。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:762 msgid "Sharing changes" -msgstr "共享修改" +msgstr "分享修改" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:764 @@ -4406,11 +4912,14 @@ "\"directory\">my-hello</filename> repository. Let's look at a few ways that " "we can propagate this change into other repositories." msgstr "" +"前面我们曾经提到Mercurial的版本库是自包含的。这意味着我们刚才创建的变更集仅仅" +"存在于我们的<filename class=\"directory\">my-hello</filename>版本库中。下面我" +"们会看到几种将变更传播到其他版本库的方法。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:772 msgid "Pulling changes from another repository" -msgstr "从其它版本库取得修改" +msgstr "从其它版本库取得变更" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:774 @@ -4420,6 +4929,9 @@ "We'll call our temporary repository <filename class=\"directory\">hello-pull</" "filename>." msgstr "" +"首先,我们克隆原始版本的<filename class=\"directory\">hello</filename>版本库," +"它不包含我们刚刚提交的变更。我们将这个临时版本库称为<filename class=" +"\"directory\">hello</filename>。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:782 @@ -4433,6 +4945,12 @@ "<emphasis>would</emphasis> pull into the repository, without actually pulling " "the changes in." msgstr "" +"我们用<command role=\"hg-cmd\">hg pull</command>命令将变更从<filename class=" +"\"directory\">my-hello</filename>拖到<filename class=\"directory\">hello-" +"pull</filename>。然而,不管三七二十一将不了解的变更拖进版本库也实在是冒险。" +"Mercurial提供了<command role=\"hg-cmd\">hg incoming</command>命令,它会告诉我" +"们<command role=\"hg-cmd\">hg pull</command>将会把哪些变更拖进版本库,但不会真" +"正的执行。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:795 @@ -4441,6 +4959,8 @@ "role=\"hg-cmd\">hg pull</command> command, and optionally telling it which " "repository to pull from." msgstr "" +"运行<command role=\"hg-cmd\">hg pull</command>命令将变更拖进版本库非常简单,你" +"可以指定从那个版本库拖变更。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:801 @@ -4451,6 +4971,9 @@ "the working directory. There remains one step before we will see the changes " "that we just pulled appear in the working directory." msgstr "" +"从前后的<command role=\"hg-cmd\">hg tip</command>的输出可以看出,我们成功将变" +"更拖进了我们的版本库。然而,Mercurial将拖变更和更新当前工作目录分成两个操作。" +"在看到在当前目录中我们刚拖进的变更之前,还有一步要完成。" #. type: Content of: <book><chapter><sect1><sect2><tip><title> #: ../en/ch02-tour-basic.xml:810 @@ -4470,6 +4993,12 @@ "more changes than you saw when using <command role=\"hg-cmd\">hg incoming</" "command>." msgstr "" +"因为在运行<command role=\"hg-cmd\">hg incoming</command>和<command role=\"hg-" +"cmd\">hg pull</command>之间可能存在延时,你可能不能看到从其他版本库中的所有导入" +"进来的变更集。假如你正在通过网络从其他地方的版本库拖变更。当你查看<command " +"role=\"hg-cmd\">hg incoming</command>的输出,还没有拖这些变更的时候,其他人向" +"这个版本库提交了一些东西。这意味着你可能拖进来比你用<command role=\"hg-cmd" +"\">hg incoming</command>看见的多的变更。" #. type: Content of: <book><chapter><sect1><sect2><tip><para> #: ../en/ch02-tour-basic.xml:824 @@ -4479,6 +5008,9 @@ "a subset of changes, simply identify the change that you want to pull by its " "changeset ID, e.g. <command>hg pull -r7e95bb</command>." msgstr "" +"如果你仅希望将<command role=\"hg-cmd\">hg incoming</command>命令列出的变更拖进" +"来,或者由于其他原因希望得到变更的一个子集,那么你可以明确的指定变更集的ID,比" +"如<command>hg pull -r7e95bb</command>。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:834 @@ -4496,6 +5028,12 @@ "not (by default) touch the working directory. Instead, we use the <command " "role=\"hg-cmd\">hg update</command> command to do this." msgstr "" +"现在我们已经对版本库和它的工作目录之间的关系有了粗略的了解。我们在<xref " +"linkend=\"sec:tour:pull\"/>一节运行的<command role=\"hg-cmd\">hg pull</" +"command>命令会将变更拖进版本库,但是如果我们检查一下的话,就会发现工作目录并没" +"有变化。这是因为<command role=\"hg-cmd\">hg pull</command>命令并不会影响工作目" +"录。实际上,我们需要<command role=\"hg-cmd\">hg update</command>命令来完成这个" +"工作。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:848 @@ -4510,6 +5048,12 @@ "automatically updated the working directory to a new revision, you might not " "be terribly happy." msgstr "" +"<command role=\"hg-cmd\">hg pull</command>命令并不会自动更新工作目录,这看起来" +"有点奇怪。但实际上这样做是有原因的:你可以用<command role=\"hg-cmd\">hg " +"update</command>来更新工作目录,切换到版本库中的任意一个版本。假设你将工作目录" +"切换到一个老的版本&emdash;假如说是为了追踪一个bug&emdash;然后运行了<command " +"role=\"hg-cmd\">hg pull</command>命令。它自动将工作目录更新到新版本,这可能并" +"不是你想要的结果。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:860 @@ -4518,6 +5062,9 @@ "lets you combine the two by passing the <option role=\"hg-opt-pull\">-u</" "option> option to <command role=\"hg-cmd\">hg pull</command>." msgstr "" +"因为拖然后更新是个非常常用的操作顺序,Mercurial允许你将这两个操作组合在一起," +"只要给<command role=\"hg-cmd\">hg pull</command>命令加上<option role=\"hg-opt-" +"pull\">-u</option>选项就可以了。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:865 @@ -4527,6 +5074,10 @@ "opt-pull\">-u</option>, you can see that it printed a helpful reminder that " "we'd have to take an explicit step to update the working directory." msgstr "" +"如果回顾<xref linkend=\"sec:tour:pull\"/>一节,我们运行<command role=\"hg-cmd" +"\">hg pull</command>而又没有加上<option role=\"hg-opt-pull\">-u</option>选项" +"时,你可能会发现它输出了一条很有用的提示,我们还需要执行一个操作,才能更新工作" +"目录。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:872 @@ -4534,6 +5085,8 @@ "To find out what revision the working directory is at, use the <command role=" "\"hg-cmd\">hg parents</command> command." msgstr "" +"如果想知道工作目录的版本,可以使用<command role=\"hg-cmd\">hg parents</" +"command>命令。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:878 @@ -4545,6 +5098,10 @@ "a parent in just the same way; this is the changeset that the working " "directory currently contains." msgstr "" +"如果回顾<xref linkend=\"fig:tour-basic:history\"/>一节,你会看到箭头连着每个变" +"更集。箭头<emphasis>离开</emphasis>的节点是父版本,箭头<emphasis>指向</" +"emphasis>的是子版本。工作目录的父版本也是一样的方式;它是工作目录包含的变更" +"集。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:887 @@ -4553,6 +5110,8 @@ "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " "command." msgstr "" +"如果需要将工作目录切换到一个特定版本,给<command role=\"hg-cmd\">hg update</" +"command>命令加上版本号或者变更集标识符就可以了。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:893 @@ -4561,6 +5120,9 @@ "command> will update to the tip revision, as shown by the second call to " "<command role=\"hg-cmd\">hg update</command> in the example above." msgstr "" +"如果没有明确指出版本,<command role=\"hg-cmd\">hg update</command>会更新到tip" +"版,就像上面例子<command role=\"hg-cmd\">hg update</command>第二次执行的结果一" +"样。 " #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:901 @@ -4575,6 +5137,8 @@ "pull</command> above, we'll create a temporary repository to push our changes " "into." msgstr "" +"我们可以将变更从当前所在的版本库推到其他的版本库。与上面的<command role=\"hg-" +"cmd\">hgpull</command>例子一样,我们可以创建一个临时的版本库存放我们的变更。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:911 @@ -4582,13 +5146,15 @@ "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " "changes would be pushed into another repository." msgstr "" +"<command role=\"hg-cmd\">hg outgoing</command>命令可以告诉我们那些变更将会被推" +"到另外一个版本库。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:917 msgid "" "And the <command role=\"hg-cmd\">hg push</command> command does the actual " "push." -msgstr "" +msgstr "而<command role=\"hg-cmd\">hg push</command>命令则会执行真正的推操作。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:922 @@ -4603,6 +5169,12 @@ "update its working directory while someone was working in it, their work " "would be disrupted." msgstr "" +"与<command role=\"hg-cmd\">hg pull</command>一样,在变更推送之后,<command " +"role=\"hg-cmd\">hg push</command>命令并不会更新版本库的工作目录,与<command " +"role=\"hg-cmd\">hg pull</command>命令不同,<command role=\"hg-cmd\">hg push</" +"command>并不提供<literal>-u</literal>选项来更新其他版本库的工作目录。这一不对" +"称是有目的的:我们推送的版本库可能是一个远端的服务器,并且很多人共享使用它。如" +"果在其他人正在工作的时候,我们更新了工作目录,那么他们的工作很可能被破坏。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:934 @@ -4610,6 +5182,8 @@ "What happens if we try to pull or push changes and the receiving repository " "already has those changes? Nothing too exciting." msgstr "" +"如果我们向一个已经包含了这些变更的版本库推送或者拉这些变更会发生什么事情呢?," +"什么也不会发生。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:942 @@ -4626,6 +5200,10 @@ "default. The <command>hg incoming</command> and <command>hg outgoing</" "command> commands do so too." msgstr "" +"在我们克隆版本库的时候,Mercurial会在新的版本库的<filename>.hg/hgrc</filename>" +"文件中记录下版本库的位置,如果我们对<command>hg pull</command>没有指定来源,或" +"者对于<command>hg push</command> 没有指定目标,那么这些命令就会使用缺省位置。" +"<command>hg incoming</command>和<command>hg outgoing</command>命令也是如此。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:952 @@ -4633,6 +5211,8 @@ "If you open a repository's <filename>.hg/hgrc</filename> file in a text " "editor, you will see contents like the following." msgstr "" +"如果你用文本编辑器打开版本库的<filename>.hg/hgrc</filename>文件,你会看到如下" +"内容。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:959 @@ -4644,6 +5224,11 @@ "to the <literal>[paths]</literal> section of the <filename>.hg/hgrc</" "filename> file, as follows." msgstr "" +"有可能&emdash;并且常常很有用&emdash;<command>hg push</command>和<command>hg " +"outgoing</command>的缺省位置与<command>hg pull</command>和<command>hg " +"incoming</command>的位置不同。我们可以给<filename>.hg/hgrc</filename>文件的" +"<literal>[paths]</literal>节加上<literal>default-push</literal>条目,如下所" +"示。" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch02-tour-basic.xml:973 @@ -4657,6 +5242,8 @@ "working with local repositories. Each works in exactly the same fashion over " "a network connection; simply pass in a URL instead of a local path." msgstr "" +"前面几节我们介绍的命令不仅可以用于本地版本库,还可以用于网络;只要传递的参数从" +"本地路径变成URL就可以了。" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch02-tour-basic.xml:983 @@ -4665,6 +5252,8 @@ "repository, but the repository is understandably not set up to let anonymous " "users push to it." msgstr "" +"在本例中,我们可以看到准备向远程版本库推送的变更,但是该版本库并不允许匿名用户" +"推送。" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch02-tour-basic.xml:993 @@ -4678,6 +5267,8 @@ "exists. The <command>hg init</command> command creates a new, empty " "Mercurial repository." msgstr "" +"开始一个新项目和使用一个已有项目一样简单。<command>hg init</command>命令可以创" +"建一个新的,空的Mercurial版本库。 " #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:1001 @@ -4685,6 +5276,7 @@ "This simply creates a repository named <filename>myproject</filename> in the " "current directory." msgstr "" +"在当前目录创建一个名为<filename>myproject</filename>的版本库就是这么简单。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:1006 @@ -4692,6 +5284,8 @@ "We can tell that <filename>myproject</filename> is a Mercurial repository, " "because it contains a <filename>.hg</filename> directory." msgstr "" +"我们确信<filename>myproject</filename>是一个Mercurial版本库, 因为它包含了" +"<filename>.hg</filename>目录。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:1012 @@ -4700,12 +5294,14 @@ "into place, and tell Mercurial to start tracking them using the <command>hg " "add</command> command." msgstr "" +"如果想将一些已有的文件加入版本库,我们可以将它们拷贝到目录下,然后执行" +"<command>hg add</command>命令,告诉Mercurial开始管理它们。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:1018 msgid "" "Once we are satisfied that our project looks right, we commit our changes." -msgstr "" +msgstr "当对项目的状况满意时,我们就提交的变更。" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-basic.xml:1023 @@ -4715,6 +5311,8 @@ "use it on the smallest of projects that we might not have considered with a " "more complicated tool." msgstr "" +"只需要几分钟就可以在一个新的项目上使用Mercurial,这时它的魅力之一。现在版本控" +"制做起来非常方便,我们可以在很小的不需要复杂工具的项目上使用它。" #. type: Content of: <book><chapter><title> #: ../en/ch03-tour-merge.xml:5 @@ -15887,9 +16485,9 @@ "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-" "mq\">qpop</command> each operate on a single patch at a time by default, you " "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-" -"qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</" -"command> causes it to push all unapplied patches, while the <option role=\"hg-" -"ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" +"qpush-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpush</command> " +"causes it to push all unapplied patches, while the <option role=\"hg-ext-mq-" +"cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" "command> causes it to pop all applied patches. (For some more ways to push " "and pop many patches, see <xref linkend=\"sec:mq:perf\"/> below.)" msgstr "" @@ -15917,10 +16515,10 @@ "Commands that check the working directory all take an <quote>I know what I'm " "doing</quote> option, which is always named <option>-f</option>. The exact " "meaning of <option>-f</option> depends on the command. For example, <command " -"role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</" -"option></command> will incorporate any outstanding changes into the new patch " -"it creates, but <command role=\"hg-cmd\">hg qpop <option role=\"hg-ext-mq-cmd-" -"qpop-opt\">hg -f</option></command> will revert modifications to any files " +"role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">-f</option></" +"command> will incorporate any outstanding changes into the new patch it " +"creates, but <command role=\"hg-cmd\">hg qpop <option role=\"hg-ext-mq-cmd-" +"qpop-opt\">-f</option></command> will revert modifications to any files " "affected by the patch that it is popping. Be sure to read the documentation " "for a command's <option>-f</option> option before you use it!" msgstr "" @@ -16355,10 +16953,10 @@ #: ../en/ch12-mq.xml:809 msgid "" "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " -"<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-a</option></command> all 1,738 " "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role=" -"\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. " -"(On a newer laptop, the time to push all patches dropped to two minutes.) I " +"\"hg-ext-mq-cmd-qpop-opt\">-a</option></command> them all in 30 seconds. (On " +"a newer laptop, the time to push all patches dropped to two minutes.) I " "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest " "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds." msgstr "" @@ -16425,11 +17023,11 @@ "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " "<command role=\"hg-cmd\">hg pull</command> changes into the underlying " "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-" -"ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches again. MQ will " -"stop pushing any time it runs across a patch that fails to apply during " -"conflicts, allowing you to fix your conflicts, <command role=\"hg-ext-mq" -"\">qrefresh</command> the affected patch, and continue pushing until you have " -"fixed your entire stack." +"ext-mq-cmd-qpop-opt\">-a</option></command> your patches again. MQ will stop " +"pushing any time it runs across a patch that fails to apply during conflicts, " +"allowing you to fix your conflicts, <command role=\"hg-ext-mq\">qrefresh</" +"command> the affected patch, and continue pushing until you have fixed your " +"entire stack." msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -16789,11 +17387,11 @@ "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role=" "\"special\">series</filename> file, you will have to <command role=\"hg-cmd" -"\">hg qpop <option role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> " -"and then <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-qpush-" -"opt\">hg -a</option></command> in the underlying repository to see those " -"changes show up there. If you forget to do this, you can confuse MQ's idea " -"of which patches are applied." +"\">hg qpop <option role=\"hg-ext-mq-cmd-qpop-opt\">-a</option></command> and " +"then <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-qpush-opt" +"\">-a</option></command> in the underlying repository to see those changes " +"show up there. If you forget to do this, you can confuse MQ's idea of which " +"patches are applied." msgstr "" #. type: Content of: <book><chapter><sect1><title> @@ -17718,7 +18316,7 @@ msgstr "" # -#. &example.hg-interdiff; +#. &example.hg-interdiff; #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch13-mq-collab.xml:473 msgid ""