hgbook
changeset 714:a13404f69f8d
Update po files with source xml files
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Thu May 21 14:29:39 2009 +0800 (2009-05-21) |
parents | f87515a4a3cf |
children | c03f7ff6069c |
files | po/zh.po |
line diff
1.1 --- a/po/zh.po Thu May 21 14:26:31 2009 +0800 1.2 +++ b/po/zh.po Thu May 21 14:29:39 2009 +0800 1.3 @@ -41,7 +41,7 @@ 1.4 msgid "" 1.5 msgstr "" 1.6 "Project-Id-Version: hgbook 1.2\n" 1.7 -"POT-Creation-Date: 2009-04-18 10:05+0800\n" 1.8 +"POT-Creation-Date: 2009-05-21 14:26+0800\n" 1.9 "PO-Revision-Date: 2009-04-18 11:50+0800\n" 1.10 "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" 1.11 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 1.12 @@ -53,32 +53,32 @@ 1.13 "X-Poedit-SourceCharset: utf-8\n" 1.14 1.15 #. type: Content of: <book><title> 1.16 -#: ../en/00book.xml:41 1.17 +#: ../en/00book.xml:42 1.18 msgid "Mercurial: The Definitive Guide" 1.19 msgstr "Mercurial 权威指南" 1.20 1.21 #. type: Content of: <book><subtitle> 1.22 -#: ../en/00book.xml:46 1.23 +#: ../en/00book.xml:47 1.24 msgid "Compiled from $rev_id$" 1.25 msgstr "编译自 $rev_id$" 1.26 1.27 #. type: Content of: <book><bookinfo> 1.28 -#: ../en/00book.xml:48 1.29 +#: ../en/00book.xml:49 1.30 msgid "<edition>1</edition> <isbn>9780596800673</isbn>" 1.31 msgstr "<edition>1</edition> <isbn>9780596800673</isbn>" 1.32 1.33 #. type: Content of: <book><bookinfo><authorgroup><author><firstname> 1.34 -#: ../en/00book.xml:52 1.35 +#: ../en/00book.xml:53 1.36 msgid "Bryan" 1.37 msgstr "Bryan" 1.38 1.39 #. type: Content of: <book><bookinfo><authorgroup><author><surname> 1.40 -#: ../en/00book.xml:53 1.41 +#: ../en/00book.xml:54 1.42 msgid "O'Sullivan" 1.43 msgstr "O'Sullivan" 1.44 1.45 #. type: Content of: <book><bookinfo> 1.46 -#: ../en/00book.xml:57 1.47 +#: ../en/00book.xml:58 1.48 msgid "" 1.49 "<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> " 1.50 "<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</" 1.51 @@ -89,6 +89,833 @@ 1.52 "year> <holder>Bryan O'Sullivan</holder> </copyright>" 1.53 1.54 #. type: Content of: <book><appendix><title> 1.55 +#: ../en/appA-svn.xml:5 1.56 +#, fuzzy 1.57 +msgid "Migrating to Mercurial" 1.58 +msgstr "使用 MQ 管理修改" 1.59 + 1.60 +#. type: Content of: <book><appendix><para> 1.61 +#: ../en/appA-svn.xml:7 1.62 +msgid "" 1.63 +"A common way to test the waters with a new revision control tool is to " 1.64 +"experiment with switching an existing project, rather than starting a new " 1.65 +"project from scratch." 1.66 +msgstr "" 1.67 + 1.68 +#. type: Content of: <book><appendix><para> 1.69 +#: ../en/appA-svn.xml:11 1.70 +msgid "" 1.71 +"In this appendix, we discuss how to import a project's history into " 1.72 +"Mercurial, and what to look out for if you are used to a different revision " 1.73 +"control system." 1.74 +msgstr "" 1.75 + 1.76 +#. type: Content of: <book><appendix><sect1><title> 1.77 +#: ../en/appA-svn.xml:16 1.78 +msgid "Importing history from another system" 1.79 +msgstr "" 1.80 + 1.81 +#. type: Content of: <book><appendix><sect1><para> 1.82 +#: ../en/appA-svn.xml:18 1.83 +msgid "" 1.84 +"Mercurial ships with an extension named <literal>convert</literal>, which can " 1.85 +"import project history from most popular revision control systems. At the " 1.86 +"time this book was written, it could import history from the following " 1.87 +"systems:" 1.88 +msgstr "" 1.89 + 1.90 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 1.91 +#: ../en/appA-svn.xml:25 ../en/appA-svn.xml:369 ../en/ch01-intro.xml:416 1.92 +#: ../en/ch01-intro.xml:627 1.93 +msgid "Subversion" 1.94 +msgstr "" 1.95 + 1.96 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.97 +#: ../en/appA-svn.xml:28 ../en/ch01-intro.xml:532 ../en/ch01-intro.xml:628 1.98 +msgid "CVS" 1.99 +msgstr "CVS" 1.100 + 1.101 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.102 +#: ../en/appA-svn.xml:31 1.103 +#, fuzzy 1.104 +msgid "git" 1.105 +msgstr "Git" 1.106 + 1.107 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.108 +#: ../en/appA-svn.xml:34 ../en/ch01-intro.xml:630 1.109 +msgid "Darcs" 1.110 +msgstr "Darcs" 1.111 + 1.112 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.113 +#: ../en/appA-svn.xml:37 1.114 +msgid "Bazaar" 1.115 +msgstr "" 1.116 + 1.117 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.118 +#: ../en/appA-svn.xml:40 1.119 +msgid "Monotone" 1.120 +msgstr "" 1.121 + 1.122 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 1.123 +#: ../en/appA-svn.xml:43 1.124 +msgid "GNU Arch" 1.125 +msgstr "" 1.126 + 1.127 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 1.128 +#: ../en/appA-svn.xml:46 ../en/appA-svn.xml:370 1.129 +#, fuzzy 1.130 +msgid "Mercurial" 1.131 +msgstr "为什么选择 Mercurial?" 1.132 + 1.133 +#. type: Content of: <book><appendix><sect1><para> 1.134 +#: ../en/appA-svn.xml:50 1.135 +msgid "" 1.136 +"(To see why Mercurial itself is supported as a source, see <xref linkend=" 1.137 +"\"svn.filemap\"/>.)" 1.138 +msgstr "" 1.139 + 1.140 +#. type: Content of: <book><appendix><sect1><para> 1.141 +#: ../en/appA-svn.xml:53 1.142 +msgid "" 1.143 +"You can enable the extension in the usual way, by editing your <filename>~/." 1.144 +"hgrc</filename> file." 1.145 +msgstr "" 1.146 + 1.147 +#. type: Content of: <book><appendix><sect1><para> 1.148 +#: ../en/appA-svn.xml:59 1.149 +msgid "" 1.150 +"This will make a <command>hg convert</command> command available. The " 1.151 +"command is easy to use. For instance, this command will import the " 1.152 +"Subversion history for the Nose unit testing framework into Mercurial." 1.153 +msgstr "" 1.154 + 1.155 +#. type: Content of: <book><appendix><sect1><screen><prompt> 1.156 +#: ../en/appA-svn.xml:64 ../en/appA-svn.xml:207 ../en/appA-svn.xml:212 1.157 +#: ../en/appA-svn.xml:213 ../en/appA-svn.xml:218 ../en/appA-svn.xml:224 1.158 +#: ../en/appA-svn.xml:229 ../en/appA-svn.xml:532 1.159 +msgid "$" 1.160 +msgstr "" 1.161 + 1.162 +#. type: Content of: <book><appendix><sect1><screen><userinput> 1.163 +#: ../en/appA-svn.xml:64 1.164 +msgid "hg convert http://python-nose.googlecode.com/svn/trunk" 1.165 +msgstr "" 1.166 + 1.167 +#. type: Content of: <book><appendix><sect1><para> 1.168 +#: ../en/appA-svn.xml:66 1.169 +msgid "" 1.170 +"The <literal>convert</literal> extension operates incrementally. In other " 1.171 +"words, after you have run <command>hg convert</command> once, running it " 1.172 +"again will import any new revisions committed after the first run began. " 1.173 +"Incremental conversion will only work if you run <command>hg convert</" 1.174 +"command> in the same Mercurial repository that you originally used, because " 1.175 +"the <literal>convert</literal> extension saves some private metadata in a non-" 1.176 +"revision-controlled file named <filename>.hg/shamap</filename> inside the " 1.177 +"target repository." 1.178 +msgstr "" 1.179 + 1.180 +#. type: Content of: <book><appendix><sect1><para> 1.181 +#: ../en/appA-svn.xml:78 1.182 +msgid "" 1.183 +"When you want to start making changes using Mercurial, it's best to clone the " 1.184 +"tree in which you are doing your conversions, and leave the original tree for " 1.185 +"future incremental conversions. This is the safest way to let you pull and " 1.186 +"merge future commits from the source revision control system into your newly " 1.187 +"active Mercurial project." 1.188 +msgstr "" 1.189 + 1.190 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.191 +#: ../en/appA-svn.xml:86 1.192 +#, fuzzy 1.193 +msgid "Converting multiple branches" 1.194 +msgstr "使用多个分支工作" 1.195 + 1.196 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.197 +#: ../en/appA-svn.xml:88 1.198 +msgid "" 1.199 +"The <command>hg convert</command> command given above converts only the " 1.200 +"history of the <literal>trunk</literal> branch of the Subversion repository. " 1.201 +"If we instead use the URL <literal>http://python-nose.googlecode.com/svn</" 1.202 +"literal>, Mercurial will automatically detect the <literal>trunk</literal>, " 1.203 +"<literal>tags</literal> and <literal>branches</literal> layout that " 1.204 +"Subversion projects usually use, and it will import each as a separate " 1.205 +"Mercurial branch." 1.206 +msgstr "" 1.207 + 1.208 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.209 +#: ../en/appA-svn.xml:98 1.210 +msgid "" 1.211 +"By default, each Subversion branch imported into Mercurial is given a branch " 1.212 +"name. After the conversion completes, you can get a list of the active " 1.213 +"branch names in the Mercurial repository using <command>hg branches -a</" 1.214 +"command>. If you would prefer to import the Subversion branches without " 1.215 +"names, pass the <option>--config convert.hg.usebranchnames=false</option> " 1.216 +"option to <command>hg convert</command>." 1.217 +msgstr "" 1.218 + 1.219 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.220 +#: ../en/appA-svn.xml:107 1.221 +msgid "" 1.222 +"Once you have converted your tree, if you want to follow the usual Mercurial " 1.223 +"practice of working in a tree that contains a single branch, you can clone " 1.224 +"that single branch using <command>hg clone -r mybranchname</command>." 1.225 +msgstr "" 1.226 + 1.227 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.228 +#: ../en/appA-svn.xml:114 1.229 +#, fuzzy 1.230 +msgid "Mapping user names" 1.231 +msgstr "选择用户名称" 1.232 + 1.233 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.234 +#: ../en/appA-svn.xml:116 1.235 +msgid "" 1.236 +"Some revision control tools save only short usernames with commits, and these " 1.237 +"can be difficult to interpret. The norm with Mercurial is to save a " 1.238 +"committer's name and email address, which is much more useful for talking to " 1.239 +"them after the fact." 1.240 +msgstr "" 1.241 + 1.242 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.243 +#: ../en/appA-svn.xml:122 1.244 +msgid "" 1.245 +"If you are converting a tree from a revision control system that uses short " 1.246 +"names, you can map those names to longer equivalents by passing a <option>--" 1.247 +"authors</option> option to <command>hg convert</command>. This option " 1.248 +"accepts a file name that should contain entries of the following form." 1.249 +msgstr "" 1.250 + 1.251 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.252 +#: ../en/appA-svn.xml:132 1.253 +msgid "" 1.254 +"Whenever <literal>convert</literal> encounters a commit with the username " 1.255 +"<literal>arist</literal> in the source repository, it will use the name " 1.256 +"<literal>Aristotle <aristotle@phil.example.gr></literal> in the " 1.257 +"converted Mercurial revision. If no match is found for a name, it is used " 1.258 +"verbatim." 1.259 +msgstr "" 1.260 + 1.261 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.262 +#: ../en/appA-svn.xml:141 1.263 +msgid "Tidying up the tree" 1.264 +msgstr "" 1.265 + 1.266 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.267 +#: ../en/appA-svn.xml:143 1.268 +msgid "" 1.269 +"Not all projects have pristine history. There may be a directory that should " 1.270 +"never have been checked in, a file that is too big, or a whole hierarchy that " 1.271 +"needs to be refactored." 1.272 +msgstr "" 1.273 + 1.274 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.275 +#: ../en/appA-svn.xml:148 1.276 +msgid "" 1.277 +"The <literal>convert</literal> extension supports the idea of a <quote>file " 1.278 +"map</quote> that can reorganize the files and directories in a project as it " 1.279 +"imports the project's history. This is useful not only when importing " 1.280 +"history from other revision control systems, but also to prune or refactor a " 1.281 +"Mercurial tree." 1.282 +msgstr "" 1.283 + 1.284 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.285 +#: ../en/appA-svn.xml:155 1.286 +msgid "" 1.287 +"To specify a file map, use the <option>--filemap</option> option and supply a " 1.288 +"file name. A file map contains lines of the following forms." 1.289 +msgstr "" 1.290 + 1.291 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.292 +#: ../en/appA-svn.xml:169 1.293 +msgid "" 1.294 +"The <literal>include</literal> directive causes a file, or all files under a " 1.295 +"directory, to be included in the destination repository. This also excludes " 1.296 +"all other files and dirs not explicitely included. The <literal>exclude</" 1.297 +"literal> directive causes files or directories to be omitted, and others not " 1.298 +"explicitly mentioned to be included." 1.299 +msgstr "" 1.300 + 1.301 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.302 +#: ../en/appA-svn.xml:176 1.303 +msgid "" 1.304 +"To move a file or directory from one location to another, use the " 1.305 +"<literal>rename</literal> directive. If you need to move a file or directory " 1.306 +"from a subdirectory into the root of the repository, use <literal>.</literal> " 1.307 +"as the second argument to the <literal>rename</literal> directive." 1.308 +msgstr "" 1.309 + 1.310 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.311 +#: ../en/appA-svn.xml:184 1.312 +msgid "Improving Subversion conversion performance" 1.313 +msgstr "" 1.314 + 1.315 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.316 +#: ../en/appA-svn.xml:186 1.317 +msgid "" 1.318 +"You will often need several attempts before you hit the perfect combination " 1.319 +"of user map, file map, and other conversion parameters. Converting a " 1.320 +"Subversion repository over an access protocol like <literal>ssh</literal> or " 1.321 +"<literal>http</literal> can proceed thousands of times more slowly than " 1.322 +"Mercurial is capable of actually operating, due to network delays. This can " 1.323 +"make tuning that perfect conversion recipe very painful." 1.324 +msgstr "" 1.325 + 1.326 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.327 +#: ../en/appA-svn.xml:195 1.328 +msgid "" 1.329 +"The <ulink url=\"http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt" 1.330 +"\"><command>svnsync</command></ulink> command can greatly speed up the " 1.331 +"conversion of a Subversion repository. It is a read-only mirroring program " 1.332 +"for Subversion repositories. The idea is that you create a local mirror of " 1.333 +"your Subversion tree, then convert the mirror into a Mercurial repository." 1.334 +msgstr "" 1.335 + 1.336 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.337 +#: ../en/appA-svn.xml:203 1.338 +msgid "" 1.339 +"Suppose we want to convert the Subversion repository for the popular " 1.340 +"Memcached project into a Mercurial tree. First, we create a local Subversion " 1.341 +"repository." 1.342 +msgstr "" 1.343 + 1.344 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.345 +#: ../en/appA-svn.xml:207 1.346 +msgid "svnadmin create memcached-mirror" 1.347 +msgstr "" 1.348 + 1.349 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.350 +#: ../en/appA-svn.xml:209 1.351 +msgid "Next, we set up a Subversion hook that <command>svnsync</command> needs." 1.352 +msgstr "" 1.353 + 1.354 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.355 +#: ../en/appA-svn.xml:212 1.356 +msgid "echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change" 1.357 +msgstr "" 1.358 + 1.359 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.360 +#: ../en/appA-svn.xml:213 1.361 +msgid "chmod +x memcached-mirror/hooks/pre-revprop-change" 1.362 +msgstr "" 1.363 + 1.364 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.365 +#: ../en/appA-svn.xml:215 1.366 +msgid "We then initialize <command>svnsync</command> in this repository." 1.367 +msgstr "" 1.368 + 1.369 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.370 +#: ../en/appA-svn.xml:218 1.371 +msgid "" 1.372 +"svnsync --init file://`pwd`/memcached-mirror \\ http://code.sixapart.com/svn/" 1.373 +"memcached" 1.374 +msgstr "" 1.375 + 1.376 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.377 +#: ../en/appA-svn.xml:221 1.378 +msgid "" 1.379 +"Our next step is to begin the <command>svnsync</command> mirroring process." 1.380 +msgstr "" 1.381 + 1.382 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.383 +#: ../en/appA-svn.xml:224 1.384 +msgid "svnsync sync file://`pwd`/memcached-mirror" 1.385 +msgstr "" 1.386 + 1.387 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.388 +#: ../en/appA-svn.xml:226 1.389 +msgid "" 1.390 +"Finally, we import the history of our local Subversion mirror into Mercurial." 1.391 +msgstr "" 1.392 + 1.393 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 1.394 +#: ../en/appA-svn.xml:229 1.395 +msgid "hg convert memcached-mirror" 1.396 +msgstr "" 1.397 + 1.398 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.399 +#: ../en/appA-svn.xml:231 1.400 +msgid "" 1.401 +"We can use this process incrementally if the Subversion repository is still " 1.402 +"in use. We run <command>svnsync</command> to pull new changes into our " 1.403 +"mirror, then <command>hg convert</command> to import them into our Mercurial " 1.404 +"tree." 1.405 +msgstr "" 1.406 + 1.407 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.408 +#: ../en/appA-svn.xml:237 1.409 +msgid "" 1.410 +"There are two advantages to doing a two-stage import with <command>svnsync</" 1.411 +"command>. The first is that it uses more efficient Subversion network " 1.412 +"syncing code than <command>hg convert</command>, so it transfers less data " 1.413 +"over the network. The second is that the import from a local Subversion tree " 1.414 +"is so fast that you can tweak your conversion setup repeatedly without having " 1.415 +"to sit through a painfully slow network-based conversion process each time." 1.416 +msgstr "" 1.417 + 1.418 +#. type: Content of: <book><appendix><sect1><title> 1.419 +#: ../en/appA-svn.xml:249 1.420 +msgid "Migrating from Subversion" 1.421 +msgstr "" 1.422 + 1.423 +#. type: Content of: <book><appendix><sect1><para> 1.424 +#: ../en/appA-svn.xml:251 1.425 +msgid "" 1.426 +"Subversion is currently the most popular open source revision control system. " 1.427 +"Although there are many differences between Mercurial and Subversion, making " 1.428 +"the transition from Subversion to Mercurial is not particularly difficult. " 1.429 +"The two have similar command sets and generally uniform interfaces." 1.430 +msgstr "" 1.431 + 1.432 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.433 +#: ../en/appA-svn.xml:259 1.434 +msgid "Philosophical differences" 1.435 +msgstr "" 1.436 + 1.437 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.438 +#: ../en/appA-svn.xml:261 1.439 +msgid "" 1.440 +"The fundamental difference between Subversion and Mercurial is of course that " 1.441 +"Subversion is centralized, while Mercurial is distributed. Since Mercurial " 1.442 +"stores all of a project's history on your local drive, it only needs to " 1.443 +"perform a network access when you want to explicitly communicate with another " 1.444 +"repository. In contrast, Subversion stores very little information locally, " 1.445 +"and the client must thus contact its server for many common operations." 1.446 +msgstr "" 1.447 + 1.448 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.449 +#: ../en/appA-svn.xml:270 1.450 +msgid "" 1.451 +"Subversion more or less gets away without a well-defined notion of a branch: " 1.452 +"which portion of a server's namespace qualifies as a branch is a matter of " 1.453 +"convention, with the software providing no enforcement. Mercurial treats a " 1.454 +"repository as the unit of branch management." 1.455 +msgstr "" 1.456 + 1.457 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 1.458 +#: ../en/appA-svn.xml:277 1.459 +msgid "Scope of commands" 1.460 +msgstr "" 1.461 + 1.462 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.463 +#: ../en/appA-svn.xml:279 1.464 +msgid "" 1.465 +"Since Subversion doesn't know what parts of its namespace are really " 1.466 +"branches, it treats most commands as requests to operate at and below " 1.467 +"whatever directory you are currently visiting. For instance, if you run " 1.468 +"<command>svn log</command>, you'll get the history of whatever part of the " 1.469 +"tree you're looking at, not the tree as a whole." 1.470 +msgstr "" 1.471 + 1.472 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.473 +#: ../en/appA-svn.xml:286 1.474 +msgid "" 1.475 +"Mercurial's commands behave differently, by defaulting to operating over an " 1.476 +"entire repository. Run <command>hg log</command> and it will tell you the " 1.477 +"history of the entire tree, no matter what part of the working directory " 1.478 +"you're visiting at the time. If you want the history of just a particular " 1.479 +"file or directory, simply supply it by name, e.g. <command>hg log src</" 1.480 +"command>." 1.481 +msgstr "" 1.482 + 1.483 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.484 +#: ../en/appA-svn.xml:294 1.485 +msgid "" 1.486 +"From my own experience, this difference in default behaviors is probably the " 1.487 +"most likely to trip you up if you have to switch back and forth frequently " 1.488 +"between the two tools." 1.489 +msgstr "" 1.490 + 1.491 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 1.492 +#: ../en/appA-svn.xml:301 1.493 +msgid "Multi-user operation and safety" 1.494 +msgstr "" 1.495 + 1.496 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.497 +#: ../en/appA-svn.xml:303 1.498 +msgid "" 1.499 +"With Subversion, it is normal (though slightly frowned upon) for multiple " 1.500 +"people to collaborate in a single branch. If Alice and Bob are working " 1.501 +"together, and Alice commits some changes to their shared branch, Bob must " 1.502 +"update his client's view of the branch before he can commit. Since at this " 1.503 +"time he has no permanent record of the changes he has made, he can corrupt or " 1.504 +"lose his modifications during and after his update." 1.505 +msgstr "" 1.506 + 1.507 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.508 +#: ../en/appA-svn.xml:312 1.509 +msgid "" 1.510 +"Mercurial encourages a commit-then-merge model instead. Bob commits his " 1.511 +"changes locally before pulling changes from, or pushing them to, the server " 1.512 +"that he shares with Alice. If Alice pushed her changes before Bob tries to " 1.513 +"push his, he will not be able to push his changes until he pulls hers, merges " 1.514 +"with them, and commits the result of the merge. If he makes a mistake during " 1.515 +"the merge, he still has the option of reverting to the commit that recorded " 1.516 +"his changes." 1.517 +msgstr "" 1.518 + 1.519 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.520 +#: ../en/appA-svn.xml:321 1.521 +msgid "" 1.522 +"It is worth emphasizing that these are the common ways of working with these " 1.523 +"tools. Subversion supports a safer work-in-your-own-branch model, but it is " 1.524 +"cumbersome enough in practice to not be widely used. Mercurial can support " 1.525 +"the less safe mode of allowing changes to be pulled in and merged on top of " 1.526 +"uncommitted edits, but this is considered highly unusual." 1.527 +msgstr "" 1.528 + 1.529 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 1.530 +#: ../en/appA-svn.xml:331 1.531 +msgid "Published vs local changes" 1.532 +msgstr "" 1.533 + 1.534 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.535 +#: ../en/appA-svn.xml:333 1.536 +msgid "" 1.537 +"A Subversion <command>svn commit</command> command immediately publishes " 1.538 +"changes to a server, where they can be seen by everyone who has read access." 1.539 +msgstr "" 1.540 + 1.541 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.542 +#: ../en/appA-svn.xml:337 1.543 +msgid "" 1.544 +"With Mercurial, commits are always local, and must be published via a " 1.545 +"<command>hg push</command> command afterwards." 1.546 +msgstr "" 1.547 + 1.548 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.549 +#: ../en/appA-svn.xml:341 1.550 +msgid "" 1.551 +"Each approach has its advantages and disadvantages. The Subversion model " 1.552 +"means that changes are published, and hence reviewable and usable, " 1.553 +"immediately. On the other hand, this means that a user must have commit " 1.554 +"access to a repository in order to use the software in a normal way, and " 1.555 +"commit access is not lightly given out by most open source projects." 1.556 +msgstr "" 1.557 + 1.558 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 1.559 +#: ../en/appA-svn.xml:349 1.560 +msgid "" 1.561 +"The Mercurial approach allows anyone who can clone a repository to commit " 1.562 +"changes without the need for someone else's permission, and they can then " 1.563 +"publish their changes and continue to participate however they see fit. The " 1.564 +"distinction between committing and pushing does open up the possibility of " 1.565 +"someone committing changes to their laptop and walking away for a few days " 1.566 +"having forgotten to push them, which in rare cases might leave collaborators " 1.567 +"temporarily stuck." 1.568 +msgstr "" 1.569 + 1.570 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.571 +#: ../en/appA-svn.xml:362 1.572 +#, fuzzy 1.573 +msgid "Quick reference" 1.574 +msgstr "钩子参考" 1.575 + 1.576 +#. type: Content of: <book><appendix><sect1><sect2><table><title> 1.577 +#: ../en/appA-svn.xml:365 1.578 +msgid "Subversion commands and Mercurial equivalents" 1.579 +msgstr "" 1.580 + 1.581 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 1.582 +#: ../en/appA-svn.xml:371 1.583 +msgid "Notes" 1.584 +msgstr "" 1.585 + 1.586 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.587 +#: ../en/appA-svn.xml:376 1.588 +msgid "<command>svn add</command>" 1.589 +msgstr "" 1.590 + 1.591 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.592 +#: ../en/appA-svn.xml:377 1.593 +msgid "<command>hg add</command>" 1.594 +msgstr "" 1.595 + 1.596 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.597 +#: ../en/appA-svn.xml:381 1.598 +msgid "<command>svn blame</command>" 1.599 +msgstr "" 1.600 + 1.601 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.602 +#: ../en/appA-svn.xml:382 1.603 +msgid "<command>hg annotate</command>" 1.604 +msgstr "" 1.605 + 1.606 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.607 +#: ../en/appA-svn.xml:386 1.608 +msgid "<command>svn cat</command>" 1.609 +msgstr "" 1.610 + 1.611 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.612 +#: ../en/appA-svn.xml:387 1.613 +msgid "<command>hg cat</command>" 1.614 +msgstr "" 1.615 + 1.616 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.617 +#: ../en/appA-svn.xml:391 1.618 +msgid "<command>svn checkout</command>" 1.619 +msgstr "" 1.620 + 1.621 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.622 +#: ../en/appA-svn.xml:392 ../en/appA-svn.xml:409 1.623 +msgid "<command>hg clone</command>" 1.624 +msgstr "" 1.625 + 1.626 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.627 +#: ../en/appA-svn.xml:396 1.628 +msgid "<command>svn cleanup</command>" 1.629 +msgstr "" 1.630 + 1.631 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.632 +#: ../en/appA-svn.xml:397 ../en/appA-svn.xml:472 1.633 +msgid "n/a" 1.634 +msgstr "" 1.635 + 1.636 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.637 +#: ../en/appA-svn.xml:398 1.638 +msgid "No cleanup needed" 1.639 +msgstr "" 1.640 + 1.641 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.642 +#: ../en/appA-svn.xml:401 1.643 +msgid "<command>svn commit</command>" 1.644 +msgstr "" 1.645 + 1.646 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.647 +#: ../en/appA-svn.xml:402 1.648 +msgid "<command>hg commit</command>; <command>hg push</command>" 1.649 +msgstr "" 1.650 + 1.651 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.652 +#: ../en/appA-svn.xml:404 1.653 +msgid "<command>hg push</command> publishes after commit" 1.654 +msgstr "" 1.655 + 1.656 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.657 +#: ../en/appA-svn.xml:408 ../en/appA-svn.xml:413 1.658 +msgid "<command>svn copy</command>" 1.659 +msgstr "" 1.660 + 1.661 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.662 +#: ../en/appA-svn.xml:410 1.663 +#, fuzzy 1.664 +msgid "To create a new branch" 1.665 +msgstr "创建新补丁" 1.666 + 1.667 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.668 +#: ../en/appA-svn.xml:414 1.669 +msgid "<command>hg copy</command>" 1.670 +msgstr "" 1.671 + 1.672 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.673 +#: ../en/appA-svn.xml:415 1.674 +#, fuzzy 1.675 +msgid "To copy files or directories" 1.676 +msgstr "Mercurial 只跟踪文件,不跟踪目录" 1.677 + 1.678 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.679 +#: ../en/appA-svn.xml:418 1.680 +msgid "<command>svn delete</command> (<command>svn remove</command>)" 1.681 +msgstr "" 1.682 + 1.683 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.684 +#: ../en/appA-svn.xml:420 1.685 +msgid "<command>hg remove</command>" 1.686 +msgstr "" 1.687 + 1.688 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.689 +#: ../en/appA-svn.xml:424 1.690 +msgid "<command>svn diff</command>" 1.691 +msgstr "" 1.692 + 1.693 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.694 +#: ../en/appA-svn.xml:425 1.695 +msgid "<command>hg diff</command>" 1.696 +msgstr "" 1.697 + 1.698 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.699 +#: ../en/appA-svn.xml:429 1.700 +msgid "<command>svn export</command>" 1.701 +msgstr "" 1.702 + 1.703 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.704 +#: ../en/appA-svn.xml:430 1.705 +msgid "<command>hg archive</command>" 1.706 +msgstr "" 1.707 + 1.708 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.709 +#: ../en/appA-svn.xml:434 1.710 +msgid "<command>svn help</command>" 1.711 +msgstr "" 1.712 + 1.713 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.714 +#: ../en/appA-svn.xml:435 1.715 +msgid "<command>hg help</command>" 1.716 +msgstr "" 1.717 + 1.718 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.719 +#: ../en/appA-svn.xml:439 1.720 +msgid "<command>svn import</command>" 1.721 +msgstr "" 1.722 + 1.723 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.724 +#: ../en/appA-svn.xml:440 1.725 +msgid "<command>hg addremove</command>; <command>hg commit</command>" 1.726 +msgstr "" 1.727 + 1.728 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.729 +#: ../en/appA-svn.xml:445 ../en/appA-svn.xml:450 1.730 +msgid "<command>svn info</command>" 1.731 +msgstr "" 1.732 + 1.733 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.734 +#: ../en/appA-svn.xml:446 1.735 +msgid "<command>hg parents</command>" 1.736 +msgstr "" 1.737 + 1.738 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.739 +#: ../en/appA-svn.xml:447 1.740 +msgid "Shows what revision is checked out" 1.741 +msgstr "" 1.742 + 1.743 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.744 +#: ../en/appA-svn.xml:451 1.745 +msgid "<command>hg showconfig paths.parent</command>" 1.746 +msgstr "" 1.747 + 1.748 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.749 +#: ../en/appA-svn.xml:453 1.750 +msgid "Shows what URL is checked out" 1.751 +msgstr "" 1.752 + 1.753 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.754 +#: ../en/appA-svn.xml:456 1.755 +msgid "<command>svn list</command>" 1.756 +msgstr "" 1.757 + 1.758 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.759 +#: ../en/appA-svn.xml:457 1.760 +msgid "<command>hg manifest</command>" 1.761 +msgstr "" 1.762 + 1.763 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.764 +#: ../en/appA-svn.xml:461 1.765 +msgid "<command>svn log</command>" 1.766 +msgstr "" 1.767 + 1.768 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.769 +#: ../en/appA-svn.xml:462 1.770 +msgid "<command>hg log</command>" 1.771 +msgstr "" 1.772 + 1.773 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.774 +#: ../en/appA-svn.xml:466 1.775 +msgid "<command>svn merge</command>" 1.776 +msgstr "" 1.777 + 1.778 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.779 +#: ../en/appA-svn.xml:467 1.780 +msgid "<command>hg merge</command>" 1.781 +msgstr "" 1.782 + 1.783 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.784 +#: ../en/appA-svn.xml:471 1.785 +msgid "<command>svn mkdir</command>" 1.786 +msgstr "" 1.787 + 1.788 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.789 +#: ../en/appA-svn.xml:473 1.790 +#, fuzzy 1.791 +msgid "Mercurial does not track directories" 1.792 +msgstr "Mercurial 只跟踪文件,不跟踪目录" 1.793 + 1.794 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.795 +#: ../en/appA-svn.xml:476 1.796 +msgid "<command>svn move</command> (<command>svn rename</command>)" 1.797 +msgstr "" 1.798 + 1.799 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.800 +#: ../en/appA-svn.xml:478 1.801 +msgid "<command>hg rename</command>" 1.802 +msgstr "" 1.803 + 1.804 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.805 +#: ../en/appA-svn.xml:482 1.806 +msgid "<command>svn resolved</command>" 1.807 +msgstr "" 1.808 + 1.809 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.810 +#: ../en/appA-svn.xml:483 1.811 +msgid "<command>hg resolve -m</command>" 1.812 +msgstr "" 1.813 + 1.814 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.815 +#: ../en/appA-svn.xml:487 1.816 +msgid "<command>svn revert</command>" 1.817 +msgstr "" 1.818 + 1.819 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.820 +#: ../en/appA-svn.xml:488 1.821 +msgid "<command>hg revert</command>" 1.822 +msgstr "" 1.823 + 1.824 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.825 +#: ../en/appA-svn.xml:492 1.826 +msgid "<command>svn status</command>" 1.827 +msgstr "" 1.828 + 1.829 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.830 +#: ../en/appA-svn.xml:493 1.831 +msgid "<command>hg status</command>" 1.832 +msgstr "" 1.833 + 1.834 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.835 +#: ../en/appA-svn.xml:497 1.836 +msgid "<command>svn update</command>" 1.837 +msgstr "" 1.838 + 1.839 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 1.840 +#: ../en/appA-svn.xml:498 1.841 +msgid "<command>hg pull -u</command>" 1.842 +msgstr "" 1.843 + 1.844 +#. type: Content of: <book><appendix><sect1><title> 1.845 +#: ../en/appA-svn.xml:508 1.846 +#, fuzzy 1.847 +msgid "Useful tips for newcomers" 1.848 +msgstr "其它需要了解的东西" 1.849 + 1.850 +#. type: Content of: <book><appendix><sect1><para> 1.851 +#: ../en/appA-svn.xml:510 1.852 +msgid "" 1.853 +"Under some revision control systems, printing a diff for a single committed " 1.854 +"revision can be painful. For instance, with Subversion, to see what changed " 1.855 +"in revision 104654, you must type <command>svn diff -r104653:104654</" 1.856 +"command>. Mercurial eliminates the need to type the revision ID twice in this " 1.857 +"common case. For a plain diff, <command>hg export 104654</command>. For a log " 1.858 +"message followed by a diff, <command>hg log -r104654 -p</command>." 1.859 +msgstr "" 1.860 + 1.861 +#. type: Content of: <book><appendix><sect1><para> 1.862 +#: ../en/appA-svn.xml:519 1.863 +msgid "" 1.864 +"When you run <command>hg status</command> without any arguments, it prints " 1.865 +"the status of the entire tree, with paths relative to the root of the " 1.866 +"repository. This makes it tricky to copy a file name from the output of " 1.867 +"<command>hg status</command> into the command line. If you supply a file or " 1.868 +"directory name to <command>hg status</command>, it will print paths relative " 1.869 +"to your current location instead. So to get tree-wide status from " 1.870 +"<command>hg status</command>, with paths that are relative to your current " 1.871 +"directory and not the root of the repository, feed the output of <command>hg " 1.872 +"root</command> into <command>hg status</command>. You can easily do this as " 1.873 +"follows on a Unix-like system:" 1.874 +msgstr "" 1.875 + 1.876 +#. type: Content of: <book><appendix><sect1><screen><userinput> 1.877 +#: ../en/appA-svn.xml:532 1.878 +msgid "hg status `hg root`" 1.879 +msgstr "" 1.880 + 1.881 +#. type: Content of: <book><appendix><title> 1.882 #: ../en/appB-mq-ref.xml:5 1.883 msgid "Mercurial Queues reference" 1.884 msgstr "Mercurial 队列参考" 1.885 @@ -167,10 +994,10 @@ 1.886 msgstr "" 1.887 1.888 #. type: Content of: <book><appendix><sect1><sect2><para> 1.889 -#: ../en/appB-mq-ref.xml:57 ../en/appB-mq-ref.xml:99 ../en/appB-mq-ref.xml:157 1.890 -#: ../en/appB-mq-ref.xml:197 ../en/appB-mq-ref.xml:264 1.891 -#: ../en/appB-mq-ref.xml:335 ../en/appB-mq-ref.xml:404 1.892 -#: ../en/appB-mq-ref.xml:497 1.893 +#: ../en/appB-mq-ref.xml:57 ../en/appB-mq-ref.xml:109 ../en/appB-mq-ref.xml:167 1.894 +#: ../en/appB-mq-ref.xml:207 ../en/appB-mq-ref.xml:274 1.895 +#: ../en/appB-mq-ref.xml:345 ../en/appB-mq-ref.xml:414 1.896 +#: ../en/appB-mq-ref.xml:492 1.897 msgid "Options:" 1.898 msgstr "选项:" 1.899 1.900 @@ -197,6 +1024,22 @@ 1.901 1.902 #. type: Content of: <book><appendix><sect1><sect2><title> 1.903 #: ../en/appB-mq-ref.xml:75 1.904 +#, fuzzy 1.905 +msgid "" 1.906 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;move applied patches into " 1.907 +"repository history" 1.908 +msgstr "<command role=\"hg-ext-mq\">qapplied</command>—显示已应用的补丁" 1.909 + 1.910 +#. type: Content of: <book><appendix><sect1><sect2><para> 1.911 +#: ../en/appB-mq-ref.xml:78 1.912 +msgid "" 1.913 +"The <command>hg qfinish</command> command converts the specified applied " 1.914 +"patches into permanent changes by moving them out of MQ's control so that " 1.915 +"they will be treated as normal repository history." 1.916 +msgstr "" 1.917 + 1.918 +#. type: Content of: <book><appendix><sect1><sect2><title> 1.919 +#: ../en/appB-mq-ref.xml:85 1.920 msgid "" 1.921 "<command role=\"hg-ext-mq\">qfold</command>&emdash;merge (<quote>fold</" 1.922 "quote>) several patches into one" 1.923 @@ -205,7 +1048,7 @@ 1.924 "quote>)成一个" 1.925 1.926 #. type: Content of: <book><appendix><sect1><sect2><para> 1.927 -#: ../en/appB-mq-ref.xml:78 1.928 +#: ../en/appB-mq-ref.xml:88 1.929 msgid "" 1.930 "The <command role=\"hg-ext-mq\">qfold</command> command merges multiple " 1.931 "patches into the topmost applied patch, so that the topmost applied patch " 1.932 @@ -213,7 +1056,7 @@ 1.933 msgstr "" 1.934 1.935 #. type: Content of: <book><appendix><sect1><sect2><para> 1.936 -#: ../en/appB-mq-ref.xml:83 1.937 +#: ../en/appB-mq-ref.xml:93 1.938 msgid "" 1.939 "The patches to fold must not be applied; <command role=\"hg-ext-mq\">qfold</" 1.940 "command> will exit with an error if any is. The order in which patches are " 1.941 @@ -223,7 +1066,7 @@ 1.942 msgstr "" 1.943 1.944 #. type: Content of: <book><appendix><sect1><sect2><para> 1.945 -#: ../en/appB-mq-ref.xml:91 1.946 +#: ../en/appB-mq-ref.xml:101 1.947 msgid "" 1.948 "The comments from the folded patches are appended to the comments of the " 1.949 "destination patch, with each block of comments separated by three asterisk " 1.950 @@ -233,14 +1076,14 @@ 1.951 msgstr "" 1.952 1.953 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.954 -#: ../en/appB-mq-ref.xml:101 1.955 +#: ../en/appB-mq-ref.xml:111 1.956 msgid "" 1.957 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-e</option>: Edit the commit message " 1.958 "and patch description for the newly folded patch." 1.959 msgstr "" 1.960 1.961 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.962 -#: ../en/appB-mq-ref.xml:106 1.963 +#: ../en/appB-mq-ref.xml:116 1.964 msgid "" 1.965 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-l</option>: Use the contents of the " 1.966 "given file as the new commit message and patch description for the folded " 1.967 @@ -248,21 +1091,21 @@ 1.968 msgstr "" 1.969 1.970 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.971 -#: ../en/appB-mq-ref.xml:111 1.972 +#: ../en/appB-mq-ref.xml:121 1.973 msgid "" 1.974 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-m</option>: Use the given text as " 1.975 "the new commit message and patch description for the folded patch." 1.976 msgstr "" 1.977 1.978 #. type: Content of: <book><appendix><sect1><sect2><title> 1.979 -#: ../en/appB-mq-ref.xml:119 1.980 +#: ../en/appB-mq-ref.xml:129 1.981 msgid "" 1.982 "<command role=\"hg-ext-mq\">qheader</command>&emdash;display the header/" 1.983 "description of a patch" 1.984 msgstr "<command role=\"hg-ext-mq\">qheader</command>—显示补丁头部描述" 1.985 1.986 #. type: Content of: <book><appendix><sect1><sect2><para> 1.987 -#: ../en/appB-mq-ref.xml:123 1.988 +#: ../en/appB-mq-ref.xml:133 1.989 msgid "" 1.990 "The <command role=\"hg-ext-mq\">qheader</command> command prints the header, " 1.991 "or description, of a patch. By default, it prints the header of the topmost " 1.992 @@ -270,14 +1113,14 @@ 1.993 msgstr "" 1.994 1.995 #. type: Content of: <book><appendix><sect1><sect2><title> 1.996 -#: ../en/appB-mq-ref.xml:130 1.997 +#: ../en/appB-mq-ref.xml:140 1.998 msgid "" 1.999 "<command role=\"hg-ext-mq\">qimport</command>&emdash;import a third-party " 1.1000 "patch into the queue" 1.1001 msgstr "<command role=\"hg-ext-mq\">qimport</command>—将第三方补丁导入队列" 1.1002 1.1003 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1004 -#: ../en/appB-mq-ref.xml:133 1.1005 +#: ../en/appB-mq-ref.xml:143 1.1006 msgid "" 1.1007 "The <command role=\"hg-ext-mq\">qimport</command> command adds an entry for " 1.1008 "an external patch to the <filename role=\"special\">series</filename> file, " 1.1009 @@ -287,7 +1130,7 @@ 1.1010 msgstr "" 1.1011 1.1012 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1013 -#: ../en/appB-mq-ref.xml:141 1.1014 +#: ../en/appB-mq-ref.xml:151 1.1015 msgid "" 1.1016 "If the <filename role=\"special\" class=\"directory\">.hg/patches</filename> " 1.1017 "directory is a repository, <command role=\"hg-ext-mq\">qimport</command> " 1.1018 @@ -296,14 +1139,14 @@ 1.1019 msgstr "" 1.1020 1.1021 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1022 -#: ../en/appB-mq-ref.xml:149 1.1023 +#: ../en/appB-mq-ref.xml:159 1.1024 msgid "" 1.1025 "<command role=\"hg-ext-mq\">qinit</command>&emdash;prepare a repository to " 1.1026 "work with MQ" 1.1027 msgstr "<command role=\"hg-ext-mq\">qinit</command>—为使用 MQ 配置版本库" 1.1028 1.1029 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1030 -#: ../en/appB-mq-ref.xml:152 1.1031 +#: ../en/appB-mq-ref.xml:162 1.1032 msgid "" 1.1033 "The <command role=\"hg-ext-mq\">qinit</command> command prepares a repository " 1.1034 "to work with MQ. It creates a directory called <filename role=\"special\" " 1.1035 @@ -311,7 +1154,7 @@ 1.1036 msgstr "" 1.1037 1.1038 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1039 -#: ../en/appB-mq-ref.xml:159 1.1040 +#: ../en/appB-mq-ref.xml:169 1.1041 msgid "" 1.1042 "<option role=\"hg-ext-mq-cmd-qinit-opt\">-c</option>: Create <filename role=" 1.1043 "\"special\" class=\"directory\">.hg/patches</filename> as a repository in its " 1.1044 @@ -320,7 +1163,7 @@ 1.1045 msgstr "" 1.1046 1.1047 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1048 -#: ../en/appB-mq-ref.xml:169 1.1049 +#: ../en/appB-mq-ref.xml:179 1.1050 msgid "" 1.1051 "When the <filename role=\"special\" class=\"directory\">.hg/patches</" 1.1052 "filename> directory is a repository, the <command role=\"hg-ext-mq\">qimport</" 1.1053 @@ -329,12 +1172,12 @@ 1.1054 msgstr "" 1.1055 1.1056 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1057 -#: ../en/appB-mq-ref.xml:178 1.1058 +#: ../en/appB-mq-ref.xml:188 1.1059 msgid "<command role=\"hg-ext-mq\">qnew</command>&emdash;create a new patch" 1.1060 msgstr "<command role=\"hg-ext-mq\">qnew</command>—创建新补丁" 1.1061 1.1062 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1063 -#: ../en/appB-mq-ref.xml:181 1.1064 +#: ../en/appB-mq-ref.xml:191 1.1065 msgid "" 1.1066 "The <command role=\"hg-ext-mq\">qnew</command> command creates a new patch. " 1.1067 "It takes one mandatory argument, the name to use for the patch file. The " 1.1068 @@ -344,7 +1187,7 @@ 1.1069 msgstr "" 1.1070 1.1071 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1072 -#: ../en/appB-mq-ref.xml:189 1.1073 +#: ../en/appB-mq-ref.xml:199 1.1074 msgid "" 1.1075 "If <command role=\"hg-ext-mq\">qnew</command> finds modified files in the " 1.1076 "working directory, it will refuse to create a new patch unless the <option " 1.1077 @@ -354,7 +1197,7 @@ 1.1078 msgstr "" 1.1079 1.1080 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1081 -#: ../en/appB-mq-ref.xml:199 1.1082 +#: ../en/appB-mq-ref.xml:209 1.1083 msgid "" 1.1084 "<option role=\"hg-ext-mq-cmd-qnew-opt\">-f</option>: Create a new patch if " 1.1085 "the contents of the working directory are modified. Any outstanding " 1.1086 @@ -363,7 +1206,7 @@ 1.1087 msgstr "" 1.1088 1.1089 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1090 -#: ../en/appB-mq-ref.xml:206 1.1091 +#: ../en/appB-mq-ref.xml:216 1.1092 msgid "" 1.1093 "<option role=\"hg-ext-mq-cmd-qnew-opt\">-m</option>: Use the given text as " 1.1094 "the commit message. This text will be stored at the beginning of the patch " 1.1095 @@ -371,14 +1214,14 @@ 1.1096 msgstr "" 1.1097 1.1098 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1099 -#: ../en/appB-mq-ref.xml:215 1.1100 +#: ../en/appB-mq-ref.xml:225 1.1101 msgid "" 1.1102 "<command role=\"hg-ext-mq\">qnext</command>&emdash;print the name of the next " 1.1103 "patch" 1.1104 msgstr "<command role=\"hg-ext-mq\">qnext</command>—显示下个补丁的名称" 1.1105 1.1106 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1107 -#: ../en/appB-mq-ref.xml:218 1.1108 +#: ../en/appB-mq-ref.xml:228 1.1109 msgid "" 1.1110 "The <command role=\"hg-ext-mq\">qnext</command> command prints the name name " 1.1111 "of the next patch in the <filename role=\"special\">series</filename> file " 1.1112 @@ -387,13 +1230,13 @@ 1.1113 msgstr "" 1.1114 1.1115 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1116 -#: ../en/appB-mq-ref.xml:227 1.1117 +#: ../en/appB-mq-ref.xml:237 1.1118 msgid "" 1.1119 "<command role=\"hg-ext-mq\">qpop</command>&emdash;pop patches off the stack" 1.1120 msgstr "<command role=\"hg-ext-mq\">qpop</command>—删除堆栈顶部的补丁" 1.1121 1.1122 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1123 -#: ../en/appB-mq-ref.xml:230 1.1124 +#: ../en/appB-mq-ref.xml:240 1.1125 msgid "" 1.1126 "The <command role=\"hg-ext-mq\">qpop</command> command removes applied " 1.1127 "patches from the top of the stack of applied patches. By default, it removes " 1.1128 @@ -401,7 +1244,7 @@ 1.1129 msgstr "" 1.1130 1.1131 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1132 -#: ../en/appB-mq-ref.xml:234 1.1133 +#: ../en/appB-mq-ref.xml:244 1.1134 msgid "" 1.1135 "This command removes the changesets that represent the popped patches from " 1.1136 "the repository, and updates the working directory to undo the effects of the " 1.1137 @@ -409,7 +1252,7 @@ 1.1138 msgstr "" 1.1139 1.1140 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1141 -#: ../en/appB-mq-ref.xml:238 1.1142 +#: ../en/appB-mq-ref.xml:248 1.1143 msgid "" 1.1144 "This command takes an optional argument, which it uses as the name or index " 1.1145 "of the patch to pop to. If given a name, it will pop patches until the named " 1.1146 @@ -421,7 +1264,7 @@ 1.1147 msgstr "" 1.1148 1.1149 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1150 -#: ../en/appB-mq-ref.xml:248 1.1151 +#: ../en/appB-mq-ref.xml:258 1.1152 msgid "" 1.1153 "The <command role=\"hg-ext-mq\">qpop</command> command does not read or write " 1.1154 "patches or the <filename role=\"special\">series</filename> file. It is thus " 1.1155 @@ -432,7 +1275,7 @@ 1.1156 msgstr "" 1.1157 1.1158 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1159 -#: ../en/appB-mq-ref.xml:257 1.1160 +#: ../en/appB-mq-ref.xml:267 1.1161 msgid "" 1.1162 "By default, the <command role=\"hg-ext-mq\">qpop</command> command will not " 1.1163 "pop any patches if the working directory has been modified. You can override " 1.1164 @@ -441,7 +1284,7 @@ 1.1165 msgstr "" 1.1166 1.1167 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1168 -#: ../en/appB-mq-ref.xml:266 1.1169 +#: ../en/appB-mq-ref.xml:276 1.1170 msgid "" 1.1171 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-a</option>: Pop all applied " 1.1172 "patches. This returns the repository to its state before you applied any " 1.1173 @@ -449,21 +1292,21 @@ 1.1174 msgstr "" 1.1175 1.1176 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1177 -#: ../en/appB-mq-ref.xml:271 1.1178 +#: ../en/appB-mq-ref.xml:281 1.1179 msgid "" 1.1180 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option>: Forcibly revert any " 1.1181 "modifications to the working directory when popping." 1.1182 msgstr "" 1.1183 1.1184 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1185 -#: ../en/appB-mq-ref.xml:276 1.1186 +#: ../en/appB-mq-ref.xml:286 1.1187 msgid "" 1.1188 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-n</option>: Pop a patch from the " 1.1189 "named queue." 1.1190 msgstr "" 1.1191 1.1192 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1193 -#: ../en/appB-mq-ref.xml:281 1.1194 +#: ../en/appB-mq-ref.xml:291 1.1195 msgid "" 1.1196 "The <command role=\"hg-ext-mq\">qpop</command> command removes one line from " 1.1197 "the end of the <filename role=\"special\">status</filename> file for each " 1.1198 @@ -471,14 +1314,14 @@ 1.1199 msgstr "" 1.1200 1.1201 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1202 -#: ../en/appB-mq-ref.xml:288 1.1203 +#: ../en/appB-mq-ref.xml:298 1.1204 msgid "" 1.1205 "<command role=\"hg-ext-mq\">qprev</command>&emdash;print the name of the " 1.1206 "previous patch" 1.1207 msgstr "<command role=\"hg-ext-mq\">qprev</command>—显示上个补丁的名称" 1.1208 1.1209 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1210 -#: ../en/appB-mq-ref.xml:291 1.1211 +#: ../en/appB-mq-ref.xml:301 1.1212 msgid "" 1.1213 "The <command role=\"hg-ext-mq\">qprev</command> command prints the name of " 1.1214 "the patch in the <filename role=\"special\">series</filename> file that comes " 1.1215 @@ -487,32 +1330,32 @@ 1.1216 msgstr "" 1.1217 1.1218 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1219 -#: ../en/appB-mq-ref.xml:300 1.1220 +#: ../en/appB-mq-ref.xml:310 1.1221 msgid "" 1.1222 "<command role=\"hg-ext-mq\">qpush</command>&emdash;push patches onto the stack" 1.1223 msgstr "<command role=\"hg-ext-mq\">qpush</command>—增加补丁到堆栈" 1.1224 1.1225 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1226 -#: ../en/appB-mq-ref.xml:303 1.1227 +#: ../en/appB-mq-ref.xml:313 1.1228 msgid "" 1.1229 "The <command role=\"hg-ext-mq\">qpush</command> command adds patches onto the " 1.1230 "applied stack. By default, it adds only one patch." 1.1231 msgstr "" 1.1232 1.1233 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1234 -#: ../en/appB-mq-ref.xml:307 1.1235 +#: ../en/appB-mq-ref.xml:317 1.1236 msgid "" 1.1237 "This command creates a new changeset to represent each applied patch, and " 1.1238 "updates the working directory to apply the effects of the patches." 1.1239 msgstr "" 1.1240 1.1241 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1242 -#: ../en/appB-mq-ref.xml:311 1.1243 +#: ../en/appB-mq-ref.xml:321 1.1244 msgid "The default data used when creating a changeset are as follows:" 1.1245 msgstr "" 1.1246 1.1247 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1248 -#: ../en/appB-mq-ref.xml:314 1.1249 +#: ../en/appB-mq-ref.xml:324 1.1250 msgid "" 1.1251 "The commit date and time zone are the current date and time zone. Because " 1.1252 "these data are used to compute the identity of a changeset, this means that " 1.1253 @@ -522,14 +1365,14 @@ 1.1254 msgstr "" 1.1255 1.1256 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1257 -#: ../en/appB-mq-ref.xml:322 1.1258 +#: ../en/appB-mq-ref.xml:332 1.1259 msgid "" 1.1260 "The author is the same as the default used by the <command role=\"hg-cmd\">hg " 1.1261 "commit</command> command." 1.1262 msgstr "" 1.1263 1.1264 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1265 -#: ../en/appB-mq-ref.xml:326 1.1266 +#: ../en/appB-mq-ref.xml:336 1.1267 msgid "" 1.1268 "The commit message is any text from the patch file that comes before the " 1.1269 "first diff header. If there is no such text, a default commit message is " 1.1270 @@ -537,14 +1380,14 @@ 1.1271 msgstr "" 1.1272 1.1273 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1274 -#: ../en/appB-mq-ref.xml:331 1.1275 -msgid "" 1.1276 -"If a patch contains a Mercurial patch header (XXX add link), the information " 1.1277 -"in the patch header overrides these defaults." 1.1278 +#: ../en/appB-mq-ref.xml:341 1.1279 +msgid "" 1.1280 +"If a patch contains a Mercurial patch header, the information in the patch " 1.1281 +"header overrides these defaults." 1.1282 msgstr "" 1.1283 1.1284 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1285 -#: ../en/appB-mq-ref.xml:337 1.1286 +#: ../en/appB-mq-ref.xml:347 1.1287 msgid "" 1.1288 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-a</option>: Push all unapplied " 1.1289 "patches from the <filename role=\"special\">series</filename> file until " 1.1290 @@ -552,14 +1395,14 @@ 1.1291 msgstr "" 1.1292 1.1293 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1294 -#: ../en/appB-mq-ref.xml:343 1.1295 +#: ../en/appB-mq-ref.xml:353 1.1296 msgid "" 1.1297 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-l</option>: Add the name of the " 1.1298 "patch to the end of the commit message." 1.1299 msgstr "" 1.1300 1.1301 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1302 -#: ../en/appB-mq-ref.xml:347 1.1303 +#: ../en/appB-mq-ref.xml:357 1.1304 msgid "" 1.1305 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-m</option>: If a patch fails to " 1.1306 "apply cleanly, use the entry for the patch in another saved queue to compute " 1.1307 @@ -569,14 +1412,14 @@ 1.1308 msgstr "" 1.1309 1.1310 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1311 -#: ../en/appB-mq-ref.xml:355 1.1312 +#: ../en/appB-mq-ref.xml:365 1.1313 msgid "" 1.1314 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-n</option>: Use the named queue if " 1.1315 "merging while pushing." 1.1316 msgstr "" 1.1317 1.1318 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1319 -#: ../en/appB-mq-ref.xml:360 1.1320 +#: ../en/appB-mq-ref.xml:370 1.1321 msgid "" 1.1322 "The <command role=\"hg-ext-mq\">qpush</command> command reads, but does not " 1.1323 "modify, the <filename role=\"special\">series</filename> file. It appends " 1.1324 @@ -585,14 +1428,14 @@ 1.1325 msgstr "" 1.1326 1.1327 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1328 -#: ../en/appB-mq-ref.xml:368 1.1329 +#: ../en/appB-mq-ref.xml:378 1.1330 msgid "" 1.1331 "<command role=\"hg-ext-mq\">qrefresh</command>&emdash;update the topmost " 1.1332 "applied patch" 1.1333 msgstr "<command role=\"hg-ext-mq\">qrefresh</command>—更新最新的补丁" 1.1334 1.1335 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1336 -#: ../en/appB-mq-ref.xml:372 1.1337 +#: ../en/appB-mq-ref.xml:382 1.1338 msgid "" 1.1339 "The <command role=\"hg-ext-mq\">qrefresh</command> command updates the " 1.1340 "topmost applied patch. It modifies the patch, removes the old changeset that " 1.1341 @@ -601,28 +1444,28 @@ 1.1342 msgstr "" 1.1343 1.1344 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1345 -#: ../en/appB-mq-ref.xml:378 1.1346 +#: ../en/appB-mq-ref.xml:388 1.1347 msgid "" 1.1348 "The <command role=\"hg-ext-mq\">qrefresh</command> command looks for the " 1.1349 "following modifications:" 1.1350 msgstr "" 1.1351 1.1352 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1353 -#: ../en/appB-mq-ref.xml:381 1.1354 +#: ../en/appB-mq-ref.xml:391 1.1355 msgid "" 1.1356 "Changes to the commit message, i.e. the text before the first diff header in " 1.1357 "the patch file, are reflected in the new changeset that represents the patch." 1.1358 msgstr "" 1.1359 1.1360 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1361 -#: ../en/appB-mq-ref.xml:386 1.1362 +#: ../en/appB-mq-ref.xml:396 1.1363 msgid "" 1.1364 "Modifications to tracked files in the working directory are added to the " 1.1365 "patch." 1.1366 msgstr "" 1.1367 1.1368 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1369 -#: ../en/appB-mq-ref.xml:389 1.1370 +#: ../en/appB-mq-ref.xml:399 1.1371 msgid "" 1.1372 "Changes to the files tracked using <command role=\"hg-cmd\">hg add</command>, " 1.1373 "<command role=\"hg-cmd\">hg copy</command>, <command role=\"hg-cmd\">hg " 1.1374 @@ -632,7 +1475,7 @@ 1.1375 msgstr "" 1.1376 1.1377 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1378 -#: ../en/appB-mq-ref.xml:398 1.1379 +#: ../en/appB-mq-ref.xml:408 1.1380 msgid "" 1.1381 "Even if <command role=\"hg-ext-mq\">qrefresh</command> detects no changes, it " 1.1382 "still recreates the changeset that represents the patch. This causes the " 1.1383 @@ -641,33 +1484,33 @@ 1.1384 msgstr "" 1.1385 1.1386 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1387 -#: ../en/appB-mq-ref.xml:406 1.1388 +#: ../en/appB-mq-ref.xml:416 1.1389 msgid "" 1.1390 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-e</option>: Modify the commit " 1.1391 "and patch description, using the preferred text editor." 1.1392 msgstr "" 1.1393 1.1394 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1395 -#: ../en/appB-mq-ref.xml:411 1.1396 +#: ../en/appB-mq-ref.xml:421 1.1397 msgid "" 1.1398 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-m</option>: Modify the commit " 1.1399 "message and patch description, using the given text." 1.1400 msgstr "" 1.1401 1.1402 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1403 -#: ../en/appB-mq-ref.xml:416 1.1404 +#: ../en/appB-mq-ref.xml:426 1.1405 msgid "" 1.1406 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-l</option>: Modify the commit " 1.1407 "message and patch description, using text from the given file." 1.1408 msgstr "" 1.1409 1.1410 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1411 -#: ../en/appB-mq-ref.xml:424 1.1412 +#: ../en/appB-mq-ref.xml:434 1.1413 msgid "<command role=\"hg-ext-mq\">qrename</command>&emdash;rename a patch" 1.1414 msgstr "<command role=\"hg-ext-mq\">qrename</command>—改名补丁" 1.1415 1.1416 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1417 -#: ../en/appB-mq-ref.xml:427 1.1418 +#: ../en/appB-mq-ref.xml:437 1.1419 msgid "" 1.1420 "The <command role=\"hg-ext-mq\">qrename</command> command renames a patch, " 1.1421 "and changes the entry for the patch in the <filename role=\"special\">series</" 1.1422 @@ -675,7 +1518,7 @@ 1.1423 msgstr "" 1.1424 1.1425 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1426 -#: ../en/appB-mq-ref.xml:431 1.1427 +#: ../en/appB-mq-ref.xml:441 1.1428 msgid "" 1.1429 "With a single argument, <command role=\"hg-ext-mq\">qrename</command> renames " 1.1430 "the topmost applied patch. With two arguments, it renames its first argument " 1.1431 @@ -683,37 +1526,14 @@ 1.1432 msgstr "" 1.1433 1.1434 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1435 -#: ../en/appB-mq-ref.xml:438 1.1436 -msgid "" 1.1437 -"<command role=\"hg-ext-mq\">qrestore</command>&emdash;restore saved queue " 1.1438 -"state" 1.1439 -msgstr "<command role=\"hg-ext-mq\">qrestore</command>—恢复保存的队列" 1.1440 - 1.1441 -#. type: Content of: <book><appendix><sect1><sect2><para> 1.1442 -#: ../en/appB-mq-ref.xml:442 1.1443 -msgid "XXX No idea what this does." 1.1444 -msgstr "" 1.1445 - 1.1446 -#. type: Content of: <book><appendix><sect1><sect2><title> 1.1447 -#: ../en/appB-mq-ref.xml:446 1.1448 -msgid "" 1.1449 -"<command role=\"hg-ext-mq\">qsave</command>&emdash;save current queue state" 1.1450 -msgstr "<command role=\"hg-ext-mq\">qsave</command>—保存当前的队列状态" 1.1451 - 1.1452 -#. type: Content of: <book><appendix><sect1><sect2><para> 1.1453 -#: ../en/appB-mq-ref.xml:449 1.1454 -msgid "XXX Likewise." 1.1455 -msgstr "" 1.1456 - 1.1457 -#. type: Content of: <book><appendix><sect1><sect2><title> 1.1458 -#: ../en/appB-mq-ref.xml:453 1.1459 +#: ../en/appB-mq-ref.xml:448 1.1460 msgid "" 1.1461 "<command role=\"hg-ext-mq\">qseries</command>&emdash;print the entire patch " 1.1462 "series" 1.1463 msgstr "<command role=\"hg-ext-mq\">qseries</command>—显示补丁序列" 1.1464 1.1465 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1466 -#: ../en/appB-mq-ref.xml:456 1.1467 +#: ../en/appB-mq-ref.xml:451 1.1468 msgid "" 1.1469 "The <command role=\"hg-ext-mq\">qseries</command> command prints the entire " 1.1470 "patch series from the <filename role=\"special\">series</filename> file. It " 1.1471 @@ -722,28 +1542,28 @@ 1.1472 msgstr "" 1.1473 1.1474 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1475 -#: ../en/appB-mq-ref.xml:464 1.1476 +#: ../en/appB-mq-ref.xml:459 1.1477 msgid "" 1.1478 "<command role=\"hg-ext-mq\">qtop</command>&emdash;print the name of the " 1.1479 "current patch" 1.1480 msgstr "<command role=\"hg-ext-mq\">qtop</command>—显示当前补丁的名称" 1.1481 1.1482 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1483 -#: ../en/appB-mq-ref.xml:467 1.1484 +#: ../en/appB-mq-ref.xml:462 1.1485 msgid "" 1.1486 "The <command role=\"hg-ext-mq\">qtop</command> prints the name of the topmost " 1.1487 "currently applied patch." 1.1488 msgstr "" 1.1489 1.1490 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1491 -#: ../en/appB-mq-ref.xml:472 1.1492 +#: ../en/appB-mq-ref.xml:467 1.1493 msgid "" 1.1494 "<command role=\"hg-ext-mq\">qunapplied</command>&emdash;print patches not yet " 1.1495 "applied" 1.1496 msgstr "<command role=\"hg-ext-mq\">qunapplied</command>—显示尚未应用的补丁" 1.1497 1.1498 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1499 -#: ../en/appB-mq-ref.xml:476 1.1500 +#: ../en/appB-mq-ref.xml:471 1.1501 msgid "" 1.1502 "The <command role=\"hg-ext-mq\">qunapplied</command> command prints the names " 1.1503 "of patches from the <filename role=\"special\">series</filename> file that " 1.1504 @@ -752,14 +1572,14 @@ 1.1505 msgstr "" 1.1506 1.1507 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1508 -#: ../en/appB-mq-ref.xml:484 1.1509 +#: ../en/appB-mq-ref.xml:479 1.1510 msgid "" 1.1511 "<command role=\"hg-cmd\">hg strip</command>&emdash;remove a revision and " 1.1512 "descendants" 1.1513 msgstr "<command role=\"hg-cmd\">hg strip</command>—删除一个版本及其后继" 1.1514 1.1515 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1516 -#: ../en/appB-mq-ref.xml:487 1.1517 +#: ../en/appB-mq-ref.xml:482 1.1518 msgid "" 1.1519 "The <command role=\"hg-cmd\">hg strip</command> command removes a revision, " 1.1520 "and all of its descendants, from the repository. It undoes the effects of " 1.1521 @@ -768,7 +1588,7 @@ 1.1522 msgstr "" 1.1523 1.1524 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1525 -#: ../en/appB-mq-ref.xml:493 1.1526 +#: ../en/appB-mq-ref.xml:488 1.1527 msgid "" 1.1528 "The <command role=\"hg-cmd\">hg strip</command> command saves a backup of the " 1.1529 "removed changesets in a bundle, so that they can be reapplied if removed in " 1.1530 @@ -776,37 +1596,36 @@ 1.1531 msgstr "" 1.1532 1.1533 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1534 -#: ../en/appB-mq-ref.xml:499 1.1535 +#: ../en/appB-mq-ref.xml:494 1.1536 msgid "" 1.1537 "<option role=\"hg-opt-strip\">-b</option>: Save unrelated changesets that are " 1.1538 "intermixed with the stripped changesets in the backup bundle." 1.1539 msgstr "" 1.1540 1.1541 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1542 -#: ../en/appB-mq-ref.xml:503 1.1543 +#: ../en/appB-mq-ref.xml:498 1.1544 msgid "" 1.1545 "<option role=\"hg-opt-strip\">-f</option>: If a branch has multiple heads, " 1.1546 -"remove all heads. XXX This should be renamed, and use <literal>-f</literal> " 1.1547 -"to strip revs when there are pending changes." 1.1548 +"remove all heads." 1.1549 msgstr "" 1.1550 1.1551 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 1.1552 +#: ../en/appB-mq-ref.xml:501 1.1553 +msgid "<option role=\"hg-opt-strip\">-n</option>: Do not save a backup bundle." 1.1554 +msgstr "" 1.1555 + 1.1556 +#. type: Content of: <book><appendix><sect1><title> 1.1557 #: ../en/appB-mq-ref.xml:508 1.1558 -msgid "<option role=\"hg-opt-strip\">-n</option>: Do not save a backup bundle." 1.1559 -msgstr "" 1.1560 - 1.1561 -#. type: Content of: <book><appendix><sect1><title> 1.1562 -#: ../en/appB-mq-ref.xml:515 1.1563 msgid "MQ file reference" 1.1564 msgstr "MQ 文件参考" 1.1565 1.1566 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1567 -#: ../en/appB-mq-ref.xml:518 1.1568 +#: ../en/appB-mq-ref.xml:511 1.1569 msgid "The <filename role=\"special\">series</filename> file" 1.1570 msgstr "<filename role=\"special\">序列</filename>文件" 1.1571 1.1572 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1573 -#: ../en/appB-mq-ref.xml:521 1.1574 +#: ../en/appB-mq-ref.xml:514 1.1575 msgid "" 1.1576 "The <filename role=\"special\">series</filename> file contains a list of the " 1.1577 "names of all patches that MQ can apply. It is represented as a list of " 1.1578 @@ -815,7 +1634,7 @@ 1.1579 msgstr "" 1.1580 1.1581 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1582 -#: ../en/appB-mq-ref.xml:527 1.1583 +#: ../en/appB-mq-ref.xml:520 1.1584 msgid "" 1.1585 "Lines may contain comments. A comment begins with the <quote><literal>#</" 1.1586 "literal></quote> character, and extends to the end of the line. Empty lines, " 1.1587 @@ -823,7 +1642,7 @@ 1.1588 msgstr "" 1.1589 1.1590 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1591 -#: ../en/appB-mq-ref.xml:532 1.1592 +#: ../en/appB-mq-ref.xml:525 1.1593 msgid "" 1.1594 "You will often need to edit the <filename role=\"special\">series</filename> " 1.1595 "file by hand, hence the support for comments and empty lines noted above. " 1.1596 @@ -834,7 +1653,7 @@ 1.1597 msgstr "" 1.1598 1.1599 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1600 -#: ../en/appB-mq-ref.xml:541 1.1601 +#: ../en/appB-mq-ref.xml:534 1.1602 msgid "" 1.1603 "Placing the <filename role=\"special\">series</filename> file under revision " 1.1604 "control is also supported; it is a good idea to place all of the patches that " 1.1605 @@ -845,12 +1664,12 @@ 1.1606 msgstr "" 1.1607 1.1608 #. type: Content of: <book><appendix><sect1><sect2><title> 1.1609 -#: ../en/appB-mq-ref.xml:551 1.1610 +#: ../en/appB-mq-ref.xml:544 1.1611 msgid "The <filename role=\"special\">status</filename> file" 1.1612 msgstr "<filename role=\"special\">状态</filename>文件" 1.1613 1.1614 #. type: Content of: <book><appendix><sect1><sect2><para> 1.1615 -#: ../en/appB-mq-ref.xml:554 1.1616 +#: ../en/appB-mq-ref.xml:547 1.1617 msgid "" 1.1618 "The <filename role=\"special\">status</filename> file contains the names and " 1.1619 "changeset hashes of all patches that MQ currently has applied. Unlike the " 1.1620 @@ -1214,11 +2033,361 @@ 1.1621 1.1622 #. type: Content of: <book><preface><sect1><title> 1.1623 #: ../en/ch00-preface.xml:8 1.1624 +#, fuzzy 1.1625 +msgid "Technical storytelling" 1.1626 +msgstr "共享的技术因素" 1.1627 + 1.1628 +#. type: Content of: <book><preface><sect1><para> 1.1629 +#: ../en/ch00-preface.xml:10 1.1630 +msgid "" 1.1631 +"A few years ago, when I wanted to explain why I believed that distributed " 1.1632 +"revision control is important, the field was then so new that there was " 1.1633 +"almost no published literature to refer people to." 1.1634 +msgstr "" 1.1635 + 1.1636 +#. type: Content of: <book><preface><sect1><para> 1.1637 +#: ../en/ch00-preface.xml:15 1.1638 +msgid "" 1.1639 +"Although at that time I spent some time working on the internals of Mercurial " 1.1640 +"itself, I switched to writing this book because that seemed like the most " 1.1641 +"effective way to help the software to reach a wide audience, along with the " 1.1642 +"idea that revision control ought to be distributed in nature. I publish the " 1.1643 +"book online under a liberal license for the same reason: to get the word out." 1.1644 +msgstr "" 1.1645 + 1.1646 +#. type: Content of: <book><preface><sect1><para> 1.1647 +#: ../en/ch00-preface.xml:23 1.1648 +msgid "" 1.1649 +"There's a familiar rhythm to a good software book that closely resembles " 1.1650 +"telling a story: What is this thing? Why does it matter? How will it help me? " 1.1651 +"How do I use it? In this book, I try to answer those questions for " 1.1652 +"distributed revision control in general, and for Mercurial in particular." 1.1653 +msgstr "" 1.1654 + 1.1655 +#. type: Content of: <book><preface><sect1><title> 1.1656 +#: ../en/ch00-preface.xml:31 1.1657 +msgid "Thank you for supporting Mercurial" 1.1658 +msgstr "" 1.1659 + 1.1660 +#. type: Content of: <book><preface><sect1><para> 1.1661 +#: ../en/ch00-preface.xml:33 1.1662 +msgid "" 1.1663 +"By purchasing a copy of this book, you are supporting the continued " 1.1664 +"development and freedom of Mercurial in particular, and of open source and " 1.1665 +"free software in general. O'Reilly Media and I are donating my royalties on " 1.1666 +"the sales of this book to the Software Freedom Conservancy (<ulink url=" 1.1667 +"\"http://www.softwarefreedom.org/\">http://www.softwarefreedom.org/</ulink>) " 1.1668 +"which provides clerical and legal support to Mercurial and a number of other " 1.1669 +"prominent and worthy open source software projects." 1.1670 +msgstr "" 1.1671 + 1.1672 +#. type: Content of: <book><preface><sect1><title> 1.1673 +#: ../en/ch00-preface.xml:45 1.1674 +msgid "Acknowledgments" 1.1675 +msgstr "" 1.1676 + 1.1677 +#. type: Content of: <book><preface><sect1><para> 1.1678 +#: ../en/ch00-preface.xml:47 1.1679 +msgid "" 1.1680 +"This book would not exist were it not for the efforts of Matt Mackall, the " 1.1681 +"author and project lead of Mercurial. He is ably assisted by hundreds of " 1.1682 +"volunteer contributors across the world." 1.1683 +msgstr "" 1.1684 + 1.1685 +#. type: Content of: <book><preface><sect1><para> 1.1686 +#: ../en/ch00-preface.xml:52 1.1687 +msgid "" 1.1688 +"My children, Cian and Ruairi, always stood ready to help me to unwind with " 1.1689 +"wonderful, madcap little-boy games. I'd also like to thank my ex-wife, " 1.1690 +"Shannon, for her support." 1.1691 +msgstr "" 1.1692 + 1.1693 +#. type: Content of: <book><preface><sect1><para> 1.1694 +#: ../en/ch00-preface.xml:56 1.1695 +msgid "" 1.1696 +"My colleagues and friends provided help and support in innumerable ways. " 1.1697 +"This list of people is necessarily very incomplete: Stephen Hahn, Karyn " 1.1698 +"Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, " 1.1699 +"Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." 1.1700 +msgstr "" 1.1701 + 1.1702 +#. type: Content of: <book><preface><sect1><para> 1.1703 +#: ../en/ch00-preface.xml:62 1.1704 +msgid "" 1.1705 +"I developed this book in the open, posting drafts of chapters to the book web " 1.1706 +"site as I completed them. Readers then submitted feedback using a web " 1.1707 +"application that I developed. By the time I finished writing the book, more " 1.1708 +"than 100 people had submitted comments, an amazing number considering that " 1.1709 +"the comment system was live for only about two months towards the end of the " 1.1710 +"writing process." 1.1711 +msgstr "" 1.1712 + 1.1713 +#. type: Content of: <book><preface><sect1><para> 1.1714 +#: ../en/ch00-preface.xml:70 1.1715 +msgid "" 1.1716 +"I would particularly like to recognize the following people, who between them " 1.1717 +"contributed over a third of the total number of comments. I would like to " 1.1718 +"thank them for their care and effort in providing so much detailed feedback." 1.1719 +msgstr "" 1.1720 + 1.1721 +#. type: Content of: <book><preface><sect1><para> 1.1722 +#: ../en/ch00-preface.xml:75 1.1723 +msgid "" 1.1724 +"Martin Geisler, Damien Cassou, Alexey Bakhirkin, Till Plewe, Dan Himes, Paul " 1.1725 +"Sargent, Gokberk Hamurcu, Matthijs van der Vleuten, Michael Chermside, John " 1.1726 +"Mulligan, Jordi Fita, Jon Parise." 1.1727 +msgstr "" 1.1728 + 1.1729 +#. type: Content of: <book><preface><sect1><para> 1.1730 +#: ../en/ch00-preface.xml:80 1.1731 +msgid "" 1.1732 +"I also want to acknowledge the help of the many people who caught errors and " 1.1733 +"provided helpful suggestions throughout the book." 1.1734 +msgstr "" 1.1735 + 1.1736 +#. type: Content of: <book><preface><sect1><para> 1.1737 +#: ../en/ch00-preface.xml:84 1.1738 +msgid "" 1.1739 +"Jeremy W. Sherman, Brian Mearns, Vincent Furia, Iwan Luijks, Billy Edwards, " 1.1740 +"Andreas Sliwka, Paweł Sołyga, Eric Hanchrow, Steve Nicolai, Michał Masłowski, " 1.1741 +"Kevin Fitch, Johan Holmberg, Hal Wine, Volker Simonis, Thomas P Jakobsen, Ted " 1.1742 +"Stresen-Reuter, Stephen Rasku, Raphael Das Gupta, Ned Batchelder, Lou Keeble, " 1.1743 +"Li Linxiao, Kao Cardoso Félix, Joseph Wecker, Jon Prescot, Jon Maken, John " 1.1744 +"Yeary, Jason Harris, Geoffrey Zheng, Fredrik Jonson, Ed Davies, David " 1.1745 +"Zumbrunnen, David Mercer, David Cabana, Ben Karel, Alan Franzoni, Yousry " 1.1746 +"Abdallah, Whitney Young, Vinay Sajip, Tom Towle, Tim Ottinger, Thomas " 1.1747 +"Schraitle, Tero Saarni, Ted Mielczarek, Svetoslav Agafonkin, Shaun Rowland, " 1.1748 +"Rocco Rutte, Polo-Francois Poli, Philip Jenvey, Petr Tesałék, Peter R. " 1.1749 +"Annema, Paul Bonser, Olivier Scherler, Olivier Fournier, Nick Parker, Nick " 1.1750 +"Fabry, Nicholas Guarracino, Mike Driscoll, Mike Coleman, Mietek Bák, Michael " 1.1751 +"Maloney, László Nagy, Kent Johnson, Julio Nobrega, Jord Fita, Jonathan March, " 1.1752 +"Jonas Nockert, Jim Tittsler, Jeduan Cornejo Legorreta, Jan Larres, James " 1.1753 +"Murphy, Henri Wiechers, Hagen Möbius, Gábor Farkas, Fabien Engels, Evert Rol, " 1.1754 +"Evan Willms, Eduardo Felipe Castegnaro, Dennis Decker Jensen, Deniz Dogan, " 1.1755 +"David Smith, Daed Lee, Christine Slotty, Charles Merriam, Guillaume Catto, " 1.1756 +"Brian Dorsey, Bob Nystrom, Benoit Boissinot, Avi Rosenschein, Andrew Watts, " 1.1757 +"Andrew Donkin, Alexey Rodriguez, Ahmed Chaudhary." 1.1758 +msgstr "" 1.1759 + 1.1760 +#. type: Content of: <book><preface><sect1><title> 1.1761 +#: ../en/ch00-preface.xml:111 1.1762 +msgid "Conventions Used in This Book" 1.1763 +msgstr "" 1.1764 + 1.1765 +#. type: Content of: <book><preface><sect1><para> 1.1766 +#: ../en/ch00-preface.xml:113 1.1767 +msgid "The following typographical conventions are used in this book:" 1.1768 +msgstr "" 1.1769 + 1.1770 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 1.1771 +#: ../en/ch00-preface.xml:118 1.1772 +msgid "Italic" 1.1773 +msgstr "" 1.1774 + 1.1775 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 1.1776 +#: ../en/ch00-preface.xml:121 1.1777 +msgid "" 1.1778 +"Indicates new terms, URLs, email addresses, filenames, and file extensions." 1.1779 +msgstr "" 1.1780 + 1.1781 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 1.1782 +#: ../en/ch00-preface.xml:127 1.1783 +msgid "<literal>Constant width</literal>" 1.1784 +msgstr "" 1.1785 + 1.1786 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 1.1787 +#: ../en/ch00-preface.xml:130 1.1788 +msgid "" 1.1789 +"Used for program listings, as well as within paragraphs to refer to program " 1.1790 +"elements such as variable or function names, databases, data types, " 1.1791 +"environment variables, statements, and keywords." 1.1792 +msgstr "" 1.1793 + 1.1794 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 1.1795 +#: ../en/ch00-preface.xml:138 1.1796 +msgid "<userinput>Constant width bold</userinput>" 1.1797 +msgstr "" 1.1798 + 1.1799 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 1.1800 +#: ../en/ch00-preface.xml:141 1.1801 +msgid "Shows commands or other text that should be typed literally by the user." 1.1802 +msgstr "" 1.1803 + 1.1804 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 1.1805 +#: ../en/ch00-preface.xml:147 1.1806 +msgid "<replaceable>Constant width italic</replaceable>" 1.1807 +msgstr "" 1.1808 + 1.1809 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 1.1810 +#: ../en/ch00-preface.xml:150 1.1811 +msgid "" 1.1812 +"Shows text that should be replaced with user-supplied values or by values " 1.1813 +"determined by context." 1.1814 +msgstr "" 1.1815 + 1.1816 +#. type: Content of: <book><preface><sect1><tip><para> 1.1817 +#: ../en/ch00-preface.xml:157 1.1818 +msgid "This icon signifies a tip, suggestion, or general note." 1.1819 +msgstr "" 1.1820 + 1.1821 +#. type: Content of: <book><preface><sect1><caution><para> 1.1822 +#: ../en/ch00-preface.xml:162 1.1823 +msgid "This icon indicates a warning or caution." 1.1824 +msgstr "" 1.1825 + 1.1826 +#. type: Content of: <book><preface><sect1><title> 1.1827 +#: ../en/ch00-preface.xml:167 1.1828 +msgid "Using Code Examples" 1.1829 +msgstr "" 1.1830 + 1.1831 +#. type: Content of: <book><preface><sect1><para> 1.1832 +#: ../en/ch00-preface.xml:169 1.1833 +msgid "" 1.1834 +"This book is here to help you get your job done. In general, you may use the " 1.1835 +"code in this book in your programs and documentation. You do not need to " 1.1836 +"contact us for permission unless you’re reproducing a significant portion of " 1.1837 +"the code. For example, writing a program that uses several chunks of code " 1.1838 +"from this book does not require permission. Selling or distributing a CD-ROM " 1.1839 +"of examples from O’Reilly books does require permission. Answering a " 1.1840 +"question by citing this book and quoting example code does not require " 1.1841 +"permission. Incorporating a significant amount of example code from this book " 1.1842 +"into your product’s documentation does require permission." 1.1843 +msgstr "" 1.1844 + 1.1845 +#. type: Content of: <book><preface><sect1><para> 1.1846 +#: ../en/ch00-preface.xml:181 1.1847 +msgid "" 1.1848 +"We appreciate, but do not require, attribution. An attribution usually " 1.1849 +"includes the title, author, publisher, and ISBN. For example: “<emphasis>Book " 1.1850 +"Title</emphasis> by Some Author. Copyright 2008 O’Reilly Media, Inc., 978-0-" 1.1851 +"596-xxxx-x.”" 1.1852 +msgstr "" 1.1853 + 1.1854 +#. type: Content of: <book><preface><sect1><para> 1.1855 +#: ../en/ch00-preface.xml:187 1.1856 +msgid "" 1.1857 +"If you feel your use of code examples falls outside fair use or the " 1.1858 +"permission given above, feel free to contact us at <email>permissions@oreilly." 1.1859 +"com</email>." 1.1860 +msgstr "" 1.1861 + 1.1862 +#. type: Content of: <book><preface><sect1><title> 1.1863 +#: ../en/ch00-preface.xml:193 1.1864 +msgid "Safari® Books Online" 1.1865 +msgstr "" 1.1866 + 1.1867 +#. type: Content of: <book><preface><sect1><note><para> 1.1868 +#: ../en/ch00-preface.xml:196 1.1869 +msgid "" 1.1870 +"When you see a Safari® Books Online icon on the cover of your favorite " 1.1871 +"technology book, that means the book is available online through the O’Reilly " 1.1872 +"Network Safari Bookshelf." 1.1873 +msgstr "" 1.1874 + 1.1875 +#. type: Content of: <book><preface><sect1><para> 1.1876 +#: ../en/ch00-preface.xml:202 1.1877 +msgid "" 1.1878 +"Safari offers a solution that’s better than e-books. It’s a virtual library " 1.1879 +"that lets you easily search thousands of top tech books, cut and paste code " 1.1880 +"samples, download chapters, and find quick answers when you need the most " 1.1881 +"accurate, current information. Try it for free at <ulink role=\"orm:hideurl:" 1.1882 +"ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." 1.1883 +"safaribooksonline.com</ulink>." 1.1884 +msgstr "" 1.1885 + 1.1886 +#. type: Content of: <book><preface><sect1><title> 1.1887 +#: ../en/ch00-preface.xml:211 1.1888 +msgid "How to Contact Us" 1.1889 +msgstr "" 1.1890 + 1.1891 +#. type: Content of: <book><preface><sect1><para> 1.1892 +#: ../en/ch00-preface.xml:213 1.1893 +msgid "" 1.1894 +"Please address comments and questions concerning this book to the publisher:" 1.1895 +msgstr "" 1.1896 + 1.1897 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1898 +#: ../en/ch00-preface.xml:217 1.1899 +msgid "O’Reilly Media, Inc." 1.1900 +msgstr "" 1.1901 + 1.1902 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1903 +#: ../en/ch00-preface.xml:219 1.1904 +msgid "1005 Gravenstein Highway North" 1.1905 +msgstr "" 1.1906 + 1.1907 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1908 +#: ../en/ch00-preface.xml:221 1.1909 +msgid "Sebastopol, CA 95472" 1.1910 +msgstr "" 1.1911 + 1.1912 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1913 +#: ../en/ch00-preface.xml:223 1.1914 +msgid "800-998-9938 (in the United States or Canada)" 1.1915 +msgstr "" 1.1916 + 1.1917 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1918 +#: ../en/ch00-preface.xml:225 1.1919 +msgid "707-829-0515 (international or local)" 1.1920 +msgstr "" 1.1921 + 1.1922 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1923 +#: ../en/ch00-preface.xml:227 1.1924 +msgid "707 829-0104 (fax)" 1.1925 +msgstr "" 1.1926 + 1.1927 +#. type: Content of: <book><preface><sect1><para> 1.1928 +#: ../en/ch00-preface.xml:230 1.1929 +msgid "" 1.1930 +"We have a web page for this book, where we list errata, examples, and any " 1.1931 +"additional information. You can access this page at:" 1.1932 +msgstr "" 1.1933 + 1.1934 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1935 +#: ../en/ch00-preface.xml:235 1.1936 +msgid "" 1.1937 +"<ulink url=\"http://www.oreilly.com/catalog/<catalog page>\"></ulink>" 1.1938 +msgstr "" 1.1939 + 1.1940 +#. type: Content of: <book><preface><sect1><remark> 1.1941 +#: ../en/ch00-preface.xml:239 1.1942 +msgid "Don’t forget to update the <url> attribute, too." 1.1943 +msgstr "" 1.1944 + 1.1945 +#. type: Content of: <book><preface><sect1><para> 1.1946 +#: ../en/ch00-preface.xml:242 1.1947 +msgid "To comment or ask technical questions about this book, send email to:" 1.1948 +msgstr "" 1.1949 + 1.1950 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1951 +#: ../en/ch00-preface.xml:246 1.1952 +msgid "<email>bookquestions@oreilly.com</email>" 1.1953 +msgstr "" 1.1954 + 1.1955 +#. type: Content of: <book><preface><sect1><para> 1.1956 +#: ../en/ch00-preface.xml:249 1.1957 +msgid "" 1.1958 +"For more information about our books, conferences, Resource Centers, and the " 1.1959 +"O’Reilly Network, see our web site at:" 1.1960 +msgstr "" 1.1961 + 1.1962 +#. type: Content of: <book><preface><sect1><simplelist><member> 1.1963 +#: ../en/ch00-preface.xml:253 1.1964 +msgid "<ulink url=\"http://www.oreilly.com\"></ulink>" 1.1965 +msgstr "" 1.1966 + 1.1967 +#. type: Content of: <book><chapter><title> 1.1968 +#: ../en/ch01-intro.xml:5 1.1969 +msgid "How did we get here?" 1.1970 +msgstr "" 1.1971 + 1.1972 +#. type: Content of: <book><chapter><sect1><title> 1.1973 +#: ../en/ch01-intro.xml:8 1.1974 msgid "Why revision control? Why Mercurial?" 1.1975 msgstr "为什么使用版本控制? 为什么使用 Mercurial?" 1.1976 1.1977 -#. type: Content of: <book><preface><sect1><para> 1.1978 -#: ../en/ch00-preface.xml:10 1.1979 +#. type: Content of: <book><chapter><sect1><para> 1.1980 +#: ../en/ch01-intro.xml:10 1.1981 msgid "" 1.1982 "Revision control is the process of managing multiple versions of a piece of " 1.1983 "information. In its simplest form, this is something that many people do by " 1.1984 @@ -1226,8 +2395,8 @@ 1.1985 "number, each one higher than the number of the preceding version." 1.1986 msgstr "" 1.1987 1.1988 -#. type: Content of: <book><preface><sect1><para> 1.1989 -#: ../en/ch00-preface.xml:16 1.1990 +#. type: Content of: <book><chapter><sect1><para> 1.1991 +#: ../en/ch01-intro.xml:16 1.1992 msgid "" 1.1993 "Manually managing multiple versions of even a single file is an error-prone " 1.1994 "task, though, so software tools to help automate this process have long been " 1.1995 @@ -1239,16 +2408,16 @@ 1.1996 "working together on projects that consist of hundreds of thousands of files." 1.1997 msgstr "" 1.1998 1.1999 -#. type: Content of: <book><preface><sect1><para> 1.2000 -#: ../en/ch00-preface.xml:27 1.2001 +#. type: Content of: <book><chapter><sect1><para> 1.2002 +#: ../en/ch01-intro.xml:27 1.2003 msgid "" 1.2004 "The arrival of distributed revision control is relatively recent, and so far " 1.2005 "this new field has grown due to people's willingness to explore ill-charted " 1.2006 "territory." 1.2007 msgstr "" 1.2008 1.2009 -#. type: Content of: <book><preface><sect1><para> 1.2010 -#: ../en/ch00-preface.xml:31 1.2011 +#. type: Content of: <book><chapter><sect1><para> 1.2012 +#: ../en/ch01-intro.xml:31 1.2013 msgid "" 1.2014 "I am writing a book about distributed revision control because I believe that " 1.2015 "it is an important subject that deserves a field guide. I chose to write " 1.2016 @@ -1257,20 +2426,20 @@ 1.2017 "other revision control tools buckle." 1.2018 msgstr "" 1.2019 1.2020 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2021 -#: ../en/ch00-preface.xml:39 1.2022 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2023 +#: ../en/ch01-intro.xml:39 1.2024 msgid "Why use revision control?" 1.2025 msgstr "为什么使用版本控制?" 1.2026 1.2027 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2028 -#: ../en/ch00-preface.xml:41 1.2029 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2030 +#: ../en/ch01-intro.xml:41 1.2031 msgid "" 1.2032 "There are a number of reasons why you or your team might want to use an " 1.2033 "automated revision control tool for a project." 1.2034 msgstr "" 1.2035 1.2036 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2037 -#: ../en/ch00-preface.xml:46 1.2038 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2039 +#: ../en/ch01-intro.xml:46 1.2040 msgid "" 1.2041 "It will track the history and evolution of your project, so you don't have " 1.2042 "to. For every change, you'll have a log of <emphasis>who</emphasis> made it; " 1.2043 @@ -1278,8 +2447,8 @@ 1.2044 "it; and <emphasis>what</emphasis> the change was." 1.2045 msgstr "" 1.2046 1.2047 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2048 -#: ../en/ch00-preface.xml:53 1.2049 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2050 +#: ../en/ch01-intro.xml:53 1.2051 msgid "" 1.2052 "When you're working with other people, revision control software makes it " 1.2053 "easier for you to collaborate. For example, when people more or less " 1.2054 @@ -1287,8 +2456,8 @@ 1.2055 "you to identify and resolve those conflicts." 1.2056 msgstr "" 1.2057 1.2058 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2059 -#: ../en/ch00-preface.xml:59 1.2060 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2061 +#: ../en/ch01-intro.xml:59 1.2062 msgid "" 1.2063 "It can help you to recover from mistakes. If you make a change that later " 1.2064 "turns out to be in error, you can revert to an earlier version of one or more " 1.2065 @@ -1297,23 +2466,23 @@ 1.2066 "introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)." 1.2067 msgstr "" 1.2068 1.2069 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2070 -#: ../en/ch00-preface.xml:66 1.2071 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2072 +#: ../en/ch01-intro.xml:66 1.2073 msgid "" 1.2074 "It will help you to work simultaneously on, and manage the drift between, " 1.2075 "multiple versions of your project." 1.2076 msgstr "" 1.2077 1.2078 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2079 -#: ../en/ch00-preface.xml:71 1.2080 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2081 +#: ../en/ch01-intro.xml:71 1.2082 msgid "" 1.2083 "Most of these reasons are equally valid&emdash;at least in theory&emdash;" 1.2084 "whether you're working on a project by yourself, or with a hundred other " 1.2085 "people." 1.2086 msgstr "" 1.2087 1.2088 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2089 -#: ../en/ch00-preface.xml:76 1.2090 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2091 +#: ../en/ch01-intro.xml:76 1.2092 msgid "" 1.2093 "A key question about the practicality of revision control at these two " 1.2094 "different scales (<quote>lone hacker</quote> and <quote>huge team</quote>) is " 1.2095 @@ -1322,8 +2491,8 @@ 1.2096 "going to impose a high cost." 1.2097 msgstr "" 1.2098 1.2099 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2100 -#: ../en/ch00-preface.xml:84 1.2101 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2102 +#: ../en/ch01-intro.xml:84 1.2103 msgid "" 1.2104 "A five-hundred-person project is likely to collapse under its own weight " 1.2105 "almost immediately without a revision control tool and process. In this case, " 1.2106 @@ -1331,16 +2500,16 @@ 1.2107 "<emphasis>without</emphasis> it, failure is almost guaranteed." 1.2108 msgstr "" 1.2109 1.2110 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2111 -#: ../en/ch00-preface.xml:91 1.2112 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2113 +#: ../en/ch01-intro.xml:91 1.2114 msgid "" 1.2115 "On the other hand, a one-person <quote>quick hack</quote> might seem like a " 1.2116 "poor place to use a revision control tool, because surely the cost of using " 1.2117 "one must be close to the overall cost of the project. Right?" 1.2118 msgstr "" 1.2119 1.2120 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2121 -#: ../en/ch00-preface.xml:96 1.2122 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2123 +#: ../en/ch01-intro.xml:96 1.2124 msgid "" 1.2125 "Mercurial uniquely supports <emphasis>both</emphasis> of these scales of " 1.2126 "development. You can learn the basics in just a few minutes, and due to its " 1.2127 @@ -1352,81 +2521,67 @@ 1.2128 "projects." 1.2129 msgstr "" 1.2130 1.2131 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2132 -#: ../en/ch00-preface.xml:106 1.2133 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2134 +#: ../en/ch01-intro.xml:106 1.2135 msgid "" 1.2136 "No revision control tool can rescue a poorly run project, but a good choice " 1.2137 "of tools can make a huge difference to the fluidity with which you can work " 1.2138 "on a project." 1.2139 msgstr "" 1.2140 1.2141 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2142 -#: ../en/ch00-preface.xml:113 1.2143 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2144 +#: ../en/ch01-intro.xml:113 1.2145 msgid "The many names of revision control" 1.2146 msgstr "版本控制的别名" 1.2147 1.2148 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2149 -#: ../en/ch00-preface.xml:115 1.2150 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2151 +#: ../en/ch01-intro.xml:115 1.2152 msgid "" 1.2153 "Revision control is a diverse field, so much so that it is referred to by " 1.2154 "many names and acronyms. Here are a few of the more common variations you'll " 1.2155 "encounter:" 1.2156 msgstr "" 1.2157 1.2158 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2159 -#: ../en/ch00-preface.xml:119 1.2160 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2161 +#: ../en/ch01-intro.xml:119 1.2162 msgid "Revision control (RCS)" 1.2163 msgstr "版本控制(RCS)" 1.2164 1.2165 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2166 -#: ../en/ch00-preface.xml:120 1.2167 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2168 +#: ../en/ch01-intro.xml:120 1.2169 msgid "Software configuration management (SCM), or configuration management" 1.2170 msgstr "软件配置管理(SCM),或配置管理" 1.2171 1.2172 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2173 -#: ../en/ch00-preface.xml:122 1.2174 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2175 +#: ../en/ch01-intro.xml:122 1.2176 msgid "Source code management" 1.2177 msgstr "源代码管理" 1.2178 1.2179 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2180 -#: ../en/ch00-preface.xml:123 1.2181 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2182 +#: ../en/ch01-intro.xml:123 1.2183 msgid "Source code control, or source control" 1.2184 msgstr "源代码控制,或源控制" 1.2185 1.2186 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1.2187 -#: ../en/ch00-preface.xml:125 1.2188 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.2189 +#: ../en/ch01-intro.xml:125 1.2190 msgid "Version control (VCS)" 1.2191 msgstr "版本控制(VCS)" 1.2192 1.2193 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2194 -#: ../en/ch00-preface.xml:127 1.2195 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2196 +#: ../en/ch01-intro.xml:127 1.2197 msgid "" 1.2198 "Some people claim that these terms actually have different meanings, but in " 1.2199 "practice they overlap so much that there's no agreed or even useful way to " 1.2200 "tease them apart." 1.2201 msgstr "" 1.2202 1.2203 -#. type: Content of: <book><preface><sect1><title> 1.2204 -#: ../en/ch00-preface.xml:135 1.2205 -msgid "This book is a work in progress" 1.2206 -msgstr "本书正在编写中" 1.2207 - 1.2208 -#. type: Content of: <book><preface><sect1><para> 1.2209 -#: ../en/ch00-preface.xml:137 1.2210 -msgid "" 1.2211 -"I am releasing this book while I am still writing it, in the hope that it " 1.2212 -"will prove useful to others. I am writing under an open license in the hope " 1.2213 -"that you, my readers, will contribute feedback and perhaps content of your " 1.2214 -"own." 1.2215 -msgstr "" 1.2216 - 1.2217 -#. type: Content of: <book><preface><sect1><title> 1.2218 -#: ../en/ch00-preface.xml:144 1.2219 +#. type: Content of: <book><chapter><sect1><title> 1.2220 +#: ../en/ch01-intro.xml:135 1.2221 msgid "About the examples in this book" 1.2222 msgstr "本书的例子" 1.2223 1.2224 -#. type: Content of: <book><preface><sect1><para> 1.2225 -#: ../en/ch00-preface.xml:146 1.2226 +#. type: Content of: <book><chapter><sect1><para> 1.2227 +#: ../en/ch01-intro.xml:137 1.2228 msgid "" 1.2229 "This book takes an unusual approach to code samples. Every example is " 1.2230 "<quote>live</quote>&emdash;each one is actually the result of a shell script " 1.2231 @@ -1435,8 +2590,8 @@ 1.2232 "run, and their current results compared against their expected results." 1.2233 msgstr "" 1.2234 1.2235 -#. type: Content of: <book><preface><sect1><para> 1.2236 -#: ../en/ch00-preface.xml:153 1.2237 +#. type: Content of: <book><chapter><sect1><para> 1.2238 +#: ../en/ch01-intro.xml:144 1.2239 msgid "" 1.2240 "The advantage of this approach is that the examples are always accurate; they " 1.2241 "describe <emphasis>exactly</emphasis> the behavior of the version of " 1.2242 @@ -1445,8 +2600,8 @@ 1.2243 "the build fails." 1.2244 msgstr "" 1.2245 1.2246 -#. type: Content of: <book><preface><sect1><para> 1.2247 -#: ../en/ch00-preface.xml:160 1.2248 +#. type: Content of: <book><chapter><sect1><para> 1.2249 +#: ../en/ch01-intro.xml:151 1.2250 msgid "" 1.2251 "There is a small disadvantage to this approach, which is that the dates and " 1.2252 "times you'll see in examples tend to be <quote>squashed</quote> together in a " 1.2253 @@ -1456,8 +2611,8 @@ 1.2254 "run many commands in one second." 1.2255 msgstr "" 1.2256 1.2257 -#. type: Content of: <book><preface><sect1><para> 1.2258 -#: ../en/ch00-preface.xml:168 1.2259 +#. type: Content of: <book><chapter><sect1><para> 1.2260 +#: ../en/ch01-intro.xml:159 1.2261 msgid "" 1.2262 "As an instance of this, several consecutive commits in an example can show up " 1.2263 "as having occurred during the same second. You can see this occur in the " 1.2264 @@ -1465,29 +2620,29 @@ 1.2265 "bisect\"/>, for instance." 1.2266 msgstr "" 1.2267 1.2268 -#. type: Content of: <book><preface><sect1><para> 1.2269 -#: ../en/ch00-preface.xml:174 1.2270 +#. type: Content of: <book><chapter><sect1><para> 1.2271 +#: ../en/ch01-intro.xml:165 1.2272 msgid "" 1.2273 "So when you're reading examples, don't place too much weight on the dates or " 1.2274 "times you see in the output of commands. But <emphasis>do</emphasis> be " 1.2275 "confident that the behavior you're seeing is consistent and reproducible." 1.2276 msgstr "" 1.2277 1.2278 -#. type: Content of: <book><preface><sect1><title> 1.2279 -#: ../en/ch00-preface.xml:182 1.2280 +#. type: Content of: <book><chapter><sect1><title> 1.2281 +#: ../en/ch01-intro.xml:173 1.2282 msgid "Trends in the field" 1.2283 msgstr "版本控制的发展趋势" 1.2284 1.2285 -#. type: Content of: <book><preface><sect1><para> 1.2286 -#: ../en/ch00-preface.xml:184 1.2287 +#. type: Content of: <book><chapter><sect1><para> 1.2288 +#: ../en/ch01-intro.xml:175 1.2289 msgid "" 1.2290 "There has been an unmistakable trend in the development and use of revision " 1.2291 "control tools over the past four decades, as people have become familiar with " 1.2292 "the capabilities of their tools and constrained by their limitations." 1.2293 msgstr "" 1.2294 1.2295 -#. type: Content of: <book><preface><sect1><para> 1.2296 -#: ../en/ch00-preface.xml:189 1.2297 +#. type: Content of: <book><chapter><sect1><para> 1.2298 +#: ../en/ch01-intro.xml:180 1.2299 msgid "" 1.2300 "The first generation began by managing single files on individual computers. " 1.2301 "Although these tools represented a huge advance over ad-hoc manual revision " 1.2302 @@ -1495,8 +2650,8 @@ 1.2303 "to small, tightly-knit teams." 1.2304 msgstr "" 1.2305 1.2306 -#. type: Content of: <book><preface><sect1><para> 1.2307 -#: ../en/ch00-preface.xml:195 1.2308 +#. type: Content of: <book><chapter><sect1><para> 1.2309 +#: ../en/ch01-intro.xml:186 1.2310 msgid "" 1.2311 "The second generation loosened these constraints by moving to network-" 1.2312 "centered architectures, and managing entire projects at a time. As projects " 1.2313 @@ -1509,8 +2664,8 @@ 1.2314 "natural way, as they could not record their changes." 1.2315 msgstr "" 1.2316 1.2317 -#. type: Content of: <book><preface><sect1><para> 1.2318 -#: ../en/ch00-preface.xml:207 1.2319 +#. type: Content of: <book><chapter><sect1><para> 1.2320 +#: ../en/ch01-intro.xml:198 1.2321 msgid "" 1.2322 "The current generation of revision control tools is peer-to-peer in nature. " 1.2323 "All of these systems have dropped the dependency on a single central server, " 1.2324 @@ -1521,13 +2676,13 @@ 1.2325 "when syncing changes with another repository." 1.2326 msgstr "" 1.2327 1.2328 -#. type: Content of: <book><preface><sect1><title> 1.2329 -#: ../en/ch00-preface.xml:219 1.2330 +#. type: Content of: <book><chapter><sect1><title> 1.2331 +#: ../en/ch01-intro.xml:210 1.2332 msgid "A few of the advantages of distributed revision control" 1.2333 msgstr "分布版本控制的优点" 1.2334 1.2335 -#. type: Content of: <book><preface><sect1><para> 1.2336 -#: ../en/ch00-preface.xml:222 1.2337 +#. type: Content of: <book><chapter><sect1><para> 1.2338 +#: ../en/ch01-intro.xml:213 1.2339 msgid "" 1.2340 "Even though distributed revision control tools have for several years been as " 1.2341 "robust and usable as their previous-generation counterparts, people using " 1.2342 @@ -1536,8 +2691,8 @@ 1.2343 "ones." 1.2344 msgstr "" 1.2345 1.2346 -#. type: Content of: <book><preface><sect1><para> 1.2347 -#: ../en/ch00-preface.xml:229 1.2348 +#. type: Content of: <book><chapter><sect1><para> 1.2349 +#: ../en/ch01-intro.xml:220 1.2350 msgid "" 1.2351 "For an individual developer, distributed tools are almost always much faster " 1.2352 "than centralised tools. This is for a simple reason: a centralised tool " 1.2353 @@ -1549,8 +2704,8 @@ 1.2354 "interacting with your revision control software." 1.2355 msgstr "" 1.2356 1.2357 -#. type: Content of: <book><preface><sect1><para> 1.2358 -#: ../en/ch00-preface.xml:240 1.2359 +#. type: Content of: <book><chapter><sect1><para> 1.2360 +#: ../en/ch01-intro.xml:231 1.2361 msgid "" 1.2362 "Distributed tools are indifferent to the vagaries of your server " 1.2363 "infrastructure, again because they replicate metadata to so many locations. " 1.2364 @@ -1560,8 +2715,8 @@ 1.2365 "available on every contributor's computer." 1.2366 msgstr "" 1.2367 1.2368 -#. type: Content of: <book><preface><sect1><para> 1.2369 -#: ../en/ch00-preface.xml:248 1.2370 +#. type: Content of: <book><chapter><sect1><para> 1.2371 +#: ../en/ch01-intro.xml:239 1.2372 msgid "" 1.2373 "The reliability of your network will affect distributed tools far less than " 1.2374 "it will centralised tools. You can't even use a centralised tool without a " 1.2375 @@ -1573,13 +2728,13 @@ 1.2376 "may be significant." 1.2377 msgstr "" 1.2378 1.2379 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2380 -#: ../en/ch00-preface.xml:259 1.2381 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2382 +#: ../en/ch01-intro.xml:250 1.2383 msgid "Advantages for open source projects" 1.2384 msgstr "开源项目的优点" 1.2385 1.2386 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2387 -#: ../en/ch00-preface.xml:261 1.2388 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2389 +#: ../en/ch01-intro.xml:252 1.2390 msgid "" 1.2391 "If you take a shine to an open source project and decide that you would like " 1.2392 "to start hacking on it, and that project uses a distributed revision control " 1.2393 @@ -1594,13 +2749,13 @@ 1.2394 "your client's view of the repository." 1.2395 msgstr "" 1.2396 1.2397 -#. type: Content of: <book><preface><sect1><sect2><sect3><title> 1.2398 -#: ../en/ch00-preface.xml:277 1.2399 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.2400 +#: ../en/ch01-intro.xml:268 1.2401 msgid "The forking non-problem" 1.2402 msgstr "分叉不是问题" 1.2403 1.2404 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 1.2405 -#: ../en/ch00-preface.xml:279 1.2406 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.2407 +#: ../en/ch01-intro.xml:270 1.2408 msgid "" 1.2409 "It has been suggested that distributed revision control tools pose some sort " 1.2410 "of risk to open source projects because they make it easy to <quote>fork</" 1.2411 @@ -1611,8 +2766,8 @@ 1.2412 "own direction." 1.2413 msgstr "" 1.2414 1.2415 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 1.2416 -#: ../en/ch00-preface.xml:289 1.2417 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.2418 +#: ../en/ch01-intro.xml:280 1.2419 msgid "" 1.2420 "Sometimes the camps in a fork decide to reconcile their differences. With a " 1.2421 "centralised revision control system, the <emphasis>technical</emphasis> " 1.2422 @@ -1622,8 +2777,8 @@ 1.2423 "usually loses some or all of one side's revision history." 1.2424 msgstr "" 1.2425 1.2426 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 1.2427 -#: ../en/ch00-preface.xml:298 1.2428 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.2429 +#: ../en/ch01-intro.xml:289 1.2430 msgid "" 1.2431 "What distributed tools do with respect to forking is they make forking the " 1.2432 "<emphasis>only</emphasis> way to develop a project. Every single change that " 1.2433 @@ -1633,8 +2788,8 @@ 1.2434 "they happen all the time." 1.2435 msgstr "" 1.2436 1.2437 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 1.2438 -#: ../en/ch00-preface.xml:307 1.2439 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.2440 +#: ../en/ch01-intro.xml:298 1.2441 msgid "" 1.2442 "If every piece of work that everybody does, all the time, is framed in terms " 1.2443 "of forking and merging, then what the open source world refers to as a " 1.2444 @@ -1643,23 +2798,23 @@ 1.2445 "fork:" 1.2446 msgstr "" 1.2447 1.2448 -#. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para> 1.2449 -#: ../en/ch00-preface.xml:314 1.2450 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.2451 +#: ../en/ch01-intro.xml:305 1.2452 msgid "" 1.2453 "They eliminate the social distinction that centralised tools impose: that " 1.2454 "between insiders (people with commit access) and outsiders (people without)." 1.2455 msgstr "" 1.2456 1.2457 -#. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para> 1.2458 -#: ../en/ch00-preface.xml:318 1.2459 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.2460 +#: ../en/ch01-intro.xml:309 1.2461 msgid "" 1.2462 "They make it easier to reconcile after a social fork, because all that's " 1.2463 "involved from the perspective of the revision control software is just " 1.2464 "another merge." 1.2465 msgstr "" 1.2466 1.2467 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 1.2468 -#: ../en/ch00-preface.xml:323 1.2469 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.2470 +#: ../en/ch01-intro.xml:314 1.2471 msgid "" 1.2472 "Some people resist distributed tools because they want to retain tight " 1.2473 "control over their projects, and they believe that centralised tools give " 1.2474 @@ -1671,13 +2826,13 @@ 1.2475 "people feel compelled to mirror and fork your history." 1.2476 msgstr "" 1.2477 1.2478 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2479 -#: ../en/ch00-preface.xml:338 1.2480 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2481 +#: ../en/ch01-intro.xml:329 1.2482 msgid "Advantages for commercial projects" 1.2483 msgstr "商业项目的优点" 1.2484 1.2485 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2486 -#: ../en/ch00-preface.xml:340 1.2487 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2488 +#: ../en/ch01-intro.xml:331 1.2489 msgid "" 1.2490 "Many commercial projects are undertaken by teams that are scattered across " 1.2491 "the globe. Contributors who are far from a central server will see slower " 1.2492 @@ -1690,8 +2845,8 @@ 1.2493 "expensive long-haul network links." 1.2494 msgstr "" 1.2495 1.2496 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2497 -#: ../en/ch00-preface.xml:352 1.2498 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2499 +#: ../en/ch01-intro.xml:343 1.2500 msgid "" 1.2501 "Centralised revision control systems tend to have relatively low " 1.2502 "scalability. It's not unusual for an expensive centralised system to fall " 1.2503 @@ -1704,8 +2859,8 @@ 1.2504 "of scripting." 1.2505 msgstr "" 1.2506 1.2507 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2508 -#: ../en/ch00-preface.xml:364 1.2509 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2510 +#: ../en/ch01-intro.xml:355 1.2511 msgid "" 1.2512 "If you have an employee in the field, troubleshooting a problem at a " 1.2513 "customer's site, they'll benefit from distributed revision control. The tool " 1.2514 @@ -1715,40 +2870,40 @@ 1.2515 "to your company's network." 1.2516 msgstr "" 1.2517 1.2518 -#. type: Content of: <book><preface><sect1><title> 1.2519 -#: ../en/ch00-preface.xml:375 1.2520 +#. type: Content of: <book><chapter><sect1><title> 1.2521 +#: ../en/ch01-intro.xml:366 1.2522 msgid "Why choose Mercurial?" 1.2523 msgstr "为什么选择 Mercurial?" 1.2524 1.2525 -#. type: Content of: <book><preface><sect1><para> 1.2526 -#: ../en/ch00-preface.xml:377 1.2527 +#. type: Content of: <book><chapter><sect1><para> 1.2528 +#: ../en/ch01-intro.xml:368 1.2529 msgid "" 1.2530 "Mercurial has a unique set of properties that make it a particularly good " 1.2531 "choice as a revision control system." 1.2532 msgstr "" 1.2533 1.2534 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2535 -#: ../en/ch00-preface.xml:380 1.2536 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.2537 +#: ../en/ch01-intro.xml:371 1.2538 msgid "It is easy to learn and use." 1.2539 msgstr "" 1.2540 1.2541 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2542 -#: ../en/ch00-preface.xml:381 1.2543 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.2544 +#: ../en/ch01-intro.xml:372 1.2545 msgid "It is lightweight." 1.2546 msgstr "" 1.2547 1.2548 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2549 -#: ../en/ch00-preface.xml:382 1.2550 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.2551 +#: ../en/ch01-intro.xml:373 1.2552 msgid "It scales excellently." 1.2553 msgstr "" 1.2554 1.2555 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2556 -#: ../en/ch00-preface.xml:383 1.2557 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.2558 +#: ../en/ch01-intro.xml:374 1.2559 msgid "It is easy to customise." 1.2560 msgstr "" 1.2561 1.2562 -#. type: Content of: <book><preface><sect1><para> 1.2563 -#: ../en/ch00-preface.xml:386 1.2564 +#. type: Content of: <book><chapter><sect1><para> 1.2565 +#: ../en/ch01-intro.xml:377 1.2566 msgid "" 1.2567 "If you are at all familiar with revision control systems, you should be able " 1.2568 "to get up and running with Mercurial in less than five minutes. Even if not, " 1.2569 @@ -1757,8 +2912,8 @@ 1.2570 "few general rules instead of a host of exceptions." 1.2571 msgstr "" 1.2572 1.2573 -#. type: Content of: <book><preface><sect1><para> 1.2574 -#: ../en/ch00-preface.xml:393 1.2575 +#. type: Content of: <book><chapter><sect1><para> 1.2576 +#: ../en/ch01-intro.xml:384 1.2577 msgid "" 1.2578 "On a small project, you can start working with Mercurial in moments. Creating " 1.2579 "new changes and branches; transferring changes around (whether locally or " 1.2580 @@ -1767,16 +2922,16 @@ 1.2581 "cognitive overhead with blazingly fast operations." 1.2582 msgstr "" 1.2583 1.2584 -#. type: Content of: <book><preface><sect1><para> 1.2585 -#: ../en/ch00-preface.xml:400 1.2586 +#. type: Content of: <book><chapter><sect1><para> 1.2587 +#: ../en/ch01-intro.xml:391 1.2588 msgid "" 1.2589 "The usefulness of Mercurial is not limited to small projects: it is used by " 1.2590 "projects with hundreds to thousands of contributors, each containing tens of " 1.2591 "thousands of files and hundreds of megabytes of source code." 1.2592 msgstr "" 1.2593 1.2594 -#. type: Content of: <book><preface><sect1><para> 1.2595 -#: ../en/ch00-preface.xml:405 1.2596 +#. type: Content of: <book><chapter><sect1><para> 1.2597 +#: ../en/ch01-intro.xml:396 1.2598 msgid "" 1.2599 "If the core functionality of Mercurial is not enough for you, it's easy to " 1.2600 "build on. Mercurial is well suited to scripting tasks, and its clean " 1.2601 @@ -1786,13 +2941,13 @@ 1.2602 "performance." 1.2603 msgstr "" 1.2604 1.2605 -#. type: Content of: <book><preface><sect1><title> 1.2606 -#: ../en/ch00-preface.xml:415 1.2607 +#. type: Content of: <book><chapter><sect1><title> 1.2608 +#: ../en/ch01-intro.xml:406 1.2609 msgid "Mercurial compared with other tools" 1.2610 msgstr "Mercurial 与其它工具的比较" 1.2611 1.2612 -#. type: Content of: <book><preface><sect1><para> 1.2613 -#: ../en/ch00-preface.xml:417 1.2614 +#. type: Content of: <book><chapter><sect1><para> 1.2615 +#: ../en/ch01-intro.xml:408 1.2616 msgid "" 1.2617 "Before you read on, please understand that this section necessarily reflects " 1.2618 "my own experiences, interests, and (dare I say it) biases. I have used every " 1.2619 @@ -1800,28 +2955,23 @@ 1.2620 "years at a time." 1.2621 msgstr "" 1.2622 1.2623 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2624 -#: ../en/ch00-preface.xml:425 ../en/ch00-preface.xml:636 1.2625 -msgid "Subversion" 1.2626 -msgstr "" 1.2627 - 1.2628 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2629 -#: ../en/ch00-preface.xml:427 1.2630 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2631 +#: ../en/ch01-intro.xml:418 1.2632 msgid "" 1.2633 "Subversion is a popular revision control tool, developed to replace CVS. It " 1.2634 "has a centralised client/server architecture." 1.2635 msgstr "" 1.2636 1.2637 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2638 -#: ../en/ch00-preface.xml:431 1.2639 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2640 +#: ../en/ch01-intro.xml:422 1.2641 msgid "" 1.2642 "Subversion and Mercurial have similarly named commands for performing the " 1.2643 "same operations, so if you're familiar with one, it is easy to learn to use " 1.2644 "the other. Both tools are portable to all popular operating systems." 1.2645 msgstr "" 1.2646 1.2647 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2648 -#: ../en/ch00-preface.xml:436 1.2649 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2650 +#: ../en/ch01-intro.xml:427 1.2651 msgid "" 1.2652 "Prior to version 1.5, Subversion had no useful support for merges. At the " 1.2653 "time of writing, its merge tracking capability is new, and known to be <ulink " 1.2654 @@ -1829,8 +2979,8 @@ 1.2655 "html#svn.branchmerge.advanced.finalword\">complicated and buggy</ulink>." 1.2656 msgstr "" 1.2657 1.2658 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2659 -#: ../en/ch00-preface.xml:442 1.2660 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2661 +#: ../en/ch01-intro.xml:433 1.2662 msgid "" 1.2663 "Mercurial has a substantial performance advantage over Subversion on every " 1.2664 "revision control operation I have benchmarked. I have measured its advantage " 1.2665 @@ -1843,8 +2993,8 @@ 1.2666 "network bandwidth become bottlenecks for modestly large projects." 1.2667 msgstr "" 1.2668 1.2669 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2670 -#: ../en/ch00-preface.xml:455 1.2671 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2672 +#: ../en/ch01-intro.xml:446 1.2673 msgid "" 1.2674 "Additionally, Subversion incurs substantial storage overhead to avoid network " 1.2675 "transactions for a few common operations, such as finding modified files " 1.2676 @@ -1855,8 +3005,8 @@ 1.2677 "of the project." 1.2678 msgstr "" 1.2679 1.2680 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2681 -#: ../en/ch00-preface.xml:465 1.2682 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2683 +#: ../en/ch01-intro.xml:456 1.2684 msgid "" 1.2685 "Subversion is widely supported by third party tools. Mercurial currently " 1.2686 "lags considerably in this area. This gap is closing, however, and indeed " 1.2687 @@ -1864,8 +3014,8 @@ 1.2688 "Like Mercurial, Subversion has an excellent user manual." 1.2689 msgstr "" 1.2690 1.2691 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2692 -#: ../en/ch00-preface.xml:471 1.2693 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2694 +#: ../en/ch01-intro.xml:462 1.2695 msgid "" 1.2696 "Because Subversion doesn't store revision history on the client, it is well " 1.2697 "suited to managing projects that deal with lots of large, opaque binary " 1.2698 @@ -1875,8 +3025,8 @@ 1.2699 "because the differences between each revision are large." 1.2700 msgstr "" 1.2701 1.2702 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2703 -#: ../en/ch00-preface.xml:480 1.2704 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2705 +#: ../en/ch01-intro.xml:471 1.2706 msgid "" 1.2707 "In addition, it's often difficult or, more usually, impossible to merge " 1.2708 "different versions of a binary file. Subversion's ability to let a user lock " 1.2709 @@ -1885,8 +3035,8 @@ 1.2710 "widely used." 1.2711 msgstr "" 1.2712 1.2713 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2714 -#: ../en/ch00-preface.xml:487 1.2715 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2716 +#: ../en/ch01-intro.xml:478 1.2717 msgid "" 1.2718 "Mercurial can import revision history from a Subversion repository. It can " 1.2719 "also export revision history to a Subversion repository. This makes it easy " 1.2720 @@ -1896,29 +3046,29 @@ 1.2721 "afterwards to bring in new changes." 1.2722 msgstr "" 1.2723 1.2724 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2725 -#: ../en/ch00-preface.xml:499 ../en/ch00-preface.xml:638 1.2726 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.2727 +#: ../en/ch01-intro.xml:490 ../en/ch01-intro.xml:629 1.2728 msgid "Git" 1.2729 msgstr "Git" 1.2730 1.2731 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2732 -#: ../en/ch00-preface.xml:501 1.2733 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2734 +#: ../en/ch01-intro.xml:492 1.2735 msgid "" 1.2736 "Git is a distributed revision control tool that was developed for managing " 1.2737 "the Linux kernel source tree. Like Mercurial, its early design was somewhat " 1.2738 "influenced by Monotone." 1.2739 msgstr "" 1.2740 1.2741 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2742 -#: ../en/ch00-preface.xml:506 1.2743 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2744 +#: ../en/ch01-intro.xml:497 1.2745 msgid "" 1.2746 "Git has a very large command set, with version 1.5.0 providing 139 individual " 1.2747 "commands. It has something of a reputation for being difficult to learn. " 1.2748 "Compared to Git, Mercurial has a strong focus on simplicity." 1.2749 msgstr "" 1.2750 1.2751 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2752 -#: ../en/ch00-preface.xml:511 1.2753 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2754 +#: ../en/ch01-intro.xml:502 1.2755 msgid "" 1.2756 "In terms of performance, Git is extremely fast. In several cases, it is " 1.2757 "faster than Mercurial, at least on Linux, while Mercurial performs better on " 1.2758 @@ -1927,8 +3077,8 @@ 1.2759 "Mercurial." 1.2760 msgstr "" 1.2761 1.2762 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2763 -#: ../en/ch00-preface.xml:518 1.2764 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2765 +#: ../en/ch01-intro.xml:509 1.2766 msgid "" 1.2767 "While a Mercurial repository needs no maintenance, a Git repository requires " 1.2768 "frequent manual <quote>repacks</quote> of its metadata. Without these, " 1.2769 @@ -1940,8 +3090,8 @@ 1.2770 "repository, but an unpacked repository is several orders of magnitude larger." 1.2771 msgstr "" 1.2772 1.2773 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2774 -#: ../en/ch00-preface.xml:529 1.2775 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2776 +#: ../en/ch01-intro.xml:520 1.2777 msgid "" 1.2778 "The core of Git is written in C. Many Git commands are implemented as shell " 1.2779 "or Perl scripts, and the quality of these scripts varies widely. I have " 1.2780 @@ -1949,26 +3099,21 @@ 1.2781 "presence of errors that should have been fatal." 1.2782 msgstr "" 1.2783 1.2784 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2785 -#: ../en/ch00-preface.xml:535 1.2786 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2787 +#: ../en/ch01-intro.xml:526 1.2788 msgid "Mercurial can import revision history from a Git repository." 1.2789 msgstr "" 1.2790 1.2791 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2792 -#: ../en/ch00-preface.xml:541 ../en/ch00-preface.xml:637 1.2793 -msgid "CVS" 1.2794 -msgstr "CVS" 1.2795 - 1.2796 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2797 -#: ../en/ch00-preface.xml:543 1.2798 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2799 +#: ../en/ch01-intro.xml:534 1.2800 msgid "" 1.2801 "CVS is probably the most widely used revision control tool in the world. Due " 1.2802 "to its age and internal untidiness, it has been only lightly maintained for " 1.2803 "many years." 1.2804 msgstr "" 1.2805 1.2806 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2807 -#: ../en/ch00-preface.xml:547 1.2808 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2809 +#: ../en/ch01-intro.xml:538 1.2810 msgid "" 1.2811 "It has a centralised client/server architecture. It does not group related " 1.2812 "file changes into atomic commits, making it easy for people to <quote>break " 1.2813 @@ -1981,8 +3126,8 @@ 1.2814 "those files were)." 1.2815 msgstr "" 1.2816 1.2817 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2818 -#: ../en/ch00-preface.xml:559 1.2819 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2820 +#: ../en/ch01-intro.xml:550 1.2821 msgid "" 1.2822 "CVS has a muddled notion of tags and branches that I will not attempt to even " 1.2823 "describe. It does not support renaming of files or directories well, making " 1.2824 @@ -1992,8 +3137,8 @@ 1.2825 "existing or new." 1.2826 msgstr "" 1.2827 1.2828 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2829 -#: ../en/ch00-preface.xml:567 1.2830 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2831 +#: ../en/ch01-intro.xml:558 1.2832 msgid "" 1.2833 "Mercurial can import CVS revision history. However, there are a few caveats " 1.2834 "that apply; these are true of every other revision control tool's CVS " 1.2835 @@ -2007,18 +3152,18 @@ 1.2836 "of the less interesting problems I can recall from personal experience)." 1.2837 msgstr "" 1.2838 1.2839 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2840 -#: ../en/ch00-preface.xml:581 1.2841 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2842 +#: ../en/ch01-intro.xml:572 1.2843 msgid "Mercurial can import revision history from a CVS repository." 1.2844 msgstr "" 1.2845 1.2846 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2847 -#: ../en/ch00-preface.xml:587 1.2848 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2849 +#: ../en/ch01-intro.xml:578 1.2850 msgid "Commercial tools" 1.2851 msgstr "商业工具" 1.2852 1.2853 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2854 -#: ../en/ch00-preface.xml:589 1.2855 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2856 +#: ../en/ch01-intro.xml:580 1.2857 msgid "" 1.2858 "Perforce has a centralised client/server architecture, with no client-side " 1.2859 "caching of any data. Unlike modern revision control tools, Perforce requires " 1.2860 @@ -2026,8 +3171,8 @@ 1.2861 "to edit." 1.2862 msgstr "" 1.2863 1.2864 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2865 -#: ../en/ch00-preface.xml:595 1.2866 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2867 +#: ../en/ch01-intro.xml:586 1.2868 msgid "" 1.2869 "The performance of Perforce is quite good for small teams, but it falls off " 1.2870 "rapidly as the number of users grows beyond a few dozen. Modestly large " 1.2871 @@ -2035,41 +3180,41 @@ 1.2872 "load their users generate." 1.2873 msgstr "" 1.2874 1.2875 -#. type: Content of: <book><preface><sect1><sect2><title> 1.2876 -#: ../en/ch00-preface.xml:604 1.2877 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.2878 +#: ../en/ch01-intro.xml:595 1.2879 msgid "Choosing a revision control tool" 1.2880 msgstr "选择版本控制工具" 1.2881 1.2882 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2883 -#: ../en/ch00-preface.xml:606 1.2884 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2885 +#: ../en/ch01-intro.xml:597 1.2886 msgid "" 1.2887 "With the exception of CVS, all of the tools listed above have unique " 1.2888 "strengths that suit them to particular styles of work. There is no single " 1.2889 "revision control tool that is best in all situations." 1.2890 msgstr "" 1.2891 1.2892 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2893 -#: ../en/ch00-preface.xml:611 1.2894 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2895 +#: ../en/ch01-intro.xml:602 1.2896 msgid "" 1.2897 "As an example, Subversion is a good choice for working with frequently edited " 1.2898 "binary files, due to its centralised nature and support for file locking." 1.2899 msgstr "" 1.2900 1.2901 -#. type: Content of: <book><preface><sect1><sect2><para> 1.2902 -#: ../en/ch00-preface.xml:615 1.2903 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.2904 +#: ../en/ch01-intro.xml:606 1.2905 msgid "" 1.2906 "I personally find Mercurial's properties of simplicity, performance, and good " 1.2907 "merge support to be a compelling combination that has served me well for " 1.2908 "several years." 1.2909 msgstr "" 1.2910 1.2911 -#. type: Content of: <book><preface><sect1><title> 1.2912 -#: ../en/ch00-preface.xml:623 1.2913 +#. type: Content of: <book><chapter><sect1><title> 1.2914 +#: ../en/ch01-intro.xml:614 1.2915 msgid "Switching from another tool to Mercurial" 1.2916 msgstr "从其它工具切换到 Mercurial" 1.2917 1.2918 -#. type: Content of: <book><preface><sect1><para> 1.2919 -#: ../en/ch00-preface.xml:625 1.2920 +#. type: Content of: <book><chapter><sect1><para> 1.2921 +#: ../en/ch01-intro.xml:616 1.2922 msgid "" 1.2923 "Mercurial is bundled with an extension named <literal role=\"hg-ext" 1.2924 "\">convert</literal>, which can incrementally import revision history from " 1.2925 @@ -2079,20 +3224,15 @@ 1.2926 "conversion." 1.2927 msgstr "" 1.2928 1.2929 -#. type: Content of: <book><preface><sect1><para> 1.2930 -#: ../en/ch00-preface.xml:633 1.2931 +#. type: Content of: <book><chapter><sect1><para> 1.2932 +#: ../en/ch01-intro.xml:624 1.2933 msgid "" 1.2934 "The revision control tools supported by <literal role=\"hg-ext\">convert</" 1.2935 "literal> are as follows:" 1.2936 msgstr "<literal role=\"hg-ext\">convert</literal> 支持的版本控制工具有:" 1.2937 1.2938 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 1.2939 -#: ../en/ch00-preface.xml:639 1.2940 -msgid "Darcs" 1.2941 -msgstr "Darcs" 1.2942 - 1.2943 -#. type: Content of: <book><preface><sect1><para> 1.2944 -#: ../en/ch00-preface.xml:641 1.2945 +#. type: Content of: <book><chapter><sect1><para> 1.2946 +#: ../en/ch01-intro.xml:632 1.2947 msgid "" 1.2948 "In addition, <literal role=\"hg-ext\">convert</literal> can export changes " 1.2949 "from Mercurial to Subversion. This makes it possible to try Subversion and " 1.2950 @@ -2100,8 +3240,8 @@ 1.2951 "loss of any work." 1.2952 msgstr "" 1.2953 1.2954 -#. type: Content of: <book><preface><sect1><para> 1.2955 -#: ../en/ch00-preface.xml:647 1.2956 +#. type: Content of: <book><chapter><sect1><para> 1.2957 +#: ../en/ch01-intro.xml:638 1.2958 msgid "" 1.2959 "The <command role=\"hg-ext-convert\">convert</command> command is easy to " 1.2960 "use. Simply point it at the path or URL of the source repository, optionally " 1.2961 @@ -2110,13 +3250,13 @@ 1.2962 "changes." 1.2963 msgstr "" 1.2964 1.2965 -#. type: Content of: <book><preface><sect1><title> 1.2966 -#: ../en/ch00-preface.xml:656 1.2967 +#. type: Content of: <book><chapter><sect1><title> 1.2968 +#: ../en/ch01-intro.xml:647 1.2969 msgid "A short history of revision control" 1.2970 msgstr "版本控制简史" 1.2971 1.2972 -#. type: Content of: <book><preface><sect1><para> 1.2973 -#: ../en/ch00-preface.xml:658 1.2974 +#. type: Content of: <book><chapter><sect1><para> 1.2975 +#: ../en/ch01-intro.xml:649 1.2976 msgid "" 1.2977 "The best known of the old-time revision control tools is SCCS (Source Code " 1.2978 "Control System), which Marc Rochkind wrote at Bell Labs, in the early 1970s. " 1.2979 @@ -2128,8 +3268,8 @@ 1.2980 "help of an administrator." 1.2981 msgstr "" 1.2982 1.2983 -#. type: Content of: <book><preface><sect1><para> 1.2984 -#: ../en/ch00-preface.xml:669 1.2985 +#. type: Content of: <book><chapter><sect1><para> 1.2986 +#: ../en/ch01-intro.xml:660 1.2987 msgid "" 1.2988 "Walter Tichy developed a free alternative to SCCS in the early 1980s; he " 1.2989 "called his program RCS (Revision Control System). Like SCCS, RCS required " 1.2990 @@ -2137,8 +3277,8 @@ 1.2991 "multiple people from modifying them simultaneously." 1.2992 msgstr "" 1.2993 1.2994 -#. type: Content of: <book><preface><sect1><para> 1.2995 -#: ../en/ch00-preface.xml:675 1.2996 +#. type: Content of: <book><chapter><sect1><para> 1.2997 +#: ../en/ch01-intro.xml:666 1.2998 msgid "" 1.2999 "Later in the 1980s, Dick Grune used RCS as a building block for a set of " 1.3000 "shell scripts he initially called cmt, but then renamed to CVS (Concurrent " 1.3001 @@ -2150,8 +3290,8 @@ 1.3002 "to merge their edits prior to committing changes to the central repository." 1.3003 msgstr "" 1.3004 1.3005 -#. type: Content of: <book><preface><sect1><para> 1.3006 -#: ../en/ch00-preface.xml:686 1.3007 +#. type: Content of: <book><chapter><sect1><para> 1.3008 +#: ../en/ch01-intro.xml:677 1.3009 msgid "" 1.3010 "Brian Berliner took Grune's original scripts and rewrote them in C, releasing " 1.3011 "in 1989 the code that has since developed into the modern version of CVS. " 1.3012 @@ -2164,8 +3304,8 @@ 1.3013 "system." 1.3014 msgstr "" 1.3015 1.3016 -#. type: Content of: <book><preface><sect1><para> 1.3017 -#: ../en/ch00-preface.xml:697 1.3018 +#. type: Content of: <book><chapter><sect1><para> 1.3019 +#: ../en/ch01-intro.xml:688 1.3020 msgid "" 1.3021 "In the early 1990s, Sun Microsystems developed an early distributed revision " 1.3022 "control system, called TeamWare. A TeamWare workspace contains a complete " 1.3023 @@ -2174,8 +3314,8 @@ 1.3024 "SCCS.)" 1.3025 msgstr "" 1.3026 1.3027 -#. type: Content of: <book><preface><sect1><para> 1.3028 -#: ../en/ch00-preface.xml:704 1.3029 +#. type: Content of: <book><chapter><sect1><para> 1.3030 +#: ../en/ch01-intro.xml:695 1.3031 msgid "" 1.3032 "As the 1990s progressed, awareness grew of a number of problems with CVS. It " 1.3033 "records simultaneous changes to multiple files individually, instead of " 1.3034 @@ -2186,8 +3326,8 @@ 1.3035 "architectural problems prohibitive." 1.3036 msgstr "" 1.3037 1.3038 -#. type: Content of: <book><preface><sect1><para> 1.3039 -#: ../en/ch00-preface.xml:714 1.3040 +#. type: Content of: <book><chapter><sect1><para> 1.3041 +#: ../en/ch01-intro.xml:705 1.3042 msgid "" 1.3043 "In 2001, Jim Blandy and Karl Fogel, two developers who had worked on CVS, " 1.3044 "started a project to replace it with a tool that would have a better " 1.3045 @@ -2198,8 +3338,8 @@ 1.3046 "grown in popularity." 1.3047 msgstr "" 1.3048 1.3049 -#. type: Content of: <book><preface><sect1><para> 1.3050 -#: ../en/ch00-preface.xml:723 1.3051 +#. type: Content of: <book><chapter><sect1><para> 1.3052 +#: ../en/ch01-intro.xml:714 1.3053 msgid "" 1.3054 "More or less simultaneously, Graydon Hoare began working on an ambitious " 1.3055 "distributed revision control system that he named Monotone. While Monotone " 1.3056 @@ -2209,48 +3349,26 @@ 1.3057 "integral notion of <quote>trust</quote> for code from different sources." 1.3058 msgstr "" 1.3059 1.3060 -#. type: Content of: <book><preface><sect1><para> 1.3061 -#: ../en/ch00-preface.xml:732 1.3062 +#. type: Content of: <book><chapter><sect1><para> 1.3063 +#: ../en/ch01-intro.xml:723 1.3064 msgid "" 1.3065 "Mercurial began life in 2005. While a few aspects of its design are " 1.3066 "influenced by Monotone, Mercurial focuses on ease of use, high performance, " 1.3067 "and scalability to very large projects." 1.3068 msgstr "" 1.3069 1.3070 -#. type: Content of: <book><preface><sect1><title> 1.3071 -#: ../en/ch00-preface.xml:740 1.3072 -msgid "Colophon&emdash;this book is Free" 1.3073 -msgstr "后记—本书是自由的!" 1.3074 - 1.3075 -#. type: Content of: <book><preface><sect1><para> 1.3076 -#: ../en/ch00-preface.xml:742 1.3077 -msgid "" 1.3078 -"This book is licensed under the Open Publication License, and is produced " 1.3079 -"entirely using Free Software tools. It is typeset with DocBook XML. " 1.3080 -"Illustrations are drawn and rendered with <ulink url=\"http://www.inkscape." 1.3081 -"org/\">Inkscape</ulink>." 1.3082 -msgstr "" 1.3083 - 1.3084 -#. type: Content of: <book><preface><sect1><para> 1.3085 -#: ../en/ch00-preface.xml:747 1.3086 -msgid "" 1.3087 -"The complete source code for this book is published as a Mercurial " 1.3088 -"repository, at <ulink url=\"http://hg.serpentine.com/mercurial/book\">http://" 1.3089 -"hg.serpentine.com/mercurial/book</ulink>." 1.3090 -msgstr "" 1.3091 - 1.3092 #. type: Content of: <book><chapter><title> 1.3093 -#: ../en/ch01-tour-basic.xml:5 1.3094 +#: ../en/ch02-tour-basic.xml:5 1.3095 msgid "A tour of Mercurial: the basics" 1.3096 msgstr "Mercurial 教程: 基础知识" 1.3097 1.3098 #. type: Content of: <book><chapter><sect1><title> 1.3099 -#: ../en/ch01-tour-basic.xml:8 1.3100 +#: ../en/ch02-tour-basic.xml:8 1.3101 msgid "Installing Mercurial on your system" 1.3102 msgstr "安装 Mercurial" 1.3103 1.3104 #. type: Content of: <book><chapter><sect1><para> 1.3105 -#: ../en/ch01-tour-basic.xml:10 1.3106 +#: ../en/ch02-tour-basic.xml:10 1.3107 msgid "" 1.3108 "Prebuilt binary packages of Mercurial are available for every popular " 1.3109 "operating system. These make it easy to start using Mercurial on your " 1.3110 @@ -2260,12 +3378,12 @@ 1.3111 "用 Mercurial 变得很容易。" 1.3112 1.3113 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3114 -#: ../en/ch01-tour-basic.xml:15 1.3115 +#: ../en/ch02-tour-basic.xml:15 1.3116 msgid "Windows" 1.3117 msgstr "Windows" 1.3118 1.3119 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3120 -#: ../en/ch01-tour-basic.xml:17 1.3121 +#: ../en/ch02-tour-basic.xml:17 1.3122 msgid "" 1.3123 "The best version of Mercurial for Windows is TortoiseHg, which can be found " 1.3124 "at <ulink url=\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://" 1.3125 @@ -2279,12 +3397,12 @@ 1.3126 "作</quote>,同时提供了命令行和图形用户界面。" 1.3127 1.3128 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3129 -#: ../en/ch01-tour-basic.xml:27 1.3130 +#: ../en/ch02-tour-basic.xml:27 1.3131 msgid "Mac OS X" 1.3132 msgstr "Mac OS X" 1.3133 1.3134 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3135 -#: ../en/ch01-tour-basic.xml:29 1.3136 +#: ../en/ch02-tour-basic.xml:29 1.3137 msgid "" 1.3138 "Lee Cantey publishes an installer of Mercurial for Mac OS X at <ulink url=" 1.3139 "\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>." 1.3140 @@ -2293,12 +3411,12 @@ 1.3141 "\">http://mercurial.berkwood.com</ulink> 发布了 Mercurial 安装程序。" 1.3142 1.3143 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3144 -#: ../en/ch01-tour-basic.xml:35 1.3145 +#: ../en/ch02-tour-basic.xml:35 1.3146 msgid "Linux" 1.3147 msgstr "Linux" 1.3148 1.3149 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3150 -#: ../en/ch01-tour-basic.xml:37 1.3151 +#: ../en/ch02-tour-basic.xml:37 1.3152 msgid "" 1.3153 "Because each Linux distribution has its own packaging tools, policies, and " 1.3154 "rate of development, it's difficult to give a comprehensive set of " 1.3155 @@ -2311,7 +3429,7 @@ 1.3156 "使用的发行版的 Mercurial 维护者的活跃程度。" 1.3157 1.3158 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3159 -#: ../en/ch01-tour-basic.xml:44 1.3160 +#: ../en/ch02-tour-basic.xml:44 1.3161 msgid "" 1.3162 "To keep things simple, I will focus on installing Mercurial from the command " 1.3163 "line under the most popular Linux distributions. Most of these distributions " 1.3164 @@ -2323,27 +3441,33 @@ 1.3165 "Mercurial;寻找的包名称是 <literal>mercurial</literal>。" 1.3166 1.3167 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3168 -#: ../en/ch01-tour-basic.xml:52 1.3169 +#: ../en/ch02-tour-basic.xml:52 1.3170 msgid "Ubuntu and Debian:" 1.3171 msgstr "Ubuntu 与 Debian:" 1.3172 1.3173 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3174 -#: ../en/ch01-tour-basic.xml:54 1.3175 -msgid "Fedora and OpenSUSE:" 1.3176 +#: ../en/ch02-tour-basic.xml:54 1.3177 +msgid "Fedora:" 1.3178 +msgstr "" 1.3179 + 1.3180 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3181 +#: ../en/ch02-tour-basic.xml:56 1.3182 +#, fuzzy 1.3183 +msgid "OpenSUSE:" 1.3184 msgstr "Fedora and OpenSUSE:" 1.3185 1.3186 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3187 -#: ../en/ch01-tour-basic.xml:56 1.3188 +#: ../en/ch02-tour-basic.xml:58 1.3189 msgid "Gentoo:" 1.3190 msgstr "Gentoo:" 1.3191 1.3192 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3193 -#: ../en/ch01-tour-basic.xml:62 1.3194 +#: ../en/ch02-tour-basic.xml:64 1.3195 msgid "Solaris" 1.3196 msgstr "Solaris" 1.3197 1.3198 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3199 -#: ../en/ch01-tour-basic.xml:64 1.3200 +#: ../en/ch02-tour-basic.xml:66 1.3201 msgid "" 1.3202 "SunFreeWare, at <ulink url=\"http://www.sunfreeware.com\">http://www." 1.3203 "sunfreeware.com</ulink>, provides prebuilt packages of Mercurial." 1.3204 @@ -2352,29 +3476,30 @@ 1.3205 "ulink> 的 SunFreeWare 提供了 Mercurial 的二进制安装包。" 1.3206 1.3207 #. type: Content of: <book><chapter><sect1><title> 1.3208 -#: ../en/ch01-tour-basic.xml:73 1.3209 +#: ../en/ch02-tour-basic.xml:75 1.3210 msgid "Getting started" 1.3211 msgstr "开始" 1.3212 1.3213 #. type: Content of: <book><chapter><sect1><para> 1.3214 -#: ../en/ch01-tour-basic.xml:75 1.3215 +#: ../en/ch02-tour-basic.xml:77 1.3216 +#, fuzzy 1.3217 msgid "" 1.3218 "To begin, we'll use the <command role=\"hg-cmd\">hg version</command> command " 1.3219 -"to find out whether Mercurial is actually installed properly. The actual " 1.3220 -"version information that it prints isn't so important; it's whether it prints " 1.3221 -"anything at all that we care about." 1.3222 +"to find out whether Mercurial is installed properly. The actual version " 1.3223 +"information that it prints isn't so important; we simply care whether the " 1.3224 +"command runs and prints anything at all." 1.3225 msgstr "" 1.3226 "首先,我们使用 <command role=\"hg-cmd\">hg version</command> 命令检查 " 1.3227 "Mercurial 是否正确安装。它打印出来的实际版本信息并不重要;我们只关心它是否能打" 1.3228 "印出我们需要的信息。" 1.3229 1.3230 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3231 -#: ../en/ch01-tour-basic.xml:84 1.3232 +#: ../en/ch02-tour-basic.xml:86 1.3233 msgid "Built-in help" 1.3234 msgstr "内置帮助" 1.3235 1.3236 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3237 -#: ../en/ch01-tour-basic.xml:86 1.3238 +#: ../en/ch02-tour-basic.xml:88 1.3239 msgid "" 1.3240 "Mercurial provides a built-in help system. This is invaluable for those " 1.3241 "times when you find yourself stuck trying to remember how to run a command. " 1.3242 @@ -2389,7 +3514,7 @@ 1.3243 "它会给出更详细的信息。" 1.3244 1.3245 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3246 -#: ../en/ch01-tour-basic.xml:97 1.3247 +#: ../en/ch02-tour-basic.xml:99 1.3248 msgid "" 1.3249 "For a more impressive level of detail (which you won't usually need) run " 1.3250 "<command role=\"hg-cmd\">hg help <option role=\"hg-opt-global\">-v</option></" 1.3251 @@ -2403,12 +3528,12 @@ 1.3252 "的短格式,告诉 Mercurial 要打印通常不需要的更多信息。" 1.3253 1.3254 #. type: Content of: <book><chapter><sect1><title> 1.3255 -#: ../en/ch01-tour-basic.xml:108 1.3256 +#: ../en/ch02-tour-basic.xml:110 1.3257 msgid "Working with a repository" 1.3258 msgstr "使用版本库" 1.3259 1.3260 #. type: Content of: <book><chapter><sect1><para> 1.3261 -#: ../en/ch01-tour-basic.xml:110 1.3262 +#: ../en/ch02-tour-basic.xml:112 1.3263 msgid "" 1.3264 "In Mercurial, everything happens inside a <emphasis>repository</emphasis>. " 1.3265 "The repository for a project contains all of the files that <quote>belong to</" 1.3266 @@ -2416,7 +3541,7 @@ 1.3267 msgstr "" 1.3268 1.3269 #. type: Content of: <book><chapter><sect1><para> 1.3270 -#: ../en/ch01-tour-basic.xml:116 1.3271 +#: ../en/ch02-tour-basic.xml:118 1.3272 msgid "" 1.3273 "There's nothing particularly magical about a repository; it is simply a " 1.3274 "directory tree in your filesystem that Mercurial treats as special. You can " 1.3275 @@ -2425,12 +3550,12 @@ 1.3276 msgstr "" 1.3277 1.3278 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3279 -#: ../en/ch01-tour-basic.xml:123 1.3280 +#: ../en/ch02-tour-basic.xml:125 1.3281 msgid "Making a local copy of a repository" 1.3282 msgstr "创建版本库的工作副本" 1.3283 1.3284 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3285 -#: ../en/ch01-tour-basic.xml:125 1.3286 +#: ../en/ch02-tour-basic.xml:127 1.3287 msgid "" 1.3288 "<emphasis>Copying</emphasis> a repository is just a little bit special. " 1.3289 "While you could use a normal file copying command to make a copy of a " 1.3290 @@ -2440,7 +3565,7 @@ 1.3291 msgstr "" 1.3292 1.3293 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3294 -#: ../en/ch01-tour-basic.xml:134 1.3295 +#: ../en/ch02-tour-basic.xml:136 1.3296 msgid "" 1.3297 "One advantage of using <command role=\"hg-cmd\">hg clone</command> is that, " 1.3298 "as we can see above, it lets us clone repositories over the network. Another " 1.3299 @@ -2449,21 +3574,21 @@ 1.3300 msgstr "" 1.3301 1.3302 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3303 -#: ../en/ch01-tour-basic.xml:140 1.3304 +#: ../en/ch02-tour-basic.xml:142 1.3305 msgid "" 1.3306 "If our clone succeeded, we should now have a local directory called <filename " 1.3307 "class=\"directory\">hello</filename>. This directory will contain some files." 1.3308 msgstr "" 1.3309 1.3310 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3311 -#: ../en/ch01-tour-basic.xml:146 1.3312 +#: ../en/ch02-tour-basic.xml:148 1.3313 msgid "" 1.3314 "These files have the same contents and history in our repository as they do " 1.3315 "in the repository we cloned." 1.3316 msgstr "" 1.3317 1.3318 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3319 -#: ../en/ch01-tour-basic.xml:149 1.3320 +#: ../en/ch02-tour-basic.xml:151 1.3321 msgid "" 1.3322 "Every Mercurial repository is complete, self-contained, and independent. It " 1.3323 "contains its own private copy of a project's files and history. As we just " 1.3324 @@ -2473,7 +3598,7 @@ 1.3325 msgstr "" 1.3326 1.3327 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3328 -#: ../en/ch01-tour-basic.xml:156 1.3329 +#: ../en/ch02-tour-basic.xml:158 1.3330 msgid "" 1.3331 "What this means for now is that we're free to experiment with our repository, " 1.3332 "safe in the knowledge that it's a private <quote>sandbox</quote> that won't " 1.3333 @@ -2481,12 +3606,12 @@ 1.3334 msgstr "" 1.3335 1.3336 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3337 -#: ../en/ch01-tour-basic.xml:162 1.3338 +#: ../en/ch02-tour-basic.xml:164 1.3339 msgid "What's in a repository?" 1.3340 msgstr "什么是版本库?" 1.3341 1.3342 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3343 -#: ../en/ch01-tour-basic.xml:164 1.3344 +#: ../en/ch02-tour-basic.xml:166 1.3345 msgid "" 1.3346 "When we take a more detailed look inside a repository, we can see that it " 1.3347 "contains a directory named <filename class=\"directory\">.hg</filename>. " 1.3348 @@ -2494,7 +3619,7 @@ 1.3349 msgstr "" 1.3350 1.3351 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3352 -#: ../en/ch01-tour-basic.xml:171 1.3353 +#: ../en/ch02-tour-basic.xml:173 1.3354 msgid "" 1.3355 "The contents of the <filename class=\"directory\">.hg</filename> directory " 1.3356 "and its subdirectories are private to Mercurial. Every other file and " 1.3357 @@ -2502,7 +3627,7 @@ 1.3358 msgstr "" 1.3359 1.3360 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3361 -#: ../en/ch01-tour-basic.xml:177 1.3362 +#: ../en/ch02-tour-basic.xml:179 1.3363 msgid "" 1.3364 "To introduce a little terminology, the <filename class=\"directory\">.hg</" 1.3365 "filename> directory is the <quote>real</quote> repository, and all of the " 1.3366 @@ -2515,12 +3640,12 @@ 1.3367 msgstr "" 1.3368 1.3369 #. type: Content of: <book><chapter><sect1><title> 1.3370 -#: ../en/ch01-tour-basic.xml:192 1.3371 +#: ../en/ch02-tour-basic.xml:194 1.3372 msgid "A tour through history" 1.3373 msgstr "回溯历史" 1.3374 1.3375 #. type: Content of: <book><chapter><sect1><para> 1.3376 -#: ../en/ch01-tour-basic.xml:194 1.3377 +#: ../en/ch02-tour-basic.xml:196 1.3378 msgid "" 1.3379 "One of the first things we might want to do with a new, unfamiliar repository " 1.3380 "is understand its history. The <command role=\"hg-cmd\">hg log</command> " 1.3381 @@ -2528,7 +3653,7 @@ 1.3382 msgstr "" 1.3383 1.3384 #. type: Content of: <book><chapter><sect1><para> 1.3385 -#: ../en/ch01-tour-basic.xml:201 1.3386 +#: ../en/ch02-tour-basic.xml:203 1.3387 msgid "" 1.3388 "By default, this command prints a brief paragraph of output for each change " 1.3389 "to the project that was recorded. In Mercurial terminology, we call each of " 1.3390 @@ -2537,27 +3662,26 @@ 1.3391 msgstr "" 1.3392 1.3393 #. type: Content of: <book><chapter><sect1><para> 1.3394 -#: ../en/ch01-tour-basic.xml:207 1.3395 +#: ../en/ch02-tour-basic.xml:209 1.3396 msgid "" 1.3397 "The fields in a record of output from <command role=\"hg-cmd\">hg log</" 1.3398 "command> are as follows." 1.3399 msgstr "" 1.3400 1.3401 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3402 -#: ../en/ch01-tour-basic.xml:211 1.3403 +#: ../en/ch02-tour-basic.xml:213 1.3404 msgid "" 1.3405 "<literal>changeset</literal>: This field has the format of a number, followed " 1.3406 "by a colon, followed by a hexadecimal (or <emphasis>hex</emphasis>) string. " 1.3407 "These are <emphasis>identifiers</emphasis> for the changeset. The hex string " 1.3408 "is a unique identifier: the same hex string will always refer to the same " 1.3409 -"changeset. The number is shorter and easier to type than the hex string, but " 1.3410 -"it isn't unique: the same number in two different clones of a repository may " 1.3411 -"identify different changesets. Why provide the number at all, then? For " 1.3412 -"local convenience." 1.3413 +"changeset in every copy of this repository. The number is shorter and easier " 1.3414 +"to type than the hex string, but it isn't unique: the same number in two " 1.3415 +"different clones of a repository may identify different changesets." 1.3416 msgstr "" 1.3417 1.3418 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3419 -#: ../en/ch01-tour-basic.xml:223 1.3420 +#: ../en/ch02-tour-basic.xml:224 1.3421 msgid "" 1.3422 "<literal>user</literal>: The identity of the person who created the " 1.3423 "changeset. This is a free-form field, but it most often contains a person's " 1.3424 @@ -2565,7 +3689,7 @@ 1.3425 msgstr "" 1.3426 1.3427 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3428 -#: ../en/ch01-tour-basic.xml:227 1.3429 +#: ../en/ch02-tour-basic.xml:228 1.3430 msgid "" 1.3431 "<literal>date</literal>: The date and time on which the changeset was " 1.3432 "created, and the timezone in which it was created. (The date and time are " 1.3433 @@ -2574,14 +3698,14 @@ 1.3434 msgstr "" 1.3435 1.3436 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3437 -#: ../en/ch01-tour-basic.xml:232 1.3438 +#: ../en/ch02-tour-basic.xml:233 1.3439 msgid "" 1.3440 "<literal>summary</literal>: The first line of the text message that the " 1.3441 "creator of the changeset entered to describe the changeset." 1.3442 msgstr "" 1.3443 1.3444 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3445 -#: ../en/ch01-tour-basic.xml:236 1.3446 +#: ../en/ch02-tour-basic.xml:237 1.3447 msgid "" 1.3448 "Some changesets, such as the first in the list above, have a <literal>tag</" 1.3449 "literal> field. A tag is another way to identify a changeset, by giving it " 1.3450 @@ -2590,14 +3714,14 @@ 1.3451 msgstr "" 1.3452 1.3453 #. type: Content of: <book><chapter><sect1><para> 1.3454 -#: ../en/ch01-tour-basic.xml:244 1.3455 +#: ../en/ch02-tour-basic.xml:245 1.3456 msgid "" 1.3457 "The default output printed by <command role=\"hg-cmd\">hg log</command> is " 1.3458 "purely a summary; it is missing a lot of detail." 1.3459 msgstr "" 1.3460 1.3461 #. type: Content of: <book><chapter><sect1><para> 1.3462 -#: ../en/ch01-tour-basic.xml:248 1.3463 +#: ../en/ch02-tour-basic.xml:249 1.3464 msgid "" 1.3465 "<xref linkend=\"fig:tour-basic:history\"/> provides a graphical " 1.3466 "representation of the history of the <filename class=\"directory\">hello</" 1.3467 @@ -2607,45 +3731,47 @@ 1.3468 msgstr "" 1.3469 1.3470 #. type: Content of: <book><chapter><sect1><figure><title> 1.3471 -#: ../en/ch01-tour-basic.xml:257 1.3472 +#: ../en/ch02-tour-basic.xml:258 1.3473 msgid "" 1.3474 "Graphical history of the <filename class=\"directory\">hello</filename> " 1.3475 "repository" 1.3476 msgstr "版本库 <filename class=\"directory\">hello</filename> 的历史图" 1.3477 1.3478 #. type: Content of: <book><chapter><sect1><figure> 1.3479 -#: ../en/ch01-tour-basic.xml:259 ../en/ch02-tour-merge.xml:50 1.3480 -#: ../en/ch02-tour-merge.xml:188 ../en/ch03-concepts.xml:295 1.3481 +#: ../en/ch02-tour-basic.xml:260 ../en/ch03-tour-merge.xml:61 1.3482 +#: ../en/ch03-tour-merge.xml:207 ../en/ch04-concepts.xml:290 1.3483 msgid "<placeholder type=\"mediaobject\" id=\"0\"/>" 1.3484 msgstr "" 1.3485 1.3486 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 1.3487 -#: ../en/ch01-tour-basic.xml:260 1.3488 +#: ../en/ch02-tour-basic.xml:261 1.3489 msgid "" 1.3490 "<imageobject><imagedata fileref=\"figs/tour-history.png\"/></imageobject>" 1.3491 msgstr "" 1.3492 1.3493 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase> 1.3494 -#: ../en/ch01-tour-basic.xml:261 ../en/ch02-tour-merge.xml:52 1.3495 -#: ../en/ch02-tour-merge.xml:82 ../en/ch02-tour-merge.xml:163 1.3496 -#: ../en/ch02-tour-merge.xml:190 ../en/ch02-tour-merge.xml:260 1.3497 -#: ../en/ch03-concepts.xml:59 ../en/ch03-concepts.xml:108 1.3498 -#: ../en/ch03-concepts.xml:193 ../en/ch03-concepts.xml:297 1.3499 -#: ../en/ch03-concepts.xml:348 ../en/ch03-concepts.xml:363 1.3500 -#: ../en/ch03-concepts.xml:404 ../en/ch03-concepts.xml:424 1.3501 -#: ../en/ch03-concepts.xml:467 ../en/ch05-collab.xml:322 1.3502 -#: ../en/ch08-undo.xml:365 ../en/ch08-undo.xml:412 ../en/ch08-undo.xml:477 1.3503 -#: ../en/ch08-undo.xml:515 ../en/ch11-mq.xml:412 1.3504 +#: ../en/ch02-tour-basic.xml:262 ../en/ch03-tour-merge.xml:63 1.3505 +#: ../en/ch03-tour-merge.xml:95 ../en/ch03-tour-merge.xml:182 1.3506 +#: ../en/ch03-tour-merge.xml:209 ../en/ch03-tour-merge.xml:279 1.3507 +#: ../en/ch04-concepts.xml:59 ../en/ch04-concepts.xml:108 1.3508 +#: ../en/ch04-concepts.xml:198 ../en/ch04-concepts.xml:292 1.3509 +#: ../en/ch04-concepts.xml:347 ../en/ch04-concepts.xml:362 1.3510 +#: ../en/ch04-concepts.xml:403 ../en/ch04-concepts.xml:423 1.3511 +#: ../en/ch04-concepts.xml:469 ../en/ch06-collab.xml:316 1.3512 +#: ../en/ch09-undo.xml:344 ../en/ch09-undo.xml:391 ../en/ch09-undo.xml:464 1.3513 +#: ../en/ch09-undo.xml:502 ../en/ch09-undo.xml:658 ../en/ch09-undo.xml:682 1.3514 +#: ../en/ch09-undo.xml:700 ../en/ch09-undo.xml:714 ../en/ch09-undo.xml:727 1.3515 +#: ../en/ch12-mq.xml:413 1.3516 msgid "XXX add text" 1.3517 msgstr "" 1.3518 1.3519 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3520 -#: ../en/ch01-tour-basic.xml:266 1.3521 +#: ../en/ch02-tour-basic.xml:267 1.3522 msgid "Changesets, revisions, and talking to other people" 1.3523 msgstr "修改集,版本,与其它用户交互" 1.3524 1.3525 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3526 -#: ../en/ch01-tour-basic.xml:269 1.3527 +#: ../en/ch02-tour-basic.xml:270 1.3528 msgid "" 1.3529 "As English is a notoriously sloppy language, and computer science has a " 1.3530 "hallowed history of terminological confusion (why use one term when four will " 1.3531 @@ -2657,7 +3783,7 @@ 1.3532 msgstr "" 1.3533 1.3534 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3535 -#: ../en/ch01-tour-basic.xml:279 1.3536 +#: ../en/ch02-tour-basic.xml:280 1.3537 msgid "" 1.3538 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to " 1.3539 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</" 1.3540 @@ -2668,14 +3794,14 @@ 1.3541 msgstr "" 1.3542 1.3543 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3544 -#: ../en/ch01-tour-basic.xml:288 1.3545 +#: ../en/ch02-tour-basic.xml:289 1.3546 msgid "" 1.3547 "The revision number is a handy notation that is <emphasis>only valid in that " 1.3548 "repository</emphasis>." 1.3549 msgstr "" 1.3550 1.3551 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.3552 -#: ../en/ch01-tour-basic.xml:291 1.3553 +#: ../en/ch02-tour-basic.xml:292 1.3554 msgid "" 1.3555 "The hexadecimal string is the <emphasis>permanent, unchanging identifier</" 1.3556 "emphasis> that will always identify that exact changeset in <emphasis>every</" 1.3557 @@ -2683,7 +3809,7 @@ 1.3558 msgstr "" 1.3559 1.3560 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3561 -#: ../en/ch01-tour-basic.xml:297 1.3562 +#: ../en/ch02-tour-basic.xml:298 1.3563 msgid "" 1.3564 "This distinction is important. If you send someone an email talking about " 1.3565 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 " 1.3566 @@ -2696,7 +3822,7 @@ 1.3567 msgstr "" 1.3568 1.3569 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3570 -#: ../en/ch01-tour-basic.xml:309 1.3571 +#: ../en/ch02-tour-basic.xml:310 1.3572 msgid "" 1.3573 "Mercurial uses revision numbers purely as a convenient shorthand. If you " 1.3574 "need to discuss a changeset with someone, or make a record of a changeset for " 1.3575 @@ -2705,12 +3831,12 @@ 1.3576 msgstr "" 1.3577 1.3578 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3579 -#: ../en/ch01-tour-basic.xml:317 1.3580 +#: ../en/ch02-tour-basic.xml:318 1.3581 msgid "Viewing specific revisions" 1.3582 msgstr "察看指定版本" 1.3583 1.3584 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3585 -#: ../en/ch01-tour-basic.xml:319 1.3586 +#: ../en/ch02-tour-basic.xml:320 1.3587 msgid "" 1.3588 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a " 1.3589 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option " 1.3590 @@ -2720,7 +3846,7 @@ 1.3591 msgstr "" 1.3592 1.3593 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3594 -#: ../en/ch01-tour-basic.xml:328 1.3595 +#: ../en/ch02-tour-basic.xml:329 1.3596 msgid "" 1.3597 "If you want to see the history of several revisions without having to list " 1.3598 "each one, you can use <emphasis>range notation</emphasis>; this lets you " 1.3599 @@ -2729,7 +3855,7 @@ 1.3600 msgstr "" 1.3601 1.3602 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3603 -#: ../en/ch01-tour-basic.xml:336 1.3604 +#: ../en/ch02-tour-basic.xml:337 1.3605 msgid "" 1.3606 "Mercurial also honours the order in which you specify revisions, so <command " 1.3607 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " 1.3608 @@ -2737,12 +3863,12 @@ 1.3609 msgstr "" 1.3610 1.3611 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3612 -#: ../en/ch01-tour-basic.xml:343 1.3613 +#: ../en/ch02-tour-basic.xml:344 1.3614 msgid "More detailed information" 1.3615 msgstr "更详细的信息" 1.3616 1.3617 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3618 -#: ../en/ch01-tour-basic.xml:345 1.3619 +#: ../en/ch02-tour-basic.xml:346 1.3620 msgid "" 1.3621 "While the summary information printed by <command role=\"hg-cmd\">hg log</" 1.3622 "command> is useful if you already know what you're looking for, you may need " 1.3623 @@ -2754,7 +3880,7 @@ 1.3624 msgstr "" 1.3625 1.3626 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3627 -#: ../en/ch01-tour-basic.xml:357 1.3628 +#: ../en/ch02-tour-basic.xml:358 1.3629 msgid "" 1.3630 "If you want to see both the description and content of a change, add the " 1.3631 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--" 1.3632 @@ -2764,19 +3890,19 @@ 1.3633 msgstr "" 1.3634 1.3635 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3636 -#: ../en/ch01-tour-basic.xml:367 1.3637 +#: ../en/ch02-tour-basic.xml:368 1.3638 msgid "" 1.3639 "The <option role=\"hg-opt-log\">-p</option> option is tremendously useful, so " 1.3640 "it's well worth remembering." 1.3641 msgstr "" 1.3642 1.3643 #. type: Content of: <book><chapter><sect1><title> 1.3644 -#: ../en/ch01-tour-basic.xml:374 1.3645 +#: ../en/ch02-tour-basic.xml:375 1.3646 msgid "All about command options" 1.3647 msgstr "命令选项" 1.3648 1.3649 #. type: Content of: <book><chapter><sect1><para> 1.3650 -#: ../en/ch01-tour-basic.xml:376 1.3651 +#: ../en/ch02-tour-basic.xml:377 1.3652 msgid "" 1.3653 "Let's take a brief break from exploring Mercurial commands to discuss a " 1.3654 "pattern in the way that they work; you may find this useful to keep in mind " 1.3655 @@ -2784,7 +3910,7 @@ 1.3656 msgstr "" 1.3657 1.3658 #. type: Content of: <book><chapter><sect1><para> 1.3659 -#: ../en/ch01-tour-basic.xml:380 1.3660 +#: ../en/ch02-tour-basic.xml:381 1.3661 msgid "" 1.3662 "Mercurial has a consistent and straightforward approach to dealing with the " 1.3663 "options that you can pass to commands. It follows the conventions for " 1.3664 @@ -2792,7 +3918,7 @@ 1.3665 msgstr "" 1.3666 1.3667 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3668 -#: ../en/ch01-tour-basic.xml:387 1.3669 +#: ../en/ch02-tour-basic.xml:388 1.3670 msgid "" 1.3671 "Every option has a long name. For example, as we've already seen, the " 1.3672 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" 1.3673 @@ -2800,7 +3926,7 @@ 1.3674 msgstr "" 1.3675 1.3676 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3677 -#: ../en/ch01-tour-basic.xml:393 1.3678 +#: ../en/ch02-tour-basic.xml:394 1.3679 msgid "" 1.3680 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--" 1.3681 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The " 1.3682 @@ -2809,7 +3935,7 @@ 1.3683 msgstr "" 1.3684 1.3685 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3686 -#: ../en/ch01-tour-basic.xml:400 1.3687 +#: ../en/ch02-tour-basic.xml:401 1.3688 msgid "" 1.3689 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</" 1.3690 "option>), while short options start with one (e.g. <option role=\"hg-opt-log" 1.3691 @@ -2817,7 +3943,7 @@ 1.3692 msgstr "" 1.3693 1.3694 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3695 -#: ../en/ch01-tour-basic.xml:406 1.3696 +#: ../en/ch02-tour-basic.xml:407 1.3697 msgid "" 1.3698 "Option naming and usage is consistent across commands. For example, every " 1.3699 "command that lets you specify a changeset ID or revision number accepts both " 1.3700 @@ -2826,7 +3952,7 @@ 1.3701 msgstr "" 1.3702 1.3703 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.3704 -#: ../en/ch01-tour-basic.xml:413 1.3705 +#: ../en/ch02-tour-basic.xml:414 1.3706 msgid "" 1.3707 "If you are using short options, you can save typing by running them together. " 1.3708 "For example, the command <command role=\"hg-cmd\">hg log -v -p -r 2</command> " 1.3709 @@ -2834,15 +3960,15 @@ 1.3710 msgstr "" 1.3711 1.3712 #. type: Content of: <book><chapter><sect1><para> 1.3713 -#: ../en/ch01-tour-basic.xml:420 1.3714 -msgid "" 1.3715 -"In the examples throughout this book, I use short options instead of long. " 1.3716 -"This just reflects my own preference, so don't read anything significant into " 1.3717 -"it." 1.3718 -msgstr "" 1.3719 - 1.3720 -#. type: Content of: <book><chapter><sect1><para> 1.3721 -#: ../en/ch01-tour-basic.xml:424 1.3722 +#: ../en/ch02-tour-basic.xml:421 1.3723 +msgid "" 1.3724 +"In the examples throughout this book, I usually use short options instead of " 1.3725 +"long. This simply reflects my own preference, so don't read anything " 1.3726 +"significant into it." 1.3727 +msgstr "" 1.3728 + 1.3729 +#. type: Content of: <book><chapter><sect1><para> 1.3730 +#: ../en/ch02-tour-basic.xml:425 1.3731 msgid "" 1.3732 "Most commands that print output of some kind will print more output when " 1.3733 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-" 1.3734 @@ -2851,12 +3977,12 @@ 1.3735 msgstr "" 1.3736 1.3737 #. type: Content of: <book><chapter><sect1><note><title> 1.3738 -#: ../en/ch01-tour-basic.xml:431 1.3739 +#: ../en/ch02-tour-basic.xml:432 1.3740 msgid "Option naming consistency" 1.3741 msgstr "" 1.3742 1.3743 #. type: Content of: <book><chapter><sect1><note><para> 1.3744 -#: ../en/ch01-tour-basic.xml:433 1.3745 +#: ../en/ch02-tour-basic.xml:434 1.3746 msgid "" 1.3747 "Almost always, Mercurial commands use consistent option names to refer to the " 1.3748 "same concepts. For instance, if a command deals with changesets, you'll " 1.3749 @@ -2866,19 +3992,19 @@ 1.3750 msgstr "" 1.3751 1.3752 #. type: Content of: <book><chapter><sect1><title> 1.3753 -#: ../en/ch01-tour-basic.xml:444 1.3754 +#: ../en/ch02-tour-basic.xml:445 1.3755 msgid "Making and reviewing changes" 1.3756 msgstr "创建和复审修改" 1.3757 1.3758 #. type: Content of: <book><chapter><sect1><para> 1.3759 -#: ../en/ch01-tour-basic.xml:446 1.3760 +#: ../en/ch02-tour-basic.xml:447 1.3761 msgid "" 1.3762 "Now that we have a grasp of viewing history in Mercurial, let's take a look " 1.3763 "at making some changes and examining them." 1.3764 msgstr "" 1.3765 1.3766 #. type: Content of: <book><chapter><sect1><para> 1.3767 -#: ../en/ch01-tour-basic.xml:450 1.3768 +#: ../en/ch02-tour-basic.xml:451 1.3769 msgid "" 1.3770 "The first thing we'll do is isolate our experiment in a repository of its " 1.3771 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we " 1.3772 @@ -2889,7 +4015,7 @@ 1.3773 msgstr "" 1.3774 1.3775 #. type: Content of: <book><chapter><sect1><para><footnote><para> 1.3776 -#: ../en/ch01-tour-basic.xml:457 1.3777 +#: ../en/ch02-tour-basic.xml:458 1.3778 msgid "" 1.3779 "The saving of space arises when source and destination repositories are on " 1.3780 "the same filesystem, in which case Mercurial will use hardlinks to do copy-on-" 1.3781 @@ -2899,7 +4025,7 @@ 1.3782 msgstr "" 1.3783 1.3784 #. type: Content of: <book><chapter><sect1><para> 1.3785 -#: ../en/ch01-tour-basic.xml:467 1.3786 +#: ../en/ch02-tour-basic.xml:468 1.3787 msgid "" 1.3788 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy " 1.3789 "of a remote repository around, which you can then make temporary clones of to " 1.3790 @@ -2911,7 +4037,7 @@ 1.3791 msgstr "" 1.3792 1.3793 #. type: Content of: <book><chapter><sect1><para> 1.3794 -#: ../en/ch01-tour-basic.xml:476 1.3795 +#: ../en/ch02-tour-basic.xml:477 1.3796 msgid "" 1.3797 "In our <filename class=\"directory\">my-hello</filename> repository, we have " 1.3798 "a file <filename>hello.c</filename> that contains the classic <quote>hello, " 1.3799 @@ -2919,19 +4045,19 @@ 1.3800 msgstr "" 1.3801 1.3802 #. type: Content of: <book><chapter><sect1><para> 1.3803 -#: ../en/ch01-tour-basic.xml:482 1.3804 +#: ../en/ch02-tour-basic.xml:483 1.3805 msgid "Let's edit this file so that it prints a second line of output." 1.3806 msgstr "" 1.3807 1.3808 #. type: Content of: <book><chapter><sect1><para> 1.3809 -#: ../en/ch01-tour-basic.xml:487 1.3810 +#: ../en/ch02-tour-basic.xml:488 1.3811 msgid "" 1.3812 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " 1.3813 "what Mercurial knows about the files in the repository." 1.3814 msgstr "" 1.3815 1.3816 #. type: Content of: <book><chapter><sect1><para> 1.3817 -#: ../en/ch01-tour-basic.xml:493 1.3818 +#: ../en/ch02-tour-basic.xml:494 1.3819 msgid "" 1.3820 "The <command role=\"hg-cmd\">hg status</command> command prints no output for " 1.3821 "some files, but a line starting with <quote><literal>M</literal></quote> for " 1.3822 @@ -2941,7 +4067,7 @@ 1.3823 msgstr "" 1.3824 1.3825 #. type: Content of: <book><chapter><sect1><para> 1.3826 -#: ../en/ch01-tour-basic.xml:500 1.3827 +#: ../en/ch02-tour-basic.xml:501 1.3828 msgid "" 1.3829 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed " 1.3830 "that we modified <filename>hello.c</filename>. We didn't need to " 1.3831 @@ -2951,7 +4077,7 @@ 1.3832 msgstr "" 1.3833 1.3834 #. type: Content of: <book><chapter><sect1><para> 1.3835 -#: ../en/ch01-tour-basic.xml:508 1.3836 +#: ../en/ch02-tour-basic.xml:509 1.3837 msgid "" 1.3838 "It's somewhat helpful to know that we've modified <filename>hello.c</" 1.3839 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> " 1.3840 @@ -2960,24 +4086,24 @@ 1.3841 msgstr "" 1.3842 1.3843 #. type: Content of: <book><chapter><sect1><title> 1.3844 -#: ../en/ch01-tour-basic.xml:517 ../en/ch11-mq.xml:187 1.3845 +#: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187 1.3846 msgid "Understanding patches" 1.3847 msgstr "理解补丁" 1.3848 1.3849 #. type: Content of: <book><chapter><sect1><tip><para> 1.3850 -#: ../en/ch01-tour-basic.xml:519 1.3851 +#: ../en/ch02-tour-basic.xml:520 1.3852 msgid "" 1.3853 "Remember to take a look at <xref linkend=\"sec:mq:patch\"/> if you don't know " 1.3854 "how to read output above." 1.3855 msgstr "" 1.3856 1.3857 #. type: Content of: <book><chapter><sect1><title> 1.3858 -#: ../en/ch01-tour-basic.xml:525 1.3859 +#: ../en/ch02-tour-basic.xml:526 1.3860 msgid "Recording changes in a new changeset" 1.3861 msgstr "在新修改集中记录修改" 1.3862 1.3863 #. type: Content of: <book><chapter><sect1><para> 1.3864 -#: ../en/ch01-tour-basic.xml:527 1.3865 +#: ../en/ch02-tour-basic.xml:528 1.3866 msgid "" 1.3867 "We can modify files, build and test our changes, and use <command role=\"hg-" 1.3868 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to " 1.3869 @@ -2986,7 +4112,7 @@ 1.3870 msgstr "" 1.3871 1.3872 #. type: Content of: <book><chapter><sect1><para> 1.3873 -#: ../en/ch01-tour-basic.xml:534 1.3874 +#: ../en/ch02-tour-basic.xml:535 1.3875 msgid "" 1.3876 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new " 1.3877 "changeset; we'll usually refer to this as <quote>making a commit</quote> or " 1.3878 @@ -2994,12 +4120,12 @@ 1.3879 msgstr "" 1.3880 1.3881 #. type: Content of: <book><chapter><sect1><sect2><title> 1.3882 -#: ../en/ch01-tour-basic.xml:540 1.3883 +#: ../en/ch02-tour-basic.xml:541 1.3884 msgid "Setting up a username" 1.3885 msgstr "配置用户名称" 1.3886 1.3887 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3888 -#: ../en/ch01-tour-basic.xml:542 1.3889 +#: ../en/ch02-tour-basic.xml:543 1.3890 msgid "" 1.3891 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the " 1.3892 "first time, it is not guaranteed to succeed. Mercurial records your name and " 1.3893 @@ -3010,7 +4136,7 @@ 1.3894 msgstr "" 1.3895 1.3896 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.3897 -#: ../en/ch01-tour-basic.xml:551 1.3898 +#: ../en/ch02-tour-basic.xml:552 1.3899 msgid "" 1.3900 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the " 1.3901 "<command role=\"hg-cmd\">hg commit</command> command on the command line, " 1.3902 @@ -3018,14 +4144,14 @@ 1.3903 msgstr "" 1.3904 1.3905 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.3906 -#: ../en/ch01-tour-basic.xml:556 1.3907 +#: ../en/ch02-tour-basic.xml:557 1.3908 msgid "" 1.3909 "If you have set the <envar>HGUSER</envar> environment variable, this is " 1.3910 "checked next." 1.3911 msgstr "" 1.3912 1.3913 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.3914 -#: ../en/ch01-tour-basic.xml:559 1.3915 +#: ../en/ch02-tour-basic.xml:560 1.3916 msgid "" 1.3917 "If you create a file in your home directory called <filename role=\"special" 1.3918 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> " 1.3919 @@ -3034,14 +4160,14 @@ 1.3920 msgstr "" 1.3921 1.3922 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.3923 -#: ../en/ch01-tour-basic.xml:567 1.3924 +#: ../en/ch02-tour-basic.xml:568 1.3925 msgid "" 1.3926 "If you have set the <envar>EMAIL</envar> environment variable, this will be " 1.3927 "used next." 1.3928 msgstr "" 1.3929 1.3930 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.3931 -#: ../en/ch01-tour-basic.xml:570 1.3932 +#: ../en/ch02-tour-basic.xml:571 1.3933 msgid "" 1.3934 "Mercurial will query your system to find out your local user name and host " 1.3935 "name, and construct a username from these components. Since this often " 1.3936 @@ -3050,7 +4176,7 @@ 1.3937 msgstr "" 1.3938 1.3939 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3940 -#: ../en/ch01-tour-basic.xml:577 1.3941 +#: ../en/ch02-tour-basic.xml:578 1.3942 msgid "" 1.3943 "If all of these mechanisms fail, Mercurial will fail, printing an error " 1.3944 "message. In this case, it will not let you commit until you set up a " 1.3945 @@ -3058,7 +4184,7 @@ 1.3946 msgstr "" 1.3947 1.3948 #. type: Content of: <book><chapter><sect1><sect2><para> 1.3949 -#: ../en/ch01-tour-basic.xml:581 1.3950 +#: ../en/ch02-tour-basic.xml:582 1.3951 msgid "" 1.3952 "You should think of the <envar>HGUSER</envar> environment variable and the " 1.3953 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-" 1.3954 @@ -3069,12 +4195,12 @@ 1.3955 msgstr "" 1.3956 1.3957 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.3958 -#: ../en/ch01-tour-basic.xml:590 1.3959 +#: ../en/ch02-tour-basic.xml:591 1.3960 msgid "Creating a Mercurial configuration file" 1.3961 msgstr "创建 Mercurial 的配置文件" 1.3962 1.3963 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.3964 -#: ../en/ch01-tour-basic.xml:592 1.3965 +#: ../en/ch02-tour-basic.xml:593 1.3966 msgid "" 1.3967 "To set a user name, use your favorite editor to create a file called " 1.3968 "<filename role=\"special\">.hgrc</filename> in your home directory. " 1.3969 @@ -3083,13 +4209,33 @@ 1.3970 "filename> should look like this." 1.3971 msgstr "" 1.3972 1.3973 -#. type: Content of: <book><chapter><sect1><sect2><sect3><remark> 1.3974 -#: ../en/ch01-tour-basic.xml:600 1.3975 -msgid "Figure out what the appropriate directory is on Windows." 1.3976 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><title> 1.3977 +#: ../en/ch02-tour-basic.xml:602 1.3978 +msgid "<quote>Home directory</quote> on Windows" 1.3979 +msgstr "" 1.3980 + 1.3981 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><para> 1.3982 +#: ../en/ch02-tour-basic.xml:604 1.3983 +msgid "" 1.3984 +"When we refer to your home directory, on an English language installation of " 1.3985 +"Windows this will usually be a folder named after your user name in " 1.3986 +"<filename>C:\\Documents and Settings</filename>. You can find out the exact " 1.3987 +"name of your home directory by opening a command prompt window and running " 1.3988 +"the following command." 1.3989 +msgstr "" 1.3990 + 1.3991 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><prompt> 1.3992 +#: ../en/ch02-tour-basic.xml:612 1.3993 +msgid "C:\\>" 1.3994 +msgstr "" 1.3995 + 1.3996 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><userinput> 1.3997 +#: ../en/ch02-tour-basic.xml:612 1.3998 +msgid "echo %UserProfile%" 1.3999 msgstr "" 1.4000 1.4001 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.4002 -#: ../en/ch01-tour-basic.xml:607 1.4003 +#: ../en/ch02-tour-basic.xml:619 1.4004 msgid "" 1.4005 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</" 1.4006 "emphasis> of the config file, so you can read the <quote><literal>username " 1.4007 @@ -3101,12 +4247,12 @@ 1.4008 msgstr "" 1.4009 1.4010 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.4011 -#: ../en/ch01-tour-basic.xml:620 1.4012 +#: ../en/ch02-tour-basic.xml:632 1.4013 msgid "Choosing a user name" 1.4014 msgstr "选择用户名称" 1.4015 1.4016 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.4017 -#: ../en/ch01-tour-basic.xml:622 1.4018 +#: ../en/ch02-tour-basic.xml:634 1.4019 msgid "" 1.4020 "You can use any text you like as the value of the <literal>username</literal> " 1.4021 "config item, since this information is for reading by other people, but will " 1.4022 @@ -3115,7 +4261,7 @@ 1.4023 msgstr "" 1.4024 1.4025 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 1.4026 -#: ../en/ch01-tour-basic.xml:629 1.4027 +#: ../en/ch02-tour-basic.xml:641 1.4028 msgid "" 1.4029 "Mercurial's built-in web server obfuscates email addresses, to make it more " 1.4030 "difficult for the email harvesting tools that spammers use. This reduces the " 1.4031 @@ -3124,12 +4270,12 @@ 1.4032 msgstr "" 1.4033 1.4034 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4035 -#: ../en/ch01-tour-basic.xml:639 1.4036 +#: ../en/ch02-tour-basic.xml:650 1.4037 msgid "Writing a commit message" 1.4038 msgstr "写提交日志" 1.4039 1.4040 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4041 -#: ../en/ch01-tour-basic.xml:641 1.4042 +#: ../en/ch02-tour-basic.xml:652 1.4043 msgid "" 1.4044 "When we commit a change, Mercurial drops us into a text editor, to enter a " 1.4045 "message that will describe the modifications we've made in this changeset. " 1.4046 @@ -3139,7 +4285,7 @@ 1.4047 msgstr "" 1.4048 1.4049 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4050 -#: ../en/ch01-tour-basic.xml:651 1.4051 +#: ../en/ch02-tour-basic.xml:662 1.4052 msgid "" 1.4053 "The editor that the <command role=\"hg-cmd\">hg commit</command> command " 1.4054 "drops us into will contain an empty line or two, followed by a number of " 1.4055 @@ -3147,7 +4293,7 @@ 1.4056 msgstr "" 1.4057 1.4058 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4059 -#: ../en/ch01-tour-basic.xml:665 1.4060 +#: ../en/ch02-tour-basic.xml:676 1.4061 msgid "" 1.4062 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></" 1.4063 "quote>; it uses them only to tell us which files it's recording changes to. " 1.4064 @@ -3155,12 +4301,12 @@ 1.4065 msgstr "" 1.4066 1.4067 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4068 -#: ../en/ch01-tour-basic.xml:671 1.4069 +#: ../en/ch02-tour-basic.xml:682 1.4070 msgid "Writing a good commit message" 1.4071 msgstr "写好提交日志" 1.4072 1.4073 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4074 -#: ../en/ch01-tour-basic.xml:673 1.4075 +#: ../en/ch02-tour-basic.xml:684 1.4076 msgid "" 1.4077 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of " 1.4078 "a commit message by default, it's best to write a commit message whose first " 1.4079 @@ -3170,7 +4316,7 @@ 1.4080 msgstr "" 1.4081 1.4082 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4083 -#: ../en/ch01-tour-basic.xml:687 1.4084 +#: ../en/ch02-tour-basic.xml:697 1.4085 msgid "" 1.4086 "As far as the remainder of the contents of the commit message are concerned, " 1.4087 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care " 1.4088 @@ -3179,20 +4325,44 @@ 1.4089 msgstr "" 1.4090 1.4091 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4092 -#: ../en/ch01-tour-basic.xml:693 1.4093 +#: ../en/ch02-tour-basic.xml:702 1.4094 msgid "" 1.4095 "My personal preference is for short, but informative, commit messages that " 1.4096 "tell me something that I can't figure out with a quick glance at the output " 1.4097 "of <command role=\"hg-cmd\">hg log --patch</command>." 1.4098 msgstr "" 1.4099 1.4100 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4101 +#: ../en/ch02-tour-basic.xml:706 1.4102 +msgid "" 1.4103 +"If we run the <command role=\"hg-cmd\">hg commit</command> command without " 1.4104 +"any arguments, it records all of the changes we've made, as reported by " 1.4105 +"<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 1.4106 +"diff</command>." 1.4107 +msgstr "" 1.4108 + 1.4109 +#. type: Content of: <book><chapter><sect1><sect2><note><title> 1.4110 +#: ../en/ch02-tour-basic.xml:713 1.4111 +msgid "A surprise for Subversion users" 1.4112 +msgstr "" 1.4113 + 1.4114 +#. type: Content of: <book><chapter><sect1><sect2><note><para> 1.4115 +#: ../en/ch02-tour-basic.xml:715 1.4116 +msgid "" 1.4117 +"Like other Mercurial commands, if we don't supply explicit names to commit to " 1.4118 +"the <command role=\"hg-cmd\">hg commit</command>, it will operate across a " 1.4119 +"repository's entire working directory. Be wary of this if you're coming from " 1.4120 +"the Subversion or CVS world, since you might expect it to operate only on the " 1.4121 +"current directory that you happen to be visiting and its subdirectories." 1.4122 +msgstr "" 1.4123 + 1.4124 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4125 -#: ../en/ch01-tour-basic.xml:700 1.4126 +#: ../en/ch02-tour-basic.xml:726 1.4127 msgid "Aborting a commit" 1.4128 msgstr "终止提交" 1.4129 1.4130 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4131 -#: ../en/ch01-tour-basic.xml:702 1.4132 +#: ../en/ch02-tour-basic.xml:728 1.4133 msgid "" 1.4134 "If you decide that you don't want to commit while in the middle of editing a " 1.4135 "commit message, simply exit from your editor without saving the file that " 1.4136 @@ -3200,22 +4370,13 @@ 1.4137 "the working directory." 1.4138 msgstr "" 1.4139 1.4140 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4141 -#: ../en/ch01-tour-basic.xml:707 1.4142 -msgid "" 1.4143 -"If we run the <command role=\"hg-cmd\">hg commit</command> command without " 1.4144 -"any arguments, it records all of the changes we've made, as reported by " 1.4145 -"<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 1.4146 -"diff</command>." 1.4147 -msgstr "" 1.4148 - 1.4149 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4150 -#: ../en/ch01-tour-basic.xml:714 1.4151 +#: ../en/ch02-tour-basic.xml:736 1.4152 msgid "Admiring our new handiwork" 1.4153 msgstr "欣赏我们的成果" 1.4154 1.4155 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4156 -#: ../en/ch01-tour-basic.xml:716 1.4157 +#: ../en/ch02-tour-basic.xml:738 1.4158 msgid "" 1.4159 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg " 1.4160 "tip</command> command to display the changeset we just created. This command " 1.4161 @@ -3224,14 +4385,14 @@ 1.4162 msgstr "" 1.4163 1.4164 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4165 -#: ../en/ch01-tour-basic.xml:725 1.4166 +#: ../en/ch02-tour-basic.xml:746 1.4167 msgid "" 1.4168 "We refer to the newest revision in the repository as the <emphasis>tip " 1.4169 "revision</emphasis>, or simply the <emphasis>tip</emphasis>." 1.4170 msgstr "" 1.4171 1.4172 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4173 -#: ../en/ch01-tour-basic.xml:729 1.4174 +#: ../en/ch02-tour-basic.xml:750 1.4175 msgid "" 1.4176 "By the way, the <command role=\"hg-cmd\">hg tip</command> command accepts " 1.4177 "many of the same options as <command role=\"hg-cmd\">hg log</command>, so " 1.4178 @@ -3242,12 +4403,12 @@ 1.4179 msgstr "" 1.4180 1.4181 #. type: Content of: <book><chapter><sect1><title> 1.4182 -#: ../en/ch01-tour-basic.xml:741 1.4183 +#: ../en/ch02-tour-basic.xml:762 1.4184 msgid "Sharing changes" 1.4185 msgstr "共享修改" 1.4186 1.4187 #. type: Content of: <book><chapter><sect1><para> 1.4188 -#: ../en/ch01-tour-basic.xml:743 1.4189 +#: ../en/ch02-tour-basic.xml:764 1.4190 msgid "" 1.4191 "We mentioned earlier that repositories in Mercurial are self-contained. This " 1.4192 "means that the changeset we just created exists only in our <filename class=" 1.4193 @@ -3256,12 +4417,12 @@ 1.4194 msgstr "" 1.4195 1.4196 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4197 -#: ../en/ch01-tour-basic.xml:751 1.4198 +#: ../en/ch02-tour-basic.xml:772 1.4199 msgid "Pulling changes from another repository" 1.4200 msgstr "从其它版本库取得修改" 1.4201 1.4202 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4203 -#: ../en/ch01-tour-basic.xml:752 1.4204 +#: ../en/ch02-tour-basic.xml:774 1.4205 msgid "" 1.4206 "To get started, let's clone our original <filename class=\"directory\">hello</" 1.4207 "filename> repository, which does not contain the change we just committed. " 1.4208 @@ -3270,7 +4431,7 @@ 1.4209 msgstr "" 1.4210 1.4211 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4212 -#: ../en/ch01-tour-basic.xml:760 1.4213 +#: ../en/ch02-tour-basic.xml:782 1.4214 msgid "" 1.4215 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring " 1.4216 "changes from <filename class=\"directory\">my-hello</filename> into <filename " 1.4217 @@ -3283,8 +4444,35 @@ 1.4218 msgstr "" 1.4219 1.4220 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4221 -#: ../en/ch01-tour-basic.xml:773 1.4222 -msgid "" 1.4223 +#: ../en/ch02-tour-basic.xml:795 1.4224 +msgid "" 1.4225 +"Bringing changes into a repository is a simple matter of running the <command " 1.4226 +"role=\"hg-cmd\">hg pull</command> command, and optionally telling it which " 1.4227 +"repository to pull from." 1.4228 +msgstr "" 1.4229 + 1.4230 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4231 +#: ../en/ch02-tour-basic.xml:801 1.4232 +msgid "" 1.4233 +"As you can see from the before-and-after output of <command role=\"hg-cmd" 1.4234 +"\">hg tip</command>, we have successfully pulled changes into our " 1.4235 +"repository. However, Mercurial separates pulling changes in from updating " 1.4236 +"the working directory. There remains one step before we will see the changes " 1.4237 +"that we just pulled appear in the working directory." 1.4238 +msgstr "" 1.4239 + 1.4240 +#. type: Content of: <book><chapter><sect1><sect2><tip><title> 1.4241 +#: ../en/ch02-tour-basic.xml:810 1.4242 +#, fuzzy 1.4243 +msgid "Pulling specific changes" 1.4244 +msgstr "合并有冲突的改变" 1.4245 + 1.4246 +#. type: Content of: <book><chapter><sect1><sect2><tip><para> 1.4247 +#: ../en/ch02-tour-basic.xml:812 1.4248 +msgid "" 1.4249 +"It is possible that due to the delay between running <command role=\"hg-cmd" 1.4250 +"\">hg incoming</command> and <command role=\"hg-cmd\">hg pull</command>, you " 1.4251 +"may not see all changesets that will be brought from the other repository. " 1.4252 "Suppose you're pulling changes from a repository on the network somewhere. " 1.4253 "While you are looking at the <command role=\"hg-cmd\">hg incoming</command> " 1.4254 "output, and before you pull those changes, someone might have committed " 1.4255 @@ -3293,30 +4481,22 @@ 1.4256 "command>." 1.4257 msgstr "" 1.4258 1.4259 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4260 -#: ../en/ch01-tour-basic.xml:781 1.4261 -msgid "" 1.4262 -"Bringing changes into a repository is a simple matter of running the <command " 1.4263 -"role=\"hg-cmd\">hg pull</command> command, and telling it which repository to " 1.4264 -"pull from." 1.4265 -msgstr "" 1.4266 - 1.4267 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4268 -#: ../en/ch01-tour-basic.xml:788 1.4269 -msgid "" 1.4270 -"As you can see from the before-and-after output of <command role=\"hg-cmd" 1.4271 -"\">hg tip</command>, we have successfully pulled changes into our " 1.4272 -"repository. There remains one step before we can see these changes in the " 1.4273 -"working directory." 1.4274 +#. type: Content of: <book><chapter><sect1><sect2><tip><para> 1.4275 +#: ../en/ch02-tour-basic.xml:824 1.4276 +msgid "" 1.4277 +"If you only want to pull precisely the changes that were listed by <command " 1.4278 +"role=\"hg-cmd\">hg incoming</command>, or you have some other reason to pull " 1.4279 +"a subset of changes, simply identify the change that you want to pull by its " 1.4280 +"changeset ID, e.g. <command>hg pull -r7e95bb</command>." 1.4281 msgstr "" 1.4282 1.4283 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4284 -#: ../en/ch01-tour-basic.xml:796 1.4285 +#: ../en/ch02-tour-basic.xml:834 1.4286 msgid "Updating the working directory" 1.4287 msgstr "更新工作目录" 1.4288 1.4289 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4290 -#: ../en/ch01-tour-basic.xml:798 1.4291 +#: ../en/ch02-tour-basic.xml:836 1.4292 msgid "" 1.4293 "We have so far glossed over the relationship between a repository and its " 1.4294 "working directory. The <command role=\"hg-cmd\">hg pull</command> command " 1.4295 @@ -3328,7 +4508,7 @@ 1.4296 msgstr "" 1.4297 1.4298 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4299 -#: ../en/ch01-tour-basic.xml:810 1.4300 +#: ../en/ch02-tour-basic.xml:848 1.4301 msgid "" 1.4302 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> " 1.4303 "doesn't update the working directory automatically. There's actually a good " 1.4304 @@ -3342,31 +4522,31 @@ 1.4305 msgstr "" 1.4306 1.4307 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4308 -#: ../en/ch01-tour-basic.xml:821 1.4309 -msgid "" 1.4310 -"However, since pull-then-update is such a common thing to do, Mercurial lets " 1.4311 -"you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> " 1.4312 -"option to <command role=\"hg-cmd\">hg pull</command>." 1.4313 -msgstr "" 1.4314 - 1.4315 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4316 -#: ../en/ch01-tour-basic.xml:826 1.4317 +#: ../en/ch02-tour-basic.xml:860 1.4318 +msgid "" 1.4319 +"Since pull-then-update is such a common sequence of operations, Mercurial " 1.4320 +"lets you combine the two by passing the <option role=\"hg-opt-pull\">-u</" 1.4321 +"option> option to <command role=\"hg-cmd\">hg pull</command>." 1.4322 +msgstr "" 1.4323 + 1.4324 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4325 +#: ../en/ch02-tour-basic.xml:865 1.4326 msgid "" 1.4327 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> " 1.4328 "in <xref linkend=\"sec:tour:pull\"/> when we ran it without <option role=\"hg-" 1.4329 "opt-pull\">-u</option>, you can see that it printed a helpful reminder that " 1.4330 -"we'd have to take an explicit step to update the working directory:" 1.4331 -msgstr "" 1.4332 - 1.4333 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4334 -#: ../en/ch01-tour-basic.xml:835 1.4335 +"we'd have to take an explicit step to update the working directory." 1.4336 +msgstr "" 1.4337 + 1.4338 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4339 +#: ../en/ch02-tour-basic.xml:872 1.4340 msgid "" 1.4341 "To find out what revision the working directory is at, use the <command role=" 1.4342 "\"hg-cmd\">hg parents</command> command." 1.4343 msgstr "" 1.4344 1.4345 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4346 -#: ../en/ch01-tour-basic.xml:841 1.4347 +#: ../en/ch02-tour-basic.xml:878 1.4348 msgid "" 1.4349 "If you look back at <xref linkend=\"fig:tour-basic:history\"/>, you'll see " 1.4350 "arrows connecting each changeset. The node that the arrow leads " 1.4351 @@ -3377,7 +4557,7 @@ 1.4352 msgstr "" 1.4353 1.4354 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4355 -#: ../en/ch01-tour-basic.xml:850 1.4356 +#: ../en/ch02-tour-basic.xml:887 1.4357 msgid "" 1.4358 "To update the working directory to a particular revision, give a revision " 1.4359 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " 1.4360 @@ -3385,7 +4565,7 @@ 1.4361 msgstr "" 1.4362 1.4363 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4364 -#: ../en/ch01-tour-basic.xml:857 1.4365 +#: ../en/ch02-tour-basic.xml:893 1.4366 msgid "" 1.4367 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</" 1.4368 "command> will update to the tip revision, as shown by the second call to " 1.4369 @@ -3393,35 +4573,35 @@ 1.4370 msgstr "" 1.4371 1.4372 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4373 -#: ../en/ch01-tour-basic.xml:865 1.4374 +#: ../en/ch02-tour-basic.xml:901 1.4375 msgid "Pushing changes to another repository" 1.4376 msgstr "发布修改到其它版本库" 1.4377 1.4378 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4379 -#: ../en/ch01-tour-basic.xml:867 1.4380 +#: ../en/ch02-tour-basic.xml:903 1.4381 msgid "" 1.4382 "Mercurial lets us push changes to another repository, from the repository " 1.4383 -"we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 1.4384 +"we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 1.4385 "pull</command> above, we'll create a temporary repository to push our changes " 1.4386 "into." 1.4387 msgstr "" 1.4388 1.4389 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4390 -#: ../en/ch01-tour-basic.xml:875 1.4391 +#: ../en/ch02-tour-basic.xml:911 1.4392 msgid "" 1.4393 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " 1.4394 "changes would be pushed into another repository." 1.4395 msgstr "" 1.4396 1.4397 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4398 -#: ../en/ch01-tour-basic.xml:881 1.4399 +#: ../en/ch02-tour-basic.xml:917 1.4400 msgid "" 1.4401 "And the <command role=\"hg-cmd\">hg push</command> command does the actual " 1.4402 "push." 1.4403 msgstr "" 1.4404 1.4405 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4406 -#: ../en/ch01-tour-basic.xml:887 1.4407 +#: ../en/ch02-tour-basic.xml:922 1.4408 msgid "" 1.4409 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd" 1.4410 "\">hg push</command> command does not update the working directory in the " 1.4411 @@ -3435,19 +4615,53 @@ 1.4412 msgstr "" 1.4413 1.4414 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4415 -#: ../en/ch01-tour-basic.xml:899 1.4416 +#: ../en/ch02-tour-basic.xml:934 1.4417 msgid "" 1.4418 "What happens if we try to pull or push changes and the receiving repository " 1.4419 "already has those changes? Nothing too exciting." 1.4420 msgstr "" 1.4421 1.4422 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4423 -#: ../en/ch01-tour-basic.xml:906 1.4424 +#: ../en/ch02-tour-basic.xml:942 1.4425 +msgid "Default locations" 1.4426 +msgstr "" 1.4427 + 1.4428 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4429 +#: ../en/ch02-tour-basic.xml:944 1.4430 +msgid "" 1.4431 +"When we clone a repository, Mercurial records the location of the repository " 1.4432 +"we cloned in the <filename>.hg/hgrc</filename> file of the new repository. " 1.4433 +"If we don't supply a location to <command>hg pull</command> from or " 1.4434 +"<command>hg push</command> to, those commands will use this location as a " 1.4435 +"default. The <command>hg incoming</command> and <command>hg outgoing</" 1.4436 +"command> commands do so too." 1.4437 +msgstr "" 1.4438 + 1.4439 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4440 +#: ../en/ch02-tour-basic.xml:952 1.4441 +msgid "" 1.4442 +"If you open a repository's <filename>.hg/hgrc</filename> file in a text " 1.4443 +"editor, you will see contents like the following." 1.4444 +msgstr "" 1.4445 + 1.4446 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4447 +#: ../en/ch02-tour-basic.xml:959 1.4448 +msgid "" 1.4449 +"It is possible&emdash;and often useful&emdash;to have the default location " 1.4450 +"for <command>hg push</command> and <command>hg outgoing</command> be " 1.4451 +"different from those for <command>hg pull</command> and <command>hg incoming</" 1.4452 +"command>. We can do this by adding a <literal>default-push</literal> entry " 1.4453 +"to the <literal>[paths]</literal> section of the <filename>.hg/hgrc</" 1.4454 +"filename> file, as follows." 1.4455 +msgstr "" 1.4456 + 1.4457 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.4458 +#: ../en/ch02-tour-basic.xml:973 1.4459 msgid "Sharing changes over a network" 1.4460 msgstr "通过网络共享修改" 1.4461 1.4462 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4463 -#: ../en/ch01-tour-basic.xml:908 1.4464 +#: ../en/ch02-tour-basic.xml:975 1.4465 msgid "" 1.4466 "The commands we have covered in the previous few sections are not limited to " 1.4467 "working with local repositories. Each works in exactly the same fashion over " 1.4468 @@ -3455,20 +4669,71 @@ 1.4469 msgstr "" 1.4470 1.4471 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4472 -#: ../en/ch01-tour-basic.xml:916 1.4473 +#: ../en/ch02-tour-basic.xml:983 1.4474 msgid "" 1.4475 "In this example, we can see what changes we could push to the remote " 1.4476 "repository, but the repository is understandably not set up to let anonymous " 1.4477 "users push to it." 1.4478 msgstr "" 1.4479 1.4480 +#. type: Content of: <book><chapter><sect1><title> 1.4481 +#: ../en/ch02-tour-basic.xml:993 1.4482 +#, fuzzy 1.4483 +msgid "Starting a new project" 1.4484 +msgstr "创建新补丁" 1.4485 + 1.4486 +#. type: Content of: <book><chapter><sect1><para> 1.4487 +#: ../en/ch02-tour-basic.xml:995 1.4488 +msgid "" 1.4489 +"It is just as easy to begin a new project as to work on one that already " 1.4490 +"exists. The <command>hg init</command> command creates a new, empty " 1.4491 +"Mercurial repository." 1.4492 +msgstr "" 1.4493 + 1.4494 +#. type: Content of: <book><chapter><sect1><para> 1.4495 +#: ../en/ch02-tour-basic.xml:1001 1.4496 +msgid "" 1.4497 +"This simply creates a repository named <filename>myproject</filename> in the " 1.4498 +"current directory." 1.4499 +msgstr "" 1.4500 + 1.4501 +#. type: Content of: <book><chapter><sect1><para> 1.4502 +#: ../en/ch02-tour-basic.xml:1006 1.4503 +msgid "" 1.4504 +"We can tell that <filename>myproject</filename> is a Mercurial repository, " 1.4505 +"because it contains a <filename>.hg</filename> directory." 1.4506 +msgstr "" 1.4507 + 1.4508 +#. type: Content of: <book><chapter><sect1><para> 1.4509 +#: ../en/ch02-tour-basic.xml:1012 1.4510 +msgid "" 1.4511 +"If we want to add some pre-existing files to the repository, we copy them " 1.4512 +"into place, and tell Mercurial to start tracking them using the <command>hg " 1.4513 +"add</command> command." 1.4514 +msgstr "" 1.4515 + 1.4516 +#. type: Content of: <book><chapter><sect1><para> 1.4517 +#: ../en/ch02-tour-basic.xml:1018 1.4518 +msgid "" 1.4519 +"Once we are satisfied that our project looks right, we commit our changes." 1.4520 +msgstr "" 1.4521 + 1.4522 +#. type: Content of: <book><chapter><sect1><para> 1.4523 +#: ../en/ch02-tour-basic.xml:1023 1.4524 +msgid "" 1.4525 +"It takes just a few moments to start using Mercurial on a new project, which " 1.4526 +"is part of its appeal. Revision control is now so easy to work with, we can " 1.4527 +"use it on the smallest of projects that we might not have considered with a " 1.4528 +"more complicated tool." 1.4529 +msgstr "" 1.4530 + 1.4531 #. type: Content of: <book><chapter><title> 1.4532 -#: ../en/ch02-tour-merge.xml:5 1.4533 +#: ../en/ch03-tour-merge.xml:5 1.4534 msgid "A tour of Mercurial: merging work" 1.4535 msgstr "Mercurial 教程: 合并工作" 1.4536 1.4537 #. type: Content of: <book><chapter><para> 1.4538 -#: ../en/ch02-tour-merge.xml:7 1.4539 +#: ../en/ch03-tour-merge.xml:7 1.4540 msgid "" 1.4541 "We've now covered cloning a repository, making changes in a repository, and " 1.4542 "pulling or pushing changes from one repository into another. Our next step " 1.4543 @@ -3476,19 +4741,19 @@ 1.4544 msgstr "" 1.4545 1.4546 #. type: Content of: <book><chapter><sect1><title> 1.4547 -#: ../en/ch02-tour-merge.xml:13 1.4548 +#: ../en/ch03-tour-merge.xml:13 1.4549 msgid "Merging streams of work" 1.4550 msgstr "合并的流程" 1.4551 1.4552 #. type: Content of: <book><chapter><sect1><para> 1.4553 -#: ../en/ch02-tour-merge.xml:15 1.4554 +#: ../en/ch03-tour-merge.xml:15 1.4555 msgid "" 1.4556 "Merging is a fundamental part of working with a distributed revision control " 1.4557 -"tool." 1.4558 +"tool. Here are a few cases in which the need to merge work arises." 1.4559 msgstr "" 1.4560 1.4561 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.4562 -#: ../en/ch02-tour-merge.xml:18 1.4563 +#: ../en/ch03-tour-merge.xml:20 1.4564 msgid "" 1.4565 "Alice and Bob each have a personal copy of a repository for a project they're " 1.4566 "collaborating on. Alice fixes a bug in her repository; Bob adds a new " 1.4567 @@ -3497,31 +4762,37 @@ 1.4568 msgstr "" 1.4569 1.4570 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.4571 -#: ../en/ch02-tour-merge.xml:24 1.4572 -msgid "" 1.4573 -"I frequently work on several different tasks for a single project at once, " 1.4574 -"each safely isolated in its own repository. Working this way means that I " 1.4575 -"often need to merge one piece of my own work with another." 1.4576 -msgstr "" 1.4577 - 1.4578 -#. type: Content of: <book><chapter><sect1><para> 1.4579 -#: ../en/ch02-tour-merge.xml:30 1.4580 -msgid "" 1.4581 -"Because merging is such a common thing to need to do, Mercurial makes it " 1.4582 -"easy. Let's walk through the process. We'll begin by cloning yet another " 1.4583 -"repository (see how often they spring up?) and making a change in it." 1.4584 -msgstr "" 1.4585 - 1.4586 -#. type: Content of: <book><chapter><sect1><para> 1.4587 -#: ../en/ch02-tour-merge.xml:37 1.4588 +#: ../en/ch03-tour-merge.xml:27 1.4589 +msgid "" 1.4590 +"Cynthia frequently works on several different tasks for a single project at " 1.4591 +"once, each safely isolated in its own repository. Working this way means that " 1.4592 +"she often needs to merge one piece of her own work with another." 1.4593 +msgstr "" 1.4594 + 1.4595 +#. type: Content of: <book><chapter><sect1><para> 1.4596 +#: ../en/ch03-tour-merge.xml:35 1.4597 +msgid "" 1.4598 +"Because we need to merge often, Mercurial makes the process easy. Let's walk " 1.4599 +"through a merge. We'll begin by cloning yet another repository (see how " 1.4600 +"often they spring up?) and making a change in it." 1.4601 +msgstr "" 1.4602 + 1.4603 +#. type: Content of: <book><chapter><sect1><para> 1.4604 +#: ../en/ch03-tour-merge.xml:42 1.4605 msgid "" 1.4606 "We should now have two copies of <filename>hello.c</filename> with different " 1.4607 "contents. The histories of the two repositories have also diverged, as " 1.4608 -"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>." 1.4609 +"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>. Here is a copy " 1.4610 +"of our file from one repository." 1.4611 +msgstr "" 1.4612 + 1.4613 +#. type: Content of: <book><chapter><sect1><para> 1.4614 +#: ../en/ch03-tour-merge.xml:51 1.4615 +msgid "And here is our slightly different version from the other repository." 1.4616 msgstr "" 1.4617 1.4618 #. type: Content of: <book><chapter><sect1><figure><title> 1.4619 -#: ../en/ch02-tour-merge.xml:46 1.4620 +#: ../en/ch03-tour-merge.xml:57 1.4621 msgid "" 1.4622 "Divergent recent histories of the <filename class=\"directory\">my-hello</" 1.4623 "filename> and <filename class=\"directory\">my-new-hello</filename> " 1.4624 @@ -3531,14 +4802,14 @@ 1.4625 "\"directory\">my-new-hello</filename> 最新的历史分叉" 1.4626 1.4627 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 1.4628 -#: ../en/ch02-tour-merge.xml:51 1.4629 +#: ../en/ch03-tour-merge.xml:62 1.4630 msgid "" 1.4631 "<imageobject><imagedata fileref=\"figs/tour-merge-sep-repos.png\"/></" 1.4632 "imageobject>" 1.4633 msgstr "" 1.4634 1.4635 #. type: Content of: <book><chapter><sect1><para> 1.4636 -#: ../en/ch02-tour-merge.xml:56 1.4637 +#: ../en/ch03-tour-merge.xml:67 1.4638 msgid "" 1.4639 "We already know that pulling changes from our <filename class=\"directory" 1.4640 "\">my-hello</filename> repository will have no effect on the working " 1.4641 @@ -3546,28 +4817,29 @@ 1.4642 msgstr "" 1.4643 1.4644 #. type: Content of: <book><chapter><sect1><para> 1.4645 -#: ../en/ch02-tour-merge.xml:62 1.4646 +#: ../en/ch03-tour-merge.xml:73 1.4647 msgid "" 1.4648 "However, the <command role=\"hg-cmd\">hg pull</command> command says " 1.4649 "something about <quote>heads</quote>." 1.4650 msgstr "" 1.4651 1.4652 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4653 -#: ../en/ch02-tour-merge.xml:66 1.4654 +#: ../en/ch03-tour-merge.xml:77 1.4655 msgid "Head changesets" 1.4656 msgstr "顶点修改集" 1.4657 1.4658 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4659 -#: ../en/ch02-tour-merge.xml:68 1.4660 -msgid "" 1.4661 -"A head is a change that has no descendants, or children, as they're also " 1.4662 -"known. The tip revision is thus a head, because the newest revision in a " 1.4663 -"repository doesn't have any children, but a repository can contain more than " 1.4664 -"one head." 1.4665 +#: ../en/ch03-tour-merge.xml:79 1.4666 +msgid "" 1.4667 +"Remember that Mercurial records what the parent of each change is. If a " 1.4668 +"change has a parent, we call it a child or descendant of the parent. A head " 1.4669 +"is a change that has no children. The tip revision is thus a head, because " 1.4670 +"the newest revision in a repository doesn't have any children. There are " 1.4671 +"times when a repository can contain more than one head." 1.4672 msgstr "" 1.4673 1.4674 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.4675 -#: ../en/ch02-tour-merge.xml:75 1.4676 +#: ../en/ch03-tour-merge.xml:88 1.4677 msgid "" 1.4678 "Repository contents after pulling from <filename class=\"directory\">my-" 1.4679 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>" 1.4680 @@ -3576,25 +4848,27 @@ 1.4681 "\"directory\">my-new-hello</filename> 之后版本库的内容" 1.4682 1.4683 #. type: Content of: <book><chapter><sect1><sect2><figure> 1.4684 -#: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:159 1.4685 -#: ../en/ch02-tour-merge.xml:256 ../en/ch03-concepts.xml:57 1.4686 -#: ../en/ch03-concepts.xml:106 ../en/ch03-concepts.xml:191 1.4687 -#: ../en/ch03-concepts.xml:346 ../en/ch03-concepts.xml:361 1.4688 -#: ../en/ch03-concepts.xml:402 ../en/ch03-concepts.xml:422 1.4689 -#: ../en/ch03-concepts.xml:463 ../en/ch05-collab.xml:320 1.4690 -#: ../en/ch08-undo.xml:363 ../en/ch08-undo.xml:410 ../en/ch08-undo.xml:475 1.4691 -#: ../en/ch08-undo.xml:513 ../en/ch11-mq.xml:410 1.4692 +#: ../en/ch03-tour-merge.xml:91 ../en/ch03-tour-merge.xml:178 1.4693 +#: ../en/ch03-tour-merge.xml:275 ../en/ch04-concepts.xml:57 1.4694 +#: ../en/ch04-concepts.xml:106 ../en/ch04-concepts.xml:196 1.4695 +#: ../en/ch04-concepts.xml:345 ../en/ch04-concepts.xml:360 1.4696 +#: ../en/ch04-concepts.xml:401 ../en/ch04-concepts.xml:421 1.4697 +#: ../en/ch04-concepts.xml:465 ../en/ch06-collab.xml:314 1.4698 +#: ../en/ch09-undo.xml:342 ../en/ch09-undo.xml:389 ../en/ch09-undo.xml:462 1.4699 +#: ../en/ch09-undo.xml:500 ../en/ch09-undo.xml:656 ../en/ch09-undo.xml:680 1.4700 +#: ../en/ch09-undo.xml:698 ../en/ch09-undo.xml:712 ../en/ch09-undo.xml:725 1.4701 +#: ../en/ch12-mq.xml:411 1.4702 msgid " <placeholder type=\"mediaobject\" id=\"0\"/>" 1.4703 msgstr "" 1.4704 1.4705 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.4706 -#: ../en/ch02-tour-merge.xml:79 1.4707 +#: ../en/ch03-tour-merge.xml:92 1.4708 msgid "" 1.4709 "<imageobject> <imagedata fileref=\"figs/tour-merge-pull.png\"/> </imageobject>" 1.4710 msgstr "" 1.4711 1.4712 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4713 -#: ../en/ch02-tour-merge.xml:86 1.4714 +#: ../en/ch03-tour-merge.xml:99 1.4715 msgid "" 1.4716 "In <xref linkend=\"fig:tour-merge:pull\"/>, you can see the effect of the " 1.4717 "pull from <filename class=\"directory\">my-hello</filename> into <filename " 1.4718 @@ -3610,43 +4884,51 @@ 1.4719 msgstr "" 1.4720 1.4721 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4722 -#: ../en/ch02-tour-merge.xml:105 1.4723 +#: ../en/ch03-tour-merge.xml:118 1.4724 msgid "Performing the merge" 1.4725 msgstr "执行合并" 1.4726 1.4727 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4728 -#: ../en/ch02-tour-merge.xml:107 1.4729 +#: ../en/ch03-tour-merge.xml:120 1.4730 msgid "" 1.4731 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</" 1.4732 "command> command to update to the new tip?" 1.4733 msgstr "" 1.4734 1.4735 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4736 -#: ../en/ch02-tour-merge.xml:113 1.4737 +#: ../en/ch03-tour-merge.xml:126 1.4738 msgid "" 1.4739 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> " 1.4740 "command won't do a merge; it won't update the working directory when it " 1.4741 -"thinks we might want to do a merge, unless we force it to do so. Instead, we " 1.4742 -"use the <command role=\"hg-cmd\">hg merge</command> command to merge the two " 1.4743 -"heads." 1.4744 -msgstr "" 1.4745 - 1.4746 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.4747 -#: ../en/ch02-tour-merge.xml:122 1.4748 -msgid "" 1.4749 -"This updates the working directory so that it contains changes from " 1.4750 -"<emphasis>both</emphasis> heads, which is reflected in both the output of " 1.4751 -"<command role=\"hg-cmd\">hg parents</command> and the contents of " 1.4752 -"<filename>hello.c</filename>." 1.4753 +"thinks we might want to do a merge, unless we force it to do so. " 1.4754 +"(Incidentally, forcing the update with <command>hg update -C</command> would " 1.4755 +"revert any uncommitted changes in the working directory.)" 1.4756 +msgstr "" 1.4757 + 1.4758 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4759 +#: ../en/ch03-tour-merge.xml:134 1.4760 +#, fuzzy 1.4761 +msgid "" 1.4762 +"To start a merge between the two heads, we use the <command role=\"hg-cmd" 1.4763 +"\">hg merge</command> command." 1.4764 +msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项" 1.4765 + 1.4766 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.4767 +#: ../en/ch03-tour-merge.xml:139 1.4768 +msgid "" 1.4769 +"We resolve the contents of <filename>hello.c</filename> This updates the " 1.4770 +"working directory so that it contains changes from <emphasis>both</emphasis> " 1.4771 +"heads, which is reflected in both the output of <command role=\"hg-cmd\">hg " 1.4772 +"parents</command> and the contents of <filename>hello.c</filename>." 1.4773 msgstr "" 1.4774 1.4775 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4776 -#: ../en/ch02-tour-merge.xml:132 1.4777 +#: ../en/ch03-tour-merge.xml:151 1.4778 msgid "Committing the results of the merge" 1.4779 msgstr "提交合并结果" 1.4780 1.4781 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4782 -#: ../en/ch02-tour-merge.xml:134 1.4783 +#: ../en/ch03-tour-merge.xml:153 1.4784 msgid "" 1.4785 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> " 1.4786 "will display two parents until we <command role=\"hg-cmd\">hg commit</" 1.4787 @@ -3654,7 +4936,7 @@ 1.4788 msgstr "" 1.4789 1.4790 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4791 -#: ../en/ch02-tour-merge.xml:141 1.4792 +#: ../en/ch03-tour-merge.xml:160 1.4793 msgid "" 1.4794 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> " 1.4795 "of our former heads as its parents. These are the same revisions that were " 1.4796 @@ -3662,7 +4944,7 @@ 1.4797 msgstr "" 1.4798 1.4799 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4800 -#: ../en/ch02-tour-merge.xml:148 1.4801 +#: ../en/ch03-tour-merge.xml:167 1.4802 msgid "" 1.4803 "In <xref linkend=\"fig:tour-merge:merge\"/>, you can see a representation of " 1.4804 "what happens to the working directory during the merge, and how this affects " 1.4805 @@ -3672,19 +4954,19 @@ 1.4806 msgstr "" 1.4807 1.4808 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.4809 -#: ../en/ch02-tour-merge.xml:157 1.4810 +#: ../en/ch03-tour-merge.xml:176 1.4811 msgid "Working directory and repository during merge, and following commit" 1.4812 msgstr "在合并期间,以及提交之后的工作目录与版本库" 1.4813 1.4814 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.4815 -#: ../en/ch02-tour-merge.xml:160 1.4816 +#: ../en/ch03-tour-merge.xml:179 1.4817 msgid "" 1.4818 "<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </" 1.4819 "imageobject>" 1.4820 msgstr "" 1.4821 1.4822 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4823 -#: ../en/ch02-tour-merge.xml:167 1.4824 +#: ../en/ch03-tour-merge.xml:186 1.4825 msgid "" 1.4826 "We sometimes talk about a merge having <emphasis>sides</emphasis>: the left " 1.4827 "side is the first parent in the output of <command role=\"hg-cmd\">hg " 1.4828 @@ -3694,12 +4976,12 @@ 1.4829 msgstr "" 1.4830 1.4831 #. type: Content of: <book><chapter><sect1><title> 1.4832 -#: ../en/ch02-tour-merge.xml:177 1.4833 +#: ../en/ch03-tour-merge.xml:196 1.4834 msgid "Merging conflicting changes" 1.4835 msgstr "合并有冲突的改变" 1.4836 1.4837 #. type: Content of: <book><chapter><sect1><para> 1.4838 -#: ../en/ch02-tour-merge.xml:179 1.4839 +#: ../en/ch03-tour-merge.xml:198 1.4840 msgid "" 1.4841 "Most merges are simple affairs, but sometimes you'll find yourself merging " 1.4842 "changes where each side modifies the same portions of the same files. Unless " 1.4843 @@ -3709,19 +4991,19 @@ 1.4844 msgstr "" 1.4845 1.4846 #. type: Content of: <book><chapter><sect1><figure><title> 1.4847 -#: ../en/ch02-tour-merge.xml:187 1.4848 +#: ../en/ch03-tour-merge.xml:206 1.4849 msgid "Conflicting changes to a document" 1.4850 msgstr "冲突的修改" 1.4851 1.4852 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 1.4853 -#: ../en/ch02-tour-merge.xml:189 1.4854 +#: ../en/ch03-tour-merge.xml:208 1.4855 msgid "" 1.4856 "<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></" 1.4857 "imageobject>" 1.4858 msgstr "" 1.4859 1.4860 #. type: Content of: <book><chapter><sect1><para> 1.4861 -#: ../en/ch02-tour-merge.xml:194 1.4862 +#: ../en/ch03-tour-merge.xml:213 1.4863 msgid "" 1.4864 "<xref linkend=\"fig:tour-merge:conflict\"/> illustrates an instance of two " 1.4865 "conflicting changes to a document. We started with a single version of the " 1.4866 @@ -3731,7 +5013,7 @@ 1.4867 msgstr "" 1.4868 1.4869 #. type: Content of: <book><chapter><sect1><para> 1.4870 -#: ../en/ch02-tour-merge.xml:201 1.4871 +#: ../en/ch03-tour-merge.xml:220 1.4872 msgid "" 1.4873 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, " 1.4874 "it runs an external program, usually one that displays some kind of graphical " 1.4875 @@ -3743,20 +5025,20 @@ 1.4876 msgstr "" 1.4877 1.4878 #. type: Content of: <book><chapter><sect1><para> 1.4879 -#: ../en/ch02-tour-merge.xml:211 1.4880 -msgid "" 1.4881 -"It's also possible to get Mercurial to run another program or script instead " 1.4882 -"of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> " 1.4883 -"environment variable to the name of your preferred program." 1.4884 +#: ../en/ch03-tour-merge.xml:230 1.4885 +msgid "" 1.4886 +"It's also possible to get Mercurial to run a specific program or script, by " 1.4887 +"setting the <envar>HGMERGE</envar> environment variable to the name of your " 1.4888 +"preferred program." 1.4889 msgstr "" 1.4890 1.4891 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4892 -#: ../en/ch02-tour-merge.xml:217 1.4893 +#: ../en/ch03-tour-merge.xml:236 1.4894 msgid "Using a graphical merge tool" 1.4895 msgstr "使用图形合并工具" 1.4896 1.4897 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4898 -#: ../en/ch02-tour-merge.xml:219 1.4899 +#: ../en/ch03-tour-merge.xml:238 1.4900 msgid "" 1.4901 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll " 1.4902 "use to describe the features that are common to graphical file merging " 1.4903 @@ -3768,7 +5050,7 @@ 1.4904 msgstr "" 1.4905 1.4906 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.4907 -#: ../en/ch02-tour-merge.xml:229 1.4908 +#: ../en/ch03-tour-merge.xml:248 1.4909 msgid "" 1.4910 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the " 1.4911 "most recent version from which the two versions we're trying to merge are " 1.4912 @@ -3776,21 +5058,21 @@ 1.4913 msgstr "" 1.4914 1.4915 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.4916 -#: ../en/ch02-tour-merge.xml:234 1.4917 +#: ../en/ch03-tour-merge.xml:253 1.4918 msgid "" 1.4919 "In the middle is <quote>our</quote> version of the file, with the contents " 1.4920 "that we modified." 1.4921 msgstr "" 1.4922 1.4923 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.4924 -#: ../en/ch02-tour-merge.xml:237 1.4925 +#: ../en/ch03-tour-merge.xml:256 1.4926 msgid "" 1.4927 "On the right is <quote>their</quote> version of the file, the one that from " 1.4928 "the changeset that we're trying to merge with." 1.4929 msgstr "" 1.4930 1.4931 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4932 -#: ../en/ch02-tour-merge.xml:241 1.4933 +#: ../en/ch03-tour-merge.xml:260 1.4934 msgid "" 1.4935 "In the pane below these is the current <emphasis>result</emphasis> of the " 1.4936 "merge. Our task is to replace all of the red text, which indicates unresolved " 1.4937 @@ -3799,7 +5081,7 @@ 1.4938 msgstr "" 1.4939 1.4940 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4941 -#: ../en/ch02-tour-merge.xml:248 1.4942 +#: ../en/ch03-tour-merge.xml:267 1.4943 msgid "" 1.4944 "All four of these panes are <emphasis>locked together</emphasis>; if we " 1.4945 "scroll vertically or horizontally in any of them, the others are updated to " 1.4946 @@ -3807,19 +5089,19 @@ 1.4947 msgstr "" 1.4948 1.4949 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.4950 -#: ../en/ch02-tour-merge.xml:254 1.4951 +#: ../en/ch03-tour-merge.xml:273 1.4952 msgid "Using <command>kdiff3</command> to merge versions of a file" 1.4953 msgstr "使用 <command>kdiff3</command> 合并文件的不同版本" 1.4954 1.4955 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.4956 -#: ../en/ch02-tour-merge.xml:257 1.4957 +#: ../en/ch03-tour-merge.xml:276 1.4958 msgid "" 1.4959 "<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></" 1.4960 "imageobject>" 1.4961 msgstr "" 1.4962 1.4963 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4964 -#: ../en/ch02-tour-merge.xml:265 1.4965 +#: ../en/ch03-tour-merge.xml:284 1.4966 msgid "" 1.4967 "For each conflicting portion of the file, we can choose to resolve the " 1.4968 "conflict using some combination of text from the base version, ours, or " 1.4969 @@ -3828,7 +5110,7 @@ 1.4970 msgstr "" 1.4971 1.4972 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4973 -#: ../en/ch02-tour-merge.xml:271 1.4974 +#: ../en/ch03-tour-merge.xml:290 1.4975 msgid "" 1.4976 "There are <emphasis>many</emphasis> file merging tools available, too many to " 1.4977 "cover here. They vary in which platforms they are available for, and in " 1.4978 @@ -3838,12 +5120,12 @@ 1.4979 msgstr "" 1.4980 1.4981 #. type: Content of: <book><chapter><sect1><sect2><title> 1.4982 -#: ../en/ch02-tour-merge.xml:280 1.4983 +#: ../en/ch03-tour-merge.xml:299 1.4984 msgid "A worked example" 1.4985 msgstr "合并实例" 1.4986 1.4987 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4988 -#: ../en/ch02-tour-merge.xml:282 1.4989 +#: ../en/ch03-tour-merge.xml:301 1.4990 msgid "" 1.4991 "In this example, we will reproduce the file modification history of <xref " 1.4992 "linkend=\"fig:tour-merge:conflict\"/> above. Let's begin by creating a " 1.4993 @@ -3851,12 +5133,12 @@ 1.4994 msgstr "" 1.4995 1.4996 #. type: Content of: <book><chapter><sect1><sect2><para> 1.4997 -#: ../en/ch02-tour-merge.xml:289 1.4998 +#: ../en/ch03-tour-merge.xml:308 1.4999 msgid "We'll clone the repository and make a change to the file." 1.5000 msgstr "" 1.5001 1.5002 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5003 -#: ../en/ch02-tour-merge.xml:294 1.5004 +#: ../en/ch03-tour-merge.xml:313 1.5005 msgid "" 1.5006 "And another clone, to simulate someone else making a change to the file. " 1.5007 "(This hints at the idea that it's not all that unusual to merge with yourself " 1.5008 @@ -3865,23 +5147,24 @@ 1.5009 msgstr "" 1.5010 1.5011 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5012 -#: ../en/ch02-tour-merge.xml:302 1.5013 +#: ../en/ch03-tour-merge.xml:321 1.5014 msgid "" 1.5015 "Having created two different versions of the file, we'll set up an " 1.5016 "environment suitable for running our merge." 1.5017 msgstr "" 1.5018 1.5019 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5020 -#: ../en/ch02-tour-merge.xml:308 1.5021 +#: ../en/ch03-tour-merge.xml:327 1.5022 msgid "" 1.5023 "In this example, I'll set <envar>HGMERGE</envar> to tell Mercurial to use the " 1.5024 "non-interactive <command>merge</command> command. This is bundled with many " 1.5025 "Unix-like systems. (If you're following this example on your computer, don't " 1.5026 -"bother setting <envar>HGMERGE</envar>.)" 1.5027 -msgstr "" 1.5028 - 1.5029 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.5030 -#: ../en/ch02-tour-merge.xml:317 1.5031 +"bother setting <envar>HGMERGE</envar>. You'll get dropped into a GUI file " 1.5032 +"merge tool instead, which is much preferable.)" 1.5033 +msgstr "" 1.5034 + 1.5035 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.5036 +#: ../en/ch03-tour-merge.xml:337 1.5037 msgid "" 1.5038 "Because <command>merge</command> can't resolve the conflicting changes, it " 1.5039 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, " 1.5040 @@ -3890,7 +5173,7 @@ 1.5041 msgstr "" 1.5042 1.5043 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5044 -#: ../en/ch02-tour-merge.xml:323 1.5045 +#: ../en/ch03-tour-merge.xml:343 1.5046 msgid "" 1.5047 "Mercurial can tell from the way <command>merge</command> exits that it wasn't " 1.5048 "able to merge successfully, so it tells us what commands we'll need to run if " 1.5049 @@ -3900,27 +5183,44 @@ 1.5050 msgstr "" 1.5051 1.5052 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5053 -#: ../en/ch02-tour-merge.xml:330 1.5054 +#: ../en/ch03-tour-merge.xml:350 1.5055 msgid "" 1.5056 "If automatic or manual merges fail, there's nothing to prevent us from " 1.5057 "<quote>fixing up</quote> the affected files ourselves, and committing the " 1.5058 "results of our merge:" 1.5059 msgstr "" 1.5060 1.5061 +#. type: Content of: <book><chapter><sect1><sect2><note><title> 1.5062 +#: ../en/ch03-tour-merge.xml:357 1.5063 +#, fuzzy 1.5064 +msgid "Where is the <command>hg resolve</command> command?" 1.5065 +msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 1.5066 + 1.5067 +#. type: Content of: <book><chapter><sect1><sect2><note><para> 1.5068 +#: ../en/ch03-tour-merge.xml:359 1.5069 +msgid "" 1.5070 +"The <command>hg resolve</command> command was introduced in Mercurial 1.1, " 1.5071 +"which was released in December 2008. If you are using an older version of " 1.5072 +"Mercurial (run <command>hg version</command> to see), this command will not " 1.5073 +"be present. If your version of Mercurial is older than 1.1, you should " 1.5074 +"strongly consider upgrading to a newer version before trying to tackle " 1.5075 +"complicated merges." 1.5076 +msgstr "" 1.5077 + 1.5078 #. type: Content of: <book><chapter><sect1><title> 1.5079 -#: ../en/ch02-tour-merge.xml:339 1.5080 +#: ../en/ch03-tour-merge.xml:371 1.5081 msgid "Simplifying the pull-merge-commit sequence" 1.5082 msgstr "简化拉-合并-提交程序" 1.5083 1.5084 #. type: Content of: <book><chapter><sect1><para> 1.5085 -#: ../en/ch02-tour-merge.xml:341 1.5086 +#: ../en/ch03-tour-merge.xml:373 1.5087 msgid "" 1.5088 "The process of merging changes as outlined above is straightforward, but " 1.5089 "requires running three commands in sequence." 1.5090 msgstr "" 1.5091 1.5092 #. type: Content of: <book><chapter><sect1><para> 1.5093 -#: ../en/ch02-tour-merge.xml:347 1.5094 +#: ../en/ch03-tour-merge.xml:379 1.5095 msgid "" 1.5096 "In the case of the final commit, you also need to enter a commit message, " 1.5097 "which is almost always going to be a piece of uninteresting " 1.5098 @@ -3928,7 +5228,7 @@ 1.5099 msgstr "" 1.5100 1.5101 #. type: Content of: <book><chapter><sect1><para> 1.5102 -#: ../en/ch02-tour-merge.xml:351 1.5103 +#: ../en/ch03-tour-merge.xml:383 1.5104 msgid "" 1.5105 "It would be nice to reduce the number of steps needed, if this were " 1.5106 "possible. Indeed, Mercurial is distributed with an extension called <literal " 1.5107 @@ -3936,17 +5236,17 @@ 1.5108 msgstr "" 1.5109 1.5110 #. type: Content of: <book><chapter><sect1><para> 1.5111 -#: ../en/ch02-tour-merge.xml:356 1.5112 +#: ../en/ch03-tour-merge.xml:388 1.5113 msgid "" 1.5114 "Mercurial provides a flexible extension mechanism that lets people extend its " 1.5115 "functionality, while keeping the core of Mercurial small and easy to deal " 1.5116 "with. Some extensions add new commands that you can use from the command " 1.5117 "line, while others work <quote>behind the scenes,</quote> for example adding " 1.5118 -"capabilities to the server." 1.5119 -msgstr "" 1.5120 - 1.5121 -#. type: Content of: <book><chapter><sect1><para> 1.5122 -#: ../en/ch02-tour-merge.xml:363 1.5123 +"capabilities to Mercurial's built-in server mode." 1.5124 +msgstr "" 1.5125 + 1.5126 +#. type: Content of: <book><chapter><sect1><para> 1.5127 +#: ../en/ch03-tour-merge.xml:395 1.5128 msgid "" 1.5129 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " 1.5130 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " 1.5131 @@ -3954,14 +5254,14 @@ 1.5132 "command>, <command role=\"hg-cmd\">hg merge</command> and <command role=\"hg-" 1.5133 "cmd\">hg commit</command>. It begins by pulling changes from another " 1.5134 "repository into the current repository. If it finds that the changes added a " 1.5135 -"new head to the repository, it begins a merge, then (if the merge succeeded) " 1.5136 -"commits the result of the merge with an automatically-generated commit " 1.5137 -"message. If no new heads were added, it updates the working directory to the " 1.5138 -"new tip changeset." 1.5139 -msgstr "" 1.5140 - 1.5141 -#. type: Content of: <book><chapter><sect1><para> 1.5142 -#: ../en/ch02-tour-merge.xml:376 1.5143 +"new head to the repository, it updates to the new head, begins a merge, then " 1.5144 +"(if the merge succeeded) commits the result of the merge with an " 1.5145 +"automatically-generated commit message. If no new heads were added, it " 1.5146 +"updates the working directory to the new tip changeset." 1.5147 +msgstr "" 1.5148 + 1.5149 +#. type: Content of: <book><chapter><sect1><para> 1.5150 +#: ../en/ch03-tour-merge.xml:409 1.5151 msgid "" 1.5152 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. " 1.5153 "Edit the <filename role=\"special\">.hgrc</filename> file in your home " 1.5154 @@ -3972,7 +5272,7 @@ 1.5155 msgstr "" 1.5156 1.5157 #. type: Content of: <book><chapter><sect1><para> 1.5158 -#: ../en/ch02-tour-merge.xml:388 1.5159 +#: ../en/ch03-tour-merge.xml:421 1.5160 msgid "" 1.5161 "(Normally, the right-hand side of the <quote><literal>=</literal></quote> " 1.5162 "would indicate where to find the extension, but since the <literal role=\"hg-" 1.5163 @@ -3980,13 +5280,50 @@ 1.5164 "knows where to search for it.)" 1.5165 msgstr "" 1.5166 1.5167 +#. type: Content of: <book><chapter><sect1><title> 1.5168 +#: ../en/ch03-tour-merge.xml:429 1.5169 +#, fuzzy 1.5170 +msgid "Renaming, copying, and merging" 1.5171 +msgstr "改名文件与合并修改" 1.5172 + 1.5173 +#. type: Content of: <book><chapter><sect1><para> 1.5174 +#: ../en/ch03-tour-merge.xml:431 1.5175 +msgid "" 1.5176 +"During the life of a project, we will often want to change the layout of its " 1.5177 +"files and directories. This can be as simple as renaming a single file, or as " 1.5178 +"complex as restructuring the entire hierarchy of files within the project." 1.5179 +msgstr "" 1.5180 + 1.5181 +#. type: Content of: <book><chapter><sect1><para> 1.5182 +#: ../en/ch03-tour-merge.xml:436 1.5183 +msgid "" 1.5184 +"Mercurial supports these kinds of complex changes fluently, provided we tell " 1.5185 +"it what we're doing. If we want to rename a file, we should use the " 1.5186 +"<command>hg rename</command><placeholder type=\"footnote\" id=\"0\"/> command " 1.5187 +"to rename it, so that Mercurial can do the right thing later when we merge." 1.5188 +msgstr "" 1.5189 + 1.5190 +#. type: Content of: <book><chapter><sect1><para><footnote><para> 1.5191 +#: ../en/ch03-tour-merge.xml:439 1.5192 +msgid "" 1.5193 +"If you're a Unix user, you'll be glad to know that the <command>hg rename</" 1.5194 +"command> command can be abbreviated as <command>hg mv</command>." 1.5195 +msgstr "" 1.5196 + 1.5197 +#. type: Content of: <book><chapter><sect1><para> 1.5198 +#: ../en/ch03-tour-merge.xml:445 1.5199 +msgid "" 1.5200 +"We will cover the use of these commands in more detail in <xref linkend=" 1.5201 +"\"chap:daily.copy\"/>." 1.5202 +msgstr "" 1.5203 + 1.5204 #. type: Content of: <book><chapter><title> 1.5205 -#: ../en/ch03-concepts.xml:5 1.5206 +#: ../en/ch04-concepts.xml:5 1.5207 msgid "Behind the scenes" 1.5208 msgstr "Mercurial 内幕" 1.5209 1.5210 #. type: Content of: <book><chapter><para> 1.5211 -#: ../en/ch03-concepts.xml:7 1.5212 +#: ../en/ch04-concepts.xml:7 1.5213 msgid "" 1.5214 "Unlike many revision control systems, the concepts upon which Mercurial is " 1.5215 "built are simple enough that it's easy to understand how the software really " 1.5216 @@ -3996,7 +5333,7 @@ 1.5217 msgstr "" 1.5218 1.5219 #. type: Content of: <book><chapter><para> 1.5220 -#: ../en/ch03-concepts.xml:14 1.5221 +#: ../en/ch04-concepts.xml:14 1.5222 msgid "" 1.5223 "Being able to understand what's going on behind the scenes gives me " 1.5224 "confidence that Mercurial has been carefully designed to be both " 1.5225 @@ -4007,7 +5344,7 @@ 1.5226 msgstr "" 1.5227 1.5228 #. type: Content of: <book><chapter><para> 1.5229 -#: ../en/ch03-concepts.xml:22 1.5230 +#: ../en/ch04-concepts.xml:22 1.5231 msgid "" 1.5232 "In this chapter, we'll initially cover the core concepts behind Mercurial's " 1.5233 "design, then continue to discuss some of the interesting details of its " 1.5234 @@ -4015,17 +5352,17 @@ 1.5235 msgstr "" 1.5236 1.5237 #. type: Content of: <book><chapter><sect1><title> 1.5238 -#: ../en/ch03-concepts.xml:27 1.5239 +#: ../en/ch04-concepts.xml:27 1.5240 msgid "Mercurial's historical record" 1.5241 msgstr "Mercurial 的历史记录" 1.5242 1.5243 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5244 -#: ../en/ch03-concepts.xml:30 1.5245 +#: ../en/ch04-concepts.xml:30 1.5246 msgid "Tracking the history of a single file" 1.5247 msgstr "跟踪单一文件的历史" 1.5248 1.5249 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5250 -#: ../en/ch03-concepts.xml:32 1.5251 +#: ../en/ch04-concepts.xml:32 1.5252 msgid "" 1.5253 "When Mercurial tracks modifications to a file, it stores the history of that " 1.5254 "file in a metadata object called a <emphasis>filelog</emphasis>. Each entry " 1.5255 @@ -4037,7 +5374,7 @@ 1.5256 msgstr "" 1.5257 1.5258 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5259 -#: ../en/ch03-concepts.xml:43 1.5260 +#: ../en/ch04-concepts.xml:43 1.5261 msgid "" 1.5262 "A file that is large, or has a lot of history, has its filelog stored in " 1.5263 "separate data (<quote><literal>.d</literal></quote> suffix) and index " 1.5264 @@ -4049,23 +5386,23 @@ 1.5265 msgstr "" 1.5266 1.5267 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5268 -#: ../en/ch03-concepts.xml:55 1.5269 +#: ../en/ch04-concepts.xml:55 1.5270 msgid "" 1.5271 "Relationships between files in working directory and filelogs in repository" 1.5272 msgstr "工作目录中的文件与版本库中的文件日志之间的关系" 1.5273 1.5274 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5275 -#: ../en/ch03-concepts.xml:58 1.5276 +#: ../en/ch04-concepts.xml:58 1.5277 msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>" 1.5278 msgstr "" 1.5279 1.5280 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5281 -#: ../en/ch03-concepts.xml:65 1.5282 +#: ../en/ch04-concepts.xml:65 1.5283 msgid "Managing tracked files" 1.5284 msgstr "管理跟踪的文件" 1.5285 1.5286 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5287 -#: ../en/ch03-concepts.xml:67 1.5288 +#: ../en/ch04-concepts.xml:67 1.5289 msgid "" 1.5290 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " 1.5291 "together information about the files that it tracks. Each entry in the " 1.5292 @@ -4075,12 +5412,12 @@ 1.5293 msgstr "" 1.5294 1.5295 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5296 -#: ../en/ch03-concepts.xml:77 1.5297 +#: ../en/ch04-concepts.xml:77 1.5298 msgid "Recording changeset information" 1.5299 msgstr "记录修改集信息" 1.5300 1.5301 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5302 -#: ../en/ch03-concepts.xml:79 1.5303 +#: ../en/ch04-concepts.xml:79 1.5304 msgid "" 1.5305 "The <emphasis>changelog</emphasis> contains information about each " 1.5306 "changeset. Each revision records who committed a change, the changeset " 1.5307 @@ -4089,12 +5426,12 @@ 1.5308 msgstr "" 1.5309 1.5310 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5311 -#: ../en/ch03-concepts.xml:87 1.5312 +#: ../en/ch04-concepts.xml:87 1.5313 msgid "Relationships between revisions" 1.5314 msgstr "版本之间的关系" 1.5315 1.5316 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5317 -#: ../en/ch03-concepts.xml:89 1.5318 +#: ../en/ch04-concepts.xml:89 1.5319 msgid "" 1.5320 "Within a changelog, a manifest, or a filelog, each revision stores a pointer " 1.5321 "to its immediate parent (or to its two parents, if it's a merge revision). " 1.5322 @@ -4104,7 +5441,7 @@ 1.5323 msgstr "" 1.5324 1.5325 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5326 -#: ../en/ch03-concepts.xml:96 1.5327 +#: ../en/ch04-concepts.xml:96 1.5328 msgid "" 1.5329 "For every changeset in a repository, there is exactly one revision stored in " 1.5330 "the changelog. Each revision of the changelog contains a pointer to a single " 1.5331 @@ -4115,46 +5452,53 @@ 1.5332 msgstr "" 1.5333 1.5334 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5335 -#: ../en/ch03-concepts.xml:105 1.5336 +#: ../en/ch04-concepts.xml:105 1.5337 msgid "Metadata relationships" 1.5338 msgstr "元数据之间的关系" 1.5339 1.5340 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5341 -#: ../en/ch03-concepts.xml:107 1.5342 +#: ../en/ch04-concepts.xml:107 1.5343 msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>" 1.5344 msgstr "" 1.5345 1.5346 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5347 -#: ../en/ch03-concepts.xml:112 1.5348 +#: ../en/ch04-concepts.xml:112 1.5349 msgid "" 1.5350 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " 1.5351 "one</quote> relationship between revisions in the changelog, manifest, or " 1.5352 -"filelog. If the manifest hasn't changed between two changesets, the changelog " 1.5353 -"entries for those changesets will point to the same revision of the " 1.5354 -"manifest. If a file that Mercurial tracks hasn't changed between two " 1.5355 +"filelog. If a file that Mercurial tracks hasn't changed between two " 1.5356 "changesets, the entry for that file in the two revisions of the manifest will " 1.5357 -"point to the same revision of its filelog." 1.5358 +"point to the same revision of its filelog<placeholder type=\"footnote\" id=\"0" 1.5359 +"\"/>." 1.5360 +msgstr "" 1.5361 + 1.5362 +#. type: Content of: <book><chapter><sect1><sect2><para><footnote><para> 1.5363 +#: ../en/ch04-concepts.xml:119 1.5364 +msgid "" 1.5365 +"It is possible (though unusual) for the manifest to remain the same between " 1.5366 +"two changesets, in which case the changelog entries for those changesets will " 1.5367 +"point to the same revision of the manifest." 1.5368 msgstr "" 1.5369 1.5370 #. type: Content of: <book><chapter><sect1><title> 1.5371 -#: ../en/ch03-concepts.xml:125 1.5372 +#: ../en/ch04-concepts.xml:128 1.5373 msgid "Safe, efficient storage" 1.5374 msgstr "安全,高效的存储" 1.5375 1.5376 #. type: Content of: <book><chapter><sect1><para> 1.5377 -#: ../en/ch03-concepts.xml:127 1.5378 +#: ../en/ch04-concepts.xml:130 1.5379 msgid "" 1.5380 "The underpinnings of changelogs, manifests, and filelogs are provided by a " 1.5381 "single structure called the <emphasis>revlog</emphasis>." 1.5382 msgstr "" 1.5383 1.5384 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5385 -#: ../en/ch03-concepts.xml:132 1.5386 +#: ../en/ch04-concepts.xml:135 1.5387 msgid "Efficient storage" 1.5388 msgstr "高效存储" 1.5389 1.5390 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5391 -#: ../en/ch03-concepts.xml:134 1.5392 +#: ../en/ch04-concepts.xml:137 1.5393 msgid "" 1.5394 "The revlog provides efficient storage of revisions using a <emphasis>delta</" 1.5395 "emphasis> mechanism. Instead of storing a complete copy of a file for each " 1.5396 @@ -4164,7 +5508,7 @@ 1.5397 msgstr "" 1.5398 1.5399 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5400 -#: ../en/ch03-concepts.xml:142 1.5401 +#: ../en/ch04-concepts.xml:145 1.5402 msgid "" 1.5403 "Some obsolete revision control systems can only work with deltas of text " 1.5404 "files. They must either store binary files as complete snapshots or encoded " 1.5405 @@ -4174,12 +5518,12 @@ 1.5406 msgstr "" 1.5407 1.5408 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5409 -#: ../en/ch03-concepts.xml:151 1.5410 +#: ../en/ch04-concepts.xml:154 1.5411 msgid "Safe operation" 1.5412 msgstr "安全操作" 1.5413 1.5414 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5415 -#: ../en/ch03-concepts.xml:153 1.5416 +#: ../en/ch04-concepts.xml:156 1.5417 msgid "" 1.5418 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog " 1.5419 "file. It never modifies a section of a file after it has written it. This is " 1.5420 @@ -4188,7 +5532,7 @@ 1.5421 msgstr "" 1.5422 1.5423 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5424 -#: ../en/ch03-concepts.xml:159 1.5425 +#: ../en/ch04-concepts.xml:162 1.5426 msgid "" 1.5427 "In addition, Mercurial treats every write as part of a <emphasis>transaction</" 1.5428 "emphasis> that can span a number of files. A transaction is " 1.5429 @@ -4200,7 +5544,7 @@ 1.5430 msgstr "" 1.5431 1.5432 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5433 -#: ../en/ch03-concepts.xml:169 1.5434 +#: ../en/ch04-concepts.xml:172 1.5435 msgid "" 1.5436 "The fact that Mercurial only appends to files makes it easier to provide this " 1.5437 "transactional guarantee. The easier it is to do stuff like this, the more " 1.5438 @@ -4208,17 +5552,18 @@ 1.5439 msgstr "" 1.5440 1.5441 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5442 -#: ../en/ch03-concepts.xml:176 1.5443 +#: ../en/ch04-concepts.xml:179 1.5444 msgid "Fast retrieval" 1.5445 msgstr "快速检索" 1.5446 1.5447 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5448 -#: ../en/ch03-concepts.xml:178 1.5449 +#: ../en/ch04-concepts.xml:181 1.5450 msgid "" 1.5451 "Mercurial cleverly avoids a pitfall common to all earlier revision control " 1.5452 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " 1.5453 "revision control systems store the contents of a revision as an incremental " 1.5454 -"series of modifications against a <quote>snapshot</quote>. To reconstruct a " 1.5455 +"series of modifications against a <quote>snapshot</quote>. (Some base the " 1.5456 +"snapshot on the oldest revision, others on the newest.) To reconstruct a " 1.5457 "specific revision, you must first read the snapshot, and then every one of " 1.5458 "the revisions between the snapshot and your target revision. The more " 1.5459 "history that a file accumulates, the more revisions you must read, hence the " 1.5460 @@ -4226,17 +5571,17 @@ 1.5461 msgstr "" 1.5462 1.5463 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5464 -#: ../en/ch03-concepts.xml:190 1.5465 +#: ../en/ch04-concepts.xml:195 1.5466 msgid "Snapshot of a revlog, with incremental deltas" 1.5467 msgstr "版本日志的快照,以及增量差异" 1.5468 1.5469 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5470 -#: ../en/ch03-concepts.xml:192 1.5471 +#: ../en/ch04-concepts.xml:197 1.5472 msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>" 1.5473 msgstr "" 1.5474 1.5475 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5476 -#: ../en/ch03-concepts.xml:197 1.5477 +#: ../en/ch04-concepts.xml:202 1.5478 msgid "" 1.5479 "The innovation that Mercurial applies to this problem is simple but " 1.5480 "effective. Once the cumulative amount of delta information stored since the " 1.5481 @@ -4248,7 +5593,7 @@ 1.5482 msgstr "" 1.5483 1.5484 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5485 -#: ../en/ch03-concepts.xml:206 1.5486 +#: ../en/ch04-concepts.xml:211 1.5487 msgid "" 1.5488 "<xref linkend=\"fig:concepts:snapshot\"/> illustrates the idea. In an entry " 1.5489 "in a revlog's index file, Mercurial stores the range of entries from the data " 1.5490 @@ -4256,41 +5601,33 @@ 1.5491 msgstr "" 1.5492 1.5493 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.5494 -#: ../en/ch03-concepts.xml:212 1.5495 +#: ../en/ch04-concepts.xml:217 1.5496 msgid "Aside: the influence of video compression" 1.5497 msgstr "旁白: 视频压缩的影响" 1.5498 1.5499 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.5500 -#: ../en/ch03-concepts.xml:214 1.5501 +#: ../en/ch04-concepts.xml:219 1.5502 msgid "" 1.5503 "If you're familiar with video compression or have ever watched a TV feed " 1.5504 "through a digital cable or satellite service, you may know that most video " 1.5505 "compression schemes store each frame of video as a delta against its " 1.5506 -"predecessor frame. In addition, these schemes use <quote>lossy</quote> " 1.5507 -"compression techniques to increase the compression ratio, so visual errors " 1.5508 -"accumulate over the course of a number of inter-frame deltas." 1.5509 +"predecessor frame." 1.5510 msgstr "" 1.5511 1.5512 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.5513 -#: ../en/ch03-concepts.xml:223 1.5514 -msgid "" 1.5515 -"Because it's possible for a video stream to <quote>drop out</quote> " 1.5516 -"occasionally due to signal glitches, and to limit the accumulation of " 1.5517 -"artefacts introduced by the lossy compression process, video encoders " 1.5518 -"periodically insert a complete frame (called a <quote>key frame</quote>) into " 1.5519 -"the video stream; the next delta is generated against that frame. This means " 1.5520 -"that if the video signal gets interrupted, it will resume once the next key " 1.5521 -"frame is received. Also, the accumulation of encoding errors restarts anew " 1.5522 -"with each key frame." 1.5523 +#: ../en/ch04-concepts.xml:225 1.5524 +msgid "" 1.5525 +"Mercurial borrows this idea to make it possible to reconstruct a revision " 1.5526 +"from a snapshot and a small number of deltas." 1.5527 msgstr "" 1.5528 1.5529 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5530 -#: ../en/ch03-concepts.xml:237 1.5531 +#: ../en/ch04-concepts.xml:232 1.5532 msgid "Identification and strong integrity" 1.5533 msgstr "鉴别和强完整性" 1.5534 1.5535 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5536 -#: ../en/ch03-concepts.xml:239 1.5537 +#: ../en/ch04-concepts.xml:234 1.5538 msgid "" 1.5539 "Along with delta or snapshot information, a revlog entry contains a " 1.5540 "cryptographic hash of the data that it represents. This makes it difficult " 1.5541 @@ -4298,7 +5635,7 @@ 1.5542 msgstr "" 1.5543 1.5544 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5545 -#: ../en/ch03-concepts.xml:244 1.5546 +#: ../en/ch04-concepts.xml:239 1.5547 msgid "" 1.5548 "Hashes provide more than a mere check against corruption; they are used as " 1.5549 "the identifiers for revisions. The changeset identification hashes that you " 1.5550 @@ -4307,7 +5644,7 @@ 1.5551 msgstr "" 1.5552 1.5553 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5554 -#: ../en/ch03-concepts.xml:251 1.5555 +#: ../en/ch04-concepts.xml:246 1.5556 msgid "" 1.5557 "Mercurial verifies that hashes are correct when it retrieves file revisions " 1.5558 "and when it pulls changes from another repository. If it encounters an " 1.5559 @@ -4315,7 +5652,7 @@ 1.5560 msgstr "" 1.5561 1.5562 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5563 -#: ../en/ch03-concepts.xml:256 1.5564 +#: ../en/ch04-concepts.xml:251 1.5565 msgid "" 1.5566 "In addition to the effect it has on retrieval efficiency, Mercurial's use of " 1.5567 "periodic snapshots makes it more robust against partial data corruption. If " 1.5568 @@ -4326,12 +5663,12 @@ 1.5569 msgstr "" 1.5570 1.5571 #. type: Content of: <book><chapter><sect1><title> 1.5572 -#: ../en/ch03-concepts.xml:268 1.5573 +#: ../en/ch04-concepts.xml:263 1.5574 msgid "Revision history, branching, and merging" 1.5575 msgstr "修订历史,分支与合并" 1.5576 1.5577 #. type: Content of: <book><chapter><sect1><para> 1.5578 -#: ../en/ch03-concepts.xml:270 1.5579 +#: ../en/ch04-concepts.xml:265 1.5580 msgid "" 1.5581 "Every entry in a Mercurial revlog knows the identity of its immediate " 1.5582 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " 1.5583 @@ -4342,7 +5679,7 @@ 1.5584 msgstr "" 1.5585 1.5586 #. type: Content of: <book><chapter><sect1><para> 1.5587 -#: ../en/ch03-concepts.xml:278 1.5588 +#: ../en/ch04-concepts.xml:273 1.5589 msgid "" 1.5590 "In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the " 1.5591 "conceptual structure of a revlog. Filelogs, manifests, and changelogs all " 1.5592 @@ -4351,7 +5688,7 @@ 1.5593 msgstr "" 1.5594 1.5595 #. type: Content of: <book><chapter><sect1><para> 1.5596 -#: ../en/ch03-concepts.xml:284 1.5597 +#: ../en/ch04-concepts.xml:279 1.5598 msgid "" 1.5599 "The first revision in a revlog (at the bottom of the image) has the null ID " 1.5600 "in both of its parent slots. For a <quote>normal</quote> revision, its first " 1.5601 @@ -4363,29 +5700,29 @@ 1.5602 msgstr "" 1.5603 1.5604 #. type: Content of: <book><chapter><sect1><figure><title> 1.5605 -#: ../en/ch03-concepts.xml:294 1.5606 +#: ../en/ch04-concepts.xml:289 1.5607 msgid "The conceptual structure of a revlog" 1.5608 msgstr "版本日志的设计结构" 1.5609 1.5610 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 1.5611 -#: ../en/ch03-concepts.xml:296 1.5612 +#: ../en/ch04-concepts.xml:291 1.5613 msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>" 1.5614 msgstr "" 1.5615 1.5616 #. type: Content of: <book><chapter><sect1><title> 1.5617 -#: ../en/ch03-concepts.xml:303 1.5618 +#: ../en/ch04-concepts.xml:298 1.5619 msgid "The working directory" 1.5620 msgstr "工作目录" 1.5621 1.5622 #. type: Content of: <book><chapter><sect1><para> 1.5623 -#: ../en/ch03-concepts.xml:305 1.5624 +#: ../en/ch04-concepts.xml:300 1.5625 msgid "" 1.5626 "In the working directory, Mercurial stores a snapshot of the files from the " 1.5627 "repository as of a particular changeset." 1.5628 msgstr "" 1.5629 1.5630 #. type: Content of: <book><chapter><sect1><para> 1.5631 -#: ../en/ch03-concepts.xml:308 1.5632 +#: ../en/ch04-concepts.xml:303 1.5633 msgid "" 1.5634 "The working directory <quote>knows</quote> which changeset it contains. When " 1.5635 "you update the working directory to contain a particular changeset, Mercurial " 1.5636 @@ -4396,16 +5733,19 @@ 1.5637 msgstr "" 1.5638 1.5639 #. type: Content of: <book><chapter><sect1><para> 1.5640 -#: ../en/ch03-concepts.xml:317 1.5641 -msgid "" 1.5642 -"The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " 1.5643 -"working directory. This details which changeset the working directory is " 1.5644 -"updated to, and all of the files that Mercurial is tracking in the working " 1.5645 -"directory." 1.5646 -msgstr "" 1.5647 - 1.5648 -#. type: Content of: <book><chapter><sect1><para> 1.5649 -#: ../en/ch03-concepts.xml:323 1.5650 +#: ../en/ch04-concepts.xml:312 1.5651 +msgid "" 1.5652 +"The <emphasis>dirstate</emphasis> is a special structure that contains " 1.5653 +"Mercurial's knowledge of the working directory. It is maintained as a file " 1.5654 +"named <filename>.hg/dirstate</filename> inside a repository. The dirstate " 1.5655 +"details which changeset the working directory is updated to, and all of the " 1.5656 +"files that Mercurial is tracking in the working directory. It also lets " 1.5657 +"Mercurial quickly notice changed files, by recording their checkout times and " 1.5658 +"sizes." 1.5659 +msgstr "" 1.5660 + 1.5661 +#. type: Content of: <book><chapter><sect1><para> 1.5662 +#: ../en/ch04-concepts.xml:322 1.5663 msgid "" 1.5664 "Just as a revision of a revlog has room for two parents, so that it can " 1.5665 "represent either a normal revision (with one parent) or a merge of two " 1.5666 @@ -4420,12 +5760,12 @@ 1.5667 msgstr "" 1.5668 1.5669 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5670 -#: ../en/ch03-concepts.xml:337 1.5671 +#: ../en/ch04-concepts.xml:336 1.5672 msgid "What happens when you commit" 1.5673 msgstr "当你提交时发生的事情" 1.5674 1.5675 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5676 -#: ../en/ch03-concepts.xml:339 1.5677 +#: ../en/ch04-concepts.xml:338 1.5678 msgid "" 1.5679 "The dirstate stores parent information for more than just book-keeping " 1.5680 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " 1.5681 @@ -4433,17 +5773,17 @@ 1.5682 msgstr "" 1.5683 1.5684 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5685 -#: ../en/ch03-concepts.xml:345 1.5686 +#: ../en/ch04-concepts.xml:344 1.5687 msgid "The working directory can have two parents" 1.5688 msgstr "工作目录可以有两个父亲" 1.5689 1.5690 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5691 -#: ../en/ch03-concepts.xml:347 1.5692 +#: ../en/ch04-concepts.xml:346 1.5693 msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>" 1.5694 msgstr "" 1.5695 1.5696 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5697 -#: ../en/ch03-concepts.xml:352 1.5698 +#: ../en/ch04-concepts.xml:351 1.5699 msgid "" 1.5700 "<xref linkend=\"fig:concepts:wdir\"/> shows the normal state of the working " 1.5701 "directory, where it has a single changeset as parent. That changeset is the " 1.5702 @@ -4452,18 +5792,18 @@ 1.5703 msgstr "" 1.5704 1.5705 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5706 -#: ../en/ch03-concepts.xml:359 1.5707 +#: ../en/ch04-concepts.xml:358 1.5708 msgid "The working directory gains new parents after a commit" 1.5709 msgstr "提交之后,工作目录的父亲就改变了" 1.5710 1.5711 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5712 -#: ../en/ch03-concepts.xml:362 1.5713 +#: ../en/ch04-concepts.xml:361 1.5714 msgid "" 1.5715 "<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>" 1.5716 msgstr "" 1.5717 1.5718 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5719 -#: ../en/ch03-concepts.xml:367 1.5720 +#: ../en/ch04-concepts.xml:366 1.5721 msgid "" 1.5722 "It's useful to think of the working directory as <quote>the changeset I'm " 1.5723 "about to commit</quote>. Any files that you tell Mercurial that you've " 1.5724 @@ -4473,7 +5813,7 @@ 1.5725 msgstr "" 1.5726 1.5727 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5728 -#: ../en/ch03-concepts.xml:375 1.5729 +#: ../en/ch04-concepts.xml:374 1.5730 msgid "" 1.5731 "After a commit, Mercurial will update the parents of the working directory, " 1.5732 "so that the first parent is the ID of the new changeset, and the second is " 1.5733 @@ -4483,12 +5823,12 @@ 1.5734 msgstr "" 1.5735 1.5736 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5737 -#: ../en/ch03-concepts.xml:386 1.5738 +#: ../en/ch04-concepts.xml:385 1.5739 msgid "Creating a new head" 1.5740 msgstr "创建新顶点" 1.5741 1.5742 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5743 -#: ../en/ch03-concepts.xml:388 1.5744 +#: ../en/ch04-concepts.xml:387 1.5745 msgid "" 1.5746 "It's perfectly normal to update the working directory to a changeset other " 1.5747 "than the current tip. For example, you might want to know what your project " 1.5748 @@ -4501,18 +5841,18 @@ 1.5749 msgstr "" 1.5750 1.5751 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5752 -#: ../en/ch03-concepts.xml:400 1.5753 +#: ../en/ch04-concepts.xml:399 1.5754 msgid "The working directory, updated to an older changeset" 1.5755 msgstr "同步到旧修改集的工作目录" 1.5756 1.5757 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5758 -#: ../en/ch03-concepts.xml:403 1.5759 +#: ../en/ch04-concepts.xml:402 1.5760 msgid "" 1.5761 "<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>" 1.5762 msgstr "" 1.5763 1.5764 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5765 -#: ../en/ch03-concepts.xml:408 1.5766 +#: ../en/ch04-concepts.xml:407 1.5767 msgid "" 1.5768 "Having updated the working directory to an older changeset, what happens if " 1.5769 "you make some changes, and then commit? Mercurial behaves in the same way as " 1.5770 @@ -4524,17 +5864,17 @@ 1.5771 msgstr "" 1.5772 1.5773 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5774 -#: ../en/ch03-concepts.xml:420 1.5775 +#: ../en/ch04-concepts.xml:419 1.5776 msgid "After a commit made while synced to an older changeset" 1.5777 msgstr "对同步到旧修改集的工作目录提交之后" 1.5778 1.5779 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5780 -#: ../en/ch03-concepts.xml:423 1.5781 +#: ../en/ch04-concepts.xml:422 1.5782 msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>" 1.5783 msgstr "" 1.5784 1.5785 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.5786 -#: ../en/ch03-concepts.xml:429 1.5787 +#: ../en/ch04-concepts.xml:428 1.5788 msgid "" 1.5789 "If you're new to Mercurial, you should keep in mind a common <quote>error</" 1.5790 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> " 1.5791 @@ -4544,27 +5884,29 @@ 1.5792 "working directory will stay synced at the same changeset as before the pull. " 1.5793 "If you make some changes and commit afterwards, you'll thus create a new " 1.5794 "head, because your working directory isn't synced to whatever the current tip " 1.5795 -"is." 1.5796 +"is. To combine the operation of a pull, followed by an update, run " 1.5797 +"<command>hg pull -u</command>." 1.5798 msgstr "" 1.5799 1.5800 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.5801 -#: ../en/ch03-concepts.xml:441 1.5802 +#: ../en/ch04-concepts.xml:442 1.5803 msgid "" 1.5804 "I put the word <quote>error</quote> in quotes because all that you need to do " 1.5805 -"to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, " 1.5806 -"then <command role=\"hg-cmd\">hg commit</command>. In other words, this " 1.5807 -"almost never has negative consequences; it's just something of a surprise for " 1.5808 -"newcomers. I'll discuss other ways to avoid this behavior, and why Mercurial " 1.5809 -"behaves in this initially surprising way, later on." 1.5810 +"to rectify the situation where you created a new head by accident is <command " 1.5811 +"role=\"hg-cmd\">hg merge</command>, then <command role=\"hg-cmd\">hg commit</" 1.5812 +"command>. In other words, this almost never has negative consequences; it's " 1.5813 +"just something of a surprise for newcomers. I'll discuss other ways to avoid " 1.5814 +"this behavior, and why Mercurial behaves in this initially surprising way, " 1.5815 +"later on." 1.5816 msgstr "" 1.5817 1.5818 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5819 -#: ../en/ch03-concepts.xml:453 1.5820 +#: ../en/ch04-concepts.xml:455 1.5821 msgid "Merging changes" 1.5822 msgstr "合并修改" 1.5823 1.5824 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5825 -#: ../en/ch03-concepts.xml:455 1.5826 +#: ../en/ch04-concepts.xml:457 1.5827 msgid "" 1.5828 "When you run the <command role=\"hg-cmd\">hg merge</command> command, " 1.5829 "Mercurial leaves the first parent of the working directory unchanged, and " 1.5830 @@ -4573,18 +5915,18 @@ 1.5831 msgstr "" 1.5832 1.5833 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.5834 -#: ../en/ch03-concepts.xml:462 1.5835 +#: ../en/ch04-concepts.xml:464 1.5836 msgid "Merging two heads" 1.5837 msgstr "合并两个顶点" 1.5838 1.5839 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.5840 -#: ../en/ch03-concepts.xml:464 1.5841 +#: ../en/ch04-concepts.xml:466 1.5842 msgid "" 1.5843 "<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>" 1.5844 msgstr "" 1.5845 1.5846 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5847 -#: ../en/ch03-concepts.xml:471 1.5848 +#: ../en/ch04-concepts.xml:473 1.5849 msgid "" 1.5850 "Mercurial also has to modify the working directory, to merge the files " 1.5851 "managed in the two changesets. Simplified a little, the merging process goes " 1.5852 @@ -4592,33 +5934,33 @@ 1.5853 msgstr "" 1.5854 1.5855 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5856 -#: ../en/ch03-concepts.xml:476 1.5857 +#: ../en/ch04-concepts.xml:478 1.5858 msgid "If neither changeset has modified a file, do nothing with that file." 1.5859 msgstr "" 1.5860 1.5861 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5862 -#: ../en/ch03-concepts.xml:479 1.5863 +#: ../en/ch04-concepts.xml:481 1.5864 msgid "" 1.5865 "If one changeset has modified a file, and the other hasn't, create the " 1.5866 "modified copy of the file in the working directory." 1.5867 msgstr "" 1.5868 1.5869 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5870 -#: ../en/ch03-concepts.xml:483 1.5871 +#: ../en/ch04-concepts.xml:485 1.5872 msgid "" 1.5873 "If one changeset has removed a file, and the other hasn't (or has also " 1.5874 "deleted it), delete the file from the working directory." 1.5875 msgstr "" 1.5876 1.5877 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5878 -#: ../en/ch03-concepts.xml:487 1.5879 +#: ../en/ch04-concepts.xml:489 1.5880 msgid "" 1.5881 "If one changeset has removed a file, but the other has modified the file, ask " 1.5882 "the user what to do: keep the modified file, or remove it?" 1.5883 msgstr "" 1.5884 1.5885 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5886 -#: ../en/ch03-concepts.xml:491 1.5887 +#: ../en/ch04-concepts.xml:493 1.5888 msgid "" 1.5889 "If both changesets have modified a file, invoke an external merge program to " 1.5890 "choose the new contents for the merged file. This may require input from the " 1.5891 @@ -4626,14 +5968,14 @@ 1.5892 msgstr "" 1.5893 1.5894 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.5895 -#: ../en/ch03-concepts.xml:496 1.5896 +#: ../en/ch04-concepts.xml:498 1.5897 msgid "" 1.5898 "If one changeset has modified a file, and the other has renamed or copied the " 1.5899 "file, make sure that the changes follow the new name of the file." 1.5900 msgstr "" 1.5901 1.5902 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5903 -#: ../en/ch03-concepts.xml:500 1.5904 +#: ../en/ch04-concepts.xml:502 1.5905 msgid "" 1.5906 "There are more details&emdash;merging has plenty of corner cases&emdash;but " 1.5907 "these are the most common choices that are involved in a merge. As you can " 1.5908 @@ -4642,7 +5984,7 @@ 1.5909 msgstr "" 1.5910 1.5911 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5912 -#: ../en/ch03-concepts.xml:507 1.5913 +#: ../en/ch04-concepts.xml:509 1.5914 msgid "" 1.5915 "When you're thinking about what happens when you commit after a merge, once " 1.5916 "again the working directory is <quote>the changeset I'm about to commit</" 1.5917 @@ -4652,23 +5994,24 @@ 1.5918 msgstr "" 1.5919 1.5920 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5921 -#: ../en/ch03-concepts.xml:514 1.5922 +#: ../en/ch04-concepts.xml:516 1.5923 msgid "" 1.5924 "Mercurial lets you perform multiple merges, but you must commit the results " 1.5925 "of each individual merge as you go. This is necessary because Mercurial only " 1.5926 "tracks two parents for both revisions and the working directory. While it " 1.5927 -"would be technically possible to merge multiple changesets at once, the " 1.5928 -"prospect of user confusion and making a terrible mess of a merge immediately " 1.5929 -"becomes overwhelming." 1.5930 +"would be technically feasible to merge multiple changesets at once, Mercurial " 1.5931 +"avoids this for simplicity. With multi-way merges, the risks of user " 1.5932 +"confusion, nasty conflict resolution, and making a terrible mess of a merge " 1.5933 +"would grow intolerable." 1.5934 msgstr "" 1.5935 1.5936 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5937 -#: ../en/ch03-concepts.xml:525 1.5938 +#: ../en/ch04-concepts.xml:529 1.5939 msgid "Merging and renames" 1.5940 msgstr "合并与改名" 1.5941 1.5942 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5943 -#: ../en/ch03-concepts.xml:527 1.5944 +#: ../en/ch04-concepts.xml:531 1.5945 msgid "" 1.5946 "A surprising number of revision control systems pay little or no attention to " 1.5947 "a file's <emphasis>name</emphasis> over time. For instance, it used to be " 1.5948 @@ -4677,7 +6020,7 @@ 1.5949 msgstr "" 1.5950 1.5951 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5952 -#: ../en/ch03-concepts.xml:533 1.5953 +#: ../en/ch04-concepts.xml:537 1.5954 msgid "" 1.5955 "Mercurial records metadata when you tell it to perform a rename or copy. It " 1.5956 "uses this metadata during a merge to do the right thing in the case of a " 1.5957 @@ -4687,12 +6030,12 @@ 1.5958 msgstr "" 1.5959 1.5960 #. type: Content of: <book><chapter><sect1><title> 1.5961 -#: ../en/ch03-concepts.xml:543 1.5962 +#: ../en/ch04-concepts.xml:547 1.5963 msgid "Other interesting design features" 1.5964 msgstr "其它有趣的设计特性" 1.5965 1.5966 #. type: Content of: <book><chapter><sect1><para> 1.5967 -#: ../en/ch03-concepts.xml:545 1.5968 +#: ../en/ch04-concepts.xml:549 1.5969 msgid "" 1.5970 "In the sections above, I've tried to highlight some of the most important " 1.5971 "aspects of Mercurial's design, to illustrate that it pays careful attention " 1.5972 @@ -4705,12 +6048,12 @@ 1.5973 msgstr "" 1.5974 1.5975 #. type: Content of: <book><chapter><sect1><sect2><title> 1.5976 -#: ../en/ch03-concepts.xml:556 1.5977 +#: ../en/ch04-concepts.xml:560 1.5978 msgid "Clever compression" 1.5979 msgstr "智能压缩" 1.5980 1.5981 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5982 -#: ../en/ch03-concepts.xml:558 1.5983 +#: ../en/ch04-concepts.xml:562 1.5984 msgid "" 1.5985 "When appropriate, Mercurial will store both snapshots and deltas in " 1.5986 "compressed form. It does this by always <emphasis>trying to</emphasis> " 1.5987 @@ -4719,7 +6062,7 @@ 1.5988 msgstr "" 1.5989 1.5990 #. type: Content of: <book><chapter><sect1><sect2><para> 1.5991 -#: ../en/ch03-concepts.xml:564 1.5992 +#: ../en/ch04-concepts.xml:568 1.5993 msgid "" 1.5994 "This means that Mercurial does <quote>the right thing</quote> when storing a " 1.5995 "file whose native form is compressed, such as a <literal>zip</literal> " 1.5996 @@ -4729,7 +6072,7 @@ 1.5997 msgstr "" 1.5998 1.5999 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6000 -#: ../en/ch03-concepts.xml:572 1.6001 +#: ../en/ch04-concepts.xml:576 1.6002 msgid "" 1.6003 "Deltas between revisions of a compressed file are usually larger than " 1.6004 "snapshots of the file, and Mercurial again does <quote>the right thing</" 1.6005 @@ -4739,12 +6082,12 @@ 1.6006 msgstr "" 1.6007 1.6008 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.6009 -#: ../en/ch03-concepts.xml:581 1.6010 +#: ../en/ch04-concepts.xml:585 1.6011 msgid "Network recompression" 1.6012 msgstr "网络重新压缩" 1.6013 1.6014 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.6015 -#: ../en/ch03-concepts.xml:583 1.6016 +#: ../en/ch04-concepts.xml:587 1.6017 msgid "" 1.6018 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " 1.6019 "compression algorithm (the same one used by the popular <literal>zip</" 1.6020 @@ -4754,7 +6097,7 @@ 1.6021 msgstr "" 1.6022 1.6023 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.6024 -#: ../en/ch03-concepts.xml:591 1.6025 +#: ../en/ch04-concepts.xml:595 1.6026 msgid "" 1.6027 "If the connection is over HTTP, Mercurial recompresses the entire stream of " 1.6028 "data using a compression algorithm that gives a better compression ratio (the " 1.6029 @@ -4766,20 +6109,22 @@ 1.6030 msgstr "" 1.6031 1.6032 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.6033 -#: ../en/ch03-concepts.xml:601 1.6034 -msgid "" 1.6035 -"(If the connection is over <command>ssh</command>, Mercurial " 1.6036 +#: ../en/ch04-concepts.xml:605 1.6037 +msgid "" 1.6038 +"If the connection is over <command>ssh</command>, Mercurial " 1.6039 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" 1.6040 -"command> can already do this itself.)" 1.6041 +"command> can already do this itself. You can tell Mercurial to always use " 1.6042 +"<command>ssh</command>'s compression feature by editing the <filename>.hgrc</" 1.6043 +"filename> file in your home directory as follows." 1.6044 msgstr "" 1.6045 1.6046 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6047 -#: ../en/ch03-concepts.xml:609 1.6048 +#: ../en/ch04-concepts.xml:620 1.6049 msgid "Read/write ordering and atomicity" 1.6050 msgstr "读写顺序与原子性" 1.6051 1.6052 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6053 -#: ../en/ch03-concepts.xml:611 1.6054 +#: ../en/ch04-concepts.xml:622 1.6055 msgid "" 1.6056 "Appending to files isn't the whole story when it comes to guaranteeing that a " 1.6057 "reader won't see a partial write. If you recall <xref linkend=\"fig:concepts:" 1.6058 @@ -4789,7 +6134,7 @@ 1.6059 msgstr "" 1.6060 1.6061 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6062 -#: ../en/ch03-concepts.xml:619 1.6063 +#: ../en/ch04-concepts.xml:629 1.6064 msgid "" 1.6065 "A writer starts a transaction by writing filelog and manifest data, and " 1.6066 "doesn't write any changelog data until those are finished. A reader starts " 1.6067 @@ -4797,7 +6142,7 @@ 1.6068 msgstr "" 1.6069 1.6070 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6071 -#: ../en/ch03-concepts.xml:624 1.6072 +#: ../en/ch04-concepts.xml:634 1.6073 msgid "" 1.6074 "Since the writer has always finished writing filelog and manifest data before " 1.6075 "it writes to the changelog, a reader will never read a pointer to a partially " 1.6076 @@ -4806,23 +6151,23 @@ 1.6077 msgstr "" 1.6078 1.6079 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6080 -#: ../en/ch03-concepts.xml:632 1.6081 +#: ../en/ch04-concepts.xml:642 1.6082 msgid "Concurrent access" 1.6083 msgstr "并发访问" 1.6084 1.6085 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6086 -#: ../en/ch03-concepts.xml:634 1.6087 +#: ../en/ch04-concepts.xml:644 1.6088 msgid "" 1.6089 "The read/write ordering and atomicity guarantees mean that Mercurial never " 1.6090 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even " 1.6091 "if the repository is being written to while the read is occurring. This has a " 1.6092 "big effect on scalability; you can have an arbitrary number of Mercurial " 1.6093 -"processes safely reading data from a repository safely all at once, no matter " 1.6094 +"processes safely reading data from a repository all at once, no matter " 1.6095 "whether it's being written to or not." 1.6096 msgstr "" 1.6097 1.6098 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6099 -#: ../en/ch03-concepts.xml:643 1.6100 +#: ../en/ch04-concepts.xml:653 1.6101 msgid "" 1.6102 "The lockless nature of reading means that if you're sharing a repository on a " 1.6103 "multi-user system, you don't need to grant other local users permission to " 1.6104 @@ -4836,7 +6181,7 @@ 1.6105 msgstr "" 1.6106 1.6107 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6108 -#: ../en/ch03-concepts.xml:656 1.6109 +#: ../en/ch04-concepts.xml:666 1.6110 msgid "" 1.6111 "Mercurial uses locks to ensure that only one process can write to a " 1.6112 "repository at a time (the locking mechanism is safe even over filesystems " 1.6113 @@ -4850,12 +6195,12 @@ 1.6114 msgstr "" 1.6115 1.6116 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.6117 -#: ../en/ch03-concepts.xml:668 1.6118 +#: ../en/ch04-concepts.xml:678 1.6119 msgid "Safe dirstate access" 1.6120 msgstr "安全的目录状态访问" 1.6121 1.6122 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.6123 -#: ../en/ch03-concepts.xml:670 1.6124 +#: ../en/ch04-concepts.xml:680 1.6125 msgid "" 1.6126 "As with revision data, Mercurial doesn't take a lock to read the dirstate " 1.6127 "file; it does acquire a lock to write it. To avoid the possibility of " 1.6128 @@ -4867,12 +6212,12 @@ 1.6129 msgstr "" 1.6130 1.6131 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6132 -#: ../en/ch03-concepts.xml:683 1.6133 +#: ../en/ch04-concepts.xml:693 1.6134 msgid "Avoiding seeks" 1.6135 msgstr "避免查找" 1.6136 1.6137 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6138 -#: ../en/ch03-concepts.xml:685 1.6139 +#: ../en/ch04-concepts.xml:695 1.6140 msgid "" 1.6141 "Critical to Mercurial's performance is the avoidance of seeks of the disk " 1.6142 "head, since any seek is far more expensive than even a comparatively large " 1.6143 @@ -4880,7 +6225,7 @@ 1.6144 msgstr "" 1.6145 1.6146 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6147 -#: ../en/ch03-concepts.xml:689 1.6148 +#: ../en/ch04-concepts.xml:699 1.6149 msgid "" 1.6150 "This is why, for example, the dirstate is stored in a single file. If there " 1.6151 "were a dirstate file per directory that Mercurial tracked, the disk would " 1.6152 @@ -4889,7 +6234,7 @@ 1.6153 msgstr "" 1.6154 1.6155 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6156 -#: ../en/ch03-concepts.xml:695 1.6157 +#: ../en/ch04-concepts.xml:705 1.6158 msgid "" 1.6159 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a " 1.6160 "repository on local storage. Instead of copying every revlog file from the " 1.6161 @@ -4902,24 +6247,24 @@ 1.6162 msgstr "" 1.6163 1.6164 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6165 -#: ../en/ch03-concepts.xml:706 1.6166 +#: ../en/ch04-concepts.xml:716 1.6167 msgid "" 1.6168 "A few revision control developers have pointed out that this idea of making a " 1.6169 "complete private copy of a file is not very efficient in its use of storage. " 1.6170 "While this is true, storage is cheap, and this method gives the highest " 1.6171 "performance while deferring most book-keeping to the operating system. An " 1.6172 "alternative scheme would most likely reduce performance and increase the " 1.6173 -"complexity of the software, each of which is much more important to the " 1.6174 +"complexity of the software, but speed and simplicity are key to the " 1.6175 "<quote>feel</quote> of day-to-day use." 1.6176 msgstr "" 1.6177 1.6178 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6179 -#: ../en/ch03-concepts.xml:718 1.6180 +#: ../en/ch04-concepts.xml:728 1.6181 msgid "Other contents of the dirstate" 1.6182 msgstr "目录状态的其它内容" 1.6183 1.6184 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6185 -#: ../en/ch03-concepts.xml:720 1.6186 +#: ../en/ch04-concepts.xml:730 1.6187 msgid "" 1.6188 "Because Mercurial doesn't force you to tell it when you're modifying a file, " 1.6189 "it uses the dirstate to store some extra information so it can determine " 1.6190 @@ -4929,7 +6274,7 @@ 1.6191 msgstr "" 1.6192 1.6193 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6194 -#: ../en/ch03-concepts.xml:727 1.6195 +#: ../en/ch04-concepts.xml:737 1.6196 msgid "" 1.6197 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role=" 1.6198 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> " 1.6199 @@ -4938,31 +6283,50 @@ 1.6200 msgstr "" 1.6201 1.6202 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6203 -#: ../en/ch03-concepts.xml:734 1.6204 -msgid "" 1.6205 -"When Mercurial is checking the states of files in the working directory, it " 1.6206 -"first checks a file's modification time. If that has not changed, the file " 1.6207 -"must not have been modified. If the file's size has changed, the file must " 1.6208 -"have been modified. If the modification time has changed, but the size has " 1.6209 -"not, only then does Mercurial need to read the actual contents of the file to " 1.6210 -"see if they've changed. Storing these few extra pieces of information " 1.6211 -"dramatically reduces the amount of data that Mercurial needs to read, which " 1.6212 -"yields large performance improvements compared to other revision control " 1.6213 -"systems." 1.6214 +#: ../en/ch04-concepts.xml:744 1.6215 +msgid "" 1.6216 +"The dirstate helps Mercurial to efficiently check the status of files in a " 1.6217 +"repository." 1.6218 +msgstr "" 1.6219 + 1.6220 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.6221 +#: ../en/ch04-concepts.xml:749 1.6222 +msgid "" 1.6223 +"When Mercurial checks the state of a file in the working directory, it first " 1.6224 +"checks a file's modification time against the time in the dirstate that " 1.6225 +"records when Mercurial last wrote the file. If the last modified time is the " 1.6226 +"same as the time when Mercurial wrote the file, the file must not have been " 1.6227 +"modified, so Mercurial does not need to check any further." 1.6228 +msgstr "" 1.6229 + 1.6230 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.6231 +#: ../en/ch04-concepts.xml:758 1.6232 +msgid "" 1.6233 +"If the file's size has changed, the file must have been modified. If the " 1.6234 +"modification time has changed, but the size has not, only then does Mercurial " 1.6235 +"need to actually read the contents of the file to see if it has changed." 1.6236 +msgstr "" 1.6237 + 1.6238 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.6239 +#: ../en/ch04-concepts.xml:766 1.6240 +msgid "" 1.6241 +"Storing the modification time and size dramatically reduces the number of " 1.6242 +"read operations that Mercurial needs to perform when we run commands like " 1.6243 +"<command>hg status</command>. This results in large performance improvements." 1.6244 msgstr "" 1.6245 1.6246 #. type: Content of: <book><chapter><title> 1.6247 -#: ../en/ch04-daily.xml:5 1.6248 +#: ../en/ch05-daily.xml:5 1.6249 msgid "Mercurial in daily use" 1.6250 msgstr "Mercurial 的日常使用" 1.6251 1.6252 #. type: Content of: <book><chapter><sect1><title> 1.6253 -#: ../en/ch04-daily.xml:8 1.6254 +#: ../en/ch05-daily.xml:8 1.6255 msgid "Telling Mercurial which files to track" 1.6256 msgstr "告诉 Mercurial 要跟踪哪些文件" 1.6257 1.6258 #. type: Content of: <book><chapter><sect1><para> 1.6259 -#: ../en/ch04-daily.xml:10 1.6260 +#: ../en/ch05-daily.xml:10 1.6261 msgid "" 1.6262 "Mercurial does not work with files in your repository unless you tell it to " 1.6263 "manage them. The <command role=\"hg-cmd\">hg status</command> command will " 1.6264 @@ -4972,7 +6336,7 @@ 1.6265 1.6266 # 1.6267 #. type: Content of: <book><chapter><sect1><para> 1.6268 -#: ../en/ch04-daily.xml:17 1.6269 +#: ../en/ch05-daily.xml:17 1.6270 msgid "" 1.6271 "To tell Mercurial to track a file, use the <command role=\"hg-cmd\">hg add</" 1.6272 "command> command. Once you have added a file, the entry in the output of " 1.6273 @@ -4981,7 +6345,7 @@ 1.6274 msgstr "" 1.6275 1.6276 #. type: Content of: <book><chapter><sect1><para> 1.6277 -#: ../en/ch04-daily.xml:26 1.6278 +#: ../en/ch05-daily.xml:26 1.6279 msgid "" 1.6280 "After you run a <command role=\"hg-cmd\">hg commit</command>, the files that " 1.6281 "you added before the commit will no longer be listed in the output of " 1.6282 @@ -4995,7 +6359,7 @@ 1.6283 msgstr "" 1.6284 1.6285 #. type: Content of: <book><chapter><sect1><para> 1.6286 -#: ../en/ch04-daily.xml:38 1.6287 +#: ../en/ch05-daily.xml:38 1.6288 msgid "" 1.6289 "Once you add a file, Mercurial doesn't do anything with it immediately. " 1.6290 "Instead, it will take a snapshot of the file's state the next time you " 1.6291 @@ -5004,12 +6368,12 @@ 1.6292 msgstr "" 1.6293 1.6294 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6295 -#: ../en/ch04-daily.xml:45 1.6296 +#: ../en/ch05-daily.xml:45 1.6297 msgid "Explicit versus implicit file naming" 1.6298 msgstr "明确与隐含文件命名" 1.6299 1.6300 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6301 -#: ../en/ch04-daily.xml:47 1.6302 +#: ../en/ch05-daily.xml:47 1.6303 msgid "" 1.6304 "A useful behavior that Mercurial has is that if you pass the name of a " 1.6305 "directory to a command, every Mercurial command will treat this as <quote>I " 1.6306 @@ -5018,7 +6382,7 @@ 1.6307 msgstr "" 1.6308 1.6309 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6310 -#: ../en/ch04-daily.xml:54 1.6311 +#: ../en/ch05-daily.xml:54 1.6312 msgid "" 1.6313 "Notice in this example that Mercurial printed the names of the files it " 1.6314 "added, whereas it didn't do so when we added the file named <filename>myfile." 1.6315 @@ -5026,7 +6390,7 @@ 1.6316 msgstr "" 1.6317 1.6318 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6319 -#: ../en/ch04-daily.xml:59 1.6320 +#: ../en/ch05-daily.xml:59 1.6321 msgid "" 1.6322 "What's going on is that in the former case, we explicitly named the file to " 1.6323 "add on the command line. The assumption that Mercurial makes in such cases " 1.6324 @@ -5034,7 +6398,7 @@ 1.6325 msgstr "" 1.6326 1.6327 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6328 -#: ../en/ch04-daily.xml:64 1.6329 +#: ../en/ch05-daily.xml:64 1.6330 msgid "" 1.6331 "However, when we <emphasis>imply</emphasis> the names of files by giving the " 1.6332 "name of a directory, Mercurial takes the extra step of printing the name of " 1.6333 @@ -5044,12 +6408,12 @@ 1.6334 msgstr "" 1.6335 1.6336 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6337 -#: ../en/ch04-daily.xml:73 1.6338 +#: ../en/ch05-daily.xml:73 1.6339 msgid "Mercurial tracks files, not directories" 1.6340 msgstr "Mercurial 只跟踪文件,不跟踪目录" 1.6341 1.6342 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6343 -#: ../en/ch04-daily.xml:75 1.6344 +#: ../en/ch05-daily.xml:75 1.6345 msgid "" 1.6346 "Mercurial does not track directory information. Instead, it tracks the path " 1.6347 "to a file. Before creating a file, it first creates any missing directory " 1.6348 @@ -5060,7 +6424,7 @@ 1.6349 msgstr "" 1.6350 1.6351 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6352 -#: ../en/ch04-daily.xml:84 1.6353 +#: ../en/ch05-daily.xml:84 1.6354 msgid "" 1.6355 "Empty directories are rarely useful, and there are unintrusive workarounds " 1.6356 "that you can use to achieve an appropriate effect. The developers of " 1.6357 @@ -5069,7 +6433,7 @@ 1.6358 msgstr "" 1.6359 1.6360 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6361 -#: ../en/ch04-daily.xml:91 1.6362 +#: ../en/ch05-daily.xml:91 1.6363 msgid "" 1.6364 "If you need an empty directory in your repository, there are a few ways to " 1.6365 "achieve this. One is to create a directory, then <command role=\"hg-cmd\">hg " 1.6366 @@ -5080,29 +6444,29 @@ 1.6367 msgstr "" 1.6368 1.6369 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6370 -#: ../en/ch04-daily.xml:102 1.6371 +#: ../en/ch05-daily.xml:102 1.6372 msgid "" 1.6373 "Another way to tackle a need for an empty directory is to simply create one " 1.6374 "in your automated build scripts before they will need it." 1.6375 msgstr "" 1.6376 1.6377 #. type: Content of: <book><chapter><sect1><title> 1.6378 -#: ../en/ch04-daily.xml:109 1.6379 +#: ../en/ch05-daily.xml:109 1.6380 msgid "How to stop tracking a file" 1.6381 msgstr "如何停止跟踪文件" 1.6382 1.6383 #. type: Content of: <book><chapter><sect1><para> 1.6384 -#: ../en/ch04-daily.xml:111 1.6385 +#: ../en/ch05-daily.xml:111 1.6386 msgid "" 1.6387 "Once you decide that a file no longer belongs in your repository, use the " 1.6388 "<command role=\"hg-cmd\">hg remove</command> command. This deletes the file, " 1.6389 -"and tells Mercurial to stop tracking it. A removed file is represented in " 1.6390 -"the output of <command role=\"hg-cmd\">hg status</command> with a " 1.6391 -"<quote><literal>R</literal></quote>." 1.6392 -msgstr "" 1.6393 - 1.6394 -#. type: Content of: <book><chapter><sect1><para> 1.6395 -#: ../en/ch04-daily.xml:120 1.6396 +"and tells Mercurial to stop tracking it (which will occur at the next " 1.6397 +"commit). A removed file is represented in the output of <command role=\"hg-" 1.6398 +"cmd\">hg status</command> with a <quote><literal>R</literal></quote>." 1.6399 +msgstr "" 1.6400 + 1.6401 +#. type: Content of: <book><chapter><sect1><para> 1.6402 +#: ../en/ch05-daily.xml:121 1.6403 msgid "" 1.6404 "After you <command role=\"hg-cmd\">hg remove</command> a file, Mercurial will " 1.6405 "no longer track changes to that file, even if you recreate a file with the " 1.6406 @@ -5113,36 +6477,36 @@ 1.6407 msgstr "" 1.6408 1.6409 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6410 -#: ../en/ch04-daily.xml:129 1.6411 +#: ../en/ch05-daily.xml:130 1.6412 msgid "Removing a file does not affect its history" 1.6413 msgstr "删除文件不影响历史" 1.6414 1.6415 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6416 -#: ../en/ch04-daily.xml:131 1.6417 +#: ../en/ch05-daily.xml:132 1.6418 msgid "It is important to understand that removing a file has only two effects." 1.6419 msgstr "" 1.6420 1.6421 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.6422 -#: ../en/ch04-daily.xml:134 1.6423 +#: ../en/ch05-daily.xml:135 1.6424 msgid "It removes the current version of the file from the working directory." 1.6425 msgstr "" 1.6426 1.6427 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.6428 -#: ../en/ch04-daily.xml:137 1.6429 +#: ../en/ch05-daily.xml:138 1.6430 msgid "" 1.6431 "It stops Mercurial from tracking changes to the file, from the time of the " 1.6432 "next commit." 1.6433 msgstr "" 1.6434 1.6435 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6436 -#: ../en/ch04-daily.xml:140 1.6437 +#: ../en/ch05-daily.xml:141 1.6438 msgid "" 1.6439 "Removing a file <emphasis>does not</emphasis> in any way alter the " 1.6440 "<emphasis>history</emphasis> of the file." 1.6441 msgstr "" 1.6442 1.6443 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6444 -#: ../en/ch04-daily.xml:143 1.6445 +#: ../en/ch05-daily.xml:144 1.6446 msgid "" 1.6447 "If you update the working directory to a changeset that was committed when it " 1.6448 "was still tracking a file that you later removed, the file will reappear in " 1.6449 @@ -5153,12 +6517,12 @@ 1.6450 msgstr "" 1.6451 1.6452 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6453 -#: ../en/ch04-daily.xml:154 1.6454 +#: ../en/ch05-daily.xml:155 1.6455 msgid "Missing files" 1.6456 msgstr "丢失的文件" 1.6457 1.6458 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6459 -#: ../en/ch04-daily.xml:156 1.6460 +#: ../en/ch05-daily.xml:157 1.6461 msgid "" 1.6462 "Mercurial considers a file that you have deleted, but not used <command role=" 1.6463 "\"hg-cmd\">hg remove</command> to delete, to be <emphasis>missing</" 1.6464 @@ -5168,7 +6532,7 @@ 1.6465 msgstr "" 1.6466 1.6467 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6468 -#: ../en/ch04-daily.xml:166 1.6469 +#: ../en/ch05-daily.xml:167 1.6470 msgid "" 1.6471 "If your repository contains a file that <command role=\"hg-cmd\">hg status</" 1.6472 "command> reports as missing, and you want the file to stay gone, you can run " 1.6473 @@ -5178,7 +6542,7 @@ 1.6474 msgstr "" 1.6475 1.6476 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6477 -#: ../en/ch04-daily.xml:176 1.6478 +#: ../en/ch05-daily.xml:177 1.6479 msgid "" 1.6480 "On the other hand, if you deleted the missing file by accident, give <command " 1.6481 "role=\"hg-cmd\">hg revert</command> the name of the file to recover. It will " 1.6482 @@ -5186,12 +6550,12 @@ 1.6483 msgstr "" 1.6484 1.6485 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6486 -#: ../en/ch04-daily.xml:185 1.6487 +#: ../en/ch05-daily.xml:186 1.6488 msgid "Aside: why tell Mercurial explicitly to remove a file?" 1.6489 msgstr "旁白: 为什么要明确告诉 Mercurial 删除文件?" 1.6490 1.6491 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6492 -#: ../en/ch04-daily.xml:188 1.6493 +#: ../en/ch05-daily.xml:189 1.6494 msgid "" 1.6495 "You might wonder why Mercurial requires you to explicitly tell it that you " 1.6496 "are deleting a file. Early during the development of Mercurial, it let you " 1.6497 @@ -5202,12 +6566,12 @@ 1.6498 msgstr "" 1.6499 1.6500 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6501 -#: ../en/ch04-daily.xml:199 1.6502 +#: ../en/ch05-daily.xml:200 1.6503 msgid "Useful shorthand&emdash;adding and removing files in one step" 1.6504 msgstr "有用的速记—一个步骤添加和删除文件" 1.6505 1.6506 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6507 -#: ../en/ch04-daily.xml:202 1.6508 +#: ../en/ch05-daily.xml:203 1.6509 msgid "" 1.6510 "Mercurial offers a combination command, <command role=\"hg-cmd\">hg " 1.6511 "addremove</command>, that adds untracked files and marks missing files as " 1.6512 @@ -5215,7 +6579,7 @@ 1.6513 msgstr "" 1.6514 1.6515 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6516 -#: ../en/ch04-daily.xml:208 1.6517 +#: ../en/ch05-daily.xml:209 1.6518 msgid "" 1.6519 "The <command role=\"hg-cmd\">hg commit</command> command also provides a " 1.6520 "<option role=\"hg-opt-commit\">-A</option> option that performs this same add-" 1.6521 @@ -5223,12 +6587,12 @@ 1.6522 msgstr "" 1.6523 1.6524 #. type: Content of: <book><chapter><sect1><title> 1.6525 -#: ../en/ch04-daily.xml:218 1.6526 +#: ../en/ch05-daily.xml:219 1.6527 msgid "Copying files" 1.6528 msgstr "复制文件" 1.6529 1.6530 #. type: Content of: <book><chapter><sect1><para> 1.6531 -#: ../en/ch04-daily.xml:220 1.6532 +#: ../en/ch05-daily.xml:221 1.6533 msgid "" 1.6534 "Mercurial provides a <command role=\"hg-cmd\">hg copy</command> command that " 1.6535 "lets you make a new copy of a file. When you copy a file using this command, " 1.6536 @@ -5238,12 +6602,12 @@ 1.6537 msgstr "" 1.6538 1.6539 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6540 -#: ../en/ch04-daily.xml:228 1.6541 +#: ../en/ch05-daily.xml:229 1.6542 msgid "The results of copying during a merge" 1.6543 msgstr "合并期间的复制结果" 1.6544 1.6545 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6546 -#: ../en/ch04-daily.xml:230 1.6547 +#: ../en/ch05-daily.xml:231 1.6548 msgid "" 1.6549 "What happens during a merge is that changes <quote>follow</quote> a copy. To " 1.6550 "best illustrate what this means, let's create an example. We'll start with " 1.6551 @@ -5251,28 +6615,28 @@ 1.6552 msgstr "" 1.6553 1.6554 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6555 -#: ../en/ch04-daily.xml:237 1.6556 +#: ../en/ch05-daily.xml:238 1.6557 msgid "" 1.6558 "We need to do some work in parallel, so that we'll have something to merge. " 1.6559 "So let's clone our repository." 1.6560 msgstr "" 1.6561 1.6562 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6563 -#: ../en/ch04-daily.xml:243 1.6564 +#: ../en/ch05-daily.xml:244 1.6565 msgid "" 1.6566 "Back in our initial repository, let's use the <command role=\"hg-cmd\">hg " 1.6567 "copy</command> command to make a copy of the first file we created." 1.6568 msgstr "" 1.6569 1.6570 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6571 -#: ../en/ch04-daily.xml:249 1.6572 +#: ../en/ch05-daily.xml:250 1.6573 msgid "" 1.6574 "If we look at the output of the <command role=\"hg-cmd\">hg status</command> " 1.6575 "command afterwards, the copied file looks just like a normal added file." 1.6576 msgstr "" 1.6577 1.6578 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6579 -#: ../en/ch04-daily.xml:255 1.6580 +#: ../en/ch05-daily.xml:256 1.6581 msgid "" 1.6582 "But if we pass the <option role=\"hg-opt-status\">-C</option> option to " 1.6583 "<command role=\"hg-cmd\">hg status</command>, it prints another line of " 1.6584 @@ -5281,14 +6645,14 @@ 1.6585 msgstr "" 1.6586 1.6587 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6588 -#: ../en/ch04-daily.xml:263 1.6589 +#: ../en/ch05-daily.xml:264 1.6590 msgid "" 1.6591 "Now, back in the repository we cloned, let's make a change in parallel. " 1.6592 "We'll add a line of content to the original file that we created." 1.6593 msgstr "" 1.6594 1.6595 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6596 -#: ../en/ch04-daily.xml:269 1.6597 +#: ../en/ch05-daily.xml:270 1.6598 msgid "" 1.6599 "Now we have a modified <filename>file</filename> in this repository. When we " 1.6600 "pull the changes from the first repository, and merge the two heads, " 1.6601 @@ -5297,19 +6661,19 @@ 1.6602 msgstr "" 1.6603 1.6604 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6605 -#: ../en/ch04-daily.xml:279 1.6606 +#: ../en/ch05-daily.xml:280 1.6607 msgid "Why should changes follow copies?" 1.6608 msgstr "为什么复制后需要后续修改?" 1.6609 1.6610 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6611 -#: ../en/ch04-daily.xml:281 1.6612 +#: ../en/ch05-daily.xml:282 1.6613 msgid "" 1.6614 "This behavior&emdash;of changes to a file propagating out to copies of the " 1.6615 "file&emdash;might seem esoteric, but in most cases it's highly desirable." 1.6616 msgstr "" 1.6617 1.6618 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6619 -#: ../en/ch04-daily.xml:285 1.6620 +#: ../en/ch05-daily.xml:286 1.6621 msgid "" 1.6622 "First of all, remember that this propagation <emphasis>only</emphasis> " 1.6623 "happens when you merge. So if you <command role=\"hg-cmd\">hg copy</command> " 1.6624 @@ -5318,7 +6682,7 @@ 1.6625 msgstr "" 1.6626 1.6627 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6628 -#: ../en/ch04-daily.xml:291 1.6629 +#: ../en/ch05-daily.xml:292 1.6630 msgid "" 1.6631 "The second thing to know is that modifications will only propagate across a " 1.6632 "copy as long as the changeset that you're merging changes from " 1.6633 @@ -5326,7 +6690,7 @@ 1.6634 msgstr "" 1.6635 1.6636 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6637 -#: ../en/ch04-daily.xml:296 1.6638 +#: ../en/ch05-daily.xml:297 1.6639 msgid "" 1.6640 "The reason that Mercurial does this is as follows. Let's say I make an " 1.6641 "important bug fix in a source file, and commit my changes. Meanwhile, you've " 1.6642 @@ -5336,7 +6700,7 @@ 1.6643 msgstr "" 1.6644 1.6645 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6646 -#: ../en/ch04-daily.xml:303 1.6647 +#: ../en/ch05-daily.xml:304 1.6648 msgid "" 1.6649 "If you pulled and merged my changes, and Mercurial <emphasis>didn't</" 1.6650 "emphasis> propagate changes across copies, your new source file would now " 1.6651 @@ -5345,7 +6709,7 @@ 1.6652 msgstr "" 1.6653 1.6654 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6655 -#: ../en/ch04-daily.xml:309 1.6656 +#: ../en/ch05-daily.xml:310 1.6657 msgid "" 1.6658 "By automatically propagating the change that fixed the bug from the original " 1.6659 "file to the copy, Mercurial prevents this class of problem. To my knowledge, " 1.6660 @@ -5354,7 +6718,7 @@ 1.6661 msgstr "" 1.6662 1.6663 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6664 -#: ../en/ch04-daily.xml:315 1.6665 +#: ../en/ch05-daily.xml:316 1.6666 msgid "" 1.6667 "Once your change history has a record that the copy and subsequent merge " 1.6668 "occurred, there's usually no further need to propagate changes from the " 1.6669 @@ -5363,12 +6727,12 @@ 1.6670 msgstr "" 1.6671 1.6672 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6673 -#: ../en/ch04-daily.xml:323 1.6674 +#: ../en/ch05-daily.xml:324 1.6675 msgid "How to make changes <emphasis>not</emphasis> follow a copy" 1.6676 msgstr "如何让复制后<emphasis>不</emphasis>修改?" 1.6677 1.6678 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6679 -#: ../en/ch04-daily.xml:326 1.6680 +#: ../en/ch05-daily.xml:327 1.6681 msgid "" 1.6682 "If, for some reason, you decide that this business of automatically " 1.6683 "propagating changes across copies is not for you, simply use your system's " 1.6684 @@ -5380,12 +6744,12 @@ 1.6685 msgstr "" 1.6686 1.6687 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6688 -#: ../en/ch04-daily.xml:339 1.6689 +#: ../en/ch05-daily.xml:340 1.6690 msgid "Behavior of the <command role=\"hg-cmd\">hg copy</command> command" 1.6691 msgstr "命令 <command role=\"hg-cmd\">hg copy</command> 的特性" 1.6692 1.6693 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6694 -#: ../en/ch04-daily.xml:342 1.6695 +#: ../en/ch05-daily.xml:343 1.6696 msgid "" 1.6697 "When you use the <command role=\"hg-cmd\">hg copy</command> command, " 1.6698 "Mercurial makes a copy of each source file as it currently stands in the " 1.6699 @@ -5397,7 +6761,7 @@ 1.6700 msgstr "" 1.6701 1.6702 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6703 -#: ../en/ch04-daily.xml:352 1.6704 +#: ../en/ch05-daily.xml:353 1.6705 msgid "" 1.6706 "The <command role=\"hg-cmd\">hg copy</command> command acts similarly to the " 1.6707 "Unix <command>cp</command> command (you can use the <command role=\"hg-cmd" 1.6708 @@ -5407,7 +6771,7 @@ 1.6709 msgstr "" 1.6710 1.6711 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6712 -#: ../en/ch04-daily.xml:360 1.6713 +#: ../en/ch05-daily.xml:361 1.6714 msgid "" 1.6715 "If you pass <command role=\"hg-cmd\">hg copy</command> a single file as the " 1.6716 "source, and the destination does not exist, it creates a new file with that " 1.6717 @@ -5415,28 +6779,28 @@ 1.6718 msgstr "" 1.6719 1.6720 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6721 -#: ../en/ch04-daily.xml:366 1.6722 +#: ../en/ch05-daily.xml:367 1.6723 msgid "" 1.6724 "If the destination is a directory, Mercurial copies its sources into that " 1.6725 "directory." 1.6726 msgstr "" 1.6727 1.6728 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6729 -#: ../en/ch04-daily.xml:371 1.6730 +#: ../en/ch05-daily.xml:372 1.6731 msgid "" 1.6732 "Copying a directory is recursive, and preserves the directory structure of " 1.6733 "the source." 1.6734 msgstr "" 1.6735 1.6736 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6737 -#: ../en/ch04-daily.xml:377 1.6738 +#: ../en/ch05-daily.xml:378 1.6739 msgid "" 1.6740 "If the source and destination are both directories, the source tree is " 1.6741 "recreated in the destination directory." 1.6742 msgstr "" 1.6743 1.6744 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6745 -#: ../en/ch04-daily.xml:382 1.6746 +#: ../en/ch05-daily.xml:383 1.6747 msgid "" 1.6748 "As with the <command role=\"hg-cmd\">hg remove</command> command, if you copy " 1.6749 "a file manually and then want Mercurial to know that you've copied the file, " 1.6750 @@ -5445,12 +6809,12 @@ 1.6751 msgstr "" 1.6752 1.6753 #. type: Content of: <book><chapter><sect1><title> 1.6754 -#: ../en/ch04-daily.xml:393 1.6755 +#: ../en/ch05-daily.xml:394 1.6756 msgid "Renaming files" 1.6757 msgstr "改名文件" 1.6758 1.6759 #. type: Content of: <book><chapter><sect1><para> 1.6760 -#: ../en/ch04-daily.xml:395 1.6761 +#: ../en/ch05-daily.xml:396 1.6762 msgid "" 1.6763 "It's rather more common to need to rename a file than to make a copy of it. " 1.6764 "The reason I discussed the <command role=\"hg-cmd\">hg copy</command> command " 1.6765 @@ -5460,7 +6824,7 @@ 1.6766 msgstr "" 1.6767 1.6768 #. type: Content of: <book><chapter><sect1><para> 1.6769 -#: ../en/ch04-daily.xml:403 1.6770 +#: ../en/ch05-daily.xml:404 1.6771 msgid "" 1.6772 "When you use the <command role=\"hg-cmd\">hg rename</command> command, " 1.6773 "Mercurial makes a copy of each source file, then deletes it and marks the " 1.6774 @@ -5468,14 +6832,14 @@ 1.6775 msgstr "" 1.6776 1.6777 #. type: Content of: <book><chapter><sect1><para> 1.6778 -#: ../en/ch04-daily.xml:409 1.6779 +#: ../en/ch05-daily.xml:410 1.6780 msgid "" 1.6781 "The <command role=\"hg-cmd\">hg status</command> command shows the newly " 1.6782 "copied file as added, and the copied-from file as removed." 1.6783 msgstr "" 1.6784 1.6785 #. type: Content of: <book><chapter><sect1><para> 1.6786 -#: ../en/ch04-daily.xml:415 1.6787 +#: ../en/ch05-daily.xml:416 1.6788 msgid "" 1.6789 "As with the results of a <command role=\"hg-cmd\">hg copy</command>, we must " 1.6790 "use the <option role=\"hg-opt-status\">-C</option> option to <command role=" 1.6791 @@ -5484,7 +6848,7 @@ 1.6792 msgstr "" 1.6793 1.6794 #. type: Content of: <book><chapter><sect1><para> 1.6795 -#: ../en/ch04-daily.xml:424 1.6796 +#: ../en/ch05-daily.xml:425 1.6797 msgid "" 1.6798 "As with <command role=\"hg-cmd\">hg remove</command> and <command role=\"hg-" 1.6799 "cmd\">hg copy</command>, you can tell Mercurial about a rename after the fact " 1.6800 @@ -5495,7 +6859,7 @@ 1.6801 msgstr "" 1.6802 1.6803 #. type: Content of: <book><chapter><sect1><para> 1.6804 -#: ../en/ch04-daily.xml:433 1.6805 +#: ../en/ch05-daily.xml:434 1.6806 msgid "" 1.6807 "If you're familiar with the Unix command line, you'll be glad to know that " 1.6808 "<command role=\"hg-cmd\">hg rename</command> command can be invoked as " 1.6809 @@ -5503,19 +6867,19 @@ 1.6810 msgstr "" 1.6811 1.6812 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6813 -#: ../en/ch04-daily.xml:439 1.6814 +#: ../en/ch05-daily.xml:440 1.6815 msgid "Renaming files and merging changes" 1.6816 msgstr "改名文件与合并修改" 1.6817 1.6818 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6819 -#: ../en/ch04-daily.xml:441 1.6820 +#: ../en/ch05-daily.xml:442 1.6821 msgid "" 1.6822 "Since Mercurial's rename is implemented as copy-and-remove, the same " 1.6823 "propagation of changes happens when you merge after a rename as after a copy." 1.6824 msgstr "" 1.6825 1.6826 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6827 -#: ../en/ch04-daily.xml:445 1.6828 +#: ../en/ch05-daily.xml:446 1.6829 msgid "" 1.6830 "If I modify a file, and you rename it to a new name, and then we merge our " 1.6831 "respective changes, my modifications to the file under its original name will " 1.6832 @@ -5525,7 +6889,7 @@ 1.6833 msgstr "" 1.6834 1.6835 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6836 -#: ../en/ch04-daily.xml:452 1.6837 +#: ../en/ch05-daily.xml:453 1.6838 msgid "" 1.6839 "Whereas having changes follow a copy is a feature where you can perhaps nod " 1.6840 "and say <quote>yes, that might be useful,</quote> it should be clear that " 1.6841 @@ -5535,12 +6899,12 @@ 1.6842 msgstr "" 1.6843 1.6844 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6845 -#: ../en/ch04-daily.xml:461 1.6846 +#: ../en/ch05-daily.xml:462 1.6847 msgid "Divergent renames and merging" 1.6848 msgstr "改名与合并的分歧" 1.6849 1.6850 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6851 -#: ../en/ch04-daily.xml:463 1.6852 +#: ../en/ch05-daily.xml:464 1.6853 msgid "" 1.6854 "The case of diverging names occurs when two developers start with a " 1.6855 "file&emdash;let's call it <filename>foo</filename>&emdash;in their respective " 1.6856 @@ -5548,12 +6912,12 @@ 1.6857 msgstr "" 1.6858 1.6859 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6860 -#: ../en/ch04-daily.xml:470 1.6861 +#: ../en/ch05-daily.xml:471 1.6862 msgid "Anne renames the file to <filename>bar</filename>." 1.6863 msgstr "" 1.6864 1.6865 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6866 -#: ../en/ch04-daily.xml:474 1.6867 +#: ../en/ch05-daily.xml:475 1.6868 msgid "" 1.6869 "Meanwhile, Bob renames it to <filename>quux</filename>. (Remember that " 1.6870 "<command role=\"hg-cmd\">hg mv</command> is an alias for <command role=\"hg-" 1.6871 @@ -5561,14 +6925,14 @@ 1.6872 msgstr "" 1.6873 1.6874 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6875 -#: ../en/ch04-daily.xml:481 1.6876 +#: ../en/ch05-daily.xml:482 1.6877 msgid "" 1.6878 "I like to think of this as a conflict because each developer has expressed " 1.6879 "different intentions about what the file ought to be named." 1.6880 msgstr "" 1.6881 1.6882 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6883 -#: ../en/ch04-daily.xml:485 1.6884 +#: ../en/ch05-daily.xml:486 1.6885 msgid "" 1.6886 "What do you think should happen when they merge their work? Mercurial's " 1.6887 "actual behavior is that it always preserves <emphasis>both</emphasis> names " 1.6888 @@ -5576,19 +6940,19 @@ 1.6889 msgstr "" 1.6890 1.6891 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6892 -#: ../en/ch04-daily.xml:492 1.6893 +#: ../en/ch05-daily.xml:493 1.6894 msgid "" 1.6895 "Notice that while Mercurial warns about the divergent renames, it leaves it " 1.6896 "up to you to do something about the divergence after the merge." 1.6897 msgstr "" 1.6898 1.6899 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6900 -#: ../en/ch04-daily.xml:498 1.6901 +#: ../en/ch05-daily.xml:499 1.6902 msgid "Convergent renames and merging" 1.6903 msgstr "收敛改名与合并" 1.6904 1.6905 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6906 -#: ../en/ch04-daily.xml:500 1.6907 +#: ../en/ch05-daily.xml:501 1.6908 msgid "" 1.6909 "Another kind of rename conflict occurs when two people choose to rename " 1.6910 "different <emphasis>source</emphasis> files to the same " 1.6911 @@ -5597,12 +6961,12 @@ 1.6912 msgstr "" 1.6913 1.6914 #. type: Content of: <book><chapter><sect1><sect2><title> 1.6915 -#: ../en/ch04-daily.xml:508 1.6916 +#: ../en/ch05-daily.xml:509 1.6917 msgid "Other name-related corner cases" 1.6918 msgstr "其它名称相关的角落" 1.6919 1.6920 #. type: Content of: <book><chapter><sect1><sect2><para> 1.6921 -#: ../en/ch04-daily.xml:510 1.6922 +#: ../en/ch05-daily.xml:511 1.6923 msgid "" 1.6924 "Mercurial has a longstanding bug in which it fails to handle a merge where " 1.6925 "one side has a file with a given name, while another has a directory with the " 1.6926 @@ -5611,19 +6975,19 @@ 1.6927 msgstr "" 1.6928 1.6929 #. type: Content of: <book><chapter><sect1><title> 1.6930 -#: ../en/ch04-daily.xml:523 1.6931 +#: ../en/ch05-daily.xml:524 1.6932 msgid "Recovering from mistakes" 1.6933 msgstr "从错误恢复" 1.6934 1.6935 #. type: Content of: <book><chapter><sect1><para> 1.6936 -#: ../en/ch04-daily.xml:525 1.6937 +#: ../en/ch05-daily.xml:526 1.6938 msgid "" 1.6939 "Mercurial has some useful commands that will help you to recover from some " 1.6940 "common mistakes." 1.6941 msgstr "" 1.6942 1.6943 #. type: Content of: <book><chapter><sect1><para> 1.6944 -#: ../en/ch04-daily.xml:528 1.6945 +#: ../en/ch05-daily.xml:529 1.6946 msgid "" 1.6947 "The <command role=\"hg-cmd\">hg revert</command> command lets you undo " 1.6948 "changes that you have made to your working directory. For example, if you " 1.6949 @@ -5635,16 +6999,16 @@ 1.6950 msgstr "" 1.6951 1.6952 #. type: Content of: <book><chapter><sect1><para> 1.6953 -#: ../en/ch04-daily.xml:538 1.6954 -msgid "" 1.6955 -"It's good to remember that the <command role=\"hg-cmd\">hg revert</command> " 1.6956 -"command is useful for changes that you have not yet committed. Once you've " 1.6957 -"committed a change, if you decide it was a mistake, you can still do " 1.6958 +#: ../en/ch05-daily.xml:539 1.6959 +msgid "" 1.6960 +"It is helpful to remember that the <command role=\"hg-cmd\">hg revert</" 1.6961 +"command> command is useful for changes that you have not yet committed. Once " 1.6962 +"you've committed a change, if you decide it was a mistake, you can still do " 1.6963 "something about it, though your options may be more limited." 1.6964 msgstr "" 1.6965 1.6966 #. type: Content of: <book><chapter><sect1><para> 1.6967 -#: ../en/ch04-daily.xml:544 1.6968 +#: ../en/ch05-daily.xml:546 1.6969 msgid "" 1.6970 "For more information about the <command role=\"hg-cmd\">hg revert</command> " 1.6971 "command, and details about how to deal with changes you have already " 1.6972 @@ -5652,12 +7016,12 @@ 1.6973 msgstr "" 1.6974 1.6975 #. type: Content of: <book><chapter><sect1><title> 1.6976 -#: ../en/ch04-daily.xml:551 1.6977 +#: ../en/ch05-daily.xml:553 1.6978 msgid "Dealing with tricky merges" 1.6979 msgstr "合并的技巧" 1.6980 1.6981 #. type: Content of: <book><chapter><sect1><para> 1.6982 -#: ../en/ch04-daily.xml:553 1.6983 +#: ../en/ch05-daily.xml:555 1.6984 msgid "" 1.6985 "In a complicated or large project, it's not unusual for a merge of two " 1.6986 "changesets to result in some headaches. Suppose there's a big source file " 1.6987 @@ -5667,34 +7031,34 @@ 1.6988 msgstr "" 1.6989 1.6990 #. type: Content of: <book><chapter><sect1><para> 1.6991 -#: ../en/ch04-daily.xml:560 1.6992 +#: ../en/ch05-daily.xml:562 1.6993 msgid "" 1.6994 "Let's develop a simple case of this and see how to deal with it. We'll start " 1.6995 "off with a repository containing one file, and clone it twice." 1.6996 msgstr "" 1.6997 1.6998 #. type: Content of: <book><chapter><sect1><para> 1.6999 -#: ../en/ch04-daily.xml:566 1.7000 +#: ../en/ch05-daily.xml:568 1.7001 msgid "In one clone, we'll modify the file in one way." 1.7002 msgstr "" 1.7003 1.7004 #. type: Content of: <book><chapter><sect1><para> 1.7005 -#: ../en/ch04-daily.xml:570 1.7006 +#: ../en/ch05-daily.xml:572 1.7007 msgid "In another, we'll modify the file differently." 1.7008 msgstr "" 1.7009 1.7010 #. type: Content of: <book><chapter><sect1><para> 1.7011 -#: ../en/ch04-daily.xml:574 1.7012 +#: ../en/ch05-daily.xml:576 1.7013 msgid "Next, we'll pull each set of changes into our original repo." 1.7014 msgstr "" 1.7015 1.7016 #. type: Content of: <book><chapter><sect1><para> 1.7017 -#: ../en/ch04-daily.xml:579 1.7018 +#: ../en/ch05-daily.xml:581 1.7019 msgid "We expect our repository to now contain two heads." 1.7020 msgstr "" 1.7021 1.7022 #. type: Content of: <book><chapter><sect1><para> 1.7023 -#: ../en/ch04-daily.xml:583 1.7024 +#: ../en/ch05-daily.xml:585 1.7025 msgid "" 1.7026 "Normally, if we run <command role=\"hg-cmd\">hg merge</command> at this " 1.7027 "point, it will drop us into a GUI that will let us manually resolve the " 1.7028 @@ -5704,7 +7068,7 @@ 1.7029 msgstr "" 1.7030 1.7031 #. type: Content of: <book><chapter><sect1><para> 1.7032 -#: ../en/ch04-daily.xml:592 1.7033 +#: ../en/ch05-daily.xml:594 1.7034 msgid "" 1.7035 "We've told Mercurial's merge machinery to run the command <command>false</" 1.7036 "command> (which, as we desire, fails immediately) if it detects a merge that " 1.7037 @@ -5712,21 +7076,21 @@ 1.7038 msgstr "" 1.7039 1.7040 #. type: Content of: <book><chapter><sect1><para> 1.7041 -#: ../en/ch04-daily.xml:597 1.7042 +#: ../en/ch05-daily.xml:599 1.7043 msgid "" 1.7044 "If we now fire up <command role=\"hg-cmd\">hg merge</command>, it should " 1.7045 "grind to a halt and report a failure." 1.7046 msgstr "" 1.7047 1.7048 #. type: Content of: <book><chapter><sect1><para> 1.7049 -#: ../en/ch04-daily.xml:603 1.7050 +#: ../en/ch05-daily.xml:605 1.7051 msgid "" 1.7052 "Even if we don't notice that the merge failed, Mercurial will prevent us from " 1.7053 "accidentally committing the result of a failed merge." 1.7054 msgstr "" 1.7055 1.7056 #. type: Content of: <book><chapter><sect1><para> 1.7057 -#: ../en/ch04-daily.xml:609 1.7058 +#: ../en/ch05-daily.xml:611 1.7059 msgid "" 1.7060 "When <command role=\"hg-cmd\">hg commit</command> fails in this case, it " 1.7061 "suggests that we use the unfamiliar <command role=\"hg-cmd\">hg resolve</" 1.7062 @@ -5735,33 +7099,33 @@ 1.7063 msgstr "" 1.7064 1.7065 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7066 -#: ../en/ch04-daily.xml:616 1.7067 +#: ../en/ch05-daily.xml:618 1.7068 msgid "File resolution states" 1.7069 msgstr "" 1.7070 1.7071 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7072 -#: ../en/ch04-daily.xml:618 1.7073 +#: ../en/ch05-daily.xml:620 1.7074 msgid "" 1.7075 "When a merge occurs, most files will usually remain unmodified. For each " 1.7076 "file where Mercurial has to do something, it tracks the state of the file." 1.7077 msgstr "" 1.7078 1.7079 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.7080 -#: ../en/ch04-daily.xml:624 1.7081 +#: ../en/ch05-daily.xml:626 1.7082 msgid "" 1.7083 "A <emphasis>resolved</emphasis> file has been successfully merged, either " 1.7084 "automatically by Mercurial or manually with human intervention." 1.7085 msgstr "" 1.7086 1.7087 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.7088 -#: ../en/ch04-daily.xml:629 1.7089 +#: ../en/ch05-daily.xml:631 1.7090 msgid "" 1.7091 "An <emphasis>unresolved</emphasis> file was not merged successfully, and " 1.7092 "needs more attention." 1.7093 msgstr "" 1.7094 1.7095 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7096 -#: ../en/ch04-daily.xml:634 1.7097 +#: ../en/ch05-daily.xml:636 1.7098 msgid "" 1.7099 "If Mercurial sees <emphasis>any</emphasis> file in the unresolved state after " 1.7100 "a merge, it considers the merge to have failed. Fortunately, we do not need " 1.7101 @@ -5769,7 +7133,7 @@ 1.7102 msgstr "" 1.7103 1.7104 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7105 -#: ../en/ch04-daily.xml:639 1.7106 +#: ../en/ch05-daily.xml:641 1.7107 msgid "" 1.7108 "The <option role=\"hg-opt-resolve\">--list</option> or <option role=\"hg-opt-" 1.7109 "resolve\">-l</option> option to <command role=\"hg-cmd\">hg resolve</command> " 1.7110 @@ -5777,7 +7141,7 @@ 1.7111 msgstr "" 1.7112 1.7113 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7114 -#: ../en/ch04-daily.xml:646 1.7115 +#: ../en/ch05-daily.xml:648 1.7116 msgid "" 1.7117 "In the output from <command role=\"hg-cmd\">hg resolve</command>, a resolved " 1.7118 "file is marked with <literal>R</literal>, while an unresolved file is marked " 1.7119 @@ -5787,12 +7151,12 @@ 1.7120 msgstr "" 1.7121 1.7122 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7123 -#: ../en/ch04-daily.xml:655 1.7124 +#: ../en/ch05-daily.xml:657 1.7125 msgid "Resolving a file merge" 1.7126 msgstr "合并文件" 1.7127 1.7128 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7129 -#: ../en/ch04-daily.xml:657 1.7130 +#: ../en/ch05-daily.xml:659 1.7131 msgid "" 1.7132 "We have several options to move a file from the unresolved into the resolved " 1.7133 "state. By far the most common is to rerun <command role=\"hg-cmd\">hg " 1.7134 @@ -5804,7 +7168,7 @@ 1.7135 msgstr "" 1.7136 1.7137 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7138 -#: ../en/ch04-daily.xml:667 1.7139 +#: ../en/ch05-daily.xml:669 1.7140 msgid "" 1.7141 "Mercurial also lets us modify the resolution state of a file directly. We " 1.7142 "can manually mark a file as resolved using the <option role=\"hg-opt-resolve" 1.7143 @@ -5814,13 +7178,221 @@ 1.7144 "file as we go." 1.7145 msgstr "" 1.7146 1.7147 +#. type: Content of: <book><chapter><sect1><title> 1.7148 +#: ../en/ch05-daily.xml:680 1.7149 +msgid "More useful diffs" 1.7150 +msgstr "" 1.7151 + 1.7152 +#. type: Content of: <book><chapter><sect1><para> 1.7153 +#: ../en/ch05-daily.xml:682 1.7154 +msgid "" 1.7155 +"The default output of the <command role=\"hg-cmd\">hg diff</command> command " 1.7156 +"is backwards compatible with the regular <command>diff</command> command, but " 1.7157 +"this has some drawbacks." 1.7158 +msgstr "" 1.7159 + 1.7160 +#. type: Content of: <book><chapter><sect1><para> 1.7161 +#: ../en/ch05-daily.xml:687 1.7162 +#, fuzzy 1.7163 +msgid "" 1.7164 +"Consider the case where we use <command role=\"hg-cmd\">hg rename</command> " 1.7165 +"to rename a file." 1.7166 +msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 1.7167 + 1.7168 +#. type: Content of: <book><chapter><sect1><para> 1.7169 +#: ../en/ch05-daily.xml:692 1.7170 +msgid "" 1.7171 +"The output of <command role=\"hg-cmd\">hg diff</command> above obscures the " 1.7172 +"fact that we simply renamed a file. The <command role=\"hg-cmd\">hg diff</" 1.7173 +"command> command accepts an option, <option>--git</option> or <option>-g</" 1.7174 +"option>, to use a newer diff format that displays such information in a more " 1.7175 +"readable form." 1.7176 +msgstr "" 1.7177 + 1.7178 +#. type: Content of: <book><chapter><sect1><para> 1.7179 +#: ../en/ch05-daily.xml:701 1.7180 +msgid "" 1.7181 +"This option also helps with a case that can otherwise be confusing: a file " 1.7182 +"that appears to be modified according to <command role=\"hg-cmd\">hg status</" 1.7183 +"command>, but for which <command role=\"hg-cmd\">hg diff</command> prints " 1.7184 +"nothing. This situation can arise if we change the file's execute permissions." 1.7185 +msgstr "" 1.7186 + 1.7187 +#. type: Content of: <book><chapter><sect1><para> 1.7188 +#: ../en/ch05-daily.xml:710 1.7189 +msgid "" 1.7190 +"The normal <command>diff</command> command pays no attention to file " 1.7191 +"permissions, which is why <command role=\"hg-cmd\">hg diff</command> prints " 1.7192 +"nothing by default. If we supply it with the <option>-g</option> option, it " 1.7193 +"tells us what really happened." 1.7194 +msgstr "" 1.7195 + 1.7196 +#. type: Content of: <book><chapter><sect1><title> 1.7197 +#: ../en/ch05-daily.xml:720 1.7198 +msgid "Which files to manage, and which to avoid" 1.7199 +msgstr "" 1.7200 + 1.7201 +#. type: Content of: <book><chapter><sect1><para> 1.7202 +#: ../en/ch05-daily.xml:722 1.7203 +msgid "" 1.7204 +"Revision control systems are generally best at managing text files that are " 1.7205 +"written by humans, such as source code, where the files do not change much " 1.7206 +"from one revision to the next. Some centralized revision control systems can " 1.7207 +"also deal tolerably well with binary files, such as bitmap images." 1.7208 +msgstr "" 1.7209 + 1.7210 +#. type: Content of: <book><chapter><sect1><para> 1.7211 +#: ../en/ch05-daily.xml:728 1.7212 +msgid "" 1.7213 +"For instance, a game development team will typically manage both its source " 1.7214 +"code and all of its binary assets (e.g. geometry data, textures, map layouts) " 1.7215 +"in a revision control system." 1.7216 +msgstr "" 1.7217 + 1.7218 +#. type: Content of: <book><chapter><sect1><para> 1.7219 +#: ../en/ch05-daily.xml:733 1.7220 +msgid "" 1.7221 +"Because it is usually impossible to merge two conflicting modifications to a " 1.7222 +"binary file, centralized systems often provide a file locking mechanism that " 1.7223 +"allow a user to say <quote>I am the only person who can edit this file</" 1.7224 +"quote>." 1.7225 +msgstr "" 1.7226 + 1.7227 +#. type: Content of: <book><chapter><sect1><para> 1.7228 +#: ../en/ch05-daily.xml:739 1.7229 +msgid "" 1.7230 +"Compared to a centralized system, a distributed revision control system " 1.7231 +"changes some of the factors that guide decisions over which files to manage " 1.7232 +"and how." 1.7233 +msgstr "" 1.7234 + 1.7235 +#. type: Content of: <book><chapter><sect1><para> 1.7236 +#: ../en/ch05-daily.xml:743 1.7237 +msgid "" 1.7238 +"For instance, a distributed revision control system cannot, by its nature, " 1.7239 +"offer a file locking facility. There is thus no built-in mechanism to " 1.7240 +"prevent two people from making conflicting changes to a binary file. If you " 1.7241 +"have a team where several people may be editing binary files frequently, it " 1.7242 +"may not be a good idea to use Mercurial&emdash;or any other distributed " 1.7243 +"revision control system&emdash;to manage those files." 1.7244 +msgstr "" 1.7245 + 1.7246 +#. type: Content of: <book><chapter><sect1><para> 1.7247 +#: ../en/ch05-daily.xml:751 1.7248 +msgid "" 1.7249 +"When storing modifications to a file, Mercurial usually saves only the " 1.7250 +"differences between the previous and current versions of the file. For most " 1.7251 +"text files, this is extremely efficient. However, some files (particularly " 1.7252 +"binary files) are laid out in such a way that even a small change to a file's " 1.7253 +"logical content results in many or most of the bytes inside the file " 1.7254 +"changing. For instance, compressed files are particularly susceptible to " 1.7255 +"this. If the differences between each successive version of a file are always " 1.7256 +"large, Mercurial will not be able to store the file's revision history very " 1.7257 +"efficiently. This can affect both local storage needs and the amount of time " 1.7258 +"it takes to clone a repository." 1.7259 +msgstr "" 1.7260 + 1.7261 +#. type: Content of: <book><chapter><sect1><para> 1.7262 +#: ../en/ch05-daily.xml:764 1.7263 +msgid "" 1.7264 +"To get an idea of how this could affect you in practice, suppose you want to " 1.7265 +"use Mercurial to manage an OpenOffice document. OpenOffice stores documents " 1.7266 +"on disk as compressed zip files. Edit even a single letter of your document " 1.7267 +"in OpenOffice, and almost every byte in the entire file will change when you " 1.7268 +"save it. Now suppose that file is 2MB in size. Because most of the file " 1.7269 +"changes every time you save, Mercurial will have to store all 2MB of the file " 1.7270 +"every time you commit, even though from your perspective, perhaps only a few " 1.7271 +"words are changing each time. A single frequently-edited file that is not " 1.7272 +"friendly to Mercurial's storage assumptions can easily have an outsized " 1.7273 +"effect on the size of the repository." 1.7274 +msgstr "" 1.7275 + 1.7276 +#. type: Content of: <book><chapter><sect1><para> 1.7277 +#: ../en/ch05-daily.xml:777 1.7278 +msgid "" 1.7279 +"Even worse, if both you and someone else edit the OpenOffice document you're " 1.7280 +"working on, there is no useful way to merge your work. In fact, there isn't " 1.7281 +"even a good way to tell what the differences are between your respective " 1.7282 +"changes." 1.7283 +msgstr "" 1.7284 + 1.7285 +#. type: Content of: <book><chapter><sect1><para> 1.7286 +#: ../en/ch05-daily.xml:782 1.7287 +msgid "" 1.7288 +"There are thus a few clear recommendations about specific kinds of files to " 1.7289 +"be very careful with." 1.7290 +msgstr "" 1.7291 + 1.7292 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.7293 +#: ../en/ch05-daily.xml:787 1.7294 +msgid "" 1.7295 +"Files that are very large and incompressible, e.g. ISO CD-ROM images, will by " 1.7296 +"virtue of sheer size make clones over a network very slow." 1.7297 +msgstr "" 1.7298 + 1.7299 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.7300 +#: ../en/ch05-daily.xml:792 1.7301 +msgid "" 1.7302 +"Files that change a lot from one revision to the next may be expensive to " 1.7303 +"store if you edit them frequently, and conflicts due to concurrent edits may " 1.7304 +"be difficult to resolve." 1.7305 +msgstr "" 1.7306 + 1.7307 +#. type: Content of: <book><chapter><sect1><title> 1.7308 +#: ../en/ch05-daily.xml:801 1.7309 +#, fuzzy 1.7310 +msgid "Backups and mirroring" 1.7311 +msgstr "分支名称与合并" 1.7312 + 1.7313 +#. type: Content of: <book><chapter><sect1><para> 1.7314 +#: ../en/ch05-daily.xml:803 1.7315 +msgid "" 1.7316 +"Since Mercurial maintains a complete copy of history in each clone, everyone " 1.7317 +"who uses Mercurial to collaborate on a project can potentially act as a " 1.7318 +"source of backups in the event of a catastrophe. If a central repository " 1.7319 +"becomes unavailable, you can construct a replacement simply by cloning a copy " 1.7320 +"of the repository from one contributor, and pulling any changes they may not " 1.7321 +"have seen from others." 1.7322 +msgstr "" 1.7323 + 1.7324 +#. type: Content of: <book><chapter><sect1><para> 1.7325 +#: ../en/ch05-daily.xml:811 1.7326 +msgid "" 1.7327 +"It is simple to use Mercurial to perform off-site backups and remote " 1.7328 +"mirrors. Set up a periodic job (e.g. via the <command>cron</command> " 1.7329 +"command) on a remote server to pull changes from your master repositories " 1.7330 +"every hour. This will only be tricky in the unlikely case that the number of " 1.7331 +"master repositories you maintain changes frequently, in which case you'll " 1.7332 +"need to do a little scripting to refresh the list of repositories to back up." 1.7333 +msgstr "" 1.7334 + 1.7335 +#. type: Content of: <book><chapter><sect1><para> 1.7336 +#: ../en/ch05-daily.xml:820 1.7337 +msgid "" 1.7338 +"If you perform traditional backups of your master repositories to tape or " 1.7339 +"disk, and you want to back up a repository named <filename>myrepo</filename>, " 1.7340 +"use <command>hg clone -U myrepo myrepo.bak</command> to create a clone of " 1.7341 +"<filename>myrepo</filename> before you start your backups. The <option>-U</" 1.7342 +"option> option doesn't check out a working directory after the clone " 1.7343 +"completes, since that would be superfluous and make the backup take longer." 1.7344 +msgstr "" 1.7345 + 1.7346 +#. type: Content of: <book><chapter><sect1><para> 1.7347 +#: ../en/ch05-daily.xml:829 1.7348 +msgid "" 1.7349 +"If you then back up <filename>myrepo.bak</filename> instead of " 1.7350 +"<filename>myrepo</filename>, you will be guaranteed to have a consistent " 1.7351 +"snapshot of your repository that won't be pushed to by an insomniac developer " 1.7352 +"in mid-backup." 1.7353 +msgstr "" 1.7354 + 1.7355 #. type: Content of: <book><chapter><title> 1.7356 -#: ../en/ch05-collab.xml:5 1.7357 +#: ../en/ch06-collab.xml:5 1.7358 msgid "Collaborating with other people" 1.7359 msgstr "团体协作" 1.7360 1.7361 #. type: Content of: <book><chapter><para> 1.7362 -#: ../en/ch05-collab.xml:7 1.7363 +#: ../en/ch06-collab.xml:7 1.7364 msgid "" 1.7365 "As a completely decentralised tool, Mercurial doesn't impose any policy on " 1.7366 "how people ought to work with each other. However, if you're new to " 1.7367 @@ -5829,19 +7401,19 @@ 1.7368 msgstr "" 1.7369 1.7370 #. type: Content of: <book><chapter><sect1><title> 1.7371 -#: ../en/ch05-collab.xml:14 1.7372 +#: ../en/ch06-collab.xml:14 1.7373 msgid "Mercurial's web interface" 1.7374 msgstr "Mercurial 的 web 接口" 1.7375 1.7376 #. type: Content of: <book><chapter><sect1><para> 1.7377 -#: ../en/ch05-collab.xml:16 1.7378 +#: ../en/ch06-collab.xml:16 1.7379 msgid "" 1.7380 "Mercurial has a powerful web interface that provides several useful " 1.7381 "capabilities." 1.7382 msgstr "" 1.7383 1.7384 #. type: Content of: <book><chapter><sect1><para> 1.7385 -#: ../en/ch05-collab.xml:19 1.7386 +#: ../en/ch06-collab.xml:19 1.7387 msgid "" 1.7388 "For interactive use, the web interface lets you browse a single repository or " 1.7389 "a collection of repositories. You can view the history of a repository, " 1.7390 @@ -5851,7 +7423,7 @@ 1.7391 msgstr "" 1.7392 1.7393 #. type: Content of: <book><chapter><sect1><para> 1.7394 -#: ../en/ch05-collab.xml:26 1.7395 +#: ../en/ch06-collab.xml:26 1.7396 msgid "" 1.7397 "Also for human consumption, the web interface provides Atom and RSS feeds of " 1.7398 "the changes in a repository. This lets you <quote>subscribe</quote> to a " 1.7399 @@ -5863,7 +7435,7 @@ 1.7400 msgstr "" 1.7401 1.7402 #. type: Content of: <book><chapter><sect1><para> 1.7403 -#: ../en/ch05-collab.xml:36 1.7404 +#: ../en/ch06-collab.xml:36 1.7405 msgid "" 1.7406 "The web interface also lets remote users clone a repository, pull changes " 1.7407 "from it, and (when the server is configured to permit it) push changes back " 1.7408 @@ -5872,7 +7444,7 @@ 1.7409 msgstr "" 1.7410 1.7411 #. type: Content of: <book><chapter><sect1><para> 1.7412 -#: ../en/ch05-collab.xml:42 1.7413 +#: ../en/ch06-collab.xml:42 1.7414 msgid "" 1.7415 "The easiest way to get started with the web interface is to use your web " 1.7416 "browser to visit an existing repository, such as the master Mercurial " 1.7417 @@ -5881,14 +7453,14 @@ 1.7418 msgstr "" 1.7419 1.7420 #. type: Content of: <book><chapter><sect1><para> 1.7421 -#: ../en/ch05-collab.xml:47 1.7422 +#: ../en/ch06-collab.xml:47 1.7423 msgid "" 1.7424 "If you're interested in providing a web interface to your own repositories, " 1.7425 "there are several good ways to do this." 1.7426 msgstr "" 1.7427 1.7428 #. type: Content of: <book><chapter><sect1><para> 1.7429 -#: ../en/ch05-collab.xml:51 1.7430 +#: ../en/ch06-collab.xml:51 1.7431 msgid "" 1.7432 "The easiest and fastest way to get started in an informal environment is to " 1.7433 "use the <command role=\"hg-cmd\">hg serve</command> command, which is best " 1.7434 @@ -5897,22 +7469,18 @@ 1.7435 msgstr "" 1.7436 1.7437 #. type: Content of: <book><chapter><sect1><para> 1.7438 -#: ../en/ch05-collab.xml:58 1.7439 +#: ../en/ch06-collab.xml:58 1.7440 msgid "" 1.7441 "For longer-lived repositories that you'd like to have permanently available, " 1.7442 -"there are several public hosting services available." 1.7443 -msgstr "" 1.7444 - 1.7445 -#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.7446 -#: ../en/ch05-collab.xml:64 1.7447 -msgid "" 1.7448 -"Bitbucket, at <ulink url=\"http://bitbucket.org/\">http://bitbucket.org/</" 1.7449 -"ulink>, provides free hosting for open source projects, and paid hosting for " 1.7450 -"commercial projects." 1.7451 -msgstr "" 1.7452 - 1.7453 -#. type: Content of: <book><chapter><sect1><para> 1.7454 -#: ../en/ch05-collab.xml:71 1.7455 +"there are several public hosting services available. Some are free to open " 1.7456 +"source projects, while others offer paid commercial hosting. An up-to-date " 1.7457 +"list is available at <ulink url=\"http://www.selenic.com/mercurial/wiki/index." 1.7458 +"cgi/MercurialHosting\">http://www.selenic.com/mercurial/wiki/index.cgi/" 1.7459 +"MercurialHosting</ulink>." 1.7460 +msgstr "" 1.7461 + 1.7462 +#. type: Content of: <book><chapter><sect1><para> 1.7463 +#: ../en/ch06-collab.xml:65 1.7464 msgid "" 1.7465 "If you would prefer to host your own repositories, Mercurial has built-in " 1.7466 "support for several popular hosting technologies, most notably CGI (Common " 1.7467 @@ -5921,12 +7489,12 @@ 1.7468 msgstr "" 1.7469 1.7470 #. type: Content of: <book><chapter><sect1><title> 1.7471 -#: ../en/ch05-collab.xml:80 1.7472 +#: ../en/ch06-collab.xml:74 1.7473 msgid "Collaboration models" 1.7474 msgstr "协作模型" 1.7475 1.7476 #. type: Content of: <book><chapter><sect1><para> 1.7477 -#: ../en/ch05-collab.xml:82 1.7478 +#: ../en/ch06-collab.xml:76 1.7479 msgid "" 1.7480 "With a suitably flexible tool, making decisions about workflow is much more " 1.7481 "of a social engineering challenge than a technical one. Mercurial imposes few " 1.7482 @@ -5936,12 +7504,12 @@ 1.7483 msgstr "" 1.7484 1.7485 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7486 -#: ../en/ch05-collab.xml:90 1.7487 +#: ../en/ch06-collab.xml:84 1.7488 msgid "Factors to keep in mind" 1.7489 msgstr "要牢记的因素" 1.7490 1.7491 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7492 -#: ../en/ch05-collab.xml:92 1.7493 +#: ../en/ch06-collab.xml:86 1.7494 msgid "" 1.7495 "The most important aspect of any model that you must keep in mind is how well " 1.7496 "it matches the needs and capabilities of the people who will be using it. " 1.7497 @@ -5950,7 +7518,7 @@ 1.7498 msgstr "" 1.7499 1.7500 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7501 -#: ../en/ch05-collab.xml:98 1.7502 +#: ../en/ch06-collab.xml:92 1.7503 msgid "" 1.7504 "I once put together a workflow model that seemed to make perfect sense to me, " 1.7505 "but that caused a considerable amount of consternation and strife within my " 1.7506 @@ -5963,7 +7531,7 @@ 1.7507 msgstr "" 1.7508 1.7509 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7510 -#: ../en/ch05-collab.xml:108 1.7511 +#: ../en/ch06-collab.xml:102 1.7512 msgid "" 1.7513 "Don't sweep foreseeable social or technical problems under the rug. Whatever " 1.7514 "scheme you put into effect, you should plan for mistakes and problem " 1.7515 @@ -5977,12 +7545,12 @@ 1.7516 msgstr "" 1.7517 1.7518 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7519 -#: ../en/ch05-collab.xml:122 1.7520 +#: ../en/ch06-collab.xml:116 1.7521 msgid "Informal anarchy" 1.7522 msgstr "无政府状态" 1.7523 1.7524 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7525 -#: ../en/ch05-collab.xml:124 1.7526 +#: ../en/ch06-collab.xml:118 1.7527 msgid "" 1.7528 "I wouldn't suggest an <quote>anything goes</quote> approach as something " 1.7529 "sustainable, but it's a model that's easy to grasp, and it works perfectly " 1.7530 @@ -5990,7 +7558,7 @@ 1.7531 msgstr "" 1.7532 1.7533 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7534 -#: ../en/ch05-collab.xml:129 1.7535 +#: ../en/ch06-collab.xml:123 1.7536 msgid "" 1.7537 "As one example, many projects have a loose-knit group of collaborators who " 1.7538 "rarely physically meet each other. Some groups like to overcome the " 1.7539 @@ -6002,7 +7570,7 @@ 1.7540 msgstr "" 1.7541 1.7542 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7543 -#: ../en/ch05-collab.xml:138 1.7544 +#: ../en/ch06-collab.xml:132 1.7545 msgid "" 1.7546 "A sprint or a hacking session in a coffee shop are the perfect places to use " 1.7547 "the <command role=\"hg-cmd\">hg serve</command> command, since <command role=" 1.7548 @@ -6018,7 +7586,7 @@ 1.7549 msgstr "" 1.7550 1.7551 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7552 -#: ../en/ch05-collab.xml:152 1.7553 +#: ../en/ch06-collab.xml:146 1.7554 msgid "" 1.7555 "The charm, and the problem, with doing things in an ad hoc fashion like this " 1.7556 "is that only people who know about your changes, and where they are, can see " 1.7557 @@ -6028,12 +7596,12 @@ 1.7558 msgstr "" 1.7559 1.7560 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7561 -#: ../en/ch05-collab.xml:162 1.7562 +#: ../en/ch06-collab.xml:156 1.7563 msgid "A single central repository" 1.7564 msgstr "单一中央版本库" 1.7565 1.7566 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7567 -#: ../en/ch05-collab.xml:164 1.7568 +#: ../en/ch06-collab.xml:158 1.7569 msgid "" 1.7570 "For smaller projects migrating from a centralised revision control tool, " 1.7571 "perhaps the easiest way to get started is to have changes flow through a " 1.7572 @@ -6042,7 +7610,7 @@ 1.7573 msgstr "" 1.7574 1.7575 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7576 -#: ../en/ch05-collab.xml:170 1.7577 +#: ../en/ch06-collab.xml:164 1.7578 msgid "" 1.7579 "Contributors start by cloning a copy of this repository. They can pull " 1.7580 "changes from it whenever they need to, and some (perhaps all) developers have " 1.7581 @@ -6051,7 +7619,7 @@ 1.7582 msgstr "" 1.7583 1.7584 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7585 -#: ../en/ch05-collab.xml:175 1.7586 +#: ../en/ch06-collab.xml:169 1.7587 msgid "" 1.7588 "Under this model, it can still often make sense for people to pull changes " 1.7589 "directly from each other, without going through the central repository. " 1.7590 @@ -6064,7 +7632,7 @@ 1.7591 msgstr "" 1.7592 1.7593 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7594 -#: ../en/ch05-collab.xml:186 1.7595 +#: ../en/ch06-collab.xml:180 1.7596 msgid "" 1.7597 "If a team is hosting its own repository in this kind of scenario, people will " 1.7598 "usually use the <command>ssh</command> protocol to securely push changes to " 1.7599 @@ -6076,12 +7644,12 @@ 1.7600 msgstr "" 1.7601 1.7602 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7603 -#: ../en/ch05-collab.xml:199 1.7604 +#: ../en/ch06-collab.xml:193 1.7605 msgid "A hosted central repository" 1.7606 msgstr "托管的中央版本库" 1.7607 1.7608 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7609 -#: ../en/ch05-collab.xml:201 1.7610 +#: ../en/ch06-collab.xml:195 1.7611 msgid "" 1.7612 "A wonderful thing about public hosting services like <ulink url=\"http://" 1.7613 "bitbucket.org/\">Bitbucket</ulink> is that not only do they handle the fiddly " 1.7614 @@ -6091,7 +7659,7 @@ 1.7615 msgstr "" 1.7616 1.7617 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7618 -#: ../en/ch05-collab.xml:208 1.7619 +#: ../en/ch06-collab.xml:202 1.7620 msgid "" 1.7621 "For instance, a well-engineered hosting service will let people clone their " 1.7622 "own copies of a repository with a single click. This lets people work in " 1.7623 @@ -6099,7 +7667,7 @@ 1.7624 msgstr "" 1.7625 1.7626 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7627 -#: ../en/ch05-collab.xml:213 1.7628 +#: ../en/ch06-collab.xml:207 1.7629 msgid "" 1.7630 "In addition, a good hosting service will let people communicate with each " 1.7631 "other, for instance to say <quote>there are changes ready for you to review " 1.7632 @@ -6107,12 +7675,12 @@ 1.7633 msgstr "" 1.7634 1.7635 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7636 -#: ../en/ch05-collab.xml:220 1.7637 +#: ../en/ch06-collab.xml:214 1.7638 msgid "Working with multiple branches" 1.7639 msgstr "使用多个分支工作" 1.7640 1.7641 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7642 -#: ../en/ch05-collab.xml:222 1.7643 +#: ../en/ch06-collab.xml:216 1.7644 msgid "" 1.7645 "Projects of any significant size naturally tend to make progress on several " 1.7646 "fronts simultaneously. In the case of software, it's common for a project to " 1.7647 @@ -6126,7 +7694,7 @@ 1.7648 msgstr "" 1.7649 1.7650 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7651 -#: ../en/ch05-collab.xml:235 1.7652 +#: ../en/ch06-collab.xml:229 1.7653 msgid "" 1.7654 "Mercurial is particularly well suited to managing a number of simultaneous, " 1.7655 "but not identical, branches. Each <quote>development direction</quote> can " 1.7656 @@ -6137,19 +7705,19 @@ 1.7657 msgstr "" 1.7658 1.7659 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7660 -#: ../en/ch05-collab.xml:244 1.7661 +#: ../en/ch06-collab.xml:238 1.7662 msgid "" 1.7663 "Here's an example of how this can work in practice. Let's say you have one " 1.7664 "<quote>main branch</quote> on a central server." 1.7665 msgstr "" 1.7666 1.7667 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7668 -#: ../en/ch05-collab.xml:250 1.7669 +#: ../en/ch06-collab.xml:244 1.7670 msgid "People clone it, make changes locally, test them, and push them back." 1.7671 msgstr "" 1.7672 1.7673 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7674 -#: ../en/ch05-collab.xml:253 1.7675 +#: ../en/ch06-collab.xml:247 1.7676 msgid "" 1.7677 "Once the main branch reaches a release milestone, you can use the <command " 1.7678 "role=\"hg-cmd\">hg tag</command> command to give a permanent name to the " 1.7679 @@ -6157,12 +7725,12 @@ 1.7680 msgstr "" 1.7681 1.7682 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7683 -#: ../en/ch05-collab.xml:259 1.7684 +#: ../en/ch06-collab.xml:253 1.7685 msgid "Let's say some ongoing development occurs on the main branch." 1.7686 msgstr "" 1.7687 1.7688 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7689 -#: ../en/ch05-collab.xml:264 1.7690 +#: ../en/ch06-collab.xml:258 1.7691 msgid "" 1.7692 "Using the tag that was recorded at the milestone, people who clone that " 1.7693 "repository at any time in the future can use <command role=\"hg-cmd\">hg " 1.7694 @@ -6171,7 +7739,7 @@ 1.7695 msgstr "" 1.7696 1.7697 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7698 -#: ../en/ch05-collab.xml:272 1.7699 +#: ../en/ch06-collab.xml:266 1.7700 msgid "" 1.7701 "In addition, immediately after the main branch is tagged, we can then clone " 1.7702 "the main branch on the server to a new <quote>stable</quote> branch, also on " 1.7703 @@ -6179,7 +7747,7 @@ 1.7704 msgstr "" 1.7705 1.7706 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7707 -#: ../en/ch05-collab.xml:278 1.7708 +#: ../en/ch06-collab.xml:272 1.7709 msgid "" 1.7710 "If we need to make a change to the stable branch, we can then clone " 1.7711 "<emphasis>that</emphasis> repository, make our changes, commit, and push our " 1.7712 @@ -6187,7 +7755,7 @@ 1.7713 msgstr "" 1.7714 1.7715 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7716 -#: ../en/ch05-collab.xml:285 1.7717 +#: ../en/ch06-collab.xml:279 1.7718 msgid "" 1.7719 "Because Mercurial repositories are independent, and Mercurial doesn't move " 1.7720 "changes around automatically, the stable and main branches are " 1.7721 @@ -6197,7 +7765,7 @@ 1.7722 msgstr "" 1.7723 1.7724 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7725 -#: ../en/ch05-collab.xml:292 1.7726 +#: ../en/ch06-collab.xml:286 1.7727 msgid "" 1.7728 "We'll often want all of our bugfixes on the stable branch to show up on the " 1.7729 "main branch, too. Rather than rewrite a bugfix on the main branch, we can " 1.7730 @@ -6206,7 +7774,7 @@ 1.7731 msgstr "" 1.7732 1.7733 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7734 -#: ../en/ch05-collab.xml:300 1.7735 +#: ../en/ch06-collab.xml:294 1.7736 msgid "" 1.7737 "The main branch will still contain changes that are not on the stable branch, " 1.7738 "but it will also contain all of the bugfixes from the stable branch. The " 1.7739 @@ -6215,12 +7783,12 @@ 1.7740 msgstr "" 1.7741 1.7742 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.7743 -#: ../en/ch05-collab.xml:309 ../en/ch05-collab.xml:319 1.7744 +#: ../en/ch06-collab.xml:303 ../en/ch06-collab.xml:313 1.7745 msgid "Feature branches" 1.7746 msgstr "特性分支" 1.7747 1.7748 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7749 -#: ../en/ch05-collab.xml:311 1.7750 +#: ../en/ch06-collab.xml:305 1.7751 msgid "" 1.7752 "For larger projects, an effective way to manage change is to break up a team " 1.7753 "into smaller groups. Each group has a shared branch of its own, cloned from " 1.7754 @@ -6230,14 +7798,14 @@ 1.7755 msgstr "" 1.7756 1.7757 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.7758 -#: ../en/ch05-collab.xml:321 1.7759 +#: ../en/ch06-collab.xml:315 1.7760 msgid "" 1.7761 "<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/" 1.7762 "></imageobject>" 1.7763 msgstr "" 1.7764 1.7765 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7766 -#: ../en/ch05-collab.xml:326 1.7767 +#: ../en/ch06-collab.xml:320 1.7768 msgid "" 1.7769 "When a particular feature is deemed to be in suitable shape, someone on that " 1.7770 "feature team pulls and merges from the master branch into the feature branch, " 1.7771 @@ -6245,12 +7813,12 @@ 1.7772 msgstr "" 1.7773 1.7774 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7775 -#: ../en/ch05-collab.xml:333 1.7776 +#: ../en/ch06-collab.xml:327 1.7777 msgid "The release train" 1.7778 msgstr "发布列车" 1.7779 1.7780 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7781 -#: ../en/ch05-collab.xml:335 1.7782 +#: ../en/ch06-collab.xml:329 1.7783 msgid "" 1.7784 "Some projects are organized on a <quote>train</quote> basis: a release is " 1.7785 "scheduled to happen every few months, and whatever features are ready when " 1.7786 @@ -6258,7 +7826,7 @@ 1.7787 msgstr "" 1.7788 1.7789 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7790 -#: ../en/ch05-collab.xml:340 1.7791 +#: ../en/ch06-collab.xml:334 1.7792 msgid "" 1.7793 "This model resembles working with feature branches. The difference is that " 1.7794 "when a feature branch misses a train, someone on the feature team pulls and " 1.7795 @@ -6268,12 +7836,12 @@ 1.7796 msgstr "" 1.7797 1.7798 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7799 -#: ../en/ch05-collab.xml:349 1.7800 +#: ../en/ch06-collab.xml:343 1.7801 msgid "The Linux kernel model" 1.7802 msgstr "Linux 内核模型" 1.7803 1.7804 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7805 -#: ../en/ch05-collab.xml:351 1.7806 +#: ../en/ch06-collab.xml:345 1.7807 msgid "" 1.7808 "The development of the Linux kernel has a shallow hierarchical structure, " 1.7809 "surrounded by a cloud of apparent chaos. Because most Linux developers use " 1.7810 @@ -6283,7 +7851,7 @@ 1.7811 msgstr "" 1.7812 1.7813 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7814 -#: ../en/ch05-collab.xml:359 1.7815 +#: ../en/ch06-collab.xml:353 1.7816 msgid "" 1.7817 "At the center of the community sits Linus Torvalds, the creator of Linux. He " 1.7818 "publishes a single source repository that is considered the " 1.7819 @@ -6293,7 +7861,7 @@ 1.7820 msgstr "" 1.7821 1.7822 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7823 -#: ../en/ch05-collab.xml:366 1.7824 +#: ../en/ch06-collab.xml:360 1.7825 msgid "" 1.7826 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, " 1.7827 "he pulls whatever changes they publish, in most cases without even reviewing " 1.7828 @@ -6307,7 +7875,7 @@ 1.7829 msgstr "" 1.7830 1.7831 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7832 -#: ../en/ch05-collab.xml:378 1.7833 +#: ../en/ch06-collab.xml:372 1.7834 msgid "" 1.7835 "Individual lieutenants have their own approaches to reviewing, accepting, and " 1.7836 "publishing changes; and for deciding when to feed them to Linus. In " 1.7837 @@ -6320,7 +7888,7 @@ 1.7838 msgstr "" 1.7839 1.7840 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7841 -#: ../en/ch05-collab.xml:389 1.7842 +#: ../en/ch06-collab.xml:383 1.7843 msgid "" 1.7844 "This model has two notable features. The first is that it's <quote>pull " 1.7845 "only</quote>. You have to ask, convince, or beg another developer to take a " 1.7846 @@ -6330,7 +7898,7 @@ 1.7847 msgstr "" 1.7848 1.7849 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7850 -#: ../en/ch05-collab.xml:396 1.7851 +#: ../en/ch06-collab.xml:390 1.7852 msgid "" 1.7853 "The second is that it's based on reputation and acclaim. If you're an " 1.7854 "unknown, Linus will probably ignore changes from you without even " 1.7855 @@ -6344,7 +7912,7 @@ 1.7856 msgstr "" 1.7857 1.7858 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7859 -#: ../en/ch05-collab.xml:407 1.7860 +#: ../en/ch06-collab.xml:401 1.7861 msgid "" 1.7862 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" 1.7863 "quote> boundaries. If you're a respected but specialised storage hacker, and " 1.7864 @@ -6353,7 +7921,7 @@ 1.7865 msgstr "" 1.7866 1.7867 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7868 -#: ../en/ch05-collab.xml:414 1.7869 +#: ../en/ch06-collab.xml:408 1.7870 msgid "" 1.7871 "To people who come from more orderly project backgrounds, the comparatively " 1.7872 "chaotic Linux kernel development process often seems completely insane. It's " 1.7873 @@ -6363,12 +7931,12 @@ 1.7874 msgstr "" 1.7875 1.7876 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7877 -#: ../en/ch05-collab.xml:424 1.7878 +#: ../en/ch06-collab.xml:418 1.7879 msgid "Pull-only versus shared-push collaboration" 1.7880 msgstr "只读与共享写协作" 1.7881 1.7882 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7883 -#: ../en/ch05-collab.xml:426 1.7884 +#: ../en/ch06-collab.xml:420 1.7885 msgid "" 1.7886 "A perpetual source of heat in the open source community is whether a " 1.7887 "development model in which people only ever pull changes from others is " 1.7888 @@ -6377,7 +7945,7 @@ 1.7889 msgstr "" 1.7890 1.7891 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7892 -#: ../en/ch05-collab.xml:432 1.7893 +#: ../en/ch06-collab.xml:426 1.7894 msgid "" 1.7895 "Typically, the backers of the shared-push model use tools that actively " 1.7896 "enforce this approach. If you're using a centralised revision control tool " 1.7897 @@ -6388,7 +7956,7 @@ 1.7898 msgstr "" 1.7899 1.7900 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7901 -#: ../en/ch05-collab.xml:440 1.7902 +#: ../en/ch06-collab.xml:434 1.7903 msgid "" 1.7904 "A good distributed revision control tool will support both models. You and " 1.7905 "your collaborators can then structure how you work together based on your own " 1.7906 @@ -6396,12 +7964,12 @@ 1.7907 msgstr "" 1.7908 1.7909 #. type: Content of: <book><chapter><sect1><sect2><title> 1.7910 -#: ../en/ch05-collab.xml:447 1.7911 +#: ../en/ch06-collab.xml:441 1.7912 msgid "Where collaboration meets branch management" 1.7913 msgstr "协作与分支管理" 1.7914 1.7915 #. type: Content of: <book><chapter><sect1><sect2><para> 1.7916 -#: ../en/ch05-collab.xml:449 1.7917 +#: ../en/ch06-collab.xml:443 1.7918 msgid "" 1.7919 "Once you and your team set up some shared repositories and start propagating " 1.7920 "changes back and forth between local and shared repos, you begin to face a " 1.7921 @@ -6412,24 +7980,24 @@ 1.7922 msgstr "" 1.7923 1.7924 #. type: Content of: <book><chapter><sect1><title> 1.7925 -#: ../en/ch05-collab.xml:461 1.7926 +#: ../en/ch06-collab.xml:455 1.7927 msgid "The technical side of sharing" 1.7928 msgstr "共享的技术因素" 1.7929 1.7930 #. type: Content of: <book><chapter><sect1><para> 1.7931 -#: ../en/ch05-collab.xml:463 1.7932 +#: ../en/ch06-collab.xml:457 1.7933 msgid "" 1.7934 "The remainder of this chapter is devoted to the question of sharing changes " 1.7935 "with your collaborators." 1.7936 msgstr "" 1.7937 1.7938 #. type: Content of: <book><chapter><sect1><title> 1.7939 -#: ../en/ch05-collab.xml:468 1.7940 +#: ../en/ch06-collab.xml:462 1.7941 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>" 1.7942 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享" 1.7943 1.7944 #. type: Content of: <book><chapter><sect1><para> 1.7945 -#: ../en/ch05-collab.xml:471 1.7946 +#: ../en/ch06-collab.xml:465 1.7947 msgid "" 1.7948 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " 1.7949 "wonderfully suited to small, tight-knit, and fast-paced group environments. " 1.7950 @@ -6438,7 +8006,7 @@ 1.7951 msgstr "" 1.7952 1.7953 #. type: Content of: <book><chapter><sect1><para> 1.7954 -#: ../en/ch05-collab.xml:476 1.7955 +#: ../en/ch06-collab.xml:470 1.7956 msgid "" 1.7957 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in " 1.7958 "under a second it will bring up a specialised HTTP server; this will accept " 1.7959 @@ -6451,21 +8019,21 @@ 1.7960 msgstr "" 1.7961 1.7962 #. type: Content of: <book><chapter><sect1><para> 1.7963 -#: ../en/ch05-collab.xml:487 1.7964 +#: ../en/ch06-collab.xml:481 1.7965 msgid "" 1.7966 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</" 1.7967 "emphasis> a general-purpose web server. It can do only two things:" 1.7968 msgstr "" 1.7969 1.7970 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.7971 -#: ../en/ch05-collab.xml:491 1.7972 +#: ../en/ch06-collab.xml:485 1.7973 msgid "" 1.7974 "Allow people to browse the history of the repository it's serving, from their " 1.7975 "normal web browsers." 1.7976 msgstr "" 1.7977 1.7978 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.7979 -#: ../en/ch05-collab.xml:495 1.7980 +#: ../en/ch06-collab.xml:489 1.7981 msgid "" 1.7982 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd" 1.7983 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes " 1.7984 @@ -6473,7 +8041,7 @@ 1.7985 msgstr "" 1.7986 1.7987 #. type: Content of: <book><chapter><sect1><para> 1.7988 -#: ../en/ch05-collab.xml:500 1.7989 +#: ../en/ch06-collab.xml:494 1.7990 msgid "" 1.7991 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote " 1.7992 "users to <emphasis>modify</emphasis> your repository. It's intended for read-" 1.7993 @@ -6481,7 +8049,7 @@ 1.7994 msgstr "" 1.7995 1.7996 #. type: Content of: <book><chapter><sect1><para> 1.7997 -#: ../en/ch05-collab.xml:504 1.7998 +#: ../en/ch06-collab.xml:498 1.7999 msgid "" 1.8000 "If you're getting started with Mercurial, there's nothing to prevent you from " 1.8001 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on " 1.8002 @@ -6492,12 +8060,12 @@ 1.8003 msgstr "" 1.8004 1.8005 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8006 -#: ../en/ch05-collab.xml:514 1.8007 +#: ../en/ch06-collab.xml:508 1.8008 msgid "A few things to keep in mind" 1.8009 msgstr "要牢记的几件事" 1.8010 1.8011 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8012 -#: ../en/ch05-collab.xml:516 1.8013 +#: ../en/ch06-collab.xml:510 1.8014 msgid "" 1.8015 "Because it provides unauthenticated read access to all clients, you should " 1.8016 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where " 1.8017 @@ -6506,7 +8074,7 @@ 1.8018 msgstr "" 1.8019 1.8020 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8021 -#: ../en/ch05-collab.xml:522 1.8022 +#: ../en/ch06-collab.xml:516 1.8023 msgid "" 1.8024 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about " 1.8025 "any firewall software you might have installed on your system or network. It " 1.8026 @@ -6517,7 +8085,7 @@ 1.8027 msgstr "" 1.8028 1.8029 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8030 -#: ../en/ch05-collab.xml:531 1.8031 +#: ../en/ch06-collab.xml:525 1.8032 msgid "" 1.8033 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming " 1.8034 "connections on port 8000. If another process is already listening on the " 1.8035 @@ -6526,7 +8094,7 @@ 1.8036 msgstr "" 1.8037 1.8038 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8039 -#: ../en/ch05-collab.xml:537 1.8040 +#: ../en/ch06-collab.xml:531 1.8041 msgid "" 1.8042 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints " 1.8043 "no output, which can be a bit unnerving. If you'd like to confirm that it is " 1.8044 @@ -6536,12 +8104,12 @@ 1.8045 msgstr "" 1.8046 1.8047 #. type: Content of: <book><chapter><sect1><title> 1.8048 -#: ../en/ch05-collab.xml:547 1.8049 +#: ../en/ch06-collab.xml:541 1.8050 msgid "Using the Secure Shell (ssh) protocol" 1.8051 msgstr "使用 ssh 协议" 1.8052 1.8053 #. type: Content of: <book><chapter><sect1><para> 1.8054 -#: ../en/ch05-collab.xml:549 1.8055 +#: ../en/ch06-collab.xml:543 1.8056 msgid "" 1.8057 "You can pull and push changes securely over a network connection using the " 1.8058 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " 1.8059 @@ -6550,7 +8118,7 @@ 1.8060 msgstr "" 1.8061 1.8062 #. type: Content of: <book><chapter><sect1><para> 1.8063 -#: ../en/ch05-collab.xml:554 1.8064 +#: ../en/ch06-collab.xml:548 1.8065 msgid "" 1.8066 "If you're not familiar with ssh, it's the name of both a command and a " 1.8067 "network protocol that let you securely communicate with another computer. To " 1.8068 @@ -6559,31 +8127,31 @@ 1.8069 msgstr "" 1.8070 1.8071 #. type: Content of: <book><chapter><sect1><para> 1.8072 -#: ../en/ch05-collab.xml:560 1.8073 +#: ../en/ch06-collab.xml:554 1.8074 msgid "" 1.8075 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some " 1.8076 "of the material that follows to be elementary in nature.)" 1.8077 msgstr "" 1.8078 1.8079 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8080 -#: ../en/ch05-collab.xml:565 1.8081 +#: ../en/ch06-collab.xml:559 1.8082 msgid "How to read and write ssh URLs" 1.8083 msgstr "如何读写 ssh 路径" 1.8084 1.8085 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8086 -#: ../en/ch05-collab.xml:567 1.8087 +#: ../en/ch06-collab.xml:561 1.8088 msgid "An ssh URL tends to look like this:" 1.8089 msgstr "" 1.8090 1.8091 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8092 -#: ../en/ch05-collab.xml:570 1.8093 +#: ../en/ch06-collab.xml:564 1.8094 msgid "" 1.8095 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the " 1.8096 "ssh protocol." 1.8097 msgstr "" 1.8098 1.8099 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8100 -#: ../en/ch05-collab.xml:573 1.8101 +#: ../en/ch06-collab.xml:567 1.8102 msgid "" 1.8103 "The <quote><literal>bos@</literal></quote> component indicates what username " 1.8104 "to log into the server as. You can leave this out if the remote username is " 1.8105 @@ -6591,14 +8159,14 @@ 1.8106 msgstr "" 1.8107 1.8108 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8109 -#: ../en/ch05-collab.xml:578 1.8110 +#: ../en/ch06-collab.xml:572 1.8111 msgid "" 1.8112 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of " 1.8113 "the server to log into." 1.8114 msgstr "" 1.8115 1.8116 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8117 -#: ../en/ch05-collab.xml:582 1.8118 +#: ../en/ch06-collab.xml:576 1.8119 msgid "" 1.8120 "The <quote>:22</quote> identifies the port number to connect to the server " 1.8121 "on. The default port is 22, so you only need to specify a colon and port " 1.8122 @@ -6606,13 +8174,13 @@ 1.8123 msgstr "" 1.8124 1.8125 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8126 -#: ../en/ch05-collab.xml:587 1.8127 +#: ../en/ch06-collab.xml:581 1.8128 msgid "" 1.8129 "The remainder of the URL is the local path to the repository on the server." 1.8130 msgstr "" 1.8131 1.8132 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8133 -#: ../en/ch05-collab.xml:591 1.8134 +#: ../en/ch06-collab.xml:585 1.8135 msgid "" 1.8136 "There's plenty of scope for confusion with the path component of ssh URLs, as " 1.8137 "there is no standard way for tools to interpret it. Some programs behave " 1.8138 @@ -6622,7 +8190,7 @@ 1.8139 msgstr "" 1.8140 1.8141 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8142 -#: ../en/ch05-collab.xml:598 1.8143 +#: ../en/ch06-collab.xml:592 1.8144 msgid "" 1.8145 "Mercurial treats the path to a repository on the server as relative to the " 1.8146 "remote user's home directory. For example, if user <literal>foo</literal> on " 1.8147 @@ -6633,7 +8201,7 @@ 1.8148 msgstr "" 1.8149 1.8150 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8151 -#: ../en/ch05-collab.xml:607 1.8152 +#: ../en/ch06-collab.xml:601 1.8153 msgid "" 1.8154 "If you want to specify a path relative to another user's home directory, you " 1.8155 "can use a path that starts with a tilde character followed by the user's name " 1.8156 @@ -6641,19 +8209,19 @@ 1.8157 msgstr "" 1.8158 1.8159 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8160 -#: ../en/ch05-collab.xml:613 1.8161 +#: ../en/ch06-collab.xml:607 1.8162 msgid "" 1.8163 "And if you really want to specify an <emphasis>absolute</emphasis> path on " 1.8164 "the server, begin the path component with two slashes, as in this example." 1.8165 msgstr "" 1.8166 1.8167 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8168 -#: ../en/ch05-collab.xml:620 1.8169 +#: ../en/ch06-collab.xml:614 1.8170 msgid "Finding an ssh client for your system" 1.8171 msgstr "为你的系统寻找 ssh 客户端" 1.8172 1.8173 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8174 -#: ../en/ch05-collab.xml:622 1.8175 +#: ../en/ch06-collab.xml:616 1.8176 msgid "" 1.8177 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're " 1.8178 "using such a system, run <literal>which ssh</literal> to find out if the " 1.8179 @@ -6664,7 +8232,7 @@ 1.8180 msgstr "" 1.8181 1.8182 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8183 -#: ../en/ch05-collab.xml:630 1.8184 +#: ../en/ch06-collab.xml:624 1.8185 msgid "" 1.8186 "On Windows, the TortoiseHg package is bundled with a version of Simon " 1.8187 "Tatham's excellent <command>plink</command> command, and you should not need " 1.8188 @@ -6672,24 +8240,24 @@ 1.8189 msgstr "" 1.8190 1.8191 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8192 -#: ../en/ch05-collab.xml:637 1.8193 +#: ../en/ch06-collab.xml:631 1.8194 msgid "Generating a key pair" 1.8195 msgstr "产生密钥对" 1.8196 1.8197 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8198 -#: ../en/ch05-collab.xml:639 1.8199 +#: ../en/ch06-collab.xml:633 1.8200 msgid "" 1.8201 "To avoid the need to repetitively type a password every time you need to use " 1.8202 "your ssh client, I recommend generating a key pair." 1.8203 msgstr "" 1.8204 1.8205 #. type: Content of: <book><chapter><sect1><sect2><tip><title> 1.8206 -#: ../en/ch05-collab.xml:644 1.8207 +#: ../en/ch06-collab.xml:638 1.8208 msgid "Key pairs are not mandatory" 1.8209 msgstr "" 1.8210 1.8211 #. type: Content of: <book><chapter><sect1><sect2><tip><para> 1.8212 -#: ../en/ch05-collab.xml:646 1.8213 +#: ../en/ch06-collab.xml:640 1.8214 msgid "" 1.8215 "Mercurial knows nothing about ssh authentication or key pairs. You can, if " 1.8216 "you like, safely ignore this section and the one that follows until you grow " 1.8217 @@ -6697,14 +8265,14 @@ 1.8218 msgstr "" 1.8219 1.8220 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8221 -#: ../en/ch05-collab.xml:654 1.8222 +#: ../en/ch06-collab.xml:648 1.8223 msgid "" 1.8224 "On a Unix-like system, the <command>ssh-keygen</command> command will do the " 1.8225 "trick." 1.8226 msgstr "" 1.8227 1.8228 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8229 -#: ../en/ch05-collab.xml:657 1.8230 +#: ../en/ch06-collab.xml:651 1.8231 msgid "" 1.8232 "On Windows, if you're using TortoiseHg, you may need to download a command " 1.8233 "named <command>puttygen</command> from <ulink url=\"http://www.chiark." 1.8234 @@ -6715,7 +8283,7 @@ 1.8235 msgstr "" 1.8236 1.8237 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8238 -#: ../en/ch05-collab.xml:669 1.8239 +#: ../en/ch06-collab.xml:663 1.8240 msgid "" 1.8241 "When you generate a key pair, it's usually <emphasis>highly</emphasis> " 1.8242 "advisable to protect it with a passphrase. (The only time that you might not " 1.8243 @@ -6724,7 +8292,7 @@ 1.8244 msgstr "" 1.8245 1.8246 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8247 -#: ../en/ch05-collab.xml:675 1.8248 +#: ../en/ch06-collab.xml:669 1.8249 msgid "" 1.8250 "Simply generating a key pair isn't enough, however. You'll need to add the " 1.8251 "public key to the set of authorised keys for whatever user you're logging in " 1.8252 @@ -6735,7 +8303,7 @@ 1.8253 msgstr "" 1.8254 1.8255 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8256 -#: ../en/ch05-collab.xml:684 1.8257 +#: ../en/ch06-collab.xml:678 1.8258 msgid "" 1.8259 "On a Unix-like system, your public key will have a <filename>.pub</filename> " 1.8260 "extension. If you're using <command>puttygen</command> on Windows, you can " 1.8261 @@ -6745,12 +8313,12 @@ 1.8262 msgstr "" 1.8263 1.8264 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8265 -#: ../en/ch05-collab.xml:692 1.8266 +#: ../en/ch06-collab.xml:686 1.8267 msgid "Using an authentication agent" 1.8268 msgstr "使用认证代理" 1.8269 1.8270 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8271 -#: ../en/ch05-collab.xml:694 1.8272 +#: ../en/ch06-collab.xml:688 1.8273 msgid "" 1.8274 "An authentication agent is a daemon that stores passphrases in memory (so it " 1.8275 "will forget passphrases if you log out and log back in again). An ssh client " 1.8276 @@ -6762,7 +8330,7 @@ 1.8277 msgstr "" 1.8278 1.8279 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8280 -#: ../en/ch05-collab.xml:703 1.8281 +#: ../en/ch06-collab.xml:697 1.8282 msgid "" 1.8283 "The downside of storing passphrases in an agent is that it's possible for a " 1.8284 "well-prepared attacker to recover the plain text of your passphrases, in some " 1.8285 @@ -6772,7 +8340,7 @@ 1.8286 msgstr "" 1.8287 1.8288 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8289 -#: ../en/ch05-collab.xml:712 1.8290 +#: ../en/ch06-collab.xml:706 1.8291 msgid "" 1.8292 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and " 1.8293 "it's often run automatically for you when you log in. You'll need to use the " 1.8294 @@ -6780,7 +8348,7 @@ 1.8295 msgstr "" 1.8296 1.8297 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8298 -#: ../en/ch05-collab.xml:719 1.8299 +#: ../en/ch06-collab.xml:713 1.8300 msgid "" 1.8301 "On Windows, if you're using TortoiseHg, the <command>pageant</command> " 1.8302 "command acts as the agent. As with <command>puttygen</command>, you'll need " 1.8303 @@ -6793,12 +8361,12 @@ 1.8304 msgstr "" 1.8305 1.8306 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8307 -#: ../en/ch05-collab.xml:734 1.8308 +#: ../en/ch06-collab.xml:728 1.8309 msgid "Configuring the server side properly" 1.8310 msgstr "正确配置服务器端" 1.8311 1.8312 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8313 -#: ../en/ch05-collab.xml:736 1.8314 +#: ../en/ch06-collab.xml:730 1.8315 msgid "" 1.8316 "Because ssh can be fiddly to set up if you're new to it, a variety of things " 1.8317 "can go wrong. Add Mercurial on top, and there's plenty more scope for head-" 1.8318 @@ -6808,7 +8376,7 @@ 1.8319 msgstr "" 1.8320 1.8321 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8322 -#: ../en/ch05-collab.xml:744 1.8323 +#: ../en/ch06-collab.xml:738 1.8324 msgid "" 1.8325 "Before you try using Mercurial to talk to an ssh server, it's best to make " 1.8326 "sure that you can use the normal <command>ssh</command> or <command>putty</" 1.8327 @@ -6821,7 +8389,7 @@ 1.8328 msgstr "" 1.8329 1.8330 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8331 -#: ../en/ch05-collab.xml:755 1.8332 +#: ../en/ch06-collab.xml:749 1.8333 msgid "" 1.8334 "The first thing to be sure of on the server side is that you can actually log " 1.8335 "in from another machine at all. If you can't use <command>ssh</command> or " 1.8336 @@ -6830,7 +8398,7 @@ 1.8337 msgstr "" 1.8338 1.8339 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8340 -#: ../en/ch05-collab.xml:762 1.8341 +#: ../en/ch06-collab.xml:756 1.8342 msgid "" 1.8343 "If you get a <quote>connection refused</quote> error, either there isn't an " 1.8344 "SSH daemon running on the server at all, or it's inaccessible due to firewall " 1.8345 @@ -6838,7 +8406,7 @@ 1.8346 msgstr "" 1.8347 1.8348 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8349 -#: ../en/ch05-collab.xml:767 1.8350 +#: ../en/ch06-collab.xml:761 1.8351 msgid "" 1.8352 "If you get a <quote>no route to host</quote> error, you either have an " 1.8353 "incorrect address for the server or a seriously locked down firewall that " 1.8354 @@ -6846,7 +8414,7 @@ 1.8355 msgstr "" 1.8356 1.8357 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8358 -#: ../en/ch05-collab.xml:772 1.8359 +#: ../en/ch06-collab.xml:766 1.8360 msgid "" 1.8361 "If you get a <quote>permission denied</quote> error, you may have mistyped " 1.8362 "the username on the server, or you could have mistyped your key's passphrase " 1.8363 @@ -6854,7 +8422,7 @@ 1.8364 msgstr "" 1.8365 1.8366 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8367 -#: ../en/ch05-collab.xml:777 1.8368 +#: ../en/ch06-collab.xml:771 1.8369 msgid "" 1.8370 "In summary, if you're having trouble talking to the server's ssh daemon, " 1.8371 "first make sure that one is running at all. On many systems it will be " 1.8372 @@ -6866,7 +8434,7 @@ 1.8373 msgstr "" 1.8374 1.8375 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8376 -#: ../en/ch05-collab.xml:787 1.8377 +#: ../en/ch06-collab.xml:781 1.8378 msgid "" 1.8379 "If you're using an authentication agent on the client side to store " 1.8380 "passphrases for your keys, you ought to be able to log into the server " 1.8381 @@ -6875,26 +8443,26 @@ 1.8382 msgstr "" 1.8383 1.8384 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8385 -#: ../en/ch05-collab.xml:793 1.8386 +#: ../en/ch06-collab.xml:787 1.8387 msgid "" 1.8388 "You might have forgotten to use <command>ssh-add</command> or " 1.8389 "<command>pageant</command> to store the passphrase." 1.8390 msgstr "" 1.8391 1.8392 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8393 -#: ../en/ch05-collab.xml:797 1.8394 +#: ../en/ch06-collab.xml:791 1.8395 msgid "You might have stored the passphrase for the wrong key." 1.8396 msgstr "" 1.8397 1.8398 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8399 -#: ../en/ch05-collab.xml:800 1.8400 +#: ../en/ch06-collab.xml:794 1.8401 msgid "" 1.8402 "If you're being prompted for the remote user's password, there are another " 1.8403 "few possible problems to check." 1.8404 msgstr "" 1.8405 1.8406 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8407 -#: ../en/ch05-collab.xml:803 1.8408 +#: ../en/ch06-collab.xml:797 1.8409 msgid "" 1.8410 "Either the user's home directory or their <filename role=\"special\" class=" 1.8411 "\"directory\">.ssh</filename> directory might have excessively liberal " 1.8412 @@ -6905,7 +8473,7 @@ 1.8413 msgstr "" 1.8414 1.8415 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8416 -#: ../en/ch05-collab.xml:812 1.8417 +#: ../en/ch06-collab.xml:806 1.8418 msgid "" 1.8419 "The user's <filename role=\"special\">authorized_keys</filename> file may " 1.8420 "have a problem. If anyone other than the user owns or can write to that file, " 1.8421 @@ -6913,7 +8481,7 @@ 1.8422 msgstr "" 1.8423 1.8424 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8425 -#: ../en/ch05-collab.xml:819 1.8426 +#: ../en/ch06-collab.xml:813 1.8427 msgid "" 1.8428 "In the ideal world, you should be able to run the following command " 1.8429 "successfully, and it should print exactly one line of output, the current " 1.8430 @@ -6921,14 +8489,14 @@ 1.8431 msgstr "" 1.8432 1.8433 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8434 -#: ../en/ch05-collab.xml:824 1.8435 +#: ../en/ch06-collab.xml:818 1.8436 msgid "" 1.8437 "If, on your server, you have login scripts that print banners or other junk " 1.8438 "even when running non-interactive commands like this, you should fix them " 1.8439 "before you continue, so that they only print output if they're run " 1.8440 "interactively. Otherwise these banners will at least clutter up Mercurial's " 1.8441 "output. Worse, they could potentially cause problems with running Mercurial " 1.8442 -"commands remotely. Mercurial makes tries to detect and ignore banners in non-" 1.8443 +"commands remotely. Mercurial tries to detect and ignore banners in non-" 1.8444 "interactive <command>ssh</command> sessions, but it is not foolproof. (If " 1.8445 "you're editing your login scripts on your server, the usual way to see if a " 1.8446 "login script is running in an interactive shell is to check the return code " 1.8447 @@ -6936,7 +8504,7 @@ 1.8448 msgstr "" 1.8449 1.8450 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8451 -#: ../en/ch05-collab.xml:838 1.8452 +#: ../en/ch06-collab.xml:832 1.8453 msgid "" 1.8454 "Once you've verified that plain old ssh is working with your server, the next " 1.8455 "step is to ensure that Mercurial runs on the server. The following command " 1.8456 @@ -6944,7 +8512,7 @@ 1.8457 msgstr "" 1.8458 1.8459 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8460 -#: ../en/ch05-collab.xml:845 1.8461 +#: ../en/ch06-collab.xml:839 1.8462 msgid "" 1.8463 "If you see an error message instead of normal <command role=\"hg-cmd\">hg " 1.8464 "version</command> output, this is usually because you haven't installed " 1.8465 @@ -6954,21 +8522,21 @@ 1.8466 msgstr "" 1.8467 1.8468 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8469 -#: ../en/ch05-collab.xml:852 1.8470 +#: ../en/ch06-collab.xml:846 1.8471 msgid "" 1.8472 "Is Mercurial really installed on the server at all? I know this sounds " 1.8473 "trivial, but it's worth checking!" 1.8474 msgstr "" 1.8475 1.8476 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8477 -#: ../en/ch05-collab.xml:856 1.8478 +#: ../en/ch06-collab.xml:850 1.8479 msgid "" 1.8480 "Maybe your shell's search path (usually set via the <envar>PATH</envar> " 1.8481 "environment variable) is simply misconfigured." 1.8482 msgstr "" 1.8483 1.8484 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8485 -#: ../en/ch05-collab.xml:860 1.8486 +#: ../en/ch06-collab.xml:854 1.8487 msgid "" 1.8488 "Perhaps your <envar>PATH</envar> environment variable is only being set to " 1.8489 "point to the location of the <command>hg</command> executable if the login " 1.8490 @@ -6977,7 +8545,7 @@ 1.8491 msgstr "" 1.8492 1.8493 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.8494 -#: ../en/ch05-collab.xml:867 1.8495 +#: ../en/ch06-collab.xml:861 1.8496 msgid "" 1.8497 "The <envar>PYTHONPATH</envar> environment variable may need to contain the " 1.8498 "path to the Mercurial Python modules. It might not be set at all; it could " 1.8499 @@ -6985,7 +8553,7 @@ 1.8500 msgstr "" 1.8501 1.8502 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8503 -#: ../en/ch05-collab.xml:874 1.8504 +#: ../en/ch06-collab.xml:868 1.8505 msgid "" 1.8506 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh " 1.8507 "connection, well done! You've got the server and client sorted out. You " 1.8508 @@ -6996,12 +8564,12 @@ 1.8509 msgstr "" 1.8510 1.8511 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8512 -#: ../en/ch05-collab.xml:883 1.8513 +#: ../en/ch06-collab.xml:877 1.8514 msgid "Using compression with ssh" 1.8515 msgstr "通过 ssh 使用压缩" 1.8516 1.8517 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8518 -#: ../en/ch05-collab.xml:885 1.8519 +#: ../en/ch06-collab.xml:879 1.8520 msgid "" 1.8521 "Mercurial does not compress data when it uses the ssh protocol, because the " 1.8522 "ssh protocol can transparently compress data. However, the default behavior " 1.8523 @@ -7009,7 +8577,7 @@ 1.8524 msgstr "" 1.8525 1.8526 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8527 -#: ../en/ch05-collab.xml:890 1.8528 +#: ../en/ch06-collab.xml:884 1.8529 msgid "" 1.8530 "Over any network other than a fast LAN (even a wireless network), using " 1.8531 "compression is likely to significantly speed up Mercurial's network " 1.8532 @@ -7019,7 +8587,7 @@ 1.8533 msgstr "" 1.8534 1.8535 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8536 -#: ../en/ch05-collab.xml:897 1.8537 +#: ../en/ch06-collab.xml:891 1.8538 msgid "" 1.8539 "Both <command>ssh</command> and <command>plink</command> accept a <option " 1.8540 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can " 1.8541 @@ -7029,7 +8597,7 @@ 1.8542 msgstr "" 1.8543 1.8544 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8545 -#: ../en/ch05-collab.xml:907 1.8546 +#: ../en/ch06-collab.xml:901 1.8547 msgid "" 1.8548 "If you use <command>ssh</command> on a Unix-like system, you can configure it " 1.8549 "to always use compression when talking to your server. To do this, edit your " 1.8550 @@ -7038,7 +8606,7 @@ 1.8551 msgstr "" 1.8552 1.8553 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8554 -#: ../en/ch05-collab.xml:917 1.8555 +#: ../en/ch06-collab.xml:911 1.8556 msgid "" 1.8557 "This defines a hostname alias, <literal>hg</literal>. When you use that " 1.8558 "hostname on the <command>ssh</command> command line or in a Mercurial " 1.8559 @@ -7049,26 +8617,26 @@ 1.8560 msgstr "" 1.8561 1.8562 #. type: Content of: <book><chapter><sect1><title> 1.8563 -#: ../en/ch05-collab.xml:929 1.8564 +#: ../en/ch06-collab.xml:923 1.8565 msgid "Serving over HTTP using CGI" 1.8566 msgstr "使用 CGI 通过 HTTP 提供服务" 1.8567 1.8568 #. type: Content of: <book><chapter><sect1><para> 1.8569 -#: ../en/ch05-collab.xml:931 1.8570 +#: ../en/ch06-collab.xml:925 1.8571 msgid "" 1.8572 "The simplest way to host one or more repositories in a permanent way is to " 1.8573 "use a web server and Mercurial's CGI support." 1.8574 msgstr "" 1.8575 1.8576 #. type: Content of: <book><chapter><sect1><para> 1.8577 -#: ../en/ch05-collab.xml:935 1.8578 +#: ../en/ch06-collab.xml:929 1.8579 msgid "" 1.8580 "Depending on how ambitious you are, configuring Mercurial's CGI interface can " 1.8581 "take anything from a few moments to several hours." 1.8582 msgstr "" 1.8583 1.8584 #. type: Content of: <book><chapter><sect1><para> 1.8585 -#: ../en/ch05-collab.xml:939 1.8586 +#: ../en/ch06-collab.xml:933 1.8587 msgid "" 1.8588 "We'll begin with the simplest of examples, and work our way towards a more " 1.8589 "complex configuration. Even for the most basic case, you're almost certainly " 1.8590 @@ -7076,12 +8644,12 @@ 1.8591 msgstr "" 1.8592 1.8593 #. type: Content of: <book><chapter><sect1><note><title> 1.8594 -#: ../en/ch05-collab.xml:945 1.8595 +#: ../en/ch06-collab.xml:939 1.8596 msgid "High pain tolerance required" 1.8597 msgstr "" 1.8598 1.8599 #. type: Content of: <book><chapter><sect1><note><para> 1.8600 -#: ../en/ch05-collab.xml:947 1.8601 +#: ../en/ch06-collab.xml:941 1.8602 msgid "" 1.8603 "Configuring a web server is a complex, fiddly, and highly system-dependent " 1.8604 "activity. I can't possibly give you instructions that will cover anything " 1.8605 @@ -7091,7 +8659,7 @@ 1.8606 msgstr "" 1.8607 1.8608 #. type: Content of: <book><chapter><sect1><note><para> 1.8609 -#: ../en/ch05-collab.xml:955 1.8610 +#: ../en/ch06-collab.xml:949 1.8611 msgid "" 1.8612 "If you don't have a strong stomach for tweaking configurations over and over, " 1.8613 "or a compelling need to host your own services, you might want to try one of " 1.8614 @@ -7099,19 +8667,19 @@ 1.8615 msgstr "" 1.8616 1.8617 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8618 -#: ../en/ch05-collab.xml:962 1.8619 +#: ../en/ch06-collab.xml:956 1.8620 msgid "Web server configuration checklist" 1.8621 msgstr "Web 服务器配置检查表" 1.8622 1.8623 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8624 -#: ../en/ch05-collab.xml:964 1.8625 +#: ../en/ch06-collab.xml:958 1.8626 msgid "" 1.8627 "Before you continue, do take a few moments to check a few aspects of your " 1.8628 "system's setup." 1.8629 msgstr "" 1.8630 1.8631 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8632 -#: ../en/ch05-collab.xml:968 1.8633 +#: ../en/ch06-collab.xml:962 1.8634 msgid "" 1.8635 "Do you have a web server installed at all? Mac OS X and some Linux " 1.8636 "distributions ship with Apache, but many other systems may not have a web " 1.8637 @@ -7119,14 +8687,14 @@ 1.8638 msgstr "" 1.8639 1.8640 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8641 -#: ../en/ch05-collab.xml:973 1.8642 +#: ../en/ch06-collab.xml:967 1.8643 msgid "" 1.8644 "If you have a web server installed, is it actually running? On most systems, " 1.8645 "even if one is present, it will be disabled by default." 1.8646 msgstr "" 1.8647 1.8648 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.8649 -#: ../en/ch05-collab.xml:977 1.8650 +#: ../en/ch06-collab.xml:971 1.8651 msgid "" 1.8652 "Is your server configured to allow you to run CGI programs in the directory " 1.8653 "where you plan to do so? Most servers default to explicitly disabling the " 1.8654 @@ -7134,7 +8702,7 @@ 1.8655 msgstr "" 1.8656 1.8657 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8658 -#: ../en/ch05-collab.xml:983 1.8659 +#: ../en/ch06-collab.xml:977 1.8660 msgid "" 1.8661 "If you don't have a web server installed, and don't have substantial " 1.8662 "experience configuring Apache, you should consider using the " 1.8663 @@ -7147,12 +8715,12 @@ 1.8664 msgstr "" 1.8665 1.8666 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8667 -#: ../en/ch05-collab.xml:996 1.8668 +#: ../en/ch06-collab.xml:990 1.8669 msgid "Basic CGI configuration" 1.8670 msgstr "基本 CGI 配置" 1.8671 1.8672 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8673 -#: ../en/ch05-collab.xml:998 1.8674 +#: ../en/ch06-collab.xml:992 1.8675 msgid "" 1.8676 "On Unix-like systems, it's common for users to have a subdirectory named " 1.8677 "something like <filename class=\"directory\">public_html</filename> in their " 1.8678 @@ -7162,7 +8730,7 @@ 1.8679 msgstr "" 1.8680 1.8681 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8682 -#: ../en/ch05-collab.xml:1006 1.8683 +#: ../en/ch06-collab.xml:1000 1.8684 msgid "" 1.8685 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> " 1.8686 "script that should be present in your Mercurial installation. If you can't " 1.8687 @@ -7172,14 +8740,14 @@ 1.8688 msgstr "" 1.8689 1.8690 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8691 -#: ../en/ch05-collab.xml:1013 ../en/ch05-collab.xml:1182 1.8692 +#: ../en/ch06-collab.xml:1007 ../en/ch06-collab.xml:1175 1.8693 msgid "" 1.8694 "You'll need to copy this script into your <filename class=\"directory" 1.8695 "\">public_html</filename> directory, and ensure that it's executable." 1.8696 msgstr "" 1.8697 1.8698 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8699 -#: ../en/ch05-collab.xml:1018 1.8700 +#: ../en/ch06-collab.xml:1012 1.8701 msgid "" 1.8702 "The <literal>755</literal> argument to <command>chmod</command> is a little " 1.8703 "more general than just making the script executable: it ensures that the " 1.8704 @@ -7192,26 +8760,26 @@ 1.8705 msgstr "" 1.8706 1.8707 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.8708 -#: ../en/ch05-collab.xml:1032 1.8709 +#: ../en/ch06-collab.xml:1026 1.8710 msgid "What could <emphasis>possibly</emphasis> go wrong?" 1.8711 msgstr "什么<emphasis>可能</emphasis>会出错?" 1.8712 1.8713 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8714 -#: ../en/ch05-collab.xml:1035 1.8715 +#: ../en/ch06-collab.xml:1029 1.8716 msgid "" 1.8717 "Once you've copied the CGI script into place, go into a web browser, and try " 1.8718 -"to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://" 1.8719 -"myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself " 1.8720 -"for instant failure. There's a high probability that trying to visit this " 1.8721 -"URL will fail, and there are many possible reasons for this. In fact, you're " 1.8722 -"likely to stumble over almost every one of the possible errors below, so " 1.8723 -"please read carefully. The following are all of the problems I ran into on a " 1.8724 -"system running Fedora 7, with a fresh installation of Apache, and a user " 1.8725 -"account that I created specially to perform this exercise." 1.8726 +"to open the URL <literal>http://myhostname/~myuser/hgweb.cgi</literal>, " 1.8727 +"<emphasis>but</emphasis> brace yourself for instant failure. There's a high " 1.8728 +"probability that trying to visit this URL will fail, and there are many " 1.8729 +"possible reasons for this. In fact, you're likely to stumble over almost " 1.8730 +"every one of the possible errors below, so please read carefully. The " 1.8731 +"following are all of the problems I ran into on a system running Fedora 7, " 1.8732 +"with a fresh installation of Apache, and a user account that I created " 1.8733 +"specially to perform this exercise." 1.8734 msgstr "" 1.8735 1.8736 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8737 -#: ../en/ch05-collab.xml:1049 1.8738 +#: ../en/ch06-collab.xml:1042 1.8739 msgid "" 1.8740 "Your web server may have per-user directories disabled. If you're using " 1.8741 "Apache, search your config file for a <literal>UserDir</literal> directive. " 1.8742 @@ -7224,7 +8792,7 @@ 1.8743 msgstr "" 1.8744 1.8745 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8746 -#: ../en/ch05-collab.xml:1060 1.8747 +#: ../en/ch06-collab.xml:1053 1.8748 msgid "" 1.8749 "Your file access permissions may be too restrictive. The web server must be " 1.8750 "able to traverse your home directory and directories under your <filename " 1.8751 @@ -7234,7 +8802,7 @@ 1.8752 msgstr "" 1.8753 1.8754 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8755 -#: ../en/ch05-collab.xml:1070 1.8756 +#: ../en/ch06-collab.xml:1063 1.8757 msgid "" 1.8758 "The other possibility with permissions is that you might get a completely " 1.8759 "empty window when you try to load the script. In this case, it's likely that " 1.8760 @@ -7244,7 +8812,7 @@ 1.8761 msgstr "" 1.8762 1.8763 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8764 -#: ../en/ch05-collab.xml:1077 1.8765 +#: ../en/ch06-collab.xml:1070 1.8766 msgid "" 1.8767 "Your web server may be configured to disallow execution of CGI programs in " 1.8768 "your per-user web directory. Here's Apache's default per-user configuration " 1.8769 @@ -7252,7 +8820,7 @@ 1.8770 msgstr "" 1.8771 1.8772 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8773 -#: ../en/ch05-collab.xml:1084 1.8774 +#: ../en/ch06-collab.xml:1077 1.8775 msgid "" 1.8776 "If you find a similar-looking <literal>Directory</literal> group in your " 1.8777 "Apache configuration, the directive to look at inside it is <literal>Options</" 1.8778 @@ -7261,7 +8829,7 @@ 1.8779 msgstr "" 1.8780 1.8781 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8782 -#: ../en/ch05-collab.xml:1091 1.8783 +#: ../en/ch06-collab.xml:1084 1.8784 msgid "" 1.8785 "If you find that Apache serves you the text of the CGI script instead of " 1.8786 "executing it, you may need to either uncomment (if already present) or add a " 1.8787 @@ -7269,7 +8837,7 @@ 1.8788 msgstr "" 1.8789 1.8790 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8791 -#: ../en/ch05-collab.xml:1097 1.8792 +#: ../en/ch06-collab.xml:1090 1.8793 msgid "" 1.8794 "The next possibility is that you might be served with a colourful Python " 1.8795 "backtrace claiming that it can't import a <literal>mercurial</literal>-" 1.8796 @@ -7284,9 +8852,9 @@ 1.8797 msgstr "" 1.8798 1.8799 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8800 -#: ../en/ch05-collab.xml:1111 1.8801 -msgid "" 1.8802 -"Finally, you are <emphasis>certain</emphasis> to by served with another " 1.8803 +#: ../en/ch06-collab.xml:1104 1.8804 +msgid "" 1.8805 +"Finally, you are <emphasis>certain</emphasis> to be served with another " 1.8806 "colourful Python backtrace: this one will complain that it can't find " 1.8807 "<filename class=\"directory\">/path/to/repository</filename>. Edit your " 1.8808 "<filename role=\"special\">hgweb.cgi</filename> script and replace the " 1.8809 @@ -7295,19 +8863,19 @@ 1.8810 msgstr "" 1.8811 1.8812 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8813 -#: ../en/ch05-collab.xml:1121 1.8814 +#: ../en/ch06-collab.xml:1114 1.8815 msgid "" 1.8816 "At this point, when you try to reload the page, you should be presented with " 1.8817 "a nice HTML view of your repository's history. Whew!" 1.8818 msgstr "" 1.8819 1.8820 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.8821 -#: ../en/ch05-collab.xml:1127 1.8822 +#: ../en/ch06-collab.xml:1120 1.8823 msgid "Configuring lighttpd" 1.8824 msgstr "配置 lighttpd" 1.8825 1.8826 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8827 -#: ../en/ch05-collab.xml:1129 1.8828 +#: ../en/ch06-collab.xml:1122 1.8829 msgid "" 1.8830 "To be exhaustive in my experiments, I tried configuring the increasingly " 1.8831 "popular <literal>lighttpd</literal> web server to serve the same repository " 1.8832 @@ -7318,7 +8886,7 @@ 1.8833 msgstr "" 1.8834 1.8835 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8836 -#: ../en/ch05-collab.xml:1139 1.8837 +#: ../en/ch06-collab.xml:1132 1.8838 msgid "" 1.8839 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the " 1.8840 "repository was a snap (in other words, even if you're trying to use " 1.8841 @@ -7330,7 +8898,7 @@ 1.8842 msgstr "" 1.8843 1.8844 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8845 -#: ../en/ch05-collab.xml:1151 1.8846 +#: ../en/ch06-collab.xml:1144 1.8847 msgid "" 1.8848 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " 1.8849 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " 1.8850 @@ -7341,12 +8909,12 @@ 1.8851 msgstr "" 1.8852 1.8853 #. type: Content of: <book><chapter><sect1><sect2><title> 1.8854 -#: ../en/ch05-collab.xml:1164 1.8855 +#: ../en/ch06-collab.xml:1157 1.8856 msgid "Sharing multiple repositories with one CGI script" 1.8857 msgstr "使用一个 CGI 脚本共享多个版本库" 1.8858 1.8859 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8860 -#: ../en/ch05-collab.xml:1166 1.8861 +#: ../en/ch06-collab.xml:1159 1.8862 msgid "" 1.8863 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " 1.8864 "publish a single repository, which is an annoying restriction. If you want " 1.8865 @@ -7356,7 +8924,7 @@ 1.8866 msgstr "" 1.8867 1.8868 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8869 -#: ../en/ch05-collab.xml:1174 1.8870 +#: ../en/ch06-collab.xml:1167 1.8871 msgid "" 1.8872 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " 1.8873 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" 1.8874 @@ -7367,17 +8935,17 @@ 1.8875 msgstr "" 1.8876 1.8877 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8878 -#: ../en/ch05-collab.xml:1189 1.8879 -msgid "" 1.8880 -"With basic configuration out of the way, try to visit <ulink url=\"http://" 1.8881 -"myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" 1.8882 -"ulink> in your browser. It should display an empty list of repositories. If " 1.8883 -"you get a blank window or error message, try walking through the list of " 1.8884 -"potential problems in <xref linkend=\"sec:collab:wtf\"/>." 1.8885 -msgstr "" 1.8886 - 1.8887 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.8888 -#: ../en/ch05-collab.xml:1198 1.8889 +#: ../en/ch06-collab.xml:1182 1.8890 +msgid "" 1.8891 +"With basic configuration out of the way, try to visit <literal>http://" 1.8892 +"myhostname/~myuser/hgwebdir.cgi</literal> in your\tbrowser. It should " 1.8893 +"display an empty list of repositories. If you get a blank window or error " 1.8894 +"message, try walking through the list of potential problems in <xref linkend=" 1.8895 +"\"sec:collab:wtf\"/>." 1.8896 +msgstr "" 1.8897 + 1.8898 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.8899 +#: ../en/ch06-collab.xml:1190 1.8900 msgid "" 1.8901 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " 1.8902 "external configuration file. By default, it searches for a file named " 1.8903 @@ -7389,7 +8957,7 @@ 1.8904 msgstr "" 1.8905 1.8906 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8907 -#: ../en/ch05-collab.xml:1208 1.8908 +#: ../en/ch06-collab.xml:1200 1.8909 msgid "" 1.8910 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" 1.8911 "filename> is with a section named <literal>collections</literal>. This will " 1.8912 @@ -7398,7 +8966,7 @@ 1.8913 msgstr "" 1.8914 1.8915 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8916 -#: ../en/ch05-collab.xml:1216 1.8917 +#: ../en/ch06-collab.xml:1208 1.8918 msgid "" 1.8919 "Mercurial interprets this by looking at the directory name on the " 1.8920 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" 1.8921 @@ -7410,21 +8978,20 @@ 1.8922 msgstr "" 1.8923 1.8924 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8925 -#: ../en/ch05-collab.xml:1225 1.8926 +#: ../en/ch06-collab.xml:1217 1.8927 msgid "" 1.8928 "Given the example above, if we have a repository whose local path is " 1.8929 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script " 1.8930 "will strip the leading <filename class=\"directory\">/my/root</filename> from " 1.8931 "the name, and publish the repository with a virtual path of <filename class=" 1.8932 "\"directory\">this/repo</filename>. If the base URL for our CGI script is " 1.8933 -"<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ " 1.8934 -"myuser/hgwebdir.cgi</ulink>, the complete URL for that repository will be " 1.8935 -"<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://" 1.8936 -"myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>." 1.8937 -msgstr "" 1.8938 - 1.8939 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.8940 -#: ../en/ch05-collab.xml:1239 1.8941 +"<literal>http://myhostname/~myuser/hgwebdir.cgi</literal>, the complete URL " 1.8942 +"for that repository will be <literal>http://myhostname/~myuser/hgwebdir.cgi/" 1.8943 +"this/repo</literal>." 1.8944 +msgstr "" 1.8945 + 1.8946 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.8947 +#: ../en/ch06-collab.xml:1229 1.8948 msgid "" 1.8949 "If we replace <filename class=\"directory\">/my/root</filename> on the left " 1.8950 "hand side of this example with <filename class=\"directory\">/my</filename>, " 1.8951 @@ -7435,7 +9002,7 @@ 1.8952 msgstr "" 1.8953 1.8954 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8955 -#: ../en/ch05-collab.xml:1249 1.8956 +#: ../en/ch06-collab.xml:1239 1.8957 msgid "" 1.8958 "The <filename role=\"special\">hgwebdir.cgi</filename> script will " 1.8959 "recursively search each directory listed in the <literal>collections</" 1.8960 @@ -7444,7 +9011,7 @@ 1.8961 msgstr "" 1.8962 1.8963 #. type: Content of: <book><chapter><sect1><sect2><para> 1.8964 -#: ../en/ch05-collab.xml:1255 1.8965 +#: ../en/ch06-collab.xml:1245 1.8966 msgid "" 1.8967 "The <literal>collections</literal> mechanism makes it easy to publish many " 1.8968 "repositories in a <quote>fire and forget</quote> manner. You only need to " 1.8969 @@ -7455,12 +9022,12 @@ 1.8970 msgstr "" 1.8971 1.8972 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.8973 -#: ../en/ch05-collab.xml:1265 1.8974 +#: ../en/ch06-collab.xml:1255 1.8975 msgid "Explicitly specifying which repositories to publish" 1.8976 msgstr "明确指出要发布的版本库" 1.8977 1.8978 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8979 -#: ../en/ch05-collab.xml:1268 1.8980 +#: ../en/ch06-collab.xml:1258 1.8981 msgid "" 1.8982 "In addition to the <literal>collections</literal> mechanism, the <filename " 1.8983 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " 1.8984 @@ -7469,7 +9036,7 @@ 1.8985 msgstr "" 1.8986 1.8987 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8988 -#: ../en/ch05-collab.xml:1277 1.8989 +#: ../en/ch06-collab.xml:1267 1.8990 msgid "" 1.8991 "In this case, the virtual path (the component that will appear in a URL) is " 1.8992 "on the left hand side of each definition, while the path to the repository is " 1.8993 @@ -7479,7 +9046,7 @@ 1.8994 msgstr "" 1.8995 1.8996 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.8997 -#: ../en/ch05-collab.xml:1284 1.8998 +#: ../en/ch06-collab.xml:1274 1.8999 msgid "" 1.9000 "If you wish, you can use both the <literal>collections</literal> and " 1.9001 "<literal>paths</literal> mechanisms simultaneously in a single configuration " 1.9002 @@ -7487,12 +9054,12 @@ 1.9003 msgstr "" 1.9004 1.9005 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><title> 1.9006 -#: ../en/ch05-collab.xml:1290 1.9007 +#: ../en/ch06-collab.xml:1280 1.9008 msgid "Beware duplicate virtual paths" 1.9009 msgstr "" 1.9010 1.9011 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 1.9012 -#: ../en/ch05-collab.xml:1292 1.9013 +#: ../en/ch06-collab.xml:1282 1.9014 msgid "" 1.9015 "If several repositories have the same virtual path, <filename role=\"special" 1.9016 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " 1.9017 @@ -7500,12 +9067,12 @@ 1.9018 msgstr "" 1.9019 1.9020 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9021 -#: ../en/ch05-collab.xml:1301 1.9022 +#: ../en/ch06-collab.xml:1291 1.9023 msgid "Downloading source archives" 1.9024 msgstr "下载源代码档案包" 1.9025 1.9026 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9027 -#: ../en/ch05-collab.xml:1303 1.9028 +#: ../en/ch06-collab.xml:1293 1.9029 msgid "" 1.9030 "Mercurial's web interface lets users download an archive of any revision. " 1.9031 "This archive will contain a snapshot of the working directory as of that " 1.9032 @@ -7513,7 +9080,7 @@ 1.9033 msgstr "" 1.9034 1.9035 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9036 -#: ../en/ch05-collab.xml:1308 1.9037 +#: ../en/ch06-collab.xml:1298 1.9038 msgid "" 1.9039 "By default, this feature is not enabled. To enable it, you'll need to add an " 1.9040 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role=" 1.9041 @@ -7522,12 +9089,12 @@ 1.9042 msgstr "" 1.9043 1.9044 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9045 -#: ../en/ch05-collab.xml:1315 1.9046 +#: ../en/ch06-collab.xml:1305 1.9047 msgid "Web configuration options" 1.9048 msgstr "Web 配置选项" 1.9049 1.9050 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9051 -#: ../en/ch05-collab.xml:1317 1.9052 +#: ../en/ch06-collab.xml:1307 1.9053 msgid "" 1.9054 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " 1.9055 "command, and the <filename role=\"special\">hgweb.cgi</filename> and " 1.9056 @@ -7537,7 +9104,7 @@ 1.9057 msgstr "" 1.9058 1.9059 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9060 -#: ../en/ch05-collab.xml:1325 1.9061 +#: ../en/ch06-collab.xml:1315 1.9062 msgid "" 1.9063 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " 1.9064 "archive download mechanisms Mercurial supports. If you enable this feature, " 1.9065 @@ -7547,7 +9114,7 @@ 1.9066 msgstr "" 1.9067 1.9068 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9069 -#: ../en/ch05-collab.xml:1334 1.9070 +#: ../en/ch06-collab.xml:1324 1.9071 msgid "" 1.9072 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " 1.9073 "<literal>bzip2</literal> compression. This has the best compression ratio, " 1.9074 @@ -7555,14 +9122,14 @@ 1.9075 msgstr "" 1.9076 1.9077 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9078 -#: ../en/ch05-collab.xml:1340 1.9079 +#: ../en/ch06-collab.xml:1330 1.9080 msgid "" 1.9081 "<literal>gz</literal>: A <command>tar</command> archive, compressed using " 1.9082 "<literal>gzip</literal> compression." 1.9083 msgstr "" 1.9084 1.9085 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9086 -#: ../en/ch05-collab.xml:1344 1.9087 +#: ../en/ch06-collab.xml:1334 1.9088 msgid "" 1.9089 "<literal>zip</literal>: A <command>zip</command> archive, compressed using " 1.9090 "LZW compression. This format has the worst compression ratio, but is widely " 1.9091 @@ -7570,7 +9137,7 @@ 1.9092 msgstr "" 1.9093 1.9094 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9095 -#: ../en/ch05-collab.xml:1350 1.9096 +#: ../en/ch06-collab.xml:1340 1.9097 msgid "" 1.9098 "If you provide an empty list, or don't have an <envar role=\"rc-item-web" 1.9099 "\">allow_archive</envar> entry at all, this feature will be disabled. Here " 1.9100 @@ -7578,7 +9145,7 @@ 1.9101 msgstr "" 1.9102 1.9103 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9104 -#: ../en/ch05-collab.xml:1357 1.9105 +#: ../en/ch06-collab.xml:1347 1.9106 msgid "" 1.9107 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " 1.9108 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" 1.9109 @@ -7588,7 +9155,7 @@ 1.9110 msgstr "" 1.9111 1.9112 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9113 -#: ../en/ch05-collab.xml:1366 1.9114 +#: ../en/ch06-collab.xml:1356 1.9115 msgid "" 1.9116 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but " 1.9117 "preferably brief) string identifying the person or group in charge of the " 1.9118 @@ -7600,21 +9167,21 @@ 1.9119 msgstr "" 1.9120 1.9121 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9122 -#: ../en/ch05-collab.xml:1377 1.9123 +#: ../en/ch06-collab.xml:1367 1.9124 msgid "" 1.9125 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum " 1.9126 "number of changesets to display in a single page of output." 1.9127 msgstr "" 1.9128 1.9129 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9130 -#: ../en/ch05-collab.xml:1381 1.9131 +#: ../en/ch06-collab.xml:1371 1.9132 msgid "" 1.9133 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum " 1.9134 "number of modified files to display in a single page of output." 1.9135 msgstr "" 1.9136 1.9137 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9138 -#: ../en/ch05-collab.xml:1385 1.9139 +#: ../en/ch06-collab.xml:1375 1.9140 msgid "" 1.9141 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " 1.9142 "displays alternating <quote>stripes</quote> to make it easier to visually " 1.9143 @@ -7623,7 +9190,7 @@ 1.9144 msgstr "" 1.9145 1.9146 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9147 -#: ../en/ch05-collab.xml:1391 1.9148 +#: ../en/ch06-collab.xml:1381 1.9149 msgid "" 1.9150 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial " 1.9151 "uses to display the web interface. Mercurial ships with several web " 1.9152 @@ -7631,33 +9198,33 @@ 1.9153 msgstr "" 1.9154 1.9155 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9156 -#: ../en/ch05-collab.xml:1397 1.9157 +#: ../en/ch06-collab.xml:1387 1.9158 msgid "<literal>coal</literal> is monochromatic." 1.9159 msgstr "" 1.9160 1.9161 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9162 -#: ../en/ch05-collab.xml:1400 1.9163 +#: ../en/ch06-collab.xml:1390 1.9164 msgid "" 1.9165 "<literal>gitweb</literal> emulates the visual style of git's web interface." 1.9166 msgstr "" 1.9167 1.9168 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9169 -#: ../en/ch05-collab.xml:1404 1.9170 +#: ../en/ch06-collab.xml:1394 1.9171 msgid "<literal>monoblue</literal> uses solid blues and greys." 1.9172 msgstr "" 1.9173 1.9174 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9175 -#: ../en/ch05-collab.xml:1408 1.9176 +#: ../en/ch06-collab.xml:1398 1.9177 msgid "<literal>paper</literal> is the default." 1.9178 msgstr "" 1.9179 1.9180 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 1.9181 -#: ../en/ch05-collab.xml:1411 1.9182 +#: ../en/ch06-collab.xml:1401 1.9183 msgid "<literal>spartan</literal> was the default for a long time." 1.9184 msgstr "" 1.9185 1.9186 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9187 -#: ../en/ch05-collab.xml:1415 1.9188 +#: ../en/ch06-collab.xml:1405 1.9189 msgid "" 1.9190 "You can also specify a custom template of your own; see <xref linkend=\"chap:" 1.9191 "template\"/> for details. Here, you can see how to enable the " 1.9192 @@ -7665,7 +9232,7 @@ 1.9193 msgstr "" 1.9194 1.9195 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.9196 -#: ../en/ch05-collab.xml:1423 1.9197 +#: ../en/ch06-collab.xml:1413 1.9198 msgid "" 1.9199 "<envar role=\"rc-item-web\">templates</envar>: Path. The directory in which " 1.9200 "to search for template files. By default, Mercurial searches in the " 1.9201 @@ -7673,7 +9240,7 @@ 1.9202 msgstr "" 1.9203 1.9204 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9205 -#: ../en/ch05-collab.xml:1428 1.9206 +#: ../en/ch06-collab.xml:1418 1.9207 msgid "" 1.9208 "If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can " 1.9209 "place a few configuration items in a <literal role=\"rc-web\">web</literal> " 1.9210 @@ -7684,12 +9251,12 @@ 1.9211 msgstr "" 1.9212 1.9213 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.9214 -#: ../en/ch05-collab.xml:1439 1.9215 +#: ../en/ch06-collab.xml:1429 1.9216 msgid "Options specific to an individual repository" 1.9217 msgstr "针对单个版本库的选项" 1.9218 1.9219 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.9220 -#: ../en/ch05-collab.xml:1441 1.9221 +#: ../en/ch06-collab.xml:1431 1.9222 msgid "" 1.9223 "A few <literal role=\"rc-web\">web</literal> configuration items ought to be " 1.9224 "placed in a repository's local <filename role=\"special\">.hg/hgrc</" 1.9225 @@ -7698,7 +9265,7 @@ 1.9226 msgstr "" 1.9227 1.9228 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9229 -#: ../en/ch05-collab.xml:1446 1.9230 +#: ../en/ch06-collab.xml:1436 1.9231 msgid "" 1.9232 "<envar role=\"rc-item-web\">description</envar>: String. A free-form (but " 1.9233 "preferably brief) string that describes the contents or purpose of the " 1.9234 @@ -7706,7 +9273,7 @@ 1.9235 msgstr "" 1.9236 1.9237 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9238 -#: ../en/ch05-collab.xml:1451 1.9239 +#: ../en/ch06-collab.xml:1441 1.9240 msgid "" 1.9241 "<envar role=\"rc-item-web\">name</envar>: String. The name to use for the " 1.9242 "repository in the web interface. This overrides the default name, which is " 1.9243 @@ -7714,13 +9281,13 @@ 1.9244 msgstr "" 1.9245 1.9246 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.9247 -#: ../en/ch05-collab.xml:1459 1.9248 +#: ../en/ch06-collab.xml:1449 1.9249 msgid "" 1.9250 "Options specific to the <command role=\"hg-cmd\">hg serve</command> command" 1.9251 msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项" 1.9252 1.9253 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.9254 -#: ../en/ch05-collab.xml:1462 1.9255 +#: ../en/ch06-collab.xml:1452 1.9256 msgid "" 1.9257 "Some of the items in the <literal role=\"rc-web\">web</literal> section of a " 1.9258 "<filename role=\"special\">~/.hgrc</filename> file are only for use with the " 1.9259 @@ -7728,7 +9295,7 @@ 1.9260 msgstr "" 1.9261 1.9262 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9263 -#: ../en/ch05-collab.xml:1468 1.9264 +#: ../en/ch06-collab.xml:1458 1.9265 msgid "" 1.9266 "<envar role=\"rc-item-web\">accesslog</envar>: Path. The name of a file into " 1.9267 "which to write an access log. By default, the <command role=\"hg-cmd\">hg " 1.9268 @@ -7738,7 +9305,7 @@ 1.9269 msgstr "" 1.9270 1.9271 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9272 -#: ../en/ch05-collab.xml:1476 1.9273 +#: ../en/ch06-collab.xml:1466 1.9274 msgid "" 1.9275 "<envar role=\"rc-item-web\">address</envar>: String. The local address on " 1.9276 "which the server should listen for incoming connections. By default, the " 1.9277 @@ -7746,7 +9313,7 @@ 1.9278 msgstr "" 1.9279 1.9280 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9281 -#: ../en/ch05-collab.xml:1481 1.9282 +#: ../en/ch06-collab.xml:1471 1.9283 msgid "" 1.9284 "<envar role=\"rc-item-web\">errorlog</envar>: Path. The name of a file into " 1.9285 "which to write an error log. By default, the <command role=\"hg-cmd\">hg " 1.9286 @@ -7755,21 +9322,21 @@ 1.9287 msgstr "" 1.9288 1.9289 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9290 -#: ../en/ch05-collab.xml:1487 1.9291 +#: ../en/ch06-collab.xml:1477 1.9292 msgid "" 1.9293 "<envar role=\"rc-item-web\">ipv6</envar>: Boolean. Whether to use the IPv6 " 1.9294 "protocol. By default, IPv6 is not used." 1.9295 msgstr "" 1.9296 1.9297 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.9298 -#: ../en/ch05-collab.xml:1491 1.9299 +#: ../en/ch06-collab.xml:1481 1.9300 msgid "" 1.9301 "<envar role=\"rc-item-web\">port</envar>: Integer. The TCP port number on " 1.9302 "which the server should listen. The default port number used is 8000." 1.9303 msgstr "" 1.9304 1.9305 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.9306 -#: ../en/ch05-collab.xml:1498 1.9307 +#: ../en/ch06-collab.xml:1488 1.9308 msgid "" 1.9309 "Choosing the right <filename role=\"special\">~/.hgrc</filename> file to add " 1.9310 "<literal role=\"rc-web\">web</literal> items to" 1.9311 @@ -7778,7 +9345,7 @@ 1.9312 "role=\"rc-web\">web</literal> 条目" 1.9313 1.9314 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.9315 -#: ../en/ch05-collab.xml:1502 1.9316 +#: ../en/ch06-collab.xml:1492 1.9317 msgid "" 1.9318 "It is important to remember that a web server like Apache or " 1.9319 "<literal>lighttpd</literal> will run under a user ID that is different to " 1.9320 @@ -7787,7 +9354,7 @@ 1.9321 msgstr "" 1.9322 1.9323 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.9324 -#: ../en/ch05-collab.xml:1509 1.9325 +#: ../en/ch06-collab.xml:1499 1.9326 msgid "" 1.9327 "If you add <literal role=\"rc-web\">web</literal> items to your own personal " 1.9328 "<filename role=\"special\">~/.hgrc</filename> file, CGI scripts won't read " 1.9329 @@ -7800,12 +9367,12 @@ 1.9330 msgstr "" 1.9331 1.9332 #. type: Content of: <book><chapter><sect1><title> 1.9333 -#: ../en/ch05-collab.xml:1524 1.9334 +#: ../en/ch06-collab.xml:1514 1.9335 msgid "System-wide configuration" 1.9336 msgstr "全局配置" 1.9337 1.9338 #. type: Content of: <book><chapter><sect1><para> 1.9339 -#: ../en/ch05-collab.xml:1526 1.9340 +#: ../en/ch06-collab.xml:1516 1.9341 msgid "" 1.9342 "On Unix-like systems shared by multiple users (such as a server to which " 1.9343 "people publish changes), it often makes sense to set up some global default " 1.9344 @@ -7813,7 +9380,7 @@ 1.9345 msgstr "" 1.9346 1.9347 #. type: Content of: <book><chapter><sect1><para> 1.9348 -#: ../en/ch05-collab.xml:1531 1.9349 +#: ../en/ch06-collab.xml:1521 1.9350 msgid "" 1.9351 "If a file named <filename>/etc/mercurial/hgrc</filename> exists, Mercurial " 1.9352 "will read it at startup time and apply any configuration settings it finds in " 1.9353 @@ -7823,12 +9390,12 @@ 1.9354 msgstr "" 1.9355 1.9356 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9357 -#: ../en/ch05-collab.xml:1540 1.9358 +#: ../en/ch06-collab.xml:1530 1.9359 msgid "Making Mercurial more trusting" 1.9360 msgstr "让 Mercurial 更可信" 1.9361 1.9362 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9363 -#: ../en/ch05-collab.xml:1542 1.9364 +#: ../en/ch06-collab.xml:1532 1.9365 msgid "" 1.9366 "One situation in which a global <filename>hgrc</filename> can be useful is if " 1.9367 "users are pulling changes owned by other users. By default, Mercurial will " 1.9368 @@ -7839,7 +9406,7 @@ 1.9369 msgstr "" 1.9370 1.9371 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9372 -#: ../en/ch05-collab.xml:1551 1.9373 +#: ../en/ch06-collab.xml:1541 1.9374 msgid "" 1.9375 "If everyone in a particular Unix group is on the same team and " 1.9376 "<emphasis>should</emphasis> trust each other's configuration settings, or we " 1.9377 @@ -7849,24 +9416,24 @@ 1.9378 msgstr "" 1.9379 1.9380 #. type: Content of: <book><chapter><title> 1.9381 -#: ../en/ch06-filenames.xml:5 1.9382 +#: ../en/ch07-filenames.xml:5 1.9383 msgid "File names and pattern matching" 1.9384 msgstr "文件名称与模式匹配" 1.9385 1.9386 #. type: Content of: <book><chapter><para> 1.9387 -#: ../en/ch06-filenames.xml:7 1.9388 +#: ../en/ch07-filenames.xml:7 1.9389 msgid "" 1.9390 "Mercurial provides mechanisms that let you work with file names in a " 1.9391 "consistent and expressive way." 1.9392 msgstr "" 1.9393 1.9394 #. type: Content of: <book><chapter><sect1><title> 1.9395 -#: ../en/ch06-filenames.xml:11 1.9396 +#: ../en/ch07-filenames.xml:11 1.9397 msgid "Simple file naming" 1.9398 msgstr "简单文件名称" 1.9399 1.9400 #. type: Content of: <book><chapter><sect1><para> 1.9401 -#: ../en/ch06-filenames.xml:13 1.9402 +#: ../en/ch07-filenames.xml:13 1.9403 msgid "" 1.9404 "Mercurial uses a unified piece of machinery <quote>under the hood</quote> to " 1.9405 "handle file names. Every command behaves uniformly with respect to file " 1.9406 @@ -7874,7 +9441,7 @@ 1.9407 msgstr "" 1.9408 1.9409 #. type: Content of: <book><chapter><sect1><para> 1.9410 -#: ../en/ch06-filenames.xml:18 1.9411 +#: ../en/ch07-filenames.xml:18 1.9412 msgid "" 1.9413 "If you explicitly name real files on the command line, Mercurial works with " 1.9414 "exactly those files, as you would expect. &interaction.filenames.files;" 1.9415 @@ -7882,7 +9449,7 @@ 1.9416 1.9417 # 1.9418 #. type: Content of: <book><chapter><sect1><para> 1.9419 -#: ../en/ch06-filenames.xml:22 1.9420 +#: ../en/ch07-filenames.xml:22 1.9421 msgid "" 1.9422 "When you provide a directory name, Mercurial will interpret this as " 1.9423 "<quote>operate on every file in this directory and its subdirectories</" 1.9424 @@ -7892,12 +9459,12 @@ 1.9425 msgstr "" 1.9426 1.9427 #. type: Content of: <book><chapter><sect1><title> 1.9428 -#: ../en/ch06-filenames.xml:33 1.9429 +#: ../en/ch07-filenames.xml:33 1.9430 msgid "Running commands without any file names" 1.9431 msgstr "不提供文件名称的执行命令" 1.9432 1.9433 #. type: Content of: <book><chapter><sect1><para> 1.9434 -#: ../en/ch06-filenames.xml:35 1.9435 +#: ../en/ch07-filenames.xml:35 1.9436 msgid "" 1.9437 "Mercurial's commands that work with file names have useful default behaviors " 1.9438 "when you invoke them without providing any file names or patterns. What kind " 1.9439 @@ -7907,14 +9474,14 @@ 1.9440 msgstr "" 1.9441 1.9442 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9443 -#: ../en/ch06-filenames.xml:42 1.9444 +#: ../en/ch07-filenames.xml:42 1.9445 msgid "" 1.9446 "Most commands will operate on the entire working directory. This is what the " 1.9447 "<command role=\"hg-cmd\">hg add</command> command does, for example." 1.9448 msgstr "" 1.9449 1.9450 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9451 -#: ../en/ch06-filenames.xml:46 1.9452 +#: ../en/ch07-filenames.xml:46 1.9453 msgid "" 1.9454 "If the command has effects that are difficult or impossible to reverse, it " 1.9455 "will force you to explicitly provide at least one name or pattern (see " 1.9456 @@ -7923,7 +9490,7 @@ 1.9457 msgstr "" 1.9458 1.9459 #. type: Content of: <book><chapter><sect1><para> 1.9460 -#: ../en/ch06-filenames.xml:54 1.9461 +#: ../en/ch07-filenames.xml:54 1.9462 msgid "" 1.9463 "It's easy to work around these default behaviors if they don't suit you. If " 1.9464 "a command normally operates on the whole working directory, you can invoke it " 1.9465 @@ -7933,7 +9500,7 @@ 1.9466 1.9467 # 1.9468 #. type: Content of: <book><chapter><sect1><para> 1.9469 -#: ../en/ch06-filenames.xml:62 1.9470 +#: ../en/ch07-filenames.xml:62 1.9471 msgid "" 1.9472 "Along the same lines, some commands normally print file names relative to the " 1.9473 "root of the repository, even if you're invoking them from a subdirectory. " 1.9474 @@ -7946,12 +9513,12 @@ 1.9475 msgstr "" 1.9476 1.9477 #. type: Content of: <book><chapter><sect1><title> 1.9478 -#: ../en/ch06-filenames.xml:76 1.9479 +#: ../en/ch07-filenames.xml:76 1.9480 msgid "Telling you what's going on" 1.9481 msgstr "告诉你正在做什么" 1.9482 1.9483 #. type: Content of: <book><chapter><sect1><para> 1.9484 -#: ../en/ch06-filenames.xml:78 1.9485 +#: ../en/ch07-filenames.xml:78 1.9486 msgid "" 1.9487 "The <command role=\"hg-cmd\">hg add</command> example in the preceding " 1.9488 "section illustrates something else that's helpful about Mercurial commands. " 1.9489 @@ -7961,7 +9528,7 @@ 1.9490 msgstr "" 1.9491 1.9492 #. type: Content of: <book><chapter><sect1><para> 1.9493 -#: ../en/ch06-filenames.xml:85 1.9494 +#: ../en/ch07-filenames.xml:85 1.9495 msgid "" 1.9496 "The principle here is of <emphasis>least surprise</emphasis>. If you've " 1.9497 "exactly named a file on the command line, there's no point in repeating it " 1.9498 @@ -7971,7 +9538,7 @@ 1.9499 msgstr "" 1.9500 1.9501 #. type: Content of: <book><chapter><sect1><para> 1.9502 -#: ../en/ch06-filenames.xml:92 1.9503 +#: ../en/ch07-filenames.xml:92 1.9504 msgid "" 1.9505 "For commands that behave this way, you can silence them using the <option " 1.9506 "role=\"hg-opt-global\">-q</option> option. You can also get them to print " 1.9507 @@ -7980,12 +9547,12 @@ 1.9508 msgstr "" 1.9509 1.9510 #. type: Content of: <book><chapter><sect1><title> 1.9511 -#: ../en/ch06-filenames.xml:100 1.9512 +#: ../en/ch07-filenames.xml:100 1.9513 msgid "Using patterns to identify files" 1.9514 msgstr "使用模式标识文件" 1.9515 1.9516 #. type: Content of: <book><chapter><sect1><para> 1.9517 -#: ../en/ch06-filenames.xml:102 1.9518 +#: ../en/ch07-filenames.xml:102 1.9519 msgid "" 1.9520 "In addition to working with file and directory names, Mercurial lets you use " 1.9521 "<emphasis>patterns</emphasis> to identify files. Mercurial's pattern " 1.9522 @@ -7993,7 +9560,7 @@ 1.9523 msgstr "" 1.9524 1.9525 #. type: Content of: <book><chapter><sect1><para> 1.9526 -#: ../en/ch06-filenames.xml:106 1.9527 +#: ../en/ch07-filenames.xml:106 1.9528 msgid "" 1.9529 "On Unix-like systems (Linux, MacOS, etc.), the job of matching file names to " 1.9530 "patterns normally falls to the shell. On these systems, you must explicitly " 1.9531 @@ -8003,21 +9570,21 @@ 1.9532 msgstr "" 1.9533 1.9534 #. type: Content of: <book><chapter><sect1><para> 1.9535 -#: ../en/ch06-filenames.xml:113 1.9536 +#: ../en/ch07-filenames.xml:113 1.9537 msgid "" 1.9538 "To provide a pattern in place of a regular name on the command line, the " 1.9539 "mechanism is simple:" 1.9540 msgstr "" 1.9541 1.9542 #. type: Content of: <book><chapter><sect1><para> 1.9543 -#: ../en/ch06-filenames.xml:116 1.9544 +#: ../en/ch07-filenames.xml:116 1.9545 msgid "" 1.9546 "That is, a pattern is identified by a short text string that says what kind " 1.9547 "of pattern this is, followed by a colon, followed by the actual pattern." 1.9548 msgstr "" 1.9549 1.9550 #. type: Content of: <book><chapter><sect1><para> 1.9551 -#: ../en/ch06-filenames.xml:120 1.9552 +#: ../en/ch07-filenames.xml:120 1.9553 msgid "" 1.9554 "Mercurial supports two kinds of pattern syntax. The most frequently used is " 1.9555 "called <literal>glob</literal>; this is the same kind of pattern matching " 1.9556 @@ -8026,7 +9593,7 @@ 1.9557 msgstr "" 1.9558 1.9559 #. type: Content of: <book><chapter><sect1><para> 1.9560 -#: ../en/ch06-filenames.xml:125 1.9561 +#: ../en/ch07-filenames.xml:125 1.9562 msgid "" 1.9563 "When Mercurial does automatic pattern matching on Windows, it uses " 1.9564 "<literal>glob</literal> syntax. You can thus omit the <quote><literal>glob:</" 1.9565 @@ -8034,14 +9601,14 @@ 1.9566 msgstr "" 1.9567 1.9568 #. type: Content of: <book><chapter><sect1><para> 1.9569 -#: ../en/ch06-filenames.xml:130 1.9570 +#: ../en/ch07-filenames.xml:130 1.9571 msgid "" 1.9572 "The <literal>re</literal> syntax is more powerful; it lets you specify " 1.9573 "patterns using regular expressions, also known as regexps." 1.9574 msgstr "" 1.9575 1.9576 #. type: Content of: <book><chapter><sect1><para> 1.9577 -#: ../en/ch06-filenames.xml:134 1.9578 +#: ../en/ch07-filenames.xml:134 1.9579 msgid "" 1.9580 "By the way, in the examples that follow, notice that I'm careful to wrap all " 1.9581 "of my patterns in quote characters, so that they won't get expanded by the " 1.9582 @@ -8049,12 +9616,12 @@ 1.9583 msgstr "" 1.9584 1.9585 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9586 -#: ../en/ch06-filenames.xml:140 1.9587 +#: ../en/ch07-filenames.xml:140 1.9588 msgid "Shell-style <literal>glob</literal> patterns" 1.9589 msgstr "外壳风格的 <literal>glob</literal> 模式" 1.9590 1.9591 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9592 -#: ../en/ch06-filenames.xml:142 1.9593 +#: ../en/ch07-filenames.xml:142 1.9594 msgid "" 1.9595 "This is an overview of the kinds of patterns you can use when you're matching " 1.9596 "on glob patterns." 1.9597 @@ -8062,7 +9629,7 @@ 1.9598 1.9599 # 1.9600 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9601 -#: ../en/ch06-filenames.xml:145 1.9602 +#: ../en/ch07-filenames.xml:145 1.9603 msgid "" 1.9604 "The <quote><literal>*</literal></quote> character matches any string, within " 1.9605 "a single directory." 1.9606 @@ -8070,7 +9637,7 @@ 1.9607 1.9608 # 1.9609 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9610 -#: ../en/ch06-filenames.xml:150 1.9611 +#: ../en/ch07-filenames.xml:150 1.9612 msgid "" 1.9613 "The <quote><literal>**</literal></quote> pattern matches any string, and " 1.9614 "crosses directory boundaries. It's not a standard Unix glob token, but it's " 1.9615 @@ -8079,13 +9646,13 @@ 1.9616 1.9617 # 1.9618 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9619 -#: ../en/ch06-filenames.xml:157 1.9620 +#: ../en/ch07-filenames.xml:157 1.9621 msgid "" 1.9622 "The <quote><literal>?</literal></quote> pattern matches any single character." 1.9623 msgstr "" 1.9624 1.9625 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9626 -#: ../en/ch06-filenames.xml:162 1.9627 +#: ../en/ch07-filenames.xml:162 1.9628 msgid "" 1.9629 "The <quote><literal>[</literal></quote> character begins a " 1.9630 "<emphasis>character class</emphasis>. This matches any single character " 1.9631 @@ -8096,7 +9663,7 @@ 1.9632 msgstr "" 1.9633 1.9634 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9635 -#: ../en/ch06-filenames.xml:172 1.9636 +#: ../en/ch07-filenames.xml:172 1.9637 msgid "" 1.9638 "If the first character after the <quote><literal>[</literal></quote> in a " 1.9639 "character class is a <quote><literal>!</literal></quote>, it " 1.9640 @@ -8105,7 +9672,7 @@ 1.9641 msgstr "" 1.9642 1.9643 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9644 -#: ../en/ch06-filenames.xml:178 1.9645 +#: ../en/ch07-filenames.xml:178 1.9646 msgid "" 1.9647 "A <quote><literal>{</literal></quote> begins a group of subpatterns, where " 1.9648 "the whole group matches if any subpattern in the group matches. The " 1.9649 @@ -8114,13 +9681,13 @@ 1.9650 msgstr "" 1.9651 1.9652 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.9653 -#: ../en/ch06-filenames.xml:187 1.9654 +#: ../en/ch07-filenames.xml:187 1.9655 msgid "Watch out!" 1.9656 msgstr "千万小心!" 1.9657 1.9658 # 1.9659 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.9660 -#: ../en/ch06-filenames.xml:189 1.9661 +#: ../en/ch07-filenames.xml:189 1.9662 msgid "" 1.9663 "Don't forget that if you want to match a pattern in any directory, you should " 1.9664 "not be using the <quote><literal>*</literal></quote> match-any token, as this " 1.9665 @@ -8130,12 +9697,12 @@ 1.9666 msgstr "" 1.9667 1.9668 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9669 -#: ../en/ch06-filenames.xml:201 1.9670 +#: ../en/ch07-filenames.xml:201 1.9671 msgid "Regular expression matching with <literal>re</literal> patterns" 1.9672 msgstr "使用 <literal>re</literal> 模式的正则表达式匹配" 1.9673 1.9674 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9675 -#: ../en/ch06-filenames.xml:204 1.9676 +#: ../en/ch07-filenames.xml:204 1.9677 msgid "" 1.9678 "Mercurial accepts the same regular expression syntax as the Python " 1.9679 "programming language (it uses Python's regexp engine internally). This is " 1.9680 @@ -8144,7 +9711,7 @@ 1.9681 msgstr "" 1.9682 1.9683 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9684 -#: ../en/ch06-filenames.xml:210 1.9685 +#: ../en/ch07-filenames.xml:210 1.9686 msgid "" 1.9687 "I won't discuss Mercurial's regexp dialect in any detail here, as regexps are " 1.9688 "not often used. Perl-style regexps are in any case already exhaustively " 1.9689 @@ -8154,7 +9721,7 @@ 1.9690 msgstr "" 1.9691 1.9692 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9693 -#: ../en/ch06-filenames.xml:217 1.9694 +#: ../en/ch07-filenames.xml:217 1.9695 msgid "" 1.9696 "A regexp is matched against an entire file name, relative to the root of the " 1.9697 "repository. In other words, even if you're already in subbdirectory " 1.9698 @@ -8164,7 +9731,7 @@ 1.9699 msgstr "" 1.9700 1.9701 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9702 -#: ../en/ch06-filenames.xml:224 1.9703 +#: ../en/ch07-filenames.xml:224 1.9704 msgid "" 1.9705 "One thing to note, if you're familiar with Perl-style regexps, is that " 1.9706 "Mercurial's are <emphasis>rooted</emphasis>. That is, a regexp starts " 1.9707 @@ -8174,12 +9741,12 @@ 1.9708 msgstr "" 1.9709 1.9710 #. type: Content of: <book><chapter><sect1><title> 1.9711 -#: ../en/ch06-filenames.xml:234 1.9712 +#: ../en/ch07-filenames.xml:234 1.9713 msgid "Filtering files" 1.9714 msgstr "过滤文件" 1.9715 1.9716 #. type: Content of: <book><chapter><sect1><para> 1.9717 -#: ../en/ch06-filenames.xml:236 1.9718 +#: ../en/ch07-filenames.xml:236 1.9719 msgid "" 1.9720 "Not only does Mercurial give you a variety of ways to specify files; it lets " 1.9721 "you further winnow those files using <emphasis>filters</emphasis>. Commands " 1.9722 @@ -8187,7 +9754,7 @@ 1.9723 msgstr "" 1.9724 1.9725 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9726 -#: ../en/ch06-filenames.xml:241 1.9727 +#: ../en/ch07-filenames.xml:241 1.9728 msgid "" 1.9729 "<option role=\"hg-opt-global\">-I</option>, or <option role=\"hg-opt-global" 1.9730 "\">--include</option>, lets you specify a pattern that file names must match " 1.9731 @@ -8195,7 +9762,7 @@ 1.9732 msgstr "" 1.9733 1.9734 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9735 -#: ../en/ch06-filenames.xml:246 1.9736 +#: ../en/ch07-filenames.xml:246 1.9737 msgid "" 1.9738 "<option role=\"hg-opt-global\">-X</option>, or <option role=\"hg-opt-global" 1.9739 "\">--exclude</option>, gives you a way to <emphasis>avoid</emphasis> " 1.9740 @@ -8203,7 +9770,7 @@ 1.9741 msgstr "" 1.9742 1.9743 #. type: Content of: <book><chapter><sect1><para> 1.9744 -#: ../en/ch06-filenames.xml:251 1.9745 +#: ../en/ch07-filenames.xml:251 1.9746 msgid "" 1.9747 "You can provide multiple <option role=\"hg-opt-global\">-I</option> and " 1.9748 "<option role=\"hg-opt-global\">-X</option> options on the command line, and " 1.9749 @@ -8212,26 +9779,26 @@ 1.9750 msgstr "" 1.9751 1.9752 #. type: Content of: <book><chapter><sect1><para> 1.9753 -#: ../en/ch06-filenames.xml:258 1.9754 +#: ../en/ch07-filenames.xml:258 1.9755 msgid "" 1.9756 "You can read a <option role=\"hg-opt-global\">-I</option> filter as " 1.9757 "<quote>process only the files that match this filter</quote>." 1.9758 msgstr "" 1.9759 1.9760 #. type: Content of: <book><chapter><sect1><para> 1.9761 -#: ../en/ch06-filenames.xml:264 1.9762 +#: ../en/ch07-filenames.xml:264 1.9763 msgid "" 1.9764 "The <option role=\"hg-opt-global\">-X</option> filter is best read as " 1.9765 "<quote>process only the files that don't match this pattern</quote>." 1.9766 msgstr "" 1.9767 1.9768 #. type: Content of: <book><chapter><sect1><title> 1.9769 -#: ../en/ch06-filenames.xml:272 1.9770 +#: ../en/ch07-filenames.xml:272 1.9771 msgid "Permanently ignoring unwanted files and directories" 1.9772 msgstr "始终忽略不需要的文件和目录" 1.9773 1.9774 #. type: Content of: <book><chapter><sect1><para> 1.9775 -#: ../en/ch06-filenames.xml:274 1.9776 +#: ../en/ch07-filenames.xml:274 1.9777 msgid "" 1.9778 "When you create a new repository, the chances are that over time it will grow " 1.9779 "to contain files that ought to <emphasis>not</emphasis> be managed by " 1.9780 @@ -8245,7 +9812,7 @@ 1.9781 msgstr "" 1.9782 1.9783 #. type: Content of: <book><chapter><sect1><para> 1.9784 -#: ../en/ch06-filenames.xml:286 1.9785 +#: ../en/ch07-filenames.xml:286 1.9786 msgid "" 1.9787 "To have Mercurial permanently ignore such files, create a file named " 1.9788 "<filename>.hgignore</filename> in the root of your repository. You " 1.9789 @@ -8255,7 +9822,7 @@ 1.9790 msgstr "" 1.9791 1.9792 #. type: Content of: <book><chapter><sect1><para> 1.9793 -#: ../en/ch06-filenames.xml:293 1.9794 +#: ../en/ch07-filenames.xml:293 1.9795 msgid "" 1.9796 "By default, the <filename>.hgignore</filename> file should contain a list of " 1.9797 "regular expressions, one per line. Empty lines are skipped. Most people " 1.9798 @@ -8265,24 +9832,24 @@ 1.9799 msgstr "" 1.9800 1.9801 #. type: Content of: <book><chapter><sect1><para> 1.9802 -#: ../en/ch06-filenames.xml:302 1.9803 +#: ../en/ch07-filenames.xml:302 1.9804 msgid "" 1.9805 "This tells Mercurial to interpret the lines that follow as glob patterns, not " 1.9806 "regular expressions." 1.9807 msgstr "" 1.9808 1.9809 #. type: Content of: <book><chapter><sect1><para> 1.9810 -#: ../en/ch06-filenames.xml:305 1.9811 +#: ../en/ch07-filenames.xml:305 1.9812 msgid "Here is a typical-looking <filename>.hgignore</filename> file." 1.9813 msgstr "" 1.9814 1.9815 #. type: Content of: <book><chapter><sect1><title> 1.9816 -#: ../en/ch06-filenames.xml:329 1.9817 +#: ../en/ch07-filenames.xml:329 1.9818 msgid "Case sensitivity" 1.9819 msgstr "大小写敏感性" 1.9820 1.9821 #. type: Content of: <book><chapter><sect1><para> 1.9822 -#: ../en/ch06-filenames.xml:331 1.9823 +#: ../en/ch07-filenames.xml:331 1.9824 msgid "" 1.9825 "If you're working in a mixed development environment that contains both Linux " 1.9826 "(or other Unix) systems and Macs or Windows systems, you should keep in the " 1.9827 @@ -8293,7 +9860,7 @@ 1.9828 msgstr "" 1.9829 1.9830 #. type: Content of: <book><chapter><sect1><para> 1.9831 -#: ../en/ch06-filenames.xml:340 1.9832 +#: ../en/ch07-filenames.xml:340 1.9833 msgid "" 1.9834 "Operating systems and filesystems differ in the way they handle the " 1.9835 "<emphasis>case</emphasis> of characters in file and directory names. There " 1.9836 @@ -8301,7 +9868,7 @@ 1.9837 msgstr "" 1.9838 1.9839 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9840 -#: ../en/ch06-filenames.xml:345 1.9841 +#: ../en/ch07-filenames.xml:345 1.9842 msgid "" 1.9843 "Completely case insensitive. Uppercase and lowercase versions of a letter " 1.9844 "are treated as identical, both when creating a file and during subsequent " 1.9845 @@ -8309,7 +9876,7 @@ 1.9846 msgstr "" 1.9847 1.9848 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9849 -#: ../en/ch06-filenames.xml:350 1.9850 +#: ../en/ch07-filenames.xml:350 1.9851 msgid "" 1.9852 "Case preserving, but insensitive. When a file or directory is created, the " 1.9853 "case of its name is stored, and can be retrieved and displayed by the " 1.9854 @@ -8321,15 +9888,15 @@ 1.9855 msgstr "" 1.9856 1.9857 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.9858 -#: ../en/ch06-filenames.xml:361 1.9859 +#: ../en/ch07-filenames.xml:361 1.9860 msgid "" 1.9861 "Case sensitive. The case of a name is significant at all times. The names " 1.9862 -"<filename>foo</filename> and {FoO} identify different files. This is the way " 1.9863 -"Linux and Unix systems normally work." 1.9864 -msgstr "" 1.9865 - 1.9866 -#. type: Content of: <book><chapter><sect1><para> 1.9867 -#: ../en/ch06-filenames.xml:367 1.9868 +"<filename>foo</filename> and <filename>FoO</filename> identify different " 1.9869 +"files. This is the way Linux and Unix systems normally work." 1.9870 +msgstr "" 1.9871 + 1.9872 +#. type: Content of: <book><chapter><sect1><para> 1.9873 +#: ../en/ch07-filenames.xml:368 1.9874 msgid "" 1.9875 "On Unix-like systems, it is possible to have any or all of the above ways of " 1.9876 "handling case in action at once. For example, if you use a USB thumb drive " 1.9877 @@ -8338,12 +9905,12 @@ 1.9878 msgstr "" 1.9879 1.9880 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9881 -#: ../en/ch06-filenames.xml:374 1.9882 +#: ../en/ch07-filenames.xml:375 1.9883 msgid "Safe, portable repository storage" 1.9884 msgstr "安全,可移植的版本库存储" 1.9885 1.9886 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9887 -#: ../en/ch06-filenames.xml:376 1.9888 +#: ../en/ch07-filenames.xml:377 1.9889 msgid "" 1.9890 "Mercurial's repository storage mechanism is <emphasis>case safe</emphasis>. " 1.9891 "It translates file names so that they can be safely stored on both case " 1.9892 @@ -8354,12 +9921,12 @@ 1.9893 msgstr "" 1.9894 1.9895 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9896 -#: ../en/ch06-filenames.xml:387 1.9897 +#: ../en/ch07-filenames.xml:388 1.9898 msgid "Detecting case conflicts" 1.9899 msgstr "检测大小写冲突" 1.9900 1.9901 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9902 -#: ../en/ch06-filenames.xml:389 1.9903 +#: ../en/ch07-filenames.xml:390 1.9904 msgid "" 1.9905 "When operating in the working directory, Mercurial honours the naming policy " 1.9906 "of the filesystem where the working directory is located. If the filesystem " 1.9907 @@ -8368,7 +9935,7 @@ 1.9908 msgstr "" 1.9909 1.9910 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9911 -#: ../en/ch06-filenames.xml:395 1.9912 +#: ../en/ch07-filenames.xml:396 1.9913 msgid "" 1.9914 "An important aspect of this approach is that it is possible to commit a " 1.9915 "changeset on a case sensitive (typically Linux or Unix) filesystem that will " 1.9916 @@ -8381,7 +9948,7 @@ 1.9917 msgstr "" 1.9918 1.9919 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9920 -#: ../en/ch06-filenames.xml:406 1.9921 +#: ../en/ch07-filenames.xml:407 1.9922 msgid "" 1.9923 "If a Windows or Mac user pulls this change, they will not initially have a " 1.9924 "problem, because Mercurial's repository storage mechanism is case safe. " 1.9925 @@ -8393,12 +9960,12 @@ 1.9926 msgstr "" 1.9927 1.9928 #. type: Content of: <book><chapter><sect1><sect2><title> 1.9929 -#: ../en/ch06-filenames.xml:418 1.9930 +#: ../en/ch07-filenames.xml:419 1.9931 msgid "Fixing a case conflict" 1.9932 msgstr "修正大小写冲突" 1.9933 1.9934 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9935 -#: ../en/ch06-filenames.xml:420 1.9936 +#: ../en/ch07-filenames.xml:421 1.9937 msgid "" 1.9938 "If you are using Windows or a Mac in a mixed environment where some of your " 1.9939 "collaborators are using Linux or Unix, and Mercurial reports a case folding " 1.9940 @@ -8408,7 +9975,7 @@ 1.9941 msgstr "" 1.9942 1.9943 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9944 -#: ../en/ch06-filenames.xml:427 1.9945 +#: ../en/ch07-filenames.xml:428 1.9946 msgid "" 1.9947 "Just find a nearby Linux or Unix box, clone the problem repository onto it, " 1.9948 "and use Mercurial's <command role=\"hg-cmd\">hg rename</command> command to " 1.9949 @@ -8420,7 +9987,7 @@ 1.9950 msgstr "" 1.9951 1.9952 #. type: Content of: <book><chapter><sect1><sect2><para> 1.9953 -#: ../en/ch06-filenames.xml:437 1.9954 +#: ../en/ch07-filenames.xml:438 1.9955 msgid "" 1.9956 "The changeset with case-conflicting names will remain in your project's " 1.9957 "history, and you still won't be able to <command role=\"hg-cmd\">hg update</" 1.9958 @@ -8429,12 +9996,12 @@ 1.9959 msgstr "" 1.9960 1.9961 #. type: Content of: <book><chapter><title> 1.9962 -#: ../en/ch07-branch.xml:5 1.9963 +#: ../en/ch08-branch.xml:5 1.9964 msgid "Managing releases and branchy development" 1.9965 msgstr "发布管理与分支开发" 1.9966 1.9967 #. type: Content of: <book><chapter><para> 1.9968 -#: ../en/ch07-branch.xml:7 1.9969 +#: ../en/ch08-branch.xml:7 1.9970 msgid "" 1.9971 "Mercurial provides several mechanisms for you to manage a project that is " 1.9972 "making progress on multiple fronts at once. To understand these mechanisms, " 1.9973 @@ -8442,7 +10009,7 @@ 1.9974 msgstr "" 1.9975 1.9976 #. type: Content of: <book><chapter><para> 1.9977 -#: ../en/ch07-branch.xml:12 1.9978 +#: ../en/ch08-branch.xml:12 1.9979 msgid "" 1.9980 "Many software projects issue periodic <quote>major</quote> releases that " 1.9981 "contain substantial new features. In parallel, they may issue <quote>minor</" 1.9982 @@ -8451,7 +10018,7 @@ 1.9983 msgstr "" 1.9984 1.9985 #. type: Content of: <book><chapter><para> 1.9986 -#: ../en/ch07-branch.xml:18 1.9987 +#: ../en/ch08-branch.xml:18 1.9988 msgid "" 1.9989 "In this chapter, we'll start by talking about how to keep records of project " 1.9990 "milestones such as releases. We'll then continue on to talk about the flow " 1.9991 @@ -8460,12 +10027,12 @@ 1.9992 msgstr "" 1.9993 1.9994 #. type: Content of: <book><chapter><sect1><title> 1.9995 -#: ../en/ch07-branch.xml:25 1.9996 +#: ../en/ch08-branch.xml:25 1.9997 msgid "Giving a persistent name to a revision" 1.9998 msgstr "给版本指定一个永久的名称" 1.9999 1.10000 #. type: Content of: <book><chapter><sect1><para> 1.10001 -#: ../en/ch07-branch.xml:27 1.10002 +#: ../en/ch08-branch.xml:27 1.10003 msgid "" 1.10004 "Once you decide that you'd like to call a particular revision a " 1.10005 "<quote>release</quote>, it's a good idea to record the identity of that " 1.10006 @@ -8476,7 +10043,7 @@ 1.10007 1.10008 # 1.10009 #. type: Content of: <book><chapter><sect1><para> 1.10010 -#: ../en/ch07-branch.xml:34 1.10011 +#: ../en/ch08-branch.xml:34 1.10012 msgid "" 1.10013 "Mercurial lets you give a permanent name to any revision using the <command " 1.10014 "role=\"hg-cmd\">hg tag</command> command. Not surprisingly, these names are " 1.10015 @@ -8484,7 +10051,7 @@ 1.10016 msgstr "" 1.10017 1.10018 #. type: Content of: <book><chapter><sect1><para> 1.10019 -#: ../en/ch07-branch.xml:40 1.10020 +#: ../en/ch08-branch.xml:40 1.10021 msgid "" 1.10022 "A tag is nothing more than a <quote>symbolic name</quote> for a revision. " 1.10023 "Tags exist purely for your convenience, so that you have a handy permanent " 1.10024 @@ -8495,22 +10062,22 @@ 1.10025 msgstr "" 1.10026 1.10027 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10028 -#: ../en/ch07-branch.xml:49 1.10029 +#: ../en/ch08-branch.xml:49 1.10030 msgid "Colon (ASCII 58, <quote><literal>:</literal></quote>)" 1.10031 msgstr "" 1.10032 1.10033 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10034 -#: ../en/ch07-branch.xml:52 1.10035 +#: ../en/ch08-branch.xml:52 1.10036 msgid "Carriage return (ASCII 13, <quote><literal>\\r</literal></quote>)" 1.10037 msgstr "" 1.10038 1.10039 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10040 -#: ../en/ch07-branch.xml:55 1.10041 +#: ../en/ch08-branch.xml:55 1.10042 msgid "Newline (ASCII 10, <quote><literal>\\n</literal></quote>)" 1.10043 msgstr "" 1.10044 1.10045 #. type: Content of: <book><chapter><sect1><para> 1.10046 -#: ../en/ch07-branch.xml:59 1.10047 +#: ../en/ch08-branch.xml:59 1.10048 msgid "" 1.10049 "You can use the <command role=\"hg-cmd\">hg tags</command> command to display " 1.10050 "the tags present in your repository. In the output, each tagged revision is " 1.10051 @@ -8519,7 +10086,7 @@ 1.10052 msgstr "" 1.10053 1.10054 #. type: Content of: <book><chapter><sect1><para> 1.10055 -#: ../en/ch07-branch.xml:67 1.10056 +#: ../en/ch08-branch.xml:67 1.10057 msgid "" 1.10058 "Notice that <literal>tip</literal> is listed in the output of <command role=" 1.10059 "\"hg-cmd\">hg tags</command>. The <literal>tip</literal> tag is a special " 1.10060 @@ -8528,7 +10095,7 @@ 1.10061 msgstr "" 1.10062 1.10063 #. type: Content of: <book><chapter><sect1><para> 1.10064 -#: ../en/ch07-branch.xml:73 1.10065 +#: ../en/ch08-branch.xml:73 1.10066 msgid "" 1.10067 "In the output of the <command role=\"hg-cmd\">hg tags</command> command, tags " 1.10068 "are listed in reverse order, by revision number. This usually means that " 1.10069 @@ -8538,7 +10105,7 @@ 1.10070 msgstr "" 1.10071 1.10072 #. type: Content of: <book><chapter><sect1><para> 1.10073 -#: ../en/ch07-branch.xml:80 1.10074 +#: ../en/ch08-branch.xml:80 1.10075 msgid "" 1.10076 "When you run <command role=\"hg-cmd\">hg log</command>, if it displays a " 1.10077 "revision that has tags associated with it, it will print those tags." 1.10078 @@ -8546,7 +10113,7 @@ 1.10079 1.10080 # 1.10081 #. type: Content of: <book><chapter><sect1><para> 1.10082 -#: ../en/ch07-branch.xml:86 1.10083 +#: ../en/ch08-branch.xml:86 1.10084 msgid "" 1.10085 "Any time you need to provide a revision ID to a Mercurial command, the " 1.10086 "command will accept a tag name in its place. Internally, Mercurial will " 1.10087 @@ -8554,7 +10121,7 @@ 1.10088 msgstr "" 1.10089 1.10090 #. type: Content of: <book><chapter><sect1><para> 1.10091 -#: ../en/ch07-branch.xml:93 1.10092 +#: ../en/ch08-branch.xml:93 1.10093 msgid "" 1.10094 "There's no limit on the number of tags you can have in a repository, or on " 1.10095 "the number of tags that a single revision can have. As a practical matter, " 1.10096 @@ -8565,7 +10132,7 @@ 1.10097 msgstr "" 1.10098 1.10099 #. type: Content of: <book><chapter><sect1><para> 1.10100 -#: ../en/ch07-branch.xml:101 1.10101 +#: ../en/ch08-branch.xml:101 1.10102 msgid "" 1.10103 "For example, if your project has milestones as frequent as every few days, " 1.10104 "it's perfectly reasonable to tag each one of those. But if you have a " 1.10105 @@ -8576,14 +10143,14 @@ 1.10106 msgstr "" 1.10107 1.10108 #. type: Content of: <book><chapter><sect1><para> 1.10109 -#: ../en/ch07-branch.xml:109 1.10110 +#: ../en/ch08-branch.xml:109 1.10111 msgid "" 1.10112 "If you want to remove a tag that you no longer want, use <command role=\"hg-" 1.10113 "cmd\">hg tag --remove</command>." 1.10114 msgstr "" 1.10115 1.10116 #. type: Content of: <book><chapter><sect1><para> 1.10117 -#: ../en/ch07-branch.xml:114 1.10118 +#: ../en/ch08-branch.xml:114 1.10119 msgid "" 1.10120 "You can also modify a tag at any time, so that it identifies a different " 1.10121 "revision, by simply issuing a new <command role=\"hg-cmd\">hg tag</command> " 1.10122 @@ -8593,7 +10160,7 @@ 1.10123 msgstr "" 1.10124 1.10125 #. type: Content of: <book><chapter><sect1><para> 1.10126 -#: ../en/ch07-branch.xml:123 1.10127 +#: ../en/ch08-branch.xml:123 1.10128 msgid "" 1.10129 "There will still be a permanent record of the previous identity of the tag, " 1.10130 "but Mercurial will no longer use it. There's thus no penalty to tagging the " 1.10131 @@ -8602,7 +10169,7 @@ 1.10132 msgstr "" 1.10133 1.10134 #. type: Content of: <book><chapter><sect1><para> 1.10135 -#: ../en/ch07-branch.xml:129 1.10136 +#: ../en/ch08-branch.xml:129 1.10137 msgid "" 1.10138 "Mercurial stores tags in a normal revision-controlled file in your " 1.10139 "repository. If you've created any tags, you'll find them in a file in the " 1.10140 @@ -8615,12 +10182,12 @@ 1.10141 msgstr "" 1.10142 1.10143 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10144 -#: ../en/ch07-branch.xml:142 1.10145 +#: ../en/ch08-branch.xml:142 1.10146 msgid "Handling tag conflicts during a merge" 1.10147 msgstr "在合并期间处理标签冲突" 1.10148 1.10149 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10150 -#: ../en/ch07-branch.xml:144 1.10151 +#: ../en/ch08-branch.xml:144 1.10152 msgid "" 1.10153 "You won't often need to care about the <filename role=\"special\">.hgtags</" 1.10154 "filename> file, but it sometimes makes its presence known during a merge. " 1.10155 @@ -8630,7 +10197,7 @@ 1.10156 msgstr "" 1.10157 1.10158 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10159 -#: ../en/ch07-branch.xml:151 1.10160 +#: ../en/ch08-branch.xml:151 1.10161 msgid "" 1.10162 "If you're resolving a conflict in the <filename role=\"special\">.hgtags</" 1.10163 "filename> file during a merge, there's one twist to modifying the <filename " 1.10164 @@ -8641,7 +10208,7 @@ 1.10165 msgstr "" 1.10166 1.10167 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10168 -#: ../en/ch07-branch.xml:161 1.10169 +#: ../en/ch08-branch.xml:161 1.10170 msgid "" 1.10171 "An unfortunate consequence of this design is that you can't actually verify " 1.10172 "that your merged <filename role=\"special\">.hgtags</filename> file is " 1.10173 @@ -8655,12 +10222,12 @@ 1.10174 msgstr "" 1.10175 1.10176 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10177 -#: ../en/ch07-branch.xml:176 1.10178 +#: ../en/ch08-branch.xml:176 1.10179 msgid "Tags and cloning" 1.10180 msgstr "标签与克隆" 1.10181 1.10182 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10183 -#: ../en/ch07-branch.xml:178 1.10184 +#: ../en/ch08-branch.xml:178 1.10185 msgid "" 1.10186 "You may have noticed that the <command role=\"hg-cmd\">hg clone</command> " 1.10187 "command has a <option role=\"hg-opt-clone\">-r</option> option that lets you " 1.10188 @@ -8670,26 +10237,26 @@ 1.10189 msgstr "" 1.10190 1.10191 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10192 -#: ../en/ch07-branch.xml:186 1.10193 +#: ../en/ch08-branch.xml:186 1.10194 msgid "" 1.10195 "Recall that a tag is stored as a revision to the <filename role=\"special\">." 1.10196 -"hgtags</filename> file, so that when you create a tag, the changeset in which " 1.10197 -"it's recorded necessarily refers to an older changeset. When you run " 1.10198 -"<command role=\"hg-cmd\">hg clone -r foo</command> to clone a repository as " 1.10199 -"of tag <literal>foo</literal>, the new clone <emphasis>will not contain the " 1.10200 -"history that created the tag</emphasis> that you used to clone the " 1.10201 -"repository. The result is that you'll get exactly the right subset of the " 1.10202 +"hgtags</filename> file. When you create a tag, the changeset in which its " 1.10203 +"recorded refers to an older changeset. When you run <command role=\"hg-cmd" 1.10204 +"\">hg clone -r foo</command> to clone a repository as of tag <literal>foo</" 1.10205 +"literal>, the new clone <emphasis>will not contain any revision newer than " 1.10206 +"the one the tag refers to, including the revision where the tag was created</" 1.10207 +"emphasis>. The result is that you'll get exactly the right subset of the " 1.10208 "project's history in the new repository, but <emphasis>not</emphasis> the tag " 1.10209 "you might have expected." 1.10210 msgstr "" 1.10211 1.10212 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10213 -#: ../en/ch07-branch.xml:201 1.10214 +#: ../en/ch08-branch.xml:201 1.10215 msgid "When permanent tags are too much" 1.10216 msgstr "当永久标签太多的时候" 1.10217 1.10218 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10219 -#: ../en/ch07-branch.xml:203 1.10220 +#: ../en/ch08-branch.xml:203 1.10221 msgid "" 1.10222 "Since Mercurial's tags are revision controlled and carried around with a " 1.10223 "project's history, everyone you work with will see the tags you create. But " 1.10224 @@ -8700,7 +10267,7 @@ 1.10225 msgstr "" 1.10226 1.10227 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10228 -#: ../en/ch07-branch.xml:213 1.10229 +#: ../en/ch08-branch.xml:213 1.10230 msgid "" 1.10231 "For cases like this, what you might want to use are <emphasis>local</" 1.10232 "emphasis> tags. You can create a local tag with the <option role=\"hg-opt-tag" 1.10233 @@ -8714,20 +10281,20 @@ 1.10234 msgstr "" 1.10235 1.10236 #. type: Content of: <book><chapter><sect1><title> 1.10237 -#: ../en/ch07-branch.xml:228 1.10238 +#: ../en/ch08-branch.xml:228 1.10239 msgid "The flow of changes&emdash;big picture vs. little" 1.10240 msgstr "修改流程—宏观与微观" 1.10241 1.10242 #. type: Content of: <book><chapter><sect1><para> 1.10243 -#: ../en/ch07-branch.xml:230 1.10244 -msgid "" 1.10245 -"To return to the outline I sketched at the beginning of a chapter, let's " 1.10246 +#: ../en/ch08-branch.xml:230 1.10247 +msgid "" 1.10248 +"To return to the outline I sketched at the beginning of the chapter, let's " 1.10249 "think about a project that has multiple concurrent pieces of work under " 1.10250 "development at once." 1.10251 msgstr "" 1.10252 1.10253 #. type: Content of: <book><chapter><sect1><para> 1.10254 -#: ../en/ch07-branch.xml:234 1.10255 +#: ../en/ch08-branch.xml:235 1.10256 msgid "" 1.10257 "There might be a push for a new <quote>main</quote> release; a new minor " 1.10258 "bugfix release to the last main release; and an unexpected <quote>hot fix</" 1.10259 @@ -8735,7 +10302,7 @@ 1.10260 msgstr "" 1.10261 1.10262 #. type: Content of: <book><chapter><sect1><para> 1.10263 -#: ../en/ch07-branch.xml:239 1.10264 +#: ../en/ch08-branch.xml:240 1.10265 msgid "" 1.10266 "The usual way people refer to these different concurrent directions of " 1.10267 "development is as <quote>branches</quote>. However, we've already seen " 1.10268 @@ -8745,14 +10312,14 @@ 1.10269 msgstr "" 1.10270 1.10271 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10272 -#: ../en/ch07-branch.xml:246 1.10273 +#: ../en/ch08-branch.xml:247 1.10274 msgid "" 1.10275 "<quote>Big picture</quote> branches represent the sweep of a project's " 1.10276 "evolution; people give them names, and talk about them in conversation." 1.10277 msgstr "" 1.10278 1.10279 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10280 -#: ../en/ch07-branch.xml:250 1.10281 +#: ../en/ch08-branch.xml:251 1.10282 msgid "" 1.10283 "<quote>Little picture</quote> branches are artefacts of the day-to-day " 1.10284 "activity of developing and merging changes. They expose the narrative of how " 1.10285 @@ -8760,12 +10327,12 @@ 1.10286 msgstr "" 1.10287 1.10288 #. type: Content of: <book><chapter><sect1><title> 1.10289 -#: ../en/ch07-branch.xml:258 1.10290 +#: ../en/ch08-branch.xml:259 1.10291 msgid "Managing big-picture branches in repositories" 1.10292 msgstr "在版本库中管理分支" 1.10293 1.10294 #. type: Content of: <book><chapter><sect1><para> 1.10295 -#: ../en/ch07-branch.xml:260 1.10296 +#: ../en/ch08-branch.xml:261 1.10297 msgid "" 1.10298 "The easiest way to isolate a <quote>big picture</quote> branch in Mercurial " 1.10299 "is in a dedicated repository. If you have an existing shared " 1.10300 @@ -8776,14 +10343,14 @@ 1.10301 msgstr "" 1.10302 1.10303 #. type: Content of: <book><chapter><sect1><para> 1.10304 -#: ../en/ch07-branch.xml:270 1.10305 +#: ../en/ch08-branch.xml:271 1.10306 msgid "" 1.10307 "You can then clone a new shared <literal>myproject-1.0.1</literal> repository " 1.10308 "as of that tag." 1.10309 msgstr "" 1.10310 1.10311 #. type: Content of: <book><chapter><sect1><para> 1.10312 -#: ../en/ch07-branch.xml:276 1.10313 +#: ../en/ch08-branch.xml:277 1.10314 msgid "" 1.10315 "Afterwards, if someone needs to work on a bug fix that ought to go into an " 1.10316 "upcoming 1.0.1 minor release, they clone the <literal>myproject-1.0.1</" 1.10317 @@ -8791,19 +10358,19 @@ 1.10318 msgstr "" 1.10319 1.10320 #. type: Content of: <book><chapter><sect1><para> 1.10321 -#: ../en/ch07-branch.xml:283 1.10322 +#: ../en/ch08-branch.xml:284 1.10323 msgid "" 1.10324 "Meanwhile, development for the next major release can continue, isolated and " 1.10325 "unabated, in the <literal>myproject</literal> repository." 1.10326 msgstr "" 1.10327 1.10328 #. type: Content of: <book><chapter><sect1><title> 1.10329 -#: ../en/ch07-branch.xml:291 1.10330 +#: ../en/ch08-branch.xml:292 1.10331 msgid "Don't repeat yourself: merging across branches" 1.10332 msgstr "不要重复劳动:在分支间合并" 1.10333 1.10334 #. type: Content of: <book><chapter><sect1><para> 1.10335 -#: ../en/ch07-branch.xml:293 1.10336 +#: ../en/ch08-branch.xml:294 1.10337 msgid "" 1.10338 "In many cases, if you have a bug to fix on a maintenance branch, the chances " 1.10339 "are good that the bug exists on your project's main branch (and possibly " 1.10340 @@ -8813,26 +10380,26 @@ 1.10341 msgstr "" 1.10342 1.10343 #. type: Content of: <book><chapter><sect1><para> 1.10344 -#: ../en/ch07-branch.xml:301 1.10345 +#: ../en/ch08-branch.xml:302 1.10346 msgid "" 1.10347 "In the simplest instance, all you need to do is pull changes from your " 1.10348 "maintenance branch into your local clone of the target branch." 1.10349 msgstr "" 1.10350 1.10351 #. type: Content of: <book><chapter><sect1><para> 1.10352 -#: ../en/ch07-branch.xml:307 1.10353 +#: ../en/ch08-branch.xml:308 1.10354 msgid "" 1.10355 "You'll then need to merge the heads of the two branches, and push back to the " 1.10356 "main branch." 1.10357 msgstr "" 1.10358 1.10359 #. type: Content of: <book><chapter><sect1><title> 1.10360 -#: ../en/ch07-branch.xml:314 1.10361 +#: ../en/ch08-branch.xml:315 1.10362 msgid "Naming branches within one repository" 1.10363 msgstr "版本库中的命名分支" 1.10364 1.10365 #. type: Content of: <book><chapter><sect1><para> 1.10366 -#: ../en/ch07-branch.xml:316 1.10367 +#: ../en/ch08-branch.xml:317 1.10368 msgid "" 1.10369 "In most instances, isolating branches in repositories is the right approach. " 1.10370 "Its simplicity makes it easy to understand; and so it's hard to make " 1.10371 @@ -8842,7 +10409,7 @@ 1.10372 msgstr "" 1.10373 1.10374 #. type: Content of: <book><chapter><sect1><para> 1.10375 -#: ../en/ch07-branch.xml:323 1.10376 +#: ../en/ch08-branch.xml:324 1.10377 msgid "" 1.10378 "If you're more in the <quote>power user</quote> category (<emphasis>and</" 1.10379 "emphasis> your collaborators are too), there is an alternative way of " 1.10380 @@ -8855,7 +10422,7 @@ 1.10381 msgstr "" 1.10382 1.10383 #. type: Content of: <book><chapter><sect1><para> 1.10384 -#: ../en/ch07-branch.xml:334 1.10385 +#: ../en/ch08-branch.xml:335 1.10386 msgid "" 1.10387 "The key to working this way is that Mercurial lets you assign a persistent " 1.10388 "<emphasis>name</emphasis> to a branch. There always exists a branch named " 1.10389 @@ -8865,7 +10432,7 @@ 1.10390 msgstr "" 1.10391 1.10392 #. type: Content of: <book><chapter><sect1><para> 1.10393 -#: ../en/ch07-branch.xml:341 1.10394 +#: ../en/ch08-branch.xml:342 1.10395 msgid "" 1.10396 "As an example, when you run the <command role=\"hg-cmd\">hg commit</command> " 1.10397 "command, and it pops up your editor so that you can enter a commit message, " 1.10398 @@ -8875,7 +10442,7 @@ 1.10399 msgstr "" 1.10400 1.10401 #. type: Content of: <book><chapter><sect1><para> 1.10402 -#: ../en/ch07-branch.xml:348 1.10403 +#: ../en/ch08-branch.xml:349 1.10404 msgid "" 1.10405 "To start working with named branches, use the <command role=\"hg-cmd\">hg " 1.10406 "branches</command> command. This command lists the named branches already " 1.10407 @@ -8883,14 +10450,14 @@ 1.10408 msgstr "" 1.10409 1.10410 #. type: Content of: <book><chapter><sect1><para> 1.10411 -#: ../en/ch07-branch.xml:355 1.10412 +#: ../en/ch08-branch.xml:356 1.10413 msgid "" 1.10414 "Since you haven't created any named branches yet, the only one that exists is " 1.10415 "<literal>default</literal>." 1.10416 msgstr "" 1.10417 1.10418 #. type: Content of: <book><chapter><sect1><para> 1.10419 -#: ../en/ch07-branch.xml:358 1.10420 +#: ../en/ch08-branch.xml:359 1.10421 msgid "" 1.10422 "To find out what the <quote>current</quote> branch is, run the <command role=" 1.10423 "\"hg-cmd\">hg branch</command> command, giving it no arguments. This tells " 1.10424 @@ -8899,7 +10466,7 @@ 1.10425 1.10426 # 1.10427 #. type: Content of: <book><chapter><sect1><para> 1.10428 -#: ../en/ch07-branch.xml:365 1.10429 +#: ../en/ch08-branch.xml:366 1.10430 msgid "" 1.10431 "To create a new branch, run the <command role=\"hg-cmd\">hg branch</command> " 1.10432 "command again. This time, give it one argument: the name of the branch you " 1.10433 @@ -8907,7 +10474,7 @@ 1.10434 msgstr "" 1.10435 1.10436 #. type: Content of: <book><chapter><sect1><para> 1.10437 -#: ../en/ch07-branch.xml:371 1.10438 +#: ../en/ch08-branch.xml:372 1.10439 msgid "" 1.10440 "After you've created a branch, you might wonder what effect the <command role=" 1.10441 "\"hg-cmd\">hg branch</command> command has had. What do the <command role=" 1.10442 @@ -8916,7 +10483,7 @@ 1.10443 msgstr "" 1.10444 1.10445 #. type: Content of: <book><chapter><sect1><para> 1.10446 -#: ../en/ch07-branch.xml:378 1.10447 +#: ../en/ch08-branch.xml:379 1.10448 msgid "" 1.10449 "Nothing has changed in the working directory, and there's been no new history " 1.10450 "created. As this suggests, running the <command role=\"hg-cmd\">hg branch</" 1.10451 @@ -8925,7 +10492,7 @@ 1.10452 msgstr "" 1.10453 1.10454 #. type: Content of: <book><chapter><sect1><para> 1.10455 -#: ../en/ch07-branch.xml:385 1.10456 +#: ../en/ch08-branch.xml:386 1.10457 msgid "" 1.10458 "When you commit a change, Mercurial records the name of the branch on which " 1.10459 "you committed. Once you've switched from the <literal>default</literal> " 1.10460 @@ -8936,7 +10503,7 @@ 1.10461 msgstr "" 1.10462 1.10463 #. type: Content of: <book><chapter><sect1><para> 1.10464 -#: ../en/ch07-branch.xml:395 1.10465 +#: ../en/ch08-branch.xml:396 1.10466 msgid "" 1.10467 "The <command role=\"hg-cmd\">hg log</command>-like commands will print the " 1.10468 "branch name of every changeset that's not on the <literal>default</literal> " 1.10469 @@ -8945,7 +10512,7 @@ 1.10470 msgstr "" 1.10471 1.10472 #. type: Content of: <book><chapter><sect1><para> 1.10473 -#: ../en/ch07-branch.xml:400 1.10474 +#: ../en/ch08-branch.xml:401 1.10475 msgid "" 1.10476 "Once you've named a branch and committed a change with that name, every " 1.10477 "subsequent commit that descends from that change will inherit the same branch " 1.10478 @@ -8954,32 +10521,32 @@ 1.10479 msgstr "" 1.10480 1.10481 #. type: Content of: <book><chapter><sect1><para> 1.10482 -#: ../en/ch07-branch.xml:408 1.10483 +#: ../en/ch08-branch.xml:409 1.10484 msgid "" 1.10485 "In practice, this is something you won't do very often, as branch names tend " 1.10486 "to have fairly long lifetimes. (This isn't a rule, just an observation.)" 1.10487 msgstr "" 1.10488 1.10489 #. type: Content of: <book><chapter><sect1><title> 1.10490 -#: ../en/ch07-branch.xml:414 1.10491 +#: ../en/ch08-branch.xml:415 1.10492 msgid "Dealing with multiple named branches in a repository" 1.10493 msgstr "在版本库中处理多个命名分支" 1.10494 1.10495 #. type: Content of: <book><chapter><sect1><para> 1.10496 -#: ../en/ch07-branch.xml:417 1.10497 +#: ../en/ch08-branch.xml:418 1.10498 msgid "" 1.10499 "If you have more than one named branch in a repository, Mercurial will " 1.10500 -"remember the branch that your working directory on when you start a command " 1.10501 -"like <command role=\"hg-cmd\">hg update</command> or <command role=\"hg-cmd" 1.10502 -"\">hg pull -u</command>. It will update the working directory to the tip of " 1.10503 -"this branch, no matter what the <quote>repo-wide</quote> tip is. To update " 1.10504 -"to a revision that's on a different named branch, you may need to use the " 1.10505 -"<option role=\"hg-opt-update\">-C</option> option to <command role=\"hg-cmd" 1.10506 -"\">hg update</command>." 1.10507 -msgstr "" 1.10508 - 1.10509 -#. type: Content of: <book><chapter><sect1><para> 1.10510 -#: ../en/ch07-branch.xml:427 1.10511 +"remember the branch that your working directory is on when you start a " 1.10512 +"command like <command role=\"hg-cmd\">hg update</command> or <command role=" 1.10513 +"\"hg-cmd\">hg pull -u</command>. It will update the working directory to the " 1.10514 +"tip of this branch, no matter what the <quote>repo-wide</quote> tip is. To " 1.10515 +"update to a revision that's on a different named branch, you may need to use " 1.10516 +"the <option role=\"hg-opt-update\">-C</option> option to <command role=\"hg-" 1.10517 +"cmd\">hg update</command>." 1.10518 +msgstr "" 1.10519 + 1.10520 +#. type: Content of: <book><chapter><sect1><para> 1.10521 +#: ../en/ch08-branch.xml:428 1.10522 msgid "" 1.10523 "This behavior is a little subtle, so let's see it in action. First, let's " 1.10524 "remind ourselves what branch we're currently on, and what branches are in our " 1.10525 @@ -8987,14 +10554,14 @@ 1.10526 msgstr "" 1.10527 1.10528 #. type: Content of: <book><chapter><sect1><para> 1.10529 -#: ../en/ch07-branch.xml:433 1.10530 +#: ../en/ch08-branch.xml:434 1.10531 msgid "" 1.10532 "We're on the <literal>bar</literal> branch, but there also exists an older " 1.10533 "<command role=\"hg-cmd\">hg foo</command> branch." 1.10534 msgstr "" 1.10535 1.10536 #. type: Content of: <book><chapter><sect1><para> 1.10537 -#: ../en/ch07-branch.xml:437 1.10538 +#: ../en/ch08-branch.xml:438 1.10539 msgid "" 1.10540 "We can <command role=\"hg-cmd\">hg update</command> back and forth between " 1.10541 "the tips of the <literal>foo</literal> and <literal>bar</literal> branches " 1.10542 @@ -9005,7 +10572,7 @@ 1.10543 1.10544 # 1.10545 #. type: Content of: <book><chapter><sect1><para> 1.10546 -#: ../en/ch07-branch.xml:446 1.10547 +#: ../en/ch08-branch.xml:447 1.10548 msgid "" 1.10549 "If we go back to the <literal>foo</literal> branch and then run <command role=" 1.10550 "\"hg-cmd\">hg update</command>, it will keep us on <literal>foo</literal>, " 1.10551 @@ -9014,19 +10581,19 @@ 1.10552 1.10553 # 1.10554 #. type: Content of: <book><chapter><sect1><para> 1.10555 -#: ../en/ch07-branch.xml:453 1.10556 +#: ../en/ch08-branch.xml:454 1.10557 msgid "" 1.10558 "Committing a new change on the <literal>foo</literal> branch introduces a new " 1.10559 "head." 1.10560 msgstr "" 1.10561 1.10562 #. type: Content of: <book><chapter><sect1><title> 1.10563 -#: ../en/ch07-branch.xml:460 1.10564 +#: ../en/ch08-branch.xml:461 1.10565 msgid "Branch names and merging" 1.10566 msgstr "分支名称与合并" 1.10567 1.10568 #. type: Content of: <book><chapter><sect1><para> 1.10569 -#: ../en/ch07-branch.xml:462 1.10570 +#: ../en/ch08-branch.xml:463 1.10571 msgid "" 1.10572 "As you've probably noticed, merges in Mercurial are not symmetrical. Let's " 1.10573 "say our repository has two heads, 17 and 23. If I <command role=\"hg-cmd" 1.10574 @@ -9038,7 +10605,7 @@ 1.10575 msgstr "" 1.10576 1.10577 #. type: Content of: <book><chapter><sect1><para> 1.10578 -#: ../en/ch07-branch.xml:472 1.10579 +#: ../en/ch08-branch.xml:473 1.10580 msgid "" 1.10581 "This affects Mercurial's choice of branch name when you merge. After a " 1.10582 "merge, Mercurial will retain the branch name of the first parent when you " 1.10583 @@ -9048,7 +10615,7 @@ 1.10584 msgstr "" 1.10585 1.10586 #. type: Content of: <book><chapter><sect1><para> 1.10587 -#: ../en/ch07-branch.xml:479 1.10588 +#: ../en/ch08-branch.xml:480 1.10589 msgid "" 1.10590 "It's not unusual for a repository to contain multiple heads, each with the " 1.10591 "same branch name. Let's say I'm working on the <literal>foo</literal> " 1.10592 @@ -9060,7 +10627,7 @@ 1.10593 1.10594 # 1.10595 #. type: Content of: <book><chapter><sect1><para> 1.10596 -#: ../en/ch07-branch.xml:487 1.10597 +#: ../en/ch08-branch.xml:488 1.10598 msgid "" 1.10599 "But if I'm working on the <literal>bar</literal> branch, and I merge work " 1.10600 "from the <literal>foo</literal> branch, the result will remain on the " 1.10601 @@ -9068,7 +10635,7 @@ 1.10602 msgstr "" 1.10603 1.10604 #. type: Content of: <book><chapter><sect1><para> 1.10605 -#: ../en/ch07-branch.xml:493 1.10606 +#: ../en/ch08-branch.xml:494 1.10607 msgid "" 1.10608 "To give a more concrete example, if I'm working on the <literal>bleeding-" 1.10609 "edge</literal> branch, and I want to bring in the latest fixes from the " 1.10610 @@ -9078,12 +10645,12 @@ 1.10611 msgstr "" 1.10612 1.10613 #. type: Content of: <book><chapter><sect1><title> 1.10614 -#: ../en/ch07-branch.xml:502 1.10615 +#: ../en/ch08-branch.xml:503 1.10616 msgid "Branch naming is generally useful" 1.10617 msgstr "分支名称通常都很有用" 1.10618 1.10619 #. type: Content of: <book><chapter><sect1><para> 1.10620 -#: ../en/ch07-branch.xml:504 1.10621 +#: ../en/ch08-branch.xml:505 1.10622 msgid "" 1.10623 "You shouldn't think of named branches as applicable only to situations where " 1.10624 "you have multiple long-lived branches cohabiting in a single repository. " 1.10625 @@ -9091,7 +10658,7 @@ 1.10626 msgstr "" 1.10627 1.10628 #. type: Content of: <book><chapter><sect1><para> 1.10629 -#: ../en/ch07-branch.xml:509 1.10630 +#: ../en/ch08-branch.xml:510 1.10631 msgid "" 1.10632 "In the simplest case, giving a name to each branch gives you a permanent " 1.10633 "record of which branch a changeset originated on. This gives you more " 1.10634 @@ -9100,7 +10667,7 @@ 1.10635 msgstr "" 1.10636 1.10637 #. type: Content of: <book><chapter><sect1><para> 1.10638 -#: ../en/ch07-branch.xml:514 1.10639 +#: ../en/ch08-branch.xml:515 1.10640 msgid "" 1.10641 "If you're working with shared repositories, you can set up a <literal role=" 1.10642 "\"hook\">pretxnchangegroup</literal> hook on each that will block incoming " 1.10643 @@ -9112,12 +10679,12 @@ 1.10644 msgstr "" 1.10645 1.10646 #. type: Content of: <book><chapter><title> 1.10647 -#: ../en/ch08-undo.xml:5 1.10648 +#: ../en/ch09-undo.xml:5 1.10649 msgid "Finding and fixing mistakes" 1.10650 msgstr "查找和修改错误" 1.10651 1.10652 #. type: Content of: <book><chapter><para> 1.10653 -#: ../en/ch08-undo.xml:7 1.10654 +#: ../en/ch09-undo.xml:7 1.10655 msgid "" 1.10656 "To err might be human, but to really handle the consequences well takes a top-" 1.10657 "notch revision control system. In this chapter, we'll discuss some of the " 1.10658 @@ -9127,17 +10694,17 @@ 1.10659 msgstr "" 1.10660 1.10661 #. type: Content of: <book><chapter><sect1><title> 1.10662 -#: ../en/ch08-undo.xml:15 1.10663 +#: ../en/ch09-undo.xml:15 1.10664 msgid "Erasing local history" 1.10665 msgstr "销毁本地历史" 1.10666 1.10667 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10668 -#: ../en/ch08-undo.xml:18 1.10669 +#: ../en/ch09-undo.xml:18 1.10670 msgid "The accidental commit" 1.10671 msgstr "意外的提交" 1.10672 1.10673 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10674 -#: ../en/ch08-undo.xml:20 1.10675 +#: ../en/ch09-undo.xml:20 1.10676 msgid "" 1.10677 "I have the occasional but persistent problem of typing rather more quickly " 1.10678 "than I can think, which sometimes results in me committing a changeset that " 1.10679 @@ -9148,12 +10715,12 @@ 1.10680 msgstr "" 1.10681 1.10682 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10683 -#: ../en/ch08-undo.xml:31 1.10684 +#: ../en/ch09-undo.xml:31 1.10685 msgid "Rolling back a transaction" 1.10686 msgstr "回滚一个事务" 1.10687 1.10688 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10689 -#: ../en/ch08-undo.xml:33 1.10690 +#: ../en/ch09-undo.xml:33 1.10691 msgid "" 1.10692 "In <xref linkend=\"sec:concepts:txn\"/>, I mentioned that Mercurial treats " 1.10693 "each modification of a repository as a <emphasis>transaction</emphasis>. " 1.10694 @@ -9165,7 +10732,7 @@ 1.10695 msgstr "" 1.10696 1.10697 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10698 -#: ../en/ch08-undo.xml:43 1.10699 +#: ../en/ch09-undo.xml:43 1.10700 msgid "" 1.10701 "Here's a mistake that I often find myself making: committing a change in " 1.10702 "which I've created a new file, but forgotten to <command role=\"hg-cmd\">hg " 1.10703 @@ -9173,14 +10740,14 @@ 1.10704 msgstr "" 1.10705 1.10706 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10707 -#: ../en/ch08-undo.xml:50 1.10708 +#: ../en/ch09-undo.xml:50 1.10709 msgid "" 1.10710 "Looking at the output of <command role=\"hg-cmd\">hg status</command> after " 1.10711 "the commit immediately confirms the error." 1.10712 msgstr "" 1.10713 1.10714 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10715 -#: ../en/ch08-undo.xml:56 1.10716 +#: ../en/ch09-undo.xml:56 1.10717 msgid "" 1.10718 "The commit captured the changes to the file <filename>a</filename>, but not " 1.10719 "the new file <filename>b</filename>. If I were to push this changeset to a " 1.10720 @@ -9191,7 +10758,7 @@ 1.10721 msgstr "" 1.10722 1.10723 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10724 -#: ../en/ch08-undo.xml:65 1.10725 +#: ../en/ch09-undo.xml:65 1.10726 msgid "" 1.10727 "However, luck is with me&emdash;I've caught my error before I pushed the " 1.10728 "changeset. I use the <command role=\"hg-cmd\">hg rollback</command> command, " 1.10729 @@ -9199,7 +10766,7 @@ 1.10730 msgstr "" 1.10731 1.10732 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10733 -#: ../en/ch08-undo.xml:72 1.10734 +#: ../en/ch09-undo.xml:72 1.10735 msgid "" 1.10736 "Notice that the changeset is no longer present in the repository's history, " 1.10737 "and the working directory once again thinks that the file <filename>a</" 1.10738 @@ -9210,12 +10777,12 @@ 1.10739 msgstr "" 1.10740 1.10741 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10742 -#: ../en/ch08-undo.xml:85 1.10743 +#: ../en/ch09-undo.xml:85 1.10744 msgid "The erroneous pull" 1.10745 msgstr "错误的抓取" 1.10746 1.10747 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10748 -#: ../en/ch08-undo.xml:87 1.10749 +#: ../en/ch09-undo.xml:87 1.10750 msgid "" 1.10751 "It's common practice with Mercurial to maintain separate development branches " 1.10752 "of a project in different repositories. Your development team might have one " 1.10753 @@ -9224,7 +10791,7 @@ 1.10754 msgstr "" 1.10755 1.10756 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10757 -#: ../en/ch08-undo.xml:94 1.10758 +#: ../en/ch09-undo.xml:94 1.10759 msgid "" 1.10760 "Given this, you can imagine that the consequences could be messy if you had a " 1.10761 "local <quote>0.9</quote> repository, and accidentally pulled changes from the " 1.10762 @@ -9237,7 +10804,7 @@ 1.10763 msgstr "" 1.10764 1.10765 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10766 -#: ../en/ch08-undo.xml:106 1.10767 +#: ../en/ch09-undo.xml:106 1.10768 msgid "" 1.10769 "The <command role=\"hg-cmd\">hg rollback</command> command will work nicely " 1.10770 "to expunge all of the changesets that you just pulled. Mercurial groups all " 1.10771 @@ -9247,12 +10814,12 @@ 1.10772 msgstr "" 1.10773 1.10774 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10775 -#: ../en/ch08-undo.xml:115 1.10776 +#: ../en/ch09-undo.xml:115 1.10777 msgid "Rolling back is useless once you've pushed" 1.10778 msgstr "当完成推送后,回滚是无效的" 1.10779 1.10780 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10781 -#: ../en/ch08-undo.xml:117 1.10782 +#: ../en/ch09-undo.xml:117 1.10783 msgid "" 1.10784 "The value of the <command role=\"hg-cmd\">hg rollback</command> command drops " 1.10785 "to zero once you've pushed your changes to another repository. Rolling back " 1.10786 @@ -9263,35 +10830,35 @@ 1.10787 msgstr "" 1.10788 1.10789 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10790 -#: ../en/ch08-undo.xml:126 1.10791 +#: ../en/ch09-undo.xml:126 1.10792 msgid "" 1.10793 "If you've pushed a change to another repository&emdash;particularly if it's a " 1.10794 "shared repository&emdash;it has essentially <quote>escaped into the wild,</" 1.10795 -"quote> and you'll have to recover from your mistake in a different way. What " 1.10796 -"will happen if you push a changeset somewhere, then roll it back, then pull " 1.10797 -"from the repository you pushed to, is that the changeset will reappear in " 1.10798 -"your repository." 1.10799 -msgstr "" 1.10800 - 1.10801 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.10802 -#: ../en/ch08-undo.xml:135 1.10803 +"quote> and you'll have to recover from your mistake in a different way. If " 1.10804 +"you push a changeset somewhere, then roll it back, then pull from the " 1.10805 +"repository you pushed to, the changeset you thought you'd gotten rid of will " 1.10806 +"simply reappear in your repository." 1.10807 +msgstr "" 1.10808 + 1.10809 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.10810 +#: ../en/ch09-undo.xml:135 1.10811 msgid "" 1.10812 "(If you absolutely know for sure that the change you want to roll back is the " 1.10813 "most recent change in the repository that you pushed to, <emphasis>and</" 1.10814 "emphasis> you know that nobody else could have pulled it from that " 1.10815 "repository, you can roll back the changeset there, too, but you really should " 1.10816 -"really not rely on this working reliably. If you do this, sooner or later a " 1.10817 -"change really will make it into a repository that you don't directly control " 1.10818 -"(or have forgotten about), and come back to bite you.)" 1.10819 +"not expect this to work reliably. Sooner or later a change really will make " 1.10820 +"it into a repository that you don't directly control (or have forgotten " 1.10821 +"about), and come back to bite you.)" 1.10822 msgstr "" 1.10823 1.10824 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10825 -#: ../en/ch08-undo.xml:147 1.10826 +#: ../en/ch09-undo.xml:147 1.10827 msgid "You can only roll back once" 1.10828 msgstr "你只能回滚一次" 1.10829 1.10830 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10831 -#: ../en/ch08-undo.xml:149 1.10832 +#: ../en/ch09-undo.xml:149 1.10833 msgid "" 1.10834 "Mercurial stores exactly one transaction in its transaction log; that " 1.10835 "transaction is the most recent one that occurred in the repository. This " 1.10836 @@ -9301,19 +10868,19 @@ 1.10837 msgstr "" 1.10838 1.10839 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10840 -#: ../en/ch08-undo.xml:158 1.10841 +#: ../en/ch09-undo.xml:158 1.10842 msgid "" 1.10843 "Once you've rolled back one transaction in a repository, you can't roll back " 1.10844 "again in that repository until you perform another commit or pull." 1.10845 msgstr "" 1.10846 1.10847 #. type: Content of: <book><chapter><sect1><title> 1.10848 -#: ../en/ch08-undo.xml:165 1.10849 +#: ../en/ch09-undo.xml:165 1.10850 msgid "Reverting the mistaken change" 1.10851 msgstr "撤销错误的修改" 1.10852 1.10853 #. type: Content of: <book><chapter><sect1><para> 1.10854 -#: ../en/ch08-undo.xml:167 1.10855 +#: ../en/ch09-undo.xml:167 1.10856 msgid "" 1.10857 "If you make a modification to a file, and decide that you really didn't want " 1.10858 "to change the file at all, and you haven't yet committed your changes, the " 1.10859 @@ -9325,7 +10892,7 @@ 1.10860 msgstr "" 1.10861 1.10862 #. type: Content of: <book><chapter><sect1><para> 1.10863 -#: ../en/ch08-undo.xml:176 1.10864 +#: ../en/ch09-undo.xml:176 1.10865 msgid "" 1.10866 "Let's illustrate how the <command role=\"hg-cmd\">hg revert</command> command " 1.10867 "works with yet another small example. We'll begin by modifying a file that " 1.10868 @@ -9333,22 +10900,41 @@ 1.10869 msgstr "" 1.10870 1.10871 #. type: Content of: <book><chapter><sect1><para> 1.10872 -#: ../en/ch08-undo.xml:183 1.10873 +#: ../en/ch09-undo.xml:183 1.10874 msgid "" 1.10875 "If we don't want that change, we can simply <command role=\"hg-cmd\">hg " 1.10876 "revert</command> the file." 1.10877 msgstr "" 1.10878 1.10879 #. type: Content of: <book><chapter><sect1><para> 1.10880 -#: ../en/ch08-undo.xml:189 1.10881 +#: ../en/ch09-undo.xml:189 1.10882 msgid "" 1.10883 "The <command role=\"hg-cmd\">hg revert</command> command provides us with an " 1.10884 "extra degree of safety by saving our modified file with a <filename>.orig</" 1.10885 "filename> extension." 1.10886 msgstr "" 1.10887 1.10888 -#. type: Content of: <book><chapter><sect1><para> 1.10889 -#: ../en/ch08-undo.xml:196 1.10890 +#. type: Content of: <book><chapter><sect1><tip><title> 1.10891 +#: ../en/ch09-undo.xml:197 1.10892 +#, fuzzy 1.10893 +msgid "Be careful with <filename>.orig</filename> files" 1.10894 +msgstr "分类补丁<filename role=\"special\">系列</filename>" 1.10895 + 1.10896 +#. type: Content of: <book><chapter><sect1><tip><para> 1.10897 +#: ../en/ch09-undo.xml:199 1.10898 +msgid "" 1.10899 +"It's extremely unlikely that you are either using Mercurial to manage files " 1.10900 +"with <filename>.orig</filename> extensions or that you even care about the " 1.10901 +"contents of such files. Just in case, though, it's useful to remember that " 1.10902 +"<command role=\"hg-cmd\">hg revert</command> will unconditionally overwrite " 1.10903 +"an existing file with a <filename>.orig</filename> extension. For instance, " 1.10904 +"if you already have a file named <filename>foo.orig</filename> when you " 1.10905 +"revert <filename>foo</filename>, the contents of <filename>foo.orig</" 1.10906 +"filename> will be clobbered." 1.10907 +msgstr "" 1.10908 + 1.10909 +#. type: Content of: <book><chapter><sect1><para> 1.10910 +#: ../en/ch09-undo.xml:211 1.10911 msgid "" 1.10912 "Here is a summary of the cases that the <command role=\"hg-cmd\">hg revert</" 1.10913 "command> command can deal with. We will describe each of these in more " 1.10914 @@ -9356,26 +10942,26 @@ 1.10915 msgstr "" 1.10916 1.10917 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10918 -#: ../en/ch08-undo.xml:201 1.10919 +#: ../en/ch09-undo.xml:216 1.10920 msgid "If you modify a file, it will restore the file to its unmodified state." 1.10921 msgstr "" 1.10922 1.10923 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10924 -#: ../en/ch08-undo.xml:204 1.10925 +#: ../en/ch09-undo.xml:219 1.10926 msgid "" 1.10927 "If you <command role=\"hg-cmd\">hg add</command> a file, it will undo the " 1.10928 "<quote>added</quote> state of the file, but leave the file itself untouched." 1.10929 msgstr "" 1.10930 1.10931 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10932 -#: ../en/ch08-undo.xml:208 1.10933 +#: ../en/ch09-undo.xml:223 1.10934 msgid "" 1.10935 "If you delete a file without telling Mercurial, it will restore the file to " 1.10936 "its unmodified contents." 1.10937 msgstr "" 1.10938 1.10939 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.10940 -#: ../en/ch08-undo.xml:211 1.10941 +#: ../en/ch09-undo.xml:226 1.10942 msgid "" 1.10943 "If you use the <command role=\"hg-cmd\">hg remove</command> command to remove " 1.10944 "a file, it will undo the <quote>removed</quote> state of the file, and " 1.10945 @@ -9383,12 +10969,12 @@ 1.10946 msgstr "" 1.10947 1.10948 #. type: Content of: <book><chapter><sect1><sect2><title> 1.10949 -#: ../en/ch08-undo.xml:218 1.10950 +#: ../en/ch09-undo.xml:233 1.10951 msgid "File management errors" 1.10952 msgstr "文件管理错误" 1.10953 1.10954 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10955 -#: ../en/ch08-undo.xml:220 1.10956 +#: ../en/ch09-undo.xml:235 1.10957 msgid "" 1.10958 "The <command role=\"hg-cmd\">hg revert</command> command is useful for more " 1.10959 "than just modified files. It lets you reverse the results of all of " 1.10960 @@ -9398,7 +10984,7 @@ 1.10961 1.10962 # 1.10963 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10964 -#: ../en/ch08-undo.xml:226 1.10965 +#: ../en/ch09-undo.xml:241 1.10966 msgid "" 1.10967 "If you <command role=\"hg-cmd\">hg add</command> a file, then decide that in " 1.10968 "fact you don't want Mercurial to track it, use <command role=\"hg-cmd\">hg " 1.10969 @@ -9407,7 +10993,7 @@ 1.10970 msgstr "" 1.10971 1.10972 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10973 -#: ../en/ch08-undo.xml:234 1.10974 +#: ../en/ch09-undo.xml:249 1.10975 msgid "" 1.10976 "Similarly, if you ask Mercurial to <command role=\"hg-cmd\">hg remove</" 1.10977 "command> a file, you can use <command role=\"hg-cmd\">hg revert</command> to " 1.10978 @@ -9419,7 +11005,7 @@ 1.10979 1.10980 # 1.10981 #. type: Content of: <book><chapter><sect1><sect2><para> 1.10982 -#: ../en/ch08-undo.xml:245 1.10983 +#: ../en/ch09-undo.xml:260 1.10984 msgid "" 1.10985 "If you revert a <command role=\"hg-cmd\">hg copy</command>, the copied-to " 1.10986 "file remains in your working directory afterwards, untracked. Since a copy " 1.10987 @@ -9427,90 +11013,39 @@ 1.10988 "with the copied-from file." 1.10989 msgstr "" 1.10990 1.10991 -#. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.10992 -#: ../en/ch08-undo.xml:254 1.10993 -msgid "A slightly special case: reverting a rename" 1.10994 -msgstr "一个稍微特别的案例:撤销改名" 1.10995 - 1.10996 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.10997 -#: ../en/ch08-undo.xml:256 1.10998 -msgid "" 1.10999 -"If you <command role=\"hg-cmd\">hg rename</command> a file, there is one " 1.11000 -"small detail that you should remember. When you <command role=\"hg-cmd\">hg " 1.11001 -"revert</command> a rename, it's not enough to provide the name of the renamed-" 1.11002 -"to file, as you can see here." 1.11003 -msgstr "" 1.11004 - 1.11005 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11006 -#: ../en/ch08-undo.xml:264 1.11007 -msgid "" 1.11008 -"As you can see from the output of <command role=\"hg-cmd\">hg status</" 1.11009 -"command>, the renamed-to file is no longer identified as added, but the " 1.11010 -"renamed-<emphasis>from</emphasis> file is still removed! This is counter-" 1.11011 -"intuitive (at least to me), but at least it's easy to deal with." 1.11012 -msgstr "" 1.11013 - 1.11014 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11015 -#: ../en/ch08-undo.xml:273 1.11016 -msgid "" 1.11017 -"So remember, to revert a <command role=\"hg-cmd\">hg rename</command>, you " 1.11018 -"must provide <emphasis>both</emphasis> the source and destination names." 1.11019 -msgstr "" 1.11020 - 1.11021 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11022 -#: ../en/ch08-undo.xml:278 1.11023 -msgid "% TODO: the output doesn't look like it will be removed!" 1.11024 -msgstr "" 1.11025 - 1.11026 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11027 -#: ../en/ch08-undo.xml:281 1.11028 -msgid "" 1.11029 -"(By the way, if you rename a file, then modify the renamed-to file, then " 1.11030 -"revert both components of the rename, when Mercurial restores the file that " 1.11031 -"was removed as part of the rename, it will be unmodified. If you need the " 1.11032 -"modifications in the renamed-to file to show up in the renamed-from file, " 1.11033 -"don't forget to copy them over.)" 1.11034 -msgstr "" 1.11035 - 1.11036 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11037 -#: ../en/ch08-undo.xml:288 1.11038 -msgid "" 1.11039 -"These fiddly aspects of reverting a rename arguably constitute a small bug in " 1.11040 -"Mercurial." 1.11041 -msgstr "" 1.11042 - 1.11043 #. type: Content of: <book><chapter><sect1><title> 1.11044 -#: ../en/ch08-undo.xml:295 1.11045 +#: ../en/ch09-undo.xml:271 1.11046 msgid "Dealing with committed changes" 1.11047 msgstr "处理已经提交的修改" 1.11048 1.11049 #. type: Content of: <book><chapter><sect1><para> 1.11050 -#: ../en/ch08-undo.xml:297 1.11051 -msgid "" 1.11052 -"Consider a case where you have committed a change $a$, and another change $b$ " 1.11053 -"on top of it; you then realise that change $a$ was incorrect. Mercurial lets " 1.11054 -"you <quote>back out</quote> an entire changeset automatically, and building " 1.11055 -"blocks that let you reverse part of a changeset by hand." 1.11056 -msgstr "" 1.11057 - 1.11058 -#. type: Content of: <book><chapter><sect1><para> 1.11059 -#: ../en/ch08-undo.xml:303 1.11060 +#: ../en/ch09-undo.xml:273 1.11061 +msgid "" 1.11062 +"Consider a case where you have committed a change <emphasis>a</emphasis>, and " 1.11063 +"another change <emphasis>b</emphasis> on top of it; you then realise that " 1.11064 +"change <emphasis>a</emphasis> was incorrect. Mercurial lets you <quote>back " 1.11065 +"out</quote> an entire changeset automatically, and building blocks that let " 1.11066 +"you reverse part of a changeset by hand." 1.11067 +msgstr "" 1.11068 + 1.11069 +#. type: Content of: <book><chapter><sect1><para> 1.11070 +#: ../en/ch09-undo.xml:281 1.11071 msgid "" 1.11072 "Before you read this section, here's something to keep in mind: the <command " 1.11073 -"role=\"hg-cmd\">hg backout</command> command undoes changes by " 1.11074 -"<emphasis>adding</emphasis> history, not by modifying or erasing it. It's " 1.11075 -"the right tool to use if you're fixing bugs, but not if you're trying to undo " 1.11076 -"some change that has catastrophic consequences. To deal with those, see " 1.11077 -"<xref linkend=\"sec:undo:aaaiiieee\"/>." 1.11078 +"role=\"hg-cmd\">hg backout</command> command undoes the effect of a change by " 1.11079 +"<emphasis>adding</emphasis> to your repository's history, not by modifying or " 1.11080 +"erasing it. It's the right tool to use if you're fixing bugs, but not if " 1.11081 +"you're trying to undo some change that has catastrophic consequences. To " 1.11082 +"deal with those, see <xref linkend=\"sec:undo:aaaiiieee\"/>." 1.11083 msgstr "" 1.11084 1.11085 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11086 -#: ../en/ch08-undo.xml:312 1.11087 +#: ../en/ch09-undo.xml:291 1.11088 msgid "Backing out a changeset" 1.11089 msgstr "恢复一个修改集" 1.11090 1.11091 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11092 -#: ../en/ch08-undo.xml:314 1.11093 +#: ../en/ch09-undo.xml:293 1.11094 msgid "" 1.11095 "The <command role=\"hg-cmd\">hg backout</command> command lets you " 1.11096 "<quote>undo</quote> the effects of an entire changeset in an automated " 1.11097 @@ -9522,7 +11057,7 @@ 1.11098 1.11099 # 1.11100 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11101 -#: ../en/ch08-undo.xml:323 1.11102 +#: ../en/ch09-undo.xml:302 1.11103 msgid "" 1.11104 "The operation of the <command role=\"hg-cmd\">hg backout</command> command is " 1.11105 "a little intricate, so let's illustrate it with some examples. First, we'll " 1.11106 @@ -9530,7 +11065,7 @@ 1.11107 msgstr "" 1.11108 1.11109 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11110 -#: ../en/ch08-undo.xml:330 1.11111 +#: ../en/ch09-undo.xml:309 1.11112 msgid "" 1.11113 "The <command role=\"hg-cmd\">hg backout</command> command takes a single " 1.11114 "changeset ID as its argument; this is the changeset to back out. Normally, " 1.11115 @@ -9541,17 +11076,17 @@ 1.11116 msgstr "" 1.11117 1.11118 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11119 -#: ../en/ch08-undo.xml:341 1.11120 +#: ../en/ch09-undo.xml:320 1.11121 msgid "Backing out the tip changeset" 1.11122 msgstr "恢复顶点修改集" 1.11123 1.11124 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11125 -#: ../en/ch08-undo.xml:343 1.11126 +#: ../en/ch09-undo.xml:322 1.11127 msgid "We're going to start by backing out the last changeset we committed." 1.11128 msgstr "" 1.11129 1.11130 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11131 -#: ../en/ch08-undo.xml:348 1.11132 +#: ../en/ch09-undo.xml:327 1.11133 msgid "" 1.11134 "You can see that the second line from <filename>myfile</filename> is no " 1.11135 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg " 1.11136 @@ -9564,24 +11099,24 @@ 1.11137 msgstr "" 1.11138 1.11139 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.11140 -#: ../en/ch08-undo.xml:361 ../en/ch08-undo.xml:473 1.11141 +#: ../en/ch09-undo.xml:340 ../en/ch09-undo.xml:460 1.11142 msgid "" 1.11143 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> " 1.11144 "command" 1.11145 msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 恢复一个修改" 1.11146 1.11147 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.11148 -#: ../en/ch08-undo.xml:364 1.11149 +#: ../en/ch09-undo.xml:343 1.11150 msgid "<imageobject><imagedata fileref=\"figs/undo-simple.png\"/></imageobject>" 1.11151 msgstr "" 1.11152 1.11153 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11154 -#: ../en/ch08-undo.xml:371 1.11155 +#: ../en/ch09-undo.xml:350 1.11156 msgid "Backing out a non-tip change" 1.11157 msgstr "恢复非顶点的修改" 1.11158 1.11159 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11160 -#: ../en/ch08-undo.xml:373 1.11161 +#: ../en/ch09-undo.xml:352 1.11162 msgid "" 1.11163 "If you want to back out a change other than the last one you committed, pass " 1.11164 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command " 1.11165 @@ -9589,14 +11124,14 @@ 1.11166 msgstr "" 1.11167 1.11168 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11169 -#: ../en/ch08-undo.xml:380 1.11170 +#: ../en/ch09-undo.xml:359 1.11171 msgid "" 1.11172 "This makes backing out any changeset a <quote>one-shot</quote> operation " 1.11173 "that's usually simple and fast." 1.11174 msgstr "" 1.11175 1.11176 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11177 -#: ../en/ch08-undo.xml:386 1.11178 +#: ../en/ch09-undo.xml:365 1.11179 msgid "" 1.11180 "If you take a look at the contents of <filename>myfile</filename> after the " 1.11181 "backout finishes, you'll see that the first and third changes are present, " 1.11182 @@ -9604,53 +11139,58 @@ 1.11183 msgstr "" 1.11184 1.11185 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11186 -#: ../en/ch08-undo.xml:393 1.11187 +#: ../en/ch09-undo.xml:372 1.11188 msgid "" 1.11189 "As the graphical history in <xref linkend=\"fig:undo:backout-non-tip\"/> " 1.11190 -"illustrates, Mercurial actually commits <emphasis>two</emphasis> changes in " 1.11191 -"this kind of situation (the box-shaped nodes are the ones that Mercurial " 1.11192 -"commits automatically). Before Mercurial begins the backout process, it " 1.11193 -"first remembers what the current parent of the working directory is. It then " 1.11194 -"backs out the target changeset, and commits that as a changeset. Finally, it " 1.11195 -"merges back to the previous parent of the working directory, and commits the " 1.11196 -"result of the merge." 1.11197 -msgstr "" 1.11198 - 1.11199 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.11200 -#: ../en/ch08-undo.xml:404 1.11201 -msgid "" 1.11202 -"% TODO: to me it looks like mercurial doesn't commit the second merge " 1.11203 -"automatically!" 1.11204 +"illustrates, Mercurial still commits one change in this kind of situation " 1.11205 +"(the box-shaped node is the ones that Mercurial commits automatically), but " 1.11206 +"the revision graph now looks different. Before Mercurial begins the backout " 1.11207 +"process, it first remembers what the current parent of the working directory " 1.11208 +"is. It then backs out the target changeset, and commits that as a " 1.11209 +"changeset. Finally, it merges back to the previous parent of the working " 1.11210 +"directory, but notice that it <emphasis>does not commit</emphasis> the result " 1.11211 +"of the merge. The repository now contains two heads, and the working " 1.11212 +"directory is in a merge state." 1.11213 msgstr "" 1.11214 1.11215 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.11216 -#: ../en/ch08-undo.xml:408 1.11217 +#: ../en/ch09-undo.xml:387 1.11218 msgid "" 1.11219 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg " 1.11220 "backout</command> command" 1.11221 msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 自动恢复非顶点的修改" 1.11222 1.11223 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.11224 -#: ../en/ch08-undo.xml:411 1.11225 +#: ../en/ch09-undo.xml:390 1.11226 msgid "" 1.11227 "<imageobject><imagedata fileref=\"figs/undo-non-tip.png\"/></imageobject>" 1.11228 msgstr "" 1.11229 1.11230 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11231 -#: ../en/ch08-undo.xml:416 1.11232 +#: ../en/ch09-undo.xml:395 1.11233 msgid "" 1.11234 "The result is that you end up <quote>back where you were</quote>, only with " 1.11235 "some extra history that undoes the effect of the changeset you wanted to back " 1.11236 "out." 1.11237 msgstr "" 1.11238 1.11239 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11240 +#: ../en/ch09-undo.xml:399 1.11241 +msgid "" 1.11242 +"You might wonder why Mercurial does not commit the result of the merge that " 1.11243 +"it performed. The reason lies in Mercurial behaving conservatively: a merge " 1.11244 +"naturally has more scope for error than simply undoing the effect of the tip " 1.11245 +"changeset, so your work will be safest if you first inspect (and test!) the " 1.11246 +"result of the merge, <emphasis>then</emphasis> commit it." 1.11247 +msgstr "" 1.11248 + 1.11249 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.11250 -#: ../en/ch08-undo.xml:421 1.11251 +#: ../en/ch09-undo.xml:408 1.11252 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option" 1.11253 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>" 1.11254 1.11255 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.11256 -#: ../en/ch08-undo.xml:424 1.11257 +#: ../en/ch09-undo.xml:411 1.11258 msgid "" 1.11259 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option " 1.11260 "will do the <quote>right thing</quote> whether or not the changeset you're " 1.11261 @@ -9660,12 +11200,12 @@ 1.11262 msgstr "" 1.11263 1.11264 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11265 -#: ../en/ch08-undo.xml:435 1.11266 +#: ../en/ch09-undo.xml:422 1.11267 msgid "Gaining more control of the backout process" 1.11268 msgstr "在恢复处理中获得更多控制" 1.11269 1.11270 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11271 -#: ../en/ch08-undo.xml:437 1.11272 +#: ../en/ch09-undo.xml:424 1.11273 msgid "" 1.11274 "While I've recommended that you always use the <option role=\"hg-opt-backout" 1.11275 "\">--merge</option> option when backing out a change, the <command role=\"hg-" 1.11276 @@ -9678,14 +11218,14 @@ 1.11277 msgstr "" 1.11278 1.11279 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11280 -#: ../en/ch08-undo.xml:450 1.11281 +#: ../en/ch09-undo.xml:437 1.11282 msgid "" 1.11283 "As with our earlier example, We'll commit a third changeset, then back out " 1.11284 "its parent, and see what happens." 1.11285 msgstr "" 1.11286 1.11287 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11288 -#: ../en/ch08-undo.xml:456 1.11289 +#: ../en/ch09-undo.xml:443 1.11290 msgid "" 1.11291 "Our new changeset is again a descendant of the changeset we backout out; it's " 1.11292 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that " 1.11293 @@ -9694,7 +11234,7 @@ 1.11294 msgstr "" 1.11295 1.11296 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11297 -#: ../en/ch08-undo.xml:464 1.11298 +#: ../en/ch09-undo.xml:451 1.11299 msgid "" 1.11300 "Again, it's easier to see what has happened by looking at a graph of the " 1.11301 "revision history, in <xref linkend=\"fig:undo:backout-manual\"/>. This makes " 1.11302 @@ -9704,12 +11244,12 @@ 1.11303 msgstr "" 1.11304 1.11305 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.11306 -#: ../en/ch08-undo.xml:476 1.11307 +#: ../en/ch09-undo.xml:463 1.11308 msgid "<imageobject><imagedata fileref=\"figs/undo-manual.png\"/></imageobject>" 1.11309 msgstr "" 1.11310 1.11311 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11312 -#: ../en/ch08-undo.xml:481 1.11313 +#: ../en/ch09-undo.xml:468 1.11314 msgid "" 1.11315 "After the <command role=\"hg-cmd\">hg backout</command> command has " 1.11316 "completed, it leaves the new <quote>backout</quote> changeset as the parent " 1.11317 @@ -9717,12 +11257,12 @@ 1.11318 msgstr "" 1.11319 1.11320 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11321 -#: ../en/ch08-undo.xml:488 1.11322 +#: ../en/ch09-undo.xml:475 1.11323 msgid "Now we have two isolated sets of changes." 1.11324 msgstr "" 1.11325 1.11326 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11327 -#: ../en/ch08-undo.xml:492 1.11328 +#: ../en/ch09-undo.xml:479 1.11329 msgid "" 1.11330 "Let's think about what we expect to see as the contents of <filename>myfile</" 1.11331 "filename> now. The first change should be present, because we've never " 1.11332 @@ -9733,73 +11273,73 @@ 1.11333 msgstr "" 1.11334 1.11335 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11336 -#: ../en/ch08-undo.xml:502 1.11337 +#: ../en/ch09-undo.xml:489 1.11338 msgid "" 1.11339 "To get the third change back into the file, we just do a normal merge of our " 1.11340 "two heads." 1.11341 msgstr "" 1.11342 1.11343 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11344 -#: ../en/ch08-undo.xml:507 1.11345 +#: ../en/ch09-undo.xml:494 1.11346 msgid "" 1.11347 "Afterwards, the graphical history of our repository looks like <xref linkend=" 1.11348 "\"fig:undo:backout-manual-merge\"/>." 1.11349 msgstr "" 1.11350 1.11351 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.11352 -#: ../en/ch08-undo.xml:512 1.11353 +#: ../en/ch09-undo.xml:499 1.11354 msgid "Manually merging a backout change" 1.11355 msgstr "手工合并恢复修改" 1.11356 1.11357 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.11358 -#: ../en/ch08-undo.xml:514 1.11359 +#: ../en/ch09-undo.xml:501 1.11360 msgid "" 1.11361 "<imageobject><imagedata fileref=\"figs/undo-manual-merge.png\"/></imageobject>" 1.11362 msgstr "" 1.11363 1.11364 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11365 -#: ../en/ch08-undo.xml:521 1.11366 +#: ../en/ch09-undo.xml:508 1.11367 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does" 1.11368 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕" 1.11369 1.11370 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11371 -#: ../en/ch08-undo.xml:524 1.11372 +#: ../en/ch09-undo.xml:511 1.11373 msgid "" 1.11374 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</" 1.11375 "command> command works." 1.11376 msgstr "" 1.11377 1.11378 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11379 -#: ../en/ch08-undo.xml:527 1.11380 +#: ../en/ch09-undo.xml:514 1.11381 msgid "" 1.11382 "It ensures that the working directory is <quote>clean</quote>, i.e. that the " 1.11383 "output of <command role=\"hg-cmd\">hg status</command> would be empty." 1.11384 msgstr "" 1.11385 1.11386 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11387 -#: ../en/ch08-undo.xml:531 1.11388 +#: ../en/ch09-undo.xml:518 1.11389 msgid "" 1.11390 "It remembers the current parent of the working directory. Let's call this " 1.11391 -"changeset <literal>orig</literal>" 1.11392 +"changeset <literal>orig</literal>." 1.11393 msgstr "" 1.11394 1.11395 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11396 -#: ../en/ch08-undo.xml:535 1.11397 +#: ../en/ch09-undo.xml:522 1.11398 msgid "" 1.11399 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to " 1.11400 "sync the working directory to the changeset you want to back out. Let's call " 1.11401 -"this changeset <literal>backout</literal>" 1.11402 +"this changeset <literal>backout</literal>." 1.11403 msgstr "" 1.11404 1.11405 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11406 -#: ../en/ch08-undo.xml:540 1.11407 +#: ../en/ch09-undo.xml:527 1.11408 msgid "" 1.11409 "It finds the parent of that changeset. Let's call that changeset " 1.11410 "<literal>parent</literal>." 1.11411 msgstr "" 1.11412 1.11413 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11414 -#: ../en/ch08-undo.xml:543 1.11415 +#: ../en/ch09-undo.xml:530 1.11416 msgid "" 1.11417 "For each file that the <literal>backout</literal> changeset affected, it does " 1.11418 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on " 1.11419 @@ -9808,14 +11348,14 @@ 1.11420 msgstr "" 1.11421 1.11422 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11423 -#: ../en/ch08-undo.xml:550 1.11424 +#: ../en/ch09-undo.xml:537 1.11425 msgid "" 1.11426 "It commits the result as a new changeset. This changeset has " 1.11427 "<literal>backout</literal> as its parent." 1.11428 msgstr "" 1.11429 1.11430 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11431 -#: ../en/ch08-undo.xml:554 1.11432 +#: ../en/ch09-undo.xml:541 1.11433 msgid "" 1.11434 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the " 1.11435 "command line, it merges with <literal>orig</literal>, and commits the result " 1.11436 @@ -9823,7 +11363,7 @@ 1.11437 msgstr "" 1.11438 1.11439 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11440 -#: ../en/ch08-undo.xml:560 1.11441 +#: ../en/ch09-undo.xml:547 1.11442 msgid "" 1.11443 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</" 1.11444 "command> command would be to <command role=\"hg-cmd\">hg export</command> the " 1.11445 @@ -9834,7 +11374,7 @@ 1.11446 msgstr "" 1.11447 1.11448 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11449 -#: ../en/ch08-undo.xml:570 1.11450 +#: ../en/ch09-undo.xml:557 1.11451 msgid "" 1.11452 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, " 1.11453 "a commit, a merge, and another commit is to give the merge machinery the best " 1.11454 @@ -9843,7 +11383,7 @@ 1.11455 msgstr "" 1.11456 1.11457 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11458 -#: ../en/ch08-undo.xml:577 1.11459 +#: ../en/ch09-undo.xml:564 1.11460 msgid "" 1.11461 "If you're backing out a changeset that's 100 revisions back in your project's " 1.11462 "history, the chances that the <command>patch</command> command will be able " 1.11463 @@ -9858,12 +11398,12 @@ 1.11464 msgstr "" 1.11465 1.11466 #. type: Content of: <book><chapter><sect1><title> 1.11467 -#: ../en/ch08-undo.xml:594 1.11468 +#: ../en/ch09-undo.xml:581 1.11469 msgid "Changes that should never have been" 1.11470 msgstr "不该发生的修改" 1.11471 1.11472 #. type: Content of: <book><chapter><sect1><para> 1.11473 -#: ../en/ch08-undo.xml:596 1.11474 +#: ../en/ch09-undo.xml:583 1.11475 msgid "" 1.11476 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command " 1.11477 "is exactly what you need if you want to undo the effects of a change. It " 1.11478 @@ -9872,7 +11412,7 @@ 1.11479 msgstr "" 1.11480 1.11481 #. type: Content of: <book><chapter><sect1><para> 1.11482 -#: ../en/ch08-undo.xml:602 1.11483 +#: ../en/ch09-undo.xml:589 1.11484 msgid "" 1.11485 "On rare occasions, though, you may find that you've committed a change that " 1.11486 "really should not be present in the repository at all. For example, it would " 1.11487 @@ -9884,7 +11424,7 @@ 1.11488 msgstr "" 1.11489 1.11490 #. type: Content of: <book><chapter><sect1><para> 1.11491 -#: ../en/ch08-undo.xml:611 1.11492 +#: ../en/ch09-undo.xml:598 1.11493 msgid "" 1.11494 "Before I discuss the options that you have if you commit a <quote>brown paper " 1.11495 "bag</quote> change (the kind that's so bad that you want to pull a brown " 1.11496 @@ -9893,7 +11433,7 @@ 1.11497 msgstr "" 1.11498 1.11499 #. type: Content of: <book><chapter><sect1><para> 1.11500 -#: ../en/ch08-undo.xml:616 1.11501 +#: ../en/ch09-undo.xml:603 1.11502 msgid "" 1.11503 "Since Mercurial treats history as accumulative&emdash;every change builds on " 1.11504 "top of all changes that preceded it&emdash;you generally can't just make " 1.11505 @@ -9905,7 +11445,7 @@ 1.11506 msgstr "" 1.11507 1.11508 #. type: Content of: <book><chapter><sect1><para> 1.11509 -#: ../en/ch08-undo.xml:625 1.11510 +#: ../en/ch09-undo.xml:612 1.11511 msgid "" 1.11512 "After you've pushed a bad change to another repository, you <emphasis>could</" 1.11513 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make " 1.11514 @@ -9915,18 +11455,18 @@ 1.11515 msgstr "" 1.11516 1.11517 #. type: Content of: <book><chapter><sect1><para> 1.11518 -#: ../en/ch08-undo.xml:633 1.11519 +#: ../en/ch09-undo.xml:620 1.11520 msgid "" 1.11521 "If a situation like this arises, and you know which repositories your bad " 1.11522 "change has propagated into, you can <emphasis>try</emphasis> to get rid of " 1.11523 -"the changeefrom <emphasis>every</emphasis> one of those repositories. This " 1.11524 +"the change from <emphasis>every</emphasis> one of those repositories. This " 1.11525 "is, of course, not a satisfactory solution: if you miss even a single " 1.11526 "repository while you're expunging, the change is still <quote>in the wild</" 1.11527 "quote>, and could propagate further." 1.11528 msgstr "" 1.11529 1.11530 #. type: Content of: <book><chapter><sect1><para> 1.11531 -#: ../en/ch08-undo.xml:641 1.11532 +#: ../en/ch09-undo.xml:628 1.11533 msgid "" 1.11534 "If you've committed one or more changes <emphasis>after</emphasis> the change " 1.11535 "that you'd like to see disappear, your options are further reduced. Mercurial " 1.11536 @@ -9934,21 +11474,135 @@ 1.11537 "changesets intact." 1.11538 msgstr "" 1.11539 1.11540 -#. type: Content of: <book><chapter><sect1><para> 1.11541 -#: ../en/ch08-undo.xml:647 1.11542 -msgid "" 1.11543 -"XXX This needs filling out. The <literal>hg-replay</literal> script in the " 1.11544 -"<literal>examples</literal> directory works, but doesn't handle merge " 1.11545 -"changesets. Kind of an important omission." 1.11546 -msgstr "" 1.11547 - 1.11548 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11549 -#: ../en/ch08-undo.xml:653 1.11550 +#: ../en/ch09-undo.xml:635 1.11551 +#, fuzzy 1.11552 +msgid "Backing out a merge" 1.11553 +msgstr "恢复一个修改集" 1.11554 + 1.11555 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11556 +#: ../en/ch09-undo.xml:637 1.11557 +msgid "" 1.11558 +"Since merges are often complicated, it is not unheard of for a merge to be " 1.11559 +"mangled badly, but committed erroneously. Mercurial provides an important " 1.11560 +"safeguard against bad merges by refusing to commit unresolved files, but " 1.11561 +"human ingenuity guarantees that it is still possible to mess a merge up and " 1.11562 +"commit it." 1.11563 +msgstr "" 1.11564 + 1.11565 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11566 +#: ../en/ch09-undo.xml:644 1.11567 +msgid "" 1.11568 +"Given a bad merge that has been committed, usually the best way to approach " 1.11569 +"it is to simply try to repair the damage by hand. A complete disaster that " 1.11570 +"cannot be easily fixed up by hand ought to be very rare, but the <command " 1.11571 +"role=\"hg-cmd\">hg backout</command> command may help in making the cleanup " 1.11572 +"easier. It offers a <option role=\"hg-opt-backout\">--parent</option> option, " 1.11573 +"which lets you specify which parent to revert to when backing out a merge." 1.11574 +msgstr "" 1.11575 + 1.11576 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.11577 +#: ../en/ch09-undo.xml:655 1.11578 +msgid "A bad merge" 1.11579 +msgstr "" 1.11580 + 1.11581 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.11582 +#: ../en/ch09-undo.xml:657 1.11583 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-1.png\"/></imageobject>" 1.11584 +msgstr "" 1.11585 + 1.11586 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11587 +#: ../en/ch09-undo.xml:662 1.11588 +msgid "" 1.11589 +"Suppose we have a revision graph like that in <xref linkend=\"fig:undo:bad-" 1.11590 +"merge-1\"/>. What we'd like is to <emphasis>redo</emphasis> the merge of " 1.11591 +"revisions 2 and 3." 1.11592 +msgstr "" 1.11593 + 1.11594 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11595 +#: ../en/ch09-undo.xml:667 1.11596 +msgid "One way to do so would be as follows." 1.11597 +msgstr "" 1.11598 + 1.11599 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11600 +#: ../en/ch09-undo.xml:671 1.11601 +msgid "" 1.11602 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=2</command>. This " 1.11603 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4, " 1.11604 +"which is the bad merge, and to when deciding which revision to prefer, to " 1.11605 +"choose parent 2, one of the parents of the merge. The effect can be seen in " 1.11606 +"<xref linkend=\"fig:undo:bad-merge-2\"/>." 1.11607 +msgstr "" 1.11608 + 1.11609 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 1.11610 +#: ../en/ch09-undo.xml:679 1.11611 +#, fuzzy 1.11612 +msgid "Backing out the merge, favoring one parent" 1.11613 +msgstr "恢复顶点修改集" 1.11614 + 1.11615 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 1.11616 +#: ../en/ch09-undo.xml:681 1.11617 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-2.png\"/></imageobject>" 1.11618 +msgstr "" 1.11619 + 1.11620 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11621 +#: ../en/ch09-undo.xml:688 1.11622 +msgid "" 1.11623 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=3</command>. This " 1.11624 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4 " 1.11625 +"again, but this time to choose parent 3, the other parent of the merge. The " 1.11626 +"result is visible in <xref linkend=\"fig:undo:bad-merge-3\"/>, in which the " 1.11627 +"repository now contains three heads." 1.11628 +msgstr "" 1.11629 + 1.11630 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 1.11631 +#: ../en/ch09-undo.xml:696 1.11632 +msgid "Backing out the merge, favoring the other parent" 1.11633 +msgstr "" 1.11634 + 1.11635 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 1.11636 +#: ../en/ch09-undo.xml:699 1.11637 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-3.png\"/></imageobject>" 1.11638 +msgstr "" 1.11639 + 1.11640 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11641 +#: ../en/ch09-undo.xml:706 1.11642 +msgid "" 1.11643 +"Redo the bad merge by merging the two backout heads, which reduces the number " 1.11644 +"of heads in the repository to two, as can be seen in <xref linkend=\"fig:undo:" 1.11645 +"bad-merge-4\"/>." 1.11646 +msgstr "" 1.11647 + 1.11648 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 1.11649 +#: ../en/ch09-undo.xml:711 ../en/ch09-undo.xml:724 1.11650 +#, fuzzy 1.11651 +msgid "Merging the backouts" 1.11652 +msgstr "合并两个顶点" 1.11653 + 1.11654 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 1.11655 +#: ../en/ch09-undo.xml:713 1.11656 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-4.png\"/></imageobject>" 1.11657 +msgstr "" 1.11658 + 1.11659 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11660 +#: ../en/ch09-undo.xml:720 1.11661 +msgid "" 1.11662 +"Merge with the commit that was made after the bad merge, as shown in <xref " 1.11663 +"linkend=\"fig:undo:bad-merge-5\"/>." 1.11664 +msgstr "" 1.11665 + 1.11666 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 1.11667 +#: ../en/ch09-undo.xml:726 1.11668 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-5.png\"/></imageobject>" 1.11669 +msgstr "" 1.11670 + 1.11671 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.11672 +#: ../en/ch09-undo.xml:735 1.11673 msgid "Protect yourself from <quote>escaped</quote> changes" 1.11674 msgstr "使用<quote>校验</quote>修改来保护你自己" 1.11675 1.11676 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11677 -#: ../en/ch08-undo.xml:656 1.11678 +#: ../en/ch09-undo.xml:738 1.11679 msgid "" 1.11680 "If you've committed some changes to your local repository and they've been " 1.11681 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can " 1.11682 @@ -9958,7 +11612,7 @@ 1.11683 msgstr "" 1.11684 1.11685 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11686 -#: ../en/ch08-undo.xml:663 1.11687 +#: ../en/ch09-undo.xml:745 1.11688 msgid "" 1.11689 "By configuring some hooks on that repository to validate incoming changesets " 1.11690 "(see chapter <xref linkend=\"chap:hook\"/>), you can automatically prevent " 1.11691 @@ -9970,20 +11624,83 @@ 1.11692 msgstr "" 1.11693 1.11694 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11695 -#: ../en/ch08-undo.xml:673 1.11696 +#: ../en/ch09-undo.xml:755 1.11697 msgid "" 1.11698 "For instance, an incoming change hook that verifies that a changeset will " 1.11699 -"actually compile can prevent people from inadvertantly <quote>breaking the " 1.11700 +"actually compile can prevent people from inadvertently <quote>breaking the " 1.11701 "build</quote>." 1.11702 msgstr "" 1.11703 1.11704 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.11705 +#: ../en/ch09-undo.xml:762 1.11706 +msgid "What to do about sensitive changes that escape" 1.11707 +msgstr "" 1.11708 + 1.11709 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11710 +#: ../en/ch09-undo.xml:764 1.11711 +msgid "" 1.11712 +"Even a carefully run project can suffer an unfortunate event such as the " 1.11713 +"committing and uncontrolled propagation of a file that contains important " 1.11714 +"passwords." 1.11715 +msgstr "" 1.11716 + 1.11717 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11718 +#: ../en/ch09-undo.xml:768 1.11719 +msgid "" 1.11720 +"If something like this happens to you, and the information that gets " 1.11721 +"accidentally propagated is truly sensitive, your first step should be to " 1.11722 +"mitigate the effect of the leak without trying to control the leak itself. If " 1.11723 +"you are not 100% certain that you know exactly who could have seen the " 1.11724 +"changes, you should immediately change passwords, cancel credit cards, or " 1.11725 +"find some other way to make sure that the information that has leaked is no " 1.11726 +"longer useful. In other words, assume that the change has propagated far and " 1.11727 +"wide, and that there's nothing more you can do." 1.11728 +msgstr "" 1.11729 + 1.11730 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11731 +#: ../en/ch09-undo.xml:779 1.11732 +msgid "" 1.11733 +"You might hope that there would be mechanisms you could use to either figure " 1.11734 +"out who has seen a change or to erase the change permanently everywhere, but " 1.11735 +"there are good reasons why these are not possible." 1.11736 +msgstr "" 1.11737 + 1.11738 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11739 +#: ../en/ch09-undo.xml:784 1.11740 +msgid "" 1.11741 +"Mercurial does not provide an audit trail of who has pulled changes from a " 1.11742 +"repository, because it is usually either impossible to record such " 1.11743 +"information or trivial to spoof it. In a multi-user or networked " 1.11744 +"environment, you should thus be extremely skeptical of yourself if you think " 1.11745 +"that you have identified every place that a sensitive changeset has " 1.11746 +"propagated to. Don't forget that people can and will send bundles by email, " 1.11747 +"have their backup software save data offsite, carry repositories on USB " 1.11748 +"sticks, and find other completely innocent ways to confound your attempts to " 1.11749 +"track down every copy of a problematic change." 1.11750 +msgstr "" 1.11751 + 1.11752 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.11753 +#: ../en/ch09-undo.xml:796 1.11754 +msgid "" 1.11755 +"Mercurial also does not provide a way to make a file or changeset completely " 1.11756 +"disappear from history, because there is no way to enforce its disappearance; " 1.11757 +"someone could easily modify their copy of Mercurial to ignore such " 1.11758 +"directives. In addition, even if Mercurial provided such a capability, " 1.11759 +"someone who simply hadn't pulled a <quote>make this file disappear</quote> " 1.11760 +"changeset wouldn't be affected by it, nor would web crawlers visiting at the " 1.11761 +"wrong time, disk backups, or other mechanisms. Indeed, no distributed " 1.11762 +"revision control system can make data reliably vanish. Providing the illusion " 1.11763 +"of such control could easily give a false sense of security, and be worse " 1.11764 +"than not providing it at all." 1.11765 +msgstr "" 1.11766 + 1.11767 #. type: Content of: <book><chapter><sect1><title> 1.11768 -#: ../en/ch08-undo.xml:680 1.11769 +#: ../en/ch09-undo.xml:812 1.11770 msgid "Finding the source of a bug" 1.11771 msgstr "查找问题的根源" 1.11772 1.11773 #. type: Content of: <book><chapter><sect1><para> 1.11774 -#: ../en/ch08-undo.xml:682 1.11775 +#: ../en/ch09-undo.xml:814 1.11776 msgid "" 1.11777 "While it's all very well to be able to back out a changeset that introduced a " 1.11778 "bug, this requires that you know which changeset to back out. Mercurial " 1.11779 @@ -9993,25 +11710,25 @@ 1.11780 msgstr "" 1.11781 1.11782 #. type: Content of: <book><chapter><sect1><para> 1.11783 -#: ../en/ch08-undo.xml:689 1.11784 +#: ../en/ch09-undo.xml:821 1.11785 msgid "" 1.11786 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is " 1.11787 "that a changeset has introduced some change of behavior that you can identify " 1.11788 -"with a simple binary test. You don't know which piece of code introduced the " 1.11789 -"change, but you know how to test for the presence of the bug. The <command " 1.11790 -"role=\"hg-cmd\">hg bisect</command> command uses your test to direct its " 1.11791 -"search for the changeset that introduced the code that caused the bug." 1.11792 -msgstr "" 1.11793 - 1.11794 -#. type: Content of: <book><chapter><sect1><para> 1.11795 -#: ../en/ch08-undo.xml:698 1.11796 +"with a simple pass/fail test. You don't know which piece of code introduced " 1.11797 +"the change, but you know how to test for the presence of the bug. The " 1.11798 +"<command role=\"hg-cmd\">hg bisect</command> command uses your test to direct " 1.11799 +"its search for the changeset that introduced the code that caused the bug." 1.11800 +msgstr "" 1.11801 + 1.11802 +#. type: Content of: <book><chapter><sect1><para> 1.11803 +#: ../en/ch09-undo.xml:830 1.11804 msgid "" 1.11805 "Here are a few scenarios to help you understand how you might apply this " 1.11806 "command." 1.11807 msgstr "" 1.11808 1.11809 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.11810 -#: ../en/ch08-undo.xml:701 1.11811 +#: ../en/ch09-undo.xml:833 1.11812 msgid "" 1.11813 "The most recent version of your software has a bug that you remember wasn't " 1.11814 "present a few weeks ago, but you don't know when it was introduced. Here, " 1.11815 @@ -10019,7 +11736,7 @@ 1.11816 msgstr "" 1.11817 1.11818 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.11819 -#: ../en/ch08-undo.xml:706 1.11820 +#: ../en/ch09-undo.xml:838 1.11821 msgid "" 1.11822 "You fixed a bug in a rush, and now it's time to close the entry in your " 1.11823 "team's bug database. The bug database requires a changeset ID when you close " 1.11824 @@ -10028,7 +11745,7 @@ 1.11825 msgstr "" 1.11826 1.11827 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.11828 -#: ../en/ch08-undo.xml:713 1.11829 +#: ../en/ch09-undo.xml:845 1.11830 msgid "" 1.11831 "Your software works correctly, but runs 15% slower than the last time you " 1.11832 "measured it. You want to know which changeset introduced the performance " 1.11833 @@ -10037,14 +11754,14 @@ 1.11834 msgstr "" 1.11835 1.11836 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.11837 -#: ../en/ch08-undo.xml:720 1.11838 +#: ../en/ch09-undo.xml:852 1.11839 msgid "" 1.11840 "The sizes of the components of your project that you ship exploded recently, " 1.11841 "and you suspect that something changed in the way you build your project." 1.11842 msgstr "" 1.11843 1.11844 #. type: Content of: <book><chapter><sect1><para> 1.11845 -#: ../en/ch08-undo.xml:725 1.11846 +#: ../en/ch09-undo.xml:857 1.11847 msgid "" 1.11848 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg " 1.11849 "bisect</command> command is not useful only for finding the sources of bugs. " 1.11850 @@ -10054,7 +11771,7 @@ 1.11851 msgstr "" 1.11852 1.11853 #. type: Content of: <book><chapter><sect1><para> 1.11854 -#: ../en/ch08-undo.xml:732 1.11855 +#: ../en/ch09-undo.xml:864 1.11856 msgid "" 1.11857 "We'll introduce a little bit of terminology here, just to make it clear which " 1.11858 "parts of the search process are your responsibility, and which are " 1.11859 @@ -10068,7 +11785,7 @@ 1.11860 msgstr "" 1.11861 1.11862 #. type: Content of: <book><chapter><sect1><para> 1.11863 -#: ../en/ch08-undo.xml:745 1.11864 +#: ../en/ch09-undo.xml:877 1.11865 msgid "" 1.11866 "One simple way to automate the searching process would be simply to probe " 1.11867 "every changeset. However, this scales poorly. If it took ten minutes to " 1.11868 @@ -10081,7 +11798,7 @@ 1.11869 msgstr "" 1.11870 1.11871 #. type: Content of: <book><chapter><sect1><para> 1.11872 -#: ../en/ch08-undo.xml:755 1.11873 +#: ../en/ch09-undo.xml:887 1.11874 msgid "" 1.11875 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its " 1.11876 "knowledge of the <quote>shape</quote> of your project's revision history to " 1.11877 @@ -10094,7 +11811,7 @@ 1.11878 msgstr "" 1.11879 1.11880 #. type: Content of: <book><chapter><sect1><para> 1.11881 -#: ../en/ch08-undo.xml:766 1.11882 +#: ../en/ch09-undo.xml:898 1.11883 msgid "" 1.11884 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the " 1.11885 "<quote>branchy</quote> nature of a Mercurial project's revision history, so " 1.11886 @@ -10104,18 +11821,18 @@ 1.11887 msgstr "" 1.11888 1.11889 #. type: Content of: <book><chapter><sect1><sect2><title> 1.11890 -#: ../en/ch08-undo.xml:774 1.11891 +#: ../en/ch09-undo.xml:906 1.11892 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command" 1.11893 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 1.11894 1.11895 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11896 -#: ../en/ch08-undo.xml:777 1.11897 +#: ../en/ch09-undo.xml:909 1.11898 msgid "" 1.11899 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action." 1.11900 msgstr "" 1.11901 1.11902 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.11903 -#: ../en/ch08-undo.xml:781 1.11904 +#: ../en/ch09-undo.xml:913 1.11905 msgid "" 1.11906 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg " 1.11907 "bisect</command> was not a core command: it was distributed with Mercurial as " 1.11908 @@ -10124,14 +11841,14 @@ 1.11909 msgstr "" 1.11910 1.11911 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11912 -#: ../en/ch08-undo.xml:788 1.11913 +#: ../en/ch09-undo.xml:920 1.11914 msgid "" 1.11915 "Now let's create a repository, so that we can try out the <command role=\"hg-" 1.11916 "cmd\">hg bisect</command> command in isolation." 1.11917 msgstr "" 1.11918 1.11919 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11920 -#: ../en/ch08-undo.xml:794 1.11921 +#: ../en/ch09-undo.xml:926 1.11922 msgid "" 1.11923 "We'll simulate a project that has a bug in it in a simple-minded way: create " 1.11924 "trivial changes in a loop, and nominate one specific change that will have " 1.11925 @@ -10141,7 +11858,7 @@ 1.11926 msgstr "" 1.11927 1.11928 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11929 -#: ../en/ch08-undo.xml:804 1.11930 +#: ../en/ch09-undo.xml:936 1.11931 msgid "" 1.11932 "The next thing that we'd like to do is figure out how to use the <command " 1.11933 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal " 1.11934 @@ -10149,46 +11866,48 @@ 1.11935 msgstr "" 1.11936 1.11937 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11938 -#: ../en/ch08-undo.xml:811 1.11939 +#: ../en/ch09-undo.xml:943 1.11940 msgid "" 1.11941 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. " 1.11942 "Each step proceeds as follows." 1.11943 msgstr "" 1.11944 1.11945 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11946 -#: ../en/ch08-undo.xml:814 1.11947 +#: ../en/ch09-undo.xml:946 1.11948 msgid "You run your binary test." 1.11949 msgstr "" 1.11950 1.11951 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 1.11952 -#: ../en/ch08-undo.xml:816 1.11953 +#: ../en/ch09-undo.xml:948 1.11954 +#, fuzzy 1.11955 msgid "" 1.11956 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> " 1.11957 -"by running the <command role=\"hg-cmd\">hg bisect good</command> command." 1.11958 -msgstr "" 1.11959 +"by running the <command role=\"hg-cmd\">hg bisect --good</command> command." 1.11960 +msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 自动恢复非顶点的修改" 1.11961 1.11962 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 1.11963 -#: ../en/ch08-undo.xml:821 1.11964 -msgid "" 1.11965 -"If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> " 1.11966 +#: ../en/ch09-undo.xml:953 1.11967 +#, fuzzy 1.11968 +msgid "" 1.11969 +"If it failed, run the <command role=\"hg-cmd\">hg bisect --bad</command> " 1.11970 "command." 1.11971 -msgstr "" 1.11972 +msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 1.11973 1.11974 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11975 -#: ../en/ch08-undo.xml:825 1.11976 +#: ../en/ch09-undo.xml:957 1.11977 msgid "" 1.11978 "The command uses your information to decide which changeset to test next." 1.11979 msgstr "" 1.11980 1.11981 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 1.11982 -#: ../en/ch08-undo.xml:828 1.11983 +#: ../en/ch09-undo.xml:960 1.11984 msgid "" 1.11985 "It updates the working directory to that changeset, and the process begins " 1.11986 "again." 1.11987 msgstr "" 1.11988 1.11989 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11990 -#: ../en/ch08-undo.xml:831 1.11991 +#: ../en/ch09-undo.xml:963 1.11992 msgid "" 1.11993 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies " 1.11994 "a unique changeset that marks the point where your test transitioned from " 1.11995 @@ -10197,14 +11916,14 @@ 1.11996 1.11997 # 1.11998 #. type: Content of: <book><chapter><sect1><sect2><para> 1.11999 -#: ../en/ch08-undo.xml:836 1.12000 +#: ../en/ch09-undo.xml:968 1.12001 msgid "" 1.12002 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --" 1.12003 "reset</command> command." 1.12004 msgstr "" 1.12005 1.12006 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12007 -#: ../en/ch08-undo.xml:841 1.12008 +#: ../en/ch09-undo.xml:973 1.12009 msgid "" 1.12010 "In our case, the binary test we use is simple: we check to see if any file in " 1.12011 "the repository contains the string <quote>i have a gub</quote>. If it does, " 1.12012 @@ -10214,7 +11933,7 @@ 1.12013 msgstr "" 1.12014 1.12015 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12016 -#: ../en/ch08-undo.xml:849 1.12017 +#: ../en/ch09-undo.xml:981 1.12018 msgid "" 1.12019 "Most of the time, the revision to which the working directory is synced " 1.12020 "(usually the tip) already exhibits the problem introduced by the buggy " 1.12021 @@ -10223,7 +11942,7 @@ 1.12022 1.12023 # 1.12024 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12025 -#: ../en/ch08-undo.xml:856 1.12026 +#: ../en/ch09-undo.xml:988 1.12027 msgid "" 1.12028 "Our next task is to nominate a changeset that we know <emphasis>doesn't</" 1.12029 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> " 1.12030 @@ -10234,26 +11953,26 @@ 1.12031 msgstr "" 1.12032 1.12033 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12034 -#: ../en/ch08-undo.xml:866 1.12035 +#: ../en/ch09-undo.xml:998 1.12036 msgid "Notice that this command printed some output." 1.12037 msgstr "" 1.12038 1.12039 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12040 -#: ../en/ch08-undo.xml:868 1.12041 +#: ../en/ch09-undo.xml:1000 1.12042 msgid "" 1.12043 "It told us how many changesets it must consider before it can identify the " 1.12044 "one that introduced the bug, and how many tests that will require." 1.12045 msgstr "" 1.12046 1.12047 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12048 -#: ../en/ch08-undo.xml:872 1.12049 +#: ../en/ch09-undo.xml:1004 1.12050 msgid "" 1.12051 "It updated the working directory to the next changeset to test, and told us " 1.12052 "which changeset it's testing." 1.12053 msgstr "" 1.12054 1.12055 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12056 -#: ../en/ch08-undo.xml:877 1.12057 +#: ../en/ch09-undo.xml:1009 1.12058 msgid "" 1.12059 "We now run our test in the working directory. We use the <command>grep</" 1.12060 "command> command to see if our <quote>bad</quote> file is present in the " 1.12061 @@ -10262,26 +11981,26 @@ 1.12062 msgstr "" 1.12063 1.12064 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12065 -#: ../en/ch08-undo.xml:883 1.12066 +#: ../en/ch09-undo.xml:1015 1.12067 msgid "" 1.12068 "This test looks like a perfect candidate for automation, so let's turn it " 1.12069 "into a shell function." 1.12070 msgstr "" 1.12071 1.12072 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12073 -#: ../en/ch08-undo.xml:887 1.12074 +#: ../en/ch09-undo.xml:1019 1.12075 msgid "" 1.12076 "We can now run an entire test step with a single command, <literal>mytest</" 1.12077 "literal>." 1.12078 msgstr "" 1.12079 1.12080 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12081 -#: ../en/ch08-undo.xml:892 1.12082 +#: ../en/ch09-undo.xml:1024 1.12083 msgid "A few more invocations of our canned test step command, and we're done." 1.12084 msgstr "" 1.12085 1.12086 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12087 -#: ../en/ch08-undo.xml:897 1.12088 +#: ../en/ch09-undo.xml:1029 1.12089 msgid "" 1.12090 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd" 1.12091 "\">hg bisect</command> command let us find the changeset that introduced our " 1.12092 @@ -10293,35 +12012,34 @@ 1.12093 msgstr "" 1.12094 1.12095 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12096 -#: ../en/ch08-undo.xml:908 1.12097 +#: ../en/ch09-undo.xml:1040 1.12098 msgid "Cleaning up after your search" 1.12099 msgstr "搜索后的清理" 1.12100 1.12101 -# 1.12102 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.12103 -#: ../en/ch08-undo.xml:910 1.12104 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.12105 +#: ../en/ch09-undo.xml:1042 1.12106 msgid "" 1.12107 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> " 1.12108 -"command in a repository, you can use the <command role=\"hg-cmd\">hg bisect " 1.12109 +"command in a repository, you can use the <command role=\"hg-cmd\">hg bisect --" 1.12110 "reset</command> command to drop the information it was using to drive your " 1.12111 "search. The command doesn't use much space, so it doesn't matter if you " 1.12112 "forget to run this command. However, <command role=\"hg-cmd\">hg bisect</" 1.12113 "command> won't let you start a new search in that repository until you do a " 1.12114 -"<command role=\"hg-cmd\">hg bisect reset</command>." 1.12115 +"<command role=\"hg-cmd\">hg bisect --reset</command>." 1.12116 msgstr "" 1.12117 1.12118 #. type: Content of: <book><chapter><sect1><title> 1.12119 -#: ../en/ch08-undo.xml:925 1.12120 +#: ../en/ch09-undo.xml:1057 1.12121 msgid "Tips for finding bugs effectively" 1.12122 msgstr "有效查找问题的技巧" 1.12123 1.12124 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12125 -#: ../en/ch08-undo.xml:928 1.12126 +#: ../en/ch09-undo.xml:1060 1.12127 msgid "Give consistent input" 1.12128 msgstr "给出一致的输入" 1.12129 1.12130 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12131 -#: ../en/ch08-undo.xml:930 1.12132 +#: ../en/ch09-undo.xml:1062 1.12133 msgid "" 1.12134 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you " 1.12135 "correctly report the result of every test you perform. If you tell it that a " 1.12136 @@ -10333,12 +12051,12 @@ 1.12137 msgstr "" 1.12138 1.12139 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12140 -#: ../en/ch08-undo.xml:942 1.12141 +#: ../en/ch09-undo.xml:1074 1.12142 msgid "Automate as much as possible" 1.12143 msgstr "尽量自动" 1.12144 1.12145 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12146 -#: ../en/ch08-undo.xml:944 1.12147 +#: ../en/ch09-undo.xml:1076 1.12148 msgid "" 1.12149 "When I started using the <command role=\"hg-cmd\">hg bisect</command> " 1.12150 "command, I tried a few times to run my tests by hand, on the command line. " 1.12151 @@ -10348,7 +12066,7 @@ 1.12152 msgstr "" 1.12153 1.12154 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12155 -#: ../en/ch08-undo.xml:952 1.12156 +#: ../en/ch09-undo.xml:1084 1.12157 msgid "" 1.12158 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</" 1.12159 "command> command by hand occurred even with simple searches on small " 1.12160 @@ -10359,24 +12077,24 @@ 1.12161 msgstr "" 1.12162 1.12163 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12164 -#: ../en/ch08-undo.xml:961 1.12165 +#: ../en/ch09-undo.xml:1093 1.12166 msgid "The key to automated testing is twofold:" 1.12167 msgstr "" 1.12168 1.12169 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12170 -#: ../en/ch08-undo.xml:963 1.12171 +#: ../en/ch09-undo.xml:1095 1.12172 msgid "always test for the same symptom, and" 1.12173 msgstr "" 1.12174 1.12175 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12176 -#: ../en/ch08-undo.xml:965 1.12177 +#: ../en/ch09-undo.xml:1097 1.12178 msgid "" 1.12179 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</" 1.12180 "command> command." 1.12181 msgstr "" 1.12182 1.12183 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12184 -#: ../en/ch08-undo.xml:968 1.12185 +#: ../en/ch09-undo.xml:1100 1.12186 msgid "" 1.12187 "In my tutorial example above, the <command>grep</command> command tests for " 1.12188 "the symptom, and the <literal>if</literal> statement takes the result of this " 1.12189 @@ -10387,12 +12105,12 @@ 1.12190 msgstr "" 1.12191 1.12192 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12193 -#: ../en/ch08-undo.xml:978 1.12194 +#: ../en/ch09-undo.xml:1110 1.12195 msgid "Check your results" 1.12196 msgstr "检查你的结果" 1.12197 1.12198 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12199 -#: ../en/ch08-undo.xml:980 1.12200 +#: ../en/ch09-undo.xml:1112 1.12201 msgid "" 1.12202 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search " 1.12203 "is only as good as the input you give it, don't take the changeset it reports " 1.12204 @@ -10401,32 +12119,32 @@ 1.12205 msgstr "" 1.12206 1.12207 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12208 -#: ../en/ch08-undo.xml:986 1.12209 +#: ../en/ch09-undo.xml:1118 1.12210 msgid "" 1.12211 "The changeset that it reports as the first bad revision. Your test should " 1.12212 "still report this as bad." 1.12213 msgstr "" 1.12214 1.12215 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12216 -#: ../en/ch08-undo.xml:990 1.12217 +#: ../en/ch09-undo.xml:1122 1.12218 msgid "" 1.12219 "The parent of that changeset (either parent, if it's a merge). Your test " 1.12220 "should report this changeset as good." 1.12221 msgstr "" 1.12222 1.12223 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.12224 -#: ../en/ch08-undo.xml:994 1.12225 +#: ../en/ch09-undo.xml:1126 1.12226 msgid "" 1.12227 "A child of that changeset. Your test should report this changeset as bad." 1.12228 msgstr "" 1.12229 1.12230 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12231 -#: ../en/ch08-undo.xml:1000 1.12232 +#: ../en/ch09-undo.xml:1132 1.12233 msgid "Beware interference between bugs" 1.12234 msgstr "谨防问题之间的冲突" 1.12235 1.12236 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12237 -#: ../en/ch08-undo.xml:1002 1.12238 +#: ../en/ch09-undo.xml:1134 1.12239 msgid "" 1.12240 "It's possible that your search for one bug could be disrupted by the presence " 1.12241 "of another. For example, let's say your software crashes at revision 100, " 1.12242 @@ -10436,7 +12154,7 @@ 1.12243 msgstr "" 1.12244 1.12245 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12246 -#: ../en/ch08-undo.xml:1010 1.12247 +#: ../en/ch09-undo.xml:1142 1.12248 msgid "" 1.12249 "It is possible that this other bug completely <quote>masks</quote> yours, " 1.12250 "which is to say that it occurs before your bug has a chance to manifest " 1.12251 @@ -10448,7 +12166,7 @@ 1.12252 msgstr "" 1.12253 1.12254 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12255 -#: ../en/ch08-undo.xml:1020 1.12256 +#: ../en/ch09-undo.xml:1152 1.12257 msgid "" 1.12258 "A different problem could arise if your test for a bug's presence is not " 1.12259 "specific enough. If you check for <quote>my program crashes</quote>, then " 1.12260 @@ -10457,7 +12175,7 @@ 1.12261 msgstr "" 1.12262 1.12263 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12264 -#: ../en/ch08-undo.xml:1027 1.12265 +#: ../en/ch09-undo.xml:1159 1.12266 msgid "" 1.12267 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --" 1.12268 "skip</command> is if you can't test a revision because your project was in a " 1.12269 @@ -10466,12 +12184,12 @@ 1.12270 msgstr "" 1.12271 1.12272 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12273 -#: ../en/ch08-undo.xml:1036 1.12274 +#: ../en/ch09-undo.xml:1168 1.12275 msgid "Bracket your search lazily" 1.12276 msgstr "减少你的查找工作" 1.12277 1.12278 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12279 -#: ../en/ch08-undo.xml:1038 1.12280 +#: ../en/ch09-undo.xml:1170 1.12281 msgid "" 1.12282 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that " 1.12283 "will mark the end points of your search is often easy, but it bears a little " 1.12284 @@ -10481,7 +12199,7 @@ 1.12285 msgstr "" 1.12286 1.12287 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12288 -#: ../en/ch08-undo.xml:1046 1.12289 +#: ../en/ch09-undo.xml:1178 1.12290 msgid "" 1.12291 "If you're having trouble remembering when a suitable <quote>good</quote> " 1.12292 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</" 1.12293 @@ -10492,7 +12210,7 @@ 1.12294 msgstr "" 1.12295 1.12296 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12297 -#: ../en/ch08-undo.xml:1055 1.12298 +#: ../en/ch09-undo.xml:1187 1.12299 msgid "" 1.12300 "Even if you end up <quote>early</quote> by thousands of changesets or months " 1.12301 "of history, you will only add a handful of tests to the total number that " 1.12302 @@ -10501,12 +12219,12 @@ 1.12303 msgstr "" 1.12304 1.12305 #. type: Content of: <book><chapter><title> 1.12306 -#: ../en/ch09-hook.xml:5 1.12307 +#: ../en/ch10-hook.xml:5 1.12308 msgid "Handling repository events with hooks" 1.12309 msgstr "使用钩子处理版本库事件" 1.12310 1.12311 #. type: Content of: <book><chapter><para> 1.12312 -#: ../en/ch09-hook.xml:7 1.12313 +#: ../en/ch10-hook.xml:7 1.12314 msgid "" 1.12315 "Mercurial offers a powerful mechanism to let you perform automated actions in " 1.12316 "response to events that occur in a repository. In some cases, you can even " 1.12317 @@ -10514,7 +12232,7 @@ 1.12318 msgstr "" 1.12319 1.12320 #. type: Content of: <book><chapter><para> 1.12321 -#: ../en/ch09-hook.xml:12 1.12322 +#: ../en/ch10-hook.xml:12 1.12323 msgid "" 1.12324 "The name Mercurial uses for one of these actions is a <emphasis>hook</" 1.12325 "emphasis>. Hooks are called <quote>triggers</quote> in some revision control " 1.12326 @@ -10522,33 +12240,42 @@ 1.12327 msgstr "" 1.12328 1.12329 #. type: Content of: <book><chapter><sect1><title> 1.12330 -#: ../en/ch09-hook.xml:18 1.12331 +#: ../en/ch10-hook.xml:18 1.12332 msgid "An overview of hooks in Mercurial" 1.12333 msgstr "Mercurial 钩子概述" 1.12334 1.12335 #. type: Content of: <book><chapter><sect1><para> 1.12336 -#: ../en/ch09-hook.xml:20 1.12337 +#: ../en/ch10-hook.xml:20 1.12338 msgid "" 1.12339 "Here is a brief list of the hooks that Mercurial supports. We will revisit " 1.12340 "each of these hooks in more detail later, in <xref linkend=\"sec:hook:ref\"/>." 1.12341 msgstr "" 1.12342 1.12343 +#. type: Content of: <book><chapter><sect1><para> 1.12344 +#: ../en/ch10-hook.xml:24 1.12345 +msgid "" 1.12346 +"Each of the hooks whose description begins with the word <quote>Controlling</" 1.12347 +"quote> has the ability to determine whether an activity can proceed. If the " 1.12348 +"hook succeeds, the activity may proceed; if it fails, the activity is either " 1.12349 +"not permitted or undone, depending on the hook." 1.12350 +msgstr "" 1.12351 + 1.12352 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12353 -#: ../en/ch09-hook.xml:25 1.12354 +#: ../en/ch10-hook.xml:31 1.12355 msgid "" 1.12356 "<literal role=\"hook\">changegroup</literal>: This is run after a group of " 1.12357 "changesets has been brought into the repository from elsewhere." 1.12358 msgstr "" 1.12359 1.12360 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12361 -#: ../en/ch09-hook.xml:29 1.12362 +#: ../en/ch10-hook.xml:35 1.12363 msgid "" 1.12364 "<literal role=\"hook\">commit</literal>: This is run after a new changeset " 1.12365 "has been created in the local repository." 1.12366 msgstr "" 1.12367 1.12368 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12369 -#: ../en/ch09-hook.xml:33 1.12370 +#: ../en/ch10-hook.xml:39 1.12371 msgid "" 1.12372 "<literal role=\"hook\">incoming</literal>: This is run once for each new " 1.12373 "changeset that is brought into the repository from elsewhere. Notice the " 1.12374 @@ -10557,42 +12284,42 @@ 1.12375 msgstr "" 1.12376 1.12377 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12378 -#: ../en/ch09-hook.xml:40 1.12379 +#: ../en/ch10-hook.xml:46 1.12380 msgid "" 1.12381 "<literal role=\"hook\">outgoing</literal>: This is run after a group of " 1.12382 "changesets has been transmitted from this repository." 1.12383 msgstr "" 1.12384 1.12385 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12386 -#: ../en/ch09-hook.xml:44 1.12387 +#: ../en/ch10-hook.xml:50 1.12388 msgid "" 1.12389 "<literal role=\"hook\">prechangegroup</literal>: This is run before starting " 1.12390 "to bring a group of changesets into the repository." 1.12391 msgstr "" 1.12392 1.12393 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12394 -#: ../en/ch09-hook.xml:49 1.12395 +#: ../en/ch10-hook.xml:55 1.12396 msgid "" 1.12397 "<literal role=\"hook\">precommit</literal>: Controlling. This is run before " 1.12398 "starting a commit." 1.12399 msgstr "" 1.12400 1.12401 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12402 -#: ../en/ch09-hook.xml:53 1.12403 +#: ../en/ch10-hook.xml:59 1.12404 msgid "" 1.12405 "<literal role=\"hook\">preoutgoing</literal>: Controlling. This is run before " 1.12406 "starting to transmit a group of changesets from this repository." 1.12407 msgstr "" 1.12408 1.12409 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12410 -#: ../en/ch09-hook.xml:58 1.12411 +#: ../en/ch10-hook.xml:64 1.12412 msgid "" 1.12413 "<literal role=\"hook\">pretag</literal>: Controlling. This is run before " 1.12414 "creating a tag." 1.12415 msgstr "" 1.12416 1.12417 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12418 -#: ../en/ch09-hook.xml:62 1.12419 +#: ../en/ch10-hook.xml:68 1.12420 msgid "" 1.12421 "<literal role=\"hook\">pretxnchangegroup</literal>: Controlling. This is run " 1.12422 "after a group of changesets has been brought into the local repository from " 1.12423 @@ -10601,7 +12328,7 @@ 1.12424 msgstr "" 1.12425 1.12426 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12427 -#: ../en/ch09-hook.xml:70 1.12428 +#: ../en/ch10-hook.xml:76 1.12429 msgid "" 1.12430 "<literal role=\"hook\">pretxncommit</literal>: Controlling. This is run after " 1.12431 "a new changeset has been created in the local repository, but before the " 1.12432 @@ -10609,46 +12336,37 @@ 1.12433 msgstr "" 1.12434 1.12435 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12436 -#: ../en/ch09-hook.xml:76 1.12437 +#: ../en/ch10-hook.xml:82 1.12438 msgid "" 1.12439 "<literal role=\"hook\">preupdate</literal>: Controlling. This is run before " 1.12440 "starting an update or merge of the working directory." 1.12441 msgstr "" 1.12442 1.12443 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12444 -#: ../en/ch09-hook.xml:81 1.12445 +#: ../en/ch10-hook.xml:87 1.12446 msgid "" 1.12447 "<literal role=\"hook\">tag</literal>: This is run after a tag is created." 1.12448 msgstr "" 1.12449 1.12450 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.12451 -#: ../en/ch09-hook.xml:85 1.12452 +#: ../en/ch10-hook.xml:91 1.12453 msgid "" 1.12454 "<literal role=\"hook\">update</literal>: This is run after an update or merge " 1.12455 "of the working directory has finished." 1.12456 msgstr "" 1.12457 1.12458 -#. type: Content of: <book><chapter><sect1><para> 1.12459 -#: ../en/ch09-hook.xml:90 1.12460 -msgid "" 1.12461 -"Each of the hooks whose description begins with the word <quote>Controlling</" 1.12462 -"quote> has the ability to determine whether an activity can proceed. If the " 1.12463 -"hook succeeds, the activity may proceed; if it fails, the activity is either " 1.12464 -"not permitted or undone, depending on the hook." 1.12465 -msgstr "" 1.12466 - 1.12467 #. type: Content of: <book><chapter><sect1><title> 1.12468 -#: ../en/ch09-hook.xml:99 1.12469 +#: ../en/ch10-hook.xml:99 1.12470 msgid "Hooks and security" 1.12471 msgstr "钩子与安全性" 1.12472 1.12473 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12474 -#: ../en/ch09-hook.xml:102 1.12475 +#: ../en/ch10-hook.xml:102 1.12476 msgid "Hooks are run with your privileges" 1.12477 msgstr "钩子以你的特权执行" 1.12478 1.12479 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12480 -#: ../en/ch09-hook.xml:104 1.12481 +#: ../en/ch10-hook.xml:104 1.12482 msgid "" 1.12483 "When you run a Mercurial command in a repository, and the command causes a " 1.12484 "hook to run, that hook runs on <emphasis>your</emphasis> system, under " 1.12485 @@ -10659,7 +12377,7 @@ 1.12486 msgstr "" 1.12487 1.12488 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12489 -#: ../en/ch09-hook.xml:115 1.12490 +#: ../en/ch10-hook.xml:115 1.12491 msgid "" 1.12492 "In some cases, you may be exposed to hooks that you did not install " 1.12493 "yourself. If you work with Mercurial on an unfamiliar system, Mercurial will " 1.12494 @@ -10668,7 +12386,7 @@ 1.12495 msgstr "" 1.12496 1.12497 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12498 -#: ../en/ch09-hook.xml:122 1.12499 +#: ../en/ch10-hook.xml:122 1.12500 msgid "" 1.12501 "If you are working with a repository owned by another user, Mercurial can run " 1.12502 "hooks defined in that user's repository, but it will still run them as " 1.12503 @@ -10680,7 +12398,7 @@ 1.12504 msgstr "" 1.12505 1.12506 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.12507 -#: ../en/ch09-hook.xml:134 1.12508 +#: ../en/ch10-hook.xml:134 1.12509 msgid "" 1.12510 "This only applies if you are pulling from a repository on a local or network " 1.12511 "filesystem. If you're pulling over http or ssh, any <literal role=\"hook" 1.12512 @@ -10689,10 +12407,10 @@ 1.12513 msgstr "" 1.12514 1.12515 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12516 -#: ../en/ch09-hook.xml:142 1.12517 -msgid "" 1.12518 -"XXX To see what hooks are defined in a repository, use the <command role=\"hg-" 1.12519 -"cmd\">hg config hooks</command> command. If you are working in one " 1.12520 +#: ../en/ch10-hook.xml:142 1.12521 +msgid "" 1.12522 +"To see what hooks are defined in a repository, use the <command role=\"hg-cmd" 1.12523 +"\">hg showconfig hooks</command> command. If you are working in one " 1.12524 "repository, but talking to another that you do not own (e.g. using <command " 1.12525 "role=\"hg-cmd\">hg pull</command> or <command role=\"hg-cmd\">hg incoming</" 1.12526 "command>), remember that it is the other repository's hooks you should be " 1.12527 @@ -10700,12 +12418,12 @@ 1.12528 msgstr "" 1.12529 1.12530 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12531 -#: ../en/ch09-hook.xml:153 1.12532 +#: ../en/ch10-hook.xml:153 1.12533 msgid "Hooks do not propagate" 1.12534 msgstr "钩子不会传播" 1.12535 1.12536 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12537 -#: ../en/ch09-hook.xml:155 1.12538 +#: ../en/ch10-hook.xml:155 1.12539 msgid "" 1.12540 "In Mercurial, hooks are not revision controlled, and do not propagate when " 1.12541 "you clone, or pull from, a repository. The reason for this is simple: a hook " 1.12542 @@ -10714,7 +12432,7 @@ 1.12543 msgstr "" 1.12544 1.12545 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12546 -#: ../en/ch09-hook.xml:162 1.12547 +#: ../en/ch10-hook.xml:162 1.12548 msgid "" 1.12549 "It would be extremely reckless for any distributed revision control system to " 1.12550 "implement revision-controlled hooks, as this would offer an easily " 1.12551 @@ -10723,7 +12441,7 @@ 1.12552 msgstr "" 1.12553 1.12554 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12555 -#: ../en/ch09-hook.xml:168 1.12556 +#: ../en/ch10-hook.xml:168 1.12557 msgid "" 1.12558 "Since Mercurial does not propagate hooks, if you are collaborating with other " 1.12559 "people on a common project, you should not assume that they are using the " 1.12560 @@ -10732,7 +12450,7 @@ 1.12561 msgstr "" 1.12562 1.12563 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12564 -#: ../en/ch09-hook.xml:175 1.12565 +#: ../en/ch10-hook.xml:175 1.12566 msgid "" 1.12567 "In a corporate intranet, this is somewhat easier to control, as you can for " 1.12568 "example provide a <quote>standard</quote> installation of Mercurial on an NFS " 1.12569 @@ -10742,12 +12460,12 @@ 1.12570 msgstr "" 1.12571 1.12572 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12573 -#: ../en/ch09-hook.xml:184 1.12574 +#: ../en/ch10-hook.xml:184 1.12575 msgid "Hooks can be overridden" 1.12576 msgstr "钩子可以被覆盖" 1.12577 1.12578 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12579 -#: ../en/ch09-hook.xml:186 1.12580 +#: ../en/ch10-hook.xml:186 1.12581 msgid "" 1.12582 "Mercurial allows you to override a hook definition by redefining the hook. " 1.12583 "You can disable it by setting its value to the empty string, or change its " 1.12584 @@ -10755,7 +12473,7 @@ 1.12585 msgstr "" 1.12586 1.12587 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12588 -#: ../en/ch09-hook.xml:191 1.12589 +#: ../en/ch10-hook.xml:191 1.12590 msgid "" 1.12591 "If you deploy a system- or site-wide <filename role=\"special\">~/.hgrc</" 1.12592 "filename> file that defines some hooks, you should thus understand that your " 1.12593 @@ -10763,12 +12481,12 @@ 1.12594 msgstr "" 1.12595 1.12596 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12597 -#: ../en/ch09-hook.xml:199 1.12598 +#: ../en/ch10-hook.xml:199 1.12599 msgid "Ensuring that critical hooks are run" 1.12600 msgstr "确保关键钩子的执行" 1.12601 1.12602 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12603 -#: ../en/ch09-hook.xml:201 1.12604 +#: ../en/ch10-hook.xml:201 1.12605 msgid "" 1.12606 "Sometimes you may want to enforce a policy that you do not want others to be " 1.12607 "able to work around. For example, you may have a requirement that every " 1.12608 @@ -10779,7 +12497,7 @@ 1.12609 msgstr "" 1.12610 1.12611 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12612 -#: ../en/ch09-hook.xml:210 1.12613 +#: ../en/ch10-hook.xml:210 1.12614 msgid "" 1.12615 "Instead, you can set up your policies for use of Mercurial so that people are " 1.12616 "expected to propagate changes through a well-known <quote>canonical</quote> " 1.12617 @@ -10787,7 +12505,7 @@ 1.12618 msgstr "" 1.12619 1.12620 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12621 -#: ../en/ch09-hook.xml:216 1.12622 +#: ../en/ch10-hook.xml:216 1.12623 msgid "" 1.12624 "One way to do this is via a combination of social engineering and " 1.12625 "technology. Set up a restricted-access account; users can push changes over " 1.12626 @@ -10797,7 +12515,7 @@ 1.12627 msgstr "" 1.12628 1.12629 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12630 -#: ../en/ch09-hook.xml:225 1.12631 +#: ../en/ch10-hook.xml:225 1.12632 msgid "" 1.12633 "When someone pushes a changeset to the server that everyone pulls from, the " 1.12634 "server will test the changeset before it accepts it as permanent, and reject " 1.12635 @@ -10807,144 +12525,12 @@ 1.12636 msgstr "" 1.12637 1.12638 #. type: Content of: <book><chapter><sect1><title> 1.12639 -#: ../en/ch09-hook.xml:236 1.12640 -msgid "Care with <literal>pretxn</literal> hooks in a shared-access repository" 1.12641 -msgstr "在共享版本库中注意 <literal>pretxn</literal> 钩子" 1.12642 - 1.12643 -#. type: Content of: <book><chapter><sect1><para> 1.12644 -#: ../en/ch09-hook.xml:239 1.12645 -msgid "" 1.12646 -"If you want to use hooks to do some automated work in a repository that a " 1.12647 -"number of people have shared access to, you need to be careful in how you do " 1.12648 -"this." 1.12649 -msgstr "" 1.12650 - 1.12651 -#. type: Content of: <book><chapter><sect1><para> 1.12652 -#: ../en/ch09-hook.xml:244 1.12653 -msgid "" 1.12654 -"Mercurial only locks a repository when it is writing to the repository, and " 1.12655 -"only the parts of Mercurial that write to the repository pay attention to " 1.12656 -"locks. Write locks are necessary to prevent multiple simultaneous writers " 1.12657 -"from scribbling on each other's work, corrupting the repository." 1.12658 -msgstr "" 1.12659 - 1.12660 -#. type: Content of: <book><chapter><sect1><para> 1.12661 -#: ../en/ch09-hook.xml:251 1.12662 -msgid "" 1.12663 -"Because Mercurial is careful with the order in which it reads and writes " 1.12664 -"data, it does not need to acquire a lock when it wants to read data from the " 1.12665 -"repository. The parts of Mercurial that read from the repository never pay " 1.12666 -"attention to locks. This lockless reading scheme greatly increases " 1.12667 -"performance and concurrency." 1.12668 -msgstr "" 1.12669 - 1.12670 -#. type: Content of: <book><chapter><sect1><para> 1.12671 -#: ../en/ch09-hook.xml:259 1.12672 -msgid "" 1.12673 -"With great performance comes a trade-off, though, one which has the potential " 1.12674 -"to cause you trouble unless you're aware of it. To describe this requires a " 1.12675 -"little detail about how Mercurial adds changesets to a repository and reads " 1.12676 -"those changes." 1.12677 -msgstr "" 1.12678 - 1.12679 -#. type: Content of: <book><chapter><sect1><para> 1.12680 -#: ../en/ch09-hook.xml:266 1.12681 -msgid "" 1.12682 -"When Mercurial <emphasis>writes</emphasis> metadata, it writes it straight " 1.12683 -"into the destination file. It writes file data first, then manifest data " 1.12684 -"(which contains pointers to the new file data), then changelog data (which " 1.12685 -"contains pointers to the new manifest data). Before the first write to each " 1.12686 -"file, it stores a record of where the end of the file was in its transaction " 1.12687 -"log. If the transaction must be rolled back, Mercurial simply truncates each " 1.12688 -"file back to the size it was before the transaction began." 1.12689 -msgstr "" 1.12690 - 1.12691 -#. type: Content of: <book><chapter><sect1><para> 1.12692 -#: ../en/ch09-hook.xml:277 1.12693 -msgid "" 1.12694 -"When Mercurial <emphasis>reads</emphasis> metadata, it reads the changelog " 1.12695 -"first, then everything else. Since a reader will only access parts of the " 1.12696 -"manifest or file metadata that it can see in the changelog, it can never see " 1.12697 -"partially written data." 1.12698 -msgstr "" 1.12699 - 1.12700 -#. type: Content of: <book><chapter><sect1><para> 1.12701 -#: ../en/ch09-hook.xml:283 1.12702 -msgid "" 1.12703 -"Some controlling hooks (<literal role=\"hook\">pretxncommit</literal> and " 1.12704 -"<literal role=\"hook\">pretxnchangegroup</literal>) run when a transaction is " 1.12705 -"almost complete. All of the metadata has been written, but Mercurial can " 1.12706 -"still roll the transaction back and cause the newly-written data to disappear." 1.12707 -msgstr "" 1.12708 - 1.12709 -#. type: Content of: <book><chapter><sect1><para> 1.12710 -#: ../en/ch09-hook.xml:291 1.12711 -msgid "" 1.12712 -"If one of these hooks runs for long, it opens a window of time during which a " 1.12713 -"reader can see the metadata for changesets that are not yet permanent, and " 1.12714 -"should not be thought of as <quote>really there</quote>. The longer the hook " 1.12715 -"runs, the longer that window is open." 1.12716 -msgstr "" 1.12717 - 1.12718 -#. type: Content of: <book><chapter><sect1><sect2><title> 1.12719 -#: ../en/ch09-hook.xml:299 1.12720 -msgid "The problem illustrated" 1.12721 -msgstr "问题的演示" 1.12722 - 1.12723 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.12724 -#: ../en/ch09-hook.xml:301 1.12725 -msgid "" 1.12726 -"In principle, a good use for the <literal role=\"hook\">pretxnchangegroup</" 1.12727 -"literal> hook would be to automatically build and test incoming changes " 1.12728 -"before they are accepted into a central repository. This could let you " 1.12729 -"guarantee that nobody can push changes to this repository that <quote>break " 1.12730 -"the build</quote>. But if a client can pull changes while they're being " 1.12731 -"tested, the usefulness of the test is zero; an unsuspecting someone can pull " 1.12732 -"untested changes, potentially breaking their build." 1.12733 -msgstr "" 1.12734 - 1.12735 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.12736 -#: ../en/ch09-hook.xml:312 1.12737 -msgid "" 1.12738 -"The safest technological answer to this challenge is to set up such a " 1.12739 -"<quote>gatekeeper</quote> repository as <emphasis>unidirectional</emphasis>. " 1.12740 -"Let it take changes pushed in from the outside, but do not allow anyone to " 1.12741 -"pull changes from it (use the <literal role=\"hook\">preoutgoing</literal> " 1.12742 -"hook to lock it down). Configure a <literal role=\"hook\">changegroup</" 1.12743 -"literal> hook so that if a build or test succeeds, the hook will push the new " 1.12744 -"changes out to another repository that people <emphasis>can</emphasis> pull " 1.12745 -"from." 1.12746 -msgstr "" 1.12747 - 1.12748 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.12749 -#: ../en/ch09-hook.xml:324 1.12750 -msgid "" 1.12751 -"In practice, putting a centralised bottleneck like this in place is not often " 1.12752 -"a good idea, and transaction visibility has nothing to do with the problem. " 1.12753 -"As the size of a project&emdash;and the time it takes to build and " 1.12754 -"test&emdash;grows, you rapidly run into a wall with this <quote>try before " 1.12755 -"you buy</quote> approach, where you have more changesets to test than time in " 1.12756 -"which to deal with them. The inevitable result is frustration on the part of " 1.12757 -"all involved." 1.12758 -msgstr "" 1.12759 - 1.12760 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.12761 -#: ../en/ch09-hook.xml:335 1.12762 -msgid "" 1.12763 -"An approach that scales better is to get people to build and test before they " 1.12764 -"push, then run automated builds and tests centrally <emphasis>after</" 1.12765 -"emphasis> a push, to be sure all is well. The advantage of this approach is " 1.12766 -"that it does not impose a limit on the rate at which the repository can " 1.12767 -"accept changes." 1.12768 -msgstr "" 1.12769 - 1.12770 -#. type: Content of: <book><chapter><sect1><title> 1.12771 -#: ../en/ch09-hook.xml:346 1.12772 +#: ../en/ch10-hook.xml:237 1.12773 msgid "A short tutorial on using hooks" 1.12774 msgstr "使用钩子的简短指南" 1.12775 1.12776 #. type: Content of: <book><chapter><sect1><para> 1.12777 -#: ../en/ch09-hook.xml:348 1.12778 +#: ../en/ch10-hook.xml:239 1.12779 msgid "" 1.12780 "It is easy to write a Mercurial hook. Let's start with a hook that runs when " 1.12781 "you finish a <command role=\"hg-cmd\">hg commit</command>, and simply prints " 1.12782 @@ -10953,12 +12539,12 @@ 1.12783 msgstr "" 1.12784 1.12785 #. type: Content of: <book><chapter><sect1><para> 1.12786 -#: ../en/ch09-hook.xml:355 1.12787 +#: ../en/ch10-hook.xml:246 1.12788 msgid "All hooks follow the pattern in this example." 1.12789 msgstr "" 1.12790 1.12791 #. type: Content of: <book><chapter><sect1><para> 1.12792 -#: ../en/ch09-hook.xml:359 1.12793 +#: ../en/ch10-hook.xml:250 1.12794 msgid "" 1.12795 "You add an entry to the <literal role=\"rc-hooks\">hooks</literal> section of " 1.12796 "your <filename role=\"special\">~/.hgrc</filename>. On the left is the name " 1.12797 @@ -10969,19 +12555,19 @@ 1.12798 msgstr "" 1.12799 1.12800 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12801 -#: ../en/ch09-hook.xml:369 1.12802 +#: ../en/ch10-hook.xml:260 1.12803 msgid "Performing multiple actions per event" 1.12804 msgstr "每个事件执行多个操作" 1.12805 1.12806 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12807 -#: ../en/ch09-hook.xml:371 1.12808 +#: ../en/ch10-hook.xml:262 1.12809 msgid "" 1.12810 "Quite often, you will want to define more than one hook for a particular kind " 1.12811 "of event, as shown below." 1.12812 msgstr "" 1.12813 1.12814 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12815 -#: ../en/ch09-hook.xml:376 1.12816 +#: ../en/ch10-hook.xml:267 1.12817 msgid "" 1.12818 "Mercurial lets you do this by adding an <emphasis>extension</emphasis> to the " 1.12819 "end of a hook's name. You extend a hook's name by giving the name of the " 1.12820 @@ -10992,7 +12578,7 @@ 1.12821 msgstr "" 1.12822 1.12823 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12824 -#: ../en/ch09-hook.xml:387 1.12825 +#: ../en/ch10-hook.xml:278 1.12826 msgid "" 1.12827 "To give a well-defined order of execution when there are multiple hooks " 1.12828 "defined for an event, Mercurial sorts hooks by extension, and executes the " 1.12829 @@ -11002,7 +12588,7 @@ 1.12830 msgstr "" 1.12831 1.12832 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12833 -#: ../en/ch09-hook.xml:396 1.12834 +#: ../en/ch10-hook.xml:287 1.12835 msgid "" 1.12836 "It is a good idea to use a somewhat descriptive extension when you define a " 1.12837 "new hook. This will help you to remember what the hook was for. If the hook " 1.12838 @@ -11012,12 +12598,12 @@ 1.12839 msgstr "" 1.12840 1.12841 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12842 -#: ../en/ch09-hook.xml:407 1.12843 +#: ../en/ch10-hook.xml:298 1.12844 msgid "Controlling whether an activity can proceed" 1.12845 msgstr "控制处理的活动" 1.12846 1.12847 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12848 -#: ../en/ch09-hook.xml:409 1.12849 +#: ../en/ch10-hook.xml:300 1.12850 msgid "" 1.12851 "In our earlier examples, we used the <literal role=\"hook\">commit</literal> " 1.12852 "hook, which is run after a commit has completed. This is one of several " 1.12853 @@ -11026,7 +12612,7 @@ 1.12854 msgstr "" 1.12855 1.12856 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12857 -#: ../en/ch09-hook.xml:416 1.12858 +#: ../en/ch10-hook.xml:307 1.12859 msgid "" 1.12860 "Mercurial defines a number of events that occur before an activity starts; or " 1.12861 "after it starts, but before it finishes. Hooks that trigger on these events " 1.12862 @@ -11035,7 +12621,7 @@ 1.12863 msgstr "" 1.12864 1.12865 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12866 -#: ../en/ch09-hook.xml:422 1.12867 +#: ../en/ch10-hook.xml:313 1.12868 msgid "" 1.12869 "The <literal role=\"hook\">pretxncommit</literal> hook runs after a commit " 1.12870 "has all but completed. In other words, the metadata representing the " 1.12871 @@ -11046,7 +12632,7 @@ 1.12872 msgstr "" 1.12873 1.12874 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12875 -#: ../en/ch09-hook.xml:431 1.12876 +#: ../en/ch10-hook.xml:322 1.12877 msgid "" 1.12878 "If the <literal role=\"hook\">pretxncommit</literal> hook exits with a status " 1.12879 "code of zero, the transaction is allowed to complete; the commit finishes; " 1.12880 @@ -11057,19 +12643,19 @@ 1.12881 msgstr "" 1.12882 1.12883 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12884 -#: ../en/ch09-hook.xml:443 1.12885 +#: ../en/ch10-hook.xml:334 1.12886 msgid "" 1.12887 "The hook in the example above checks that a commit comment contains a bug " 1.12888 "ID. If it does, the commit can complete. If not, the commit is rolled back." 1.12889 msgstr "" 1.12890 1.12891 #. type: Content of: <book><chapter><sect1><title> 1.12892 -#: ../en/ch09-hook.xml:451 1.12893 +#: ../en/ch10-hook.xml:342 1.12894 msgid "Writing your own hooks" 1.12895 msgstr "编写钩子" 1.12896 1.12897 #. type: Content of: <book><chapter><sect1><para> 1.12898 -#: ../en/ch09-hook.xml:453 1.12899 +#: ../en/ch10-hook.xml:344 1.12900 msgid "" 1.12901 "When you are writing a hook, you might find it useful to run Mercurial either " 1.12902 "with the <option role=\"hg-opt-global\">-v</option> option, or the <envar " 1.12903 @@ -11078,12 +12664,12 @@ 1.12904 msgstr "" 1.12905 1.12906 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12907 -#: ../en/ch09-hook.xml:462 1.12908 +#: ../en/ch10-hook.xml:353 1.12909 msgid "Choosing how your hook should run" 1.12910 msgstr "选择钩子的执行方式" 1.12911 1.12912 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12913 -#: ../en/ch09-hook.xml:464 1.12914 +#: ../en/ch10-hook.xml:355 1.12915 msgid "" 1.12916 "You can write a hook either as a normal program&emdash;typically a shell " 1.12917 "script&emdash;or as a Python function that is executed within the Mercurial " 1.12918 @@ -11091,7 +12677,7 @@ 1.12919 msgstr "" 1.12920 1.12921 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12922 -#: ../en/ch09-hook.xml:469 1.12923 +#: ../en/ch10-hook.xml:360 1.12924 msgid "" 1.12925 "Writing a hook as an external program has the advantage that it requires no " 1.12926 "knowledge of Mercurial's internals. You can call normal Mercurial commands " 1.12927 @@ -11100,7 +12686,7 @@ 1.12928 msgstr "" 1.12929 1.12930 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12931 -#: ../en/ch09-hook.xml:476 1.12932 +#: ../en/ch10-hook.xml:367 1.12933 msgid "" 1.12934 "An in-process Python hook has complete access to the Mercurial API, and does " 1.12935 "not <quote>shell out</quote> to another process, so it is inherently faster " 1.12936 @@ -11110,7 +12696,7 @@ 1.12937 msgstr "" 1.12938 1.12939 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12940 -#: ../en/ch09-hook.xml:484 1.12941 +#: ../en/ch10-hook.xml:375 1.12942 msgid "" 1.12943 "If you are comfortable with Python, or require high performance, writing your " 1.12944 "hooks in Python may be a good choice. However, when you have a " 1.12945 @@ -11119,12 +12705,12 @@ 1.12946 msgstr "" 1.12947 1.12948 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12949 -#: ../en/ch09-hook.xml:493 1.12950 +#: ../en/ch10-hook.xml:384 1.12951 msgid "Hook parameters" 1.12952 msgstr "钩子的参数" 1.12953 1.12954 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12955 -#: ../en/ch09-hook.xml:495 1.12956 +#: ../en/ch10-hook.xml:386 1.12957 msgid "" 1.12958 "Mercurial calls each hook with a set of well-defined parameters. In Python, " 1.12959 "a parameter is passed as a keyword argument to your hook function. For an " 1.12960 @@ -11132,7 +12718,7 @@ 1.12961 msgstr "" 1.12962 1.12963 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12964 -#: ../en/ch09-hook.xml:501 1.12965 +#: ../en/ch10-hook.xml:392 1.12966 msgid "" 1.12967 "Whether your hook is written in Python or as a shell script, the hook-" 1.12968 "specific parameter names and values will be the same. A boolean parameter " 1.12969 @@ -11145,12 +12731,12 @@ 1.12970 msgstr "" 1.12971 1.12972 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12973 -#: ../en/ch09-hook.xml:515 1.12974 +#: ../en/ch10-hook.xml:406 1.12975 msgid "Hook return values and activity control" 1.12976 msgstr "钩子的返回值与活动控制" 1.12977 1.12978 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12979 -#: ../en/ch09-hook.xml:517 1.12980 +#: ../en/ch10-hook.xml:408 1.12981 msgid "" 1.12982 "A hook that executes successfully must exit with a status of zero if " 1.12983 "external, or return boolean <quote>false</quote> if in-process. Failure is " 1.12984 @@ -11160,19 +12746,19 @@ 1.12985 msgstr "" 1.12986 1.12987 #. type: Content of: <book><chapter><sect1><sect2><para> 1.12988 -#: ../en/ch09-hook.xml:525 1.12989 +#: ../en/ch10-hook.xml:416 1.12990 msgid "" 1.12991 "For a hook that controls whether an activity can proceed, zero/false means " 1.12992 "<quote>allow</quote>, while non-zero/true/exception means <quote>deny</quote>." 1.12993 msgstr "" 1.12994 1.12995 #. type: Content of: <book><chapter><sect1><sect2><title> 1.12996 -#: ../en/ch09-hook.xml:532 1.12997 +#: ../en/ch10-hook.xml:423 1.12998 msgid "Writing an external hook" 1.12999 msgstr "编写外部钩子" 1.13000 1.13001 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13002 -#: ../en/ch09-hook.xml:534 1.13003 +#: ../en/ch10-hook.xml:425 1.13004 msgid "" 1.13005 "When you define an external hook in your <filename role=\"special\">~/.hgrc</" 1.13006 "filename> and the hook is run, its value is passed to your shell, which " 1.13007 @@ -11181,14 +12767,14 @@ 1.13008 msgstr "" 1.13009 1.13010 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13011 -#: ../en/ch09-hook.xml:541 1.13012 +#: ../en/ch10-hook.xml:432 1.13013 msgid "" 1.13014 "An executable hook is always run with its current directory set to a " 1.13015 "repository's root directory." 1.13016 msgstr "" 1.13017 1.13018 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13019 -#: ../en/ch09-hook.xml:545 1.13020 +#: ../en/ch10-hook.xml:436 1.13021 msgid "" 1.13022 "Each hook parameter is passed in as an environment variable; the name is " 1.13023 "upper-cased, and prefixed with the string <quote><literal>HG_</literal></" 1.13024 @@ -11196,7 +12782,7 @@ 1.13025 msgstr "" 1.13026 1.13027 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13028 -#: ../en/ch09-hook.xml:550 1.13029 +#: ../en/ch10-hook.xml:441 1.13030 msgid "" 1.13031 "With the exception of hook parameters, Mercurial does not set or modify any " 1.13032 "environment variables when running a hook. This is useful to remember if you " 1.13033 @@ -11207,12 +12793,12 @@ 1.13034 msgstr "" 1.13035 1.13036 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13037 -#: ../en/ch09-hook.xml:561 1.13038 +#: ../en/ch10-hook.xml:452 1.13039 msgid "Telling Mercurial to use an in-process hook" 1.13040 msgstr "让 Mercurial 使用进程内钩子" 1.13041 1.13042 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13043 -#: ../en/ch09-hook.xml:563 1.13044 +#: ../en/ch10-hook.xml:454 1.13045 msgid "" 1.13046 "The <filename role=\"special\">~/.hgrc</filename> syntax for defining an in-" 1.13047 "process hook is slightly different than for an executable hook. The value of " 1.13048 @@ -11222,7 +12808,7 @@ 1.13049 msgstr "" 1.13050 1.13051 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13052 -#: ../en/ch09-hook.xml:571 1.13053 +#: ../en/ch10-hook.xml:462 1.13054 msgid "" 1.13055 "The module in which a hook lives is automatically imported when a hook is " 1.13056 "run. So long as you have the module name and <envar>PYTHONPATH</envar> " 1.13057 @@ -11230,14 +12816,14 @@ 1.13058 msgstr "" 1.13059 1.13060 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13061 -#: ../en/ch09-hook.xml:577 1.13062 +#: ../en/ch10-hook.xml:468 1.13063 msgid "" 1.13064 "The following <filename role=\"special\">~/.hgrc</filename> example snippet " 1.13065 "illustrates the syntax and meaning of the notions we just described." 1.13066 msgstr "" 1.13067 1.13068 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13069 -#: ../en/ch09-hook.xml:583 1.13070 +#: ../en/ch10-hook.xml:474 1.13071 msgid "" 1.13072 "When Mercurial runs the <literal>commit.example</literal> hook, it imports " 1.13073 "<literal>mymodule.submodule</literal>, looks for the callable object named " 1.13074 @@ -11245,19 +12831,19 @@ 1.13075 msgstr "" 1.13076 1.13077 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13078 -#: ../en/ch09-hook.xml:591 1.13079 +#: ../en/ch10-hook.xml:482 1.13080 msgid "Writing an in-process hook" 1.13081 msgstr "编写进程内钩子" 1.13082 1.13083 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13084 -#: ../en/ch09-hook.xml:593 1.13085 +#: ../en/ch10-hook.xml:484 1.13086 msgid "" 1.13087 "The simplest in-process hook does nothing, but illustrates the basic shape of " 1.13088 "the hook API:" 1.13089 msgstr "" 1.13090 1.13091 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13092 -#: ../en/ch09-hook.xml:598 1.13093 +#: ../en/ch10-hook.xml:489 1.13094 msgid "" 1.13095 "The first argument to a Python hook is always a <literal role=\"py-mod-" 1.13096 "mercurial.ui\">ui</literal> object. The second is a repository object; at " 1.13097 @@ -11269,17 +12855,17 @@ 1.13098 msgstr "" 1.13099 1.13100 #. type: Content of: <book><chapter><sect1><title> 1.13101 -#: ../en/ch09-hook.xml:613 1.13102 +#: ../en/ch10-hook.xml:504 1.13103 msgid "Some hook examples" 1.13104 msgstr "钩子样例" 1.13105 1.13106 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13107 -#: ../en/ch09-hook.xml:616 1.13108 +#: ../en/ch10-hook.xml:507 1.13109 msgid "Writing meaningful commit messages" 1.13110 msgstr "编写有意义的提交日志" 1.13111 1.13112 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13113 -#: ../en/ch09-hook.xml:618 1.13114 +#: ../en/ch10-hook.xml:509 1.13115 msgid "" 1.13116 "It's hard to imagine a useful commit message being very short. The simple " 1.13117 "<literal role=\"hook\">pretxncommit</literal> hook of the example below will " 1.13118 @@ -11288,12 +12874,12 @@ 1.13119 msgstr "" 1.13120 1.13121 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13122 -#: ../en/ch09-hook.xml:628 1.13123 +#: ../en/ch10-hook.xml:519 1.13124 msgid "Checking for trailing whitespace" 1.13125 msgstr "检查行尾空格" 1.13126 1.13127 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13128 -#: ../en/ch09-hook.xml:630 1.13129 +#: ../en/ch10-hook.xml:521 1.13130 msgid "" 1.13131 "An interesting use of a commit-related hook is to help you to write cleaner " 1.13132 "code. A simple example of <quote>cleaner code</quote> is the dictum that a " 1.13133 @@ -11305,7 +12891,7 @@ 1.13134 msgstr "" 1.13135 1.13136 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13137 -#: ../en/ch09-hook.xml:641 1.13138 +#: ../en/ch10-hook.xml:532 1.13139 msgid "" 1.13140 "You can use either the <literal role=\"hook\">precommit</literal> or <literal " 1.13141 "role=\"hook\">pretxncommit</literal> hook to tell whether you have a trailing " 1.13142 @@ -11320,7 +12906,7 @@ 1.13143 msgstr "" 1.13144 1.13145 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13146 -#: ../en/ch09-hook.xml:657 1.13147 +#: ../en/ch10-hook.xml:548 1.13148 msgid "" 1.13149 "Should you choose the <literal role=\"hook\">pretxncommit</literal> hook, the " 1.13150 "check won't occur until just before the transaction for the commit " 1.13151 @@ -11332,7 +12918,7 @@ 1.13152 msgstr "" 1.13153 1.13154 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13155 -#: ../en/ch09-hook.xml:670 1.13156 +#: ../en/ch10-hook.xml:561 1.13157 msgid "" 1.13158 "In this example, we introduce a simple <literal role=\"hook\">pretxncommit</" 1.13159 "literal> hook that checks for trailing whitespace. This hook is short, but " 1.13160 @@ -11344,7 +12930,7 @@ 1.13161 msgstr "" 1.13162 1.13163 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13164 -#: ../en/ch09-hook.xml:681 1.13165 +#: ../en/ch10-hook.xml:574 1.13166 msgid "" 1.13167 "The above version is much more complex, but also more useful. It parses a " 1.13168 "unified diff to see if any lines add trailing whitespace, and prints the name " 1.13169 @@ -11357,20 +12943,21 @@ 1.13170 msgstr "" 1.13171 1.13172 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13173 -#: ../en/ch09-hook.xml:695 1.13174 -msgid "" 1.13175 -"As a final aside, note in the example above the use of <command>perl</" 1.13176 +#: ../en/ch10-hook.xml:588 1.13177 +msgid "" 1.13178 +"As a final aside, note in the example above the use of <command>sed</" 1.13179 "command>'s in-place editing feature to get rid of trailing whitespace from a " 1.13180 -"file. This is concise and useful enough that I will reproduce it here." 1.13181 +"file. This is concise and useful enough that I will reproduce it here (using " 1.13182 +"<command>perl</command> for good measure)." 1.13183 msgstr "" 1.13184 1.13185 #. type: Content of: <book><chapter><sect1><title> 1.13186 -#: ../en/ch09-hook.xml:705 1.13187 +#: ../en/ch10-hook.xml:598 1.13188 msgid "Bundled hooks" 1.13189 msgstr "内置的钩子" 1.13190 1.13191 #. type: Content of: <book><chapter><sect1><para> 1.13192 -#: ../en/ch09-hook.xml:707 1.13193 +#: ../en/ch10-hook.xml:600 1.13194 msgid "" 1.13195 "Mercurial ships with several bundled hooks. You can find them in the " 1.13196 "<filename class=\"directory\">hgext</filename> directory of a Mercurial " 1.13197 @@ -11380,14 +12967,14 @@ 1.13198 msgstr "" 1.13199 1.13200 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13201 -#: ../en/ch09-hook.xml:716 1.13202 +#: ../en/ch10-hook.xml:609 1.13203 msgid "" 1.13204 "<literal role=\"hg-ext\">acl</literal>&emdash;access control for parts of a " 1.13205 "repository" 1.13206 msgstr "<literal role=\"hg-ext\">acl</literal>—版本库的访问控制" 1.13207 1.13208 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13209 -#: ../en/ch09-hook.xml:719 1.13210 +#: ../en/ch10-hook.xml:612 1.13211 msgid "" 1.13212 "The <literal role=\"hg-ext\">acl</literal> extension lets you control which " 1.13213 "remote users are allowed to push changesets to a networked server. You can " 1.13214 @@ -11397,7 +12984,7 @@ 1.13215 msgstr "" 1.13216 1.13217 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13218 -#: ../en/ch09-hook.xml:727 1.13219 +#: ../en/ch10-hook.xml:620 1.13220 msgid "" 1.13221 "This extension implements access control based on the identity of the user " 1.13222 "performing a push, <emphasis>not</emphasis> on who committed the changesets " 1.13223 @@ -11407,12 +12994,12 @@ 1.13224 msgstr "" 1.13225 1.13226 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13227 -#: ../en/ch09-hook.xml:737 1.13228 +#: ../en/ch10-hook.xml:630 1.13229 msgid "Configuring the <literal role=\"hook\">acl</literal> hook" 1.13230 msgstr "配置 <literal role=\"hook\">acl</literal> 钩子" 1.13231 1.13232 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13233 -#: ../en/ch09-hook.xml:740 1.13234 +#: ../en/ch10-hook.xml:633 1.13235 msgid "" 1.13236 "In order to manage incoming changesets, the <literal role=\"hg-ext\">acl</" 1.13237 "literal> hook must be used as a <literal role=\"hook\">pretxnchangegroup</" 1.13238 @@ -11422,14 +13009,14 @@ 1.13239 msgstr "" 1.13240 1.13241 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13242 -#: ../en/ch09-hook.xml:750 1.13243 +#: ../en/ch10-hook.xml:643 1.13244 msgid "" 1.13245 "The <literal role=\"hg-ext\">acl</literal> extension is configured using " 1.13246 "three sections." 1.13247 msgstr "" 1.13248 1.13249 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13250 -#: ../en/ch09-hook.xml:754 1.13251 +#: ../en/ch10-hook.xml:647 1.13252 msgid "" 1.13253 "The <literal role=\"rc-acl\">acl</literal> section has only one entry, <envar " 1.13254 "role=\"rc-item-acl\">sources</envar>, which lists the sources of incoming " 1.13255 @@ -11438,7 +13025,7 @@ 1.13256 msgstr "" 1.13257 1.13258 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13259 -#: ../en/ch09-hook.xml:761 1.13260 +#: ../en/ch10-hook.xml:654 1.13261 msgid "" 1.13262 "<envar role=\"rc-item-acl\">serve</envar>: Control incoming changesets that " 1.13263 "are arriving from a remote repository over http or ssh. This is the default " 1.13264 @@ -11447,28 +13034,28 @@ 1.13265 msgstr "" 1.13266 1.13267 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13268 -#: ../en/ch09-hook.xml:769 1.13269 +#: ../en/ch10-hook.xml:662 1.13270 msgid "" 1.13271 "<envar role=\"rc-item-acl\">pull</envar>: Control incoming changesets that " 1.13272 "are arriving via a pull from a local repository." 1.13273 msgstr "" 1.13274 1.13275 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13276 -#: ../en/ch09-hook.xml:774 1.13277 +#: ../en/ch10-hook.xml:667 1.13278 msgid "" 1.13279 "<envar role=\"rc-item-acl\">push</envar>: Control incoming changesets that " 1.13280 "are arriving via a push from a local repository." 1.13281 msgstr "" 1.13282 1.13283 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13284 -#: ../en/ch09-hook.xml:779 1.13285 +#: ../en/ch10-hook.xml:672 1.13286 msgid "" 1.13287 "<envar role=\"rc-item-acl\">bundle</envar>: Control incoming changesets that " 1.13288 "are arriving from another repository via a bundle." 1.13289 msgstr "" 1.13290 1.13291 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13292 -#: ../en/ch09-hook.xml:785 1.13293 +#: ../en/ch10-hook.xml:678 1.13294 msgid "" 1.13295 "The <literal role=\"rc-acl.allow\">acl.allow</literal> section controls the " 1.13296 "users that are allowed to add changesets to the repository. If this section " 1.13297 @@ -11478,7 +13065,7 @@ 1.13298 msgstr "" 1.13299 1.13300 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13301 -#: ../en/ch09-hook.xml:794 1.13302 +#: ../en/ch10-hook.xml:687 1.13303 msgid "" 1.13304 "The <literal role=\"rc-acl.deny\">acl.deny</literal> section determines which " 1.13305 "users are denied from adding changesets to the repository. If this section " 1.13306 @@ -11486,7 +13073,7 @@ 1.13307 msgstr "" 1.13308 1.13309 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13310 -#: ../en/ch09-hook.xml:800 1.13311 +#: ../en/ch10-hook.xml:693 1.13312 msgid "" 1.13313 "The syntaxes for the <literal role=\"rc-acl.allow\">acl.allow</literal> and " 1.13314 "<literal role=\"rc-acl.deny\">acl.deny</literal> sections are identical. On " 1.13315 @@ -11495,7 +13082,7 @@ 1.13316 msgstr "" 1.13317 1.13318 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13319 -#: ../en/ch09-hook.xml:808 1.13320 +#: ../en/ch10-hook.xml:701 1.13321 msgid "" 1.13322 "In the following example, the user <literal>docwriter</literal> can only push " 1.13323 "changes to the <filename class=\"directory\">docs</filename> subtree of the " 1.13324 @@ -11504,12 +13091,12 @@ 1.13325 msgstr "" 1.13326 1.13327 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13328 -#: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1279 1.13329 +#: ../en/ch10-hook.xml:715 ../en/ch10-hook.xml:979 ../en/ch10-hook.xml:1169 1.13330 msgid "Testing and troubleshooting" 1.13331 msgstr "测试与问题处理" 1.13332 1.13333 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13334 -#: ../en/ch09-hook.xml:824 1.13335 +#: ../en/ch10-hook.xml:717 1.13336 msgid "" 1.13337 "If you want to test the <literal role=\"hg-ext\">acl</literal> hook, run it " 1.13338 "with Mercurial's debugging output enabled. Since you'll probably be running " 1.13339 @@ -11520,7 +13107,7 @@ 1.13340 msgstr "" 1.13341 1.13342 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13343 -#: ../en/ch09-hook.xml:835 1.13344 +#: ../en/ch10-hook.xml:728 1.13345 msgid "" 1.13346 "With this enabled, the <literal role=\"hg-ext\">acl</literal> hook will print " 1.13347 "enough information to let you figure out why it is allowing or forbidding " 1.13348 @@ -11528,13 +13115,13 @@ 1.13349 msgstr "" 1.13350 1.13351 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13352 -#: ../en/ch09-hook.xml:844 1.13353 +#: ../en/ch10-hook.xml:737 1.13354 msgid "" 1.13355 "<literal role=\"hg-ext\">bugzilla</literal>&emdash;integration with Bugzilla" 1.13356 msgstr "<literal role=\"hg-ext\">bugzilla</literal>—与 Bugzilla 的集成" 1.13357 1.13358 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13359 -#: ../en/ch09-hook.xml:848 1.13360 +#: ../en/ch10-hook.xml:741 1.13361 msgid "" 1.13362 "The <literal role=\"hg-ext\">bugzilla</literal> extension adds a comment to a " 1.13363 "Bugzilla bug whenever it finds a reference to that bug ID in a commit " 1.13364 @@ -11543,14 +13130,14 @@ 1.13365 msgstr "" 1.13366 1.13367 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13368 -#: ../en/ch09-hook.xml:855 1.13369 +#: ../en/ch10-hook.xml:748 1.13370 msgid "" 1.13371 "It adds a comment to the bug that looks like this (you can configure the " 1.13372 "contents of the comment&emdash;see below):" 1.13373 msgstr "" 1.13374 1.13375 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13376 -#: ../en/ch09-hook.xml:864 1.13377 +#: ../en/ch10-hook.xml:757 1.13378 msgid "" 1.13379 "The value of this hook is that it automates the process of updating a bug any " 1.13380 "time a changeset refers to it. If you configure the hook properly, it makes " 1.13381 @@ -11559,14 +13146,14 @@ 1.13382 msgstr "" 1.13383 1.13384 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13385 -#: ../en/ch09-hook.xml:871 1.13386 +#: ../en/ch10-hook.xml:764 1.13387 msgid "" 1.13388 "You can use the code in this hook as a starting point for some more exotic " 1.13389 "Bugzilla integration recipes. Here are a few possibilities:" 1.13390 msgstr "" 1.13391 1.13392 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.13393 -#: ../en/ch09-hook.xml:876 1.13394 +#: ../en/ch10-hook.xml:769 1.13395 msgid "" 1.13396 "Require that every changeset pushed to the server have a valid bug ID in its " 1.13397 "commit comment. In this case, you'd want to configure the hook as a <literal " 1.13398 @@ -11575,7 +13162,7 @@ 1.13399 msgstr "" 1.13400 1.13401 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.13402 -#: ../en/ch09-hook.xml:884 1.13403 +#: ../en/ch10-hook.xml:777 1.13404 msgid "" 1.13405 "Allow incoming changesets to automatically modify the <emphasis>state</" 1.13406 "emphasis> of a bug, as well as simply adding a comment. For example, the " 1.13407 @@ -11585,12 +13172,12 @@ 1.13408 msgstr "" 1.13409 1.13410 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13411 -#: ../en/ch09-hook.xml:894 1.13412 +#: ../en/ch10-hook.xml:787 1.13413 msgid "Configuring the <literal role=\"hook\">bugzilla</literal> hook" 1.13414 msgstr "配置 <literal role=\"hook\">bugzilla</literal> 钩子" 1.13415 1.13416 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13417 -#: ../en/ch09-hook.xml:897 1.13418 +#: ../en/ch10-hook.xml:790 1.13419 msgid "" 1.13420 "You should configure this hook in your server's <filename role=\"special\">~/." 1.13421 "hgrc</filename> as an <literal role=\"hook\">incoming</literal> hook, for " 1.13422 @@ -11598,7 +13185,7 @@ 1.13423 msgstr "" 1.13424 1.13425 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13426 -#: ../en/ch09-hook.xml:905 1.13427 +#: ../en/ch10-hook.xml:798 1.13428 msgid "" 1.13429 "Because of the specialised nature of this hook, and because Bugzilla was not " 1.13430 "written with this kind of integration in mind, configuring this hook is a " 1.13431 @@ -11606,7 +13193,7 @@ 1.13432 msgstr "" 1.13433 1.13434 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13435 -#: ../en/ch09-hook.xml:911 1.13436 +#: ../en/ch10-hook.xml:804 1.13437 msgid "" 1.13438 "Before you begin, you must install the MySQL bindings for Python on the host" 1.13439 "(s) where you'll be running the hook. If this is not available as a binary " 1.13440 @@ -11615,7 +13202,7 @@ 1.13441 msgstr "" 1.13442 1.13443 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13444 -#: ../en/ch09-hook.xml:918 1.13445 +#: ../en/ch10-hook.xml:811 1.13446 msgid "" 1.13447 "Configuration information for this hook lives in the <literal role=\"rc-" 1.13448 "bugzilla\">bugzilla</literal> section of your <filename role=\"special\">~/." 1.13449 @@ -11623,16 +13210,15 @@ 1.13450 msgstr "" 1.13451 1.13452 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13453 -#: ../en/ch09-hook.xml:923 1.13454 +#: ../en/ch10-hook.xml:816 1.13455 msgid "" 1.13456 "<envar role=\"rc-item-bugzilla\">version</envar>: The version of Bugzilla " 1.13457 "installed on the server. The database schema that Bugzilla uses changes " 1.13458 -"occasionally, so this hook has to know exactly which schema to use. At the " 1.13459 -"moment, the only version supported is <literal>2.16</literal>." 1.13460 +"occasionally, so this hook has to know exactly which schema to use." 1.13461 msgstr "" 1.13462 1.13463 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13464 -#: ../en/ch09-hook.xml:932 1.13465 +#: ../en/ch10-hook.xml:822 1.13466 msgid "" 1.13467 "<envar role=\"rc-item-bugzilla\">host</envar>: The hostname of the MySQL " 1.13468 "server that stores your Bugzilla data. The database must be configured to " 1.13469 @@ -11641,7 +13227,7 @@ 1.13470 msgstr "" 1.13471 1.13472 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13473 -#: ../en/ch09-hook.xml:939 1.13474 +#: ../en/ch10-hook.xml:829 1.13475 msgid "" 1.13476 "<envar role=\"rc-item-bugzilla\">user</envar>: The username with which to " 1.13477 "connect to the MySQL server. The database must be configured to allow this " 1.13478 @@ -11652,7 +13238,7 @@ 1.13479 msgstr "" 1.13480 1.13481 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13482 -#: ../en/ch09-hook.xml:950 1.13483 +#: ../en/ch10-hook.xml:840 1.13484 msgid "" 1.13485 "<envar role=\"rc-item-bugzilla\">password</envar>: The MySQL password for the " 1.13486 "user you configured above. This is stored as plain text, so you should make " 1.13487 @@ -11661,7 +13247,7 @@ 1.13488 msgstr "" 1.13489 1.13490 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13491 -#: ../en/ch09-hook.xml:959 1.13492 +#: ../en/ch10-hook.xml:849 1.13493 msgid "" 1.13494 "<envar role=\"rc-item-bugzilla\">db</envar>: The name of the Bugzilla " 1.13495 "database on the MySQL server. The default value of this item is " 1.13496 @@ -11670,7 +13256,7 @@ 1.13497 msgstr "" 1.13498 1.13499 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13500 -#: ../en/ch09-hook.xml:966 1.13501 +#: ../en/ch10-hook.xml:856 1.13502 msgid "" 1.13503 "<envar role=\"rc-item-bugzilla\">notify</envar>: If you want Bugzilla to send " 1.13504 "out a notification email to subscribers after this hook has added a comment " 1.13505 @@ -11681,7 +13267,7 @@ 1.13506 msgstr "" 1.13507 1.13508 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13509 -#: ../en/ch09-hook.xml:979 1.13510 +#: ../en/ch10-hook.xml:869 1.13511 msgid "" 1.13512 "The Bugzilla <literal>processmail</literal> program expects to be given a bug " 1.13513 "ID (the hook replaces <quote><literal>%s</literal></quote> with the bug ID) " 1.13514 @@ -11692,12 +13278,12 @@ 1.13515 msgstr "" 1.13516 1.13517 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13518 -#: ../en/ch09-hook.xml:994 1.13519 +#: ../en/ch10-hook.xml:884 1.13520 msgid "Mapping committer names to Bugzilla user names" 1.13521 msgstr "提交者的名称与 Bugzilla 用户名称的映射" 1.13522 1.13523 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13524 -#: ../en/ch09-hook.xml:996 1.13525 +#: ../en/ch10-hook.xml:886 1.13526 msgid "" 1.13527 "By default, the <literal role=\"hg-ext\">bugzilla</literal> hook tries to use " 1.13528 "the email address of a changeset's committer as the Bugzilla user name with " 1.13529 @@ -11707,14 +13293,14 @@ 1.13530 msgstr "" 1.13531 1.13532 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13533 -#: ../en/ch09-hook.xml:1005 1.13534 +#: ../en/ch10-hook.xml:895 1.13535 msgid "" 1.13536 "Each item in the <literal role=\"rc-usermap\">usermap</literal> section " 1.13537 "contains an email address on the left, and a Bugzilla user name on the right." 1.13538 msgstr "" 1.13539 1.13540 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13541 -#: ../en/ch09-hook.xml:1012 1.13542 +#: ../en/ch10-hook.xml:902 1.13543 msgid "" 1.13544 "You can either keep the <literal role=\"rc-usermap\">usermap</literal> data " 1.13545 "in a normal <filename role=\"special\">~/.hgrc</filename>, or tell the " 1.13546 @@ -11727,19 +13313,19 @@ 1.13547 msgstr "" 1.13548 1.13549 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13550 -#: ../en/ch09-hook.xml:1028 1.13551 +#: ../en/ch10-hook.xml:918 1.13552 msgid "" 1.13553 "While the <filename>usermap</filename> file that it refers to might look like " 1.13554 "this:" 1.13555 msgstr "" 1.13556 1.13557 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13558 -#: ../en/ch09-hook.xml:1036 1.13559 +#: ../en/ch10-hook.xml:926 1.13560 msgid "Configuring the text that gets added to a bug" 1.13561 msgstr "配置增加到问题中的正文" 1.13562 1.13563 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13564 -#: ../en/ch09-hook.xml:1038 1.13565 +#: ../en/ch10-hook.xml:928 1.13566 msgid "" 1.13567 "You can configure the text that this hook adds as a comment; you specify it " 1.13568 "in the form of a Mercurial template. Several <filename role=\"special\">~/." 1.13569 @@ -11748,7 +13334,7 @@ 1.13570 msgstr "" 1.13571 1.13572 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13573 -#: ../en/ch09-hook.xml:1045 1.13574 +#: ../en/ch10-hook.xml:935 1.13575 msgid "" 1.13576 "<literal>strip</literal>: The number of leading path elements to strip from a " 1.13577 "repository's path name to construct a partial path for a URL. For example, if " 1.13578 @@ -11762,7 +13348,7 @@ 1.13579 msgstr "" 1.13580 1.13581 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13582 -#: ../en/ch09-hook.xml:1059 1.13583 +#: ../en/ch10-hook.xml:949 1.13584 msgid "" 1.13585 "<literal>template</literal>: The text of the template to use. In addition to " 1.13586 "the usual changeset-related variables, this template can use <literal>hgweb</" 1.13587 @@ -11772,7 +13358,7 @@ 1.13588 msgstr "" 1.13589 1.13590 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13591 -#: ../en/ch09-hook.xml:1069 1.13592 +#: ../en/ch10-hook.xml:959 1.13593 msgid "" 1.13594 "In addition, you can add a <envar role=\"rc-item-web\">baseurl</envar> item " 1.13595 "to the <literal role=\"rc-web\">web</literal> section of your <filename role=" 1.13596 @@ -11783,14 +13369,14 @@ 1.13597 msgstr "" 1.13598 1.13599 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13600 -#: ../en/ch09-hook.xml:1081 1.13601 +#: ../en/ch10-hook.xml:971 1.13602 msgid "" 1.13603 "Here is an example set of <literal role=\"hg-ext\">bugzilla</literal> hook " 1.13604 "config information." 1.13605 msgstr "" 1.13606 1.13607 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13608 -#: ../en/ch09-hook.xml:1091 1.13609 +#: ../en/ch10-hook.xml:981 1.13610 msgid "" 1.13611 "The most common problems with configuring the <literal role=\"hg-ext" 1.13612 "\">bugzilla</literal> hook relate to running Bugzilla's " 1.13613 @@ -11799,7 +13385,7 @@ 1.13614 msgstr "" 1.13615 1.13616 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13617 -#: ../en/ch09-hook.xml:1097 1.13618 +#: ../en/ch10-hook.xml:987 1.13619 msgid "" 1.13620 "Recall from <xref linkend=\"sec:hook:bugzilla:config\"/> above that the user " 1.13621 "that runs the Mercurial process on the server is also the one that will run " 1.13622 @@ -11810,7 +13396,7 @@ 1.13623 msgstr "" 1.13624 1.13625 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13626 -#: ../en/ch09-hook.xml:1108 1.13627 +#: ../en/ch10-hook.xml:998 1.13628 msgid "" 1.13629 "You can cause <filename>processmail</filename> to be run with the suitable " 1.13630 "user's identity using the <command>sudo</command> command. Here is an " 1.13631 @@ -11818,7 +13404,7 @@ 1.13632 msgstr "" 1.13633 1.13634 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13635 -#: ../en/ch09-hook.xml:1115 1.13636 +#: ../en/ch10-hook.xml:1005 1.13637 msgid "" 1.13638 "This allows the <literal>hg_user</literal> user to run a " 1.13639 "<filename>processmail-wrapper</filename> program under the identity of " 1.13640 @@ -11826,7 +13412,7 @@ 1.13641 msgstr "" 1.13642 1.13643 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13644 -#: ../en/ch09-hook.xml:1120 1.13645 +#: ../en/ch10-hook.xml:1010 1.13646 msgid "" 1.13647 "This indirection through a wrapper script is necessary, because " 1.13648 "<filename>processmail</filename> expects to be run with its current directory " 1.13649 @@ -11836,14 +13422,14 @@ 1.13650 msgstr "" 1.13651 1.13652 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13653 -#: ../en/ch09-hook.xml:1129 1.13654 +#: ../en/ch10-hook.xml:1019 1.13655 msgid "" 1.13656 "It doesn't seem to matter what email address you pass to " 1.13657 "<filename>processmail</filename>." 1.13658 msgstr "" 1.13659 1.13660 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13661 -#: ../en/ch09-hook.xml:1133 1.13662 +#: ../en/ch10-hook.xml:1023 1.13663 msgid "" 1.13664 "If your <literal role=\"rc-usermap\">usermap</literal> is not set up " 1.13665 "correctly, users will see an error message from the <literal role=\"hg-ext" 1.13666 @@ -11852,7 +13438,7 @@ 1.13667 msgstr "" 1.13668 1.13669 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13670 -#: ../en/ch09-hook.xml:1140 1.13671 +#: ../en/ch10-hook.xml:1030 1.13672 msgid "" 1.13673 "What this means is that the committer's address, <literal>john.q." 1.13674 "public@example.com</literal>, is not a valid Bugzilla user name, nor does it " 1.13675 @@ -11861,13 +13447,13 @@ 1.13676 msgstr "" 1.13677 1.13678 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13679 -#: ../en/ch09-hook.xml:1150 1.13680 +#: ../en/ch10-hook.xml:1040 1.13681 msgid "" 1.13682 "<literal role=\"hg-ext\">notify</literal>&emdash;send email notifications" 1.13683 msgstr "<literal role=\"hg-ext\">notify</literal>—邮件通知" 1.13684 1.13685 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13686 -#: ../en/ch09-hook.xml:1153 1.13687 +#: ../en/ch10-hook.xml:1043 1.13688 msgid "" 1.13689 "Although Mercurial's built-in web server provides RSS feeds of changes in " 1.13690 "every repository, many people prefer to receive change notifications via " 1.13691 @@ -11877,7 +13463,7 @@ 1.13692 msgstr "" 1.13693 1.13694 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13695 -#: ../en/ch09-hook.xml:1161 1.13696 +#: ../en/ch10-hook.xml:1051 1.13697 msgid "" 1.13698 "As with the <literal role=\"hg-ext\">bugzilla</literal> hook, the <literal " 1.13699 "role=\"hg-ext\">notify</literal> hook is template-driven, so you can " 1.13700 @@ -11885,7 +13471,7 @@ 1.13701 msgstr "" 1.13702 1.13703 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13704 -#: ../en/ch09-hook.xml:1167 1.13705 +#: ../en/ch10-hook.xml:1057 1.13706 msgid "" 1.13707 "By default, the <literal role=\"hg-ext\">notify</literal> hook includes a " 1.13708 "diff of every changeset that it sends out; you can limit the size of the " 1.13709 @@ -11894,12 +13480,12 @@ 1.13710 msgstr "" 1.13711 1.13712 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13713 -#: ../en/ch09-hook.xml:1175 1.13714 +#: ../en/ch10-hook.xml:1065 1.13715 msgid "Configuring the <literal role=\"hg-ext\">notify</literal> hook" 1.13716 msgstr "配置 <literal role=\"hg-ext\">notify</literal> 钩子" 1.13717 1.13718 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13719 -#: ../en/ch09-hook.xml:1178 1.13720 +#: ../en/ch10-hook.xml:1068 1.13721 msgid "" 1.13722 "You can set up the <literal role=\"hg-ext\">notify</literal> hook to send one " 1.13723 "email message per incoming changeset, or one per incoming group of changesets " 1.13724 @@ -11907,7 +13493,7 @@ 1.13725 msgstr "" 1.13726 1.13727 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13728 -#: ../en/ch09-hook.xml:1190 1.13729 +#: ../en/ch10-hook.xml:1080 1.13730 msgid "" 1.13731 "Configuration information for this hook lives in the <literal role=\"rc-notify" 1.13732 "\">notify</literal> section of a <filename role=\"special\">~/.hgrc</" 1.13733 @@ -11915,7 +13501,7 @@ 1.13734 msgstr "" 1.13735 1.13736 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13737 -#: ../en/ch09-hook.xml:1195 1.13738 +#: ../en/ch10-hook.xml:1085 1.13739 msgid "" 1.13740 "<envar role=\"rc-item-notify\">test</envar>: By default, this hook does not " 1.13741 "send out email at all; instead, it prints the message that it " 1.13742 @@ -11927,7 +13513,7 @@ 1.13743 msgstr "" 1.13744 1.13745 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13746 -#: ../en/ch09-hook.xml:1207 1.13747 +#: ../en/ch10-hook.xml:1097 1.13748 msgid "" 1.13749 "<envar role=\"rc-item-notify\">config</envar>: The path to a configuration " 1.13750 "file that contains subscription information. This is kept separate from the " 1.13751 @@ -11937,7 +13523,7 @@ 1.13752 msgstr "" 1.13753 1.13754 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13755 -#: ../en/ch09-hook.xml:1216 1.13756 +#: ../en/ch10-hook.xml:1106 1.13757 msgid "" 1.13758 "<envar role=\"rc-item-notify\">strip</envar>: The number of leading path " 1.13759 "separator characters to strip from a repository's path, when deciding whether " 1.13760 @@ -11952,7 +13538,7 @@ 1.13761 msgstr "" 1.13762 1.13763 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13764 -#: ../en/ch09-hook.xml:1233 1.13765 +#: ../en/ch10-hook.xml:1123 1.13766 msgid "" 1.13767 "<envar role=\"rc-item-notify\">template</envar>: The template text to use " 1.13768 "when sending messages. This specifies both the contents of the message " 1.13769 @@ -11960,7 +13546,7 @@ 1.13770 msgstr "" 1.13771 1.13772 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13773 -#: ../en/ch09-hook.xml:1239 1.13774 +#: ../en/ch10-hook.xml:1129 1.13775 msgid "" 1.13776 "<envar role=\"rc-item-notify\">maxdiff</envar>: The maximum number of lines " 1.13777 "of diff data to append to the end of a message. If a diff is longer than " 1.13778 @@ -11969,7 +13555,7 @@ 1.13779 msgstr "" 1.13780 1.13781 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13782 -#: ../en/ch09-hook.xml:1248 1.13783 +#: ../en/ch10-hook.xml:1138 1.13784 msgid "" 1.13785 "<envar role=\"rc-item-notify\">sources</envar>: A list of sources of " 1.13786 "changesets to consider. This lets you limit <literal role=\"hg-ext\">notify</" 1.13787 @@ -11979,7 +13565,7 @@ 1.13788 msgstr "" 1.13789 1.13790 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13791 -#: ../en/ch09-hook.xml:1259 1.13792 +#: ../en/ch10-hook.xml:1149 1.13793 msgid "" 1.13794 "If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the " 1.13795 "<literal role=\"rc-web\">web</literal> section, you can use it in a template; " 1.13796 @@ -11987,19 +13573,19 @@ 1.13797 msgstr "" 1.13798 1.13799 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13800 -#: ../en/ch09-hook.xml:1265 1.13801 +#: ../en/ch10-hook.xml:1155 1.13802 msgid "" 1.13803 "Here is an example set of <literal role=\"hg-ext\">notify</literal> " 1.13804 "configuration information." 1.13805 msgstr "" 1.13806 1.13807 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13808 -#: ../en/ch09-hook.xml:1271 1.13809 +#: ../en/ch10-hook.xml:1161 1.13810 msgid "This will produce a message that looks like the following:" 1.13811 msgstr "" 1.13812 1.13813 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13814 -#: ../en/ch09-hook.xml:1281 1.13815 +#: ../en/ch10-hook.xml:1171 1.13816 msgid "" 1.13817 "Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> " 1.13818 "extension <emphasis>will not send any mail</emphasis> until you explicitly " 1.13819 @@ -12009,22 +13595,22 @@ 1.13820 msgstr "" 1.13821 1.13822 #. type: Content of: <book><chapter><sect1><title> 1.13823 -#: ../en/ch09-hook.xml:1293 1.13824 +#: ../en/ch10-hook.xml:1183 1.13825 msgid "Information for writers of hooks" 1.13826 msgstr "编写钩子的信息" 1.13827 1.13828 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13829 -#: ../en/ch09-hook.xml:1296 1.13830 +#: ../en/ch10-hook.xml:1186 1.13831 msgid "In-process hook execution" 1.13832 msgstr "进程内钩子的执行" 1.13833 1.13834 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13835 -#: ../en/ch09-hook.xml:1298 1.13836 +#: ../en/ch10-hook.xml:1188 1.13837 msgid "An in-process hook is called with arguments of the following form:" 1.13838 msgstr "" 1.13839 1.13840 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13841 -#: ../en/ch09-hook.xml:1302 1.13842 +#: ../en/ch10-hook.xml:1192 1.13843 msgid "" 1.13844 "The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui" 1.13845 "\">ui</literal> object. The <literal>repo</literal> parameter is a <literal " 1.13846 @@ -12034,7 +13620,7 @@ 1.13847 msgstr "" 1.13848 1.13849 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.13850 -#: ../en/ch09-hook.xml:1311 1.13851 +#: ../en/ch10-hook.xml:1201 1.13852 msgid "" 1.13853 "If a parameter is named <literal>node</literal> or <literal>parentN</" 1.13854 "literal>, it will contain a hexadecimal changeset ID. The empty string is " 1.13855 @@ -12043,21 +13629,21 @@ 1.13856 msgstr "" 1.13857 1.13858 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.13859 -#: ../en/ch09-hook.xml:1318 1.13860 +#: ../en/ch10-hook.xml:1208 1.13861 msgid "" 1.13862 "If a parameter is named <literal>url</literal>, it will contain the URL of a " 1.13863 "remote repository, if that can be determined." 1.13864 msgstr "" 1.13865 1.13866 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.13867 -#: ../en/ch09-hook.xml:1323 1.13868 +#: ../en/ch10-hook.xml:1213 1.13869 msgid "" 1.13870 "Boolean-valued parameters are represented as Python <literal>bool</literal> " 1.13871 "objects." 1.13872 msgstr "" 1.13873 1.13874 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13875 -#: ../en/ch09-hook.xml:1328 1.13876 +#: ../en/ch10-hook.xml:1218 1.13877 msgid "" 1.13878 "An in-process hook is called without a change to the process's working " 1.13879 "directory (unlike external hooks, which are run in the root of the " 1.13880 @@ -12066,7 +13652,7 @@ 1.13881 msgstr "" 1.13882 1.13883 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13884 -#: ../en/ch09-hook.xml:1335 1.13885 +#: ../en/ch10-hook.xml:1225 1.13886 msgid "" 1.13887 "If a hook returns a boolean <quote>false</quote> value, it is considered to " 1.13888 "have succeeded. If it returns a boolean <quote>true</quote> value or raises " 1.13889 @@ -12075,7 +13661,7 @@ 1.13890 msgstr "" 1.13891 1.13892 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13893 -#: ../en/ch09-hook.xml:1342 1.13894 +#: ../en/ch10-hook.xml:1232 1.13895 msgid "" 1.13896 "Note that changeset IDs are passed into Python hooks as hexadecimal strings, " 1.13897 "not the binary hashes that Mercurial's APIs normally use. To convert a hash " 1.13898 @@ -12083,12 +13669,12 @@ 1.13899 msgstr "" 1.13900 1.13901 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13902 -#: ../en/ch09-hook.xml:1350 1.13903 +#: ../en/ch10-hook.xml:1240 1.13904 msgid "External hook execution" 1.13905 msgstr "外部钩子的执行" 1.13906 1.13907 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13908 -#: ../en/ch09-hook.xml:1352 1.13909 +#: ../en/ch10-hook.xml:1242 1.13910 msgid "" 1.13911 "An external hook is passed to the shell of the user running Mercurial. " 1.13912 "Features of that shell, such as variable substitution and command " 1.13913 @@ -12098,7 +13684,7 @@ 1.13914 msgstr "" 1.13915 1.13916 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13917 -#: ../en/ch09-hook.xml:1360 1.13918 +#: ../en/ch10-hook.xml:1250 1.13919 msgid "" 1.13920 "Hook parameters are passed to the hook as environment variables. Each " 1.13921 "environment variable's name is converted in upper case and prefixed with the " 1.13922 @@ -12109,7 +13695,7 @@ 1.13923 msgstr "" 1.13924 1.13925 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13926 -#: ../en/ch09-hook.xml:1369 1.13927 +#: ../en/ch10-hook.xml:1259 1.13928 msgid "" 1.13929 "A boolean parameter is represented as the string <quote><literal>1</literal></" 1.13930 "quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for " 1.13931 @@ -12122,19 +13708,19 @@ 1.13932 msgstr "" 1.13933 1.13934 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13935 -#: ../en/ch09-hook.xml:1381 1.13936 +#: ../en/ch10-hook.xml:1271 1.13937 msgid "" 1.13938 "If a hook exits with a status of zero, it is considered to have succeeded. " 1.13939 "If it exits with a non-zero status, it is considered to have failed." 1.13940 msgstr "" 1.13941 1.13942 #. type: Content of: <book><chapter><sect1><sect2><title> 1.13943 -#: ../en/ch09-hook.xml:1388 1.13944 +#: ../en/ch10-hook.xml:1278 1.13945 msgid "Finding out where changesets come from" 1.13946 msgstr "检查修改集来自何处" 1.13947 1.13948 #. type: Content of: <book><chapter><sect1><sect2><para> 1.13949 -#: ../en/ch09-hook.xml:1390 1.13950 +#: ../en/ch10-hook.xml:1280 1.13951 msgid "" 1.13952 "A hook that involves the transfer of changesets between a local repository " 1.13953 "and another may be able to find out information about the <quote>far side</" 1.13954 @@ -12144,12 +13730,12 @@ 1.13955 msgstr "" 1.13956 1.13957 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.13958 -#: ../en/ch09-hook.xml:1399 1.13959 +#: ../en/ch10-hook.xml:1289 1.13960 msgid "Sources of changesets" 1.13961 msgstr "修改集的来源" 1.13962 1.13963 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.13964 -#: ../en/ch09-hook.xml:1401 1.13965 +#: ../en/ch10-hook.xml:1291 1.13966 msgid "" 1.13967 "Mercurial will tell a hook what means are, or were, used to transfer " 1.13968 "changesets between repositories. This is provided by Mercurial in a Python " 1.13969 @@ -12158,40 +13744,40 @@ 1.13970 msgstr "" 1.13971 1.13972 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13973 -#: ../en/ch09-hook.xml:1409 1.13974 +#: ../en/ch10-hook.xml:1299 1.13975 msgid "" 1.13976 "<literal>serve</literal>: Changesets are transferred to or from a remote " 1.13977 "repository over http or ssh." 1.13978 msgstr "" 1.13979 1.13980 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13981 -#: ../en/ch09-hook.xml:1414 1.13982 +#: ../en/ch10-hook.xml:1304 1.13983 msgid "" 1.13984 "<literal>pull</literal>: Changesets are being transferred via a pull from one " 1.13985 "repository into another." 1.13986 msgstr "" 1.13987 1.13988 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13989 -#: ../en/ch09-hook.xml:1419 1.13990 +#: ../en/ch10-hook.xml:1309 1.13991 msgid "" 1.13992 "<literal>push</literal>: Changesets are being transferred via a push from one " 1.13993 "repository into another." 1.13994 msgstr "" 1.13995 1.13996 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.13997 -#: ../en/ch09-hook.xml:1424 1.13998 +#: ../en/ch10-hook.xml:1314 1.13999 msgid "" 1.14000 "<literal>bundle</literal>: Changesets are being transferred to or from a " 1.14001 "bundle." 1.14002 msgstr "" 1.14003 1.14004 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 1.14005 -#: ../en/ch09-hook.xml:1431 1.14006 +#: ../en/ch10-hook.xml:1321 1.14007 msgid "Where changes are going&emdash;remote repository URLs" 1.14008 msgstr "修改集要到哪里—远程版本库的地址" 1.14009 1.14010 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.14011 -#: ../en/ch09-hook.xml:1434 1.14012 +#: ../en/ch10-hook.xml:1324 1.14013 msgid "" 1.14014 "When possible, Mercurial will tell a hook the location of the <quote>far " 1.14015 "side</quote> of an activity that transfers changeset data between " 1.14016 @@ -12201,7 +13787,7 @@ 1.14017 msgstr "" 1.14018 1.14019 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 1.14020 -#: ../en/ch09-hook.xml:1442 1.14021 +#: ../en/ch10-hook.xml:1332 1.14022 msgid "" 1.14023 "This information is not always known. If a hook is invoked in a repository " 1.14024 "that is being served via http or ssh, Mercurial cannot tell where the remote " 1.14025 @@ -12210,14 +13796,14 @@ 1.14026 msgstr "" 1.14027 1.14028 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.14029 -#: ../en/ch09-hook.xml:1449 1.14030 +#: ../en/ch10-hook.xml:1339 1.14031 msgid "" 1.14032 "<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP " 1.14033 "address <literal>1.2.3.4</literal>." 1.14034 msgstr "" 1.14035 1.14036 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.14037 -#: ../en/ch09-hook.xml:1454 1.14038 +#: ../en/ch10-hook.xml:1344 1.14039 msgid "" 1.14040 "<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP " 1.14041 "address <literal>1.2.3.4</literal>. If the client is using SSL, this will be " 1.14042 @@ -12225,24 +13811,24 @@ 1.14043 msgstr "" 1.14044 1.14045 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 1.14046 -#: ../en/ch09-hook.xml:1461 1.14047 +#: ../en/ch10-hook.xml:1351 1.14048 msgid "Empty&emdash;no information could be discovered about the remote client." 1.14049 msgstr "" 1.14050 1.14051 #. type: Content of: <book><chapter><sect1><title> 1.14052 -#: ../en/ch09-hook.xml:1470 1.14053 +#: ../en/ch10-hook.xml:1359 1.14054 msgid "Hook reference" 1.14055 msgstr "钩子参考" 1.14056 1.14057 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14058 -#: ../en/ch09-hook.xml:1473 1.14059 +#: ../en/ch10-hook.xml:1362 1.14060 msgid "" 1.14061 "<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets " 1.14062 "added" 1.14063 msgstr "<literal role=\"hook\">changegroup</literal>—增加远程修改集之后" 1.14064 1.14065 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14066 -#: ../en/ch09-hook.xml:1476 1.14067 +#: ../en/ch10-hook.xml:1365 1.14068 msgid "" 1.14069 "This hook is run after a group of pre-existing changesets has been added to " 1.14070 "the repository, for example via a <command role=\"hg-cmd\">hg pull</command> " 1.14071 @@ -12253,7 +13839,7 @@ 1.14072 msgstr "" 1.14073 1.14074 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14075 -#: ../en/ch09-hook.xml:1486 1.14076 +#: ../en/ch10-hook.xml:1375 1.14077 msgid "" 1.14078 "Some possible uses for this hook include kicking off an automated build or " 1.14079 "test of the added changesets, updating a bug database, or notifying " 1.14080 @@ -12261,15 +13847,15 @@ 1.14081 msgstr "" 1.14082 1.14083 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14084 -#: ../en/ch09-hook.xml:1492 ../en/ch09-hook.xml:1532 ../en/ch09-hook.xml:1576 1.14085 -#: ../en/ch09-hook.xml:1618 ../en/ch09-hook.xml:1673 ../en/ch09-hook.xml:1713 1.14086 -#: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1783 ../en/ch09-hook.xml:1846 1.14087 -#: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1940 ../en/ch09-hook.xml:1967 1.14088 +#: ../en/ch10-hook.xml:1381 ../en/ch10-hook.xml:1421 ../en/ch10-hook.xml:1465 1.14089 +#: ../en/ch10-hook.xml:1507 ../en/ch10-hook.xml:1562 ../en/ch10-hook.xml:1602 1.14090 +#: ../en/ch10-hook.xml:1638 ../en/ch10-hook.xml:1672 ../en/ch10-hook.xml:1736 1.14091 +#: ../en/ch10-hook.xml:1794 ../en/ch10-hook.xml:1830 ../en/ch10-hook.xml:1857 1.14092 msgid "Parameters to this hook:" 1.14093 msgstr "" 1.14094 1.14095 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14096 -#: ../en/ch09-hook.xml:1495 ../en/ch09-hook.xml:1849 1.14097 +#: ../en/ch10-hook.xml:1384 ../en/ch10-hook.xml:1739 1.14098 msgid "" 1.14099 "<literal>node</literal>: A changeset ID. The changeset ID of the first " 1.14100 "changeset in the group that was added. All changesets between this and " 1.14101 @@ -12279,23 +13865,23 @@ 1.14102 msgstr "" 1.14103 1.14104 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14105 -#: ../en/ch09-hook.xml:1504 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676 1.14106 -#: ../en/ch09-hook.xml:1859 1.14107 +#: ../en/ch10-hook.xml:1393 ../en/ch10-hook.xml:1472 ../en/ch10-hook.xml:1565 1.14108 +#: ../en/ch10-hook.xml:1749 1.14109 msgid "" 1.14110 "<literal>source</literal>: A string. The source of these changes. See <xref " 1.14111 "linkend=\"sec:hook:sources\"/> for details." 1.14112 msgstr "" 1.14113 1.14114 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14115 -#: ../en/ch09-hook.xml:1509 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639 1.14116 -#: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1762 ../en/ch09-hook.xml:1864 1.14117 +#: ../en/ch10-hook.xml:1398 ../en/ch10-hook.xml:1477 ../en/ch10-hook.xml:1528 1.14118 +#: ../en/ch10-hook.xml:1570 ../en/ch10-hook.xml:1651 ../en/ch10-hook.xml:1754 1.14119 msgid "" 1.14120 "<literal>url</literal>: A URL. The location of the remote repository, if " 1.14121 "known. See <xref linkend=\"sec:hook:url\"/> for more information." 1.14122 msgstr "" 1.14123 1.14124 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14125 -#: ../en/ch09-hook.xml:1515 1.14126 +#: ../en/ch10-hook.xml:1404 1.14127 msgid "" 1.14128 "See also: <literal role=\"hook\">incoming</literal> (<xref linkend=\"sec:hook:" 1.14129 "incoming\"/>), <literal role=\"hook\">prechangegroup</literal> (<xref linkend=" 1.14130 @@ -12304,40 +13890,40 @@ 1.14131 msgstr "" 1.14132 1.14133 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14134 -#: ../en/ch09-hook.xml:1526 1.14135 +#: ../en/ch10-hook.xml:1415 1.14136 msgid "" 1.14137 "<literal role=\"hook\">commit</literal>&emdash;after a new changeset is " 1.14138 "created" 1.14139 msgstr "<literal role=\"hook\">commit</literal>—创建新修改集之后" 1.14140 1.14141 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14142 -#: ../en/ch09-hook.xml:1529 1.14143 +#: ../en/ch10-hook.xml:1418 1.14144 msgid "This hook is run after a new changeset has been created." 1.14145 msgstr "" 1.14146 1.14147 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14148 -#: ../en/ch09-hook.xml:1535 ../en/ch09-hook.xml:1907 1.14149 +#: ../en/ch10-hook.xml:1424 ../en/ch10-hook.xml:1797 1.14150 msgid "" 1.14151 "<literal>node</literal>: A changeset ID. The changeset ID of the newly " 1.14152 "committed changeset." 1.14153 msgstr "" 1.14154 1.14155 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14156 -#: ../en/ch09-hook.xml:1539 ../en/ch09-hook.xml:1911 1.14157 +#: ../en/ch10-hook.xml:1428 ../en/ch10-hook.xml:1801 1.14158 msgid "" 1.14159 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " 1.14160 "parent of the newly committed changeset." 1.14161 msgstr "" 1.14162 1.14163 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14164 -#: ../en/ch09-hook.xml:1544 ../en/ch09-hook.xml:1916 1.14165 +#: ../en/ch10-hook.xml:1433 ../en/ch10-hook.xml:1806 1.14166 msgid "" 1.14167 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " 1.14168 "parent of the newly committed changeset." 1.14169 msgstr "" 1.14170 1.14171 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14172 -#: ../en/ch09-hook.xml:1550 1.14173 +#: ../en/ch10-hook.xml:1439 1.14174 msgid "" 1.14175 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" 1.14176 "hook:precommit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref " 1.14177 @@ -12345,14 +13931,14 @@ 1.14178 msgstr "" 1.14179 1.14180 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14181 -#: ../en/ch09-hook.xml:1559 1.14182 +#: ../en/ch10-hook.xml:1448 1.14183 msgid "" 1.14184 "<literal role=\"hook\">incoming</literal>&emdash;after one remote changeset " 1.14185 "is added" 1.14186 msgstr "<literal role=\"hook\">incoming</literal>—增加远程修改集之后" 1.14187 1.14188 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14189 -#: ../en/ch09-hook.xml:1562 1.14190 +#: ../en/ch10-hook.xml:1451 1.14191 msgid "" 1.14192 "This hook is run after a pre-existing changeset has been added to the " 1.14193 "repository, for example via a <command role=\"hg-cmd\">hg push</command>. If " 1.14194 @@ -12361,7 +13947,7 @@ 1.14195 msgstr "" 1.14196 1.14197 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14198 -#: ../en/ch09-hook.xml:1569 1.14199 +#: ../en/ch10-hook.xml:1458 1.14200 msgid "" 1.14201 "You can use this hook for the same purposes as the <literal role=\"hook" 1.14202 "\">changegroup</literal> hook (<xref linkend=\"sec:hook:changegroup\"/>); " 1.14203 @@ -12370,13 +13956,13 @@ 1.14204 msgstr "" 1.14205 1.14206 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14207 -#: ../en/ch09-hook.xml:1579 1.14208 +#: ../en/ch10-hook.xml:1468 1.14209 msgid "" 1.14210 "<literal>node</literal>: A changeset ID. The ID of the newly added changeset." 1.14211 msgstr "" 1.14212 1.14213 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14214 -#: ../en/ch09-hook.xml:1594 1.14215 +#: ../en/ch10-hook.xml:1483 1.14216 msgid "" 1.14217 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 1.14218 "hook:changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> (<xref " 1.14219 @@ -12386,14 +13972,14 @@ 1.14220 msgstr "" 1.14221 1.14222 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14223 -#: ../en/ch09-hook.xml:1605 1.14224 +#: ../en/ch10-hook.xml:1494 1.14225 msgid "" 1.14226 "<literal role=\"hook\">outgoing</literal>&emdash;after changesets are " 1.14227 "propagated" 1.14228 msgstr "<literal role=\"hook\">outgoing</literal>—传播修改集之后" 1.14229 1.14230 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14231 -#: ../en/ch09-hook.xml:1608 1.14232 +#: ../en/ch10-hook.xml:1497 1.14233 msgid "" 1.14234 "This hook is run after a group of changesets has been propagated out of this " 1.14235 "repository, for example by a <command role=\"hg-cmd\">hg push</command> or " 1.14236 @@ -12401,21 +13987,21 @@ 1.14237 msgstr "" 1.14238 1.14239 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14240 -#: ../en/ch09-hook.xml:1614 1.14241 +#: ../en/ch10-hook.xml:1503 1.14242 msgid "" 1.14243 "One possible use for this hook is to notify administrators that changes have " 1.14244 "been pulled." 1.14245 msgstr "" 1.14246 1.14247 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14248 -#: ../en/ch09-hook.xml:1621 1.14249 +#: ../en/ch10-hook.xml:1510 1.14250 msgid "" 1.14251 "<literal>node</literal>: A changeset ID. The changeset ID of the first " 1.14252 "changeset of the group that was sent." 1.14253 msgstr "" 1.14254 1.14255 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14256 -#: ../en/ch09-hook.xml:1626 1.14257 +#: ../en/ch10-hook.xml:1515 1.14258 msgid "" 1.14259 "<literal>source</literal>: A string. The source of the of the operation (see " 1.14260 "<xref linkend=\"sec:hook:sources\"/>). If a remote client pulled changes " 1.14261 @@ -12427,28 +14013,28 @@ 1.14262 msgstr "" 1.14263 1.14264 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14265 -#: ../en/ch09-hook.xml:1645 1.14266 +#: ../en/ch10-hook.xml:1534 1.14267 msgid "" 1.14268 "See also: <literal role=\"hook\">preoutgoing</literal> (<xref linkend=\"sec:" 1.14269 "hook:preoutgoing\"/>)" 1.14270 msgstr "" 1.14271 1.14272 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14273 -#: ../en/ch09-hook.xml:1652 1.14274 +#: ../en/ch10-hook.xml:1541 1.14275 msgid "" 1.14276 "<literal role=\"hook\">prechangegroup</literal>&emdash;before starting to add " 1.14277 "remote changesets" 1.14278 msgstr "<literal role=\"hook\">prechangegroup</literal>—增加远程修改集之前" 1.14279 1.14280 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14281 -#: ../en/ch09-hook.xml:1656 1.14282 +#: ../en/ch10-hook.xml:1545 1.14283 msgid "" 1.14284 "This controlling hook is run before Mercurial begins to add a group of " 1.14285 "changesets from another repository." 1.14286 msgstr "" 1.14287 1.14288 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14289 -#: ../en/ch09-hook.xml:1660 1.14290 +#: ../en/ch10-hook.xml:1549 1.14291 msgid "" 1.14292 "This hook does not have any information about the changesets to be added, " 1.14293 "because it is run before transmission of those changesets is allowed to " 1.14294 @@ -12456,7 +14042,7 @@ 1.14295 msgstr "" 1.14296 1.14297 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14298 -#: ../en/ch09-hook.xml:1666 1.14299 +#: ../en/ch10-hook.xml:1555 1.14300 msgid "" 1.14301 "One use for this hook is to prevent external changes from being added to a " 1.14302 "repository. For example, you could use this to <quote>freeze</quote> a " 1.14303 @@ -12465,7 +14051,7 @@ 1.14304 msgstr "" 1.14305 1.14306 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14307 -#: ../en/ch09-hook.xml:1687 1.14308 +#: ../en/ch10-hook.xml:1576 1.14309 msgid "" 1.14310 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 1.14311 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " 1.14312 @@ -12474,14 +14060,14 @@ 1.14313 msgstr "" 1.14314 1.14315 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14316 -#: ../en/ch09-hook.xml:1698 1.14317 +#: ../en/ch10-hook.xml:1587 1.14318 msgid "" 1.14319 "<literal role=\"hook\">precommit</literal>&emdash;before starting to commit a " 1.14320 "changeset" 1.14321 msgstr "<literal role=\"hook\">precommit</literal>—提交修改集之前" 1.14322 1.14323 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14324 -#: ../en/ch09-hook.xml:1701 1.14325 +#: ../en/ch10-hook.xml:1590 1.14326 msgid "" 1.14327 "This hook is run before Mercurial begins to commit a new changeset. It is run " 1.14328 "before Mercurial has any of the metadata for the commit, such as the files to " 1.14329 @@ -12489,7 +14075,7 @@ 1.14330 msgstr "" 1.14331 1.14332 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14333 -#: ../en/ch09-hook.xml:1707 1.14334 +#: ../en/ch10-hook.xml:1596 1.14335 msgid "" 1.14336 "One use for this hook is to disable the ability to commit new changesets, " 1.14337 "while still allowing incoming changesets. Another is to run a build or test, " 1.14338 @@ -12497,28 +14083,28 @@ 1.14339 msgstr "" 1.14340 1.14341 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14342 -#: ../en/ch09-hook.xml:1716 1.14343 +#: ../en/ch10-hook.xml:1605 1.14344 msgid "" 1.14345 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " 1.14346 "parent of the working directory." 1.14347 msgstr "" 1.14348 1.14349 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14350 -#: ../en/ch09-hook.xml:1721 1.14351 +#: ../en/ch10-hook.xml:1610 1.14352 msgid "" 1.14353 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " 1.14354 "parent of the working directory." 1.14355 msgstr "" 1.14356 1.14357 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14358 -#: ../en/ch09-hook.xml:1726 1.14359 +#: ../en/ch10-hook.xml:1615 1.14360 msgid "" 1.14361 "If the commit proceeds, the parents of the working directory will become the " 1.14362 "parents of the new changeset." 1.14363 msgstr "" 1.14364 1.14365 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14366 -#: ../en/ch09-hook.xml:1730 1.14367 +#: ../en/ch10-hook.xml:1619 1.14368 msgid "" 1.14369 "See also: <literal role=\"hook\">commit</literal> (<xref linkend=\"sec:hook:" 1.14370 "commit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref linkend=" 1.14371 @@ -12526,28 +14112,28 @@ 1.14372 msgstr "" 1.14373 1.14374 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14375 -#: ../en/ch09-hook.xml:1738 1.14376 +#: ../en/ch10-hook.xml:1627 1.14377 msgid "" 1.14378 "<literal role=\"hook\">preoutgoing</literal>&emdash;before starting to " 1.14379 "propagate changesets" 1.14380 msgstr "<literal role=\"hook\">preoutgoing</literal>—传播修改集之前" 1.14381 1.14382 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14383 -#: ../en/ch09-hook.xml:1741 1.14384 +#: ../en/ch10-hook.xml:1630 1.14385 msgid "" 1.14386 "This hook is invoked before Mercurial knows the identities of the changesets " 1.14387 "to be transmitted." 1.14388 msgstr "" 1.14389 1.14390 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14391 -#: ../en/ch09-hook.xml:1745 1.14392 +#: ../en/ch10-hook.xml:1634 1.14393 msgid "" 1.14394 "One use for this hook is to prevent changes from being transmitted to another " 1.14395 "repository." 1.14396 msgstr "" 1.14397 1.14398 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14399 -#: ../en/ch09-hook.xml:1752 1.14400 +#: ../en/ch10-hook.xml:1641 1.14401 msgid "" 1.14402 "<literal>source</literal>: A string. The source of the operation that is " 1.14403 "attempting to obtain changes from this repository (see <xref linkend=\"sec:" 1.14404 @@ -12557,27 +14143,27 @@ 1.14405 msgstr "" 1.14406 1.14407 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14408 -#: ../en/ch09-hook.xml:1768 1.14409 +#: ../en/ch10-hook.xml:1657 1.14410 msgid "" 1.14411 "See also: <literal role=\"hook\">outgoing</literal> (<xref linkend=\"sec:hook:" 1.14412 "outgoing\"/>)" 1.14413 msgstr "" 1.14414 1.14415 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14416 -#: ../en/ch09-hook.xml:1775 1.14417 +#: ../en/ch10-hook.xml:1664 1.14418 msgid "" 1.14419 "<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset" 1.14420 msgstr "<literal role=\"hook\">pretag</literal>—创建标签之前" 1.14421 1.14422 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14423 -#: ../en/ch09-hook.xml:1778 1.14424 +#: ../en/ch10-hook.xml:1667 1.14425 msgid "" 1.14426 "This controlling hook is run before a tag is created. If the hook succeeds, " 1.14427 "creation of the tag proceeds. If the hook fails, the tag is not created." 1.14428 msgstr "" 1.14429 1.14430 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14431 -#: ../en/ch09-hook.xml:1786 1.14432 +#: ../en/ch10-hook.xml:1675 1.14433 msgid "" 1.14434 "<literal>local</literal>: A boolean. Whether the tag is local to this " 1.14435 "repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</" 1.14436 @@ -12586,19 +14172,19 @@ 1.14437 msgstr "" 1.14438 1.14439 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14440 -#: ../en/ch09-hook.xml:1793 1.14441 +#: ../en/ch10-hook.xml:1682 1.14442 msgid "" 1.14443 "<literal>node</literal>: A changeset ID. The ID of the changeset to be " 1.14444 "tagged." 1.14445 msgstr "" 1.14446 1.14447 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14448 -#: ../en/ch09-hook.xml:1797 1.14449 +#: ../en/ch10-hook.xml:1686 1.14450 msgid "<literal>tag</literal>: A string. The name of the tag to be created." 1.14451 msgstr "" 1.14452 1.14453 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14454 -#: ../en/ch09-hook.xml:1802 1.14455 +#: ../en/ch10-hook.xml:1691 1.14456 msgid "" 1.14457 "If the tag to be created is revision-controlled, the <literal role=\"hook" 1.14458 "\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> " 1.14459 @@ -12607,14 +14193,14 @@ 1.14460 msgstr "" 1.14461 1.14462 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14463 -#: ../en/ch09-hook.xml:1810 1.14464 +#: ../en/ch10-hook.xml:1699 1.14465 msgid "" 1.14466 "See also: <literal role=\"hook\">tag</literal> (<xref linkend=\"sec:hook:tag" 1.14467 "\"/>)" 1.14468 msgstr "" 1.14469 1.14470 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14471 -#: ../en/ch09-hook.xml:1815 1.14472 +#: ../en/ch10-hook.xml:1705 1.14473 msgid "" 1.14474 "<literal role=\"hook\">pretxnchangegroup</literal>&emdash;before completing " 1.14475 "addition of remote changesets" 1.14476 @@ -12622,7 +14208,7 @@ 1.14477 "<literal role=\"hook\">pretxnchangegroup</literal>—完成增加远程修改集之前" 1.14478 1.14479 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14480 -#: ../en/ch09-hook.xml:1819 1.14481 +#: ../en/ch10-hook.xml:1709 1.14482 msgid "" 1.14483 "This controlling hook is run before a transaction&emdash;that manages the " 1.14484 "addition of a group of new changesets from outside the repository&emdash;" 1.14485 @@ -12632,7 +14218,7 @@ 1.14486 msgstr "" 1.14487 1.14488 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14489 -#: ../en/ch09-hook.xml:1828 1.14490 +#: ../en/ch10-hook.xml:1718 1.14491 msgid "" 1.14492 "This hook can access the metadata associated with the almost-added " 1.14493 "changesets, but it should not do anything permanent with this data. It must " 1.14494 @@ -12640,7 +14226,7 @@ 1.14495 msgstr "" 1.14496 1.14497 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14498 -#: ../en/ch09-hook.xml:1834 1.14499 +#: ../en/ch10-hook.xml:1724 1.14500 msgid "" 1.14501 "While this hook is running, if other Mercurial processes access this " 1.14502 "repository, they will be able to see the almost-added changesets as if they " 1.14503 @@ -12649,7 +14235,7 @@ 1.14504 msgstr "" 1.14505 1.14506 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14507 -#: ../en/ch09-hook.xml:1841 1.14508 +#: ../en/ch10-hook.xml:1731 1.14509 msgid "" 1.14510 "This hook can be used to automatically vet a group of changesets. If the " 1.14511 "hook fails, all of the changesets are <quote>rejected</quote> when the " 1.14512 @@ -12657,7 +14243,7 @@ 1.14513 msgstr "" 1.14514 1.14515 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14516 -#: ../en/ch09-hook.xml:1870 1.14517 +#: ../en/ch10-hook.xml:1760 1.14518 msgid "" 1.14519 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 1.14520 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " 1.14521 @@ -12666,14 +14252,14 @@ 1.14522 msgstr "" 1.14523 1.14524 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14525 -#: ../en/ch09-hook.xml:1881 1.14526 +#: ../en/ch10-hook.xml:1771 1.14527 msgid "" 1.14528 "<literal role=\"hook\">pretxncommit</literal>&emdash;before completing commit " 1.14529 "of new changeset" 1.14530 msgstr "<literal role=\"hook\">pretxncommit</literal>—完成提交之前" 1.14531 1.14532 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14533 -#: ../en/ch09-hook.xml:1884 1.14534 +#: ../en/ch10-hook.xml:1774 1.14535 msgid "" 1.14536 "This controlling hook is run before a transaction&emdash;that manages a new " 1.14537 "commit&emdash;completes. If the hook succeeds, the transaction completes and " 1.14538 @@ -12682,7 +14268,7 @@ 1.14539 msgstr "" 1.14540 1.14541 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14542 -#: ../en/ch09-hook.xml:1892 1.14543 +#: ../en/ch10-hook.xml:1782 1.14544 msgid "" 1.14545 "This hook can access the metadata associated with the almost-new changeset, " 1.14546 "but it should not do anything permanent with this data. It must also not " 1.14547 @@ -12690,7 +14276,7 @@ 1.14548 msgstr "" 1.14549 1.14550 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14551 -#: ../en/ch09-hook.xml:1898 1.14552 +#: ../en/ch10-hook.xml:1788 1.14553 msgid "" 1.14554 "While this hook is running, if other Mercurial processes access this " 1.14555 "repository, they will be able to see the almost-new changeset as if it is " 1.14556 @@ -12699,7 +14285,7 @@ 1.14557 msgstr "" 1.14558 1.14559 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14560 -#: ../en/ch09-hook.xml:1922 1.14561 +#: ../en/ch10-hook.xml:1812 1.14562 msgid "" 1.14563 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" 1.14564 "hook:precommit\"/>)" 1.14565 @@ -12708,14 +14294,14 @@ 1.14566 "precommit\"/>)" 1.14567 1.14568 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14569 -#: ../en/ch09-hook.xml:1929 1.14570 +#: ../en/ch10-hook.xml:1819 1.14571 msgid "" 1.14572 "<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging " 1.14573 "working directory" 1.14574 msgstr "<literal role=\"hook\">preupdate</literal>—更新或合并工作目录之前" 1.14575 1.14576 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14577 -#: ../en/ch09-hook.xml:1932 1.14578 +#: ../en/ch10-hook.xml:1822 1.14579 msgid "" 1.14580 "This controlling hook is run before an update or merge of the working " 1.14581 "directory begins. It is run only if Mercurial's normal pre-update checks " 1.14582 @@ -12724,7 +14310,7 @@ 1.14583 msgstr "" 1.14584 1.14585 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14586 -#: ../en/ch09-hook.xml:1943 1.14587 +#: ../en/ch10-hook.xml:1833 1.14588 msgid "" 1.14589 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 1.14590 "working directory is to be updated to. If the working directory is being " 1.14591 @@ -12732,7 +14318,7 @@ 1.14592 msgstr "" 1.14593 1.14594 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14595 -#: ../en/ch09-hook.xml:1949 1.14596 +#: ../en/ch10-hook.xml:1839 1.14597 msgid "" 1.14598 "<literal>parent2</literal>: A changeset ID. Only set if the working directory " 1.14599 "is being merged. The ID of the revision that the working directory is being " 1.14600 @@ -12740,24 +14326,24 @@ 1.14601 msgstr "" 1.14602 1.14603 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14604 -#: ../en/ch09-hook.xml:1956 1.14605 +#: ../en/ch10-hook.xml:1846 1.14606 msgid "" 1.14607 "See also: <literal role=\"hook\">update</literal> (<xref linkend=\"sec:hook:" 1.14608 "update\"/>)" 1.14609 msgstr "" 1.14610 1.14611 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14612 -#: ../en/ch09-hook.xml:1961 1.14613 +#: ../en/ch10-hook.xml:1851 1.14614 msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset" 1.14615 msgstr "<literal role=\"hook\">tag</literal>—创建标签之后" 1.14616 1.14617 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14618 -#: ../en/ch09-hook.xml:1964 1.14619 +#: ../en/ch10-hook.xml:1854 1.14620 msgid "This hook is run after a tag has been created." 1.14621 msgstr "" 1.14622 1.14623 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14624 -#: ../en/ch09-hook.xml:1970 1.14625 +#: ../en/ch10-hook.xml:1860 1.14626 msgid "" 1.14627 "<literal>local</literal>: A boolean. Whether the new tag is local to this " 1.14628 "repository instance (i.e. stored in <filename role=\"special\">.hg/" 1.14629 @@ -12766,19 +14352,19 @@ 1.14630 msgstr "" 1.14631 1.14632 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14633 -#: ../en/ch09-hook.xml:1978 1.14634 +#: ../en/ch10-hook.xml:1868 1.14635 msgid "" 1.14636 "<literal>node</literal>: A changeset ID. The ID of the changeset that was " 1.14637 "tagged." 1.14638 msgstr "" 1.14639 1.14640 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14641 -#: ../en/ch09-hook.xml:1982 1.14642 +#: ../en/ch10-hook.xml:1872 1.14643 msgid "<literal>tag</literal>: A string. The name of the tag that was created." 1.14644 msgstr "" 1.14645 1.14646 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14647 -#: ../en/ch09-hook.xml:1987 1.14648 +#: ../en/ch10-hook.xml:1877 1.14649 msgid "" 1.14650 "If the created tag is revision-controlled, the <literal role=\"hook\">commit</" 1.14651 "literal> hook (section <xref linkend=\"sec:hook:commit\"/>) is run before " 1.14652 @@ -12786,7 +14372,7 @@ 1.14653 msgstr "" 1.14654 1.14655 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14656 -#: ../en/ch09-hook.xml:1992 1.14657 +#: ../en/ch10-hook.xml:1882 1.14658 msgid "" 1.14659 "See also: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:" 1.14660 "pretag\"/>)" 1.14661 @@ -12795,14 +14381,14 @@ 1.14662 "\"/>)" 1.14663 1.14664 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14665 -#: ../en/ch09-hook.xml:1998 1.14666 +#: ../en/ch10-hook.xml:1888 1.14667 msgid "" 1.14668 "<literal role=\"hook\">update</literal>&emdash;after updating or merging " 1.14669 "working directory" 1.14670 msgstr "<literal role=\"hook\">update</literal>—更新或合并工作目录之后" 1.14671 1.14672 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14673 -#: ../en/ch09-hook.xml:2001 1.14674 +#: ../en/ch10-hook.xml:1891 1.14675 msgid "" 1.14676 "This hook is run after an update or merge of the working directory " 1.14677 "completes. Since a merge can fail (if the external <command>hgmerge</" 1.14678 @@ -12811,14 +14397,14 @@ 1.14679 msgstr "" 1.14680 1.14681 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14682 -#: ../en/ch09-hook.xml:2009 1.14683 +#: ../en/ch10-hook.xml:1899 1.14684 msgid "" 1.14685 "<literal>error</literal>: A boolean. Indicates whether the update or merge " 1.14686 "completed successfully." 1.14687 msgstr "" 1.14688 1.14689 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14690 -#: ../en/ch09-hook.xml:2014 1.14691 +#: ../en/ch10-hook.xml:1904 1.14692 msgid "" 1.14693 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 1.14694 "working directory was updated to. If the working directory was merged, it " 1.14695 @@ -12826,7 +14412,7 @@ 1.14696 msgstr "" 1.14697 1.14698 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.14699 -#: ../en/ch09-hook.xml:2020 1.14700 +#: ../en/ch10-hook.xml:1910 1.14701 msgid "" 1.14702 "<literal>parent2</literal>: A changeset ID. Only set if the working " 1.14703 "directory was merged. The ID of the revision that the working directory was " 1.14704 @@ -12834,33 +14420,34 @@ 1.14705 msgstr "" 1.14706 1.14707 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14708 -#: ../en/ch09-hook.xml:2026 1.14709 +#: ../en/ch10-hook.xml:1916 1.14710 msgid "" 1.14711 "See also: <literal role=\"hook\">preupdate</literal> (<xref linkend=\"sec:" 1.14712 "hook:preupdate\"/>)" 1.14713 msgstr "" 1.14714 1.14715 #. type: Content of: <book><chapter><title> 1.14716 -#: ../en/ch10-template.xml:5 1.14717 -msgid "Customising the output of Mercurial" 1.14718 +#: ../en/ch11-template.xml:5 1.14719 +#, fuzzy 1.14720 +msgid "Customizing the output of Mercurial" 1.14721 msgstr "定制 Mercurial 的输出" 1.14722 1.14723 #. type: Content of: <book><chapter><para> 1.14724 -#: ../en/ch10-template.xml:7 1.14725 +#: ../en/ch11-template.xml:7 1.14726 msgid "" 1.14727 "Mercurial provides a powerful mechanism to let you control how it displays " 1.14728 "information. The mechanism is based on templates. You can use templates to " 1.14729 -"generate specific output for a single command, or to customise the entire " 1.14730 +"generate specific output for a single command, or to customize the entire " 1.14731 "appearance of the built-in web interface." 1.14732 msgstr "" 1.14733 1.14734 #. type: Content of: <book><chapter><sect1><title> 1.14735 -#: ../en/ch10-template.xml:14 1.14736 +#: ../en/ch11-template.xml:14 1.14737 msgid "Using precanned output styles" 1.14738 msgstr "使用预定义的输出样式" 1.14739 1.14740 #. type: Content of: <book><chapter><sect1><para> 1.14741 -#: ../en/ch10-template.xml:16 1.14742 +#: ../en/ch11-template.xml:16 1.14743 msgid "" 1.14744 "Packaged with Mercurial are some output styles that you can use immediately. " 1.14745 "A style is simply a precanned template that someone wrote and installed " 1.14746 @@ -12868,14 +14455,14 @@ 1.14747 msgstr "" 1.14748 1.14749 #. type: Content of: <book><chapter><sect1><para> 1.14750 -#: ../en/ch10-template.xml:21 1.14751 +#: ../en/ch11-template.xml:21 1.14752 msgid "" 1.14753 "Before we take a look at Mercurial's bundled styles, let's review its normal " 1.14754 "output." 1.14755 msgstr "" 1.14756 1.14757 #. type: Content of: <book><chapter><sect1><para> 1.14758 -#: ../en/ch10-template.xml:26 1.14759 +#: ../en/ch11-template.xml:26 1.14760 msgid "" 1.14761 "This is somewhat informative, but it takes up a lot of space&emdash;five " 1.14762 "lines of output per changeset. The <literal>compact</literal> style reduces " 1.14763 @@ -12883,7 +14470,7 @@ 1.14764 msgstr "" 1.14765 1.14766 #. type: Content of: <book><chapter><sect1><para> 1.14767 -#: ../en/ch10-template.xml:33 1.14768 +#: ../en/ch11-template.xml:33 1.14769 msgid "" 1.14770 "The <literal>changelog</literal> style hints at the expressive power of " 1.14771 "Mercurial's templating engine. This style attempts to follow the GNU " 1.14772 @@ -12891,19 +14478,19 @@ 1.14773 msgstr "" 1.14774 1.14775 #. type: Content of: <book><chapter><sect1><para> 1.14776 -#: ../en/ch10-template.xml:40 1.14777 +#: ../en/ch11-template.xml:40 1.14778 msgid "" 1.14779 "You will not be shocked to learn that Mercurial's default output style is " 1.14780 "named <literal>default</literal>." 1.14781 msgstr "" 1.14782 1.14783 #. type: Content of: <book><chapter><sect1><sect2><title> 1.14784 -#: ../en/ch10-template.xml:44 1.14785 +#: ../en/ch11-template.xml:44 1.14786 msgid "Setting a default style" 1.14787 msgstr "设置默认样式" 1.14788 1.14789 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14790 -#: ../en/ch10-template.xml:46 1.14791 +#: ../en/ch11-template.xml:46 1.14792 msgid "" 1.14793 "You can modify the output style that Mercurial will use for every command by " 1.14794 "editing your <filename role=\"special\">~/.hgrc</filename> file, naming the " 1.14795 @@ -12911,7 +14498,7 @@ 1.14796 msgstr "" 1.14797 1.14798 #. type: Content of: <book><chapter><sect1><sect2><para> 1.14799 -#: ../en/ch10-template.xml:54 1.14800 +#: ../en/ch11-template.xml:54 1.14801 msgid "" 1.14802 "If you write a style of your own, you can use it by either providing the path " 1.14803 "to your style file, or copying your style file into a location where " 1.14804 @@ -12920,12 +14507,12 @@ 1.14805 msgstr "" 1.14806 1.14807 #. type: Content of: <book><chapter><sect1><title> 1.14808 -#: ../en/ch10-template.xml:63 1.14809 +#: ../en/ch11-template.xml:63 1.14810 msgid "Commands that support styles and templates" 1.14811 msgstr "支持样式和模版的命令" 1.14812 1.14813 #. type: Content of: <book><chapter><sect1><para> 1.14814 -#: ../en/ch10-template.xml:65 1.14815 +#: ../en/ch11-template.xml:65 1.14816 msgid "" 1.14817 "All of Mercurial's <quote><literal>log</literal>-like</quote> commands let " 1.14818 "you use styles and templates: <command role=\"hg-cmd\">hg incoming</command>, " 1.14819 @@ -12934,21 +14521,21 @@ 1.14820 msgstr "" 1.14821 1.14822 #. type: Content of: <book><chapter><sect1><para> 1.14823 -#: ../en/ch10-template.xml:72 1.14824 +#: ../en/ch11-template.xml:72 1.14825 msgid "" 1.14826 "As I write this manual, these are so far the only commands that support " 1.14827 "styles and templates. Since these are the most important commands that need " 1.14828 -"customisable output, there has been little pressure from the Mercurial user " 1.14829 +"customizable output, there has been little pressure from the Mercurial user " 1.14830 "community to add style and template support to other commands." 1.14831 msgstr "" 1.14832 1.14833 #. type: Content of: <book><chapter><sect1><title> 1.14834 -#: ../en/ch10-template.xml:80 1.14835 +#: ../en/ch11-template.xml:80 1.14836 msgid "The basics of templating" 1.14837 msgstr "模版基础" 1.14838 1.14839 #. type: Content of: <book><chapter><sect1><para> 1.14840 -#: ../en/ch10-template.xml:82 1.14841 +#: ../en/ch11-template.xml:82 1.14842 msgid "" 1.14843 "At its simplest, a Mercurial template is a piece of text. Some of the text " 1.14844 "never changes, while other parts are <emphasis>expanded</emphasis>, or " 1.14845 @@ -12956,20 +14543,20 @@ 1.14846 msgstr "" 1.14847 1.14848 #. type: Content of: <book><chapter><sect1><para> 1.14849 -#: ../en/ch10-template.xml:87 1.14850 +#: ../en/ch11-template.xml:87 1.14851 msgid "" 1.14852 "Before we continue, let's look again at a simple example of Mercurial's " 1.14853 "normal output." 1.14854 msgstr "" 1.14855 1.14856 #. type: Content of: <book><chapter><sect1><para> 1.14857 -#: ../en/ch10-template.xml:92 1.14858 +#: ../en/ch11-template.xml:92 1.14859 msgid "" 1.14860 "Now, let's run the same command, but using a template to change its output." 1.14861 msgstr "" 1.14862 1.14863 #. type: Content of: <book><chapter><sect1><para> 1.14864 -#: ../en/ch10-template.xml:97 1.14865 +#: ../en/ch11-template.xml:97 1.14866 msgid "" 1.14867 "The example above illustrates the simplest possible template; it's just a " 1.14868 "piece of static text, printed once for each changeset. The <option role=\"hg-" 1.14869 @@ -12979,7 +14566,7 @@ 1.14870 msgstr "" 1.14871 1.14872 #. type: Content of: <book><chapter><sect1><para> 1.14873 -#: ../en/ch10-template.xml:105 1.14874 +#: ../en/ch11-template.xml:105 1.14875 msgid "" 1.14876 "Notice that the template string above ends with the text <quote><literal>\\n</" 1.14877 "literal></quote>. This is an <emphasis>escape sequence</emphasis>, telling " 1.14878 @@ -12989,14 +14576,14 @@ 1.14879 msgstr "" 1.14880 1.14881 #. type: Content of: <book><chapter><sect1><para> 1.14882 -#: ../en/ch10-template.xml:113 1.14883 +#: ../en/ch11-template.xml:113 1.14884 msgid "" 1.14885 "A template that prints a fixed string of text all the time isn't very useful; " 1.14886 "let's try something a bit more complex." 1.14887 msgstr "" 1.14888 1.14889 #. type: Content of: <book><chapter><sect1><para> 1.14890 -#: ../en/ch10-template.xml:119 1.14891 +#: ../en/ch11-template.xml:119 1.14892 msgid "" 1.14893 "As you can see, the string <quote><literal>{desc}</literal></quote> in the " 1.14894 "template has been replaced in the output with the description of each " 1.14895 @@ -13008,25 +14595,25 @@ 1.14896 msgstr "" 1.14897 1.14898 #. type: Content of: <book><chapter><sect1><title> 1.14899 -#: ../en/ch10-template.xml:131 1.14900 +#: ../en/ch11-template.xml:131 1.14901 msgid "Common template keywords" 1.14902 msgstr "模版关键字" 1.14903 1.14904 #. type: Content of: <book><chapter><sect1><para> 1.14905 -#: ../en/ch10-template.xml:133 1.14906 +#: ../en/ch11-template.xml:133 1.14907 msgid "" 1.14908 "You can start writing simple templates immediately using the keywords below." 1.14909 msgstr "" 1.14910 1.14911 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14912 -#: ../en/ch10-template.xml:137 1.14913 +#: ../en/ch11-template.xml:137 1.14914 msgid "" 1.14915 "<literal role=\"template-keyword\">author</literal>: String. The unmodified " 1.14916 "author of the changeset." 1.14917 msgstr "" 1.14918 1.14919 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14920 -#: ../en/ch10-template.xml:141 1.14921 +#: ../en/ch11-template.xml:141 1.14922 msgid "" 1.14923 "<literal role=\"template-keyword\">branches</literal>: String. The name of " 1.14924 "the branch on which the changeset was committed. Will be empty if the branch " 1.14925 @@ -13034,7 +14621,7 @@ 1.14926 msgstr "" 1.14927 1.14928 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14929 -#: ../en/ch10-template.xml:147 1.14930 +#: ../en/ch11-template.xml:147 1.14931 msgid "" 1.14932 "<literal role=\"template-keyword\">date</literal>: Date information. The " 1.14933 "date when the changeset was committed. This is <emphasis>not</emphasis> " 1.14934 @@ -13046,70 +14633,70 @@ 1.14935 msgstr "" 1.14936 1.14937 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14938 -#: ../en/ch10-template.xml:158 1.14939 +#: ../en/ch11-template.xml:158 1.14940 msgid "" 1.14941 "<literal role=\"template-keyword\">desc</literal>: String. The text of the " 1.14942 "changeset description." 1.14943 msgstr "" 1.14944 1.14945 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14946 -#: ../en/ch10-template.xml:161 1.14947 +#: ../en/ch11-template.xml:161 1.14948 msgid "" 1.14949 "<literal role=\"template-keyword\">files</literal>: List of strings. All " 1.14950 "files modified, added, or removed by this changeset." 1.14951 msgstr "" 1.14952 1.14953 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14954 -#: ../en/ch10-template.xml:166 1.14955 +#: ../en/ch11-template.xml:166 1.14956 msgid "" 1.14957 "<literal role=\"template-keyword\">file_adds</literal>: List of strings. " 1.14958 "Files added by this changeset." 1.14959 msgstr "" 1.14960 1.14961 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14962 -#: ../en/ch10-template.xml:170 1.14963 +#: ../en/ch11-template.xml:170 1.14964 msgid "" 1.14965 "<literal role=\"template-keyword\">file_dels</literal>: List of strings. " 1.14966 "Files removed by this changeset." 1.14967 msgstr "" 1.14968 1.14969 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14970 -#: ../en/ch10-template.xml:174 1.14971 +#: ../en/ch11-template.xml:174 1.14972 msgid "" 1.14973 "<literal role=\"template-keyword\">node</literal>: String. The changeset " 1.14974 "identification hash, as a 40-character hexadecimal string." 1.14975 msgstr "" 1.14976 1.14977 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14978 -#: ../en/ch10-template.xml:178 1.14979 +#: ../en/ch11-template.xml:178 1.14980 msgid "" 1.14981 "<literal role=\"template-keyword\">parents</literal>: List of strings. The " 1.14982 "parents of the changeset." 1.14983 msgstr "" 1.14984 1.14985 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14986 -#: ../en/ch10-template.xml:182 1.14987 +#: ../en/ch11-template.xml:182 1.14988 msgid "" 1.14989 "<literal role=\"template-keyword\">rev</literal>: Integer. The repository-" 1.14990 "local changeset revision number." 1.14991 msgstr "" 1.14992 1.14993 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.14994 -#: ../en/ch10-template.xml:186 1.14995 +#: ../en/ch11-template.xml:186 1.14996 msgid "" 1.14997 "<literal role=\"template-keyword\">tags</literal>: List of strings. Any tags " 1.14998 "associated with the changeset." 1.14999 msgstr "" 1.15000 1.15001 #. type: Content of: <book><chapter><sect1><para> 1.15002 -#: ../en/ch10-template.xml:191 1.15003 +#: ../en/ch11-template.xml:192 1.15004 msgid "" 1.15005 "A few simple experiments will show us what to expect when we use these " 1.15006 "keywords; you can see the results below." 1.15007 msgstr "" 1.15008 1.15009 #. type: Content of: <book><chapter><sect1><para> 1.15010 -#: ../en/ch10-template.xml:196 1.15011 +#: ../en/ch11-template.xml:197 1.15012 msgid "" 1.15013 "As we noted above, the date keyword does not produce human-readable output, " 1.15014 "so we must treat it specially. This involves using a <emphasis>filter</" 1.15015 @@ -13117,12 +14704,12 @@ 1.15016 msgstr "" 1.15017 1.15018 #. type: Content of: <book><chapter><sect1><title> 1.15019 -#: ../en/ch10-template.xml:205 1.15020 +#: ../en/ch11-template.xml:206 1.15021 msgid "Escape sequences" 1.15022 msgstr "转义序列" 1.15023 1.15024 #. type: Content of: <book><chapter><sect1><para> 1.15025 -#: ../en/ch10-template.xml:207 1.15026 +#: ../en/ch11-template.xml:208 1.15027 msgid "" 1.15028 "Mercurial's templating engine recognises the most commonly used escape " 1.15029 "sequences in strings. When it sees a backslash (<quote><literal>\\</" 1.15030 @@ -13131,48 +14718,48 @@ 1.15031 msgstr "" 1.15032 1.15033 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15034 -#: ../en/ch10-template.xml:214 1.15035 +#: ../en/ch11-template.xml:215 1.15036 msgid "" 1.15037 "<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII " 1.15038 "134." 1.15039 msgstr "" 1.15040 1.15041 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15042 -#: ../en/ch10-template.xml:218 1.15043 +#: ../en/ch11-template.xml:219 1.15044 msgid "<literal>\\n</literal>: Newline, ASCII 12." 1.15045 msgstr "" 1.15046 1.15047 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15048 -#: ../en/ch10-template.xml:221 1.15049 +#: ../en/ch11-template.xml:222 1.15050 msgid "<literal>\\r</literal>: Carriage return, ASCII 15." 1.15051 msgstr "" 1.15052 1.15053 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15054 -#: ../en/ch10-template.xml:224 1.15055 +#: ../en/ch11-template.xml:225 1.15056 msgid "<literal>\\t</literal>: Tab, ASCII 11." 1.15057 msgstr "" 1.15058 1.15059 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15060 -#: ../en/ch10-template.xml:227 1.15061 +#: ../en/ch11-template.xml:228 1.15062 msgid "<literal>\\v</literal>: Vertical tab, ASCII 13." 1.15063 msgstr "" 1.15064 1.15065 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15066 -#: ../en/ch10-template.xml:230 1.15067 -msgid "" 1.15068 -"<literal>{</literal>: Open curly brace, <quote><literal>{</literal></quote>, " 1.15069 -"ASCII 173." 1.15070 +#: ../en/ch11-template.xml:231 1.15071 +msgid "" 1.15072 +"<literal>\\{</literal>: Open curly brace, <quote><literal>{</literal></" 1.15073 +"quote>, ASCII 173." 1.15074 msgstr "" 1.15075 1.15076 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15077 -#: ../en/ch10-template.xml:234 1.15078 -msgid "" 1.15079 -"<literal>}</literal>: Close curly brace, <quote><literal>}</literal></quote>, " 1.15080 -"ASCII 175." 1.15081 -msgstr "" 1.15082 - 1.15083 -#. type: Content of: <book><chapter><sect1><para> 1.15084 -#: ../en/ch10-template.xml:239 1.15085 +#: ../en/ch11-template.xml:235 1.15086 +msgid "" 1.15087 +"<literal>\\}</literal>: Close curly brace, <quote><literal>}</literal></" 1.15088 +"quote>, ASCII 175." 1.15089 +msgstr "" 1.15090 + 1.15091 +#. type: Content of: <book><chapter><sect1><para> 1.15092 +#: ../en/ch11-template.xml:240 1.15093 msgid "" 1.15094 "As indicated above, if you want the expansion of a template to contain a " 1.15095 "literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></" 1.15096 @@ -13180,12 +14767,12 @@ 1.15097 msgstr "" 1.15098 1.15099 #. type: Content of: <book><chapter><sect1><title> 1.15100 -#: ../en/ch10-template.xml:247 1.15101 +#: ../en/ch11-template.xml:248 1.15102 msgid "Filtering keywords to change their results" 1.15103 msgstr "通过过滤关键字来修改输出结果" 1.15104 1.15105 #. type: Content of: <book><chapter><sect1><para> 1.15106 -#: ../en/ch10-template.xml:249 1.15107 +#: ../en/ch11-template.xml:250 1.15108 msgid "" 1.15109 "Some of the results of template expansion are not immediately easy to use. " 1.15110 "Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> " 1.15111 @@ -13195,7 +14782,7 @@ 1.15112 msgstr "" 1.15113 1.15114 #. type: Content of: <book><chapter><sect1><para> 1.15115 -#: ../en/ch10-template.xml:256 1.15116 +#: ../en/ch11-template.xml:257 1.15117 msgid "" 1.15118 "Below is a list of the most commonly used filters that Mercurial supports. " 1.15119 "While some filters can be applied to any text, others can only be used in " 1.15120 @@ -13204,7 +14791,7 @@ 1.15121 msgstr "" 1.15122 1.15123 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15124 -#: ../en/ch10-template.xml:263 1.15125 +#: ../en/ch11-template.xml:264 1.15126 msgid "" 1.15127 "<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML " 1.15128 "<quote><literal><br/></literal></quote> tag before the end of every " 1.15129 @@ -13213,7 +14800,7 @@ 1.15130 msgstr "" 1.15131 1.15132 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15133 -#: ../en/ch10-template.xml:270 1.15134 +#: ../en/ch11-template.xml:271 1.15135 msgid "" 1.15136 "<literal role=\"template-kw-filt-date\">age</literal>: <literal role=" 1.15137 "\"template-keyword\">date</literal> keyword. Render the age of the date, " 1.15138 @@ -13222,7 +14809,7 @@ 1.15139 msgstr "" 1.15140 1.15141 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15142 -#: ../en/ch10-template.xml:277 1.15143 +#: ../en/ch11-template.xml:278 1.15144 msgid "" 1.15145 "<literal role=\"template-filter\">basename</literal>: Any text, but most " 1.15146 "useful for the <literal role=\"template-keyword\">files</literal> keyword and " 1.15147 @@ -13232,7 +14819,7 @@ 1.15148 msgstr "" 1.15149 1.15150 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15151 -#: ../en/ch10-template.xml:286 1.15152 +#: ../en/ch11-template.xml:287 1.15153 msgid "" 1.15154 "<literal role=\"template-kw-filt-date\">date</literal>: <literal role=" 1.15155 "\"template-keyword\">date</literal> keyword. Render a date in a similar " 1.15156 @@ -13242,7 +14829,7 @@ 1.15157 msgstr "" 1.15158 1.15159 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15160 -#: ../en/ch10-template.xml:294 1.15161 +#: ../en/ch11-template.xml:295 1.15162 msgid "" 1.15163 "<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but " 1.15164 "most useful for the <literal role=\"template-keyword\">author</literal> " 1.15165 @@ -13253,7 +14840,7 @@ 1.15166 msgstr "" 1.15167 1.15168 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15169 -#: ../en/ch10-template.xml:304 1.15170 +#: ../en/ch11-template.xml:305 1.15171 msgid "" 1.15172 "<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most " 1.15173 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 1.15174 @@ -13263,7 +14850,7 @@ 1.15175 msgstr "" 1.15176 1.15177 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15178 -#: ../en/ch10-template.xml:313 1.15179 +#: ../en/ch11-template.xml:314 1.15180 msgid "" 1.15181 "<literal role=\"template-filter\">escape</literal>: Any text. Replace the " 1.15182 "special XML/XHTML characters <quote><literal>&</literal></quote>, " 1.15183 @@ -13272,7 +14859,7 @@ 1.15184 msgstr "" 1.15185 1.15186 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15187 -#: ../en/ch10-template.xml:321 1.15188 +#: ../en/ch11-template.xml:322 1.15189 msgid "" 1.15190 "<literal role=\"template-filter\">fill68</literal>: Any text. Wrap the text " 1.15191 "to fit in 68 columns. This is useful before you pass text through the " 1.15192 @@ -13281,21 +14868,21 @@ 1.15193 msgstr "" 1.15194 1.15195 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15196 -#: ../en/ch10-template.xml:329 1.15197 +#: ../en/ch11-template.xml:330 1.15198 msgid "" 1.15199 "<literal role=\"template-filter\">fill76</literal>: Any text. Wrap the text " 1.15200 "to fit in 76 columns." 1.15201 msgstr "" 1.15202 1.15203 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15204 -#: ../en/ch10-template.xml:333 1.15205 +#: ../en/ch11-template.xml:334 1.15206 msgid "" 1.15207 "<literal role=\"template-filter\">firstline</literal>: Any text. Yield the " 1.15208 "first line of text, without any trailing newlines." 1.15209 msgstr "" 1.15210 1.15211 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15212 -#: ../en/ch10-template.xml:338 1.15213 +#: ../en/ch11-template.xml:339 1.15214 msgid "" 1.15215 "<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role=" 1.15216 "\"template-keyword\">date</literal> keyword. Render the date as a pair of " 1.15217 @@ -13304,7 +14891,7 @@ 1.15218 msgstr "" 1.15219 1.15220 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15221 -#: ../en/ch10-template.xml:345 1.15222 +#: ../en/ch11-template.xml:346 1.15223 msgid "" 1.15224 "<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role=" 1.15225 "\"template-keyword\">date</literal> keyword. Render the date as a text " 1.15226 @@ -13313,7 +14900,7 @@ 1.15227 msgstr "" 1.15228 1.15229 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15230 -#: ../en/ch10-template.xml:352 1.15231 +#: ../en/ch11-template.xml:353 1.15232 msgid "" 1.15233 "<literal role=\"template-filter\">obfuscate</literal>: Any text, but most " 1.15234 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 1.15235 @@ -13322,7 +14909,7 @@ 1.15236 msgstr "" 1.15237 1.15238 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15239 -#: ../en/ch10-template.xml:360 1.15240 +#: ../en/ch11-template.xml:361 1.15241 msgid "" 1.15242 "<literal role=\"template-kw-filt-author\">person</literal>: Any text, but " 1.15243 "most useful for the <literal role=\"template-keyword\">author</literal> " 1.15244 @@ -13332,7 +14919,7 @@ 1.15245 msgstr "" 1.15246 1.15247 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15248 -#: ../en/ch10-template.xml:369 1.15249 +#: ../en/ch11-template.xml:370 1.15250 msgid "" 1.15251 "<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role=" 1.15252 "\"template-keyword\">date</literal> keyword. Render a date using the same " 1.15253 @@ -13341,7 +14928,7 @@ 1.15254 msgstr "" 1.15255 1.15256 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15257 -#: ../en/ch10-template.xml:376 1.15258 +#: ../en/ch11-template.xml:377 1.15259 msgid "" 1.15260 "<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash. " 1.15261 "Yield the short form of a changeset hash, i.e. a 12-character hexadecimal " 1.15262 @@ -13349,7 +14936,7 @@ 1.15263 msgstr "" 1.15264 1.15265 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15266 -#: ../en/ch10-template.xml:381 1.15267 +#: ../en/ch11-template.xml:382 1.15268 msgid "" 1.15269 "<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role=" 1.15270 "\"template-keyword\">date</literal> keyword. Render the year, month, and day " 1.15271 @@ -13358,21 +14945,21 @@ 1.15272 msgstr "" 1.15273 1.15274 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15275 -#: ../en/ch10-template.xml:387 1.15276 +#: ../en/ch11-template.xml:388 1.15277 msgid "" 1.15278 "<literal role=\"template-filter\">strip</literal>: Any text. Strip all " 1.15279 "leading and trailing whitespace from the string." 1.15280 msgstr "" 1.15281 1.15282 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15283 -#: ../en/ch10-template.xml:391 1.15284 +#: ../en/ch11-template.xml:392 1.15285 msgid "" 1.15286 "<literal role=\"template-filter\">tabindent</literal>: Any text. Yield the " 1.15287 "text, with every line except the first starting with a tab character." 1.15288 msgstr "" 1.15289 1.15290 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15291 -#: ../en/ch10-template.xml:396 1.15292 +#: ../en/ch11-template.xml:397 1.15293 msgid "" 1.15294 "<literal role=\"template-filter\">urlescape</literal>: Any text. Escape all " 1.15295 "characters that are considered <quote>special</quote> by URL parsers. For " 1.15296 @@ -13380,7 +14967,7 @@ 1.15297 msgstr "" 1.15298 1.15299 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.15300 -#: ../en/ch10-template.xml:403 1.15301 +#: ../en/ch11-template.xml:404 1.15302 msgid "" 1.15303 "<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most " 1.15304 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 1.15305 @@ -13390,7 +14977,7 @@ 1.15306 msgstr "" 1.15307 1.15308 #. type: Content of: <book><chapter><sect1><note><para> 1.15309 -#: ../en/ch10-template.xml:416 1.15310 +#: ../en/ch11-template.xml:418 1.15311 msgid "" 1.15312 "If you try to apply a filter to a piece of data that it cannot process, " 1.15313 "Mercurial will fail and print a Python exception. For example, trying to run " 1.15314 @@ -13400,12 +14987,12 @@ 1.15315 msgstr "" 1.15316 1.15317 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15318 -#: ../en/ch10-template.xml:425 1.15319 +#: ../en/ch11-template.xml:427 1.15320 msgid "Combining filters" 1.15321 msgstr "组合过滤器" 1.15322 1.15323 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15324 -#: ../en/ch10-template.xml:427 1.15325 +#: ../en/ch11-template.xml:429 1.15326 msgid "" 1.15327 "It is easy to combine filters to yield output in the form you would like. " 1.15328 "The following chain of filters tidies up a description, then makes sure that " 1.15329 @@ -13415,7 +15002,7 @@ 1.15330 msgstr "" 1.15331 1.15332 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15333 -#: ../en/ch10-template.xml:436 1.15334 +#: ../en/ch11-template.xml:438 1.15335 msgid "" 1.15336 "Note the use of <quote><literal>\\t</literal></quote> (a tab character) in " 1.15337 "the template to force the first line to be indented; this is necessary since " 1.15338 @@ -13424,7 +15011,7 @@ 1.15339 msgstr "" 1.15340 1.15341 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15342 -#: ../en/ch10-template.xml:442 1.15343 +#: ../en/ch11-template.xml:444 1.15344 msgid "" 1.15345 "Keep in mind that the order of filters in a chain is significant. The first " 1.15346 "filter is applied to the result of the keyword; the second to the result of " 1.15347 @@ -13434,12 +15021,12 @@ 1.15348 msgstr "" 1.15349 1.15350 #. type: Content of: <book><chapter><sect1><title> 1.15351 -#: ../en/ch10-template.xml:453 1.15352 +#: ../en/ch11-template.xml:454 1.15353 msgid "From templates to styles" 1.15354 msgstr "从模版到样式" 1.15355 1.15356 #. type: Content of: <book><chapter><sect1><para> 1.15357 -#: ../en/ch10-template.xml:455 1.15358 +#: ../en/ch11-template.xml:456 1.15359 msgid "" 1.15360 "A command line template provides a quick and simple way to format some " 1.15361 "output. Templates can become verbose, though, and it's useful to be able to " 1.15362 @@ -13448,7 +15035,7 @@ 1.15363 msgstr "" 1.15364 1.15365 #. type: Content of: <book><chapter><sect1><para> 1.15366 -#: ../en/ch10-template.xml:460 1.15367 +#: ../en/ch11-template.xml:461 1.15368 msgid "" 1.15369 "More than that, using a style file unlocks the power of Mercurial's " 1.15370 "templating engine in ways that are not possible using the command line " 1.15371 @@ -13456,49 +15043,49 @@ 1.15372 msgstr "" 1.15373 1.15374 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15375 -#: ../en/ch10-template.xml:466 1.15376 +#: ../en/ch11-template.xml:467 1.15377 msgid "The simplest of style files" 1.15378 msgstr "最简单的样式文件" 1.15379 1.15380 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15381 -#: ../en/ch10-template.xml:468 1.15382 +#: ../en/ch11-template.xml:469 1.15383 msgid "Our simple style file contains just one line:" 1.15384 msgstr "" 1.15385 1.15386 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15387 -#: ../en/ch10-template.xml:472 1.15388 +#: ../en/ch11-template.xml:473 1.15389 msgid "" 1.15390 "This tells Mercurial, <quote>if you're printing a changeset, use the text on " 1.15391 "the right as the template</quote>." 1.15392 msgstr "" 1.15393 1.15394 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15395 -#: ../en/ch10-template.xml:478 1.15396 +#: ../en/ch11-template.xml:479 1.15397 msgid "Style file syntax" 1.15398 msgstr "样式文件语法" 1.15399 1.15400 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15401 -#: ../en/ch10-template.xml:480 1.15402 +#: ../en/ch11-template.xml:481 1.15403 msgid "The syntax rules for a style file are simple." 1.15404 msgstr "" 1.15405 1.15406 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15407 -#: ../en/ch10-template.xml:483 1.15408 +#: ../en/ch11-template.xml:484 1.15409 msgid "The file is processed one line at a time." 1.15410 msgstr "" 1.15411 1.15412 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15413 -#: ../en/ch10-template.xml:486 1.15414 +#: ../en/ch11-template.xml:487 1.15415 msgid "Leading and trailing white space are ignored." 1.15416 msgstr "" 1.15417 1.15418 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15419 -#: ../en/ch10-template.xml:489 1.15420 +#: ../en/ch11-template.xml:490 1.15421 msgid "Empty lines are skipped." 1.15422 msgstr "" 1.15423 1.15424 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15425 -#: ../en/ch10-template.xml:491 1.15426 +#: ../en/ch11-template.xml:492 1.15427 msgid "" 1.15428 "If a line starts with either of the characters <quote><literal>#</literal></" 1.15429 "quote> or <quote><literal>;</literal></quote>, the entire line is treated as " 1.15430 @@ -13506,7 +15093,7 @@ 1.15431 msgstr "" 1.15432 1.15433 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15434 -#: ../en/ch10-template.xml:496 1.15435 +#: ../en/ch11-template.xml:497 1.15436 msgid "" 1.15437 "A line starts with a keyword. This must start with an alphabetic character " 1.15438 "or underscore, and can subsequently contain any alphanumeric character or " 1.15439 @@ -13515,21 +15102,21 @@ 1.15440 msgstr "" 1.15441 1.15442 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15443 -#: ../en/ch10-template.xml:502 1.15444 +#: ../en/ch11-template.xml:503 1.15445 msgid "" 1.15446 "The next element must be an <quote><literal>=</literal></quote> character, " 1.15447 "which can be preceded or followed by an arbitrary amount of white space." 1.15448 msgstr "" 1.15449 1.15450 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15451 -#: ../en/ch10-template.xml:507 1.15452 +#: ../en/ch11-template.xml:508 1.15453 msgid "" 1.15454 "If the rest of the line starts and ends with matching quote characters " 1.15455 "(either single or double quote), it is treated as a template body." 1.15456 msgstr "" 1.15457 1.15458 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15459 -#: ../en/ch10-template.xml:511 1.15460 +#: ../en/ch11-template.xml:512 1.15461 msgid "" 1.15462 "If the rest of the line <emphasis>does not</emphasis> start with a quote " 1.15463 "character, it is treated as the name of a file; the contents of this file " 1.15464 @@ -13537,12 +15124,12 @@ 1.15465 msgstr "" 1.15466 1.15467 #. type: Content of: <book><chapter><sect1><title> 1.15468 -#: ../en/ch10-template.xml:520 1.15469 +#: ../en/ch11-template.xml:521 1.15470 msgid "Style files by example" 1.15471 msgstr "样式文件例子" 1.15472 1.15473 #. type: Content of: <book><chapter><sect1><para> 1.15474 -#: ../en/ch10-template.xml:522 1.15475 +#: ../en/ch11-template.xml:523 1.15476 msgid "" 1.15477 "To illustrate how to write a style file, we will construct a few by example. " 1.15478 "Rather than provide a complete style file and walk through it, we'll mirror " 1.15479 @@ -13551,12 +15138,12 @@ 1.15480 msgstr "" 1.15481 1.15482 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15483 -#: ../en/ch10-template.xml:529 1.15484 +#: ../en/ch11-template.xml:530 1.15485 msgid "Identifying mistakes in style files" 1.15486 msgstr "在样式文件中定位错误" 1.15487 1.15488 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15489 -#: ../en/ch10-template.xml:531 1.15490 +#: ../en/ch11-template.xml:532 1.15491 msgid "" 1.15492 "If Mercurial encounters a problem in a style file you are working on, it " 1.15493 "prints a terse error message that, once you figure out what it means, is " 1.15494 @@ -13564,7 +15151,7 @@ 1.15495 msgstr "" 1.15496 1.15497 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15498 -#: ../en/ch10-template.xml:537 1.15499 +#: ../en/ch11-template.xml:538 1.15500 msgid "" 1.15501 "Notice that <filename>broken.style</filename> attempts to define a " 1.15502 "<literal>changeset</literal> keyword, but forgets to give any content for it. " 1.15503 @@ -13572,35 +15159,35 @@ 1.15504 msgstr "" 1.15505 1.15506 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15507 -#: ../en/ch10-template.xml:544 1.15508 +#: ../en/ch11-template.xml:545 1.15509 msgid "This error message looks intimidating, but it is not too hard to follow." 1.15510 msgstr "" 1.15511 1.15512 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15513 -#: ../en/ch10-template.xml:548 1.15514 +#: ../en/ch11-template.xml:549 1.15515 msgid "" 1.15516 "The first component is simply Mercurial's way of saying <quote>I am giving " 1.15517 "up</quote>." 1.15518 msgstr "" 1.15519 1.15520 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15521 -#: ../en/ch10-template.xml:552 1.15522 +#: ../en/ch11-template.xml:553 1.15523 msgid "Next comes the name of the style file that contains the error." 1.15524 msgstr "" 1.15525 1.15526 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15527 -#: ../en/ch10-template.xml:556 1.15528 +#: ../en/ch11-template.xml:557 1.15529 msgid "" 1.15530 "Following the file name is the line number where the error was encountered." 1.15531 msgstr "" 1.15532 1.15533 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15534 -#: ../en/ch10-template.xml:560 1.15535 +#: ../en/ch11-template.xml:561 1.15536 msgid "Finally, a description of what went wrong." 1.15537 msgstr "" 1.15538 1.15539 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15540 -#: ../en/ch10-template.xml:564 1.15541 +#: ../en/ch11-template.xml:565 1.15542 msgid "" 1.15543 "The description of the problem is not always clear (as in this case), but " 1.15544 "even when it is cryptic, it is almost always trivial to visually inspect the " 1.15545 @@ -13608,12 +15195,12 @@ 1.15546 msgstr "" 1.15547 1.15548 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15549 -#: ../en/ch10-template.xml:572 1.15550 +#: ../en/ch11-template.xml:574 1.15551 msgid "Uniquely identifying a repository" 1.15552 msgstr "版本库的唯一标识" 1.15553 1.15554 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15555 -#: ../en/ch10-template.xml:574 1.15556 +#: ../en/ch11-template.xml:576 1.15557 msgid "" 1.15558 "If you would like to be able to identify a Mercurial repository <quote>fairly " 1.15559 "uniquely</quote> using a short string as an identifier, you can use the first " 1.15560 @@ -13621,21 +15208,21 @@ 1.15561 msgstr "" 1.15562 1.15563 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15564 -#: ../en/ch10-template.xml:581 1.15565 -msgid "" 1.15566 -"This is not guaranteed to be unique, but it is nevertheless useful in many " 1.15567 -"cases." 1.15568 +#: ../en/ch11-template.xml:583 1.15569 +msgid "" 1.15570 +"This is likely to be unique, and so it is useful in many cases. There are a " 1.15571 +"few caveats." 1.15572 msgstr "" 1.15573 1.15574 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15575 -#: ../en/ch10-template.xml:584 1.15576 +#: ../en/ch11-template.xml:586 1.15577 msgid "" 1.15578 "It will not work in a completely empty repository, because such a repository " 1.15579 "does not have a revision zero." 1.15580 msgstr "" 1.15581 1.15582 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15583 -#: ../en/ch10-template.xml:588 1.15584 +#: ../en/ch11-template.xml:590 1.15585 msgid "" 1.15586 "Neither will it work in the (extremely rare) case where a repository is a " 1.15587 "merge of two or more formerly independent repositories, and you still have " 1.15588 @@ -13643,18 +15230,18 @@ 1.15589 msgstr "" 1.15590 1.15591 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15592 -#: ../en/ch10-template.xml:593 1.15593 +#: ../en/ch11-template.xml:595 1.15594 msgid "Here are some uses to which you could put this identifier:" 1.15595 msgstr "" 1.15596 1.15597 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15598 -#: ../en/ch10-template.xml:596 1.15599 +#: ../en/ch11-template.xml:598 1.15600 msgid "" 1.15601 "As a key into a table for a database that manages repositories on a server." 1.15602 msgstr "" 1.15603 1.15604 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15605 -#: ../en/ch10-template.xml:599 1.15606 +#: ../en/ch11-template.xml:601 1.15607 msgid "" 1.15608 "As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</" 1.15609 "emphasis>} tuple. Save this information away when you run an automated build " 1.15610 @@ -13663,13 +15250,25 @@ 1.15611 msgstr "" 1.15612 1.15613 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15614 -#: ../en/ch10-template.xml:608 1.15615 +#: ../en/ch11-template.xml:611 1.15616 +msgid "Listing files on multiple lines" 1.15617 +msgstr "" 1.15618 + 1.15619 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.15620 +#: ../en/ch11-template.xml:613 1.15621 +msgid "" 1.15622 +"Suppose we want to list the files changed by a changeset, one per line, with " 1.15623 +"a little indentation before each file name." 1.15624 +msgstr "" 1.15625 + 1.15626 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.15627 +#: ../en/ch11-template.xml:621 1.15628 msgid "Mimicking Subversion's output" 1.15629 msgstr "模仿 Subversion 的输出" 1.15630 1.15631 # 1.15632 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15633 -#: ../en/ch10-template.xml:610 1.15634 +#: ../en/ch11-template.xml:623 1.15635 msgid "" 1.15636 "Let's try to emulate the default output format used by another revision " 1.15637 "control tool, Subversion." 1.15638 @@ -13677,7 +15276,7 @@ 1.15639 1.15640 # 1.15641 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15642 -#: ../en/ch10-template.xml:615 1.15643 +#: ../en/ch11-template.xml:628 1.15644 msgid "" 1.15645 "Since Subversion's output style is fairly simple, it is easy to copy-and-" 1.15646 "paste a hunk of its output into a file, and replace the text produced above " 1.15647 @@ -13685,14 +15284,14 @@ 1.15648 msgstr "" 1.15649 1.15650 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15651 -#: ../en/ch10-template.xml:622 1.15652 +#: ../en/ch11-template.xml:635 1.15653 msgid "" 1.15654 "There are a few small ways in which this template deviates from the output " 1.15655 "produced by Subversion." 1.15656 msgstr "" 1.15657 1.15658 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15659 -#: ../en/ch10-template.xml:625 1.15660 +#: ../en/ch11-template.xml:638 1.15661 msgid "" 1.15662 "Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 " 1.15663 "Sep 2006</literal></quote> in the example output above) in parentheses. " 1.15664 @@ -13701,7 +15300,7 @@ 1.15665 msgstr "" 1.15666 1.15667 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15668 -#: ../en/ch10-template.xml:632 1.15669 +#: ../en/ch11-template.xml:645 1.15670 msgid "" 1.15671 "We emulate Subversion's printing of <quote>separator</quote> lines full of " 1.15672 "<quote><literal>-</literal></quote> characters by ending the template with " 1.15673 @@ -13711,7 +15310,7 @@ 1.15674 msgstr "" 1.15675 1.15676 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.15677 -#: ../en/ch10-template.xml:641 1.15678 +#: ../en/ch11-template.xml:654 1.15679 msgid "" 1.15680 "Subversion's output includes a count in the header of the number of lines in " 1.15681 "the commit message. We cannot replicate this in Mercurial; the templating " 1.15682 @@ -13721,7 +15320,7 @@ 1.15683 1.15684 # 1.15685 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15686 -#: ../en/ch10-template.xml:647 1.15687 +#: ../en/ch11-template.xml:660 1.15688 msgid "" 1.15689 "It took me no more than a minute or two of work to replace literal text from " 1.15690 "an example of Subversion's output with some keywords and filters to give the " 1.15691 @@ -13729,7 +15328,7 @@ 1.15692 msgstr "" 1.15693 1.15694 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15695 -#: ../en/ch10-template.xml:654 1.15696 +#: ../en/ch11-template.xml:667 1.15697 msgid "" 1.15698 "We could have included the text of the template file directly in the style " 1.15699 "file by enclosing it in quotes and replacing the newlines with " 1.15700 @@ -13742,17 +15341,17 @@ 1.15701 msgstr "" 1.15702 1.15703 #. type: Content of: <book><chapter><title> 1.15704 -#: ../en/ch11-mq.xml:5 1.15705 +#: ../en/ch12-mq.xml:5 1.15706 msgid "Managing change with Mercurial Queues" 1.15707 msgstr "使用 MQ 管理修改" 1.15708 1.15709 #. type: Content of: <book><chapter><sect1><title> 1.15710 -#: ../en/ch11-mq.xml:8 1.15711 +#: ../en/ch12-mq.xml:8 1.15712 msgid "The patch management problem" 1.15713 msgstr "补丁的管理问题" 1.15714 1.15715 #. type: Content of: <book><chapter><sect1><para> 1.15716 -#: ../en/ch11-mq.xml:10 1.15717 +#: ../en/ch12-mq.xml:10 1.15718 msgid "" 1.15719 "Here is a common scenario: you need to install a software package from " 1.15720 "source, but you find a bug that you must fix in the source before you can " 1.15721 @@ -13764,7 +15363,7 @@ 1.15722 msgstr "" 1.15723 1.15724 #. type: Content of: <book><chapter><sect1><para> 1.15725 -#: ../en/ch11-mq.xml:20 1.15726 +#: ../en/ch12-mq.xml:20 1.15727 msgid "" 1.15728 "This is a simple case of the <quote>patch management</quote> problem. You " 1.15729 "have an <quote>upstream</quote> source tree that you can't change; you need " 1.15730 @@ -13774,7 +15373,7 @@ 1.15731 msgstr "" 1.15732 1.15733 #. type: Content of: <book><chapter><sect1><para> 1.15734 -#: ../en/ch11-mq.xml:27 1.15735 +#: ../en/ch12-mq.xml:27 1.15736 msgid "" 1.15737 "The patch management problem arises in many situations. Probably the most " 1.15738 "visible is that a user of an open source software project will contribute a " 1.15739 @@ -13782,7 +15381,7 @@ 1.15740 msgstr "" 1.15741 1.15742 #. type: Content of: <book><chapter><sect1><para> 1.15743 -#: ../en/ch11-mq.xml:32 1.15744 +#: ../en/ch12-mq.xml:32 1.15745 msgid "" 1.15746 "Distributors of operating systems that include open source software often " 1.15747 "need to make changes to the packages they distribute so that they will build " 1.15748 @@ -13790,7 +15389,7 @@ 1.15749 msgstr "" 1.15750 1.15751 #. type: Content of: <book><chapter><sect1><para> 1.15752 -#: ../en/ch11-mq.xml:37 1.15753 +#: ../en/ch12-mq.xml:37 1.15754 msgid "" 1.15755 "When you have few changes to maintain, it is easy to manage a single patch " 1.15756 "using the standard <command>diff</command> and <command>patch</command> " 1.15757 @@ -13807,7 +15406,7 @@ 1.15758 msgstr "" 1.15759 1.15760 #. type: Content of: <book><chapter><sect1><para> 1.15761 -#: ../en/ch11-mq.xml:52 1.15762 +#: ../en/ch12-mq.xml:52 1.15763 msgid "" 1.15764 "Maintaining a single patch against an upstream tree is a little tedious and " 1.15765 "error-prone, but not difficult. However, the complexity of the problem grows " 1.15766 @@ -13817,7 +15416,7 @@ 1.15767 msgstr "" 1.15768 1.15769 #. type: Content of: <book><chapter><sect1><para> 1.15770 -#: ../en/ch11-mq.xml:59 1.15771 +#: ../en/ch12-mq.xml:59 1.15772 msgid "" 1.15773 "Fortunately, Mercurial includes a powerful extension, Mercurial Queues (or " 1.15774 "simply <quote>MQ</quote>), that massively simplifies the patch management " 1.15775 @@ -13825,12 +15424,12 @@ 1.15776 msgstr "" 1.15777 1.15778 #. type: Content of: <book><chapter><sect1><title> 1.15779 -#: ../en/ch11-mq.xml:65 1.15780 +#: ../en/ch12-mq.xml:65 1.15781 msgid "The prehistory of Mercurial Queues" 1.15782 msgstr "MQ 的历史" 1.15783 1.15784 #. type: Content of: <book><chapter><sect1><para> 1.15785 -#: ../en/ch11-mq.xml:67 1.15786 +#: ../en/ch12-mq.xml:67 1.15787 msgid "" 1.15788 "During the late 1990s, several Linux kernel developers started to maintain " 1.15789 "<quote>patch series</quote> that modified the behavior of the Linux kernel. " 1.15790 @@ -13839,7 +15438,7 @@ 1.15791 msgstr "" 1.15792 1.15793 #. type: Content of: <book><chapter><sect1><para> 1.15794 -#: ../en/ch11-mq.xml:73 1.15795 +#: ../en/ch12-mq.xml:73 1.15796 msgid "" 1.15797 "The sizes of these patch series grew rapidly. In 2002, Andrew Morton " 1.15798 "published some shell scripts he had been using to automate the task of " 1.15799 @@ -13848,12 +15447,12 @@ 1.15800 msgstr "" 1.15801 1.15802 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15803 -#: ../en/ch11-mq.xml:80 1.15804 +#: ../en/ch12-mq.xml:80 1.15805 msgid "A patchwork quilt" 1.15806 msgstr "" 1.15807 1.15808 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15809 -#: ../en/ch11-mq.xml:82 1.15810 +#: ../en/ch12-mq.xml:82 1.15811 msgid "" 1.15812 "In early 2003, Andreas Gruenbacher and Martin Quinson borrowed the approach " 1.15813 "of Andrew's scripts and published a tool called <quote>patchwork quilt</" 1.15814 @@ -13864,7 +15463,7 @@ 1.15815 msgstr "" 1.15816 1.15817 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15818 -#: ../en/ch11-mq.xml:91 1.15819 +#: ../en/ch12-mq.xml:91 1.15820 msgid "" 1.15821 "Quilt manages a <emphasis>stack of patches</emphasis> on top of a directory " 1.15822 "tree. To begin, you tell quilt to manage a directory tree, and tell it which " 1.15823 @@ -13874,7 +15473,7 @@ 1.15824 msgstr "" 1.15825 1.15826 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15827 -#: ../en/ch11-mq.xml:99 1.15828 +#: ../en/ch12-mq.xml:99 1.15829 msgid "" 1.15830 "The refresh step causes quilt to scan the directory tree; it updates the " 1.15831 "patch with all of the changes you have made. You can create another patch on " 1.15832 @@ -13884,7 +15483,7 @@ 1.15833 msgstr "" 1.15834 1.15835 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15836 -#: ../en/ch11-mq.xml:106 1.15837 +#: ../en/ch12-mq.xml:106 1.15838 msgid "" 1.15839 "You can <emphasis>change</emphasis> which patches are applied to the tree. " 1.15840 "If you <quote>pop</quote> a patch, the changes made by that patch will vanish " 1.15841 @@ -13898,26 +15497,26 @@ 1.15842 msgstr "" 1.15843 1.15844 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15845 -#: ../en/ch11-mq.xml:118 1.15846 +#: ../en/ch12-mq.xml:118 1.15847 msgid "" 1.15848 "Quilt knows nothing about revision control tools, so it works equally well on " 1.15849 "top of an unpacked tarball or a Subversion working copy." 1.15850 msgstr "" 1.15851 1.15852 #. type: Content of: <book><chapter><sect1><sect2><title> 1.15853 -#: ../en/ch11-mq.xml:124 1.15854 +#: ../en/ch12-mq.xml:124 1.15855 msgid "From patchwork quilt to Mercurial Queues" 1.15856 msgstr "从 patchwork quilt 到 MQ" 1.15857 1.15858 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15859 -#: ../en/ch11-mq.xml:126 1.15860 +#: ../en/ch12-mq.xml:126 1.15861 msgid "" 1.15862 "In mid-2005, Chris Mason took the features of quilt and wrote an extension " 1.15863 "that he called Mercurial Queues, which added quilt-like behavior to Mercurial." 1.15864 msgstr "" 1.15865 1.15866 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15867 -#: ../en/ch11-mq.xml:130 1.15868 +#: ../en/ch12-mq.xml:130 1.15869 msgid "" 1.15870 "The key difference between quilt and MQ is that quilt knows nothing about " 1.15871 "revision control systems, while MQ is <emphasis>integrated</emphasis> into " 1.15872 @@ -13926,7 +15525,7 @@ 1.15873 msgstr "" 1.15874 1.15875 #. type: Content of: <book><chapter><sect1><sect2><para> 1.15876 -#: ../en/ch11-mq.xml:136 1.15877 +#: ../en/ch12-mq.xml:136 1.15878 msgid "" 1.15879 "Because quilt does not care about revision control tools, it is still a " 1.15880 "tremendously useful piece of software to know about for situations where you " 1.15881 @@ -13934,19 +15533,19 @@ 1.15882 msgstr "" 1.15883 1.15884 #. type: Content of: <book><chapter><sect1><title> 1.15885 -#: ../en/ch11-mq.xml:144 1.15886 +#: ../en/ch12-mq.xml:144 1.15887 msgid "The huge advantage of MQ" 1.15888 msgstr "MQ 的巨大优势" 1.15889 1.15890 #. type: Content of: <book><chapter><sect1><para> 1.15891 -#: ../en/ch11-mq.xml:146 1.15892 +#: ../en/ch12-mq.xml:146 1.15893 msgid "" 1.15894 "I cannot overstate the value that MQ offers through the unification of " 1.15895 "patches and revision control." 1.15896 msgstr "" 1.15897 1.15898 #. type: Content of: <book><chapter><sect1><para> 1.15899 -#: ../en/ch11-mq.xml:149 1.15900 +#: ../en/ch12-mq.xml:149 1.15901 msgid "" 1.15902 "A major reason that patches have persisted in the free software and open " 1.15903 "source world&emdash;in spite of the availability of increasingly capable " 1.15904 @@ -13955,7 +15554,7 @@ 1.15905 msgstr "" 1.15906 1.15907 #. type: Content of: <book><chapter><sect1><para> 1.15908 -#: ../en/ch11-mq.xml:155 1.15909 +#: ../en/ch12-mq.xml:155 1.15910 msgid "" 1.15911 "Traditional revision control tools make a permanent, irreversible record of " 1.15912 "everything that you do. While this has great value, it's also somewhat " 1.15913 @@ -13966,7 +15565,7 @@ 1.15914 msgstr "" 1.15915 1.15916 #. type: Content of: <book><chapter><sect1><para> 1.15917 -#: ../en/ch11-mq.xml:163 1.15918 +#: ../en/ch12-mq.xml:163 1.15919 msgid "" 1.15920 "By contrast, MQ's marriage of distributed revision control with patches makes " 1.15921 "it much easier to isolate your work. Your patches live on top of normal " 1.15922 @@ -13977,7 +15576,7 @@ 1.15923 msgstr "" 1.15924 1.15925 #. type: Content of: <book><chapter><sect1><para> 1.15926 -#: ../en/ch11-mq.xml:171 1.15927 +#: ../en/ch12-mq.xml:171 1.15928 msgid "" 1.15929 "As an example, the integration of patches with revision control makes " 1.15930 "understanding patches and debugging their effects&emdash;and their interplay " 1.15931 @@ -13992,14 +15591,14 @@ 1.15932 msgstr "" 1.15933 1.15934 #. type: Content of: <book><chapter><sect1><para> 1.15935 -#: ../en/ch11-mq.xml:189 1.15936 +#: ../en/ch12-mq.xml:189 1.15937 msgid "" 1.15938 "Because MQ doesn't hide its patch-oriented nature, it is helpful to " 1.15939 "understand what patches are, and a little about the tools that work with them." 1.15940 msgstr "" 1.15941 1.15942 #. type: Content of: <book><chapter><sect1><para> 1.15943 -#: ../en/ch11-mq.xml:193 1.15944 +#: ../en/ch12-mq.xml:193 1.15945 msgid "" 1.15946 "The traditional Unix <command>diff</command> command compares two files, and " 1.15947 "prints a list of differences between them. The <command>patch</command> " 1.15948 @@ -14009,7 +15608,7 @@ 1.15949 msgstr "" 1.15950 1.15951 #. type: Content of: <book><chapter><sect1><para> 1.15952 -#: ../en/ch11-mq.xml:202 1.15953 +#: ../en/ch12-mq.xml:202 1.15954 msgid "" 1.15955 "The type of file that <command>diff</command> generates (and <command>patch</" 1.15956 "command> takes as input) is called a <quote>patch</quote> or a <quote>diff</" 1.15957 @@ -14018,7 +15617,7 @@ 1.15958 msgstr "" 1.15959 1.15960 #. type: Content of: <book><chapter><sect1><para> 1.15961 -#: ../en/ch11-mq.xml:208 1.15962 +#: ../en/ch12-mq.xml:208 1.15963 msgid "" 1.15964 "A patch file can start with arbitrary text; the <command>patch</command> " 1.15965 "command ignores this text, but MQ uses it as the commit message when creating " 1.15966 @@ -14028,7 +15627,7 @@ 1.15967 msgstr "" 1.15968 1.15969 #. type: Content of: <book><chapter><sect1><para> 1.15970 -#: ../en/ch11-mq.xml:215 1.15971 +#: ../en/ch12-mq.xml:215 1.15972 msgid "" 1.15973 "MQ works with <emphasis>unified</emphasis> diffs (<command>patch</command> " 1.15974 "can accept several other diff formats, but MQ doesn't). A unified diff " 1.15975 @@ -14039,7 +15638,7 @@ 1.15976 msgstr "" 1.15977 1.15978 #. type: Content of: <book><chapter><sect1><para> 1.15979 -#: ../en/ch11-mq.xml:223 1.15980 +#: ../en/ch12-mq.xml:223 1.15981 msgid "" 1.15982 "After the file header comes a series of <emphasis>hunks</emphasis>. Each " 1.15983 "hunk starts with a header; this identifies the range of line numbers within " 1.15984 @@ -14052,7 +15651,7 @@ 1.15985 msgstr "" 1.15986 1.15987 #. type: Content of: <book><chapter><sect1><para> 1.15988 -#: ../en/ch11-mq.xml:235 1.15989 +#: ../en/ch12-mq.xml:235 1.15990 msgid "" 1.15991 "Each line of context begins with a space character. Within the hunk, a line " 1.15992 "that begins with <quote><literal>-</literal></quote> means <quote>remove this " 1.15993 @@ -14062,7 +15661,7 @@ 1.15994 msgstr "" 1.15995 1.15996 #. type: Content of: <book><chapter><sect1><para> 1.15997 -#: ../en/ch11-mq.xml:243 1.15998 +#: ../en/ch12-mq.xml:243 1.15999 msgid "" 1.16000 "We will return to some of the more subtle aspects of patches later (in <xref " 1.16001 "linkend=\"sec:mq:adv-patch\"/>), but you should have enough information now " 1.16002 @@ -14070,12 +15669,12 @@ 1.16003 msgstr "" 1.16004 1.16005 #. type: Content of: <book><chapter><sect1><title> 1.16006 -#: ../en/ch11-mq.xml:250 1.16007 +#: ../en/ch12-mq.xml:250 1.16008 msgid "Getting started with Mercurial Queues" 1.16009 msgstr "开始使用 MQ" 1.16010 1.16011 #. type: Content of: <book><chapter><sect1><para> 1.16012 -#: ../en/ch11-mq.xml:252 1.16013 +#: ../en/ch12-mq.xml:252 1.16014 msgid "" 1.16015 "Because MQ is implemented as an extension, you must explicitly enable before " 1.16016 "you can use it. (You don't need to download anything; MQ ships with the " 1.16017 @@ -14084,7 +15683,7 @@ 1.16018 msgstr "" 1.16019 1.16020 #. type: Content of: <book><chapter><sect1><para> 1.16021 -#: ../en/ch11-mq.xml:262 1.16022 +#: ../en/ch12-mq.xml:262 1.16023 msgid "" 1.16024 "Once the extension is enabled, it will make a number of new commands " 1.16025 "available. To verify that the extension is working, you can use <command " 1.16026 @@ -14093,7 +15692,7 @@ 1.16027 msgstr "" 1.16028 1.16029 #. type: Content of: <book><chapter><sect1><para> 1.16030 -#: ../en/ch11-mq.xml:270 1.16031 +#: ../en/ch12-mq.xml:270 1.16032 msgid "" 1.16033 "You can use MQ with <emphasis>any</emphasis> Mercurial repository, and its " 1.16034 "commands only operate within that repository. To get started, simply prepare " 1.16035 @@ -14101,7 +15700,7 @@ 1.16036 msgstr "" 1.16037 1.16038 #. type: Content of: <book><chapter><sect1><para> 1.16039 -#: ../en/ch11-mq.xml:277 1.16040 +#: ../en/ch12-mq.xml:277 1.16041 msgid "" 1.16042 "This command creates an empty directory called <filename role=\"special\" " 1.16043 "class=\"directory\">.hg/patches</filename>, where MQ will keep its metadata. " 1.16044 @@ -14110,12 +15709,12 @@ 1.16045 msgstr "" 1.16046 1.16047 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16048 -#: ../en/ch11-mq.xml:284 1.16049 +#: ../en/ch12-mq.xml:284 1.16050 msgid "Creating a new patch" 1.16051 msgstr "创建新补丁" 1.16052 1.16053 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16054 -#: ../en/ch11-mq.xml:286 1.16055 +#: ../en/ch12-mq.xml:286 1.16056 msgid "" 1.16057 "To begin work on a new patch, use the <command role=\"hg-ext-mq\">qnew</" 1.16058 "command> command. This command takes one argument, the name of the patch to " 1.16059 @@ -14123,14 +15722,14 @@ 1.16060 msgstr "" 1.16061 1.16062 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16063 -#: ../en/ch11-mq.xml:290 1.16064 +#: ../en/ch12-mq.xml:290 1.16065 msgid "" 1.16066 "MQ will use this as the name of an actual file in the <filename role=\"special" 1.16067 "\" class=\"directory\">.hg/patches</filename> directory, as you can see below." 1.16068 msgstr "" 1.16069 1.16070 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16071 -#: ../en/ch11-mq.xml:297 1.16072 +#: ../en/ch12-mq.xml:297 1.16073 msgid "" 1.16074 "Also newly present in the <filename role=\"special\" class=\"directory\">.hg/" 1.16075 "patches</filename> directory are two other files, <filename role=\"special" 1.16076 @@ -14143,7 +15742,7 @@ 1.16077 msgstr "" 1.16078 1.16079 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.16080 -#: ../en/ch11-mq.xml:309 1.16081 +#: ../en/ch12-mq.xml:309 1.16082 msgid "" 1.16083 "You may sometimes want to edit the <filename role=\"special\">series</" 1.16084 "filename> file by hand; for example, to change the sequence in which some " 1.16085 @@ -14153,7 +15752,7 @@ 1.16086 msgstr "" 1.16087 1.16088 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16089 -#: ../en/ch11-mq.xml:318 1.16090 +#: ../en/ch12-mq.xml:318 1.16091 msgid "" 1.16092 "Once you have created your new patch, you can edit files in the working " 1.16093 "directory as you usually would. All of the normal Mercurial commands, such " 1.16094 @@ -14162,12 +15761,12 @@ 1.16095 msgstr "" 1.16096 1.16097 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16098 -#: ../en/ch11-mq.xml:326 1.16099 +#: ../en/ch12-mq.xml:326 1.16100 msgid "Refreshing a patch" 1.16101 msgstr "刷新补丁" 1.16102 1.16103 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16104 -#: ../en/ch11-mq.xml:328 1.16105 +#: ../en/ch12-mq.xml:328 1.16106 msgid "" 1.16107 "When you reach a point where you want to save your work, use the <command " 1.16108 "role=\"hg-ext-mq\">qrefresh</command> command to update the patch you are " 1.16109 @@ -14175,14 +15774,14 @@ 1.16110 msgstr "" 1.16111 1.16112 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16113 -#: ../en/ch11-mq.xml:334 1.16114 +#: ../en/ch12-mq.xml:334 1.16115 msgid "" 1.16116 "This command folds the changes you have made in the working directory into " 1.16117 "your patch, and updates its corresponding changeset to contain those changes." 1.16118 msgstr "" 1.16119 1.16120 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16121 -#: ../en/ch11-mq.xml:338 1.16122 +#: ../en/ch12-mq.xml:338 1.16123 msgid "" 1.16124 "You can run <command role=\"hg-ext-mq\">qrefresh</command> as often as you " 1.16125 "like, so it's a good way to <quote>checkpoint</quote> your work. Refresh " 1.16126 @@ -14192,12 +15791,12 @@ 1.16127 msgstr "" 1.16128 1.16129 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16130 -#: ../en/ch11-mq.xml:349 1.16131 +#: ../en/ch12-mq.xml:349 1.16132 msgid "Stacking and tracking patches" 1.16133 msgstr "堆叠和跟踪补丁" 1.16134 1.16135 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16136 -#: ../en/ch11-mq.xml:351 1.16137 +#: ../en/ch12-mq.xml:351 1.16138 msgid "" 1.16139 "Once you have finished working on a patch, or need to work on another, you " 1.16140 "can use the <command role=\"hg-ext-mq\">qnew</command> command again to " 1.16141 @@ -14206,7 +15805,7 @@ 1.16142 msgstr "" 1.16143 1.16144 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16145 -#: ../en/ch11-mq.xml:358 1.16146 +#: ../en/ch12-mq.xml:359 1.16147 msgid "" 1.16148 "Notice that the patch contains the changes in our prior patch as part of its " 1.16149 "context (you can see this more clearly in the output of <command role=\"hg-cmd" 1.16150 @@ -14214,7 +15813,7 @@ 1.16151 msgstr "" 1.16152 1.16153 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16154 -#: ../en/ch11-mq.xml:363 1.16155 +#: ../en/ch12-mq.xml:364 1.16156 msgid "" 1.16157 "So far, with the exception of <command role=\"hg-ext-mq\">qnew</command> and " 1.16158 "<command role=\"hg-ext-mq\">qrefresh</command>, we've been careful to only " 1.16159 @@ -14223,7 +15822,7 @@ 1.16160 msgstr "" 1.16161 1.16162 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16163 -#: ../en/ch11-mq.xml:373 1.16164 +#: ../en/ch12-mq.xml:374 1.16165 msgid "" 1.16166 "The <command role=\"hg-ext-mq\">qseries</command> command lists every patch " 1.16167 "that MQ knows about in this repository, from oldest to newest (most recently " 1.16168 @@ -14231,7 +15830,7 @@ 1.16169 msgstr "" 1.16170 1.16171 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16172 -#: ../en/ch11-mq.xml:379 1.16173 +#: ../en/ch12-mq.xml:380 1.16174 msgid "" 1.16175 "The <command role=\"hg-ext-mq\">qapplied</command> command lists every patch " 1.16176 "that MQ has <emphasis>applied</emphasis> in this repository, again from " 1.16177 @@ -14239,12 +15838,12 @@ 1.16178 msgstr "" 1.16179 1.16180 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16181 -#: ../en/ch11-mq.xml:388 1.16182 +#: ../en/ch12-mq.xml:389 1.16183 msgid "Manipulating the patch stack" 1.16184 msgstr "操作补丁堆栈" 1.16185 1.16186 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16187 -#: ../en/ch11-mq.xml:390 1.16188 +#: ../en/ch12-mq.xml:391 1.16189 msgid "" 1.16190 "The previous discussion implied that there must be a difference between " 1.16191 "<quote>known</quote> and <quote>applied</quote> patches, and there is. MQ " 1.16192 @@ -14252,7 +15851,7 @@ 1.16193 msgstr "" 1.16194 1.16195 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16196 -#: ../en/ch11-mq.xml:395 1.16197 +#: ../en/ch12-mq.xml:396 1.16198 msgid "" 1.16199 "An <emphasis>applied</emphasis> patch has a corresponding changeset in the " 1.16200 "repository, and the effects of the patch and changeset are visible in the " 1.16201 @@ -14265,17 +15864,17 @@ 1.16202 msgstr "" 1.16203 1.16204 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 1.16205 -#: ../en/ch11-mq.xml:408 1.16206 +#: ../en/ch12-mq.xml:409 1.16207 msgid "Applied and unapplied patches in the MQ patch stack" 1.16208 msgstr "在 MQ 补丁堆栈中应用和撤销补丁" 1.16209 1.16210 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 1.16211 -#: ../en/ch11-mq.xml:411 1.16212 +#: ../en/ch12-mq.xml:412 1.16213 msgid "<imageobject><imagedata fileref=\"figs/mq-stack.png\"/></imageobject>" 1.16214 msgstr "" 1.16215 1.16216 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16217 -#: ../en/ch11-mq.xml:416 1.16218 +#: ../en/ch12-mq.xml:417 1.16219 msgid "" 1.16220 "You can reapply an unapplied, or popped, patch using the <command role=\"hg-" 1.16221 "ext-mq\">qpush</command> command. This creates a new changeset to correspond " 1.16222 @@ -14285,7 +15884,7 @@ 1.16223 msgstr "" 1.16224 1.16225 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16226 -#: ../en/ch11-mq.xml:425 1.16227 +#: ../en/ch12-mq.xml:427 1.16228 msgid "" 1.16229 "Notice that once we have popped a patch or two patches, the output of " 1.16230 "<command role=\"hg-ext-mq\">qseries</command> remains the same, while that of " 1.16231 @@ -14293,12 +15892,12 @@ 1.16232 msgstr "" 1.16233 1.16234 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16235 -#: ../en/ch11-mq.xml:433 1.16236 +#: ../en/ch12-mq.xml:435 1.16237 msgid "Pushing and popping many patches" 1.16238 msgstr "压入或弹出多个补丁" 1.16239 1.16240 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16241 -#: ../en/ch11-mq.xml:435 1.16242 +#: ../en/ch12-mq.xml:437 1.16243 msgid "" 1.16244 "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-" 1.16245 "mq\">qpop</command> each operate on a single patch at a time by default, you " 1.16246 @@ -14311,12 +15910,12 @@ 1.16247 msgstr "" 1.16248 1.16249 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16250 -#: ../en/ch11-mq.xml:451 1.16251 +#: ../en/ch12-mq.xml:453 1.16252 msgid "Safety checks, and overriding them" 1.16253 msgstr "安全的检查,然后覆盖它们" 1.16254 1.16255 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16256 -#: ../en/ch11-mq.xml:453 1.16257 +#: ../en/ch12-mq.xml:455 1.16258 msgid "" 1.16259 "Several MQ commands check the working directory before they do anything, and " 1.16260 "fail if they find any modifications. They do this to ensure that you won't " 1.16261 @@ -14328,7 +15927,7 @@ 1.16262 msgstr "" 1.16263 1.16264 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16265 -#: ../en/ch11-mq.xml:465 1.16266 +#: ../en/ch12-mq.xml:467 1.16267 msgid "" 1.16268 "Commands that check the working directory all take an <quote>I know what I'm " 1.16269 "doing</quote> option, which is always named <option>-f</option>. The exact " 1.16270 @@ -14342,12 +15941,12 @@ 1.16271 msgstr "" 1.16272 1.16273 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16274 -#: ../en/ch11-mq.xml:480 1.16275 +#: ../en/ch12-mq.xml:482 1.16276 msgid "Working on several patches at once" 1.16277 msgstr "同时处理多个补丁" 1.16278 1.16279 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16280 -#: ../en/ch11-mq.xml:482 1.16281 +#: ../en/ch12-mq.xml:484 1.16282 msgid "" 1.16283 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes " 1.16284 "the <emphasis>topmost</emphasis> applied patch. This means that you can " 1.16285 @@ -14356,7 +15955,7 @@ 1.16286 msgstr "" 1.16287 1.16288 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16289 -#: ../en/ch11-mq.xml:489 1.16290 +#: ../en/ch12-mq.xml:491 1.16291 msgid "" 1.16292 "Here's an example that illustrates how you can use this ability. Let's say " 1.16293 "you're developing a new feature as two patches. The first is a change to the " 1.16294 @@ -14372,12 +15971,12 @@ 1.16295 msgstr "" 1.16296 1.16297 #. type: Content of: <book><chapter><sect1><title> 1.16298 -#: ../en/ch11-mq.xml:506 1.16299 +#: ../en/ch12-mq.xml:508 1.16300 msgid "More about patches" 1.16301 msgstr "关于补丁的更多信息" 1.16302 1.16303 #. type: Content of: <book><chapter><sect1><para> 1.16304 -#: ../en/ch11-mq.xml:508 1.16305 +#: ../en/ch12-mq.xml:510 1.16306 msgid "" 1.16307 "MQ uses the GNU <command>patch</command> command to apply patches, so it's " 1.16308 "helpful to know a few more detailed aspects of how <command>patch</command> " 1.16309 @@ -14385,12 +15984,12 @@ 1.16310 msgstr "" 1.16311 1.16312 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16313 -#: ../en/ch11-mq.xml:514 1.16314 +#: ../en/ch12-mq.xml:516 1.16315 msgid "The strip count" 1.16316 msgstr "修剪计数" 1.16317 1.16318 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16319 -#: ../en/ch11-mq.xml:516 1.16320 +#: ../en/ch12-mq.xml:518 1.16321 msgid "" 1.16322 "If you look at the file headers in a patch, you will notice that the " 1.16323 "pathnames usually have an extra component on the front that isn't present in " 1.16324 @@ -14400,7 +15999,7 @@ 1.16325 msgstr "" 1.16326 1.16327 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16328 -#: ../en/ch11-mq.xml:523 1.16329 +#: ../en/ch12-mq.xml:525 1.16330 msgid "" 1.16331 "Alice would unpack a tarball, edit her files, then decide that she wanted to " 1.16332 "create a patch. So she'd rename her working directory, unpack the tarball " 1.16333 @@ -14414,7 +16013,7 @@ 1.16334 msgstr "" 1.16335 1.16336 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16337 -#: ../en/ch11-mq.xml:536 1.16338 +#: ../en/ch12-mq.xml:538 1.16339 msgid "" 1.16340 "Since someone receiving a patch from the Alices of the net would be unlikely " 1.16341 "to have unmodified and modified directories with exactly the same names, the " 1.16342 @@ -14425,7 +16024,7 @@ 1.16343 msgstr "" 1.16344 1.16345 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16346 -#: ../en/ch11-mq.xml:544 1.16347 +#: ../en/ch12-mq.xml:546 1.16348 msgid "" 1.16349 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip " 1.16350 "count of one</quote>. If <command>patch</command> sees a file name " 1.16351 @@ -14439,7 +16038,7 @@ 1.16352 msgstr "" 1.16353 1.16354 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16355 -#: ../en/ch11-mq.xml:557 1.16356 +#: ../en/ch12-mq.xml:559 1.16357 msgid "" 1.16358 "The <quote>standard</quote> strip count for patches is one; almost all " 1.16359 "patches contain one leading path name component that needs to be stripped. " 1.16360 @@ -14449,7 +16048,7 @@ 1.16361 msgstr "" 1.16362 1.16363 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16364 -#: ../en/ch11-mq.xml:565 1.16365 +#: ../en/ch12-mq.xml:567 1.16366 msgid "" 1.16367 "If you receive a patch from someone that you want to add to your patch queue, " 1.16368 "and the patch needs a strip count other than one, you cannot just <command " 1.16369 @@ -14466,12 +16065,12 @@ 1.16370 msgstr "" 1.16371 1.16372 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16373 -#: ../en/ch11-mq.xml:584 1.16374 +#: ../en/ch12-mq.xml:587 1.16375 msgid "Strategies for applying a patch" 1.16376 msgstr "应用补丁的策略" 1.16377 1.16378 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16379 -#: ../en/ch11-mq.xml:586 1.16380 +#: ../en/ch12-mq.xml:589 1.16381 msgid "" 1.16382 "When <command>patch</command> applies a hunk, it tries a handful of " 1.16383 "successively less accurate strategies to try to make the hunk apply. This " 1.16384 @@ -14481,7 +16080,7 @@ 1.16385 msgstr "" 1.16386 1.16387 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16388 -#: ../en/ch11-mq.xml:593 1.16389 +#: ../en/ch12-mq.xml:596 1.16390 msgid "" 1.16391 "First, <command>patch</command> tries an exact match, where the line numbers, " 1.16392 "the context, and the text to be modified must apply exactly. If it cannot " 1.16393 @@ -14492,7 +16091,7 @@ 1.16394 msgstr "" 1.16395 1.16396 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16397 -#: ../en/ch11-mq.xml:602 1.16398 +#: ../en/ch12-mq.xml:605 1.16399 msgid "" 1.16400 "If a context-only match fails, <command>patch</command> removes the first and " 1.16401 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-" 1.16402 @@ -14503,7 +16102,7 @@ 1.16403 msgstr "" 1.16404 1.16405 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16406 -#: ../en/ch11-mq.xml:611 1.16407 +#: ../en/ch12-mq.xml:614 1.16408 msgid "" 1.16409 "When neither of these techniques works, <command>patch</command> prints a " 1.16410 "message saying that the hunk in question was rejected. It saves rejected " 1.16411 @@ -14520,33 +16119,33 @@ 1.16412 msgstr "" 1.16413 1.16414 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16415 -#: ../en/ch11-mq.xml:629 1.16416 +#: ../en/ch12-mq.xml:632 1.16417 msgid "Some quirks of patch representation" 1.16418 msgstr "补丁的一些特性" 1.16419 1.16420 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16421 -#: ../en/ch11-mq.xml:631 1.16422 +#: ../en/ch12-mq.xml:634 1.16423 msgid "" 1.16424 "There are a few useful things to know about how <command>patch</command> " 1.16425 "works with files." 1.16426 msgstr "" 1.16427 1.16428 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16429 -#: ../en/ch11-mq.xml:634 1.16430 +#: ../en/ch12-mq.xml:637 1.16431 msgid "" 1.16432 "This should already be obvious, but <command>patch</command> cannot handle " 1.16433 "binary files." 1.16434 msgstr "" 1.16435 1.16436 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16437 -#: ../en/ch11-mq.xml:638 1.16438 +#: ../en/ch12-mq.xml:641 1.16439 msgid "" 1.16440 "Neither does it care about the executable bit; it creates new files as " 1.16441 "readable, but not executable." 1.16442 msgstr "" 1.16443 1.16444 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16445 -#: ../en/ch11-mq.xml:642 1.16446 +#: ../en/ch12-mq.xml:645 1.16447 msgid "" 1.16448 "<command>patch</command> treats the removal of a file as a diff between the " 1.16449 "file to be removed and the empty file. So your idea of <quote>I deleted this " 1.16450 @@ -14555,7 +16154,7 @@ 1.16451 msgstr "" 1.16452 1.16453 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16454 -#: ../en/ch11-mq.xml:648 1.16455 +#: ../en/ch12-mq.xml:651 1.16456 msgid "" 1.16457 "It treats the addition of a file as a diff between the empty file and the " 1.16458 "file to be added. So in a patch, your idea of <quote>I added this file</" 1.16459 @@ -14563,7 +16162,7 @@ 1.16460 msgstr "" 1.16461 1.16462 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16463 -#: ../en/ch11-mq.xml:654 1.16464 +#: ../en/ch12-mq.xml:657 1.16465 msgid "" 1.16466 "It treats a renamed file as the removal of the old name, and the addition of " 1.16467 "the new name. This means that renamed files have a big footprint in " 1.16468 @@ -14572,7 +16171,7 @@ 1.16469 msgstr "" 1.16470 1.16471 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16472 -#: ../en/ch11-mq.xml:660 1.16473 +#: ../en/ch12-mq.xml:663 1.16474 msgid "" 1.16475 "<command>patch</command> cannot represent empty files, so you cannot use a " 1.16476 "patch to represent the notion <quote>I added this empty file to the tree</" 1.16477 @@ -14580,12 +16179,12 @@ 1.16478 msgstr "" 1.16479 1.16480 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16481 -#: ../en/ch11-mq.xml:667 1.16482 +#: ../en/ch12-mq.xml:671 1.16483 msgid "Beware the fuzz" 1.16484 msgstr "当心毛刺" 1.16485 1.16486 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16487 -#: ../en/ch11-mq.xml:669 1.16488 +#: ../en/ch12-mq.xml:673 1.16489 msgid "" 1.16490 "While applying a hunk at an offset, or with a fuzz factor, will often be " 1.16491 "completely successful, these inexact techniques naturally leave open the " 1.16492 @@ -14597,7 +16196,7 @@ 1.16493 msgstr "" 1.16494 1.16495 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16496 -#: ../en/ch11-mq.xml:679 1.16497 +#: ../en/ch12-mq.xml:683 1.16498 msgid "" 1.16499 "It's often a good idea to refresh a patch that has applied with an offset or " 1.16500 "fuzz factor; refreshing the patch generates new context information that will " 1.16501 @@ -14610,12 +16209,12 @@ 1.16502 msgstr "" 1.16503 1.16504 #. type: Content of: <book><chapter><sect1><sect2><title> 1.16505 -#: ../en/ch11-mq.xml:692 1.16506 +#: ../en/ch12-mq.xml:696 1.16507 msgid "Handling rejection" 1.16508 msgstr "处理拒绝" 1.16509 1.16510 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16511 -#: ../en/ch11-mq.xml:694 1.16512 +#: ../en/ch12-mq.xml:698 1.16513 msgid "" 1.16514 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it " 1.16515 "will print an error message and exit. If it has left <filename role=\"special" 1.16516 @@ -14624,7 +16223,7 @@ 1.16517 msgstr "" 1.16518 1.16519 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16520 -#: ../en/ch11-mq.xml:700 1.16521 +#: ../en/ch12-mq.xml:704 1.16522 msgid "" 1.16523 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does " 1.16524 "because you've changed the underlying code that your patches are based on, " 1.16525 @@ -14632,7 +16231,7 @@ 1.16526 msgstr "" 1.16527 1.16528 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16529 -#: ../en/ch11-mq.xml:705 1.16530 +#: ../en/ch12-mq.xml:709 1.16531 msgid "" 1.16532 "Unfortunately, there aren't any great techniques for dealing with rejected " 1.16533 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</" 1.16534 @@ -14640,76 +16239,137 @@ 1.16535 msgstr "" 1.16536 1.16537 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16538 -#: ../en/ch11-mq.xml:710 1.16539 -msgid "" 1.16540 -"If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a " 1.16541 -"tool called <command>wiggle</command> <citation>web:wiggle</citation>, which " 1.16542 -"is more vigorous than <command>patch</command> in its attempts to make a " 1.16543 -"patch apply." 1.16544 -msgstr "" 1.16545 - 1.16546 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.16547 -#: ../en/ch11-mq.xml:716 1.16548 -msgid "" 1.16549 -"Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), " 1.16550 -"wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</" 1.16551 -"citation>, which takes a simple approach to automating the application of " 1.16552 -"hunks rejected by <command>patch</command>. The <command>mpatch</command> " 1.16553 -"command can help with four common reasons that a hunk may be rejected:" 1.16554 +#: ../en/ch12-mq.xml:714 1.16555 +msgid "" 1.16556 +"A Linux kernel hacker, Chris Mason (the author of Mercurial Queues), wrote a " 1.16557 +"tool called <command>mpatch</command> (<ulink url=\"http://oss.oracle.com/" 1.16558 +"~mason/mpatch/\">http://oss.oracle.com/~mason/mpatch/</ulink>), which takes a " 1.16559 +"simple approach to automating the application of hunks rejected by " 1.16560 +"<command>patch</command>. The <command>mpatch</command> command can help " 1.16561 +"with four common reasons that a hunk may be rejected:" 1.16562 msgstr "" 1.16563 1.16564 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16565 -#: ../en/ch11-mq.xml:725 1.16566 +#: ../en/ch12-mq.xml:724 1.16567 msgid "The context in the middle of a hunk has changed." 1.16568 msgstr "" 1.16569 1.16570 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16571 -#: ../en/ch11-mq.xml:728 1.16572 +#: ../en/ch12-mq.xml:727 1.16573 msgid "A hunk is missing some context at the beginning or end." 1.16574 msgstr "" 1.16575 1.16576 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16577 -#: ../en/ch11-mq.xml:731 1.16578 +#: ../en/ch12-mq.xml:730 1.16579 msgid "" 1.16580 "A large hunk might apply better&emdash;either entirely or in part&emdash;if " 1.16581 "it was broken up into smaller hunks." 1.16582 msgstr "" 1.16583 1.16584 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.16585 -#: ../en/ch11-mq.xml:735 1.16586 +#: ../en/ch12-mq.xml:734 1.16587 msgid "" 1.16588 "A hunk removes lines with slightly different content than those currently " 1.16589 "present in the file." 1.16590 msgstr "" 1.16591 1.16592 #. type: Content of: <book><chapter><sect1><sect2><para> 1.16593 -#: ../en/ch11-mq.xml:739 1.16594 -msgid "" 1.16595 -"If you use <command>wiggle</command> or <command>mpatch</command>, you should " 1.16596 -"be doubly careful to check your results when you're done. In fact, " 1.16597 -"<command>mpatch</command> enforces this method of double-checking the tool's " 1.16598 -"output, by automatically dropping you into a merge program when it has done " 1.16599 -"its job, so that you can verify its work and finish off any remaining merges." 1.16600 +#: ../en/ch12-mq.xml:738 1.16601 +msgid "" 1.16602 +"If you use <command>mpatch</command>, you should be doubly careful to check " 1.16603 +"your results when you're done. In fact, <command>mpatch</command> enforces " 1.16604 +"this method of double-checking the tool's output, by automatically dropping " 1.16605 +"you into a merge program when it has done its job, so that you can verify its " 1.16606 +"work and finish off any remaining merges." 1.16607 msgstr "" 1.16608 1.16609 #. type: Content of: <book><chapter><sect1><title> 1.16610 -#: ../en/ch11-mq.xml:751 1.16611 +#: ../en/ch12-mq.xml:749 1.16612 +#, fuzzy 1.16613 +msgid "More on patch management" 1.16614 +msgstr "源代码管理" 1.16615 + 1.16616 +#. type: Content of: <book><chapter><sect1><para> 1.16617 +#: ../en/ch12-mq.xml:751 1.16618 +msgid "" 1.16619 +"As you grow familiar with MQ, you will find yourself wanting to perform other " 1.16620 +"kinds of patch management operations." 1.16621 +msgstr "" 1.16622 + 1.16623 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.16624 +#: ../en/ch12-mq.xml:755 1.16625 +#, fuzzy 1.16626 +msgid "Deleting unwanted patches" 1.16627 +msgstr "创建新补丁" 1.16628 + 1.16629 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.16630 +#: ../en/ch12-mq.xml:757 1.16631 +msgid "" 1.16632 +"If you want to get rid of a patch, use the <command role=\"hg-ext-mq\">hg " 1.16633 +"qdelete</command> command to delete the patch file and remove its entry from " 1.16634 +"the patch series. If you try to delete a patch that is still applied, " 1.16635 +"<command role=\"hg-ext-mq\">hg qdelete</command> will refuse." 1.16636 +msgstr "" 1.16637 + 1.16638 +#. type: Content of: <book><chapter><sect1><sect2><title> 1.16639 +#: ../en/ch12-mq.xml:767 1.16640 +msgid "Converting to and from permanent revisions" 1.16641 +msgstr "" 1.16642 + 1.16643 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.16644 +#: ../en/ch12-mq.xml:769 1.16645 +msgid "" 1.16646 +"Once you're done working on a patch and want to turn it into a permanent " 1.16647 +"changeset, use the <command role=\"hg-ext-mq\">hg qfinish</command> command. " 1.16648 +"Pass a revision to the command to identify the patch that you want to turn " 1.16649 +"into a regular changeset; this patch must already be applied." 1.16650 +msgstr "" 1.16651 + 1.16652 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.16653 +#: ../en/ch12-mq.xml:777 1.16654 +msgid "" 1.16655 +"The <command role=\"hg-ext-mq\">hg qfinish</command> command accepts an " 1.16656 +"<option>--all</option> or <option>-a</option> option, which turns all applied " 1.16657 +"patches into regular changesets." 1.16658 +msgstr "" 1.16659 + 1.16660 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.16661 +#: ../en/ch12-mq.xml:782 1.16662 +msgid "" 1.16663 +"It is also possible to turn an existing changeset into a patch, by passing " 1.16664 +"the <option>-r</option> option to <command role=\"hg-ext-mq\">hg qimport</" 1.16665 +"command>." 1.16666 +msgstr "" 1.16667 + 1.16668 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.16669 +#: ../en/ch12-mq.xml:788 1.16670 +msgid "" 1.16671 +"Note that it only makes sense to convert a changeset into a patch if you have " 1.16672 +"not propagated that changeset into any other repositories. The imported " 1.16673 +"changeset's ID will change every time you refresh the patch, which will make " 1.16674 +"Mercurial treat it as unrelated to the original changeset if you have pushed " 1.16675 +"it somewhere else." 1.16676 +msgstr "" 1.16677 + 1.16678 +#. type: Content of: <book><chapter><sect1><title> 1.16679 +#: ../en/ch12-mq.xml:798 1.16680 msgid "Getting the best performance out of MQ" 1.16681 msgstr "MQ 的性能" 1.16682 1.16683 #. type: Content of: <book><chapter><sect1><para> 1.16684 -#: ../en/ch11-mq.xml:753 1.16685 -msgid "" 1.16686 -"MQ is very efficient at handling a large number of patches. I ran some " 1.16687 +#: ../en/ch12-mq.xml:800 1.16688 +msgid "" 1.16689 +"MQ is very efficient at handling a large number of patches. I ran some " 1.16690 "performance experiments in mid-2006 for a talk that I gave at the 2006 " 1.16691 -"EuroPython conference <citation>web:europython</citation>. I used as my data " 1.16692 -"set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I " 1.16693 -"applied these on top of a Linux kernel repository containing all 27,472 " 1.16694 -"revisions between Linux 2.6.12-rc2 and Linux 2.6.17." 1.16695 -msgstr "" 1.16696 - 1.16697 -#. type: Content of: <book><chapter><sect1><para> 1.16698 -#: ../en/ch11-mq.xml:762 1.16699 +"EuroPython conference (on modern hardware, you should expect better " 1.16700 +"performance than you'll see below). I used as my data set the Linux 2.6.17-" 1.16701 +"mm1 patch series, which consists of 1,738 patches. I applied these on top of " 1.16702 +"a Linux kernel repository containing all 27,472 revisions between Linux " 1.16703 +"2.6.12-rc2 and Linux 2.6.17." 1.16704 +msgstr "" 1.16705 + 1.16706 +#. type: Content of: <book><chapter><sect1><para> 1.16707 +#: ../en/ch12-mq.xml:809 1.16708 msgid "" 1.16709 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " 1.16710 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " 1.16711 @@ -14721,14 +16381,14 @@ 1.16712 msgstr "" 1.16713 1.16714 #. type: Content of: <book><chapter><sect1><para> 1.16715 -#: ../en/ch11-mq.xml:773 1.16716 +#: ../en/ch12-mq.xml:820 1.16717 msgid "" 1.16718 "Clearly, MQ is well suited to working in large trees, but there are a few " 1.16719 "tricks you can use to get the best performance of it." 1.16720 msgstr "" 1.16721 1.16722 #. type: Content of: <book><chapter><sect1><para> 1.16723 -#: ../en/ch11-mq.xml:777 1.16724 +#: ../en/ch12-mq.xml:824 1.16725 msgid "" 1.16726 "First of all, try to <quote>batch</quote> operations together. Every time " 1.16727 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-" 1.16728 @@ -14740,7 +16400,7 @@ 1.16729 msgstr "" 1.16730 1.16731 #. type: Content of: <book><chapter><sect1><para> 1.16732 -#: ../en/ch11-mq.xml:788 1.16733 +#: ../en/ch12-mq.xml:835 1.16734 msgid "" 1.16735 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq" 1.16736 "\">qpop</command> commands allow you to push and pop multiple patches at a " 1.16737 @@ -14752,7 +16412,7 @@ 1.16738 msgstr "" 1.16739 1.16740 #. type: Content of: <book><chapter><sect1><para> 1.16741 -#: ../en/ch11-mq.xml:798 1.16742 +#: ../en/ch12-mq.xml:845 1.16743 msgid "" 1.16744 "You can identify a destination patch using either the name of the patch, or " 1.16745 "by number. If you use numeric addressing, patches are counted from zero; " 1.16746 @@ -14760,12 +16420,12 @@ 1.16747 msgstr "" 1.16748 1.16749 #. type: Content of: <book><chapter><sect1><title> 1.16750 -#: ../en/ch11-mq.xml:805 1.16751 +#: ../en/ch12-mq.xml:852 1.16752 msgid "Updating your patches when the underlying code changes" 1.16753 msgstr "当基础代码改变时,更新补丁的方法" 1.16754 1.16755 #. type: Content of: <book><chapter><sect1><para> 1.16756 -#: ../en/ch11-mq.xml:808 1.16757 +#: ../en/ch12-mq.xml:855 1.16758 msgid "" 1.16759 "It's common to have a stack of patches on top of an underlying repository " 1.16760 "that you don't modify directly. If you're working on changes to third-party " 1.16761 @@ -14776,7 +16436,7 @@ 1.16762 msgstr "" 1.16763 1.16764 #. type: Content of: <book><chapter><sect1><para> 1.16765 -#: ../en/ch11-mq.xml:817 1.16766 +#: ../en/ch12-mq.xml:864 1.16767 msgid "" 1.16768 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option " 1.16769 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " 1.16770 @@ -14790,7 +16450,7 @@ 1.16771 msgstr "" 1.16772 1.16773 #. type: Content of: <book><chapter><sect1><para> 1.16774 -#: ../en/ch11-mq.xml:829 1.16775 +#: ../en/ch12-mq.xml:876 1.16776 msgid "" 1.16777 "This approach is easy to use and works well if you don't expect changes to " 1.16778 "the underlying code to affect how well your patches apply. If your patch " 1.16779 @@ -14800,7 +16460,7 @@ 1.16780 msgstr "" 1.16781 1.16782 #. type: Content of: <book><chapter><sect1><para> 1.16783 -#: ../en/ch11-mq.xml:836 1.16784 +#: ../en/ch12-mq.xml:883 1.16785 msgid "" 1.16786 "It's possible to partially automate the rebasing process. If your patches " 1.16787 "apply cleanly against some revision of the underlying repo, MQ can use this " 1.16788 @@ -14809,19 +16469,19 @@ 1.16789 msgstr "" 1.16790 1.16791 #. type: Content of: <book><chapter><sect1><para> 1.16792 -#: ../en/ch11-mq.xml:842 1.16793 +#: ../en/ch12-mq.xml:889 1.16794 msgid "The process is a little involved." 1.16795 msgstr "" 1.16796 1.16797 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.16798 -#: ../en/ch11-mq.xml:844 1.16799 +#: ../en/ch12-mq.xml:891 1.16800 msgid "" 1.16801 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches " 1.16802 "on top of the revision where you know that they apply cleanly." 1.16803 msgstr "" 1.16804 1.16805 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.16806 -#: ../en/ch11-mq.xml:848 1.16807 +#: ../en/ch12-mq.xml:895 1.16808 msgid "" 1.16809 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg " 1.16810 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role=" 1.16811 @@ -14836,7 +16496,7 @@ 1.16812 msgstr "" 1.16813 1.16814 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.16815 -#: ../en/ch11-mq.xml:862 1.16816 +#: ../en/ch12-mq.xml:909 1.16817 msgid "" 1.16818 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the " 1.16819 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</" 1.16820 @@ -14844,7 +16504,7 @@ 1.16821 msgstr "" 1.16822 1.16823 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.16824 -#: ../en/ch11-mq.xml:867 1.16825 +#: ../en/ch12-mq.xml:914 1.16826 msgid "" 1.16827 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update " 1.16828 "<option role=\"hg-opt-update\">-C</option></command> to override the patches " 1.16829 @@ -14852,7 +16512,7 @@ 1.16830 msgstr "" 1.16831 1.16832 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.16833 -#: ../en/ch11-mq.xml:872 1.16834 +#: ../en/ch12-mq.xml:919 1.16835 msgid "" 1.16836 "Merge all patches using <command>hg qpush -m -a</command>. The <option role=" 1.16837 "\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq" 1.16838 @@ -14861,7 +16521,7 @@ 1.16839 msgstr "" 1.16840 1.16841 #. type: Content of: <book><chapter><sect1><para> 1.16842 -#: ../en/ch11-mq.xml:880 1.16843 +#: ../en/ch12-mq.xml:927 1.16844 msgid "" 1.16845 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-" 1.16846 "qpush-opt\">hg -m</option></command>, each patch in the <filename role=" 1.16847 @@ -14873,14 +16533,14 @@ 1.16848 msgstr "" 1.16849 1.16850 #. type: Content of: <book><chapter><sect1><para> 1.16851 -#: ../en/ch11-mq.xml:890 1.16852 +#: ../en/ch12-mq.xml:937 1.16853 msgid "" 1.16854 "When you finish resolving the effects of a patch, MQ refreshes your patch " 1.16855 "based on the result of the merge." 1.16856 msgstr "" 1.16857 1.16858 #. type: Content of: <book><chapter><sect1><para> 1.16859 -#: ../en/ch11-mq.xml:893 1.16860 +#: ../en/ch12-mq.xml:940 1.16861 msgid "" 1.16862 "At the end of this process, your repository will have one extra head from the " 1.16863 "old patch queue, and a copy of the old patch queue will be in <filename role=" 1.16864 @@ -14892,12 +16552,12 @@ 1.16865 msgstr "" 1.16866 1.16867 #. type: Content of: <book><chapter><sect1><title> 1.16868 -#: ../en/ch11-mq.xml:905 1.16869 +#: ../en/ch12-mq.xml:952 1.16870 msgid "Identifying patches" 1.16871 msgstr "标识补丁" 1.16872 1.16873 #. type: Content of: <book><chapter><sect1><para> 1.16874 -#: ../en/ch11-mq.xml:907 1.16875 +#: ../en/ch12-mq.xml:954 1.16876 msgid "" 1.16877 "MQ commands that work with patches let you refer to a patch either by using " 1.16878 "its name or by a number. By name is obvious enough; pass the name " 1.16879 @@ -14907,7 +16567,7 @@ 1.16880 msgstr "" 1.16881 1.16882 #. type: Content of: <book><chapter><sect1><para> 1.16883 -#: ../en/ch11-mq.xml:914 1.16884 +#: ../en/ch12-mq.xml:961 1.16885 msgid "" 1.16886 "As a shortcut, you can refer to a patch using both a name and a numeric " 1.16887 "offset; <literal>foo.patch-2</literal> means <quote>two patches before " 1.16888 @@ -14916,7 +16576,7 @@ 1.16889 msgstr "" 1.16890 1.16891 #. type: Content of: <book><chapter><sect1><para> 1.16892 -#: ../en/ch11-mq.xml:920 1.16893 +#: ../en/ch12-mq.xml:967 1.16894 msgid "" 1.16895 "Referring to a patch by index isn't much different. The first patch printed " 1.16896 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero " 1.16897 @@ -14925,7 +16585,7 @@ 1.16898 msgstr "" 1.16899 1.16900 #. type: Content of: <book><chapter><sect1><para> 1.16901 -#: ../en/ch11-mq.xml:926 1.16902 +#: ../en/ch12-mq.xml:973 1.16903 msgid "" 1.16904 "MQ also makes it easy to work with patches when you are using normal " 1.16905 "Mercurial commands. Every command that accepts a changeset ID will also " 1.16906 @@ -14937,33 +16597,33 @@ 1.16907 msgstr "" 1.16908 1.16909 #. type: Content of: <book><chapter><sect1><para> 1.16910 -#: ../en/ch11-mq.xml:936 1.16911 +#: ../en/ch12-mq.xml:983 1.16912 msgid "" 1.16913 "These additions to Mercurial's normal tagging capabilities make dealing with " 1.16914 "patches even more of a breeze." 1.16915 msgstr "" 1.16916 1.16917 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.16918 -#: ../en/ch11-mq.xml:939 1.16919 +#: ../en/ch12-mq.xml:986 1.16920 msgid "Want to patchbomb a mailing list with your latest series of changes?" 1.16921 msgstr "" 1.16922 1.16923 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.16924 -#: ../en/ch11-mq.xml:942 1.16925 +#: ../en/ch12-mq.xml:989 1.16926 msgid "" 1.16927 "(Don't know what <quote>patchbombing</quote> is? See <xref linkend=\"sec:" 1.16928 "hgext:patchbomb\"/>.)" 1.16929 msgstr "" 1.16930 1.16931 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.16932 -#: ../en/ch11-mq.xml:945 1.16933 +#: ../en/ch12-mq.xml:992 1.16934 msgid "" 1.16935 "Need to see all of the patches since <literal>foo.patch</literal> that have " 1.16936 "touched files in a subdirectory of your tree?" 1.16937 msgstr "" 1.16938 1.16939 #. type: Content of: <book><chapter><sect1><para> 1.16940 -#: ../en/ch11-mq.xml:952 1.16941 +#: ../en/ch12-mq.xml:999 1.16942 msgid "" 1.16943 "Because MQ makes the names of patches available to the rest of Mercurial " 1.16944 "through its normal internal tag machinery, you don't need to type in the " 1.16945 @@ -14971,7 +16631,7 @@ 1.16946 msgstr "" 1.16947 1.16948 #. type: Content of: <book><chapter><sect1><para> 1.16949 -#: ../en/ch11-mq.xml:957 1.16950 +#: ../en/ch12-mq.xml:1004 1.16951 msgid "" 1.16952 "Another nice consequence of representing patch names as tags is that when you " 1.16953 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a " 1.16954 @@ -14982,19 +16642,19 @@ 1.16955 msgstr "" 1.16956 1.16957 #. type: Content of: <book><chapter><sect1><title> 1.16958 -#: ../en/ch11-mq.xml:970 1.16959 +#: ../en/ch12-mq.xml:1017 1.16960 msgid "Useful things to know about" 1.16961 msgstr "其它需要了解的东西" 1.16962 1.16963 #. type: Content of: <book><chapter><sect1><para> 1.16964 -#: ../en/ch11-mq.xml:972 1.16965 +#: ../en/ch12-mq.xml:1019 1.16966 msgid "" 1.16967 "There are a number of aspects of MQ usage that don't fit tidily into sections " 1.16968 "of their own, but that are good to know. Here they are, in one place." 1.16969 msgstr "" 1.16970 1.16971 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.16972 -#: ../en/ch11-mq.xml:977 1.16973 +#: ../en/ch12-mq.xml:1024 1.16974 msgid "" 1.16975 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and " 1.16976 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that " 1.16977 @@ -15004,7 +16664,7 @@ 1.16978 msgstr "" 1.16979 1.16980 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.16981 -#: ../en/ch11-mq.xml:986 1.16982 +#: ../en/ch12-mq.xml:1033 1.16983 msgid "" 1.16984 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes " 1.16985 "from another branch with a patch changeset, at least if you want to maintain " 1.16986 @@ -15014,12 +16674,12 @@ 1.16987 msgstr "" 1.16988 1.16989 #. type: Content of: <book><chapter><sect1><title> 1.16990 -#: ../en/ch11-mq.xml:997 1.16991 +#: ../en/ch12-mq.xml:1044 1.16992 msgid "Managing patches in a repository" 1.16993 msgstr "在版本库管理补丁" 1.16994 1.16995 #. type: Content of: <book><chapter><sect1><para> 1.16996 -#: ../en/ch11-mq.xml:999 1.16997 +#: ../en/ch12-mq.xml:1046 1.16998 msgid "" 1.16999 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</" 1.17000 "filename> directory resides outside a Mercurial repository's working " 1.17001 @@ -15028,7 +16688,7 @@ 1.17002 msgstr "" 1.17003 1.17004 #. type: Content of: <book><chapter><sect1><para> 1.17005 -#: ../en/ch11-mq.xml:1005 1.17006 +#: ../en/ch12-mq.xml:1052 1.17007 msgid "" 1.17008 "This presents the interesting possibility of managing the contents of the " 1.17009 "patch directory as a Mercurial repository in its own right. This can be a " 1.17010 @@ -15039,7 +16699,7 @@ 1.17011 msgstr "" 1.17012 1.17013 #. type: Content of: <book><chapter><sect1><para> 1.17014 -#: ../en/ch11-mq.xml:1014 1.17015 +#: ../en/ch12-mq.xml:1061 1.17016 msgid "" 1.17017 "You can then share different versions of the same patch stack among multiple " 1.17018 "underlying repositories. I use this when I am developing a Linux kernel " 1.17019 @@ -15051,7 +16711,7 @@ 1.17020 msgstr "" 1.17021 1.17022 #. type: Content of: <book><chapter><sect1><para> 1.17023 -#: ../en/ch11-mq.xml:1024 1.17024 +#: ../en/ch12-mq.xml:1071 1.17025 msgid "" 1.17026 "Managing patches in a repository makes it possible for multiple developers to " 1.17027 "work on the same patch series without colliding with each other, all on top " 1.17028 @@ -15059,12 +16719,12 @@ 1.17029 msgstr "" 1.17030 1.17031 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17032 -#: ../en/ch11-mq.xml:1030 1.17033 +#: ../en/ch12-mq.xml:1077 1.17034 msgid "MQ support for patch repositories" 1.17035 msgstr "MQ 支持补丁版本库" 1.17036 1.17037 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17038 -#: ../en/ch11-mq.xml:1032 1.17039 +#: ../en/ch12-mq.xml:1079 1.17040 msgid "" 1.17041 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">." 1.17042 "hg/patches</filename> directory as a repository; when you prepare a " 1.17043 @@ -15075,7 +16735,7 @@ 1.17044 msgstr "" 1.17045 1.17046 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.17047 -#: ../en/ch11-mq.xml:1042 1.17048 +#: ../en/ch12-mq.xml:1089 1.17049 msgid "" 1.17050 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 1.17051 "option> option, you can simply go into the <filename role=\"special\" class=" 1.17052 @@ -15086,7 +16746,7 @@ 1.17053 msgstr "" 1.17054 1.17055 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.17056 -#: ../en/ch11-mq.xml:1051 1.17057 +#: ../en/ch12-mq.xml:1098 1.17058 msgid "" 1.17059 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt" 1.17060 "\">hg -c</option></command> does this for you automatically); you " 1.17061 @@ -15095,7 +16755,7 @@ 1.17062 msgstr "" 1.17063 1.17064 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17065 -#: ../en/ch11-mq.xml:1058 1.17066 +#: ../en/ch12-mq.xml:1105 1.17067 msgid "" 1.17068 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/" 1.17069 "patches</filename> directory is a repository, it will automatically <command " 1.17070 @@ -15103,7 +16763,7 @@ 1.17071 msgstr "" 1.17072 1.17073 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17074 -#: ../en/ch11-mq.xml:1063 1.17075 +#: ../en/ch12-mq.xml:1110 1.17076 msgid "" 1.17077 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</" 1.17078 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the " 1.17079 @@ -15112,7 +16772,7 @@ 1.17080 msgstr "" 1.17081 1.17082 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17083 -#: ../en/ch11-mq.xml:1069 1.17084 +#: ../en/ch12-mq.xml:1116 1.17085 msgid "" 1.17086 "Finally, as a convenience to manage the patch directory, you can define the " 1.17087 "alias <command>mq</command> on Unix systems. For example, on Linux systems " 1.17088 @@ -15121,26 +16781,26 @@ 1.17089 msgstr "" 1.17090 1.17091 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17092 -#: ../en/ch11-mq.xml:1078 1.17093 +#: ../en/ch12-mq.xml:1125 1.17094 msgid "" 1.17095 "You can then issue commands of the form <command>mq pull</command> from the " 1.17096 "main repository." 1.17097 msgstr "" 1.17098 1.17099 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17100 -#: ../en/ch11-mq.xml:1083 1.17101 +#: ../en/ch12-mq.xml:1130 1.17102 msgid "A few things to watch out for" 1.17103 msgstr "需要注意的事情" 1.17104 1.17105 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17106 -#: ../en/ch11-mq.xml:1085 1.17107 +#: ../en/ch12-mq.xml:1132 1.17108 msgid "" 1.17109 "MQ's support for working with a repository full of patches is limited in a " 1.17110 "few small respects." 1.17111 msgstr "" 1.17112 1.17113 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17114 -#: ../en/ch11-mq.xml:1088 1.17115 +#: ../en/ch12-mq.xml:1135 1.17116 msgid "" 1.17117 "MQ cannot automatically detect changes that you make to the patch directory. " 1.17118 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " 1.17119 @@ -15154,12 +16814,12 @@ 1.17120 msgstr "" 1.17121 1.17122 #. type: Content of: <book><chapter><sect1><title> 1.17123 -#: ../en/ch11-mq.xml:1104 1.17124 +#: ../en/ch12-mq.xml:1151 1.17125 msgid "Third party tools for working with patches" 1.17126 msgstr "操作补丁的第三方工具" 1.17127 1.17128 #. type: Content of: <book><chapter><sect1><para> 1.17129 -#: ../en/ch11-mq.xml:1106 1.17130 +#: ../en/ch12-mq.xml:1153 1.17131 msgid "" 1.17132 "Once you've been working with patches for a while, you'll find yourself " 1.17133 "hungry for tools that will help you to understand and manipulate the patches " 1.17134 @@ -15167,7 +16827,7 @@ 1.17135 msgstr "" 1.17136 1.17137 #. type: Content of: <book><chapter><sect1><para> 1.17138 -#: ../en/ch11-mq.xml:1110 1.17139 +#: ../en/ch12-mq.xml:1157 1.17140 msgid "" 1.17141 "The <command>diffstat</command> command <citation>web:diffstat</citation> " 1.17142 "generates a histogram of the modifications made to each file in a patch. It " 1.17143 @@ -15180,7 +16840,7 @@ 1.17144 msgstr "" 1.17145 1.17146 #. type: Content of: <book><chapter><sect1><para> 1.17147 -#: ../en/ch11-mq.xml:1124 1.17148 +#: ../en/ch12-mq.xml:1171 1.17149 msgid "" 1.17150 "The <literal role=\"package\">patchutils</literal> package <citation>web:" 1.17151 "patchutils</citation> is invaluable. It provides a set of small utilities " 1.17152 @@ -15195,12 +16855,12 @@ 1.17153 msgstr "" 1.17154 1.17155 #. type: Content of: <book><chapter><sect1><title> 1.17156 -#: ../en/ch11-mq.xml:1140 1.17157 +#: ../en/ch12-mq.xml:1187 1.17158 msgid "Good ways to work with patches" 1.17159 msgstr "操作补丁的好习惯" 1.17160 1.17161 #. type: Content of: <book><chapter><sect1><para> 1.17162 -#: ../en/ch11-mq.xml:1142 1.17163 +#: ../en/ch12-mq.xml:1189 1.17164 msgid "" 1.17165 "Whether you are working on a patch series to submit to a free software or " 1.17166 "open source project, or a series that you intend to treat as a sequence of " 1.17167 @@ -15209,7 +16869,7 @@ 1.17168 msgstr "" 1.17169 1.17170 #. type: Content of: <book><chapter><sect1><para> 1.17171 -#: ../en/ch11-mq.xml:1148 1.17172 +#: ../en/ch12-mq.xml:1195 1.17173 msgid "" 1.17174 "Give your patches descriptive names. A good name for a patch might be " 1.17175 "<filename>rework-device-alloc.patch</filename>, because it will immediately " 1.17176 @@ -15223,7 +16883,7 @@ 1.17177 msgstr "" 1.17178 1.17179 #. type: Content of: <book><chapter><sect1><para> 1.17180 -#: ../en/ch11-mq.xml:1160 1.17181 +#: ../en/ch12-mq.xml:1207 1.17182 msgid "" 1.17183 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq" 1.17184 "\">qtop</command> command and skim over the text of your patches " 1.17185 @@ -15236,7 +16896,7 @@ 1.17186 msgstr "" 1.17187 1.17188 #. type: Content of: <book><chapter><sect1><para> 1.17189 -#: ../en/ch11-mq.xml:1170 1.17190 +#: ../en/ch12-mq.xml:1217 1.17191 msgid "" 1.17192 "For this reason, it is very much worth investing a little time to learn how " 1.17193 "to use some of the third-party tools I described in <xref linkend=\"sec:mq:" 1.17194 @@ -15247,17 +16907,17 @@ 1.17195 msgstr "" 1.17196 1.17197 #. type: Content of: <book><chapter><sect1><title> 1.17198 -#: ../en/ch11-mq.xml:1181 1.17199 +#: ../en/ch12-mq.xml:1228 1.17200 msgid "MQ cookbook" 1.17201 msgstr "MQ 手册" 1.17202 1.17203 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17204 -#: ../en/ch11-mq.xml:1184 1.17205 +#: ../en/ch12-mq.xml:1231 1.17206 msgid "Manage <quote>trivial</quote> patches" 1.17207 msgstr "管理<quote>琐碎的</quote>补丁" 1.17208 1.17209 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17210 -#: ../en/ch11-mq.xml:1186 1.17211 +#: ../en/ch12-mq.xml:1233 1.17212 msgid "" 1.17213 "Because the overhead of dropping files into a new Mercurial repository is so " 1.17214 "low, it makes a lot of sense to manage patches this way even if you simply " 1.17215 @@ -15266,26 +16926,26 @@ 1.17216 1.17217 # 1.17218 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17219 -#: ../en/ch11-mq.xml:1191 1.17220 +#: ../en/ch12-mq.xml:1238 1.17221 msgid "" 1.17222 "Begin by downloading and unpacking the source tarball, and turning it into a " 1.17223 "Mercurial repository." 1.17224 msgstr "" 1.17225 1.17226 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17227 -#: ../en/ch11-mq.xml:1196 1.17228 +#: ../en/ch12-mq.xml:1243 1.17229 msgid "Continue by creating a patch stack and making your changes." 1.17230 msgstr "" 1.17231 1.17232 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17233 -#: ../en/ch11-mq.xml:1201 1.17234 +#: ../en/ch12-mq.xml:1248 1.17235 msgid "" 1.17236 "Let's say a few weeks or months pass, and your package author releases a new " 1.17237 "version. First, bring their changes into the repository." 1.17238 msgstr "" 1.17239 1.17240 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17241 -#: ../en/ch11-mq.xml:1207 1.17242 +#: ../en/ch12-mq.xml:1254 1.17243 msgid "" 1.17244 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above " 1.17245 "deletes all files in the working directory, so that <command role=\"hg-cmd" 1.17246 @@ -15295,17 +16955,17 @@ 1.17247 msgstr "" 1.17248 1.17249 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17250 -#: ../en/ch11-mq.xml:1215 1.17251 +#: ../en/ch12-mq.xml:1262 1.17252 msgid "Finally, you can apply your patches on top of the new tree." 1.17253 msgstr "" 1.17254 1.17255 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17256 -#: ../en/ch11-mq.xml:1222 1.17257 +#: ../en/ch12-mq.xml:1269 1.17258 msgid "Combining entire patches" 1.17259 msgstr "组合全部的补丁" 1.17260 1.17261 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17262 -#: ../en/ch11-mq.xml:1224 1.17263 +#: ../en/ch12-mq.xml:1271 1.17264 msgid "" 1.17265 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets " 1.17266 "you combine entire patches. This <quote>folds</quote> the patches you name, " 1.17267 @@ -15315,7 +16975,7 @@ 1.17268 msgstr "" 1.17269 1.17270 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17271 -#: ../en/ch11-mq.xml:1232 1.17272 +#: ../en/ch12-mq.xml:1279 1.17273 msgid "" 1.17274 "The order in which you fold patches matters. If your topmost applied patch " 1.17275 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</" 1.17276 @@ -15326,19 +16986,19 @@ 1.17277 msgstr "" 1.17278 1.17279 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17280 -#: ../en/ch11-mq.xml:1243 1.17281 +#: ../en/ch12-mq.xml:1290 1.17282 msgid "Merging part of one patch into another" 1.17283 msgstr "合并补丁的部分内容到其它补丁" 1.17284 1.17285 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17286 -#: ../en/ch11-mq.xml:1245 1.17287 +#: ../en/ch12-mq.xml:1292 1.17288 msgid "" 1.17289 "Merging <emphasis>part</emphasis> of one patch into another is more difficult " 1.17290 "than combining entire patches." 1.17291 msgstr "" 1.17292 1.17293 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17294 -#: ../en/ch11-mq.xml:1249 1.17295 +#: ../en/ch12-mq.xml:1296 1.17296 msgid "" 1.17297 "If you want to move changes to entire files, you can use <command>filterdiff</" 1.17298 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role=" 1.17299 @@ -15352,7 +17012,7 @@ 1.17300 msgstr "" 1.17301 1.17302 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17303 -#: ../en/ch11-mq.xml:1262 1.17304 +#: ../en/ch12-mq.xml:1309 1.17305 msgid "" 1.17306 "If you have a patch that has multiple hunks modifying a file, and you only " 1.17307 "want to move a few of those hunks, the job becomes more messy, but you can " 1.17308 @@ -15361,32 +17021,32 @@ 1.17309 msgstr "" 1.17310 1.17311 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17312 -#: ../en/ch11-mq.xml:1270 1.17313 +#: ../en/ch12-mq.xml:1317 1.17314 msgid "This command prints three different kinds of number:" 1.17315 msgstr "" 1.17316 1.17317 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.17318 -#: ../en/ch11-mq.xml:1273 1.17319 +#: ../en/ch12-mq.xml:1320 1.17320 msgid "" 1.17321 "(in the first column) a <emphasis>file number</emphasis> to identify each " 1.17322 "file modified in the patch;" 1.17323 msgstr "" 1.17324 1.17325 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.17326 -#: ../en/ch11-mq.xml:1277 1.17327 +#: ../en/ch12-mq.xml:1324 1.17328 msgid "" 1.17329 "(on the next line, indented) the line number within a modified file where a " 1.17330 "hunk starts; and" 1.17331 msgstr "" 1.17332 1.17333 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.17334 -#: ../en/ch11-mq.xml:1280 1.17335 +#: ../en/ch12-mq.xml:1327 1.17336 msgid "" 1.17337 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk." 1.17338 msgstr "" 1.17339 1.17340 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17341 -#: ../en/ch11-mq.xml:1284 1.17342 +#: ../en/ch12-mq.xml:1331 1.17343 msgid "" 1.17344 "You'll have to use some visual inspection, and reading of the patch, to " 1.17345 "identify the file and hunk numbers you'll want, but you can then pass them to " 1.17346 @@ -15396,7 +17056,7 @@ 1.17347 msgstr "" 1.17348 1.17349 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17350 -#: ../en/ch11-mq.xml:1292 1.17351 +#: ../en/ch12-mq.xml:1339 1.17352 msgid "" 1.17353 "Once you have this hunk, you can concatenate it onto the end of your " 1.17354 "destination patch and continue with the remainder of <xref linkend=\"sec:mq:" 1.17355 @@ -15404,19 +17064,19 @@ 1.17356 msgstr "" 1.17357 1.17358 #. type: Content of: <book><chapter><sect1><title> 1.17359 -#: ../en/ch11-mq.xml:1299 1.17360 +#: ../en/ch12-mq.xml:1346 1.17361 msgid "Differences between quilt and MQ" 1.17362 msgstr "MQ 与 quilt 的区别" 1.17363 1.17364 #. type: Content of: <book><chapter><sect1><para> 1.17365 -#: ../en/ch11-mq.xml:1301 1.17366 +#: ../en/ch12-mq.xml:1348 1.17367 msgid "" 1.17368 "If you are already familiar with quilt, MQ provides a similar command set. " 1.17369 "There are a few differences in the way that it works." 1.17370 msgstr "" 1.17371 1.17372 #. type: Content of: <book><chapter><sect1><para> 1.17373 -#: ../en/ch11-mq.xml:1305 1.17374 +#: ../en/ch12-mq.xml:1352 1.17375 msgid "" 1.17376 "You will already have noticed that most quilt commands have MQ counterparts " 1.17377 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions " 1.17378 @@ -15428,12 +17088,12 @@ 1.17379 msgstr "" 1.17380 1.17381 #. type: Content of: <book><chapter><title> 1.17382 -#: ../en/ch12-mq-collab.xml:5 1.17383 +#: ../en/ch13-mq-collab.xml:5 1.17384 msgid "Advanced uses of Mercurial Queues" 1.17385 msgstr "MQ 的高级用法" 1.17386 1.17387 #. type: Content of: <book><chapter><para> 1.17388 -#: ../en/ch12-mq-collab.xml:7 1.17389 +#: ../en/ch13-mq-collab.xml:7 1.17390 msgid "" 1.17391 "While it's easy to pick up straightforward uses of Mercurial Queues, use of a " 1.17392 "little discipline and some of MQ's less frequently used capabilities makes it " 1.17393 @@ -15441,7 +17101,7 @@ 1.17394 msgstr "" 1.17395 1.17396 #. type: Content of: <book><chapter><para> 1.17397 -#: ../en/ch12-mq-collab.xml:12 1.17398 +#: ../en/ch13-mq-collab.xml:12 1.17399 msgid "" 1.17400 "In this chapter, I will use as an example a technique I have used to manage " 1.17401 "the development of an Infiniband device driver for the Linux kernel. The " 1.17402 @@ -15451,7 +17111,7 @@ 1.17403 msgstr "" 1.17404 1.17405 #. type: Content of: <book><chapter><para> 1.17406 -#: ../en/ch12-mq-collab.xml:18 1.17407 +#: ../en/ch13-mq-collab.xml:18 1.17408 msgid "" 1.17409 "While much of the material in this chapter is specific to Linux, the same " 1.17410 "principles apply to any code base for which you're not the primary owner, and " 1.17411 @@ -15459,12 +17119,12 @@ 1.17412 msgstr "" 1.17413 1.17414 #. type: Content of: <book><chapter><sect1><title> 1.17415 -#: ../en/ch12-mq-collab.xml:24 1.17416 +#: ../en/ch13-mq-collab.xml:24 1.17417 msgid "The problem of many targets" 1.17418 msgstr "多个目标的问题" 1.17419 1.17420 #. type: Content of: <book><chapter><sect1><para> 1.17421 -#: ../en/ch12-mq-collab.xml:26 1.17422 +#: ../en/ch13-mq-collab.xml:26 1.17423 msgid "" 1.17424 "The Linux kernel changes rapidly, and has never been internally stable; " 1.17425 "developers frequently make drastic changes between releases. This means that " 1.17426 @@ -15474,14 +17134,14 @@ 1.17427 msgstr "" 1.17428 1.17429 #. type: Content of: <book><chapter><sect1><para> 1.17430 -#: ../en/ch12-mq-collab.xml:33 1.17431 +#: ../en/ch13-mq-collab.xml:33 1.17432 msgid "" 1.17433 "To maintain a driver, we have to keep a number of distinct versions of Linux " 1.17434 "in mind." 1.17435 msgstr "" 1.17436 1.17437 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17438 -#: ../en/ch12-mq-collab.xml:36 1.17439 +#: ../en/ch13-mq-collab.xml:36 1.17440 msgid "" 1.17441 "One target is the main Linux kernel development tree. Maintenance of the code " 1.17442 "is in this case partly shared by other developers in the kernel community, " 1.17443 @@ -15490,7 +17150,7 @@ 1.17444 msgstr "" 1.17445 1.17446 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17447 -#: ../en/ch12-mq-collab.xml:42 1.17448 +#: ../en/ch13-mq-collab.xml:42 1.17449 msgid "" 1.17450 "We also maintain a number of <quote>backports</quote> to older versions of " 1.17451 "the Linux kernel, to support the needs of customers who are running older " 1.17452 @@ -15501,7 +17161,7 @@ 1.17453 msgstr "" 1.17454 1.17455 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17456 -#: ../en/ch12-mq-collab.xml:50 1.17457 +#: ../en/ch13-mq-collab.xml:50 1.17458 msgid "" 1.17459 "Finally, we make software releases on a schedule that is necessarily not " 1.17460 "aligned with those used by Linux distributors and kernel developers, so that " 1.17461 @@ -15510,19 +17170,19 @@ 1.17462 msgstr "" 1.17463 1.17464 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17465 -#: ../en/ch12-mq-collab.xml:58 1.17466 +#: ../en/ch13-mq-collab.xml:58 1.17467 msgid "Tempting approaches that don't work well" 1.17468 msgstr "工作不好的诱人方法" 1.17469 1.17470 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17471 -#: ../en/ch12-mq-collab.xml:60 1.17472 +#: ../en/ch13-mq-collab.xml:60 1.17473 msgid "" 1.17474 "There are two <quote>standard</quote> ways to maintain a piece of software " 1.17475 "that has to target many different environments." 1.17476 msgstr "" 1.17477 1.17478 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17479 -#: ../en/ch12-mq-collab.xml:64 1.17480 +#: ../en/ch13-mq-collab.xml:64 1.17481 msgid "" 1.17482 "The first is to maintain a number of branches, each intended for a single " 1.17483 "target. The trouble with this approach is that you must maintain iron " 1.17484 @@ -15534,7 +17194,7 @@ 1.17485 msgstr "" 1.17486 1.17487 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17488 -#: ../en/ch12-mq-collab.xml:74 1.17489 +#: ../en/ch13-mq-collab.xml:74 1.17490 msgid "" 1.17491 "The second is to maintain a single source tree filled with conditional " 1.17492 "statements that turn chunks of code on or off depending on the intended " 1.17493 @@ -15546,7 +17206,7 @@ 1.17494 msgstr "" 1.17495 1.17496 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17497 -#: ../en/ch12-mq-collab.xml:83 1.17498 +#: ../en/ch13-mq-collab.xml:83 1.17499 msgid "" 1.17500 "Neither of these approaches is well suited to a situation where you don't " 1.17501 "<quote>own</quote> the canonical copy of a source tree. In the case of a " 1.17502 @@ -15558,14 +17218,14 @@ 1.17503 msgstr "" 1.17504 1.17505 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17506 -#: ../en/ch12-mq-collab.xml:93 1.17507 +#: ../en/ch13-mq-collab.xml:93 1.17508 msgid "" 1.17509 "These approaches have the added weakness of making it difficult to generate " 1.17510 "well-formed patches to submit upstream." 1.17511 msgstr "" 1.17512 1.17513 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17514 -#: ../en/ch12-mq-collab.xml:97 1.17515 +#: ../en/ch13-mq-collab.xml:97 1.17516 msgid "" 1.17517 "In principle, Mercurial Queues seems like a good candidate to manage a " 1.17518 "development scenario such as the above. While this is indeed the case, MQ " 1.17519 @@ -15573,12 +17233,12 @@ 1.17520 msgstr "" 1.17521 1.17522 #. type: Content of: <book><chapter><sect1><title> 1.17523 -#: ../en/ch12-mq-collab.xml:105 1.17524 +#: ../en/ch13-mq-collab.xml:105 1.17525 msgid "Conditionally applying patches with guards" 1.17526 msgstr "有条件的应用补丁" 1.17527 1.17528 #. type: Content of: <book><chapter><sect1><para> 1.17529 -#: ../en/ch12-mq-collab.xml:107 1.17530 +#: ../en/ch13-mq-collab.xml:107 1.17531 msgid "" 1.17532 "Perhaps the best way to maintain sanity with so many targets is to be able to " 1.17533 "choose specific patches to apply for a given situation. MQ provides a " 1.17534 @@ -15588,14 +17248,14 @@ 1.17535 msgstr "" 1.17536 1.17537 #. type: Content of: <book><chapter><sect1><para> 1.17538 -#: ../en/ch12-mq-collab.xml:116 1.17539 +#: ../en/ch13-mq-collab.xml:116 1.17540 msgid "" 1.17541 "This gives us a tiny repository that contains two patches that don't have any " 1.17542 "dependencies on each other, because they touch different files." 1.17543 msgstr "" 1.17544 1.17545 #. type: Content of: <book><chapter><sect1><para> 1.17546 -#: ../en/ch12-mq-collab.xml:120 1.17547 +#: ../en/ch13-mq-collab.xml:120 1.17548 msgid "" 1.17549 "The idea behind conditional application is that you can <quote>tag</quote> a " 1.17550 "patch with a <emphasis>guard</emphasis>, which is simply a text string of " 1.17551 @@ -15605,7 +17265,7 @@ 1.17552 msgstr "" 1.17553 1.17554 #. type: Content of: <book><chapter><sect1><para> 1.17555 -#: ../en/ch12-mq-collab.xml:127 1.17556 +#: ../en/ch13-mq-collab.xml:127 1.17557 msgid "" 1.17558 "A patch can have an arbitrary number of guards; each one is " 1.17559 "<emphasis>positive</emphasis> (<quote>apply this patch if this guard is " 1.17560 @@ -15614,12 +17274,12 @@ 1.17561 msgstr "" 1.17562 1.17563 #. type: Content of: <book><chapter><sect1><title> 1.17564 -#: ../en/ch12-mq-collab.xml:135 1.17565 +#: ../en/ch13-mq-collab.xml:135 1.17566 msgid "Controlling the guards on a patch" 1.17567 msgstr "控制补丁的应用条件" 1.17568 1.17569 #. type: Content of: <book><chapter><sect1><para> 1.17570 -#: ../en/ch12-mq-collab.xml:137 1.17571 +#: ../en/ch13-mq-collab.xml:137 1.17572 msgid "" 1.17573 "The <command role=\"hg-ext-mq\">qguard</command> command lets you determine " 1.17574 "which guards should apply to a patch, or display the guards that are already " 1.17575 @@ -15628,21 +17288,34 @@ 1.17576 msgstr "" 1.17577 1.17578 #. type: Content of: <book><chapter><sect1><para> 1.17579 -#: ../en/ch12-mq-collab.xml:144 1.17580 +#: ../en/ch13-mq-collab.xml:144 1.17581 msgid "" 1.17582 "To set a positive guard on a patch, prefix the name of the guard with a " 1.17583 "<quote><literal>+</literal></quote>." 1.17584 msgstr "" 1.17585 1.17586 #. type: Content of: <book><chapter><sect1><para> 1.17587 -#: ../en/ch12-mq-collab.xml:149 1.17588 +#: ../en/ch13-mq-collab.xml:149 1.17589 msgid "" 1.17590 "To set a negative guard on a patch, prefix the name of the guard with a " 1.17591 "<quote><literal>-</literal></quote>." 1.17592 msgstr "" 1.17593 1.17594 +#. type: Content of: <book><chapter><sect1><para> 1.17595 +#: ../en/ch13-mq-collab.xml:155 1.17596 +msgid "" 1.17597 +"Notice that we prefixed the arguments to the <command>hg qguard</command> " 1.17598 +"command with a <literal>--</literal> here, so that Mercurial would not " 1.17599 +"interpret the text <literal>-quux</literal> as an option." 1.17600 +msgstr "" 1.17601 + 1.17602 +#. type: Content of: <book><chapter><sect1><note><title> 1.17603 +#: ../en/ch13-mq-collab.xml:161 1.17604 +msgid "Setting vs. modifying" 1.17605 +msgstr "" 1.17606 + 1.17607 #. type: Content of: <book><chapter><sect1><note><para> 1.17608 -#: ../en/ch12-mq-collab.xml:156 1.17609 +#: ../en/ch13-mq-collab.xml:163 1.17610 msgid "" 1.17611 "The <command role=\"hg-ext-mq\">qguard</command> command <emphasis>sets</" 1.17612 "emphasis> the guards on a patch; it doesn't <emphasis>modify</emphasis> " 1.17613 @@ -15654,7 +17327,7 @@ 1.17614 1.17615 # 1.17616 #. type: Content of: <book><chapter><sect1><para> 1.17617 -#: ../en/ch12-mq-collab.xml:165 1.17618 +#: ../en/ch13-mq-collab.xml:172 1.17619 msgid "" 1.17620 "Mercurial stores guards in the <filename role=\"special\">series</filename> " 1.17621 "file; the form in which they are stored is easy both to understand and to " 1.17622 @@ -15664,12 +17337,12 @@ 1.17623 msgstr "" 1.17624 1.17625 #. type: Content of: <book><chapter><sect1><title> 1.17626 -#: ../en/ch12-mq-collab.xml:177 1.17627 +#: ../en/ch13-mq-collab.xml:184 1.17628 msgid "Selecting the guards to use" 1.17629 msgstr "选择使用的条件" 1.17630 1.17631 #. type: Content of: <book><chapter><sect1><para> 1.17632 -#: ../en/ch12-mq-collab.xml:179 1.17633 +#: ../en/ch13-mq-collab.xml:186 1.17634 msgid "" 1.17635 "The <command role=\"hg-ext-mq\">qselect</command> command determines which " 1.17636 "guards are active at a given time. The effect of this is to determine which " 1.17637 @@ -15679,7 +17352,7 @@ 1.17638 msgstr "" 1.17639 1.17640 #. type: Content of: <book><chapter><sect1><para> 1.17641 -#: ../en/ch12-mq-collab.xml:186 1.17642 +#: ../en/ch13-mq-collab.xml:193 1.17643 msgid "" 1.17644 "With no arguments, the <command role=\"hg-ext-mq\">qselect</command> command " 1.17645 "lists the guards currently in effect, one per line of output. Each argument " 1.17646 @@ -15687,21 +17360,21 @@ 1.17647 msgstr "" 1.17648 1.17649 #. type: Content of: <book><chapter><sect1><para> 1.17650 -#: ../en/ch12-mq-collab.xml:193 1.17651 +#: ../en/ch13-mq-collab.xml:200 1.17652 msgid "" 1.17653 "In case you're interested, the currently selected guards are stored in the " 1.17654 "<filename role=\"special\">guards</filename> file." 1.17655 msgstr "" 1.17656 1.17657 #. type: Content of: <book><chapter><sect1><para> 1.17658 -#: ../en/ch12-mq-collab.xml:198 1.17659 +#: ../en/ch13-mq-collab.xml:205 1.17660 msgid "" 1.17661 "We can see the effect the selected guards have when we run <command role=\"hg-" 1.17662 "ext-mq\">qpush</command>." 1.17663 msgstr "" 1.17664 1.17665 #. type: Content of: <book><chapter><sect1><para> 1.17666 -#: ../en/ch12-mq-collab.xml:203 1.17667 +#: ../en/ch13-mq-collab.xml:210 1.17668 msgid "" 1.17669 "A guard cannot start with a <quote><literal>+</literal></quote> or " 1.17670 "<quote><literal>-</literal></quote> character. The name of a guard must not " 1.17671 @@ -15710,61 +17383,61 @@ 1.17672 msgstr "" 1.17673 1.17674 #. type: Content of: <book><chapter><sect1><para> 1.17675 -#: ../en/ch12-mq-collab.xml:212 1.17676 +#: ../en/ch13-mq-collab.xml:219 1.17677 msgid "Changing the selected guards changes the patches that are applied." 1.17678 msgstr "" 1.17679 1.17680 #. type: Content of: <book><chapter><sect1><para> 1.17681 -#: ../en/ch12-mq-collab.xml:217 1.17682 +#: ../en/ch13-mq-collab.xml:224 1.17683 msgid "" 1.17684 "You can see in the example below that negative guards take precedence over " 1.17685 "positive guards." 1.17686 msgstr "" 1.17687 1.17688 #. type: Content of: <book><chapter><sect1><title> 1.17689 -#: ../en/ch12-mq-collab.xml:224 1.17690 +#: ../en/ch13-mq-collab.xml:231 1.17691 msgid "MQ's rules for applying patches" 1.17692 msgstr "MQ 应用补丁的规则" 1.17693 1.17694 #. type: Content of: <book><chapter><sect1><para> 1.17695 -#: ../en/ch12-mq-collab.xml:226 1.17696 +#: ../en/ch13-mq-collab.xml:233 1.17697 msgid "" 1.17698 "The rules that MQ uses when deciding whether to apply a patch are as follows." 1.17699 msgstr "" 1.17700 1.17701 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17702 -#: ../en/ch12-mq-collab.xml:229 1.17703 +#: ../en/ch13-mq-collab.xml:236 1.17704 msgid "A patch that has no guards is always applied." 1.17705 msgstr "" 1.17706 1.17707 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17708 -#: ../en/ch12-mq-collab.xml:232 1.17709 +#: ../en/ch13-mq-collab.xml:239 1.17710 msgid "" 1.17711 "If the patch has any negative guard that matches any currently selected " 1.17712 "guard, the patch is skipped." 1.17713 msgstr "" 1.17714 1.17715 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17716 -#: ../en/ch12-mq-collab.xml:235 1.17717 +#: ../en/ch13-mq-collab.xml:242 1.17718 msgid "" 1.17719 "If the patch has any positive guard that matches any currently selected " 1.17720 "guard, the patch is applied." 1.17721 msgstr "" 1.17722 1.17723 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17724 -#: ../en/ch12-mq-collab.xml:238 1.17725 +#: ../en/ch13-mq-collab.xml:245 1.17726 msgid "" 1.17727 "If the patch has positive or negative guards, but none matches any currently " 1.17728 "selected guard, the patch is skipped." 1.17729 msgstr "" 1.17730 1.17731 #. type: Content of: <book><chapter><sect1><title> 1.17732 -#: ../en/ch12-mq-collab.xml:245 1.17733 +#: ../en/ch13-mq-collab.xml:252 1.17734 msgid "Trimming the work environment" 1.17735 msgstr "修剪工作环境" 1.17736 1.17737 #. type: Content of: <book><chapter><sect1><para> 1.17738 -#: ../en/ch12-mq-collab.xml:247 1.17739 +#: ../en/ch13-mq-collab.xml:254 1.17740 msgid "" 1.17741 "In working on the device driver I mentioned earlier, I don't apply the " 1.17742 "patches to a normal Linux kernel tree. Instead, I use a repository that " 1.17743 @@ -15774,7 +17447,7 @@ 1.17744 msgstr "" 1.17745 1.17746 #. type: Content of: <book><chapter><sect1><para> 1.17747 -#: ../en/ch12-mq-collab.xml:254 1.17748 +#: ../en/ch13-mq-collab.xml:261 1.17749 msgid "" 1.17750 "I then choose a <quote>base</quote> version on top of which the patches are " 1.17751 "applied. This is a snapshot of the Linux kernel tree as of a revision of my " 1.17752 @@ -15786,7 +17459,7 @@ 1.17753 msgstr "" 1.17754 1.17755 #. type: Content of: <book><chapter><sect1><para> 1.17756 -#: ../en/ch12-mq-collab.xml:263 1.17757 +#: ../en/ch13-mq-collab.xml:270 1.17758 msgid "" 1.17759 "Normally, the base tree atop which the patches apply should be a snapshot of " 1.17760 "a very recent upstream tree. This best facilitates the development of " 1.17761 @@ -15794,12 +17467,12 @@ 1.17762 msgstr "" 1.17763 1.17764 #. type: Content of: <book><chapter><sect1><title> 1.17765 -#: ../en/ch12-mq-collab.xml:270 1.17766 +#: ../en/ch13-mq-collab.xml:277 1.17767 msgid "Dividing up the <filename role=\"special\">series</filename> file" 1.17768 msgstr "分类补丁<filename role=\"special\">系列</filename>" 1.17769 1.17770 #. type: Content of: <book><chapter><sect1><para> 1.17771 -#: ../en/ch12-mq-collab.xml:273 1.17772 +#: ../en/ch13-mq-collab.xml:280 1.17773 msgid "" 1.17774 "I categorise the patches in the <filename role=\"special\">series</filename> " 1.17775 "file into a number of logical groups. Each section of like patches begins " 1.17776 @@ -15808,14 +17481,14 @@ 1.17777 msgstr "" 1.17778 1.17779 #. type: Content of: <book><chapter><sect1><para> 1.17780 -#: ../en/ch12-mq-collab.xml:279 1.17781 +#: ../en/ch13-mq-collab.xml:286 1.17782 msgid "" 1.17783 "The sequence of patch groups that I maintain follows. The ordering of these " 1.17784 "groups is important; I'll describe why after I introduce the groups." 1.17785 msgstr "" 1.17786 1.17787 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17788 -#: ../en/ch12-mq-collab.xml:283 1.17789 +#: ../en/ch13-mq-collab.xml:290 1.17790 msgid "" 1.17791 "The <quote>accepted</quote> group. Patches that the development team has " 1.17792 "submitted to the maintainer of the Infiniband subsystem, and which he has " 1.17793 @@ -15826,14 +17499,14 @@ 1.17794 msgstr "" 1.17795 1.17796 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17797 -#: ../en/ch12-mq-collab.xml:291 1.17798 +#: ../en/ch13-mq-collab.xml:298 1.17799 msgid "" 1.17800 "The <quote>rework</quote> group. Patches that I have submitted, but that the " 1.17801 "upstream maintainer has requested modifications to before he will accept them." 1.17802 msgstr "" 1.17803 1.17804 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17805 -#: ../en/ch12-mq-collab.xml:296 1.17806 +#: ../en/ch13-mq-collab.xml:303 1.17807 msgid "" 1.17808 "The <quote>pending</quote> group. Patches that I have not yet submitted to " 1.17809 "the upstream maintainer, but which we have finished working on. These will be " 1.17810 @@ -15844,21 +17517,21 @@ 1.17811 msgstr "" 1.17812 1.17813 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17814 -#: ../en/ch12-mq-collab.xml:305 1.17815 +#: ../en/ch13-mq-collab.xml:312 1.17816 msgid "" 1.17817 "The <quote>in progress</quote> group. Patches that are actively being " 1.17818 "developed, and should not be submitted anywhere yet." 1.17819 msgstr "" 1.17820 1.17821 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17822 -#: ../en/ch12-mq-collab.xml:309 1.17823 +#: ../en/ch13-mq-collab.xml:316 1.17824 msgid "" 1.17825 "The <quote>backport</quote> group. Patches that adapt the source tree to " 1.17826 "older versions of the kernel tree." 1.17827 msgstr "" 1.17828 1.17829 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17830 -#: ../en/ch12-mq-collab.xml:313 1.17831 +#: ../en/ch13-mq-collab.xml:320 1.17832 msgid "" 1.17833 "The <quote>do not ship</quote> group. Patches that for some reason should " 1.17834 "never be submitted upstream. For example, one such patch might change " 1.17835 @@ -15868,7 +17541,7 @@ 1.17836 msgstr "" 1.17837 1.17838 #. type: Content of: <book><chapter><sect1><para> 1.17839 -#: ../en/ch12-mq-collab.xml:321 1.17840 +#: ../en/ch13-mq-collab.xml:328 1.17841 msgid "" 1.17842 "Now to return to the reasons for ordering groups of patches in this way. We " 1.17843 "would like the lowest patches in the stack to be as stable as possible, so " 1.17844 @@ -15878,7 +17551,7 @@ 1.17845 msgstr "" 1.17846 1.17847 #. type: Content of: <book><chapter><sect1><para> 1.17848 -#: ../en/ch12-mq-collab.xml:329 1.17849 +#: ../en/ch13-mq-collab.xml:336 1.17850 msgid "" 1.17851 "We would also like the patches that we know we'll need to modify to be " 1.17852 "applied on top of a source tree that resembles the upstream tree as closely " 1.17853 @@ -15886,7 +17559,7 @@ 1.17854 msgstr "" 1.17855 1.17856 #. type: Content of: <book><chapter><sect1><para> 1.17857 -#: ../en/ch12-mq-collab.xml:334 1.17858 +#: ../en/ch13-mq-collab.xml:341 1.17859 msgid "" 1.17860 "The <quote>backport</quote> and <quote>do not ship</quote> patches float at " 1.17861 "the end of the <filename role=\"special\">series</filename> file. The " 1.17862 @@ -15895,19 +17568,19 @@ 1.17863 msgstr "" 1.17864 1.17865 #. type: Content of: <book><chapter><sect1><title> 1.17866 -#: ../en/ch12-mq-collab.xml:343 1.17867 +#: ../en/ch13-mq-collab.xml:350 1.17868 msgid "Maintaining the patch series" 1.17869 msgstr "维护补丁系列" 1.17870 1.17871 #. type: Content of: <book><chapter><sect1><para> 1.17872 -#: ../en/ch12-mq-collab.xml:345 1.17873 +#: ../en/ch13-mq-collab.xml:352 1.17874 msgid "" 1.17875 "In my work, I use a number of guards to control which patches are to be " 1.17876 "applied." 1.17877 msgstr "" 1.17878 1.17879 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17880 -#: ../en/ch12-mq-collab.xml:349 1.17881 +#: ../en/ch13-mq-collab.xml:356 1.17882 msgid "" 1.17883 "<quote>Accepted</quote> patches are guarded with <literal>accepted</" 1.17884 "literal>. I enable this guard most of the time. When I'm applying the " 1.17885 @@ -15916,7 +17589,7 @@ 1.17886 msgstr "" 1.17887 1.17888 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17889 -#: ../en/ch12-mq-collab.xml:356 1.17890 +#: ../en/ch13-mq-collab.xml:363 1.17891 msgid "" 1.17892 "Patches that are <quote>finished</quote>, but not yet submitted, have no " 1.17893 "guards. If I'm applying the patch stack to a copy of the upstream tree, I " 1.17894 @@ -15924,21 +17597,21 @@ 1.17895 msgstr "" 1.17896 1.17897 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17898 -#: ../en/ch12-mq-collab.xml:362 1.17899 +#: ../en/ch13-mq-collab.xml:369 1.17900 msgid "" 1.17901 "Those patches that need reworking before being resubmitted are guarded with " 1.17902 "<literal>rework</literal>." 1.17903 msgstr "" 1.17904 1.17905 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17906 -#: ../en/ch12-mq-collab.xml:366 1.17907 +#: ../en/ch13-mq-collab.xml:373 1.17908 msgid "" 1.17909 "For those patches that are still under development, I use <literal>devel</" 1.17910 "literal>." 1.17911 msgstr "" 1.17912 1.17913 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.17914 -#: ../en/ch12-mq-collab.xml:369 1.17915 +#: ../en/ch13-mq-collab.xml:376 1.17916 msgid "" 1.17917 "A backport patch may have several guards, one for each version of the kernel " 1.17918 "to which it applies. For example, a patch that backports a piece of code to " 1.17919 @@ -15946,7 +17619,7 @@ 1.17920 msgstr "" 1.17921 1.17922 #. type: Content of: <book><chapter><sect1><para> 1.17923 -#: ../en/ch12-mq-collab.xml:374 1.17924 +#: ../en/ch13-mq-collab.xml:381 1.17925 msgid "" 1.17926 "This variety of guards gives me considerable flexibility in determining what " 1.17927 "kind of source tree I want to end up with. For most situations, the " 1.17928 @@ -15955,12 +17628,12 @@ 1.17929 msgstr "" 1.17930 1.17931 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17932 -#: ../en/ch12-mq-collab.xml:381 1.17933 +#: ../en/ch13-mq-collab.xml:388 1.17934 msgid "The art of writing backport patches" 1.17935 msgstr "编写向后移植补丁的艺术" 1.17936 1.17937 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17938 -#: ../en/ch12-mq-collab.xml:383 1.17939 +#: ../en/ch13-mq-collab.xml:390 1.17940 msgid "" 1.17941 "Using MQ, writing a backport patch is a simple process. All such a patch has " 1.17942 "to do is modify a piece of code that uses a kernel feature not present in the " 1.17943 @@ -15969,7 +17642,7 @@ 1.17944 msgstr "" 1.17945 1.17946 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17947 -#: ../en/ch12-mq-collab.xml:389 1.17948 +#: ../en/ch13-mq-collab.xml:396 1.17949 msgid "" 1.17950 "A useful goal when writing a good backport patch is to make your code look as " 1.17951 "if it was written for the older version of the kernel you're targeting. The " 1.17952 @@ -15983,7 +17656,7 @@ 1.17953 msgstr "" 1.17954 1.17955 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17956 -#: ../en/ch12-mq-collab.xml:402 1.17957 +#: ../en/ch13-mq-collab.xml:409 1.17958 msgid "" 1.17959 "There are two reasons to divide backport patches into a distinct group, away " 1.17960 "from the <quote>regular</quote> patches whose effects they modify. The first " 1.17961 @@ -15996,17 +17669,17 @@ 1.17962 msgstr "" 1.17963 1.17964 #. type: Content of: <book><chapter><sect1><title> 1.17965 -#: ../en/ch12-mq-collab.xml:417 1.17966 +#: ../en/ch13-mq-collab.xml:424 1.17967 msgid "Useful tips for developing with MQ" 1.17968 msgstr "使用 MQ 开发的技巧" 1.17969 1.17970 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17971 -#: ../en/ch12-mq-collab.xml:420 1.17972 +#: ../en/ch13-mq-collab.xml:427 1.17973 msgid "Organising patches in directories" 1.17974 msgstr "将补丁放到几个目录中" 1.17975 1.17976 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17977 -#: ../en/ch12-mq-collab.xml:422 1.17978 +#: ../en/ch13-mq-collab.xml:429 1.17979 msgid "" 1.17980 "If you're working on a substantial project with MQ, it's not difficult to " 1.17981 "accumulate a large number of patches. For example, I have one patch " 1.17982 @@ -16014,7 +17687,7 @@ 1.17983 msgstr "" 1.17984 1.17985 #. type: Content of: <book><chapter><sect1><sect2><para> 1.17986 -#: ../en/ch12-mq-collab.xml:427 1.17987 +#: ../en/ch13-mq-collab.xml:434 1.17988 msgid "" 1.17989 "If you can group these patches into separate logical categories, you can if " 1.17990 "you like store them in different directories; MQ has no problems with patch " 1.17991 @@ -16022,12 +17695,12 @@ 1.17992 msgstr "" 1.17993 1.17994 #. type: Content of: <book><chapter><sect1><sect2><title> 1.17995 -#: ../en/ch12-mq-collab.xml:434 1.17996 +#: ../en/ch13-mq-collab.xml:441 1.17997 msgid "Viewing the history of a patch" 1.17998 msgstr "察看补丁的历史" 1.17999 1.18000 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18001 -#: ../en/ch12-mq-collab.xml:436 1.18002 +#: ../en/ch13-mq-collab.xml:443 1.18003 msgid "" 1.18004 "If you're developing a set of patches over a long time, it's a good idea to " 1.18005 "maintain them in a repository, as discussed in <xref linkend=\"sec:mq:repo\"/" 1.18006 @@ -16040,7 +17713,7 @@ 1.18007 msgstr "" 1.18008 1.18009 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18010 -#: ../en/ch12-mq-collab.xml:448 1.18011 +#: ../en/ch13-mq-collab.xml:455 1.18012 msgid "" 1.18013 "However, you can use the <literal role=\"hg-ext\">extdiff</literal> " 1.18014 "extension, which is bundled with Mercurial, to turn a diff of two versions of " 1.18015 @@ -16053,7 +17726,7 @@ 1.18016 msgstr "" 1.18017 1.18018 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18019 -#: ../en/ch12-mq-collab.xml:459 1.18020 +#: ../en/ch13-mq-collab.xml:466 1.18021 msgid "" 1.18022 "You can enable the <literal role=\"hg-ext\">extdiff</literal> extension in " 1.18023 "the usual way, by adding a line to the <literal role=\"rc-extensions" 1.18024 @@ -16062,9 +17735,9 @@ 1.18025 msgstr "" 1.18026 1.18027 # 1.18028 -#. &example.hg-interdiff; 1.18029 -#. type: Content of: <book><chapter><sect1><sect2><para> 1.18030 -#: ../en/ch12-mq-collab.xml:466 1.18031 +#. &example.hg-interdiff; 1.18032 +#. type: Content of: <book><chapter><sect1><sect2><para> 1.18033 +#: ../en/ch13-mq-collab.xml:473 1.18034 msgid "" 1.18035 "The <command>interdiff</command> command expects to be passed the names of " 1.18036 "two files, but the <literal role=\"hg-ext\">extdiff</literal> extension " 1.18037 @@ -16077,7 +17750,7 @@ 1.18038 msgstr "" 1.18039 1.18040 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18041 -#: ../en/ch12-mq-collab.xml:478 1.18042 +#: ../en/ch13-mq-collab.xml:485 1.18043 msgid "" 1.18044 "With the <filename role=\"special\">hg-interdiff</filename> program in your " 1.18045 "shell's search path, you can run it as follows, from inside an MQ patch " 1.18046 @@ -16085,7 +17758,7 @@ 1.18047 msgstr "" 1.18048 1.18049 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18050 -#: ../en/ch12-mq-collab.xml:482 1.18051 +#: ../en/ch13-mq-collab.xml:489 1.18052 msgid "" 1.18053 "Since you'll probably want to use this long-winded command a lot, you can get " 1.18054 "<literal role=\"hg-ext\">hgext</literal> to make it available as a normal " 1.18055 @@ -16094,7 +17767,7 @@ 1.18056 msgstr "" 1.18057 1.18058 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18059 -#: ../en/ch12-mq-collab.xml:489 1.18060 +#: ../en/ch13-mq-collab.xml:496 1.18061 msgid "" 1.18062 "This directs <literal role=\"hg-ext\">hgext</literal> to make an " 1.18063 "<literal>interdiff</literal> command available, so you can now shorten the " 1.18064 @@ -16103,7 +17776,7 @@ 1.18065 msgstr "" 1.18066 1.18067 #. type: Content of: <book><chapter><sect1><sect2><note><para> 1.18068 -#: ../en/ch12-mq-collab.xml:497 1.18069 +#: ../en/ch13-mq-collab.xml:504 1.18070 msgid "" 1.18071 "The <command>interdiff</command> command works well only if the underlying " 1.18072 "files against which versions of a patch are generated remain the same. If " 1.18073 @@ -16112,7 +17785,7 @@ 1.18074 msgstr "" 1.18075 1.18076 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18077 -#: ../en/ch12-mq-collab.xml:505 1.18078 +#: ../en/ch13-mq-collab.xml:512 1.18079 msgid "" 1.18080 "The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more " 1.18081 "than merely improving the presentation of MQ patches. To read more about it, " 1.18082 @@ -16120,12 +17793,12 @@ 1.18083 msgstr "" 1.18084 1.18085 #. type: Content of: <book><chapter><title> 1.18086 -#: ../en/ch13-hgext.xml:5 1.18087 +#: ../en/ch14-hgext.xml:5 1.18088 msgid "Adding functionality with extensions" 1.18089 msgstr "使用扩展增加功能" 1.18090 1.18091 #. type: Content of: <book><chapter><para> 1.18092 -#: ../en/ch13-hgext.xml:7 1.18093 +#: ../en/ch14-hgext.xml:7 1.18094 msgid "" 1.18095 "While the core of Mercurial is quite complete from a functionality " 1.18096 "standpoint, it's deliberately shorn of fancy features. This approach of " 1.18097 @@ -16134,7 +17807,7 @@ 1.18098 msgstr "" 1.18099 1.18100 #. type: Content of: <book><chapter><para> 1.18101 -#: ../en/ch13-hgext.xml:12 1.18102 +#: ../en/ch14-hgext.xml:12 1.18103 msgid "" 1.18104 "However, Mercurial doesn't box you in with an inflexible command set: you can " 1.18105 "add features to it as <emphasis>extensions</emphasis> (sometimes known as " 1.18106 @@ -16143,7 +17816,7 @@ 1.18107 msgstr "" 1.18108 1.18109 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 1.18110 -#: ../en/ch13-hgext.xml:18 1.18111 +#: ../en/ch14-hgext.xml:18 1.18112 msgid "" 1.18113 "<xref linkend=\"sec:tour-merge:fetch\"/> covers the <literal role=\"hg-ext" 1.18114 "\">fetch</literal> extension; this combines pulling new changes and merging " 1.18115 @@ -16152,7 +17825,7 @@ 1.18116 msgstr "" 1.18117 1.18118 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 1.18119 -#: ../en/ch13-hgext.xml:24 1.18120 +#: ../en/ch14-hgext.xml:24 1.18121 msgid "" 1.18122 "In <xref linkend=\"chap:hook\"/>, we covered several extensions that are " 1.18123 "useful for hook-related functionality: <literal role=\"hg-ext\">acl</literal> " 1.18124 @@ -16162,7 +17835,7 @@ 1.18125 msgstr "" 1.18126 1.18127 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 1.18128 -#: ../en/ch13-hgext.xml:33 1.18129 +#: ../en/ch14-hgext.xml:33 1.18130 msgid "" 1.18131 "The Mercurial Queues patch management extension is so invaluable that it " 1.18132 "merits two chapters and an appendix all to itself. <xref linkend=\"chap:mq\"/" 1.18133 @@ -16171,7 +17844,7 @@ 1.18134 msgstr "" 1.18135 1.18136 #. type: Content of: <book><chapter><para> 1.18137 -#: ../en/ch13-hgext.xml:43 1.18138 +#: ../en/ch14-hgext.xml:43 1.18139 msgid "" 1.18140 "In this chapter, we'll cover some of the other extensions that are available " 1.18141 "for Mercurial, and briefly touch on some of the machinery you'll need to know " 1.18142 @@ -16179,7 +17852,7 @@ 1.18143 msgstr "" 1.18144 1.18145 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 1.18146 -#: ../en/ch13-hgext.xml:48 1.18147 +#: ../en/ch14-hgext.xml:48 1.18148 msgid "" 1.18149 "In <xref linkend=\"sec:hgext:inotify\"/>, we'll discuss the possibility of " 1.18150 "<emphasis>huge</emphasis> performance improvements using the <literal role=" 1.18151 @@ -16187,21 +17860,21 @@ 1.18152 msgstr "" 1.18153 1.18154 #. type: Content of: <book><chapter><sect1><title> 1.18155 -#: ../en/ch13-hgext.xml:55 1.18156 +#: ../en/ch14-hgext.xml:55 1.18157 msgid "" 1.18158 "Improve performance with the <literal role=\"hg-ext\">inotify</literal> " 1.18159 "extension" 1.18160 msgstr "使用扩展 <literal role=\"hg-ext\">inotify</literal> 以提高性能" 1.18161 1.18162 #. type: Content of: <book><chapter><sect1><para> 1.18163 -#: ../en/ch13-hgext.xml:58 1.18164 +#: ../en/ch14-hgext.xml:58 1.18165 msgid "" 1.18166 "Are you interested in having some of the most common Mercurial operations run " 1.18167 "as much as a hundred times faster? Read on!" 1.18168 msgstr "" 1.18169 1.18170 #. type: Content of: <book><chapter><sect1><para> 1.18171 -#: ../en/ch13-hgext.xml:62 1.18172 +#: ../en/ch14-hgext.xml:62 1.18173 msgid "" 1.18174 "Mercurial has great performance under normal circumstances. For example, " 1.18175 "when you run the <command role=\"hg-cmd\">hg status</command> command, " 1.18176 @@ -16213,7 +17886,7 @@ 1.18177 msgstr "" 1.18178 1.18179 #. type: Content of: <book><chapter><sect1><para> 1.18180 -#: ../en/ch13-hgext.xml:72 1.18181 +#: ../en/ch14-hgext.xml:72 1.18182 msgid "" 1.18183 "Because obtaining file status is crucial to good performance, the authors of " 1.18184 "Mercurial have optimised this code to within an inch of its life. However, " 1.18185 @@ -16225,7 +17898,7 @@ 1.18186 msgstr "" 1.18187 1.18188 #. type: Content of: <book><chapter><sect1><para> 1.18189 -#: ../en/ch13-hgext.xml:82 1.18190 +#: ../en/ch14-hgext.xml:82 1.18191 msgid "" 1.18192 "To put a number on the magnitude of this effect, I created a repository " 1.18193 "containing 150,000 managed files. I timed <command role=\"hg-cmd\">hg " 1.18194 @@ -16234,7 +17907,7 @@ 1.18195 msgstr "" 1.18196 1.18197 #. type: Content of: <book><chapter><sect1><para> 1.18198 -#: ../en/ch13-hgext.xml:88 1.18199 +#: ../en/ch14-hgext.xml:88 1.18200 msgid "" 1.18201 "Many modern operating systems contain a file notification facility. If a " 1.18202 "program signs up to an appropriate service, the operating system will notify " 1.18203 @@ -16244,7 +17917,7 @@ 1.18204 msgstr "" 1.18205 1.18206 #. type: Content of: <book><chapter><sect1><para> 1.18207 -#: ../en/ch13-hgext.xml:95 1.18208 +#: ../en/ch14-hgext.xml:95 1.18209 msgid "" 1.18210 "Mercurial's <literal role=\"hg-ext\">inotify</literal> extension talks to the " 1.18211 "kernel's <literal>inotify</literal> component to optimise <command role=\"hg-" 1.18212 @@ -16259,7 +17932,7 @@ 1.18213 msgstr "" 1.18214 1.18215 #. type: Content of: <book><chapter><sect1><para> 1.18216 -#: ../en/ch13-hgext.xml:108 1.18217 +#: ../en/ch14-hgext.xml:108 1.18218 msgid "" 1.18219 "Recall the ten seconds that I measured plain Mercurial as taking to run " 1.18220 "<command role=\"hg-cmd\">hg status</command> on a 150,000 file repository. " 1.18221 @@ -16269,12 +17942,12 @@ 1.18222 msgstr "" 1.18223 1.18224 #. type: Content of: <book><chapter><sect1><para> 1.18225 -#: ../en/ch13-hgext.xml:115 1.18226 +#: ../en/ch14-hgext.xml:115 1.18227 msgid "Before we continue, please pay attention to some caveats." 1.18228 msgstr "" 1.18229 1.18230 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.18231 -#: ../en/ch13-hgext.xml:118 1.18232 +#: ../en/ch14-hgext.xml:118 1.18233 msgid "" 1.18234 "The <literal role=\"hg-ext\">inotify</literal> extension is Linux-specific. " 1.18235 "Because it interfaces directly to the Linux kernel's <literal>inotify</" 1.18236 @@ -16282,7 +17955,7 @@ 1.18237 msgstr "" 1.18238 1.18239 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.18240 -#: ../en/ch13-hgext.xml:123 1.18241 +#: ../en/ch14-hgext.xml:123 1.18242 msgid "" 1.18243 "It should work on any Linux distribution that was released after early 2005. " 1.18244 "Older distributions are likely to have a kernel that lacks <literal>inotify</" 1.18245 @@ -16291,7 +17964,7 @@ 1.18246 msgstr "" 1.18247 1.18248 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 1.18249 -#: ../en/ch13-hgext.xml:130 1.18250 +#: ../en/ch14-hgext.xml:130 1.18251 msgid "" 1.18252 "Not all filesystems are suitable for use with the <literal role=\"hg-ext" 1.18253 "\">inotify</literal> extension. Network filesystems such as NFS are a non-" 1.18254 @@ -16303,7 +17976,7 @@ 1.18255 msgstr "" 1.18256 1.18257 #. type: Content of: <book><chapter><sect1><para> 1.18258 -#: ../en/ch13-hgext.xml:141 1.18259 +#: ../en/ch14-hgext.xml:141 1.18260 msgid "" 1.18261 "The <literal role=\"hg-ext\">inotify</literal> extension is not yet shipped " 1.18262 "with Mercurial as of May 2007, so it's a little more involved to set up than " 1.18263 @@ -16311,7 +17984,7 @@ 1.18264 msgstr "" 1.18265 1.18266 #. type: Content of: <book><chapter><sect1><para> 1.18267 -#: ../en/ch13-hgext.xml:146 1.18268 +#: ../en/ch14-hgext.xml:146 1.18269 msgid "" 1.18270 "The extension currently comes in two parts: a set of patches to the Mercurial " 1.18271 "source code, and a library of Python bindings to the <literal>inotify</" 1.18272 @@ -16319,7 +17992,7 @@ 1.18273 msgstr "" 1.18274 1.18275 #. type: Content of: <book><chapter><sect1><note><para> 1.18276 -#: ../en/ch13-hgext.xml:150 1.18277 +#: ../en/ch14-hgext.xml:150 1.18278 msgid "" 1.18279 "There are <emphasis>two</emphasis> Python <literal>inotify</literal> binding " 1.18280 "libraries. One of them is called <literal>pyinotify</literal>, and is " 1.18281 @@ -16329,14 +18002,14 @@ 1.18282 msgstr "" 1.18283 1.18284 #. type: Content of: <book><chapter><sect1><para> 1.18285 -#: ../en/ch13-hgext.xml:157 1.18286 +#: ../en/ch14-hgext.xml:157 1.18287 msgid "" 1.18288 "To get going, it's best to already have a functioning copy of Mercurial " 1.18289 "installed." 1.18290 msgstr "" 1.18291 1.18292 #. type: Content of: <book><chapter><sect1><note><para> 1.18293 -#: ../en/ch13-hgext.xml:160 1.18294 +#: ../en/ch14-hgext.xml:160 1.18295 msgid "" 1.18296 "If you follow the instructions below, you'll be <emphasis>replacing</" 1.18297 "emphasis> and overwriting any existing installation of Mercurial that you " 1.18298 @@ -16345,14 +18018,14 @@ 1.18299 msgstr "" 1.18300 1.18301 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18302 -#: ../en/ch13-hgext.xml:167 1.18303 +#: ../en/ch14-hgext.xml:167 1.18304 msgid "" 1.18305 "Clone the Python <literal>inotify</literal> binding repository. Build and " 1.18306 "install it." 1.18307 msgstr "" 1.18308 1.18309 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18310 -#: ../en/ch13-hgext.xml:174 1.18311 +#: ../en/ch14-hgext.xml:174 1.18312 msgid "" 1.18313 "Clone the <filename class=\"directory\">crew</filename> Mercurial " 1.18314 "repository. Clone the <literal role=\"hg-ext\">inotify</literal> patch " 1.18315 @@ -16361,7 +18034,7 @@ 1.18316 msgstr "" 1.18317 1.18318 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18319 -#: ../en/ch13-hgext.xml:184 1.18320 +#: ../en/ch14-hgext.xml:184 1.18321 msgid "" 1.18322 "Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext" 1.18323 "\">mq</literal>, enabled. If you've never used MQ, read <xref linkend=\"sec:" 1.18324 @@ -16369,7 +18042,7 @@ 1.18325 msgstr "" 1.18326 1.18327 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18328 -#: ../en/ch13-hgext.xml:190 1.18329 +#: ../en/ch14-hgext.xml:190 1.18330 msgid "" 1.18331 "Go into the <filename class=\"directory\">inotify</filename> repo, and apply " 1.18332 "all of the <literal role=\"hg-ext\">inotify</literal> patches using the " 1.18333 @@ -16378,19 +18051,19 @@ 1.18334 msgstr "" 1.18335 1.18336 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18337 -#: ../en/ch13-hgext.xml:199 1.18338 +#: ../en/ch14-hgext.xml:199 1.18339 msgid "" 1.18340 "If you get an error message from <command role=\"hg-ext-mq\">qpush</command>, " 1.18341 "you should not continue. Instead, ask for help." 1.18342 msgstr "" 1.18343 1.18344 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 1.18345 -#: ../en/ch13-hgext.xml:203 1.18346 +#: ../en/ch14-hgext.xml:203 1.18347 msgid "Build and install the patched version of Mercurial." 1.18348 msgstr "" 1.18349 1.18350 #. type: Content of: <book><chapter><sect1><para> 1.18351 -#: ../en/ch13-hgext.xml:209 1.18352 +#: ../en/ch14-hgext.xml:209 1.18353 msgid "" 1.18354 "Once you've build a suitably patched version of Mercurial, all you need to do " 1.18355 "to enable the <literal role=\"hg-ext\">inotify</literal> extension is add an " 1.18356 @@ -16398,7 +18071,7 @@ 1.18357 msgstr "" 1.18358 1.18359 #. type: Content of: <book><chapter><sect1><para> 1.18360 -#: ../en/ch13-hgext.xml:214 1.18361 +#: ../en/ch14-hgext.xml:214 1.18362 msgid "" 1.18363 "When the <literal role=\"hg-ext\">inotify</literal> extension is enabled, " 1.18364 "Mercurial will automatically and transparently start the status daemon the " 1.18365 @@ -16407,7 +18080,7 @@ 1.18366 msgstr "" 1.18367 1.18368 #. type: Content of: <book><chapter><sect1><para> 1.18369 -#: ../en/ch13-hgext.xml:220 1.18370 +#: ../en/ch14-hgext.xml:220 1.18371 msgid "" 1.18372 "The status daemon is started silently, and runs in the background. If you " 1.18373 "look at a list of running processes after you've enabled the <literal role=" 1.18374 @@ -16417,7 +18090,7 @@ 1.18375 msgstr "" 1.18376 1.18377 #. type: Content of: <book><chapter><sect1><para> 1.18378 -#: ../en/ch13-hgext.xml:228 1.18379 +#: ../en/ch14-hgext.xml:228 1.18380 msgid "" 1.18381 "The first time you run a Mercurial command in a repository when you have the " 1.18382 "<literal role=\"hg-ext\">inotify</literal> extension enabled, it will run " 1.18383 @@ -16433,7 +18106,7 @@ 1.18384 msgstr "" 1.18385 1.18386 #. type: Content of: <book><chapter><sect1><para> 1.18387 -#: ../en/ch13-hgext.xml:242 1.18388 +#: ../en/ch14-hgext.xml:242 1.18389 msgid "" 1.18390 "If you like, you can manually start a status daemon using the <command role=" 1.18391 "\"hg-ext-inotify\">inserve</command> command. This gives you slightly finer " 1.18392 @@ -16443,7 +18116,7 @@ 1.18393 msgstr "" 1.18394 1.18395 #. type: Content of: <book><chapter><sect1><para> 1.18396 -#: ../en/ch13-hgext.xml:249 1.18397 +#: ../en/ch14-hgext.xml:249 1.18398 msgid "" 1.18399 "When you're using the <literal role=\"hg-ext\">inotify</literal> extension, " 1.18400 "you should notice <emphasis>no difference at all</emphasis> in Mercurial's " 1.18401 @@ -16454,14 +18127,14 @@ 1.18402 msgstr "" 1.18403 1.18404 #. type: Content of: <book><chapter><sect1><title> 1.18405 -#: ../en/ch13-hgext.xml:260 1.18406 +#: ../en/ch14-hgext.xml:260 1.18407 msgid "" 1.18408 "Flexible diff support with the <literal role=\"hg-ext\">extdiff</literal> " 1.18409 "extension" 1.18410 msgstr "使用扩展 <literal role=\"hg-ext\">extdiff</literal> 以扩展差异支持" 1.18411 1.18412 #. type: Content of: <book><chapter><sect1><para> 1.18413 -#: ../en/ch13-hgext.xml:263 1.18414 +#: ../en/ch14-hgext.xml:263 1.18415 msgid "" 1.18416 "Mercurial's built-in <command role=\"hg-cmd\">hg diff</command> command " 1.18417 "outputs plaintext unified diffs." 1.18418 @@ -16470,7 +18143,7 @@ 1.18419 "不同。" 1.18420 1.18421 #. type: Content of: <book><chapter><sect1><para> 1.18422 -#: ../en/ch13-hgext.xml:268 1.18423 +#: ../en/ch14-hgext.xml:268 1.18424 msgid "" 1.18425 "If you would like to use an external tool to display modifications, you'll " 1.18426 "want to use the <literal role=\"hg-ext\">extdiff</literal> extension. This " 1.18427 @@ -16478,7 +18151,7 @@ 1.18428 msgstr "" 1.18429 1.18430 #. type: Content of: <book><chapter><sect1><para> 1.18431 -#: ../en/ch13-hgext.xml:273 1.18432 +#: ../en/ch14-hgext.xml:273 1.18433 msgid "" 1.18434 "The <literal role=\"hg-ext\">extdiff</literal> extension is bundled with " 1.18435 "Mercurial, so it's easy to set up. In the <literal role=\"rc-extensions" 1.18436 @@ -16487,7 +18160,7 @@ 1.18437 msgstr "" 1.18438 1.18439 #. type: Content of: <book><chapter><sect1><para> 1.18440 -#: ../en/ch13-hgext.xml:280 1.18441 +#: ../en/ch14-hgext.xml:280 1.18442 msgid "" 1.18443 "This introduces a command named <command role=\"hg-ext-extdiff\">extdiff</" 1.18444 "command>, which by default uses your system's <command>diff</command> command " 1.18445 @@ -16496,7 +18169,7 @@ 1.18446 msgstr "" 1.18447 1.18448 #. type: Content of: <book><chapter><sect1><para> 1.18449 -#: ../en/ch13-hgext.xml:288 1.18450 +#: ../en/ch14-hgext.xml:288 1.18451 msgid "" 1.18452 "The result won't be exactly the same as with the built-in <command role=\"hg-" 1.18453 "cmd\">hg diff</command> variations, because the output of <command>diff</" 1.18454 @@ -16504,7 +18177,7 @@ 1.18455 msgstr "" 1.18456 1.18457 #. type: Content of: <book><chapter><sect1><para> 1.18458 -#: ../en/ch13-hgext.xml:293 1.18459 +#: ../en/ch14-hgext.xml:293 1.18460 msgid "" 1.18461 "As the <quote><literal>making snapshot</literal></quote> lines of output " 1.18462 "above imply, the <command role=\"hg-ext-extdiff\">extdiff</command> command " 1.18463 @@ -16518,7 +18191,7 @@ 1.18464 msgstr "" 1.18465 1.18466 #. type: Content of: <book><chapter><sect1><para> 1.18467 -#: ../en/ch13-hgext.xml:306 1.18468 +#: ../en/ch14-hgext.xml:306 1.18469 msgid "" 1.18470 "Snapshot directory names have the same base name as your repository. If your " 1.18471 "repository path is <filename class=\"directory\">/quux/bar/foo</filename>, " 1.18472 @@ -16535,7 +18208,7 @@ 1.18473 msgstr "" 1.18474 1.18475 #. type: Content of: <book><chapter><sect1><para> 1.18476 -#: ../en/ch13-hgext.xml:322 1.18477 +#: ../en/ch14-hgext.xml:322 1.18478 msgid "" 1.18479 "The <command role=\"hg-ext-extdiff\">extdiff</command> command accepts two " 1.18480 "important options. The <option role=\"hg-ext-extdiff-cmd-extdiff-opt\">hg -p</" 1.18481 @@ -16553,7 +18226,7 @@ 1.18482 1.18483 # 1.18484 #. type: Content of: <book><chapter><sect1><para> 1.18485 -#: ../en/ch13-hgext.xml:339 1.18486 +#: ../en/ch14-hgext.xml:339 1.18487 msgid "" 1.18488 "As an example, here's how to run the normal system <command>diff</command> " 1.18489 "command, getting it to generate context diffs (using the <option role=\"cmd-" 1.18490 @@ -16563,14 +18236,14 @@ 1.18491 msgstr "" 1.18492 1.18493 #. type: Content of: <book><chapter><sect1><para> 1.18494 -#: ../en/ch13-hgext.xml:348 1.18495 +#: ../en/ch14-hgext.xml:348 1.18496 msgid "" 1.18497 "Launching a visual diff tool is just as easy. Here's how to launch the " 1.18498 "<command>kdiff3</command> viewer." 1.18499 msgstr "" 1.18500 1.18501 #. type: Content of: <book><chapter><sect1><para> 1.18502 -#: ../en/ch13-hgext.xml:352 1.18503 +#: ../en/ch14-hgext.xml:352 1.18504 msgid "" 1.18505 "If your diff viewing command can't deal with directories, you can easily work " 1.18506 "around this with a little scripting. For an example of such scripting in " 1.18507 @@ -16580,12 +18253,12 @@ 1.18508 msgstr "" 1.18509 1.18510 #. type: Content of: <book><chapter><sect1><sect2><title> 1.18511 -#: ../en/ch13-hgext.xml:360 1.18512 +#: ../en/ch14-hgext.xml:360 1.18513 msgid "Defining command aliases" 1.18514 msgstr "定义命令的别名" 1.18515 1.18516 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18517 -#: ../en/ch13-hgext.xml:362 1.18518 +#: ../en/ch14-hgext.xml:362 1.18519 msgid "" 1.18520 "It can be cumbersome to remember the options to both the <command role=\"hg-" 1.18521 "ext-extdiff\">extdiff</command> command and the diff viewer you want to use, " 1.18522 @@ -16595,7 +18268,7 @@ 1.18523 msgstr "" 1.18524 1.18525 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18526 -#: ../en/ch13-hgext.xml:369 1.18527 +#: ../en/ch14-hgext.xml:369 1.18528 msgid "" 1.18529 "All you need to do is edit your <filename role=\"special\">~/.hgrc</" 1.18530 "filename>, and add a section named <literal role=\"rc-extdiff\">extdiff</" 1.18531 @@ -16607,7 +18280,7 @@ 1.18532 msgstr "" 1.18533 1.18534 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18535 -#: ../en/ch13-hgext.xml:379 1.18536 +#: ../en/ch14-hgext.xml:379 1.18537 msgid "" 1.18538 "If you leave the right hand side of the definition empty, as above, the " 1.18539 "<literal role=\"hg-ext\">extdiff</literal> extension uses the name of the " 1.18540 @@ -16618,7 +18291,7 @@ 1.18541 msgstr "" 1.18542 1.18543 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18544 -#: ../en/ch13-hgext.xml:389 1.18545 +#: ../en/ch14-hgext.xml:389 1.18546 msgid "" 1.18547 "You can also specify the default options that you want to invoke your diff " 1.18548 "viewing program with. The prefix to use is <quote><literal>opts.</literal></" 1.18549 @@ -16628,19 +18301,19 @@ 1.18550 msgstr "" 1.18551 1.18552 #. type: Content of: <book><chapter><sect1><title> 1.18553 -#: ../en/ch13-hgext.xml:403 1.18554 +#: ../en/ch14-hgext.xml:403 1.18555 msgid "" 1.18556 "Cherrypicking changes with the <literal role=\"hg-ext\">transplant</literal> " 1.18557 "extension" 1.18558 msgstr "使用扩展 <literal role=\"hg-ext\">transplant</literal> 以挑选修改" 1.18559 1.18560 #. type: Content of: <book><chapter><sect1><para> 1.18561 -#: ../en/ch13-hgext.xml:406 1.18562 +#: ../en/ch14-hgext.xml:406 1.18563 msgid "Need to have a long chat with Brendan about this." 1.18564 msgstr "" 1.18565 1.18566 #. type: Content of: <book><chapter><sect1><title> 1.18567 -#: ../en/ch13-hgext.xml:410 1.18568 +#: ../en/ch14-hgext.xml:410 1.18569 msgid "" 1.18570 "Send changes via email with the <literal role=\"hg-ext\">patchbomb</literal> " 1.18571 "extension" 1.18572 @@ -16648,7 +18321,7 @@ 1.18573 "使用扩展 <literal role=\"hg-ext\">patchbomb</literal> 通过 email 发送修改" 1.18574 1.18575 #. type: Content of: <book><chapter><sect1><para> 1.18576 -#: ../en/ch13-hgext.xml:413 1.18577 +#: ../en/ch14-hgext.xml:413 1.18578 msgid "" 1.18579 "Many projects have a culture of <quote>change review</quote>, in which people " 1.18580 "send their modifications to a mailing list for others to read and comment on " 1.18581 @@ -16658,7 +18331,7 @@ 1.18582 msgstr "" 1.18583 1.18584 #. type: Content of: <book><chapter><sect1><para> 1.18585 -#: ../en/ch13-hgext.xml:421 1.18586 +#: ../en/ch14-hgext.xml:421 1.18587 msgid "" 1.18588 "Mercurial makes it easy to send changes over email for review or application, " 1.18589 "via its <literal role=\"hg-ext\">patchbomb</literal> extension. The " 1.18590 @@ -16669,7 +18342,7 @@ 1.18591 msgstr "" 1.18592 1.18593 #. type: Content of: <book><chapter><sect1><para> 1.18594 -#: ../en/ch13-hgext.xml:429 1.18595 +#: ../en/ch14-hgext.xml:429 1.18596 msgid "" 1.18597 "As usual, the basic configuration of the <literal role=\"hg-ext\">patchbomb</" 1.18598 "literal> extension takes just one or two lines in your <filename role=" 1.18599 @@ -16677,14 +18350,14 @@ 1.18600 msgstr "" 1.18601 1.18602 #. type: Content of: <book><chapter><sect1><para> 1.18603 -#: ../en/ch13-hgext.xml:435 1.18604 +#: ../en/ch14-hgext.xml:435 1.18605 msgid "" 1.18606 "Once you've enabled the extension, you will have a new command available, " 1.18607 "named <command role=\"hg-ext-patchbomb\">email</command>." 1.18608 msgstr "" 1.18609 1.18610 #. type: Content of: <book><chapter><sect1><para> 1.18611 -#: ../en/ch13-hgext.xml:439 1.18612 +#: ../en/ch14-hgext.xml:439 1.18613 msgid "" 1.18614 "The safest and best way to invoke the <command role=\"hg-ext-patchbomb" 1.18615 "\">email</command> command is to <emphasis>always</emphasis> run it first " 1.18616 @@ -16697,7 +18370,7 @@ 1.18617 msgstr "" 1.18618 1.18619 #. type: Content of: <book><chapter><sect1><para> 1.18620 -#: ../en/ch13-hgext.xml:450 1.18621 +#: ../en/ch14-hgext.xml:450 1.18622 msgid "" 1.18623 "The <command role=\"hg-ext-patchbomb\">email</command> command accepts the " 1.18624 "same kind of revision syntax as every other Mercurial command. For example, " 1.18625 @@ -16706,7 +18379,7 @@ 1.18626 msgstr "" 1.18627 1.18628 #. type: Content of: <book><chapter><sect1><para> 1.18629 -#: ../en/ch13-hgext.xml:455 1.18630 +#: ../en/ch14-hgext.xml:455 1.18631 msgid "" 1.18632 "You can also specify a <emphasis>repository</emphasis> to compare with. If " 1.18633 "you provide a repository but no revisions, the <command role=\"hg-ext-" 1.18634 @@ -16718,7 +18391,7 @@ 1.18635 msgstr "" 1.18636 1.18637 #. type: Content of: <book><chapter><sect1><para> 1.18638 -#: ../en/ch13-hgext.xml:464 1.18639 +#: ../en/ch14-hgext.xml:464 1.18640 msgid "" 1.18641 "It's perfectly safe to run the <command role=\"hg-ext-patchbomb\">email</" 1.18642 "command> command without the names of the people you want to send to: if you " 1.18643 @@ -16729,7 +18402,7 @@ 1.18644 msgstr "" 1.18645 1.18646 #. type: Content of: <book><chapter><sect1><para> 1.18647 -#: ../en/ch13-hgext.xml:472 1.18648 +#: ../en/ch14-hgext.xml:472 1.18649 msgid "" 1.18650 "When you are sending just one revision, the <command role=\"hg-ext-patchbomb" 1.18651 "\">email</command> command will by default use the first line of the " 1.18652 @@ -16737,7 +18410,7 @@ 1.18653 msgstr "" 1.18654 1.18655 #. type: Content of: <book><chapter><sect1><para> 1.18656 -#: ../en/ch13-hgext.xml:477 1.18657 +#: ../en/ch14-hgext.xml:477 1.18658 msgid "" 1.18659 "If you send multiple revisions, the <command role=\"hg-ext-patchbomb\">email</" 1.18660 "command> command will usually send one message per changeset. It will " 1.18661 @@ -16746,12 +18419,12 @@ 1.18662 msgstr "" 1.18663 1.18664 #. type: Content of: <book><chapter><sect1><sect2><title> 1.18665 -#: ../en/ch13-hgext.xml:484 1.18666 +#: ../en/ch14-hgext.xml:484 1.18667 msgid "Changing the behavior of patchbombs" 1.18668 msgstr "修改 patchbomb 的行为" 1.18669 1.18670 #. type: Content of: <book><chapter><sect1><sect2><para> 1.18671 -#: ../en/ch13-hgext.xml:486 1.18672 +#: ../en/ch14-hgext.xml:486 1.18673 msgid "" 1.18674 "Not every project has exactly the same conventions for sending changes in " 1.18675 "email; the <literal role=\"hg-ext\">patchbomb</literal> extension tries to " 1.18676 @@ -16759,7 +18432,7 @@ 1.18677 msgstr "" 1.18678 1.18679 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18680 -#: ../en/ch13-hgext.xml:492 1.18681 +#: ../en/ch14-hgext.xml:492 1.18682 msgid "" 1.18683 "You can write a subject for the introductory message on the command line " 1.18684 "using the <option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -s</option> " 1.18685 @@ -16767,7 +18440,7 @@ 1.18686 msgstr "" 1.18687 1.18688 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18689 -#: ../en/ch13-hgext.xml:498 1.18690 +#: ../en/ch14-hgext.xml:498 1.18691 msgid "" 1.18692 "To change the email address from which the messages originate, use the " 1.18693 "<option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -f</option> option. This " 1.18694 @@ -16775,7 +18448,7 @@ 1.18695 msgstr "" 1.18696 1.18697 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18698 -#: ../en/ch13-hgext.xml:504 1.18699 +#: ../en/ch14-hgext.xml:504 1.18700 msgid "" 1.18701 "The default behavior is to send unified diffs (see <xref linkend=\"sec:mq:" 1.18702 "patch\"/> for a description of the format), one per message. You can send a " 1.18703 @@ -16784,7 +18457,7 @@ 1.18704 msgstr "" 1.18705 1.18706 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18707 -#: ../en/ch13-hgext.xml:512 1.18708 +#: ../en/ch14-hgext.xml:512 1.18709 msgid "" 1.18710 "Unified diffs are normally prefaced with a metadata header. You can omit " 1.18711 "this, and send unadorned diffs, with the <option role=\"hg-ext-patchbomb-cmd-" 1.18712 @@ -16792,7 +18465,7 @@ 1.18713 msgstr "" 1.18714 1.18715 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18716 -#: ../en/ch13-hgext.xml:518 1.18717 +#: ../en/ch14-hgext.xml:518 1.18718 msgid "" 1.18719 "Diffs are normally sent <quote>inline</quote>, in the same body part as the " 1.18720 "description of a patch. This makes it easiest for the largest number of " 1.18721 @@ -16803,7 +18476,7 @@ 1.18722 msgstr "" 1.18723 1.18724 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18725 -#: ../en/ch13-hgext.xml:528 1.18726 +#: ../en/ch14-hgext.xml:528 1.18727 msgid "" 1.18728 "Instead of sending mail messages, you can write them to an <literal>mbox</" 1.18729 "literal>-format mail folder using the <option role=\"hg-ext-patchbomb-cmd-" 1.18730 @@ -16812,7 +18485,7 @@ 1.18731 msgstr "" 1.18732 1.18733 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 1.18734 -#: ../en/ch13-hgext.xml:535 1.18735 +#: ../en/ch14-hgext.xml:535 1.18736 msgid "" 1.18737 "If you would like to add a <command>diffstat</command>-format summary to each " 1.18738 "patch, and one to the introductory message, use the <option role=\"hg-ext-" 1.18739 @@ -16821,3 +18494,28 @@ 1.18740 "the number of lines affected, and a histogram showing how much each file is " 1.18741 "modified. This gives readers a qualitative glance at how complex a patch is." 1.18742 msgstr "" 1.18743 + 1.18744 +#~ msgid "The problem illustrated" 1.18745 +#~ msgstr "问题的演示" 1.18746 + 1.18747 +#~ msgid "" 1.18748 +#~ "Care with <literal>pretxn</literal> hooks in a shared-access repository" 1.18749 +#~ msgstr "在共享版本库中注意 <literal>pretxn</literal> 钩子" 1.18750 + 1.18751 +#~ msgid "A slightly special case: reverting a rename" 1.18752 +#~ msgstr "一个稍微特别的案例:撤销改名" 1.18753 + 1.18754 +#~ msgid "Colophon&emdash;this book is Free" 1.18755 +#~ msgstr "后记—本书是自由的!" 1.18756 + 1.18757 +#~ msgid "This book is a work in progress" 1.18758 +#~ msgstr "本书正在编写中" 1.18759 + 1.18760 +#~ msgid "" 1.18761 +#~ "<command role=\"hg-ext-mq\">qsave</command>&emdash;save current queue state" 1.18762 +#~ msgstr "<command role=\"hg-ext-mq\">qsave</command>—保存当前的队列状态" 1.18763 + 1.18764 +#~ msgid "" 1.18765 +#~ "<command role=\"hg-ext-mq\">qrestore</command>&emdash;restore saved queue " 1.18766 +#~ "state" 1.18767 +#~ msgstr "<command role=\"hg-ext-mq\">qrestore</command>—恢复保存的队列"