hgbook
changeset 1113:613690ad6a9c
Merge with dongsheng
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sat Jul 10 16:21:26 2010 +0100 (2010-07-10) |
parents | 47f3810fd4fd 7764de86d22f |
children | 527b86d55d4a |
files |
line diff
1.1 --- a/po/zh.po Sun Feb 21 22:08:42 2010 -0600 1.2 +++ b/po/zh.po Sat Jul 10 16:21:26 2010 +0100 1.3 @@ -36,12 +36,13 @@ 1.4 # updated 更新到,同步到(适用于旧版本) 1.5 # versioned 受版本控制 1.6 # working copy 工作副本 1.7 +# identifiers 标识符 1.8 # ... 1.9 # 1.10 msgid "" 1.11 msgstr "" 1.12 "Project-Id-Version: hgbook 1.2\n" 1.13 -"POT-Creation-Date: 2009-05-21 14:26+0800\n" 1.14 +"POT-Creation-Date: 2009-11-04 14:06+0800\n" 1.15 "PO-Revision-Date: 2009-10-21 16:42+0800\n" 1.16 "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" 1.17 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 1.18 @@ -177,6 +178,7 @@ 1.19 "You can enable the extension in the usual way, by editing your <filename>~/." 1.20 "hgrc</filename> file." 1.21 msgstr "" 1.22 +"你可以通过常用的方式,编辑<filename>~./hgrc</filename>文件来使用这个扩展。" 1.23 1.24 #. type: Content of: <book><appendix><sect1><para> 1.25 #: ../en/appA-svn.xml:59 1.26 @@ -1073,6 +1075,8 @@ 1.27 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-e</option>: Edit the commit message " 1.28 "and patch description for the newly folded patch." 1.29 msgstr "" 1.30 +"<option role=\"hg-ext-mq-cmd-qfold-opt\">-e</option>:为新创建的补丁编辑提交信" 1.31 +"息和补丁说明。" 1.32 1.33 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.34 #: ../en/appB-mq-ref.xml:116 1.35 @@ -1081,6 +1085,8 @@ 1.36 "given file as the new commit message and patch description for the folded " 1.37 "patch." 1.38 msgstr "" 1.39 +"<option role=\"hg-ext-mq-cmd-qfold-opt\">-l</option>: 使用给定文件的内容作为创" 1.40 +"建补丁新的提交信息和补丁说明。" 1.41 1.42 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.43 #: ../en/appB-mq-ref.xml:121 1.44 @@ -2035,6 +2041,8 @@ 1.45 "revision control is important, the field was then so new that there was " 1.46 "almost no published literature to refer people to." 1.47 msgstr "" 1.48 +"数年之前,当我想解释为什么我相信分布式版本控制非常重要的时候,这个领域实在太新" 1.49 +"了,几乎没有公开的文献供人们参考。" 1.50 1.51 #. type: Content of: <book><preface><sect1><para> 1.52 #: ../en/ch00-preface.xml:15 1.53 @@ -2045,6 +2053,10 @@ 1.54 "idea that revision control ought to be distributed in nature. I publish the " 1.55 "book online under a liberal license for the same reason: to get the word out." 1.56 msgstr "" 1.57 +"虽然在那个时候,我已经在Mercurial的内核上花了一些时间,我转而写这本书是因为我" 1.58 +"发现这可能是帮助软件吸引更多用户,和让大家接受版本控制本质上就应该是分布式的最" 1.59 +"有效的方式,我把这本书在网上以自由许可的方式发布也是基于同样的原因:让大家都了" 1.60 +"解。" 1.61 1.62 #. type: Content of: <book><preface><sect1><para> 1.63 #: ../en/ch00-preface.xml:23 1.64 @@ -2054,6 +2066,9 @@ 1.65 "How do I use it? In this book, I try to answer those questions for " 1.66 "distributed revision control in general, and for Mercurial in particular." 1.67 msgstr "" 1.68 +"一本好的关于软件的书应该和讲故事类似:这是个什么东西?为什么需要它?它会怎样帮" 1.69 +"助我?我怎么使用它?本书中,我会为分布式版本控制回答这些问题,特别是" 1.70 +"Mercurial。" 1.71 1.72 #. type: Content of: <book><preface><sect1><title> 1.73 #: ../en/ch00-preface.xml:31 1.74 @@ -2071,6 +2086,10 @@ 1.75 "which provides clerical and legal support to Mercurial and a number of other " 1.76 "prominent and worthy open source software projects." 1.77 msgstr "" 1.78 +"通过购买此书,你支持了开源和自由软件的持续发展和自由,特别是Mercurial。" 1.79 +"O'Reilly Media和我将本书的收入捐献给Software Freedom Conservancy (<ulink url=" 1.80 +"\"http://www.softwarefreedom.org/\">http://www.softwarefreedom.org/</ulink>) ," 1.81 +"这个组织为Mercurial和其他一些有潜力和价值的开源软件项目提供了办公和法律支持。" 1.82 1.83 #. type: Content of: <book><preface><sect1><title> 1.84 #: ../en/ch00-preface.xml:45 1.85 @@ -2084,6 +2103,8 @@ 1.86 "author and project lead of Mercurial. He is ably assisted by hundreds of " 1.87 "volunteer contributors across the world." 1.88 msgstr "" 1.89 +"没有Matt Mackall,Mercurial项目的开发者和领导的努力,这本书不可能存在。他得到" 1.90 +"了全球数以百计的志愿者的帮助。" 1.91 1.92 #. type: Content of: <book><preface><sect1><para> 1.93 #: ../en/ch00-preface.xml:52 1.94 @@ -2092,6 +2113,8 @@ 1.95 "wonderful, madcap little-boy games. I'd also like to thank my ex-wife, " 1.96 "Shannon, for her support." 1.97 msgstr "" 1.98 +"我的孩子Cian和Ruairi总是站在我旁边帮我解决奇妙的疯狂小男孩游戏。我同样也要感谢" 1.99 +"我的前妻Shannon的帮助。" 1.100 1.101 #. type: Content of: <book><preface><sect1><para> 1.102 #: ../en/ch00-preface.xml:56 1.103 @@ -2101,6 +2124,9 @@ 1.104 "Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, " 1.105 "Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." 1.106 msgstr "" 1.107 +"我的同事和朋友以各种方式提供了帮助和支持,这里的名单非常不全:Stephen Hahn, " 1.108 +"Karyn Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley " 1.109 +"Kuhn, Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." 1.110 1.111 #. type: Content of: <book><preface><sect1><para> 1.112 #: ../en/ch00-preface.xml:62 1.113 @@ -2112,6 +2138,9 @@ 1.114 "the comment system was live for only about two months towards the end of the " 1.115 "writing process." 1.116 msgstr "" 1.117 +"我以开放的方式完成了本书,当我完成各章的草稿后,就将其放在了网上。读者可以使用" 1.118 +"我开发的一个网络程序提交反馈。到我完成本书时,有100多人提交了评论。考虑到评论" 1.119 +"系统是在写作完成之前两个月才开放的,这是一个惊人的数字。" 1.120 1.121 #. type: Content of: <book><preface><sect1><para> 1.122 #: ../en/ch00-preface.xml:70 1.123 @@ -2120,6 +2149,8 @@ 1.124 "contributed over a third of the total number of comments. I would like to " 1.125 "thank them for their care and effort in providing so much detailed feedback." 1.126 msgstr "" 1.127 +"我特别希望认识以下人员,他们中有的人提交了超过总数三分之一的评论。我要感谢他们" 1.128 +"的关心和努力,提供了那么多详细的反馈。" 1.129 1.130 #. type: Content of: <book><preface><sect1><para> 1.131 #: ../en/ch00-preface.xml:75 1.132 @@ -2134,7 +2165,7 @@ 1.133 msgid "" 1.134 "I also want to acknowledge the help of the many people who caught errors and " 1.135 "provided helpful suggestions throughout the book." 1.136 -msgstr "" 1.137 +msgstr "我同样要感谢许多在书中找出错误和提供了有帮助的建议的人。" 1.138 1.139 #. type: Content of: <book><preface><sect1><para> 1.140 #: ../en/ch00-preface.xml:84 1.141 @@ -2246,6 +2277,10 @@ 1.142 "permission. Incorporating a significant amount of example code from this book " 1.143 "into your product’s documentation does require permission." 1.144 msgstr "" 1.145 +"本书的目的是帮助你完成工作。基本上,你可以将书中的代码用于你的程序或文档。无需" 1.146 +"取得我们的许可,除非你直接复制大量的代码。举例来说,在程序中使用几段书中的代码" 1.147 +"无需许可。出售或发布含有O'Reilly书中示例的CD-ROM则需经许可。引用本书中的叙述或" 1.148 +"示例代码来回答问题无需许可。将书中的大量代码合并到你的产品文档中则需经许可。" 1.149 1.150 #. type: Content of: <book><preface><sect1><para> 1.151 #: ../en/ch00-preface.xml:181 1.152 @@ -2255,6 +2290,9 @@ 1.153 "Title</emphasis> by Some Author. Copyright 2008 O’Reilly Media, Inc., 978-0-" 1.154 "596-xxxx-x.”" 1.155 msgstr "" 1.156 +"虽然我们并不要求在引用本书的时候做版权归属声明,但如果你这样做了,我们将非常感" 1.157 +"激。版权归属声明通常包含标题,作者,发行者和ISBN。例如: “<emphasis>书名</" 1.158 +"emphasis> 某人著。 版权所有 2008 O’Reilly Media,Inc., 978-0-596-xxxx-x。”" 1.159 1.160 #. type: Content of: <book><preface><sect1><para> 1.161 #: ../en/ch00-preface.xml:187 1.162 @@ -2263,6 +2301,8 @@ 1.163 "permission given above, feel free to contact us at <email>permissions@oreilly." 1.164 "com</email>." 1.165 msgstr "" 1.166 +"如果你觉得你对书中示例代码的使用超出了正常范围,或者不符合以上描述的许可,尽管" 1.167 +"用电子邮件跟我们联系:<email>permissions@oreilly.com</email>。" 1.168 1.169 #. type: Content of: <book><preface><sect1><title> 1.170 #: ../en/ch00-preface.xml:193 1.171 @@ -2276,6 +2316,8 @@ 1.172 "technology book, that means the book is available online through the O’Reilly " 1.173 "Network Safari Bookshelf." 1.174 msgstr "" 1.175 +"如果你在喜欢的技术图书的封面上看见Safari® Books Online的图标,这表示你你可以通" 1.176 +"过O'Reilly Network Safari Bookshelf在网上使用此书。" 1.177 1.178 #. type: Content of: <book><preface><sect1><para> 1.179 #: ../en/ch00-preface.xml:202 1.180 @@ -2287,6 +2329,11 @@ 1.181 "ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." 1.182 "safaribooksonline.com</ulink>." 1.183 msgstr "" 1.184 +"Safari提供了一个比电子书更好的解决方案。它是一所虚拟图书馆,你可以在上面轻松搜" 1.185 +"索上千种顶级的技术书籍,剪切和复制示例代码,下载章节,当你需要最准确、最新的信" 1.186 +"息时,让你更快地找到答案。可以通过下面链接免费试用<ulink role=\"orm:hideurl:" 1.187 +"ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." 1.188 +"safaribooksonline.com</ulink>。" 1.189 1.190 #. type: Content of: <book><preface><sect1><title> 1.191 #: ../en/ch00-preface.xml:211 1.192 @@ -2297,7 +2344,7 @@ 1.193 #: ../en/ch00-preface.xml:213 1.194 msgid "" 1.195 "Please address comments and questions concerning this book to the publisher:" 1.196 -msgstr "" 1.197 +msgstr "关于本书的任何问题或评论请发邮件给出版商:" 1.198 1.199 #. type: Content of: <book><preface><sect1><simplelist><member> 1.200 #: ../en/ch00-preface.xml:217 1.201 @@ -2335,6 +2382,8 @@ 1.202 "We have a web page for this book, where we list errata, examples, and any " 1.203 "additional information. You can access this page at:" 1.204 msgstr "" 1.205 +"我们将提供一个关于本书的主页,在那上面提供勘误表、示例以及其它附加信息。你可以" 1.206 +"从这里访问到它:" 1.207 1.208 #. type: Content of: <book><preface><sect1><simplelist><member> 1.209 #: ../en/ch00-preface.xml:235 1.210 @@ -2350,7 +2399,7 @@ 1.211 #. type: Content of: <book><preface><sect1><para> 1.212 #: ../en/ch00-preface.xml:242 1.213 msgid "To comment or ask technical questions about this book, send email to:" 1.214 -msgstr "" 1.215 +msgstr "关于本书的任何技术问题或评论请发邮件给出版商:" 1.216 1.217 #. type: Content of: <book><preface><sect1><simplelist><member> 1.218 #: ../en/ch00-preface.xml:246 1.219 @@ -2363,6 +2412,8 @@ 1.220 "For more information about our books, conferences, Resource Centers, and the " 1.221 "O’Reilly Network, see our web site at:" 1.222 msgstr "" 1.223 +"如果想了解关于我们的图书、会议、资源中心以及O'Reilly Network的更多信息,可以浏" 1.224 +"览以下站点:" 1.225 1.226 #. type: Content of: <book><preface><sect1><simplelist><member> 1.227 #: ../en/ch00-preface.xml:253 1.228 @@ -2387,6 +2438,9 @@ 1.229 "hand: every time you modify a file, save it under a new name that contains a " 1.230 "number, each one higher than the number of the preceding version." 1.231 msgstr "" 1.232 +"版本控制是管理一些信息的多个版本的过程。它最简单的形式莫过于:每次你修改一个文" 1.233 +"件后都重新命名保存,文件名中包含一个数字,每次修改后这个数字都增加。这通常是许" 1.234 +"多人手工完成的。" 1.235 1.236 #. type: Content of: <book><chapter><sect1><para> 1.237 #: ../en/ch01-intro.xml:16 1.238 @@ -2400,6 +2454,11 @@ 1.239 "modern revision control tools have no problem coping with thousands of people " 1.240 "working together on projects that consist of hundreds of thousands of files." 1.241 msgstr "" 1.242 +"然而,手工管理即使是一个文件的多个版本也是很容易出错的,所以很早就有软件工具来" 1.243 +"使这个过程自动化。最早的自动化软件管理工具的目标是帮助一个用户管理一个文件的版" 1.244 +"本。在过去的几十年里,版本控制工具的范围得到极大扩展;现在它们可以管理多个文" 1.245 +"件,帮助许多人一起工作。最新的版本控制工具可以支持上包含成数十万个文件,几千个" 1.246 +"人一起工作的项目。" 1.247 1.248 #. type: Content of: <book><chapter><sect1><para> 1.249 #: ../en/ch01-intro.xml:27 1.250 @@ -2408,6 +2467,8 @@ 1.251 "this new field has grown due to people's willingness to explore ill-charted " 1.252 "territory." 1.253 msgstr "" 1.254 +"分布式版本控制是最近才出现的,但是由于人们愿意探索新的疆域,目前这一新的领域已" 1.255 +"经得到了长足的发展" 1.256 1.257 #. type: Content of: <book><chapter><sect1><para> 1.258 #: ../en/ch01-intro.xml:31 1.259 @@ -2418,6 +2479,9 @@ 1.260 "yet it scales to the demands of real, challenging environments where many " 1.261 "other revision control tools buckle." 1.262 msgstr "" 1.263 +"我写这本关于分布式版本控制的书是因为我相信这个领域应该有一个指南。我选择" 1.264 +"Mercurial是因为它是在这个领域中学习最容易上手的工具,并且它能够满足真实的,挑" 1.265 +"战性的环境的要求,而其他版本控制工具只能望而兴叹。" 1.266 1.267 #. type: Content of: <book><chapter><sect1><sect2><title> 1.268 #: ../en/ch01-intro.xml:39 1.269 @@ -2430,6 +2494,7 @@ 1.270 "There are a number of reasons why you or your team might want to use an " 1.271 "automated revision control tool for a project." 1.272 msgstr "" 1.273 +"为什么你或者你的团队可能需要在项目中使用自动化版本控制工具呢?有很多理由。" 1.274 1.275 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.276 #: ../en/ch01-intro.xml:46 1.277 @@ -2439,6 +2504,9 @@ 1.278 "<emphasis>why</emphasis> they made it; <emphasis>when</emphasis> they made " 1.279 "it; and <emphasis>what</emphasis> the change was." 1.280 msgstr "" 1.281 +"因为它能记录你的项目的历史和演化,所以你不必再给每个变更都记录日志,<emphasis>" 1.282 +"谁</emphasis>做的;<emphasis>为什么</emphasis>他们这样做;<emphasis>什么时候</" 1.283 +"emphasis>做的;做了<emphasis>什么</emphasis>修改。" 1.284 1.285 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.286 #: ../en/ch01-intro.xml:53 1.287 @@ -2448,6 +2516,8 @@ 1.288 "simultaneously make potentially incompatible changes, the software will help " 1.289 "you to identify and resolve those conflicts." 1.290 msgstr "" 1.291 +"当你和其他人一起工作的时候,版本控制工具让你合作的更容易。例如,当许多人或多或" 1.292 +"少的同时进行有可能冲突的修改的时候,软件可以帮助你确定和解决这些冲突。" 1.293 1.294 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.295 #: ../en/ch01-intro.xml:59 1.296 @@ -2458,13 +2528,17 @@ 1.297 "will even help you to efficiently figure out exactly when a problem was " 1.298 "introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)." 1.299 msgstr "" 1.300 +"它能帮助你修正错误。如果你做了一个修改,但是后来发现这是个错误,你能恢复到一个" 1.301 +"或者多个文件以前的版本。实际上,一个<emphasis>相当</emphasis>好的版本控制工具" 1.302 +"甚至会帮助你找出什么什么是时候引入的这个问题(详细信息参考<xref linkend=\"sec:" 1.303 +"undo:bisect\"/>)。 " 1.304 1.305 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.306 #: ../en/ch01-intro.xml:66 1.307 msgid "" 1.308 "It will help you to work simultaneously on, and manage the drift between, " 1.309 "multiple versions of your project." 1.310 -msgstr "" 1.311 +msgstr "它能帮助你同时工作于项目的多个版本,并管理它们的差异。" 1.312 1.313 #. type: Content of: <book><chapter><sect1><sect2><para> 1.314 #: ../en/ch01-intro.xml:71 1.315 @@ -2473,6 +2547,8 @@ 1.316 "whether you're working on a project by yourself, or with a hundred other " 1.317 "people." 1.318 msgstr "" 1.319 +"大多数这些理由都是等效的&emdash;至少在理论上&emdash;不管你是一个人做项目还是和" 1.320 +"几百个人一起。" 1.321 1.322 #. type: Content of: <book><chapter><sect1><sect2><para> 1.323 #: ../en/ch01-intro.xml:76 1.324 @@ -2483,6 +2559,9 @@ 1.325 "emphasis>. A revision control tool that's difficult to understand or use is " 1.326 "going to impose a high cost." 1.327 msgstr "" 1.328 +"版本控制在在不同尺度上(<quote>单个黑客</quote>和<quote>一个大项目组</quote>)" 1.329 +"实践的一个关键问题是它的<emphasis>性价</emphasis>比怎么样。一个很难理解和使用" 1.330 +"的版本控制工具会让你的代价很高。" 1.331 1.332 #. type: Content of: <book><chapter><sect1><sect2><para> 1.333 #: ../en/ch01-intro.xml:84 1.334 @@ -2492,6 +2571,8 @@ 1.335 "the cost of using revision control might hardly seem worth considering, since " 1.336 "<emphasis>without</emphasis> it, failure is almost guaranteed." 1.337 msgstr "" 1.338 +"如果没有版本控制工具和过程,一个五百人的项目很快就可能就将自己压垮。在这种情况" 1.339 +"下,版本控制的代价基本上不用考虑,因为没有它,失败几乎是一定的。" 1.340 1.341 #. type: Content of: <book><chapter><sect1><sect2><para> 1.342 #: ../en/ch01-intro.xml:91 1.343 @@ -2500,6 +2581,8 @@ 1.344 "poor place to use a revision control tool, because surely the cost of using " 1.345 "one must be close to the overall cost of the project. Right?" 1.346 msgstr "" 1.347 +"另一方面,一个人的<quote>快速编程</quote>看起来并不适合使用版本控制工具,因为" 1.348 +"使用一个版本控制工具的代价就是整个项目的代价,对吧?" 1.349 1.350 #. type: Content of: <book><chapter><sect1><sect2><para> 1.351 #: ../en/ch01-intro.xml:96 1.352 @@ -2513,6 +2596,11 @@ 1.353 "performance and peer-to-peer nature let you scale painlessly to handle large " 1.354 "projects." 1.355 msgstr "" 1.356 +"Mercurial的独特之处就是它<emphasis>同时</emphasis>支持这两种尺度的开发。你可以" 1.357 +"在几分钟之内学会基本的使用,因为代价很小,你可以很方便的在最小的项目上应用版本" 1.358 +"管理。它的简洁性意味着不会有很多艰深的概念和命令干扰你<emphasis>真正</" 1.359 +"emphasis>的工作。同时,Mercurial高性能和点对点的特性可以让你轻易的应对大的项" 1.360 +"目。" 1.361 1.362 #. type: Content of: <book><chapter><sect1><sect2><para> 1.363 #: ../en/ch01-intro.xml:106 1.364 @@ -2521,6 +2609,8 @@ 1.365 "of tools can make a huge difference to the fluidity with which you can work " 1.366 "on a project." 1.367 msgstr "" 1.368 +"没有一个版本控制工具能拯救一个糟糕的项目,但是在项目中选择好的工具会大大的提高" 1.369 +"效率,正是工欲善其事,必先利其器。" 1.370 1.371 #. type: Content of: <book><chapter><sect1><sect2><title> 1.372 #: ../en/ch01-intro.xml:113 1.373 @@ -2534,6 +2624,8 @@ 1.374 "many names and acronyms. Here are a few of the more common variations you'll " 1.375 "encounter:" 1.376 msgstr "" 1.377 +"版本控制是一个各自为政的领域,以至于有很多名称和缩略语,下面是你可能遇到的一些" 1.378 +"常用的术语:" 1.379 1.380 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.381 #: ../en/ch01-intro.xml:119 1.382 @@ -2567,6 +2659,8 @@ 1.383 "practice they overlap so much that there's no agreed or even useful way to " 1.384 "tease them apart." 1.385 msgstr "" 1.386 +"有些人声称这些术语有不同的含义,但实际上它们的含义太重叠了,根本没有一致的,甚" 1.387 +"至有用的方式来区别它们。" 1.388 1.389 #. type: Content of: <book><chapter><sect1><title> 1.390 #: ../en/ch01-intro.xml:135 1.391 @@ -2582,6 +2676,10 @@ 1.392 "book is built from its sources, all the example scripts are automatically " 1.393 "run, and their current results compared against their expected results." 1.394 msgstr "" 1.395 +"本书采用了一种非同寻常的示例编程方法。每个例子都是<quote>活的</quote>&emdash;" 1.396 +"每一个示例都是一个shell脚本执行的实际结果,这个脚本执行了你看到的Mercurial命" 1.397 +"令。每次从源代码构建本书的映像时,所有的示例脚本都自动执行,然后将预期结果和实" 1.398 +"际执行结果比较。" 1.399 1.400 #. type: Content of: <book><chapter><sect1><para> 1.401 #: ../en/ch01-intro.xml:144 1.402 @@ -2592,6 +2690,9 @@ 1.403 "of Mercurial that I'm documenting, and the output of some command changes, " 1.404 "the build fails." 1.405 msgstr "" 1.406 +"这种方法的优点是每个例子都是永远精确的,它们是本书前面描述的Mercurial版本的" 1.407 +"<emphasis>实际</emphasis>运行结果。如果我更新了描述的Mercurial的版本,同时有些" 1.408 +"命令的输出变化了,创建就会失败。" 1.409 1.410 #. type: Content of: <book><chapter><sect1><para> 1.411 #: ../en/ch01-intro.xml:151 1.412 @@ -2603,6 +2704,9 @@ 1.413 "resulting timestamps correspondingly spread out, my automated example scripts " 1.414 "run many commands in one second." 1.415 msgstr "" 1.416 +"这种方法也有小的缺点,就是你在示例中看见的日期和时间被<quote>压缩</quote>了," 1.417 +"看起来这些命令不是人输入的。人不可能再一秒之内执行一条以上的命令,相应的时间戳" 1.418 +"都应该展开,我的自动化脚本中一秒之内可以执行很多命令。" 1.419 1.420 #. type: Content of: <book><chapter><sect1><para> 1.421 #: ../en/ch01-intro.xml:159 1.422 @@ -2612,6 +2716,9 @@ 1.423 "<literal role=\"hg-ext\">bisect</literal> example in <xref linkend=\"sec:undo:" 1.424 "bisect\"/>, for instance." 1.425 msgstr "" 1.426 +"举例来说,示例中的几个连续的提交可能显示发生于同一秒之内。你可以在<literal " 1.427 +"role=\"hg-ext\">bisect</literal> 示例中看到例子<xref linkend=\"sec:undo:bisect" 1.428 +"\"/>。" 1.429 1.430 #. type: Content of: <book><chapter><sect1><para> 1.431 #: ../en/ch01-intro.xml:165 1.432 @@ -2620,6 +2727,8 @@ 1.433 "times you see in the output of commands. But <emphasis>do</emphasis> be " 1.434 "confident that the behavior you're seeing is consistent and reproducible." 1.435 msgstr "" 1.436 +"所以当你研究这些例子的时候,不要太注意命令输出的日期和时间。但是<emphasis>要</" 1.437 +"emphasis>保证你看到的结果是一致的和可以再现的。" 1.438 1.439 #. type: Content of: <book><chapter><sect1><title> 1.440 #: ../en/ch01-intro.xml:173 1.441 @@ -2633,6 +2742,8 @@ 1.442 "control tools over the past four decades, as people have become familiar with " 1.443 "the capabilities of their tools and constrained by their limitations." 1.444 msgstr "" 1.445 +"在过去的四十年中,随着人们越来越熟悉他们的工具的能力和限制,开发和使用版本控制" 1.446 +"工具出现了明确的趋势。 " 1.447 1.448 #. type: Content of: <book><chapter><sect1><para> 1.449 #: ../en/ch01-intro.xml:180 1.450 @@ -2642,6 +2753,9 @@ 1.451 "control, their locking model and reliance on a single computer limited them " 1.452 "to small, tightly-knit teams." 1.453 msgstr "" 1.454 +"第一代软件开始于在个人计算机,人们用这些软件管理单个文件。虽然这些工具比手工管" 1.455 +"理版本有了巨大的飞跃。但是加锁模型和依赖于单个计算机限制了他们使用范围,只用于" 1.456 +"小的,组织严密的团队。" 1.457 1.458 #. type: Content of: <book><chapter><sect1><para> 1.459 #: ../en/ch01-intro.xml:186 1.460 @@ -2656,6 +2770,11 @@ 1.461 "found that they could not use the tools to interact with a project in a " 1.462 "natural way, as they could not record their changes." 1.463 msgstr "" 1.464 +"第二代软件放松了这些限制,因为它们采用了以网络为中心的结构,并且能够一次管理整" 1.465 +"个项目。随着项目增长,又出现了新的问题。客户需要频繁的和服务器交互,服务器的可" 1.466 +"伸缩性成为大项目的主要问题。不可靠的网络会妨碍客户和服务器的交互。随着开源项目" 1.467 +"开始开放只读权限给匿名用户,没有提交权限的用户发现他们不能以自然的方式使用工具" 1.468 +"和项目交互,因为他们不能记录他们的修改。" 1.469 1.470 #. type: Content of: <book><chapter><sect1><para> 1.471 #: ../en/ch01-intro.xml:198 1.472 @@ -2668,6 +2787,10 @@ 1.473 "offline indefinitely and autonomously, with a network connection only needed " 1.474 "when syncing changes with another repository." 1.475 msgstr "" 1.476 +"新一代的版本控制工具本质上是点对点的。所有的这些系统都抛弃了对单个中央服务器的" 1.477 +"依赖,允许用户将他们的版本控制数据发布到任何需要的地方。通过互联网的协作摆脱了" 1.478 +"技术的限制,走向选择和审查。现代的工具可以进行自治的,不受限制的离线操作。只需" 1.479 +"要在有网络的时候和其他的版本库同步即可。" 1.480 1.481 #. type: Content of: <book><chapter><sect1><title> 1.482 #: ../en/ch01-intro.xml:210 1.483 @@ -2683,6 +2806,9 @@ 1.484 "a number of ways in which distributed tools shine relative to centralised " 1.485 "ones." 1.486 msgstr "" 1.487 +"与它们的上一代竞争者相比,虽然分布式版本控制工具多年来已经很稳定和实用了,但是" 1.488 +"旧的工具的使用者还没有完全了解它们的优点,分布式的工具在很多方面明显由于集中式" 1.489 +"的工具。" 1.490 1.491 #. type: Content of: <book><chapter><sect1><para> 1.492 #: ../en/ch01-intro.xml:220 1.493 @@ -2696,6 +2822,10 @@ 1.494 "value of a snappy, responsive tool: you're going to spend a lot of time " 1.495 "interacting with your revision control software." 1.496 msgstr "" 1.497 +"对于个人开发者,分布式工具几乎永远比集中式工具快的多。原因很简单:集中式工具的" 1.498 +"很多操作需要网络交互,因为大部分元数据都只在中央服务器上有一份拷贝。而一个分布" 1.499 +"式工具将所有的元数据保存在本地。其他的相同,通过网络的交互增加了集中式工具的负" 1.500 +"担。不要低估了反应迅速的工具的价值:你要花很多时间和你的版本控制软件交互。" 1.501 1.502 #. type: Content of: <book><chapter><sect1><para> 1.503 #: ../en/ch01-intro.xml:231 1.504 @@ -2707,6 +2837,9 @@ 1.505 "recent and actually worked. With a distributed tool, you have many backups " 1.506 "available on every contributor's computer." 1.507 msgstr "" 1.508 +"分布式工具对你的服务器结构并不感冒,因为他们在将元数据复制到很多地方。如果你的" 1.509 +"集中式系统和你的服务器着火了,你最好希望你的备份介质是可靠的,同时你最后的备份" 1.510 +"是最近的,而且还能用。而对于分布式工具,你在贡献者的计算机上有很多备份。" 1.511 1.512 #. type: Content of: <book><chapter><sect1><para> 1.513 #: ../en/ch01-intro.xml:239 1.514 @@ -2720,6 +2853,11 @@ 1.515 "with local operations. If you have a far-flung team of collaborators, this " 1.516 "may be significant." 1.517 msgstr "" 1.518 +"网络的可靠性对分布式工具的影响要远远小于集中式工具。如果没有网络你根本不能使用" 1.519 +"集中式工具,除了少数几个功能有限命令。而对于分布式工具,即使在你工作的时候网络" 1.520 +"瘫痪了,你可能根本不会注意到。你不能做的事情仅仅是不能和其它计算机上的版本库交" 1.521 +"互了,这种情况在本地操作相当罕见。而如果你的团队有异地的人员,那这就很有可能" 1.522 +"了。" 1.523 1.524 #. type: Content of: <book><chapter><sect1><sect2><title> 1.525 #: ../en/ch01-intro.xml:250 1.526 @@ -2741,11 +2879,17 @@ 1.527 "local modifications will be at risk of corruption any time you try to update " 1.528 "your client's view of the repository." 1.529 msgstr "" 1.530 +"如果你喜欢一个开源项目并且决定准备开始改进它,同时这个项目使用分布式版本控制工" 1.531 +"具的话,你立刻可以和其他人一样认为自己成为项目的<quote>核心</quote>。如果他们" 1.532 +"发布了他们的版本库,你可以立即拷贝他们的项目。开始修改,记录你自己的工作,和内" 1.533 +"部人员一样使用同样的工具。相比之下,如果使用集中式工具,除非有人给你向中央服务" 1.534 +"器提交修改的权限,你只能用只读的方式使用软件。这样,你就不能记录你的修改,而且" 1.535 +"当你从版本库更新的时候,本地的修改随时有崩溃的可能。 " 1.536 1.537 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.538 #: ../en/ch01-intro.xml:268 1.539 msgid "The forking non-problem" 1.540 -msgstr "分叉不是问题" 1.541 +msgstr "分支不是问题" 1.542 1.543 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.544 #: ../en/ch01-intro.xml:270 1.545 @@ -2758,6 +2902,10 @@ 1.546 "more or less complete copy of the project's source code, and goes off in its " 1.547 "own direction." 1.548 msgstr "" 1.549 +"有人说分布式版本控制工具给开源项目带来了某种风险,因为在项目的发展过程中很容易" 1.550 +"出现<quote>分支</quote>。当不同组的开发人员有不同的意见和看法,决定不再一起工" 1.551 +"作的时候,就会产生新的分支,每个组的人都或多或少的获得项目代码的完整拷贝,然后" 1.552 +"向自己的方向发展。" 1.553 1.554 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.555 #: ../en/ch01-intro.xml:280 1.556 @@ -2769,6 +2917,10 @@ 1.557 "quote>, and graft the other team's changes into the tree somehow. This " 1.558 "usually loses some or all of one side's revision history." 1.559 msgstr "" 1.560 +"有时候,不同分支的阵营决定协调他们之间的分歧。如果使用了集中式版本控制系统 " 1.561 +"<emphasis>技术</emphasis>上的问题使协调过程非常痛苦,大部分需要手动解决。你必" 1.562 +"须决定那个版本历史<quote>赢</quote>了,然后将其它团队的更改合并到代码中。这通" 1.563 +"常造成别的团队某些或者全部版本历史丢失。" 1.564 1.565 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.566 #: ../en/ch01-intro.xml:289 1.567 @@ -2780,6 +2932,9 @@ 1.568 "<emphasis>merging</emphasis> forks, because forks are absolutely fundamental: " 1.569 "they happen all the time." 1.570 msgstr "" 1.571 +"分布式工具认为分支是项目开发的<emphasis>唯一</emphasis>方式。每个单独的变更都" 1.572 +"是潜在的分支点。这种方法的巨大力量在于,分布式版本控制工具非常善于<emphasis>合" 1.573 +"并</emphasis>分支,因为分支是非常基本的操作:它们随时都在发生。" 1.574 1.575 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.576 #: ../en/ch01-intro.xml:298 1.577 @@ -2790,6 +2945,9 @@ 1.578 "anything, distributed tools <emphasis>lower</emphasis> the likelihood of a " 1.579 "fork:" 1.580 msgstr "" 1.581 +"如果所有的人在任何时候的做任何工作都这样使用合并和分支,那么对开源世界来讲," 1.582 +"<quote>分支</quote>就变成了<emphasis>纯粹</emphasis>的社会事件。如果真的有什么" 1.583 +"影响到话,就是分布式工具<emphasis>降低</emphasis>了分支的可能性:" 1.584 1.585 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.586 #: ../en/ch01-intro.xml:305 1.587 @@ -2797,6 +2955,8 @@ 1.588 "They eliminate the social distinction that centralised tools impose: that " 1.589 "between insiders (people with commit access) and outsiders (people without)." 1.590 msgstr "" 1.591 +"消除了集中式工具带来的社会级别:有内部人员(有提交权限)和外部人员(没有权限)" 1.592 +"之分。" 1.593 1.594 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.595 #: ../en/ch01-intro.xml:309 1.596 @@ -2805,6 +2965,8 @@ 1.597 "involved from the perspective of the revision control software is just " 1.598 "another merge." 1.599 msgstr "" 1.600 +"在社会性分支之后很容易和解,因为从版本控制工具的角度来讲这仅仅是一次新的合并而" 1.601 +"已。" 1.602 1.603 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.604 #: ../en/ch01-intro.xml:314 1.605 @@ -2818,6 +2980,11 @@ 1.606 "illusory, you are forgoing the ability to fluidly collaborate with whatever " 1.607 "people feel compelled to mirror and fork your history." 1.608 msgstr "" 1.609 +"有些人拒绝分布式工具因为他们想保持对项目的控制,他们相信集中式工具会给他们这种" 1.610 +"控制。如果你这种想法,并你将CVS或者Subversion版本库向大众发布了,那么别人可用" 1.611 +"现有的很多工具将整个项目的历史抓取出来(可能很慢),在其它你控制不了的地方重建" 1.612 +"版本库。这时你的控制只不过是一种幻觉罢了,一些人被迫从你的版本库创建映像和分" 1.613 +"支,而你失去了和他们协作的机会。" 1.614 1.615 #. type: Content of: <book><chapter><sect1><sect2><title> 1.616 #: ../en/ch01-intro.xml:329 1.617 @@ -2837,6 +3004,11 @@ 1.618 "site, so that there's no redundant communication between repositories over " 1.619 "expensive long-haul network links." 1.620 msgstr "" 1.621 +"遍布全球的团队正在进行许多商业项目。远离中央服务器的贡献者会发现执行命令速度很" 1.622 +"慢同时不怎么可靠。商业的版本控制系统改善这个问题的办法就是让你购买远程复制插" 1.623 +"件,这通常很昂贵,并且很难管理。分布式系统首先不会有这样的问题。其次,你可以很" 1.624 +"容易的建立多个授权服务器,假设每个站点一个,这样可以避免在昂贵的长途线路上的冗" 1.625 +"余的通讯。" 1.626 1.627 #. type: Content of: <book><chapter><sect1><sect2><para> 1.628 #: ../en/ch01-intro.xml:343 1.629 @@ -2851,6 +3023,11 @@ 1.630 "a much larger team, and replication to balance load becomes a simple matter " 1.631 "of scripting." 1.632 msgstr "" 1.633 +"集中式的版本控制系统的扩展性相对较低。只要不多的并行用户的组合负载就可以将一个" 1.634 +"昂贵的中央服务器压垮。同样,典型的反应就是昂贵笨重的复制设备。因为中央服务器的" 1.635 +"最大负载&emdash;如果你有的话&emdash;比分布式工具低很多(因为所有的数据要北复制" 1.636 +"到其它地方),一个廉价的服务器就可以满足一个相当大的团队的要求,为平衡负载而进" 1.637 +"行的复制只需要简单的脚本就够了。" 1.638 1.639 #. type: Content of: <book><chapter><sect1><sect2><para> 1.640 #: ../en/ch01-intro.xml:355 1.641 @@ -2862,6 +3039,9 @@ 1.642 "and regressions in the customer's environment, all without needing to connect " 1.643 "to your company's network." 1.644 msgstr "" 1.645 +"如果你有员工需要在客户方解决问题,那么他们会受益于分布式版本控制。工具允许他们" 1.646 +"创建定制的环境,互相独立的尝试不同的解决方案。并且可以高效的从历史代码中查找" 1.647 +"bug的根源,在客户环境中进行回归,所有的这些都不需要连接公司的网络。" 1.648 1.649 #. type: Content of: <book><chapter><sect1><title> 1.650 #: ../en/ch01-intro.xml:366 1.651 @@ -2873,27 +3053,27 @@ 1.652 msgid "" 1.653 "Mercurial has a unique set of properties that make it a particularly good " 1.654 "choice as a revision control system." 1.655 -msgstr "" 1.656 +msgstr "Mercurial是一个非常好的版本控制系统,因为它有很多独一无二的特点。" 1.657 1.658 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.659 #: ../en/ch01-intro.xml:371 1.660 msgid "It is easy to learn and use." 1.661 -msgstr "" 1.662 +msgstr "它易学易用。" 1.663 1.664 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.665 #: ../en/ch01-intro.xml:372 1.666 msgid "It is lightweight." 1.667 -msgstr "" 1.668 +msgstr "它轻量级。" 1.669 1.670 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.671 #: ../en/ch01-intro.xml:373 1.672 msgid "It scales excellently." 1.673 -msgstr "" 1.674 +msgstr "它扩展性很好。" 1.675 1.676 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.677 #: ../en/ch01-intro.xml:374 1.678 msgid "It is easy to customise." 1.679 -msgstr "" 1.680 +msgstr "它很容易定制。" 1.681 1.682 #. type: Content of: <book><chapter><sect1><para> 1.683 #: ../en/ch01-intro.xml:377 1.684 @@ -2904,6 +3084,9 @@ 1.685 "feature sets are generally uniform and consistent, so you can keep track of a " 1.686 "few general rules instead of a host of exceptions." 1.687 msgstr "" 1.688 +"如果你熟悉版本控制系统,你在五分钟之内只能就可以使用Mercurial工作了。即使你不" 1.689 +"熟悉,也不过是再多花几分钟。Mercurial的命令和功能集非常统一一致,你只要遵守几" 1.690 +"个通用的规则就够了,很少有例外。" 1.691 1.692 #. type: Content of: <book><chapter><sect1><para> 1.693 #: ../en/ch01-intro.xml:384 1.694 @@ -2914,6 +3097,9 @@ 1.695 "attempts to stay nimble and largely out of your way by combining low " 1.696 "cognitive overhead with blazingly fast operations." 1.697 msgstr "" 1.698 +"在很小的项目上,你马上就可以使用Mercurial开始工作。创建新的修改和分支;到处交" 1.699 +"换修改(不管本机还是通过网络);获取历史和状态数据非常快。Mercurial努力保持小" 1.700 +"巧灵活,在眨眼之间就能完成操作。" 1.701 1.702 #. type: Content of: <book><chapter><sect1><para> 1.703 #: ../en/ch01-intro.xml:391 1.704 @@ -2922,6 +3108,8 @@ 1.705 "projects with hundreds to thousands of contributors, each containing tens of " 1.706 "thousands of files and hundreds of megabytes of source code." 1.707 msgstr "" 1.708 +"不仅小的项目可以使用Mercurial:有成百上千的贡献者的项目也在使用它,这些项目每" 1.709 +"个都有上万个文件和几百兆的源码。" 1.710 1.711 #. type: Content of: <book><chapter><sect1><para> 1.712 #: ../en/ch01-intro.xml:396 1.713 @@ -2933,6 +3121,9 @@ 1.714 "already available, ranging from helping to identify bugs to improving " 1.715 "performance." 1.716 msgstr "" 1.717 +"如果觉得Mercurial的核心功能不能满足要求,你很容易在现有基础上开发。Mercurial非" 1.718 +"常适合于脚本任务,它的核心简洁,并且用Python实现,用扩展的方式增加新的功能非常" 1.719 +"方便,现在已经有很多流行和有用的扩展了,像帮助你确定bug或者提高性能等。" 1.720 1.721 #. type: Content of: <book><chapter><sect1><title> 1.722 #: ../en/ch01-intro.xml:406 1.723 @@ -2947,6 +3138,8 @@ 1.724 "one of the revision control tools listed below, in most cases for several " 1.725 "years at a time." 1.726 msgstr "" 1.727 +"在你继续阅读之前,请理解本节完全反映了我的个人经验,兴趣,和偏好(我敢说)。下" 1.728 +"面列的每个版本控制工具我都使用过,大多数情况下都用过好几年。" 1.729 1.730 #. type: Content of: <book><chapter><sect1><sect2><para> 1.731 #: ../en/ch01-intro.xml:418 1.732 @@ -2954,6 +3147,8 @@ 1.733 "Subversion is a popular revision control tool, developed to replace CVS. It " 1.734 "has a centralised client/server architecture." 1.735 msgstr "" 1.736 +"Subversion是一个流行的版本控制工具,是用来替代CVS的,它采用的是集中式的客户/服" 1.737 +"务器结构。" 1.738 1.739 #. type: Content of: <book><chapter><sect1><sect2><para> 1.740 #: ../en/ch01-intro.xml:422 1.741 @@ -2962,6 +3157,8 @@ 1.742 "same operations, so if you're familiar with one, it is easy to learn to use " 1.743 "the other. Both tools are portable to all popular operating systems." 1.744 msgstr "" 1.745 +"Subversion和Mercurial相同操作的命令的命名上非常相似,所以如果你熟悉一个,很容" 1.746 +"易学会另外一个,两个工具都可以在大多数平台上运行。" 1.747 1.748 #. type: Content of: <book><chapter><sect1><sect2><para> 1.749 #: ../en/ch01-intro.xml:427 1.750 @@ -2971,6 +3168,10 @@ 1.751 "url=\"http://svnbook.red-bean.com/nightly/en/svn.branchmerge.advanced." 1.752 "html#svn.branchmerge.advanced.finalword\">complicated and buggy</ulink>." 1.753 msgstr "" 1.754 +"在1.5版之前,Subversion对合并的支持并不好。在我写本书的时候,它刚新增了并跟踪" 1.755 +"的功能,出名的<ulink url=\"http://svnbook.red-bean.com/nightly/en/svn." 1.756 +"branchmerge.advanced.html#svn.branchmerge.advanced.finalword\">复杂和容易出错" 1.757 +"</ulink>。" 1.758 1.759 #. type: Content of: <book><chapter><sect1><sect2><para> 1.760 #: ../en/ch01-intro.xml:433 1.761 @@ -2985,6 +3186,12 @@ 1.762 "Subversion does not have useful replication facilities, server capacity and " 1.763 "network bandwidth become bottlenecks for modestly large projects." 1.764 msgstr "" 1.765 +"在我测量过的每个版本控制操作上Mercurial都比Subversion有很大的性能优势。差距从" 1.766 +"两个数量级到六个数量级不等,我用的是Subversion 1.4.3的<emphasis>ra_local</" 1.767 +"emphasis>文件存储方式,这是已知的最快的存取方式了。在实际的部署中包括网络存" 1.768 +"储,那么Subversion的劣势更大。因为很多Subversion命令必须和主机交互,并且因为" 1.769 +"Subversion没有好的复制机制,使得对于中的等大小的项目而言,服务器容量和网络带宽" 1.770 +"成为主要瓶颈。" 1.771 1.772 #. type: Content of: <book><chapter><sect1><sect2><para> 1.773 #: ../en/ch01-intro.xml:446 1.774 @@ -2997,6 +3204,10 @@ 1.775 "directory, even though the Mercurial repository contains a complete history " 1.776 "of the project." 1.777 msgstr "" 1.778 +"另外,Subversion以在客户端使用了更多存储空间的方法,换取降低几个常用操作的网络" 1.779 +"负载,例如查找修改过的文件(<literal>status</literal>)和显示对于当前版本的更" 1.780 +"改(<literal>diff</literal>)。结果Subversion的工作副本经常和Mercurial的版本库" 1.781 +"和工作目录一样大,或者更大,虽然Mercurial的版本库包括了项目的完整历史。" 1.782 1.783 #. type: Content of: <book><chapter><sect1><sect2><para> 1.784 #: ../en/ch01-intro.xml:456 1.785 @@ -3006,6 +3217,9 @@ 1.786 "some of Mercurial's GUI tools now outshine their Subversion equivalents. " 1.787 "Like Mercurial, Subversion has an excellent user manual." 1.788 msgstr "" 1.789 +"Subversion有很多的第三方工具支持。Mercurial现在在这方面稍微欠缺。然而差距正在" 1.790 +"逐渐缩小,实际上一些有Mercurial的GUI工具比Subversion类似工具还略胜一筹。和" 1.791 +"Mercurial一样,Subversion也有完善的用户手册。" 1.792 1.793 #. type: Content of: <book><chapter><sect1><sect2><para> 1.794 #: ../en/ch01-intro.xml:462 1.795 @@ -3017,6 +3231,10 @@ 1.796 "distributed SCM will grow rapidly in proportion to the number of revisions, " 1.797 "because the differences between each revision are large." 1.798 msgstr "" 1.799 +"Subversion并不在客户端存储版本历史,所以它很适合管理那些有很多大的二进制文件的" 1.800 +"项目。如果你对一个未压缩的10MB文件检入了五十次,Subversion客户端的占用的磁盘空" 1.801 +"间基本上保持不变。而对于分布式SCM软件,磁盘空间会随着版本数量的增加成而迅速增" 1.802 +"长,因为每个版本之间的差异非常大。" 1.803 1.804 #. type: Content of: <book><chapter><sect1><sect2><para> 1.805 #: ../en/ch01-intro.xml:471 1.806 @@ -3027,6 +3245,9 @@ 1.807 "to it, can be a significant advantage to a project where binary files are " 1.808 "widely used." 1.809 msgstr "" 1.810 +"另外,合并不同版本的二进制文件非常困难,换句话说,基本上不可能。Subversion提供" 1.811 +"了锁定功能,用户可以锁定一个文件,这样他就取得了对这个文件临时的独占的提交权," 1.812 +"这对于广泛使用二进制文件的项目而言是个明显优势。" 1.813 1.814 #. type: Content of: <book><chapter><sect1><sect2><para> 1.815 #: ../en/ch01-intro.xml:478 1.816 @@ -3038,6 +3259,10 @@ 1.817 "you can perform an initial conversion, then small additional conversions " 1.818 "afterwards to bring in new changes." 1.819 msgstr "" 1.820 +"Mercurial可以从Subversion的版本库中导入历史版本。它也可以向Subversion的版本库" 1.821 +"输出历史版本。这样在决定转换之前很容易先<quote>试一下水</quote>,同时并行的使" 1.822 +"用Mercurial和Subversion。版本史的转换是递增的,你可以先构造一个初始版本,每次" 1.823 +"有了新的更改后加入一个小的转换。" 1.824 1.825 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.826 #: ../en/ch01-intro.xml:490 ../en/ch01-intro.xml:629 1.827 @@ -3051,6 +3276,8 @@ 1.828 "the Linux kernel source tree. Like Mercurial, its early design was somewhat " 1.829 "influenced by Monotone." 1.830 msgstr "" 1.831 +"Git是为了管理Linux内核代码而开发的一个分布式版本控制工具。它和Mercurial一样在" 1.832 +"设计上受了Monotone的影响。" 1.833 1.834 #. type: Content of: <book><chapter><sect1><sect2><para> 1.835 #: ../en/ch01-intro.xml:497 1.836 @@ -3059,6 +3286,8 @@ 1.837 "commands. It has something of a reputation for being difficult to learn. " 1.838 "Compared to Git, Mercurial has a strong focus on simplicity." 1.839 msgstr "" 1.840 +"Git有非常大的命令集,1.5.0版本提供了139个单独的命令。它以难学而闻名于世。与Git" 1.841 +"相比,Mercurial力求简洁。" 1.842 1.843 #. type: Content of: <book><chapter><sect1><sect2><para> 1.844 #: ../en/ch01-intro.xml:502 1.845 @@ -3069,6 +3298,9 @@ 1.846 "support that Git provides is, at the time of writing, far behind that of " 1.847 "Mercurial." 1.848 msgstr "" 1.849 +"就性能而言,Git非常快。在很多情况下它都比Mercurial快,至少是在Linux上,但" 1.850 +"Mercurial在其它操作上有优势。而在Windows上,Git不管是性能还是提供的支持,都比" 1.851 +"Mercurial差很多,至少在本书写作的时候是这样。" 1.852 1.853 #. type: Content of: <book><chapter><sect1><sect2><para> 1.854 #: ../en/ch01-intro.xml:509 1.855 @@ -3082,6 +3314,11 @@ 1.856 "freshly packed Git repository is slightly smaller than a Mercurial " 1.857 "repository, but an unpacked repository is several orders of magnitude larger." 1.858 msgstr "" 1.859 +"Mercurial的版本库不需要维护,但Git的版本库需要频繁的手工维护,将其元数据" 1.860 +"<quote>repacks</quote>,如果不这样做,性能就会下降,磁盘空间也会迅速增加。有多" 1.861 +"个Git版本库的服务器需要严格和频繁的重新打包,否则在备份的时候就会成为严重的瓶" 1.862 +"颈,曾经有过运行每日备份超过24小时的例子。一个新打包的Git版本库比Mercurial稍小" 1.863 +"一些,但是未打包的版本库则会大几个数量级。" 1.864 1.865 #. type: Content of: <book><chapter><sect1><sect2><para> 1.866 #: ../en/ch01-intro.xml:520 1.867 @@ -3091,11 +3328,14 @@ 1.868 "encountered several instances where scripts charged along blindly in the " 1.869 "presence of errors that should have been fatal." 1.870 msgstr "" 1.871 +"Git的核心由C语言编写,许多Git命令是用shell或者perl脚本实现的,这些脚本的质量差" 1.872 +"别很大。我碰到过好几次这样的情况,明明已经出现了致命错误了,脚本还在盲目的执" 1.873 +"行。" 1.874 1.875 #. type: Content of: <book><chapter><sect1><sect2><para> 1.876 #: ../en/ch01-intro.xml:526 1.877 msgid "Mercurial can import revision history from a Git repository." 1.878 -msgstr "" 1.879 +msgstr "Mercurial可以从Git的版本库中导入版本历史。" 1.880 1.881 #. type: Content of: <book><chapter><sect1><sect2><para> 1.882 #: ../en/ch01-intro.xml:534 1.883 @@ -3104,6 +3344,8 @@ 1.884 "to its age and internal untidiness, it has been only lightly maintained for " 1.885 "many years." 1.886 msgstr "" 1.887 +"CVS可能是世界上使用最广泛的版本控制工具。因为它是太古老和内部实现很混乱,许多" 1.888 +"年来都处于维护状态。" 1.889 1.890 #. type: Content of: <book><chapter><sect1><sect2><para> 1.891 #: ../en/ch01-intro.xml:538 1.892 @@ -3118,6 +3360,11 @@ 1.893 "timestamps of the changes made to each file involved (if you even know what " 1.894 "those files were)." 1.895 msgstr "" 1.896 +"CVS采用的是集中式客户/服务器结构。它不会将相关的文件变更一起作为原子提交,这使" 1.897 +"得它很容易<quote>破坏构建</quote>:一个人成功的提交了一部分更改,然后要停下来" 1.898 +"处理合并,这使得其他人只能看见他们的部分工作。这样也会影响你和项目历史的工作方" 1.899 +"式。如果你想看到其他人针对他的那部分任务做的全部修改,你必须手动检查每个受影响" 1.900 +"的文件的变更描述和时间戳(假如你知道是哪些文件)。" 1.901 1.902 #. type: Content of: <book><chapter><sect1><sect2><para> 1.903 #: ../en/ch01-intro.xml:550 1.904 @@ -3129,6 +3376,9 @@ 1.905 "how a repository is corrupt. I would not recommend CVS for any project, " 1.906 "existing or new." 1.907 msgstr "" 1.908 +"CVS的分支和标签的概念实在是太混乱了,我都不想给你介绍。它也不支持文件和目录的" 1.909 +"重命名。这使得版本库非常容易崩溃。它几乎没任何的内部一致性检查功能,所以通常你" 1.910 +"不可能知道版本库是不是崩溃了。不管是新项目还是老项目,我都不推荐使用CVS。" 1.911 1.912 #. type: Content of: <book><chapter><sect1><sect2><para> 1.913 #: ../en/ch01-intro.xml:558 1.914 @@ -3144,11 +3394,17 @@ 1.915 "timestamps and files that have remained locked for over a decade are just two " 1.916 "of the less interesting problems I can recall from personal experience)." 1.917 msgstr "" 1.918 +"Mercurial可以导入CVS的版本历史。然而,这里面有很多限制;对其版本控制工具的CVS" 1.919 +"导入程序也是一样。因为CVS缺少原子更改并且不支持文件系统层次的版本控制,所以不" 1.920 +"可能完全精确的重建CVS的历史。有些需要猜测,重命名通常发现不了。因为CVS的很多的" 1.921 +"高级管理功能必须手动完成,因此非常容易出错。碰到崩溃的版本库,CVS导入程序通常" 1.922 +"会出现很多问题(完全伪造的版本时间戳,若干文件被锁定十多年,这是我个人经历的两" 1.923 +"个不太有趣的问题)。" 1.924 1.925 #. type: Content of: <book><chapter><sect1><sect2><para> 1.926 #: ../en/ch01-intro.xml:572 1.927 msgid "Mercurial can import revision history from a CVS repository." 1.928 -msgstr "" 1.929 +msgstr "Mercurial可以从CVS版本库导入版本历史。" 1.930 1.931 #. type: Content of: <book><chapter><sect1><sect2><title> 1.932 #: ../en/ch01-intro.xml:578 1.933 @@ -3163,6 +3419,8 @@ 1.934 "that a user run a command to inform the server about every file they intend " 1.935 "to edit." 1.936 msgstr "" 1.937 +"Perforce采用的是集中式客户/服务器结构,客户端不缓存任何数据。和现代的版本控制" 1.938 +"工具不同,每次想要编辑的一个文件,用户必须运行一个命令通知Perforce服务器。" 1.939 1.940 #. type: Content of: <book><chapter><sect1><sect2><para> 1.941 #: ../en/ch01-intro.xml:586 1.942 @@ -3172,6 +3430,8 @@ 1.943 "Perforce installations require the deployment of proxies to cope with the " 1.944 "load their users generate." 1.945 msgstr "" 1.946 +"对于小的团队而言,Perforce相当好,但是当用户数目超过数十个以后,性能急剧下降。" 1.947 +"中等大小Perforce安装需要部署代理来处理用户产生的负载。" 1.948 1.949 #. type: Content of: <book><chapter><sect1><sect2><title> 1.950 #: ../en/ch01-intro.xml:595 1.951 @@ -3185,6 +3445,7 @@ 1.952 "strengths that suit them to particular styles of work. There is no single " 1.953 "revision control tool that is best in all situations." 1.954 msgstr "" 1.955 +"除了CVS之外,以上列出的所有工具都各有所长,没有一个版本控制工具适合所有情况。" 1.956 1.957 #. type: Content of: <book><chapter><sect1><sect2><para> 1.958 #: ../en/ch01-intro.xml:602 1.959 @@ -3192,6 +3453,8 @@ 1.960 "As an example, Subversion is a good choice for working with frequently edited " 1.961 "binary files, due to its centralised nature and support for file locking." 1.962 msgstr "" 1.963 +"比如说,因为采用集中式的结构并且支持文件锁定,Subversion非常适合频繁编辑二进制" 1.964 +"文件的场合。" 1.965 1.966 #. type: Content of: <book><chapter><sect1><sect2><para> 1.967 #: ../en/ch01-intro.xml:606 1.968 @@ -3200,6 +3463,8 @@ 1.969 "merge support to be a compelling combination that has served me well for " 1.970 "several years." 1.971 msgstr "" 1.972 +"我已经使用Mercurial很多年了,个人认为它有简洁,高性能,良好的合并支持诸多特" 1.973 +"点。" 1.974 1.975 #. type: Content of: <book><chapter><sect1><title> 1.976 #: ../en/ch01-intro.xml:614 1.977 @@ -3216,6 +3481,9 @@ 1.978 "the conversion later to obtain new changes that happened after the initial " 1.979 "conversion." 1.980 msgstr "" 1.981 +"Mercurial包括一个叫<literal role=\"hg-ext\">convert</literal>的扩展,它可以递" 1.982 +"增的从几个其他的版本控制工具导入版本历史。 <quote>增量</quote>的意思是你可以在" 1.983 +"某天将整个项目历史转换,以后再次进行转换获得初始版本以后新增的变更。" 1.984 1.985 #. type: Content of: <book><chapter><sect1><para> 1.986 #: ../en/ch01-intro.xml:624 1.987 @@ -3232,6 +3500,9 @@ 1.988 "Mercurial in parallel before committing to a switchover, without risking the " 1.989 "loss of any work." 1.990 msgstr "" 1.991 +"另外<literal role=\"hg-ext\">convert</literal>可以从Mercurial向Subversion导出" 1.992 +"历史,这可以让你在切换之前让Mercurial和Subversion并行工作,而不会丢失任何工" 1.993 +"作。" 1.994 1.995 #. type: Content of: <book><chapter><sect1><para> 1.996 #: ../en/ch01-intro.xml:638 1.997 @@ -3242,6 +3513,9 @@ 1.998 "After the initial conversion, just run the same command again to import new " 1.999 "changes." 1.1000 msgstr "" 1.1001 +"<command role=\"hg-ext-convert\">convert</command>命令非常简单。只要给出源版本" 1.1002 +"库的URL或者路径,给出目标版本库的名称(可选),它就开始工作了。第一次转换之" 1.1003 +"后,只要运行同样的命令就可以导入新的变更。" 1.1004 1.1005 #. type: Content of: <book><chapter><sect1><title> 1.1006 #: ../en/ch01-intro.xml:647 1.1007 @@ -3260,6 +3534,10 @@ 1.1008 "unlock them, preventing anyone else from modifying those files without the " 1.1009 "help of an administrator." 1.1010 msgstr "" 1.1011 +"最有名史前的版本控制工具是SCCS(源代码控制系统),它是由Marc Rochkind于七十年" 1.1012 +"代在贝尔实验室完成的。SCCS只能控制单个文件,这就要求项目组人员只能使用一个系统" 1.1013 +"上的共享工作空间。任何时候一个文件只能由一个人修改;通过加锁来保证。人们很容易" 1.1014 +"锁定一个文件,然后忘了解锁,没有管理员的帮助,任何人都不能修改那些文件。" 1.1015 1.1016 #. type: Content of: <book><chapter><sect1><para> 1.1017 #: ../en/ch01-intro.xml:660 1.1018 @@ -3269,6 +3547,9 @@ 1.1019 "developers to work in a single shared workspace, and to lock files to prevent " 1.1020 "multiple people from modifying them simultaneously." 1.1021 msgstr "" 1.1022 +"Walter Tichy在八十年代早期开发了一个开源的SCCS替代软件;他称之RCS(版本控制系" 1.1023 +"统)。和SCCS一样,RCS要求开发人员在一个共享的工作空间工作,同时锁定文件,以防" 1.1024 +"止多个人他同时修改。" 1.1025 1.1026 #. type: Content of: <book><chapter><sect1><para> 1.1027 #: ../en/ch01-intro.xml:666 1.1028 @@ -3282,6 +3563,11 @@ 1.1029 "of every project file, and could modify their copies independently. They had " 1.1030 "to merge their edits prior to committing changes to the central repository." 1.1031 msgstr "" 1.1032 +"八十年代后期,Dick Grune在RCS的基础上开发了一套脚本,他开始称之为cmt,后来又改" 1.1033 +"名为CVS(并行版本系统)。CVS的最大的创新在于让开发人员可以在自己的工作空间里同" 1.1034 +"时而且独立的工作。私人的工作空间防止了开发人员总是互相干扰,这在SCCS和RCS的使" 1.1035 +"用中很常见。项目中的每个文件,开发者都有自己的拷贝,可以独立的修改自己的拷贝。" 1.1036 +"他们可以在提交到中央版本库之前合并更改。" 1.1037 1.1038 #. type: Content of: <book><chapter><sect1><para> 1.1039 #: ../en/ch01-intro.xml:677 1.1040 @@ -3296,6 +3582,11 @@ 1.1041 "successful; it is probably the world's most widely used revision control " 1.1042 "system." 1.1043 msgstr "" 1.1044 +"Brian Berliner接管了Grune的脚本,用C重写了一遍,并在1989年发布了这些代码,现在" 1.1045 +"的CVS就是从那时逐渐发展起来的。CVS随后增加了网络的功能,形成了客户/服务器结" 1.1046 +"构。CVS的结构是集中式的;仅在服务器上保存一份项目的历史拷贝。客户工作空间仅包" 1.1047 +"含项目中的文件的最近版本的拷贝,一些元数据告诉它们服务器的地址。CVS获得了极大" 1.1048 +"成功;它可能是世界上应用最广泛的版本控制系统。" 1.1049 1.1050 #. type: Content of: <book><chapter><sect1><para> 1.1051 #: ../en/ch01-intro.xml:688 1.1052 @@ -3306,6 +3597,9 @@ 1.1053 "repository. (CVS relied upon RCS for its history storage; TeamWare used " 1.1054 "SCCS.)" 1.1055 msgstr "" 1.1056 +"90年代早期,Sun公司开发了一个早期的分布式版本控制系统,叫做TeamWeare。TeamWare" 1.1057 +"的工作空间包括项目历史的完整拷贝。TeamWare没有中央版本库的概念。(CVS使用RCS存" 1.1058 +"储其历史,TeamWare使用SCCS。" 1.1059 1.1060 #. type: Content of: <book><chapter><sect1><para> 1.1061 #: ../en/ch01-intro.xml:695 1.1062 @@ -3318,6 +3612,9 @@ 1.1063 "and maintain, which made the <quote>pain level</quote> of fixing these " 1.1064 "architectural problems prohibitive." 1.1065 msgstr "" 1.1066 +"在90年代中,随着时间的流逝,CVS逐渐暴露出很多问题。它对多个文件同时发生的变更" 1.1067 +"不能一起记录,不能按照层次管理文件;对目录和文件的重命名很容易破坏版本库。更糟" 1.1068 +"的是,它的源代码很难阅读和维护,修复这些架构上的问题的非常困难。" 1.1069 1.1070 #. type: Content of: <book><chapter><sect1><para> 1.1071 #: ../en/ch01-intro.xml:705 1.1072 @@ -3330,6 +3627,11 @@ 1.1073 "generally better tool than CVS. Since its initial release, it has rapidly " 1.1074 "grown in popularity." 1.1075 msgstr "" 1.1076 +"2001年,原来维护过CVS的两个开发者Jim Blandy和Karl Fogel,开始了一个新项目,其" 1.1077 +"目标是替代CVS,新的软件将采用更好的架构和更整洁的代码。于是Subversion诞生了," 1.1078 +"它并保留了CVS集中式的客户/服务器模型,但是增加了多文件原子提交,更好的命名空间" 1.1079 +"管理,和其他一些功能。总而言之,它比CVS好的多。Subversion在发布后迅速流行起" 1.1080 +"来。" 1.1081 1.1082 #. type: Content of: <book><chapter><sect1><para> 1.1083 #: ../en/ch01-intro.xml:714 1.1084 @@ -3341,6 +3643,10 @@ 1.1085 "innovative ways. It uses cryptographic hashes as identifiers, and has an " 1.1086 "integral notion of <quote>trust</quote> for code from different sources." 1.1087 msgstr "" 1.1088 +"大概相同时间,Graydon Hoare开始了一个野心勃勃的分布式版本控制项目,他称之为" 1.1089 +"Monotone。Monotone解决了很多CVS设计上的漏洞并且采用了点对点的架构,它在创新方" 1.1090 +"面比以前(和以后)的版本控制系统走的更远。它使用加密哈希作为标识符,并且对于不" 1.1091 +"同源的代码有了完整的 <quote>信任</quote>概念。" 1.1092 1.1093 #. type: Content of: <book><chapter><sect1><para> 1.1094 #: ../en/ch01-intro.xml:723 1.1095 @@ -3349,6 +3655,8 @@ 1.1096 "influenced by Monotone, Mercurial focuses on ease of use, high performance, " 1.1097 "and scalability to very large projects." 1.1098 msgstr "" 1.1099 +"Mercurial诞生于2005年。设计方面受了Monotone的一些影响,Mercurial的目标是易用," 1.1100 +"高性能,对大的项目的良好扩展性。" 1.1101 1.1102 #. type: Content of: <book><chapter><title> 1.1103 #: ../en/ch02-tour-basic.xml:5 1.1104 @@ -3530,6 +3838,8 @@ 1.1105 "The repository for a project contains all of the files that <quote>belong to</" 1.1106 "quote> that project, along with a historical record of the project's files." 1.1107 msgstr "" 1.1108 +"在Mercurial中,所有的操作都在<emphasis>版本库</emphasis>中进行。项目的版本库包" 1.1109 +"括了属于该项目的所有文件和这些文件的历史记录。" 1.1110 1.1111 #. type: Content of: <book><chapter><sect1><para> 1.1112 #: ../en/ch02-tour-basic.xml:118 1.1113 @@ -3539,6 +3849,8 @@ 1.1114 "rename or delete a repository any time you like, using either the command " 1.1115 "line or your file browser." 1.1116 msgstr "" 1.1117 +"版本库没有什么神秘的地方;仅仅是你系统中的一个目录树,Mercurial会将它们特殊处" 1.1118 +"理。你可以在任何喜欢的时候使用命令行或者文件浏览器删除版本库或者给它改名。" 1.1119 1.1120 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1121 #: ../en/ch02-tour-basic.xml:125 1.1122 @@ -3554,6 +3866,9 @@ 1.1123 "This command is called <command role=\"hg-cmd\">hg clone</command>, because " 1.1124 "it makes an identical copy of an existing repository." 1.1125 msgstr "" 1.1126 +"<emphasis>拷贝</emphasis>版本库有点特殊。虽然你可以使用文件拷贝命令来复制一般" 1.1127 +"版本库,最好还是用Mercurial内置的命令。这个命令叫做 <command role=\"hg-cmd" 1.1128 +"\">hg clone</command>,因为它创建了一个原来版本库的拷贝。" 1.1129 1.1130 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1131 #: ../en/ch02-tour-basic.xml:136 1.1132 @@ -3563,6 +3878,9 @@ 1.1133 "is that it remembers where we cloned from, which we'll find useful soon when " 1.1134 "we want to fetch new changes from another repository." 1.1135 msgstr "" 1.1136 +"如上所示,使用<command role=\"hg-cmd\">hg clone</command>的好处在于它能够让你" 1.1137 +"通过网络克隆版本库。另外一个好处你它会记得这个版本库是从哪里克隆的,稍后会看" 1.1138 +"到,当我们想从其他的版本库获取新的变更的时候这点这会非常有用。" 1.1139 1.1140 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1141 #: ../en/ch02-tour-basic.xml:142 1.1142 @@ -3570,13 +3888,15 @@ 1.1143 "If our clone succeeded, we should now have a local directory called <filename " 1.1144 "class=\"directory\">hello</filename>. This directory will contain some files." 1.1145 msgstr "" 1.1146 +"如果我们克隆成功,我们会得到一个本地目录,叫做 <filename class=\"directory" 1.1147 +"\">hello</filename>。这个目录会包括一些文件。" 1.1148 1.1149 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1150 #: ../en/ch02-tour-basic.xml:148 1.1151 msgid "" 1.1152 "These files have the same contents and history in our repository as they do " 1.1153 "in the repository we cloned." 1.1154 -msgstr "" 1.1155 +msgstr "这个版本库中的文件和我们刚才克隆的版本库中的文件相同的内容和版本历史" 1.1156 1.1157 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1158 #: ../en/ch02-tour-basic.xml:151 1.1159 @@ -3587,6 +3907,9 @@ 1.1160 "was cloned from, but Mercurial will not communicate with that repository, or " 1.1161 "any other, unless you tell it to." 1.1162 msgstr "" 1.1163 +"每个Mercurial版本库都是完整的,自包含的,独立的。它包含了项目文件的一份私有拷" 1.1164 +"贝和全部历史。我们刚才已经提到,克隆的版本库会记住它克隆的那个版本库的地址,但" 1.1165 +"是Mercurial不会和那个或者其他任何一个版本库通信,除非你给它命令。" 1.1166 1.1167 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1168 #: ../en/ch02-tour-basic.xml:158 1.1169 @@ -3595,6 +3918,8 @@ 1.1170 "safe in the knowledge that it's a private <quote>sandbox</quote> that won't " 1.1171 "affect anyone else." 1.1172 msgstr "" 1.1173 +"这意味着,我们可以随意的在我们的版本库中做实验,非常安全,因为它是一个私有的" 1.1174 +"<quote>沙盒</quote>,不会影响任何人。" 1.1175 1.1176 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1177 #: ../en/ch02-tour-basic.xml:164 1.1178 @@ -3608,6 +3933,8 @@ 1.1179 "contains a directory named <filename class=\"directory\">.hg</filename>. " 1.1180 "This is where Mercurial keeps all of its metadata for the repository." 1.1181 msgstr "" 1.1182 +"当我们仔细观察版本库内部时,我们会发现它有一个叫<filename class=\"directory" 1.1183 +"\">.hg</filename>的目录。这就是Mercurial为版本库保存所有元数据的地方。" 1.1184 1.1185 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1186 #: ../en/ch02-tour-basic.xml:173 1.1187 @@ -3616,6 +3943,8 @@ 1.1188 "and its subdirectories are private to Mercurial. Every other file and " 1.1189 "directory in the repository is yours to do with as you please." 1.1190 msgstr "" 1.1191 +"目录<filename class=\"directory\">.hg</filename>中的内容和其子目录是Mercurial" 1.1192 +"私有的。版本库中的其他任何文件和目录你都可以随意操作。" 1.1193 1.1194 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1195 #: ../en/ch02-tour-basic.xml:179 1.1196 @@ -3629,6 +3958,11 @@ 1.1197 "directory</emphasis> contains a <emphasis>snapshot</emphasis> of your project " 1.1198 "at a particular point in history." 1.1199 msgstr "" 1.1200 +"介绍一点术语, <filename class=\"directory\">.hg</filename>目录是<quote>真正的" 1.1201 +"</quote>版本库,所有其他的文件和目录称为<emphasis>工作目录</emphasis>一个简单" 1.1202 +"的区分的方法就是<emphasis>版本库</emphasis>中包含了项目的<emphasis>历史</" 1.1203 +"emphasis>,而 <emphasis>工作目录</emphasis>则是项目组一个特定历史点上的" 1.1204 +"<emphasis>快照</emphasis>。" 1.1205 1.1206 #. type: Content of: <book><chapter><sect1><title> 1.1207 #: ../en/ch02-tour-basic.xml:194 1.1208 @@ -3642,6 +3976,8 @@ 1.1209 "is understand its history. The <command role=\"hg-cmd\">hg log</command> " 1.1210 "command gives us a view of the history of changes in the repository." 1.1211 msgstr "" 1.1212 +"对于一个新的,我们不熟悉的版本库,我们想做的第一件事就是了解它的历史。命令" 1.1213 +"<command role=\"hg-cmd\">hg log</command>可以让我们浏览版本库中的历史变更。" 1.1214 1.1215 #. type: Content of: <book><chapter><sect1><para> 1.1216 #: ../en/ch02-tour-basic.xml:203 1.1217 @@ -3651,6 +3987,9 @@ 1.1218 "these recorded events a <emphasis>changeset</emphasis>, because it can " 1.1219 "contain a record of changes to several files." 1.1220 msgstr "" 1.1221 +"缺省情况下,这个命令对项目中记录的每个变更都输出一段简介,在Mercurial的术语" 1.1222 +"中,我们将这些记录的事件成为<emphasis>变更集</emphasis>,因为每个记录都可能包" 1.1223 +"括几个文件的变更。" 1.1224 1.1225 #. type: Content of: <book><chapter><sect1><para> 1.1226 #: ../en/ch02-tour-basic.xml:209 1.1227 @@ -3658,6 +3997,7 @@ 1.1228 "The fields in a record of output from <command role=\"hg-cmd\">hg log</" 1.1229 "command> are as follows." 1.1230 msgstr "" 1.1231 +" <command role=\"hg-cmd\">hg log</command>输出记录的各个字段的意义如下。" 1.1232 1.1233 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1234 #: ../en/ch02-tour-basic.xml:213 1.1235 @@ -3670,6 +4010,11 @@ 1.1236 "to type than the hex string, but it isn't unique: the same number in two " 1.1237 "different clones of a repository may identify different changesets." 1.1238 msgstr "" 1.1239 +"<literal>changeset</literal>:这个字段包括一个数字,接着一个冒号,然后是是一个" 1.1240 +"十六进制字符串。这是这个变更的<emphasis>标识符</emphasis>。十六进制字符串是唯" 1.1241 +"一标识符:在这个版本库的任何一个拷贝中,同一个字符串总是对应同一个变更集。数字" 1.1242 +"更短并且比十六进制字符串更容易书写,但它不是唯一的:一个版本库的两个不同的的克" 1.1243 +"隆中的同一个数字可能对应不同的变更集。" 1.1244 1.1245 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1246 #: ../en/ch02-tour-basic.xml:224 1.1247 @@ -3678,6 +4023,8 @@ 1.1248 "changeset. This is a free-form field, but it most often contains a person's " 1.1249 "name and email address." 1.1250 msgstr "" 1.1251 +"<literal>user</literal>:这个字段标识是谁创建了这个变更集。这个字段格式可以自" 1.1252 +"由定义,通常是一个人的姓名加上电子邮件地址。" 1.1253 1.1254 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1255 #: ../en/ch02-tour-basic.xml:228 1.1256 @@ -3687,13 +4034,15 @@ 1.1257 "local to that timezone; they display what time and date it was for the person " 1.1258 "who created the changeset.)" 1.1259 msgstr "" 1.1260 +"<literal>date</literal>:这是变更集创建的日期和时间,还有时区。(日期和时间是" 1.1261 +"相对于时区的;他们显示了创建变更的人的日期和时间。)" 1.1262 1.1263 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1264 #: ../en/ch02-tour-basic.xml:233 1.1265 msgid "" 1.1266 "<literal>summary</literal>: The first line of the text message that the " 1.1267 "creator of the changeset entered to describe the changeset." 1.1268 -msgstr "" 1.1269 +msgstr "<literal>summary</literal>:创建者对该变更集的描述的第一行文本信息。" 1.1270 1.1271 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1272 #: ../en/ch02-tour-basic.xml:237 1.1273 @@ -3703,6 +4052,9 @@ 1.1274 "an easy-to-remember name. (The tag named <literal>tip</literal> is special: " 1.1275 "it always refers to the newest change in a repository.)" 1.1276 msgstr "" 1.1277 +"有些变更集,像上面的第一个,有一个<literal>标签</literal>字段。标签是区分变更" 1.1278 +"集的另外一种方法,给它一个容易记得名字。(叫做<literal>tip</literal>的标签有特" 1.1279 +"殊意义:总是指向版本库中的最新的变更。)" 1.1280 1.1281 #. type: Content of: <book><chapter><sect1><para> 1.1282 #: ../en/ch02-tour-basic.xml:245 1.1283 @@ -3710,6 +4062,8 @@ 1.1284 "The default output printed by <command role=\"hg-cmd\">hg log</command> is " 1.1285 "purely a summary; it is missing a lot of detail." 1.1286 msgstr "" 1.1287 +"缺省情况下,<command role=\"hg-cmd\">hg log</command>的输出仅仅是个摘要,没有" 1.1288 +"更详细的信息。" 1.1289 1.1290 #. type: Content of: <book><chapter><sect1><para> 1.1291 #: ../en/ch02-tour-basic.xml:249 1.1292 @@ -3720,6 +4074,9 @@ 1.1293 "history is <quote>flowing</quote> in. We'll be returning to this figure " 1.1294 "several times in this chapter and the chapter that follows." 1.1295 msgstr "" 1.1296 +"<xref linkend=\"fig:tour-basic:history\"/>以图形化方式显示了版本库<filename " 1.1297 +"class=\"directory\">hello</filename>的历史,这样很容易看出历史的<quote>流向</" 1.1298 +"quote>。在本章和下面的章节中,我们会多次使用这个图。" 1.1299 1.1300 #. type: Content of: <book><chapter><sect1><figure><title> 1.1301 #: ../en/ch02-tour-basic.xml:258 1.1302 @@ -3759,7 +4116,7 @@ 1.1303 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1304 #: ../en/ch02-tour-basic.xml:267 1.1305 msgid "Changesets, revisions, and talking to other people" 1.1306 -msgstr "修改集,版本,与其它用户交互" 1.1307 +msgstr "变更集,版本,与其它用户交互" 1.1308 1.1309 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1310 #: ../en/ch02-tour-basic.xml:270 1.1311 @@ -3772,6 +4129,11 @@ 1.1312 "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a " 1.1313 "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>." 1.1314 msgstr "" 1.1315 +"英语是一种非常随便的语言,计算机史上也向来以混乱的术语为荣(如能用四个词为什么" 1.1316 +"要用一个呢?),就版本控制而言,有很多词和短语有相同的意思。如果你和别人讨论" 1.1317 +"Mercurial版本库的历史,你会发现<quote>变更集</quote>这个词常常被简化成<quote>" 1.1318 +"变更</quote>或者(写的时候)<quote>cset</quote>,有时候变更集也指一个<quote>版" 1.1319 +"本</quote>或者<quote>rev</quote>。" 1.1320 1.1321 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1322 #: ../en/ch02-tour-basic.xml:280 1.1323 @@ -3783,13 +4145,18 @@ 1.1324 "literal> field in the output from <command role=\"hg-cmd\">hg log</command> " 1.1325 "identifies a changeset using both a number and a hexadecimal string." 1.1326 msgstr "" 1.1327 +"实际上,用哪个<emphasis>词</emphasis>来描述<quote>变更集</quote>的概念并不重" 1.1328 +"要,重要的是如何用<emphasis>标识符</emphasis>来标识<quote>一个<emphasis>特定的" 1.1329 +"</emphasis>变更集</quote>。回忆一下<command role=\"hg-cmd\">hg log</command>命" 1.1330 +"令的输出,<literal>changeset</literal>字段里用一个数字和一个十六进制字符串来标" 1.1331 +"识一个变更集。" 1.1332 1.1333 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.1334 #: ../en/ch02-tour-basic.xml:289 1.1335 msgid "" 1.1336 "The revision number is a handy notation that is <emphasis>only valid in that " 1.1337 "repository</emphasis>." 1.1338 -msgstr "" 1.1339 +msgstr "版本号是一个方便的标识,它仅在<emphasis>当前版本库中有效</emphasis>。" 1.1340 1.1341 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.1342 #: ../en/ch02-tour-basic.xml:292 1.1343 @@ -3798,6 +4165,8 @@ 1.1344 "emphasis> that will always identify that exact changeset in <emphasis>every</" 1.1345 "emphasis> copy of the repository." 1.1346 msgstr "" 1.1347 +"十六进制字符串是<emphasis>永久的,不变的标识</emphasis>,它在该版本库的所有拷" 1.1348 +"贝中都指向同一个变更集。" 1.1349 1.1350 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1351 #: ../en/ch02-tour-basic.xml:298 1.1352 @@ -3811,6 +4180,11 @@ 1.1353 "literal> can easily appear in one repository as <literal>0,1,2</literal>, " 1.1354 "while in another as <literal>0,2,1</literal>." 1.1355 msgstr "" 1.1356 +"这个区别很重要。如果你通过邮件和别人讨论<quote>版本33</quote>,很有可能他们的" 1.1357 +"版本33和你的<emphasis>不一样</emphasis>。原因在于版本号依赖于相应变更进入版本" 1.1358 +"库的顺序。,不能保证同一个变更在不同的版本库中会有相同的次序。有可能三个变更" 1.1359 +"<literal>a,b,c</literal>在一个版本库中的次序是<literal>0,1,2</literal>,而在另" 1.1360 +"外一个版本库中则变成<literal>0,2,1</literal>" 1.1361 1.1362 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1363 #: ../en/ch02-tour-basic.xml:310 1.1364 @@ -3820,11 +4194,13 @@ 1.1365 "some other reason (for example, in a bug report), use the hexadecimal " 1.1366 "identifier." 1.1367 msgstr "" 1.1368 +"Mercurial使用版本号纯粹是为了有些命令的方便,如果你要和别人讨论变更集,或者由" 1.1369 +"于某些原因为一个变更集做记录(如在bug报告中),请使用十六进制标识符。" 1.1370 1.1371 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1372 #: ../en/ch02-tour-basic.xml:318 1.1373 msgid "Viewing specific revisions" 1.1374 -msgstr "察看指定版本" 1.1375 +msgstr "查看指定版本" 1.1376 1.1377 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1378 #: ../en/ch02-tour-basic.xml:320 1.1379 @@ -3835,6 +4211,10 @@ 1.1380 "number or a hexadecimal identifier, and you can provide as many revisions as " 1.1381 "you want." 1.1382 msgstr "" 1.1383 +"如果只想用<command role=\"hg-cmd\">hg log</command>查看一个版本的日志使用" 1.1384 +"<option role=\"hg-opt-log\">-r</option>(或者<option role=\"hg-opt-log\">--" 1.1385 +"rev</option>)选项。版本号和十六进制标识符都可以来指定版本,可以一次指定任意多" 1.1386 +"个版本。" 1.1387 1.1388 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1389 #: ../en/ch02-tour-basic.xml:329 1.1390 @@ -3844,6 +4224,9 @@ 1.1391 "express the idea <quote>I want all revisions between <literal>abc</literal> " 1.1392 "and <literal>def</literal>, inclusive</quote>." 1.1393 msgstr "" 1.1394 +"如果你想显示几个版本历史,但是不想一个一个的列出来,可以使用 <emphasis>范围标" 1.1395 +"记</emphasis>;它会显示包括<literal>abc</literal>和<literal>def</literal>,以" 1.1396 +"及它们之间的所有版本的版本历史。" 1.1397 1.1398 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1399 #: ../en/ch02-tour-basic.xml:337 1.1400 @@ -3852,6 +4235,9 @@ 1.1401 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " 1.1402 "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2." 1.1403 msgstr "" 1.1404 +"Mercurial还可以指定版本的输出顺序,如<command role=\"hg-cmd\">hg log -r 2:4</" 1.1405 +"command>输出2,3,4。而<command role=\"hg-cmd\">hg log -r 4:2</command>则输出" 1.1406 +"4,3,2。" 1.1407 1.1408 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1409 #: ../en/ch02-tour-basic.xml:344 1.1410 @@ -3869,6 +4255,11 @@ 1.1411 "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) " 1.1412 "option gives you this extra detail." 1.1413 msgstr "" 1.1414 +"当你知道你在找那个版本的时候,<command role=\"hg-cmd\">hg log</command>输出的" 1.1415 +"摘要是非常有用的,但有时候你不知道要找哪个版本,你想看到变更的完整描述,或者修" 1.1416 +"改过的文件的列表,<command role=\"hg-cmd\">hg log</command>命令的<option role=" 1.1417 +"\"hg-opt-global\">-v</option>(<option role=\"hg-opt-global\">--verbose</" 1.1418 +"option>)选项会给出更详细的信息。" 1.1419 1.1420 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1421 #: ../en/ch02-tour-basic.xml:358 1.1422 @@ -3879,13 +4270,17 @@ 1.1423 "<emphasis>unified diff</emphasis> (if you've never seen a unified diff " 1.1424 "before, see <xref linkend=\"sec:mq:patch\"/> for an overview)." 1.1425 msgstr "" 1.1426 +"如果你想同时看到变更的描述和内容,增加<option role=\"hg-opt-log\">-p</option>" 1.1427 +"(<option role=\"hg-opt-log\">--patch</option>)选项。这会将变更的内容以" 1.1428 +"<emphasis>unified diff</emphasis>的格式显示(如果你不知道unified diff,请参考" 1.1429 +"<xref linkend=\"sec:mq:patch\"/>。" 1.1430 1.1431 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1432 #: ../en/ch02-tour-basic.xml:368 1.1433 msgid "" 1.1434 "The <option role=\"hg-opt-log\">-p</option> option is tremendously useful, so " 1.1435 "it's well worth remembering." 1.1436 -msgstr "" 1.1437 +msgstr "<option role=\"hg-opt-log\">-p</option>选项非常有用,所以一定要记住。" 1.1438 1.1439 #. type: Content of: <book><chapter><sect1><title> 1.1440 #: ../en/ch02-tour-basic.xml:375 1.1441 @@ -3899,6 +4294,8 @@ 1.1442 "pattern in the way that they work; you may find this useful to keep in mind " 1.1443 "as we continue our tour." 1.1444 msgstr "" 1.1445 +"我们休息一下,先不讨论Mercurial命令了,而是来看看它们工作的模式;这对以后的学" 1.1446 +"习会非常有帮助。" 1.1447 1.1448 #. type: Content of: <book><chapter><sect1><para> 1.1449 #: ../en/ch02-tour-basic.xml:381 1.1450 @@ -3907,6 +4304,8 @@ 1.1451 "options that you can pass to commands. It follows the conventions for " 1.1452 "options that are common to modern Linux and Unix systems." 1.1453 msgstr "" 1.1454 +"Mercurial处理传递给它的命令选项的方法简单一致。它遵从现代Linux和Unix对选项的处" 1.1455 +"理习惯。" 1.1456 1.1457 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1458 #: ../en/ch02-tour-basic.xml:388 1.1459 @@ -3915,6 +4314,8 @@ 1.1460 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" 1.1461 "opt-log\">--rev</option> option." 1.1462 msgstr "" 1.1463 +"每个选项有一个长名。例如,我们已经看到了,<command role=\"hg-cmd\">hg log</" 1.1464 +"command>命令接受<option role=\"hg-opt-log\">--rev</option>选项。" 1.1465 1.1466 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1467 #: ../en/ch02-tour-basic.xml:394 1.1468 @@ -3924,6 +4325,9 @@ 1.1469 "reason that some options don't have short names is that the options in " 1.1470 "question are rarely used.)" 1.1471 msgstr "" 1.1472 +"大多数选项还有短名,除了使用<option role=\"hg-opt-log\">--rev</option>,我们还" 1.1473 +"可以用<option role=\"hg-opt-log\">-r</option>。(有些选项没有短名的原因是他们" 1.1474 +"很少用到。)" 1.1475 1.1476 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.1477 #: ../en/ch02-tour-basic.xml:401 1.1478 @@ -3949,6 +4353,9 @@ 1.1479 "For example, the command <command role=\"hg-cmd\">hg log -v -p -r 2</command> " 1.1480 "can be written as <command role=\"hg-cmd\">hg log -vpr2</command>." 1.1481 msgstr "" 1.1482 +"如果使用短选项,你可以把它们放在一起以减少输入。例如,命令<command role=\"hg-" 1.1483 +"cmd\">hg log -v -p -r 2</command> 可以写成 <command role=\"hg-cmd\">hg log -" 1.1484 +"vpr2</command>。" 1.1485 1.1486 #. type: Content of: <book><chapter><sect1><para> 1.1487 #: ../en/ch02-tour-basic.xml:421 1.1488 @@ -3957,6 +4364,8 @@ 1.1489 "long. This simply reflects my own preference, so don't read anything " 1.1490 "significant into it." 1.1491 msgstr "" 1.1492 +"在本书的例子中,我通常使用短选项,很少用长选项。这仅仅是我个人的习惯,你不一定" 1.1493 +"要这样。" 1.1494 1.1495 #. type: Content of: <book><chapter><sect1><para> 1.1496 #: ../en/ch02-tour-basic.xml:425 1.1497 @@ -3970,7 +4379,7 @@ 1.1498 #. type: Content of: <book><chapter><sect1><note><title> 1.1499 #: ../en/ch02-tour-basic.xml:432 1.1500 msgid "Option naming consistency" 1.1501 -msgstr "" 1.1502 +msgstr "选项命名的一致性" 1.1503 1.1504 #. type: Content of: <book><chapter><sect1><note><para> 1.1505 #: ../en/ch02-tour-basic.xml:434 1.1506 @@ -3985,7 +4394,7 @@ 1.1507 #. type: Content of: <book><chapter><sect1><title> 1.1508 #: ../en/ch02-tour-basic.xml:445 1.1509 msgid "Making and reviewing changes" 1.1510 -msgstr "创建和复审修改" 1.1511 +msgstr "创建和复审变更" 1.1512 1.1513 #. type: Content of: <book><chapter><sect1><para> 1.1514 #: ../en/ch02-tour-basic.xml:447 1.1515 @@ -3993,6 +4402,8 @@ 1.1516 "Now that we have a grasp of viewing history in Mercurial, let's take a look " 1.1517 "at making some changes and examining them." 1.1518 msgstr "" 1.1519 +"现在我们已经对查看Mercurial的版本历史有了一些了解,现在我们开始做些修改并且检" 1.1520 +"查这些修改。" 1.1521 1.1522 #. type: Content of: <book><chapter><sect1><para> 1.1523 #: ../en/ch02-tour-basic.xml:451 1.1524 @@ -4014,6 +4425,9 @@ 1.1525 "you, don't worry: everything happens transparently and automatically, and you " 1.1526 "don't need to understand it." 1.1527 msgstr "" 1.1528 +"如果版本库的源和目标都在同一个文件系统上,将会节省很多空间。这种情况下," 1.1529 +"Mercurial会使用硬链接的方式来共享内部元数据,并使用写时拷贝的机制。如果你不明" 1.1530 +"白这句话的意思,没有关系:所有的事情都是自动和透明的,你不需要知道它们。" 1.1531 1.1532 #. type: Content of: <book><chapter><sect1><para> 1.1533 #: ../en/ch02-tour-basic.xml:468 1.1534 @@ -4026,6 +4440,10 @@ 1.1535 "there's almost no overhead to cloning and destroying repositories whenever " 1.1536 "you want." 1.1537 msgstr "" 1.1538 +"说句题外话,保留远程版本库的一份<quote>原始</quote>拷贝是一个很好的习惯,这样" 1.1539 +"你就可以为每个任务都创建临时的克隆作为沙盒。直到认务完成并且你准备好提交到版本" 1.1540 +"库, 每个任务都和其他的独立,这样你可以并行工作。因为本地的克隆很方便,在任何时" 1.1541 +"候克隆和销毁一个版本库都只有很小的开销。" 1.1542 1.1543 #. type: Content of: <book><chapter><sect1><para> 1.1544 #: ../en/ch02-tour-basic.xml:477 1.1545 @@ -4034,11 +4452,14 @@ 1.1546 "a file <filename>hello.c</filename> that contains the classic <quote>hello, " 1.1547 "world</quote> program." 1.1548 msgstr "" 1.1549 +"在我们的<filename class=\"directory\">my-hello</filename>版本库中,有一个叫" 1.1550 +"<filename>hello.c</filename>的文件,它包含了经典的<quote>hello, world</quote>" 1.1551 +"程序。" 1.1552 1.1553 #. type: Content of: <book><chapter><sect1><para> 1.1554 #: ../en/ch02-tour-basic.xml:483 1.1555 msgid "Let's edit this file so that it prints a second line of output." 1.1556 -msgstr "" 1.1557 +msgstr "我们编辑这个文件,让它打印第二行输出。" 1.1558 1.1559 #. type: Content of: <book><chapter><sect1><para> 1.1560 #: ../en/ch02-tour-basic.xml:488 1.1561 @@ -4046,6 +4467,8 @@ 1.1562 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " 1.1563 "what Mercurial knows about the files in the repository." 1.1564 msgstr "" 1.1565 +"Mercurial的<command role=\"hg-cmd\">hg status</command>命令能告诉我们它对版本" 1.1566 +"库中的文件有多少了解。" 1.1567 1.1568 #. type: Content of: <book><chapter><sect1><para> 1.1569 #: ../en/ch02-tour-basic.xml:494 1.1570 @@ -4056,6 +4479,10 @@ 1.1571 "\">hg status</command> will not print any output for files that have not been " 1.1572 "modified." 1.1573 msgstr "" 1.1574 +"<command role=\"hg-cmd\">hg status</command>命令对有些文件没有输出信息,但是对" 1.1575 +"文件<filename>hello.c</filename>,有一行以<quote><literal>M</literal></quote>" 1.1576 +"为开头的输出。除非你明确告诉它,命令<command role=\"hg-cmd\">hg status</" 1.1577 +"command>不会输出那些没有修改的文件的信息。" 1.1578 1.1579 #. type: Content of: <book><chapter><sect1><para> 1.1580 #: ../en/ch02-tour-basic.xml:501 1.1581 @@ -4066,6 +4493,9 @@ 1.1582 "before we started, or that we had modified the file after we were done; it " 1.1583 "was able to figure this out itself." 1.1584 msgstr "" 1.1585 +"<quote><literal>M</literal></quote>表明Mercurial已经发现我们修改了" 1.1586 +"<filename>hello.c</filename>。我们不需要在改文件之前,或者在修改完之后" 1.1587 +"<emphasis>通知</emphasis>Mercurial;它自己能处理。" 1.1588 1.1589 #. type: Content of: <book><chapter><sect1><para> 1.1590 #: ../en/ch02-tour-basic.xml:509 1.1591 @@ -4075,6 +4505,9 @@ 1.1592 "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg " 1.1593 "diff</command> command." 1.1594 msgstr "" 1.1595 +"知道文件<filename>hello.c</filename>被修改了很有用,但有时候我们想知道做了" 1.1596 +"<emphasis>什么</emphasis>样的修改。这时,我们应该使用 <command role=\"hg-cmd" 1.1597 +"\">hg diff</command>命令。" 1.1598 1.1599 #. type: Content of: <book><chapter><sect1><title> 1.1600 #: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187 1.1601 @@ -4086,7 +4519,7 @@ 1.1602 msgid "" 1.1603 "Remember to take a look at <xref linkend=\"sec:mq:patch\"/> if you don't know " 1.1604 "how to read output above." 1.1605 -msgstr "" 1.1606 +msgstr "如果你不知道如何理解以上信息,请参考<xref linkend=\"sec:mq:patch\"/>。" 1.1607 1.1608 #. type: Content of: <book><chapter><sect1><title> 1.1609 #: ../en/ch02-tour-basic.xml:526 1.1610 @@ -4101,6 +4534,9 @@ 1.1611 "review our changes, until we're satisfied with what we've done and arrive at " 1.1612 "a natural stopping point where we want to record our work in a new changeset." 1.1613 msgstr "" 1.1614 +"我们可以修改文件,创建并测试我们的修改,使用命令<command role=\"hg-cmd\">hg " 1.1615 +"status</command>和<command role=\"hg-cmd\">hg diff</command>复审修改,直到我们" 1.1616 +"对修改满意,同时也达到了一个自然的停止点,然后用一个新的变更集记录我们的工作。" 1.1617 1.1618 #. type: Content of: <book><chapter><sect1><para> 1.1619 #: ../en/ch02-tour-basic.xml:535 1.1620 @@ -4109,6 +4545,8 @@ 1.1621 "changeset; we'll usually refer to this as <quote>making a commit</quote> or " 1.1622 "<quote>committing</quote>." 1.1623 msgstr "" 1.1624 +"我们用命令<command role=\"hg-cmd\">hg commit</command>创建新的变更集;我们通常" 1.1625 +"把这个称为<quote>做一次提交</quote>或者<quote>提交</quote>。" 1.1626 1.1627 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1628 #: ../en/ch02-tour-basic.xml:541 1.1629 @@ -4125,6 +4563,10 @@ 1.1630 "figure out a sensible username to commit the change with. It will attempt " 1.1631 "each of the following methods, in order:" 1.1632 msgstr "" 1.1633 +"当你准备第一次运行<command role=\"hg-cmd\">hg commit</command>命令时,不一定会" 1.1634 +"成功。对于你提交的每个变更,Mercurial都会记录你的名字和邮件地址,这样你和其他" 1.1635 +"人以后就能分开是谁做的哪个变更。Mercurial会自动尝试找出一个有意义的用户名来提" 1.1636 +"交。它会依次尝试以下方法:" 1.1637 1.1638 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.1639 #: ../en/ch02-tour-basic.xml:552 1.1640 @@ -4133,13 +4575,16 @@ 1.1641 "<command role=\"hg-cmd\">hg commit</command> command on the command line, " 1.1642 "followed by a username, this is always given the highest precedence." 1.1643 msgstr "" 1.1644 +"如果你给<command role=\"hg-cmd\">hg commit</command>命令加上了<option role=" 1.1645 +"\"hg-opt-commit\">-u</option>选项,接着是一个用户名,Mercurial会使用这个用户" 1.1646 +"名,这是最高的优先级。" 1.1647 1.1648 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.1649 #: ../en/ch02-tour-basic.xml:557 1.1650 msgid "" 1.1651 "If you have set the <envar>HGUSER</envar> environment variable, this is " 1.1652 "checked next." 1.1653 -msgstr "" 1.1654 +msgstr "接下来测试你是否设定了<envar>HGUSER</envar>环境变量。" 1.1655 1.1656 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.1657 #: ../en/ch02-tour-basic.xml:560 1.1658 @@ -4149,13 +4594,16 @@ 1.1659 "entry, that will be used next. To see what the contents of this file should " 1.1660 "look like, refer to <xref linkend=\"sec:tour-basic:username\"/> below." 1.1661 msgstr "" 1.1662 +"如果你在主目录创建了名字为<filename role=\"special\">.hgrc</filename>的文件," 1.1663 +"其中包括<envar role=\"rc-item-ui\">username</envar>条目,那就用它。如果想知道" 1.1664 +"这个文件的格式,请参考下面的<xref linkend=\"sec:tour-basic:username\"/>。" 1.1665 1.1666 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.1667 #: ../en/ch02-tour-basic.xml:568 1.1668 msgid "" 1.1669 "If you have set the <envar>EMAIL</envar> environment variable, this will be " 1.1670 "used next." 1.1671 -msgstr "" 1.1672 +msgstr "如果你设置了<envar>EMAIL</envar>环境变量,那就用它。" 1.1673 1.1674 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.1675 #: ../en/ch02-tour-basic.xml:571 1.1676 @@ -4165,6 +4613,8 @@ 1.1677 "results in a username that is not very useful, it will print a warning if it " 1.1678 "has to do this." 1.1679 msgstr "" 1.1680 +"Mercurial会查询你的系统,找出主机名和你的用户名,然后用他们创建一个用户名。这" 1.1681 +"样的用户名不怎么有用,所以在只能这样生成用户名的时候,它会打印出一条告警信息。" 1.1682 1.1683 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1684 #: ../en/ch02-tour-basic.xml:578 1.1685 @@ -4173,6 +4623,8 @@ 1.1686 "message. In this case, it will not let you commit until you set up a " 1.1687 "username." 1.1688 msgstr "" 1.1689 +"如果所有的这些机制都失败了,Mercurial会执行失败退出,打印出一条错误信息这种情" 1.1690 +"况下,只有你设定了用户名之后才能提交。" 1.1691 1.1692 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1693 #: ../en/ch02-tour-basic.xml:582 1.1694 @@ -4184,6 +4636,10 @@ 1.1695 "most robust way to set a username for yourself is by creating a <filename " 1.1696 "role=\"special\">.hgrc</filename> file; see below for details." 1.1697 msgstr "" 1.1698 +"当你需要覆盖Mercurial缺省的用户时,可以考虑<envar>HGUSER</envar>环境变量和" 1.1699 +"<command role=\"hg-cmd\">hg commit</command>命令的<option role=\"hg-opt-commit" 1.1700 +"\">-u</option>选项。正常使用的情况下,最简单实用的方法就是创建<filename role=" 1.1701 +"\"special\">.hgrc</filename>文件来设定用户名;步骤如下。" 1.1702 1.1703 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.1704 #: ../en/ch02-tour-basic.xml:591 1.1705 @@ -4199,11 +4655,14 @@ 1.1706 "settings. The initial contents of your <filename role=\"special\">.hgrc</" 1.1707 "filename> should look like this." 1.1708 msgstr "" 1.1709 +"设定用户名的时候,使用你最喜欢的编辑器在你的主目录创建一个名为<filename role=" 1.1710 +"\"special\">.hgrc</filename>的文件。Mercurial将会从这个文件中查找你的个人配置" 1.1711 +"信息。你的<filename role=\"special\">.hgrc</filename>开始的时候应该是这样子。" 1.1712 1.1713 #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><title> 1.1714 #: ../en/ch02-tour-basic.xml:602 1.1715 msgid "<quote>Home directory</quote> on Windows" 1.1716 -msgstr "" 1.1717 +msgstr "Windows上的<quote>主目录</quote>" 1.1718 1.1719 #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><para> 1.1720 #: ../en/ch02-tour-basic.xml:604 1.1721 @@ -4214,6 +4673,9 @@ 1.1722 "name of your home directory by opening a command prompt window and running " 1.1723 "the following command." 1.1724 msgstr "" 1.1725 +"英文版的Windows的主目录通常是<filename>C:\\Documents and Settings</filename>下" 1.1726 +"你的用户名的那个文件夹。如果要找出你的主目录的确切位置,可以打开一个命令行窗" 1.1727 +"口,运行以下命令。" 1.1728 1.1729 #. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><prompt> 1.1730 #: ../en/ch02-tour-basic.xml:612 1.1731 @@ -4236,6 +4698,10 @@ 1.1732 "file. Mercurial ignores empty lines and treats any text from " 1.1733 "<quote><literal>#</literal></quote> to the end of a line as a comment." 1.1734 msgstr "" 1.1735 +"配置文件中<quote><literal>[ui]</literal></quote>这行标识着一个<emphasis>字段</" 1.1736 +"emphasis>的开始,<quote><literal>username = ...</literal></quote>这行的意思是在" 1.1737 +"<literal>ui</literal>字段中设定项<literal>username</literal>的值。当出现一个新" 1.1738 +"的字段或者到达文件结尾的时候,当前的字段才结束。" 1.1739 1.1740 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.1741 #: ../en/ch02-tour-basic.xml:632 1.1742 @@ -4250,6 +4716,9 @@ 1.1743 "not be interpreted by Mercurial. The convention that most people follow is " 1.1744 "to use their name and email address, as in the example above." 1.1745 msgstr "" 1.1746 +"<literal>username</literal>配置项的值可以是你喜欢的任意文字,因为这项信息主要" 1.1747 +"是给其他用户阅读的,所以Mercurial不会去解释它。大多数人的习惯是采用用户名加上" 1.1748 +"邮件地址的格式,就像上面的例子一样。" 1.1749 1.1750 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 1.1751 #: ../en/ch02-tour-basic.xml:641 1.1752 @@ -4259,6 +4728,9 @@ 1.1753 "likelihood that you'll start receiving more junk email if you publish a " 1.1754 "Mercurial repository on the web." 1.1755 msgstr "" 1.1756 +"Mercurial内置的网络服务器会混淆邮件地址,让垃圾邮件发送者用的邮件地址抓取工具" 1.1757 +"很难获取你的邮件地址。当你把Mercurial的版本库在网路上发布的时候,这可以减小你" 1.1758 +"接收到垃圾邮件的风险。" 1.1759 1.1760 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1761 #: ../en/ch02-tour-basic.xml:650 1.1762 @@ -4274,6 +4746,10 @@ 1.1763 "for readers of what we did and why, and it will be printed by <command role=" 1.1764 "\"hg-cmd\">hg log</command> after we've finished committing." 1.1765 msgstr "" 1.1766 +"我们提交一个变更的时候,Mercurial会打开一个编辑器,让我们输入一些信息来描述这" 1.1767 +"个变更集做的更改。这就是<emphasis>提交日志</emphasis>。它会告诉读者我们改了什" 1.1768 +"么以及修改的原因,我们提交之后,命令<command role=\"hg-cmd\">hg log</command>" 1.1769 +"会输出这些信息。" 1.1770 1.1771 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1772 #: ../en/ch02-tour-basic.xml:662 1.1773 @@ -4282,6 +4758,8 @@ 1.1774 "drops us into will contain an empty line or two, followed by a number of " 1.1775 "lines starting with <quote><literal>HG:</literal></quote>." 1.1776 msgstr "" 1.1777 +"<command role=\"hg-cmd\">hg commit</command>命令打开的编辑器包括一两个空行,接" 1.1778 +"着是以<quote><literal>HG:</literal></quote>开始的行。" 1.1779 1.1780 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1781 #: ../en/ch02-tour-basic.xml:676 1.1782 @@ -4290,11 +4768,13 @@ 1.1783 "quote>; it uses them only to tell us which files it's recording changes to. " 1.1784 "Modifying or deleting these lines has no effect." 1.1785 msgstr "" 1.1786 +"Mercurial会忽略以<quote><literal>HG:</literal></quote>为开始的行;它仅仅用来告" 1.1787 +"诉我们这个变更集中包括哪些文件。修改或者删除这行没有任何影响。" 1.1788 1.1789 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1790 #: ../en/ch02-tour-basic.xml:682 1.1791 msgid "Writing a good commit message" 1.1792 -msgstr "写好提交日志" 1.1793 +msgstr "写高质量的提交日志" 1.1794 1.1795 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1796 #: ../en/ch02-tour-basic.xml:684 1.1797 @@ -4305,6 +4785,9 @@ 1.1798 "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary " 1.1799 "that is not readable." 1.1800 msgstr "" 1.1801 +"因为<command role=\"hg-cmd\">hg log</command>命令在缺省情况下仅会输出提交日志" 1.1802 +"的第一行,所以日志第一行最好是单独的一行。下面是一个日志的实例,它<emphasis>没" 1.1803 +"有</emphasis>遵守这个规则,因此摘要可读性很差。" 1.1804 1.1805 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1806 #: ../en/ch02-tour-basic.xml:697 1.1807 @@ -4314,6 +4797,8 @@ 1.1808 "about the contents of the commit message, though your project may have " 1.1809 "policies that dictate a certain kind of formatting." 1.1810 msgstr "" 1.1811 +"至于日志的其他部分的内容,没有严格的规定。Mercurial并不解释或者关心日志的内" 1.1812 +"容,虽然你的项目可能有某种格式的规定。" 1.1813 1.1814 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1815 #: ../en/ch02-tour-basic.xml:702 1.1816 @@ -4322,6 +4807,8 @@ 1.1817 "tell me something that I can't figure out with a quick glance at the output " 1.1818 "of <command role=\"hg-cmd\">hg log --patch</command>." 1.1819 msgstr "" 1.1820 +"我个人喜欢简短,而又信息量大的日志,它能告诉我一些我不能通过快速浏览<command " 1.1821 +"role=\"hg-cmd\">hg log --patch</command>的输出而得到的信息。" 1.1822 1.1823 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1824 #: ../en/ch02-tour-basic.xml:706 1.1825 @@ -4331,11 +4818,14 @@ 1.1826 "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 1.1827 "diff</command>." 1.1828 msgstr "" 1.1829 +"如果我们运行<command role=\"hg-cmd\">hg commit</command>命令的时候没有指定文" 1.1830 +"件,它会提交我们做的所有修改,与<command role=\"hg-cmd\">hg status</command>和" 1.1831 +"<command role=\"hg-cmd\">hg diff</command>这两个命令的输出一样。" 1.1832 1.1833 #. type: Content of: <book><chapter><sect1><sect2><note><title> 1.1834 #: ../en/ch02-tour-basic.xml:713 1.1835 msgid "A surprise for Subversion users" 1.1836 -msgstr "" 1.1837 +msgstr "Subversion用户的困惑" 1.1838 1.1839 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.1840 #: ../en/ch02-tour-basic.xml:715 1.1841 @@ -4346,6 +4836,10 @@ 1.1842 "the Subversion or CVS world, since you might expect it to operate only on the " 1.1843 "current directory that you happen to be visiting and its subdirectories." 1.1844 msgstr "" 1.1845 +"和所有的Mercurial命令一样,如果我们不明确指出<command role=\"hg-cmd\">hg " 1.1846 +"commit</command>命令要提交的文件名,它会在整个版本库的工作目录上执行操作。如果" 1.1847 +"你以前使用过CVS或者Subversion,那一定要注意,你可能仅仅希望提交当前目录与其子" 1.1848 +"目录的修改。" 1.1849 1.1850 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1851 #: ../en/ch02-tour-basic.xml:726 1.1852 @@ -4360,6 +4854,8 @@ 1.1853 "it's editing. This will cause nothing to happen to either the repository or " 1.1854 "the working directory." 1.1855 msgstr "" 1.1856 +"如果你在编辑日志的时候决定不再提交,只要退出编辑器同时不保存文件就可以了。这对" 1.1857 +"版本库和当前目录都没有任何影响。" 1.1858 1.1859 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1860 #: ../en/ch02-tour-basic.xml:736 1.1861 @@ -4374,6 +4870,9 @@ 1.1862 "produces output that is identical to <command role=\"hg-cmd\">hg log</" 1.1863 "command>, but it only displays the newest revision in the repository." 1.1864 msgstr "" 1.1865 +"提交完成后,我们就可以用<command role=\"hg-cmd\">hg tip</command>命令显示刚刚" 1.1866 +"创建的变更集。这个命令和<command role=\"hg-cmd\">hg log</command>的输出一样," 1.1867 +"但是只显示版本库中最新的版本。" 1.1868 1.1869 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1870 #: ../en/ch02-tour-basic.xml:746 1.1871 @@ -4381,6 +4880,8 @@ 1.1872 "We refer to the newest revision in the repository as the <emphasis>tip " 1.1873 "revision</emphasis>, or simply the <emphasis>tip</emphasis>." 1.1874 msgstr "" 1.1875 +"我们通常把版本库中最新的版本称为<emphasis>tip版本</emphasis>或者简称为" 1.1876 +"<emphasis>tip</emphasis>。" 1.1877 1.1878 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1879 #: ../en/ch02-tour-basic.xml:750 1.1880 @@ -4392,11 +4893,16 @@ 1.1881 "patch</quote>. The use of <option role=\"hg-opt-tip\">-p</option> to print " 1.1882 "patches is another example of the consistent naming we mentioned earlier." 1.1883 msgstr "" 1.1884 +"顺便提一下,<command role=\"hg-cmd\">hg tip</command>命令可以接受很多和" 1.1885 +"<command role=\"hg-cmd\">hg log</command>命令一样的选项。如<option role=\"hg-" 1.1886 +"opt-global\">-v</option>选项的意思是<quote>详细的</quote>。<option role=\"hg-" 1.1887 +"opt-tip\">-p</option>的意思是<quote>输出补丁</quote>。使用<option role=\"hg-" 1.1888 +"opt-tip\">-p</option>输出补丁也是我们前面提到的一致性的另外一个例子。" 1.1889 1.1890 #. type: Content of: <book><chapter><sect1><title> 1.1891 #: ../en/ch02-tour-basic.xml:762 1.1892 msgid "Sharing changes" 1.1893 -msgstr "共享修改" 1.1894 +msgstr "分享修改" 1.1895 1.1896 #. type: Content of: <book><chapter><sect1><para> 1.1897 #: ../en/ch02-tour-basic.xml:764 1.1898 @@ -4406,11 +4912,14 @@ 1.1899 "\"directory\">my-hello</filename> repository. Let's look at a few ways that " 1.1900 "we can propagate this change into other repositories." 1.1901 msgstr "" 1.1902 +"前面我们曾经提到Mercurial的版本库是自包含的。这意味着我们刚才创建的变更集仅仅" 1.1903 +"存在于我们的<filename class=\"directory\">my-hello</filename>版本库中。下面我" 1.1904 +"们会看到几种将变更传播到其他版本库的方法。" 1.1905 1.1906 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1907 #: ../en/ch02-tour-basic.xml:772 1.1908 msgid "Pulling changes from another repository" 1.1909 -msgstr "从其它版本库取得修改" 1.1910 +msgstr "从其它版本库取得变更" 1.1911 1.1912 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1913 #: ../en/ch02-tour-basic.xml:774 1.1914 @@ -4420,6 +4929,9 @@ 1.1915 "We'll call our temporary repository <filename class=\"directory\">hello-pull</" 1.1916 "filename>." 1.1917 msgstr "" 1.1918 +"首先,我们克隆原始版本的<filename class=\"directory\">hello</filename>版本库," 1.1919 +"它不包含我们刚刚提交的变更。我们将这个临时版本库称为<filename class=" 1.1920 +"\"directory\">hello</filename>。" 1.1921 1.1922 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1923 #: ../en/ch02-tour-basic.xml:782 1.1924 @@ -4433,6 +4945,12 @@ 1.1925 "<emphasis>would</emphasis> pull into the repository, without actually pulling " 1.1926 "the changes in." 1.1927 msgstr "" 1.1928 +"我们用<command role=\"hg-cmd\">hg pull</command>命令将变更从<filename class=" 1.1929 +"\"directory\">my-hello</filename>拖到<filename class=\"directory\">hello-" 1.1930 +"pull</filename>。然而,不管三七二十一将不了解的变更拖进版本库也实在是冒险。" 1.1931 +"Mercurial提供了<command role=\"hg-cmd\">hg incoming</command>命令,它会告诉我" 1.1932 +"们<command role=\"hg-cmd\">hg pull</command>将会把哪些变更拖进版本库,但不会真" 1.1933 +"正的执行。" 1.1934 1.1935 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1936 #: ../en/ch02-tour-basic.xml:795 1.1937 @@ -4441,6 +4959,8 @@ 1.1938 "role=\"hg-cmd\">hg pull</command> command, and optionally telling it which " 1.1939 "repository to pull from." 1.1940 msgstr "" 1.1941 +"运行<command role=\"hg-cmd\">hg pull</command>命令将变更拖进版本库非常简单,你" 1.1942 +"可以指定从那个版本库拖变更。" 1.1943 1.1944 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1945 #: ../en/ch02-tour-basic.xml:801 1.1946 @@ -4451,6 +4971,9 @@ 1.1947 "the working directory. There remains one step before we will see the changes " 1.1948 "that we just pulled appear in the working directory." 1.1949 msgstr "" 1.1950 +"从前后的<command role=\"hg-cmd\">hg tip</command>的输出可以看出,我们成功将变" 1.1951 +"更拖进了我们的版本库。然而,Mercurial将拖变更和更新当前工作目录分成两个操作。" 1.1952 +"在看到在当前目录中我们刚拖进的变更之前,还有一步要完成。" 1.1953 1.1954 #. type: Content of: <book><chapter><sect1><sect2><tip><title> 1.1955 #: ../en/ch02-tour-basic.xml:810 1.1956 @@ -4470,6 +4993,12 @@ 1.1957 "more changes than you saw when using <command role=\"hg-cmd\">hg incoming</" 1.1958 "command>." 1.1959 msgstr "" 1.1960 +"因为在运行<command role=\"hg-cmd\">hg incoming</command>和<command role=\"hg-" 1.1961 +"cmd\">hg pull</command>之间可能存在延时,你可能不能看到从其他版本库中的所有导入" 1.1962 +"进来的变更集。假如你正在通过网络从其他地方的版本库拖变更。当你查看<command " 1.1963 +"role=\"hg-cmd\">hg incoming</command>的输出,还没有拖这些变更的时候,其他人向" 1.1964 +"这个版本库提交了一些东西。这意味着你可能拖进来比你用<command role=\"hg-cmd" 1.1965 +"\">hg incoming</command>看见的多的变更。" 1.1966 1.1967 #. type: Content of: <book><chapter><sect1><sect2><tip><para> 1.1968 #: ../en/ch02-tour-basic.xml:824 1.1969 @@ -4479,6 +5008,9 @@ 1.1970 "a subset of changes, simply identify the change that you want to pull by its " 1.1971 "changeset ID, e.g. <command>hg pull -r7e95bb</command>." 1.1972 msgstr "" 1.1973 +"如果你仅希望将<command role=\"hg-cmd\">hg incoming</command>命令列出的变更拖进" 1.1974 +"来,或者由于其他原因希望得到变更的一个子集,那么你可以明确的指定变更集的ID,比" 1.1975 +"如<command>hg pull -r7e95bb</command>。" 1.1976 1.1977 #. type: Content of: <book><chapter><sect1><sect2><title> 1.1978 #: ../en/ch02-tour-basic.xml:834 1.1979 @@ -4496,6 +5028,12 @@ 1.1980 "not (by default) touch the working directory. Instead, we use the <command " 1.1981 "role=\"hg-cmd\">hg update</command> command to do this." 1.1982 msgstr "" 1.1983 +"现在我们已经对版本库和它的工作目录之间的关系有了粗略的了解。我们在<xref " 1.1984 +"linkend=\"sec:tour:pull\"/>一节运行的<command role=\"hg-cmd\">hg pull</" 1.1985 +"command>命令会将变更拖进版本库,但是如果我们检查一下的话,就会发现工作目录并没" 1.1986 +"有变化。这是因为<command role=\"hg-cmd\">hg pull</command>命令并不会影响工作目" 1.1987 +"录。实际上,我们需要<command role=\"hg-cmd\">hg update</command>命令来完成这个" 1.1988 +"工作。" 1.1989 1.1990 #. type: Content of: <book><chapter><sect1><sect2><para> 1.1991 #: ../en/ch02-tour-basic.xml:848 1.1992 @@ -4510,6 +5048,12 @@ 1.1993 "automatically updated the working directory to a new revision, you might not " 1.1994 "be terribly happy." 1.1995 msgstr "" 1.1996 +"<command role=\"hg-cmd\">hg pull</command>命令并不会自动更新工作目录,这看起来" 1.1997 +"有点奇怪。但实际上这样做是有原因的:你可以用<command role=\"hg-cmd\">hg " 1.1998 +"update</command>来更新工作目录,切换到版本库中的任意一个版本。假设你将工作目录" 1.1999 +"切换到一个老的版本&emdash;假如说是为了追踪一个bug&emdash;然后运行了<command " 1.2000 +"role=\"hg-cmd\">hg pull</command>命令。它自动将工作目录更新到新版本,这可能并" 1.2001 +"不是你想要的结果。" 1.2002 1.2003 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2004 #: ../en/ch02-tour-basic.xml:860 1.2005 @@ -4518,6 +5062,9 @@ 1.2006 "lets you combine the two by passing the <option role=\"hg-opt-pull\">-u</" 1.2007 "option> option to <command role=\"hg-cmd\">hg pull</command>." 1.2008 msgstr "" 1.2009 +"因为拖然后更新是个非常常用的操作顺序,Mercurial允许你将这两个操作组合在一起," 1.2010 +"只要给<command role=\"hg-cmd\">hg pull</command>命令加上<option role=\"hg-opt-" 1.2011 +"pull\">-u</option>选项就可以了。" 1.2012 1.2013 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2014 #: ../en/ch02-tour-basic.xml:865 1.2015 @@ -4527,6 +5074,10 @@ 1.2016 "opt-pull\">-u</option>, you can see that it printed a helpful reminder that " 1.2017 "we'd have to take an explicit step to update the working directory." 1.2018 msgstr "" 1.2019 +"如果回顾<xref linkend=\"sec:tour:pull\"/>一节,我们运行<command role=\"hg-cmd" 1.2020 +"\">hg pull</command>而又没有加上<option role=\"hg-opt-pull\">-u</option>选项" 1.2021 +"时,你可能会发现它输出了一条很有用的提示,我们还需要执行一个操作,才能更新工作" 1.2022 +"目录。" 1.2023 1.2024 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2025 #: ../en/ch02-tour-basic.xml:872 1.2026 @@ -4534,6 +5085,8 @@ 1.2027 "To find out what revision the working directory is at, use the <command role=" 1.2028 "\"hg-cmd\">hg parents</command> command." 1.2029 msgstr "" 1.2030 +"如果想知道工作目录的版本,可以使用<command role=\"hg-cmd\">hg parents</" 1.2031 +"command>命令。" 1.2032 1.2033 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2034 #: ../en/ch02-tour-basic.xml:878 1.2035 @@ -4545,6 +5098,10 @@ 1.2036 "a parent in just the same way; this is the changeset that the working " 1.2037 "directory currently contains." 1.2038 msgstr "" 1.2039 +"如果回顾<xref linkend=\"fig:tour-basic:history\"/>一节,你会看到箭头连着每个变" 1.2040 +"更集。箭头<emphasis>离开</emphasis>的节点是父版本,箭头<emphasis>指向</" 1.2041 +"emphasis>的是子版本。工作目录的父版本也是一样的方式;它是工作目录包含的变更" 1.2042 +"集。" 1.2043 1.2044 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2045 #: ../en/ch02-tour-basic.xml:887 1.2046 @@ -4553,6 +5110,8 @@ 1.2047 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " 1.2048 "command." 1.2049 msgstr "" 1.2050 +"如果需要将工作目录切换到一个特定版本,给<command role=\"hg-cmd\">hg update</" 1.2051 +"command>命令加上版本号或者变更集标识符就可以了。" 1.2052 1.2053 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2054 #: ../en/ch02-tour-basic.xml:893 1.2055 @@ -4561,6 +5120,9 @@ 1.2056 "command> will update to the tip revision, as shown by the second call to " 1.2057 "<command role=\"hg-cmd\">hg update</command> in the example above." 1.2058 msgstr "" 1.2059 +"如果没有明确指出版本,<command role=\"hg-cmd\">hg update</command>会更新到tip" 1.2060 +"版,就像上面例子<command role=\"hg-cmd\">hg update</command>第二次执行的结果一" 1.2061 +"样。 " 1.2062 1.2063 #. type: Content of: <book><chapter><sect1><sect2><title> 1.2064 #: ../en/ch02-tour-basic.xml:901 1.2065 @@ -4575,6 +5137,8 @@ 1.2066 "pull</command> above, we'll create a temporary repository to push our changes " 1.2067 "into." 1.2068 msgstr "" 1.2069 +"我们可以将变更从当前所在的版本库推到其他的版本库。与上面的<command role=\"hg-" 1.2070 +"cmd\">hgpull</command>例子一样,我们可以创建一个临时的版本库存放我们的变更。" 1.2071 1.2072 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2073 #: ../en/ch02-tour-basic.xml:911 1.2074 @@ -4582,13 +5146,15 @@ 1.2075 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " 1.2076 "changes would be pushed into another repository." 1.2077 msgstr "" 1.2078 +"<command role=\"hg-cmd\">hg outgoing</command>命令可以告诉我们那些变更将会被推" 1.2079 +"到另外一个版本库。" 1.2080 1.2081 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2082 #: ../en/ch02-tour-basic.xml:917 1.2083 msgid "" 1.2084 "And the <command role=\"hg-cmd\">hg push</command> command does the actual " 1.2085 "push." 1.2086 -msgstr "" 1.2087 +msgstr "而<command role=\"hg-cmd\">hg push</command>命令则会执行真正的推操作。" 1.2088 1.2089 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2090 #: ../en/ch02-tour-basic.xml:922 1.2091 @@ -4603,6 +5169,12 @@ 1.2092 "update its working directory while someone was working in it, their work " 1.2093 "would be disrupted." 1.2094 msgstr "" 1.2095 +"与<command role=\"hg-cmd\">hg pull</command>一样,在变更推送之后,<command " 1.2096 +"role=\"hg-cmd\">hg push</command>命令并不会更新版本库的工作目录,与<command " 1.2097 +"role=\"hg-cmd\">hg pull</command>命令不同,<command role=\"hg-cmd\">hg push</" 1.2098 +"command>并不提供<literal>-u</literal>选项来更新其他版本库的工作目录。这一不对" 1.2099 +"称是有目的的:我们推送的版本库可能是一个远端的服务器,并且很多人共享使用它。如" 1.2100 +"果在其他人正在工作的时候,我们更新了工作目录,那么他们的工作很可能被破坏。" 1.2101 1.2102 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2103 #: ../en/ch02-tour-basic.xml:934 1.2104 @@ -4610,6 +5182,8 @@ 1.2105 "What happens if we try to pull or push changes and the receiving repository " 1.2106 "already has those changes? Nothing too exciting." 1.2107 msgstr "" 1.2108 +"如果我们向一个已经包含了这些变更的版本库推送或者拉这些变更会发生什么事情呢?," 1.2109 +"什么也不会发生。" 1.2110 1.2111 #. type: Content of: <book><chapter><sect1><sect2><title> 1.2112 #: ../en/ch02-tour-basic.xml:942 1.2113 @@ -4626,6 +5200,10 @@ 1.2114 "default. The <command>hg incoming</command> and <command>hg outgoing</" 1.2115 "command> commands do so too." 1.2116 msgstr "" 1.2117 +"在我们克隆版本库的时候,Mercurial会在新的版本库的<filename>.hg/hgrc</filename>" 1.2118 +"文件中记录下版本库的位置,如果我们对<command>hg pull</command>没有指定来源,或" 1.2119 +"者对于<command>hg push</command> 没有指定目标,那么这些命令就会使用缺省位置。" 1.2120 +"<command>hg incoming</command>和<command>hg outgoing</command>命令也是如此。" 1.2121 1.2122 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2123 #: ../en/ch02-tour-basic.xml:952 1.2124 @@ -4633,6 +5211,8 @@ 1.2125 "If you open a repository's <filename>.hg/hgrc</filename> file in a text " 1.2126 "editor, you will see contents like the following." 1.2127 msgstr "" 1.2128 +"如果你用文本编辑器打开版本库的<filename>.hg/hgrc</filename>文件,你会看到如下" 1.2129 +"内容。" 1.2130 1.2131 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2132 #: ../en/ch02-tour-basic.xml:959 1.2133 @@ -4644,6 +5224,11 @@ 1.2134 "to the <literal>[paths]</literal> section of the <filename>.hg/hgrc</" 1.2135 "filename> file, as follows." 1.2136 msgstr "" 1.2137 +"有可能&emdash;并且常常很有用&emdash;<command>hg push</command>和<command>hg " 1.2138 +"outgoing</command>的缺省位置与<command>hg pull</command>和<command>hg " 1.2139 +"incoming</command>的位置不同。我们可以给<filename>.hg/hgrc</filename>文件的" 1.2140 +"<literal>[paths]</literal>节加上<literal>default-push</literal>条目,如下所" 1.2141 +"示。" 1.2142 1.2143 #. type: Content of: <book><chapter><sect1><sect2><title> 1.2144 #: ../en/ch02-tour-basic.xml:973 1.2145 @@ -4657,6 +5242,8 @@ 1.2146 "working with local repositories. Each works in exactly the same fashion over " 1.2147 "a network connection; simply pass in a URL instead of a local path." 1.2148 msgstr "" 1.2149 +"前面几节我们介绍的命令不仅可以用于本地版本库,还可以用于网络;只要传递的参数从" 1.2150 +"本地路径变成URL就可以了。" 1.2151 1.2152 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2153 #: ../en/ch02-tour-basic.xml:983 1.2154 @@ -4665,6 +5252,8 @@ 1.2155 "repository, but the repository is understandably not set up to let anonymous " 1.2156 "users push to it." 1.2157 msgstr "" 1.2158 +"在本例中,我们可以看到准备向远程版本库推送的变更,但是该版本库并不允许匿名用户" 1.2159 +"推送。" 1.2160 1.2161 #. type: Content of: <book><chapter><sect1><title> 1.2162 #: ../en/ch02-tour-basic.xml:993 1.2163 @@ -4678,6 +5267,8 @@ 1.2164 "exists. The <command>hg init</command> command creates a new, empty " 1.2165 "Mercurial repository." 1.2166 msgstr "" 1.2167 +"开始一个新项目和使用一个已有项目一样简单。<command>hg init</command>命令可以创" 1.2168 +"建一个新的,空的Mercurial版本库。 " 1.2169 1.2170 #. type: Content of: <book><chapter><sect1><para> 1.2171 #: ../en/ch02-tour-basic.xml:1001 1.2172 @@ -4685,6 +5276,7 @@ 1.2173 "This simply creates a repository named <filename>myproject</filename> in the " 1.2174 "current directory." 1.2175 msgstr "" 1.2176 +"在当前目录创建一个名为<filename>myproject</filename>的版本库就是这么简单。" 1.2177 1.2178 #. type: Content of: <book><chapter><sect1><para> 1.2179 #: ../en/ch02-tour-basic.xml:1006 1.2180 @@ -4692,6 +5284,8 @@ 1.2181 "We can tell that <filename>myproject</filename> is a Mercurial repository, " 1.2182 "because it contains a <filename>.hg</filename> directory." 1.2183 msgstr "" 1.2184 +"我们确信<filename>myproject</filename>是一个Mercurial版本库, 因为它包含了" 1.2185 +"<filename>.hg</filename>目录。" 1.2186 1.2187 #. type: Content of: <book><chapter><sect1><para> 1.2188 #: ../en/ch02-tour-basic.xml:1012 1.2189 @@ -4700,12 +5294,14 @@ 1.2190 "into place, and tell Mercurial to start tracking them using the <command>hg " 1.2191 "add</command> command." 1.2192 msgstr "" 1.2193 +"如果想将一些已有的文件加入版本库,我们可以将它们拷贝到目录下,然后执行" 1.2194 +"<command>hg add</command>命令,告诉Mercurial开始管理它们。" 1.2195 1.2196 #. type: Content of: <book><chapter><sect1><para> 1.2197 #: ../en/ch02-tour-basic.xml:1018 1.2198 msgid "" 1.2199 "Once we are satisfied that our project looks right, we commit our changes." 1.2200 -msgstr "" 1.2201 +msgstr "当对项目的状况满意时,我们就提交的变更。" 1.2202 1.2203 #. type: Content of: <book><chapter><sect1><para> 1.2204 #: ../en/ch02-tour-basic.xml:1023 1.2205 @@ -4715,6 +5311,8 @@ 1.2206 "use it on the smallest of projects that we might not have considered with a " 1.2207 "more complicated tool." 1.2208 msgstr "" 1.2209 +"只需要几分钟就可以在一个新的项目上使用Mercurial,这时它的魅力之一。现在版本控" 1.2210 +"制做起来非常方便,我们可以在很小的不需要复杂工具的项目上使用它。" 1.2211 1.2212 #. type: Content of: <book><chapter><title> 1.2213 #: ../en/ch03-tour-merge.xml:5 1.2214 @@ -15887,9 +16485,9 @@ 1.2215 "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-" 1.2216 "mq\">qpop</command> each operate on a single patch at a time by default, you " 1.2217 "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-" 1.2218 -"qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</" 1.2219 -"command> causes it to push all unapplied patches, while the <option role=\"hg-" 1.2220 -"ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" 1.2221 +"qpush-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpush</command> " 1.2222 +"causes it to push all unapplied patches, while the <option role=\"hg-ext-mq-" 1.2223 +"cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" 1.2224 "command> causes it to pop all applied patches. (For some more ways to push " 1.2225 "and pop many patches, see <xref linkend=\"sec:mq:perf\"/> below.)" 1.2226 msgstr "" 1.2227 @@ -15917,10 +16515,10 @@ 1.2228 "Commands that check the working directory all take an <quote>I know what I'm " 1.2229 "doing</quote> option, which is always named <option>-f</option>. The exact " 1.2230 "meaning of <option>-f</option> depends on the command. For example, <command " 1.2231 -"role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</" 1.2232 -"option></command> will incorporate any outstanding changes into the new patch " 1.2233 -"it creates, but <command role=\"hg-cmd\">hg qpop <option role=\"hg-ext-mq-cmd-" 1.2234 -"qpop-opt\">hg -f</option></command> will revert modifications to any files " 1.2235 +"role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">-f</option></" 1.2236 +"command> will incorporate any outstanding changes into the new patch it " 1.2237 +"creates, but <command role=\"hg-cmd\">hg qpop <option role=\"hg-ext-mq-cmd-" 1.2238 +"qpop-opt\">-f</option></command> will revert modifications to any files " 1.2239 "affected by the patch that it is popping. Be sure to read the documentation " 1.2240 "for a command's <option>-f</option> option before you use it!" 1.2241 msgstr "" 1.2242 @@ -16355,10 +16953,10 @@ 1.2243 #: ../en/ch12-mq.xml:809 1.2244 msgid "" 1.2245 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " 1.2246 -"<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " 1.2247 +"<option role=\"hg-ext-mq-cmd-qpush-opt\">-a</option></command> all 1,738 " 1.2248 "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role=" 1.2249 -"\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. " 1.2250 -"(On a newer laptop, the time to push all patches dropped to two minutes.) I " 1.2251 +"\"hg-ext-mq-cmd-qpop-opt\">-a</option></command> them all in 30 seconds. (On " 1.2252 +"a newer laptop, the time to push all patches dropped to two minutes.) I " 1.2253 "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest " 1.2254 "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds." 1.2255 msgstr "" 1.2256 @@ -16425,11 +17023,11 @@ 1.2257 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " 1.2258 "<command role=\"hg-cmd\">hg pull</command> changes into the underlying " 1.2259 "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-" 1.2260 -"ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches again. MQ will " 1.2261 -"stop pushing any time it runs across a patch that fails to apply during " 1.2262 -"conflicts, allowing you to fix your conflicts, <command role=\"hg-ext-mq" 1.2263 -"\">qrefresh</command> the affected patch, and continue pushing until you have " 1.2264 -"fixed your entire stack." 1.2265 +"ext-mq-cmd-qpop-opt\">-a</option></command> your patches again. MQ will stop " 1.2266 +"pushing any time it runs across a patch that fails to apply during conflicts, " 1.2267 +"allowing you to fix your conflicts, <command role=\"hg-ext-mq\">qrefresh</" 1.2268 +"command> the affected patch, and continue pushing until you have fixed your " 1.2269 +"entire stack." 1.2270 msgstr "" 1.2271 1.2272 #. type: Content of: <book><chapter><sect1><para> 1.2273 @@ -16789,11 +17387,11 @@ 1.2274 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " 1.2275 "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role=" 1.2276 "\"special\">series</filename> file, you will have to <command role=\"hg-cmd" 1.2277 -"\">hg qpop <option role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> " 1.2278 -"and then <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-qpush-" 1.2279 -"opt\">hg -a</option></command> in the underlying repository to see those " 1.2280 -"changes show up there. If you forget to do this, you can confuse MQ's idea " 1.2281 -"of which patches are applied." 1.2282 +"\">hg qpop <option role=\"hg-ext-mq-cmd-qpop-opt\">-a</option></command> and " 1.2283 +"then <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-qpush-opt" 1.2284 +"\">-a</option></command> in the underlying repository to see those changes " 1.2285 +"show up there. If you forget to do this, you can confuse MQ's idea of which " 1.2286 +"patches are applied." 1.2287 msgstr "" 1.2288 1.2289 #. type: Content of: <book><chapter><sect1><title> 1.2290 @@ -17718,7 +18316,7 @@ 1.2291 msgstr "" 1.2292 1.2293 # 1.2294 -#. &example.hg-interdiff; 1.2295 +#. &example.hg-interdiff; 1.2296 #. type: Content of: <book><chapter><sect1><sect2><para> 1.2297 #: ../en/ch13-mq-collab.xml:473 1.2298 msgid ""