hgbook
changeset 719:eca3a16c0114
Merge with dongsheng
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri Aug 14 12:12:19 2009 -0700 (2009-08-14) |
parents | f9f71850ae1a c3863298abc7 |
children | 4d4e9bea4359 f817270b9234 1dd00abb3fa9 |
files | es/99book.bib es/bookhtml.cfg es/fixhtml.py es/hgbook.css es/htlatex.book |
line diff
1.1 --- a/Makefile Fri Aug 14 12:10:47 2009 -0700 1.2 +++ b/Makefile Fri Aug 14 12:12:19 2009 -0700 1.3 @@ -23,6 +23,11 @@ 1.4 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})') 1.5 1.6 images := \ 1.7 + en/figs/bad-merge-1.png \ 1.8 + en/figs/bad-merge-2.png \ 1.9 + en/figs/bad-merge-3.png \ 1.10 + en/figs/bad-merge-4.png \ 1.11 + en/figs/bad-merge-5.png \ 1.12 en/figs/feature-branches.png \ 1.13 en/figs/filelog.png \ 1.14 en/figs/metadata.png \ 1.15 @@ -59,6 +64,12 @@ 1.16 clean: 1.17 @rm -fr build po/*.mo hello en/hello en/html en/.validated-00book.xml en/examples/.run en/examples/results \ 1.18 stylesheets/system-xsl en/figs/*-tmp.svg \ 1.19 + web/index-read.html.in \ 1.20 + en/figs/bad-merge-1.png \ 1.21 + en/figs/bad-merge-2.png \ 1.22 + en/figs/bad-merge-3.png \ 1.23 + en/figs/bad-merge-4.png \ 1.24 + en/figs/bad-merge-5.png \ 1.25 en/figs/feature-branches.png \ 1.26 en/figs/filelog.png \ 1.27 en/figs/feature-branches.png \
2.1 Binary file en/figs/caution.png has changed
3.1 --- a/es/99book.bib Fri Aug 14 12:10:47 2009 -0700 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,1 +0,0 @@ 3.4 -../en/99book.bib 3.5 \ No newline at end of file
4.1 --- a/es/bookhtml.cfg Fri Aug 14 12:10:47 2009 -0700 4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 4.3 @@ -1,1 +0,0 @@ 4.4 -../en/bookhtml.cfg 4.5 \ No newline at end of file
5.1 --- a/es/fixhtml.py Fri Aug 14 12:10:47 2009 -0700 5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 5.3 @@ -1,1 +0,0 @@ 5.4 -../en/fixhtml.py 5.5 \ No newline at end of file
6.1 --- a/es/hgbook.css Fri Aug 14 12:10:47 2009 -0700 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,1 +0,0 @@ 6.4 -../en/hgbook.css 6.5 \ No newline at end of file
7.1 --- a/es/htlatex.book Fri Aug 14 12:10:47 2009 -0700 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,1 +0,0 @@ 7.4 -../en/htlatex.book 7.5 \ No newline at end of file
8.1 --- a/po/zh.po Fri Aug 14 12:10:47 2009 -0700 8.2 +++ b/po/zh.po Fri Aug 14 12:12:19 2009 -0700 8.3 @@ -41,8 +41,8 @@ 8.4 msgid "" 8.5 msgstr "" 8.6 "Project-Id-Version: hgbook 1.2\n" 8.7 -"POT-Creation-Date: 2009-04-05 11:48+0800\n" 8.8 -"PO-Revision-Date: 2009-04-05 12:10+0800\n" 8.9 +"POT-Creation-Date: 2009-05-21 14:26+0800\n" 8.10 +"PO-Revision-Date: 2009-05-21 16:42+0800\n" 8.11 "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" 8.12 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 8.13 "MIME-Version: 1.0\n" 8.14 @@ -53,32 +53,32 @@ 8.15 "X-Poedit-SourceCharset: utf-8\n" 8.16 8.17 #. type: Content of: <book><title> 8.18 -#: ../en/00book.xml:41 8.19 +#: ../en/00book.xml:42 8.20 msgid "Mercurial: The Definitive Guide" 8.21 msgstr "Mercurial 权威指南" 8.22 8.23 #. type: Content of: <book><subtitle> 8.24 -#: ../en/00book.xml:46 8.25 +#: ../en/00book.xml:47 8.26 msgid "Compiled from $rev_id$" 8.27 msgstr "编译自 $rev_id$" 8.28 8.29 #. type: Content of: <book><bookinfo> 8.30 -#: ../en/00book.xml:48 8.31 +#: ../en/00book.xml:49 8.32 msgid "<edition>1</edition> <isbn>9780596800673</isbn>" 8.33 msgstr "<edition>1</edition> <isbn>9780596800673</isbn>" 8.34 8.35 #. type: Content of: <book><bookinfo><authorgroup><author><firstname> 8.36 -#: ../en/00book.xml:52 8.37 +#: ../en/00book.xml:53 8.38 msgid "Bryan" 8.39 msgstr "Bryan" 8.40 8.41 #. type: Content of: <book><bookinfo><authorgroup><author><surname> 8.42 -#: ../en/00book.xml:53 8.43 +#: ../en/00book.xml:54 8.44 msgid "O'Sullivan" 8.45 msgstr "O'Sullivan" 8.46 8.47 #. type: Content of: <book><bookinfo> 8.48 -#: ../en/00book.xml:57 8.49 +#: ../en/00book.xml:58 8.50 msgid "" 8.51 "<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> " 8.52 "<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</" 8.53 @@ -89,6 +89,825 @@ 8.54 "year> <holder>Bryan O'Sullivan</holder> </copyright>" 8.55 8.56 #. type: Content of: <book><appendix><title> 8.57 +#: ../en/appA-svn.xml:5 8.58 +msgid "Migrating to Mercurial" 8.59 +msgstr "迁移到 Mercurial" 8.60 + 8.61 +#. type: Content of: <book><appendix><para> 8.62 +#: ../en/appA-svn.xml:7 8.63 +msgid "" 8.64 +"A common way to test the waters with a new revision control tool is to " 8.65 +"experiment with switching an existing project, rather than starting a new " 8.66 +"project from scratch." 8.67 +msgstr "" 8.68 + 8.69 +#. type: Content of: <book><appendix><para> 8.70 +#: ../en/appA-svn.xml:11 8.71 +msgid "" 8.72 +"In this appendix, we discuss how to import a project's history into " 8.73 +"Mercurial, and what to look out for if you are used to a different revision " 8.74 +"control system." 8.75 +msgstr "" 8.76 + 8.77 +#. type: Content of: <book><appendix><sect1><title> 8.78 +#: ../en/appA-svn.xml:16 8.79 +msgid "Importing history from another system" 8.80 +msgstr "从其它版本控制系统导入历史" 8.81 + 8.82 +#. type: Content of: <book><appendix><sect1><para> 8.83 +#: ../en/appA-svn.xml:18 8.84 +msgid "" 8.85 +"Mercurial ships with an extension named <literal>convert</literal>, which can " 8.86 +"import project history from most popular revision control systems. At the " 8.87 +"time this book was written, it could import history from the following " 8.88 +"systems:" 8.89 +msgstr "" 8.90 + 8.91 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 8.92 +#: ../en/appA-svn.xml:25 ../en/appA-svn.xml:369 ../en/ch01-intro.xml:416 8.93 +#: ../en/ch01-intro.xml:627 8.94 +msgid "Subversion" 8.95 +msgstr "Subversion" 8.96 + 8.97 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.98 +#: ../en/appA-svn.xml:28 ../en/ch01-intro.xml:532 ../en/ch01-intro.xml:628 8.99 +msgid "CVS" 8.100 +msgstr "CVS" 8.101 + 8.102 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.103 +#: ../en/appA-svn.xml:31 8.104 +msgid "git" 8.105 +msgstr "git" 8.106 + 8.107 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.108 +#: ../en/appA-svn.xml:34 ../en/ch01-intro.xml:630 8.109 +msgid "Darcs" 8.110 +msgstr "Darcs" 8.111 + 8.112 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.113 +#: ../en/appA-svn.xml:37 8.114 +msgid "Bazaar" 8.115 +msgstr "Bazaar" 8.116 + 8.117 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.118 +#: ../en/appA-svn.xml:40 8.119 +msgid "Monotone" 8.120 +msgstr "Monotone" 8.121 + 8.122 +#. type: Content of: <book><appendix><sect1><itemizedlist><listitem><para> 8.123 +#: ../en/appA-svn.xml:43 8.124 +msgid "GNU Arch" 8.125 +msgstr "GNU Arch" 8.126 + 8.127 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 8.128 +#: ../en/appA-svn.xml:46 ../en/appA-svn.xml:370 8.129 +msgid "Mercurial" 8.130 +msgstr "Mercurial" 8.131 + 8.132 +#. type: Content of: <book><appendix><sect1><para> 8.133 +#: ../en/appA-svn.xml:50 8.134 +msgid "" 8.135 +"(To see why Mercurial itself is supported as a source, see <xref linkend=" 8.136 +"\"svn.filemap\"/>.)" 8.137 +msgstr "" 8.138 + 8.139 +#. type: Content of: <book><appendix><sect1><para> 8.140 +#: ../en/appA-svn.xml:53 8.141 +msgid "" 8.142 +"You can enable the extension in the usual way, by editing your <filename>~/." 8.143 +"hgrc</filename> file." 8.144 +msgstr "" 8.145 + 8.146 +#. type: Content of: <book><appendix><sect1><para> 8.147 +#: ../en/appA-svn.xml:59 8.148 +msgid "" 8.149 +"This will make a <command>hg convert</command> command available. The " 8.150 +"command is easy to use. For instance, this command will import the " 8.151 +"Subversion history for the Nose unit testing framework into Mercurial." 8.152 +msgstr "" 8.153 + 8.154 +#. type: Content of: <book><appendix><sect1><screen><prompt> 8.155 +#: ../en/appA-svn.xml:64 ../en/appA-svn.xml:207 ../en/appA-svn.xml:212 8.156 +#: ../en/appA-svn.xml:213 ../en/appA-svn.xml:218 ../en/appA-svn.xml:224 8.157 +#: ../en/appA-svn.xml:229 ../en/appA-svn.xml:532 8.158 +msgid "$" 8.159 +msgstr "$" 8.160 + 8.161 +#. type: Content of: <book><appendix><sect1><screen><userinput> 8.162 +#: ../en/appA-svn.xml:64 8.163 +msgid "hg convert http://python-nose.googlecode.com/svn/trunk" 8.164 +msgstr "" 8.165 + 8.166 +#. type: Content of: <book><appendix><sect1><para> 8.167 +#: ../en/appA-svn.xml:66 8.168 +msgid "" 8.169 +"The <literal>convert</literal> extension operates incrementally. In other " 8.170 +"words, after you have run <command>hg convert</command> once, running it " 8.171 +"again will import any new revisions committed after the first run began. " 8.172 +"Incremental conversion will only work if you run <command>hg convert</" 8.173 +"command> in the same Mercurial repository that you originally used, because " 8.174 +"the <literal>convert</literal> extension saves some private metadata in a non-" 8.175 +"revision-controlled file named <filename>.hg/shamap</filename> inside the " 8.176 +"target repository." 8.177 +msgstr "" 8.178 + 8.179 +#. type: Content of: <book><appendix><sect1><para> 8.180 +#: ../en/appA-svn.xml:78 8.181 +msgid "" 8.182 +"When you want to start making changes using Mercurial, it's best to clone the " 8.183 +"tree in which you are doing your conversions, and leave the original tree for " 8.184 +"future incremental conversions. This is the safest way to let you pull and " 8.185 +"merge future commits from the source revision control system into your newly " 8.186 +"active Mercurial project." 8.187 +msgstr "" 8.188 + 8.189 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.190 +#: ../en/appA-svn.xml:86 8.191 +msgid "Converting multiple branches" 8.192 +msgstr "转换多个分支" 8.193 + 8.194 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.195 +#: ../en/appA-svn.xml:88 8.196 +msgid "" 8.197 +"The <command>hg convert</command> command given above converts only the " 8.198 +"history of the <literal>trunk</literal> branch of the Subversion repository. " 8.199 +"If we instead use the URL <literal>http://python-nose.googlecode.com/svn</" 8.200 +"literal>, Mercurial will automatically detect the <literal>trunk</literal>, " 8.201 +"<literal>tags</literal> and <literal>branches</literal> layout that " 8.202 +"Subversion projects usually use, and it will import each as a separate " 8.203 +"Mercurial branch." 8.204 +msgstr "" 8.205 + 8.206 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.207 +#: ../en/appA-svn.xml:98 8.208 +msgid "" 8.209 +"By default, each Subversion branch imported into Mercurial is given a branch " 8.210 +"name. After the conversion completes, you can get a list of the active " 8.211 +"branch names in the Mercurial repository using <command>hg branches -a</" 8.212 +"command>. If you would prefer to import the Subversion branches without " 8.213 +"names, pass the <option>--config convert.hg.usebranchnames=false</option> " 8.214 +"option to <command>hg convert</command>." 8.215 +msgstr "" 8.216 + 8.217 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.218 +#: ../en/appA-svn.xml:107 8.219 +msgid "" 8.220 +"Once you have converted your tree, if you want to follow the usual Mercurial " 8.221 +"practice of working in a tree that contains a single branch, you can clone " 8.222 +"that single branch using <command>hg clone -r mybranchname</command>." 8.223 +msgstr "" 8.224 + 8.225 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.226 +#: ../en/appA-svn.xml:114 8.227 +msgid "Mapping user names" 8.228 +msgstr "映射用户名称" 8.229 + 8.230 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.231 +#: ../en/appA-svn.xml:116 8.232 +msgid "" 8.233 +"Some revision control tools save only short usernames with commits, and these " 8.234 +"can be difficult to interpret. The norm with Mercurial is to save a " 8.235 +"committer's name and email address, which is much more useful for talking to " 8.236 +"them after the fact." 8.237 +msgstr "" 8.238 + 8.239 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.240 +#: ../en/appA-svn.xml:122 8.241 +msgid "" 8.242 +"If you are converting a tree from a revision control system that uses short " 8.243 +"names, you can map those names to longer equivalents by passing a <option>--" 8.244 +"authors</option> option to <command>hg convert</command>. This option " 8.245 +"accepts a file name that should contain entries of the following form." 8.246 +msgstr "" 8.247 + 8.248 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.249 +#: ../en/appA-svn.xml:132 8.250 +msgid "" 8.251 +"Whenever <literal>convert</literal> encounters a commit with the username " 8.252 +"<literal>arist</literal> in the source repository, it will use the name " 8.253 +"<literal>Aristotle <aristotle@phil.example.gr></literal> in the " 8.254 +"converted Mercurial revision. If no match is found for a name, it is used " 8.255 +"verbatim." 8.256 +msgstr "" 8.257 + 8.258 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.259 +#: ../en/appA-svn.xml:141 8.260 +msgid "Tidying up the tree" 8.261 +msgstr "清理目录树" 8.262 + 8.263 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.264 +#: ../en/appA-svn.xml:143 8.265 +msgid "" 8.266 +"Not all projects have pristine history. There may be a directory that should " 8.267 +"never have been checked in, a file that is too big, or a whole hierarchy that " 8.268 +"needs to be refactored." 8.269 +msgstr "" 8.270 + 8.271 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.272 +#: ../en/appA-svn.xml:148 8.273 +msgid "" 8.274 +"The <literal>convert</literal> extension supports the idea of a <quote>file " 8.275 +"map</quote> that can reorganize the files and directories in a project as it " 8.276 +"imports the project's history. This is useful not only when importing " 8.277 +"history from other revision control systems, but also to prune or refactor a " 8.278 +"Mercurial tree." 8.279 +msgstr "" 8.280 + 8.281 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.282 +#: ../en/appA-svn.xml:155 8.283 +msgid "" 8.284 +"To specify a file map, use the <option>--filemap</option> option and supply a " 8.285 +"file name. A file map contains lines of the following forms." 8.286 +msgstr "" 8.287 + 8.288 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.289 +#: ../en/appA-svn.xml:169 8.290 +msgid "" 8.291 +"The <literal>include</literal> directive causes a file, or all files under a " 8.292 +"directory, to be included in the destination repository. This also excludes " 8.293 +"all other files and dirs not explicitely included. The <literal>exclude</" 8.294 +"literal> directive causes files or directories to be omitted, and others not " 8.295 +"explicitly mentioned to be included." 8.296 +msgstr "" 8.297 + 8.298 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.299 +#: ../en/appA-svn.xml:176 8.300 +msgid "" 8.301 +"To move a file or directory from one location to another, use the " 8.302 +"<literal>rename</literal> directive. If you need to move a file or directory " 8.303 +"from a subdirectory into the root of the repository, use <literal>.</literal> " 8.304 +"as the second argument to the <literal>rename</literal> directive." 8.305 +msgstr "" 8.306 + 8.307 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.308 +#: ../en/appA-svn.xml:184 8.309 +msgid "Improving Subversion conversion performance" 8.310 +msgstr "改进 Subversion 的转换性能" 8.311 + 8.312 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.313 +#: ../en/appA-svn.xml:186 8.314 +msgid "" 8.315 +"You will often need several attempts before you hit the perfect combination " 8.316 +"of user map, file map, and other conversion parameters. Converting a " 8.317 +"Subversion repository over an access protocol like <literal>ssh</literal> or " 8.318 +"<literal>http</literal> can proceed thousands of times more slowly than " 8.319 +"Mercurial is capable of actually operating, due to network delays. This can " 8.320 +"make tuning that perfect conversion recipe very painful." 8.321 +msgstr "" 8.322 + 8.323 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.324 +#: ../en/appA-svn.xml:195 8.325 +msgid "" 8.326 +"The <ulink url=\"http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt" 8.327 +"\"><command>svnsync</command></ulink> command can greatly speed up the " 8.328 +"conversion of a Subversion repository. It is a read-only mirroring program " 8.329 +"for Subversion repositories. The idea is that you create a local mirror of " 8.330 +"your Subversion tree, then convert the mirror into a Mercurial repository." 8.331 +msgstr "" 8.332 + 8.333 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.334 +#: ../en/appA-svn.xml:203 8.335 +msgid "" 8.336 +"Suppose we want to convert the Subversion repository for the popular " 8.337 +"Memcached project into a Mercurial tree. First, we create a local Subversion " 8.338 +"repository." 8.339 +msgstr "" 8.340 + 8.341 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.342 +#: ../en/appA-svn.xml:207 8.343 +msgid "svnadmin create memcached-mirror" 8.344 +msgstr "svnadmin create memcached-mirror" 8.345 + 8.346 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.347 +#: ../en/appA-svn.xml:209 8.348 +msgid "Next, we set up a Subversion hook that <command>svnsync</command> needs." 8.349 +msgstr "" 8.350 + 8.351 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.352 +#: ../en/appA-svn.xml:212 8.353 +msgid "echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change" 8.354 +msgstr "echo '#!/bin/sh' > memcached-mirror/hooks/pre-revprop-change" 8.355 + 8.356 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.357 +#: ../en/appA-svn.xml:213 8.358 +msgid "chmod +x memcached-mirror/hooks/pre-revprop-change" 8.359 +msgstr "chmod +x memcached-mirror/hooks/pre-revprop-change" 8.360 + 8.361 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.362 +#: ../en/appA-svn.xml:215 8.363 +msgid "We then initialize <command>svnsync</command> in this repository." 8.364 +msgstr "" 8.365 + 8.366 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.367 +#: ../en/appA-svn.xml:218 8.368 +msgid "" 8.369 +"svnsync --init file://`pwd`/memcached-mirror \\ http://code.sixapart.com/svn/" 8.370 +"memcached" 8.371 +msgstr "" 8.372 +"svnsync --init file://`pwd`/memcached-mirror \\ http://code.sixapart.com/svn/" 8.373 +"memcached" 8.374 + 8.375 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.376 +#: ../en/appA-svn.xml:221 8.377 +msgid "" 8.378 +"Our next step is to begin the <command>svnsync</command> mirroring process." 8.379 +msgstr "" 8.380 + 8.381 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.382 +#: ../en/appA-svn.xml:224 8.383 +msgid "svnsync sync file://`pwd`/memcached-mirror" 8.384 +msgstr "svnsync sync file://`pwd`/memcached-mirror" 8.385 + 8.386 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.387 +#: ../en/appA-svn.xml:226 8.388 +msgid "" 8.389 +"Finally, we import the history of our local Subversion mirror into Mercurial." 8.390 +msgstr "" 8.391 + 8.392 +#. type: Content of: <book><appendix><sect1><sect2><screen><userinput> 8.393 +#: ../en/appA-svn.xml:229 8.394 +msgid "hg convert memcached-mirror" 8.395 +msgstr "" 8.396 + 8.397 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.398 +#: ../en/appA-svn.xml:231 8.399 +msgid "" 8.400 +"We can use this process incrementally if the Subversion repository is still " 8.401 +"in use. We run <command>svnsync</command> to pull new changes into our " 8.402 +"mirror, then <command>hg convert</command> to import them into our Mercurial " 8.403 +"tree." 8.404 +msgstr "" 8.405 + 8.406 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.407 +#: ../en/appA-svn.xml:237 8.408 +msgid "" 8.409 +"There are two advantages to doing a two-stage import with <command>svnsync</" 8.410 +"command>. The first is that it uses more efficient Subversion network " 8.411 +"syncing code than <command>hg convert</command>, so it transfers less data " 8.412 +"over the network. The second is that the import from a local Subversion tree " 8.413 +"is so fast that you can tweak your conversion setup repeatedly without having " 8.414 +"to sit through a painfully slow network-based conversion process each time." 8.415 +msgstr "" 8.416 + 8.417 +#. type: Content of: <book><appendix><sect1><title> 8.418 +#: ../en/appA-svn.xml:249 8.419 +msgid "Migrating from Subversion" 8.420 +msgstr "从 Subversion 迁移" 8.421 + 8.422 +#. type: Content of: <book><appendix><sect1><para> 8.423 +#: ../en/appA-svn.xml:251 8.424 +msgid "" 8.425 +"Subversion is currently the most popular open source revision control system. " 8.426 +"Although there are many differences between Mercurial and Subversion, making " 8.427 +"the transition from Subversion to Mercurial is not particularly difficult. " 8.428 +"The two have similar command sets and generally uniform interfaces." 8.429 +msgstr "" 8.430 + 8.431 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.432 +#: ../en/appA-svn.xml:259 8.433 +msgid "Philosophical differences" 8.434 +msgstr "哲学的差别" 8.435 + 8.436 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.437 +#: ../en/appA-svn.xml:261 8.438 +msgid "" 8.439 +"The fundamental difference between Subversion and Mercurial is of course that " 8.440 +"Subversion is centralized, while Mercurial is distributed. Since Mercurial " 8.441 +"stores all of a project's history on your local drive, it only needs to " 8.442 +"perform a network access when you want to explicitly communicate with another " 8.443 +"repository. In contrast, Subversion stores very little information locally, " 8.444 +"and the client must thus contact its server for many common operations." 8.445 +msgstr "" 8.446 + 8.447 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.448 +#: ../en/appA-svn.xml:270 8.449 +msgid "" 8.450 +"Subversion more or less gets away without a well-defined notion of a branch: " 8.451 +"which portion of a server's namespace qualifies as a branch is a matter of " 8.452 +"convention, with the software providing no enforcement. Mercurial treats a " 8.453 +"repository as the unit of branch management." 8.454 +msgstr "" 8.455 + 8.456 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 8.457 +#: ../en/appA-svn.xml:277 8.458 +msgid "Scope of commands" 8.459 +msgstr "命令作用域" 8.460 + 8.461 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.462 +#: ../en/appA-svn.xml:279 8.463 +msgid "" 8.464 +"Since Subversion doesn't know what parts of its namespace are really " 8.465 +"branches, it treats most commands as requests to operate at and below " 8.466 +"whatever directory you are currently visiting. For instance, if you run " 8.467 +"<command>svn log</command>, you'll get the history of whatever part of the " 8.468 +"tree you're looking at, not the tree as a whole." 8.469 +msgstr "" 8.470 + 8.471 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.472 +#: ../en/appA-svn.xml:286 8.473 +msgid "" 8.474 +"Mercurial's commands behave differently, by defaulting to operating over an " 8.475 +"entire repository. Run <command>hg log</command> and it will tell you the " 8.476 +"history of the entire tree, no matter what part of the working directory " 8.477 +"you're visiting at the time. If you want the history of just a particular " 8.478 +"file or directory, simply supply it by name, e.g. <command>hg log src</" 8.479 +"command>." 8.480 +msgstr "" 8.481 + 8.482 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.483 +#: ../en/appA-svn.xml:294 8.484 +msgid "" 8.485 +"From my own experience, this difference in default behaviors is probably the " 8.486 +"most likely to trip you up if you have to switch back and forth frequently " 8.487 +"between the two tools." 8.488 +msgstr "" 8.489 + 8.490 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 8.491 +#: ../en/appA-svn.xml:301 8.492 +msgid "Multi-user operation and safety" 8.493 +msgstr "多用户操作与安全" 8.494 + 8.495 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.496 +#: ../en/appA-svn.xml:303 8.497 +msgid "" 8.498 +"With Subversion, it is normal (though slightly frowned upon) for multiple " 8.499 +"people to collaborate in a single branch. If Alice and Bob are working " 8.500 +"together, and Alice commits some changes to their shared branch, Bob must " 8.501 +"update his client's view of the branch before he can commit. Since at this " 8.502 +"time he has no permanent record of the changes he has made, he can corrupt or " 8.503 +"lose his modifications during and after his update." 8.504 +msgstr "" 8.505 + 8.506 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.507 +#: ../en/appA-svn.xml:312 8.508 +msgid "" 8.509 +"Mercurial encourages a commit-then-merge model instead. Bob commits his " 8.510 +"changes locally before pulling changes from, or pushing them to, the server " 8.511 +"that he shares with Alice. If Alice pushed her changes before Bob tries to " 8.512 +"push his, he will not be able to push his changes until he pulls hers, merges " 8.513 +"with them, and commits the result of the merge. If he makes a mistake during " 8.514 +"the merge, he still has the option of reverting to the commit that recorded " 8.515 +"his changes." 8.516 +msgstr "" 8.517 + 8.518 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.519 +#: ../en/appA-svn.xml:321 8.520 +msgid "" 8.521 +"It is worth emphasizing that these are the common ways of working with these " 8.522 +"tools. Subversion supports a safer work-in-your-own-branch model, but it is " 8.523 +"cumbersome enough in practice to not be widely used. Mercurial can support " 8.524 +"the less safe mode of allowing changes to be pulled in and merged on top of " 8.525 +"uncommitted edits, but this is considered highly unusual." 8.526 +msgstr "" 8.527 + 8.528 +#. type: Content of: <book><appendix><sect1><sect2><sect3><title> 8.529 +#: ../en/appA-svn.xml:331 8.530 +msgid "Published vs local changes" 8.531 +msgstr "已发布的修改与本地修改" 8.532 + 8.533 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.534 +#: ../en/appA-svn.xml:333 8.535 +msgid "" 8.536 +"A Subversion <command>svn commit</command> command immediately publishes " 8.537 +"changes to a server, where they can be seen by everyone who has read access." 8.538 +msgstr "" 8.539 + 8.540 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.541 +#: ../en/appA-svn.xml:337 8.542 +msgid "" 8.543 +"With Mercurial, commits are always local, and must be published via a " 8.544 +"<command>hg push</command> command afterwards." 8.545 +msgstr "" 8.546 + 8.547 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.548 +#: ../en/appA-svn.xml:341 8.549 +msgid "" 8.550 +"Each approach has its advantages and disadvantages. The Subversion model " 8.551 +"means that changes are published, and hence reviewable and usable, " 8.552 +"immediately. On the other hand, this means that a user must have commit " 8.553 +"access to a repository in order to use the software in a normal way, and " 8.554 +"commit access is not lightly given out by most open source projects." 8.555 +msgstr "" 8.556 + 8.557 +#. type: Content of: <book><appendix><sect1><sect2><sect3><para> 8.558 +#: ../en/appA-svn.xml:349 8.559 +msgid "" 8.560 +"The Mercurial approach allows anyone who can clone a repository to commit " 8.561 +"changes without the need for someone else's permission, and they can then " 8.562 +"publish their changes and continue to participate however they see fit. The " 8.563 +"distinction between committing and pushing does open up the possibility of " 8.564 +"someone committing changes to their laptop and walking away for a few days " 8.565 +"having forgotten to push them, which in rare cases might leave collaborators " 8.566 +"temporarily stuck." 8.567 +msgstr "" 8.568 + 8.569 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.570 +#: ../en/appA-svn.xml:362 8.571 +msgid "Quick reference" 8.572 +msgstr "快速参考" 8.573 + 8.574 +#. type: Content of: <book><appendix><sect1><sect2><table><title> 8.575 +#: ../en/appA-svn.xml:365 8.576 +msgid "Subversion commands and Mercurial equivalents" 8.577 +msgstr "Subversion 命令与 Mercurial 对照表" 8.578 + 8.579 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><thead><row><entry> 8.580 +#: ../en/appA-svn.xml:371 8.581 +msgid "Notes" 8.582 +msgstr "备注" 8.583 + 8.584 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.585 +#: ../en/appA-svn.xml:376 8.586 +msgid "<command>svn add</command>" 8.587 +msgstr "<command>svn add</command>" 8.588 + 8.589 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.590 +#: ../en/appA-svn.xml:377 8.591 +msgid "<command>hg add</command>" 8.592 +msgstr "<command>hg add</command>" 8.593 + 8.594 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.595 +#: ../en/appA-svn.xml:381 8.596 +msgid "<command>svn blame</command>" 8.597 +msgstr "<command>svn blame</command>" 8.598 + 8.599 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.600 +#: ../en/appA-svn.xml:382 8.601 +msgid "<command>hg annotate</command>" 8.602 +msgstr "<command>hg annotate</command>" 8.603 + 8.604 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.605 +#: ../en/appA-svn.xml:386 8.606 +msgid "<command>svn cat</command>" 8.607 +msgstr "<command>svn cat</command>" 8.608 + 8.609 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.610 +#: ../en/appA-svn.xml:387 8.611 +msgid "<command>hg cat</command>" 8.612 +msgstr "<command>hg cat</command>" 8.613 + 8.614 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.615 +#: ../en/appA-svn.xml:391 8.616 +msgid "<command>svn checkout</command>" 8.617 +msgstr "<command>svn checkout</command>" 8.618 + 8.619 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.620 +#: ../en/appA-svn.xml:392 ../en/appA-svn.xml:409 8.621 +msgid "<command>hg clone</command>" 8.622 +msgstr "<command>hg clone</command>" 8.623 + 8.624 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.625 +#: ../en/appA-svn.xml:396 8.626 +msgid "<command>svn cleanup</command>" 8.627 +msgstr "<command>svn cleanup</command>" 8.628 + 8.629 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.630 +#: ../en/appA-svn.xml:397 ../en/appA-svn.xml:472 8.631 +msgid "n/a" 8.632 +msgstr "n/a" 8.633 + 8.634 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.635 +#: ../en/appA-svn.xml:398 8.636 +msgid "No cleanup needed" 8.637 +msgstr "不需要清理" 8.638 + 8.639 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.640 +#: ../en/appA-svn.xml:401 8.641 +msgid "<command>svn commit</command>" 8.642 +msgstr "<command>svn commit</command>" 8.643 + 8.644 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.645 +#: ../en/appA-svn.xml:402 8.646 +msgid "<command>hg commit</command>; <command>hg push</command>" 8.647 +msgstr "<command>hg commit</command>; <command>hg push</command>" 8.648 + 8.649 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.650 +#: ../en/appA-svn.xml:404 8.651 +msgid "<command>hg push</command> publishes after commit" 8.652 +msgstr "提交后使用 <command>hg push</command> 发布" 8.653 + 8.654 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.655 +#: ../en/appA-svn.xml:408 ../en/appA-svn.xml:413 8.656 +msgid "<command>svn copy</command>" 8.657 +msgstr "<command>svn copy</command>" 8.658 + 8.659 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.660 +#: ../en/appA-svn.xml:410 8.661 +msgid "To create a new branch" 8.662 +msgstr "创建新补丁" 8.663 + 8.664 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.665 +#: ../en/appA-svn.xml:414 8.666 +msgid "<command>hg copy</command>" 8.667 +msgstr "<command>hg copy</command>" 8.668 + 8.669 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.670 +#: ../en/appA-svn.xml:415 8.671 +msgid "To copy files or directories" 8.672 +msgstr "复制文件或目录" 8.673 + 8.674 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.675 +#: ../en/appA-svn.xml:418 8.676 +msgid "<command>svn delete</command> (<command>svn remove</command>)" 8.677 +msgstr "<command>svn delete</command> (<command>svn remove</command>)" 8.678 + 8.679 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.680 +#: ../en/appA-svn.xml:420 8.681 +msgid "<command>hg remove</command>" 8.682 +msgstr "<command>hg remove</command>" 8.683 + 8.684 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.685 +#: ../en/appA-svn.xml:424 8.686 +msgid "<command>svn diff</command>" 8.687 +msgstr "<command>svn diff</command>" 8.688 + 8.689 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.690 +#: ../en/appA-svn.xml:425 8.691 +msgid "<command>hg diff</command>" 8.692 +msgstr "<command>hg diff</command>" 8.693 + 8.694 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.695 +#: ../en/appA-svn.xml:429 8.696 +msgid "<command>svn export</command>" 8.697 +msgstr "<command>svn export</command>" 8.698 + 8.699 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.700 +#: ../en/appA-svn.xml:430 8.701 +msgid "<command>hg archive</command>" 8.702 +msgstr "<command>hg archive</command>" 8.703 + 8.704 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.705 +#: ../en/appA-svn.xml:434 8.706 +msgid "<command>svn help</command>" 8.707 +msgstr "<command>svn help</command>" 8.708 + 8.709 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.710 +#: ../en/appA-svn.xml:435 8.711 +msgid "<command>hg help</command>" 8.712 +msgstr "<command>hg help</command>" 8.713 + 8.714 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.715 +#: ../en/appA-svn.xml:439 8.716 +msgid "<command>svn import</command>" 8.717 +msgstr "<command>svn import</command>" 8.718 + 8.719 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.720 +#: ../en/appA-svn.xml:440 8.721 +msgid "<command>hg addremove</command>; <command>hg commit</command>" 8.722 +msgstr "<command>hg addremove</command>; <command>hg commit</command>" 8.723 + 8.724 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.725 +#: ../en/appA-svn.xml:445 ../en/appA-svn.xml:450 8.726 +msgid "<command>svn info</command>" 8.727 +msgstr "<command>svn info</command>" 8.728 + 8.729 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.730 +#: ../en/appA-svn.xml:446 8.731 +msgid "<command>hg parents</command>" 8.732 +msgstr "<command>hg parents</command>" 8.733 + 8.734 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.735 +#: ../en/appA-svn.xml:447 8.736 +msgid "Shows what revision is checked out" 8.737 +msgstr "显示检出的版本信息" 8.738 + 8.739 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.740 +#: ../en/appA-svn.xml:451 8.741 +msgid "<command>hg showconfig paths.parent</command>" 8.742 +msgstr "<command>hg showconfig paths.parent</command>" 8.743 + 8.744 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.745 +#: ../en/appA-svn.xml:453 8.746 +msgid "Shows what URL is checked out" 8.747 +msgstr "显示检出的 URL" 8.748 + 8.749 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.750 +#: ../en/appA-svn.xml:456 8.751 +msgid "<command>svn list</command>" 8.752 +msgstr "<command>svn list</command>" 8.753 + 8.754 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.755 +#: ../en/appA-svn.xml:457 8.756 +msgid "<command>hg manifest</command>" 8.757 +msgstr "<command>hg manifest</command>" 8.758 + 8.759 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.760 +#: ../en/appA-svn.xml:461 8.761 +msgid "<command>svn log</command>" 8.762 +msgstr "<command>svn log</command>" 8.763 + 8.764 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.765 +#: ../en/appA-svn.xml:462 8.766 +msgid "<command>hg log</command>" 8.767 +msgstr "<command>hg log</command>" 8.768 + 8.769 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.770 +#: ../en/appA-svn.xml:466 8.771 +msgid "<command>svn merge</command>" 8.772 +msgstr "" 8.773 + 8.774 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.775 +#: ../en/appA-svn.xml:467 8.776 +msgid "<command>hg merge</command>" 8.777 +msgstr "<command>hg merge</command>" 8.778 + 8.779 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.780 +#: ../en/appA-svn.xml:471 8.781 +msgid "<command>svn mkdir</command>" 8.782 +msgstr "<command>svn mkdir</command>" 8.783 + 8.784 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.785 +#: ../en/appA-svn.xml:473 8.786 +msgid "Mercurial does not track directories" 8.787 +msgstr "Mercurial 不跟踪目录" 8.788 + 8.789 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.790 +#: ../en/appA-svn.xml:476 8.791 +msgid "<command>svn move</command> (<command>svn rename</command>)" 8.792 +msgstr "<command>svn move</command> (<command>svn rename</command>)" 8.793 + 8.794 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.795 +#: ../en/appA-svn.xml:478 8.796 +msgid "<command>hg rename</command>" 8.797 +msgstr "<command>hg rename</command>" 8.798 + 8.799 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.800 +#: ../en/appA-svn.xml:482 8.801 +msgid "<command>svn resolved</command>" 8.802 +msgstr "<command>svn resolved</command>" 8.803 + 8.804 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.805 +#: ../en/appA-svn.xml:483 8.806 +msgid "<command>hg resolve -m</command>" 8.807 +msgstr "<command>hg resolve -m</command>" 8.808 + 8.809 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.810 +#: ../en/appA-svn.xml:487 8.811 +msgid "<command>svn revert</command>" 8.812 +msgstr "<command>svn revert</command>" 8.813 + 8.814 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.815 +#: ../en/appA-svn.xml:488 8.816 +msgid "<command>hg revert</command>" 8.817 +msgstr "<command>hg revert</command>" 8.818 + 8.819 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.820 +#: ../en/appA-svn.xml:492 8.821 +msgid "<command>svn status</command>" 8.822 +msgstr "<command>svn status</command>" 8.823 + 8.824 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.825 +#: ../en/appA-svn.xml:493 8.826 +msgid "<command>hg status</command>" 8.827 +msgstr "<command>hg status</command>" 8.828 + 8.829 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.830 +#: ../en/appA-svn.xml:497 8.831 +msgid "<command>svn update</command>" 8.832 +msgstr "<command>svn update</command>" 8.833 + 8.834 +#. type: Content of: <book><appendix><sect1><sect2><table><tgroup><tbody><row><entry> 8.835 +#: ../en/appA-svn.xml:498 8.836 +msgid "<command>hg pull -u</command>" 8.837 +msgstr "<command>hg pull -u</command>" 8.838 + 8.839 +#. type: Content of: <book><appendix><sect1><title> 8.840 +#: ../en/appA-svn.xml:508 8.841 +msgid "Useful tips for newcomers" 8.842 +msgstr "新手需要了解的技巧" 8.843 + 8.844 +#. type: Content of: <book><appendix><sect1><para> 8.845 +#: ../en/appA-svn.xml:510 8.846 +msgid "" 8.847 +"Under some revision control systems, printing a diff for a single committed " 8.848 +"revision can be painful. For instance, with Subversion, to see what changed " 8.849 +"in revision 104654, you must type <command>svn diff -r104653:104654</" 8.850 +"command>. Mercurial eliminates the need to type the revision ID twice in this " 8.851 +"common case. For a plain diff, <command>hg export 104654</command>. For a log " 8.852 +"message followed by a diff, <command>hg log -r104654 -p</command>." 8.853 +msgstr "" 8.854 + 8.855 +#. type: Content of: <book><appendix><sect1><para> 8.856 +#: ../en/appA-svn.xml:519 8.857 +msgid "" 8.858 +"When you run <command>hg status</command> without any arguments, it prints " 8.859 +"the status of the entire tree, with paths relative to the root of the " 8.860 +"repository. This makes it tricky to copy a file name from the output of " 8.861 +"<command>hg status</command> into the command line. If you supply a file or " 8.862 +"directory name to <command>hg status</command>, it will print paths relative " 8.863 +"to your current location instead. So to get tree-wide status from " 8.864 +"<command>hg status</command>, with paths that are relative to your current " 8.865 +"directory and not the root of the repository, feed the output of <command>hg " 8.866 +"root</command> into <command>hg status</command>. You can easily do this as " 8.867 +"follows on a Unix-like system:" 8.868 +msgstr "" 8.869 + 8.870 +#. type: Content of: <book><appendix><sect1><screen><userinput> 8.871 +#: ../en/appA-svn.xml:532 8.872 +msgid "hg status `hg root`" 8.873 +msgstr "hg status `hg root`" 8.874 + 8.875 +#. type: Content of: <book><appendix><title> 8.876 #: ../en/appB-mq-ref.xml:5 8.877 msgid "Mercurial Queues reference" 8.878 msgstr "Mercurial 队列参考" 8.879 @@ -167,10 +986,10 @@ 8.880 msgstr "" 8.881 8.882 #. type: Content of: <book><appendix><sect1><sect2><para> 8.883 -#: ../en/appB-mq-ref.xml:57 ../en/appB-mq-ref.xml:99 ../en/appB-mq-ref.xml:157 8.884 -#: ../en/appB-mq-ref.xml:197 ../en/appB-mq-ref.xml:264 8.885 -#: ../en/appB-mq-ref.xml:335 ../en/appB-mq-ref.xml:404 8.886 -#: ../en/appB-mq-ref.xml:497 8.887 +#: ../en/appB-mq-ref.xml:57 ../en/appB-mq-ref.xml:109 ../en/appB-mq-ref.xml:167 8.888 +#: ../en/appB-mq-ref.xml:207 ../en/appB-mq-ref.xml:274 8.889 +#: ../en/appB-mq-ref.xml:345 ../en/appB-mq-ref.xml:414 8.890 +#: ../en/appB-mq-ref.xml:492 8.891 msgid "Options:" 8.892 msgstr "选项:" 8.893 8.894 @@ -198,6 +1017,22 @@ 8.895 #. type: Content of: <book><appendix><sect1><sect2><title> 8.896 #: ../en/appB-mq-ref.xml:75 8.897 msgid "" 8.898 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;move applied patches into " 8.899 +"repository history" 8.900 +msgstr "" 8.901 +"<command role=\"hg-ext-mq\">qfold</command>&emdash;将已应用的补丁提交到版本库" 8.902 + 8.903 +#. type: Content of: <book><appendix><sect1><sect2><para> 8.904 +#: ../en/appB-mq-ref.xml:78 8.905 +msgid "" 8.906 +"The <command>hg qfinish</command> command converts the specified applied " 8.907 +"patches into permanent changes by moving them out of MQ's control so that " 8.908 +"they will be treated as normal repository history." 8.909 +msgstr "" 8.910 + 8.911 +#. type: Content of: <book><appendix><sect1><sect2><title> 8.912 +#: ../en/appB-mq-ref.xml:85 8.913 +msgid "" 8.914 "<command role=\"hg-ext-mq\">qfold</command>&emdash;merge (<quote>fold</" 8.915 "quote>) several patches into one" 8.916 msgstr "" 8.917 @@ -205,7 +1040,7 @@ 8.918 "quote>)成一个" 8.919 8.920 #. type: Content of: <book><appendix><sect1><sect2><para> 8.921 -#: ../en/appB-mq-ref.xml:78 8.922 +#: ../en/appB-mq-ref.xml:88 8.923 msgid "" 8.924 "The <command role=\"hg-ext-mq\">qfold</command> command merges multiple " 8.925 "patches into the topmost applied patch, so that the topmost applied patch " 8.926 @@ -213,7 +1048,7 @@ 8.927 msgstr "" 8.928 8.929 #. type: Content of: <book><appendix><sect1><sect2><para> 8.930 -#: ../en/appB-mq-ref.xml:83 8.931 +#: ../en/appB-mq-ref.xml:93 8.932 msgid "" 8.933 "The patches to fold must not be applied; <command role=\"hg-ext-mq\">qfold</" 8.934 "command> will exit with an error if any is. The order in which patches are " 8.935 @@ -223,7 +1058,7 @@ 8.936 msgstr "" 8.937 8.938 #. type: Content of: <book><appendix><sect1><sect2><para> 8.939 -#: ../en/appB-mq-ref.xml:91 8.940 +#: ../en/appB-mq-ref.xml:101 8.941 msgid "" 8.942 "The comments from the folded patches are appended to the comments of the " 8.943 "destination patch, with each block of comments separated by three asterisk " 8.944 @@ -233,14 +1068,14 @@ 8.945 msgstr "" 8.946 8.947 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.948 -#: ../en/appB-mq-ref.xml:101 8.949 +#: ../en/appB-mq-ref.xml:111 8.950 msgid "" 8.951 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-e</option>: Edit the commit message " 8.952 "and patch description for the newly folded patch." 8.953 msgstr "" 8.954 8.955 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.956 -#: ../en/appB-mq-ref.xml:106 8.957 +#: ../en/appB-mq-ref.xml:116 8.958 msgid "" 8.959 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-l</option>: Use the contents of the " 8.960 "given file as the new commit message and patch description for the folded " 8.961 @@ -248,21 +1083,21 @@ 8.962 msgstr "" 8.963 8.964 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.965 -#: ../en/appB-mq-ref.xml:111 8.966 +#: ../en/appB-mq-ref.xml:121 8.967 msgid "" 8.968 "<option role=\"hg-ext-mq-cmd-qfold-opt\">-m</option>: Use the given text as " 8.969 "the new commit message and patch description for the folded patch." 8.970 msgstr "" 8.971 8.972 #. type: Content of: <book><appendix><sect1><sect2><title> 8.973 -#: ../en/appB-mq-ref.xml:119 8.974 +#: ../en/appB-mq-ref.xml:129 8.975 msgid "" 8.976 "<command role=\"hg-ext-mq\">qheader</command>&emdash;display the header/" 8.977 "description of a patch" 8.978 msgstr "<command role=\"hg-ext-mq\">qheader</command>—显示补丁头部描述" 8.979 8.980 #. type: Content of: <book><appendix><sect1><sect2><para> 8.981 -#: ../en/appB-mq-ref.xml:123 8.982 +#: ../en/appB-mq-ref.xml:133 8.983 msgid "" 8.984 "The <command role=\"hg-ext-mq\">qheader</command> command prints the header, " 8.985 "or description, of a patch. By default, it prints the header of the topmost " 8.986 @@ -270,14 +1105,14 @@ 8.987 msgstr "" 8.988 8.989 #. type: Content of: <book><appendix><sect1><sect2><title> 8.990 -#: ../en/appB-mq-ref.xml:130 8.991 +#: ../en/appB-mq-ref.xml:140 8.992 msgid "" 8.993 "<command role=\"hg-ext-mq\">qimport</command>&emdash;import a third-party " 8.994 "patch into the queue" 8.995 msgstr "<command role=\"hg-ext-mq\">qimport</command>—将第三方补丁导入队列" 8.996 8.997 #. type: Content of: <book><appendix><sect1><sect2><para> 8.998 -#: ../en/appB-mq-ref.xml:133 8.999 +#: ../en/appB-mq-ref.xml:143 8.1000 msgid "" 8.1001 "The <command role=\"hg-ext-mq\">qimport</command> command adds an entry for " 8.1002 "an external patch to the <filename role=\"special\">series</filename> file, " 8.1003 @@ -287,7 +1122,7 @@ 8.1004 msgstr "" 8.1005 8.1006 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1007 -#: ../en/appB-mq-ref.xml:141 8.1008 +#: ../en/appB-mq-ref.xml:151 8.1009 msgid "" 8.1010 "If the <filename role=\"special\" class=\"directory\">.hg/patches</filename> " 8.1011 "directory is a repository, <command role=\"hg-ext-mq\">qimport</command> " 8.1012 @@ -296,14 +1131,14 @@ 8.1013 msgstr "" 8.1014 8.1015 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1016 -#: ../en/appB-mq-ref.xml:149 8.1017 +#: ../en/appB-mq-ref.xml:159 8.1018 msgid "" 8.1019 "<command role=\"hg-ext-mq\">qinit</command>&emdash;prepare a repository to " 8.1020 "work with MQ" 8.1021 msgstr "<command role=\"hg-ext-mq\">qinit</command>—为使用 MQ 配置版本库" 8.1022 8.1023 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1024 -#: ../en/appB-mq-ref.xml:152 8.1025 +#: ../en/appB-mq-ref.xml:162 8.1026 msgid "" 8.1027 "The <command role=\"hg-ext-mq\">qinit</command> command prepares a repository " 8.1028 "to work with MQ. It creates a directory called <filename role=\"special\" " 8.1029 @@ -311,7 +1146,7 @@ 8.1030 msgstr "" 8.1031 8.1032 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1033 -#: ../en/appB-mq-ref.xml:159 8.1034 +#: ../en/appB-mq-ref.xml:169 8.1035 msgid "" 8.1036 "<option role=\"hg-ext-mq-cmd-qinit-opt\">-c</option>: Create <filename role=" 8.1037 "\"special\" class=\"directory\">.hg/patches</filename> as a repository in its " 8.1038 @@ -320,7 +1155,7 @@ 8.1039 msgstr "" 8.1040 8.1041 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1042 -#: ../en/appB-mq-ref.xml:169 8.1043 +#: ../en/appB-mq-ref.xml:179 8.1044 msgid "" 8.1045 "When the <filename role=\"special\" class=\"directory\">.hg/patches</" 8.1046 "filename> directory is a repository, the <command role=\"hg-ext-mq\">qimport</" 8.1047 @@ -329,12 +1164,12 @@ 8.1048 msgstr "" 8.1049 8.1050 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1051 -#: ../en/appB-mq-ref.xml:178 8.1052 +#: ../en/appB-mq-ref.xml:188 8.1053 msgid "<command role=\"hg-ext-mq\">qnew</command>&emdash;create a new patch" 8.1054 msgstr "<command role=\"hg-ext-mq\">qnew</command>—创建新补丁" 8.1055 8.1056 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1057 -#: ../en/appB-mq-ref.xml:181 8.1058 +#: ../en/appB-mq-ref.xml:191 8.1059 msgid "" 8.1060 "The <command role=\"hg-ext-mq\">qnew</command> command creates a new patch. " 8.1061 "It takes one mandatory argument, the name to use for the patch file. The " 8.1062 @@ -344,17 +1179,17 @@ 8.1063 msgstr "" 8.1064 8.1065 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1066 -#: ../en/appB-mq-ref.xml:189 8.1067 +#: ../en/appB-mq-ref.xml:199 8.1068 msgid "" 8.1069 "If <command role=\"hg-ext-mq\">qnew</command> finds modified files in the " 8.1070 "working directory, it will refuse to create a new patch unless the <option " 8.1071 "role=\"hg-ext-mq-cmd-qnew-opt\">-f</option> option is used (see below). This " 8.1072 -"behaviour allows you to <command role=\"hg-ext-mq\">qrefresh</command> your " 8.1073 +"behavior allows you to <command role=\"hg-ext-mq\">qrefresh</command> your " 8.1074 "topmost applied patch before you apply a new patch on top of it." 8.1075 msgstr "" 8.1076 8.1077 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1078 -#: ../en/appB-mq-ref.xml:199 8.1079 +#: ../en/appB-mq-ref.xml:209 8.1080 msgid "" 8.1081 "<option role=\"hg-ext-mq-cmd-qnew-opt\">-f</option>: Create a new patch if " 8.1082 "the contents of the working directory are modified. Any outstanding " 8.1083 @@ -363,7 +1198,7 @@ 8.1084 msgstr "" 8.1085 8.1086 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1087 -#: ../en/appB-mq-ref.xml:206 8.1088 +#: ../en/appB-mq-ref.xml:216 8.1089 msgid "" 8.1090 "<option role=\"hg-ext-mq-cmd-qnew-opt\">-m</option>: Use the given text as " 8.1091 "the commit message. This text will be stored at the beginning of the patch " 8.1092 @@ -371,14 +1206,14 @@ 8.1093 msgstr "" 8.1094 8.1095 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1096 -#: ../en/appB-mq-ref.xml:215 8.1097 +#: ../en/appB-mq-ref.xml:225 8.1098 msgid "" 8.1099 "<command role=\"hg-ext-mq\">qnext</command>&emdash;print the name of the next " 8.1100 "patch" 8.1101 msgstr "<command role=\"hg-ext-mq\">qnext</command>—显示下个补丁的名称" 8.1102 8.1103 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1104 -#: ../en/appB-mq-ref.xml:218 8.1105 +#: ../en/appB-mq-ref.xml:228 8.1106 msgid "" 8.1107 "The <command role=\"hg-ext-mq\">qnext</command> command prints the name name " 8.1108 "of the next patch in the <filename role=\"special\">series</filename> file " 8.1109 @@ -387,13 +1222,13 @@ 8.1110 msgstr "" 8.1111 8.1112 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1113 -#: ../en/appB-mq-ref.xml:227 8.1114 +#: ../en/appB-mq-ref.xml:237 8.1115 msgid "" 8.1116 "<command role=\"hg-ext-mq\">qpop</command>&emdash;pop patches off the stack" 8.1117 msgstr "<command role=\"hg-ext-mq\">qpop</command>—删除堆栈顶部的补丁" 8.1118 8.1119 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1120 -#: ../en/appB-mq-ref.xml:230 8.1121 +#: ../en/appB-mq-ref.xml:240 8.1122 msgid "" 8.1123 "The <command role=\"hg-ext-mq\">qpop</command> command removes applied " 8.1124 "patches from the top of the stack of applied patches. By default, it removes " 8.1125 @@ -401,7 +1236,7 @@ 8.1126 msgstr "" 8.1127 8.1128 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1129 -#: ../en/appB-mq-ref.xml:234 8.1130 +#: ../en/appB-mq-ref.xml:244 8.1131 msgid "" 8.1132 "This command removes the changesets that represent the popped patches from " 8.1133 "the repository, and updates the working directory to undo the effects of the " 8.1134 @@ -409,7 +1244,7 @@ 8.1135 msgstr "" 8.1136 8.1137 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1138 -#: ../en/appB-mq-ref.xml:238 8.1139 +#: ../en/appB-mq-ref.xml:248 8.1140 msgid "" 8.1141 "This command takes an optional argument, which it uses as the name or index " 8.1142 "of the patch to pop to. If given a name, it will pop patches until the named " 8.1143 @@ -421,7 +1256,7 @@ 8.1144 msgstr "" 8.1145 8.1146 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1147 -#: ../en/appB-mq-ref.xml:248 8.1148 +#: ../en/appB-mq-ref.xml:258 8.1149 msgid "" 8.1150 "The <command role=\"hg-ext-mq\">qpop</command> command does not read or write " 8.1151 "patches or the <filename role=\"special\">series</filename> file. It is thus " 8.1152 @@ -432,16 +1267,16 @@ 8.1153 msgstr "" 8.1154 8.1155 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1156 -#: ../en/appB-mq-ref.xml:257 8.1157 +#: ../en/appB-mq-ref.xml:267 8.1158 msgid "" 8.1159 "By default, the <command role=\"hg-ext-mq\">qpop</command> command will not " 8.1160 "pop any patches if the working directory has been modified. You can override " 8.1161 -"this behaviour using the <option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option> " 8.1162 +"this behavior using the <option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option> " 8.1163 "option, which reverts all modifications in the working directory." 8.1164 msgstr "" 8.1165 8.1166 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1167 -#: ../en/appB-mq-ref.xml:266 8.1168 +#: ../en/appB-mq-ref.xml:276 8.1169 msgid "" 8.1170 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-a</option>: Pop all applied " 8.1171 "patches. This returns the repository to its state before you applied any " 8.1172 @@ -449,21 +1284,21 @@ 8.1173 msgstr "" 8.1174 8.1175 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1176 -#: ../en/appB-mq-ref.xml:271 8.1177 +#: ../en/appB-mq-ref.xml:281 8.1178 msgid "" 8.1179 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option>: Forcibly revert any " 8.1180 "modifications to the working directory when popping." 8.1181 msgstr "" 8.1182 8.1183 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1184 -#: ../en/appB-mq-ref.xml:276 8.1185 +#: ../en/appB-mq-ref.xml:286 8.1186 msgid "" 8.1187 "<option role=\"hg-ext-mq-cmd-qpop-opt\">-n</option>: Pop a patch from the " 8.1188 "named queue." 8.1189 msgstr "" 8.1190 8.1191 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1192 -#: ../en/appB-mq-ref.xml:281 8.1193 +#: ../en/appB-mq-ref.xml:291 8.1194 msgid "" 8.1195 "The <command role=\"hg-ext-mq\">qpop</command> command removes one line from " 8.1196 "the end of the <filename role=\"special\">status</filename> file for each " 8.1197 @@ -471,14 +1306,14 @@ 8.1198 msgstr "" 8.1199 8.1200 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1201 -#: ../en/appB-mq-ref.xml:288 8.1202 +#: ../en/appB-mq-ref.xml:298 8.1203 msgid "" 8.1204 "<command role=\"hg-ext-mq\">qprev</command>&emdash;print the name of the " 8.1205 "previous patch" 8.1206 msgstr "<command role=\"hg-ext-mq\">qprev</command>—显示上个补丁的名称" 8.1207 8.1208 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1209 -#: ../en/appB-mq-ref.xml:291 8.1210 +#: ../en/appB-mq-ref.xml:301 8.1211 msgid "" 8.1212 "The <command role=\"hg-ext-mq\">qprev</command> command prints the name of " 8.1213 "the patch in the <filename role=\"special\">series</filename> file that comes " 8.1214 @@ -487,32 +1322,32 @@ 8.1215 msgstr "" 8.1216 8.1217 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1218 -#: ../en/appB-mq-ref.xml:300 8.1219 +#: ../en/appB-mq-ref.xml:310 8.1220 msgid "" 8.1221 "<command role=\"hg-ext-mq\">qpush</command>&emdash;push patches onto the stack" 8.1222 msgstr "<command role=\"hg-ext-mq\">qpush</command>—增加补丁到堆栈" 8.1223 8.1224 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1225 -#: ../en/appB-mq-ref.xml:303 8.1226 +#: ../en/appB-mq-ref.xml:313 8.1227 msgid "" 8.1228 "The <command role=\"hg-ext-mq\">qpush</command> command adds patches onto the " 8.1229 "applied stack. By default, it adds only one patch." 8.1230 msgstr "" 8.1231 8.1232 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1233 -#: ../en/appB-mq-ref.xml:307 8.1234 +#: ../en/appB-mq-ref.xml:317 8.1235 msgid "" 8.1236 "This command creates a new changeset to represent each applied patch, and " 8.1237 "updates the working directory to apply the effects of the patches." 8.1238 msgstr "" 8.1239 8.1240 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1241 -#: ../en/appB-mq-ref.xml:311 8.1242 +#: ../en/appB-mq-ref.xml:321 8.1243 msgid "The default data used when creating a changeset are as follows:" 8.1244 msgstr "" 8.1245 8.1246 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1247 -#: ../en/appB-mq-ref.xml:314 8.1248 +#: ../en/appB-mq-ref.xml:324 8.1249 msgid "" 8.1250 "The commit date and time zone are the current date and time zone. Because " 8.1251 "these data are used to compute the identity of a changeset, this means that " 8.1252 @@ -522,14 +1357,14 @@ 8.1253 msgstr "" 8.1254 8.1255 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1256 -#: ../en/appB-mq-ref.xml:322 8.1257 +#: ../en/appB-mq-ref.xml:332 8.1258 msgid "" 8.1259 "The author is the same as the default used by the <command role=\"hg-cmd\">hg " 8.1260 "commit</command> command." 8.1261 msgstr "" 8.1262 8.1263 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1264 -#: ../en/appB-mq-ref.xml:326 8.1265 +#: ../en/appB-mq-ref.xml:336 8.1266 msgid "" 8.1267 "The commit message is any text from the patch file that comes before the " 8.1268 "first diff header. If there is no such text, a default commit message is " 8.1269 @@ -537,14 +1372,14 @@ 8.1270 msgstr "" 8.1271 8.1272 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1273 -#: ../en/appB-mq-ref.xml:331 8.1274 -msgid "" 8.1275 -"If a patch contains a Mercurial patch header (XXX add link), the information " 8.1276 -"in the patch header overrides these defaults." 8.1277 +#: ../en/appB-mq-ref.xml:341 8.1278 +msgid "" 8.1279 +"If a patch contains a Mercurial patch header, the information in the patch " 8.1280 +"header overrides these defaults." 8.1281 msgstr "" 8.1282 8.1283 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1284 -#: ../en/appB-mq-ref.xml:337 8.1285 +#: ../en/appB-mq-ref.xml:347 8.1286 msgid "" 8.1287 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-a</option>: Push all unapplied " 8.1288 "patches from the <filename role=\"special\">series</filename> file until " 8.1289 @@ -552,14 +1387,14 @@ 8.1290 msgstr "" 8.1291 8.1292 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1293 -#: ../en/appB-mq-ref.xml:343 8.1294 +#: ../en/appB-mq-ref.xml:353 8.1295 msgid "" 8.1296 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-l</option>: Add the name of the " 8.1297 "patch to the end of the commit message." 8.1298 msgstr "" 8.1299 8.1300 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1301 -#: ../en/appB-mq-ref.xml:347 8.1302 +#: ../en/appB-mq-ref.xml:357 8.1303 msgid "" 8.1304 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-m</option>: If a patch fails to " 8.1305 "apply cleanly, use the entry for the patch in another saved queue to compute " 8.1306 @@ -569,14 +1404,14 @@ 8.1307 msgstr "" 8.1308 8.1309 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1310 -#: ../en/appB-mq-ref.xml:355 8.1311 +#: ../en/appB-mq-ref.xml:365 8.1312 msgid "" 8.1313 "<option role=\"hg-ext-mq-cmd-qpush-opt\">-n</option>: Use the named queue if " 8.1314 "merging while pushing." 8.1315 msgstr "" 8.1316 8.1317 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1318 -#: ../en/appB-mq-ref.xml:360 8.1319 +#: ../en/appB-mq-ref.xml:370 8.1320 msgid "" 8.1321 "The <command role=\"hg-ext-mq\">qpush</command> command reads, but does not " 8.1322 "modify, the <filename role=\"special\">series</filename> file. It appends " 8.1323 @@ -585,14 +1420,14 @@ 8.1324 msgstr "" 8.1325 8.1326 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1327 -#: ../en/appB-mq-ref.xml:368 8.1328 +#: ../en/appB-mq-ref.xml:378 8.1329 msgid "" 8.1330 "<command role=\"hg-ext-mq\">qrefresh</command>&emdash;update the topmost " 8.1331 "applied patch" 8.1332 msgstr "<command role=\"hg-ext-mq\">qrefresh</command>—更新最新的补丁" 8.1333 8.1334 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1335 -#: ../en/appB-mq-ref.xml:372 8.1336 +#: ../en/appB-mq-ref.xml:382 8.1337 msgid "" 8.1338 "The <command role=\"hg-ext-mq\">qrefresh</command> command updates the " 8.1339 "topmost applied patch. It modifies the patch, removes the old changeset that " 8.1340 @@ -601,28 +1436,28 @@ 8.1341 msgstr "" 8.1342 8.1343 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1344 -#: ../en/appB-mq-ref.xml:378 8.1345 +#: ../en/appB-mq-ref.xml:388 8.1346 msgid "" 8.1347 "The <command role=\"hg-ext-mq\">qrefresh</command> command looks for the " 8.1348 "following modifications:" 8.1349 msgstr "" 8.1350 8.1351 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1352 -#: ../en/appB-mq-ref.xml:381 8.1353 +#: ../en/appB-mq-ref.xml:391 8.1354 msgid "" 8.1355 "Changes to the commit message, i.e. the text before the first diff header in " 8.1356 "the patch file, are reflected in the new changeset that represents the patch." 8.1357 msgstr "" 8.1358 8.1359 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1360 -#: ../en/appB-mq-ref.xml:386 8.1361 +#: ../en/appB-mq-ref.xml:396 8.1362 msgid "" 8.1363 "Modifications to tracked files in the working directory are added to the " 8.1364 "patch." 8.1365 msgstr "" 8.1366 8.1367 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1368 -#: ../en/appB-mq-ref.xml:389 8.1369 +#: ../en/appB-mq-ref.xml:399 8.1370 msgid "" 8.1371 "Changes to the files tracked using <command role=\"hg-cmd\">hg add</command>, " 8.1372 "<command role=\"hg-cmd\">hg copy</command>, <command role=\"hg-cmd\">hg " 8.1373 @@ -632,7 +1467,7 @@ 8.1374 msgstr "" 8.1375 8.1376 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1377 -#: ../en/appB-mq-ref.xml:398 8.1378 +#: ../en/appB-mq-ref.xml:408 8.1379 msgid "" 8.1380 "Even if <command role=\"hg-ext-mq\">qrefresh</command> detects no changes, it " 8.1381 "still recreates the changeset that represents the patch. This causes the " 8.1382 @@ -641,33 +1476,33 @@ 8.1383 msgstr "" 8.1384 8.1385 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1386 -#: ../en/appB-mq-ref.xml:406 8.1387 +#: ../en/appB-mq-ref.xml:416 8.1388 msgid "" 8.1389 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-e</option>: Modify the commit " 8.1390 "and patch description, using the preferred text editor." 8.1391 msgstr "" 8.1392 8.1393 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1394 -#: ../en/appB-mq-ref.xml:411 8.1395 +#: ../en/appB-mq-ref.xml:421 8.1396 msgid "" 8.1397 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-m</option>: Modify the commit " 8.1398 "message and patch description, using the given text." 8.1399 msgstr "" 8.1400 8.1401 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1402 -#: ../en/appB-mq-ref.xml:416 8.1403 +#: ../en/appB-mq-ref.xml:426 8.1404 msgid "" 8.1405 "<option role=\"hg-ext-mq-cmd-qrefresh-opt\">-l</option>: Modify the commit " 8.1406 "message and patch description, using text from the given file." 8.1407 msgstr "" 8.1408 8.1409 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1410 -#: ../en/appB-mq-ref.xml:424 8.1411 +#: ../en/appB-mq-ref.xml:434 8.1412 msgid "<command role=\"hg-ext-mq\">qrename</command>&emdash;rename a patch" 8.1413 msgstr "<command role=\"hg-ext-mq\">qrename</command>—改名补丁" 8.1414 8.1415 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1416 -#: ../en/appB-mq-ref.xml:427 8.1417 +#: ../en/appB-mq-ref.xml:437 8.1418 msgid "" 8.1419 "The <command role=\"hg-ext-mq\">qrename</command> command renames a patch, " 8.1420 "and changes the entry for the patch in the <filename role=\"special\">series</" 8.1421 @@ -675,7 +1510,7 @@ 8.1422 msgstr "" 8.1423 8.1424 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1425 -#: ../en/appB-mq-ref.xml:431 8.1426 +#: ../en/appB-mq-ref.xml:441 8.1427 msgid "" 8.1428 "With a single argument, <command role=\"hg-ext-mq\">qrename</command> renames " 8.1429 "the topmost applied patch. With two arguments, it renames its first argument " 8.1430 @@ -683,37 +1518,14 @@ 8.1431 msgstr "" 8.1432 8.1433 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1434 -#: ../en/appB-mq-ref.xml:438 8.1435 -msgid "" 8.1436 -"<command role=\"hg-ext-mq\">qrestore</command>&emdash;restore saved queue " 8.1437 -"state" 8.1438 -msgstr "<command role=\"hg-ext-mq\">qrestore</command>—恢复保存的队列" 8.1439 - 8.1440 -#. type: Content of: <book><appendix><sect1><sect2><para> 8.1441 -#: ../en/appB-mq-ref.xml:442 8.1442 -msgid "XXX No idea what this does." 8.1443 -msgstr "" 8.1444 - 8.1445 -#. type: Content of: <book><appendix><sect1><sect2><title> 8.1446 -#: ../en/appB-mq-ref.xml:446 8.1447 -msgid "" 8.1448 -"<command role=\"hg-ext-mq\">qsave</command>&emdash;save current queue state" 8.1449 -msgstr "<command role=\"hg-ext-mq\">qsave</command>—保存当前的队列状态" 8.1450 - 8.1451 -#. type: Content of: <book><appendix><sect1><sect2><para> 8.1452 -#: ../en/appB-mq-ref.xml:449 8.1453 -msgid "XXX Likewise." 8.1454 -msgstr "" 8.1455 - 8.1456 -#. type: Content of: <book><appendix><sect1><sect2><title> 8.1457 -#: ../en/appB-mq-ref.xml:453 8.1458 +#: ../en/appB-mq-ref.xml:448 8.1459 msgid "" 8.1460 "<command role=\"hg-ext-mq\">qseries</command>&emdash;print the entire patch " 8.1461 "series" 8.1462 msgstr "<command role=\"hg-ext-mq\">qseries</command>—显示补丁序列" 8.1463 8.1464 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1465 -#: ../en/appB-mq-ref.xml:456 8.1466 +#: ../en/appB-mq-ref.xml:451 8.1467 msgid "" 8.1468 "The <command role=\"hg-ext-mq\">qseries</command> command prints the entire " 8.1469 "patch series from the <filename role=\"special\">series</filename> file. It " 8.1470 @@ -722,28 +1534,28 @@ 8.1471 msgstr "" 8.1472 8.1473 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1474 -#: ../en/appB-mq-ref.xml:464 8.1475 +#: ../en/appB-mq-ref.xml:459 8.1476 msgid "" 8.1477 "<command role=\"hg-ext-mq\">qtop</command>&emdash;print the name of the " 8.1478 "current patch" 8.1479 msgstr "<command role=\"hg-ext-mq\">qtop</command>—显示当前补丁的名称" 8.1480 8.1481 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1482 -#: ../en/appB-mq-ref.xml:467 8.1483 +#: ../en/appB-mq-ref.xml:462 8.1484 msgid "" 8.1485 "The <command role=\"hg-ext-mq\">qtop</command> prints the name of the topmost " 8.1486 "currently applied patch." 8.1487 msgstr "" 8.1488 8.1489 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1490 -#: ../en/appB-mq-ref.xml:472 8.1491 +#: ../en/appB-mq-ref.xml:467 8.1492 msgid "" 8.1493 "<command role=\"hg-ext-mq\">qunapplied</command>&emdash;print patches not yet " 8.1494 "applied" 8.1495 msgstr "<command role=\"hg-ext-mq\">qunapplied</command>—显示尚未应用的补丁" 8.1496 8.1497 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1498 -#: ../en/appB-mq-ref.xml:476 8.1499 +#: ../en/appB-mq-ref.xml:471 8.1500 msgid "" 8.1501 "The <command role=\"hg-ext-mq\">qunapplied</command> command prints the names " 8.1502 "of patches from the <filename role=\"special\">series</filename> file that " 8.1503 @@ -752,14 +1564,14 @@ 8.1504 msgstr "" 8.1505 8.1506 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1507 -#: ../en/appB-mq-ref.xml:484 8.1508 +#: ../en/appB-mq-ref.xml:479 8.1509 msgid "" 8.1510 "<command role=\"hg-cmd\">hg strip</command>&emdash;remove a revision and " 8.1511 "descendants" 8.1512 msgstr "<command role=\"hg-cmd\">hg strip</command>—删除一个版本及其后继" 8.1513 8.1514 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1515 -#: ../en/appB-mq-ref.xml:487 8.1516 +#: ../en/appB-mq-ref.xml:482 8.1517 msgid "" 8.1518 "The <command role=\"hg-cmd\">hg strip</command> command removes a revision, " 8.1519 "and all of its descendants, from the repository. It undoes the effects of " 8.1520 @@ -768,7 +1580,7 @@ 8.1521 msgstr "" 8.1522 8.1523 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1524 -#: ../en/appB-mq-ref.xml:493 8.1525 +#: ../en/appB-mq-ref.xml:488 8.1526 msgid "" 8.1527 "The <command role=\"hg-cmd\">hg strip</command> command saves a backup of the " 8.1528 "removed changesets in a bundle, so that they can be reapplied if removed in " 8.1529 @@ -776,37 +1588,36 @@ 8.1530 msgstr "" 8.1531 8.1532 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1533 -#: ../en/appB-mq-ref.xml:499 8.1534 +#: ../en/appB-mq-ref.xml:494 8.1535 msgid "" 8.1536 "<option role=\"hg-opt-strip\">-b</option>: Save unrelated changesets that are " 8.1537 "intermixed with the stripped changesets in the backup bundle." 8.1538 msgstr "" 8.1539 8.1540 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1541 -#: ../en/appB-mq-ref.xml:503 8.1542 +#: ../en/appB-mq-ref.xml:498 8.1543 msgid "" 8.1544 "<option role=\"hg-opt-strip\">-f</option>: If a branch has multiple heads, " 8.1545 -"remove all heads. XXX This should be renamed, and use <literal>-f</literal> " 8.1546 -"to strip revs when there are pending changes." 8.1547 +"remove all heads." 8.1548 msgstr "" 8.1549 8.1550 #. type: Content of: <book><appendix><sect1><sect2><itemizedlist><listitem><para> 8.1551 +#: ../en/appB-mq-ref.xml:501 8.1552 +msgid "<option role=\"hg-opt-strip\">-n</option>: Do not save a backup bundle." 8.1553 +msgstr "" 8.1554 + 8.1555 +#. type: Content of: <book><appendix><sect1><title> 8.1556 #: ../en/appB-mq-ref.xml:508 8.1557 -msgid "<option role=\"hg-opt-strip\">-n</option>: Do not save a backup bundle." 8.1558 -msgstr "" 8.1559 - 8.1560 -#. type: Content of: <book><appendix><sect1><title> 8.1561 -#: ../en/appB-mq-ref.xml:515 8.1562 msgid "MQ file reference" 8.1563 msgstr "MQ 文件参考" 8.1564 8.1565 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1566 -#: ../en/appB-mq-ref.xml:518 8.1567 +#: ../en/appB-mq-ref.xml:511 8.1568 msgid "The <filename role=\"special\">series</filename> file" 8.1569 msgstr "<filename role=\"special\">序列</filename>文件" 8.1570 8.1571 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1572 -#: ../en/appB-mq-ref.xml:521 8.1573 +#: ../en/appB-mq-ref.xml:514 8.1574 msgid "" 8.1575 "The <filename role=\"special\">series</filename> file contains a list of the " 8.1576 "names of all patches that MQ can apply. It is represented as a list of " 8.1577 @@ -815,7 +1626,7 @@ 8.1578 msgstr "" 8.1579 8.1580 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1581 -#: ../en/appB-mq-ref.xml:527 8.1582 +#: ../en/appB-mq-ref.xml:520 8.1583 msgid "" 8.1584 "Lines may contain comments. A comment begins with the <quote><literal>#</" 8.1585 "literal></quote> character, and extends to the end of the line. Empty lines, " 8.1586 @@ -823,7 +1634,7 @@ 8.1587 msgstr "" 8.1588 8.1589 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1590 -#: ../en/appB-mq-ref.xml:532 8.1591 +#: ../en/appB-mq-ref.xml:525 8.1592 msgid "" 8.1593 "You will often need to edit the <filename role=\"special\">series</filename> " 8.1594 "file by hand, hence the support for comments and empty lines noted above. " 8.1595 @@ -834,7 +1645,7 @@ 8.1596 msgstr "" 8.1597 8.1598 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1599 -#: ../en/appB-mq-ref.xml:541 8.1600 +#: ../en/appB-mq-ref.xml:534 8.1601 msgid "" 8.1602 "Placing the <filename role=\"special\">series</filename> file under revision " 8.1603 "control is also supported; it is a good idea to place all of the patches that " 8.1604 @@ -845,12 +1656,12 @@ 8.1605 msgstr "" 8.1606 8.1607 #. type: Content of: <book><appendix><sect1><sect2><title> 8.1608 -#: ../en/appB-mq-ref.xml:551 8.1609 +#: ../en/appB-mq-ref.xml:544 8.1610 msgid "The <filename role=\"special\">status</filename> file" 8.1611 msgstr "<filename role=\"special\">状态</filename>文件" 8.1612 8.1613 #. type: Content of: <book><appendix><sect1><sect2><para> 8.1614 -#: ../en/appB-mq-ref.xml:554 8.1615 +#: ../en/appB-mq-ref.xml:547 8.1616 msgid "" 8.1617 "The <filename role=\"special\">status</filename> file contains the names and " 8.1618 "changeset hashes of all patches that MQ currently has applied. Unlike the " 8.1619 @@ -875,6 +1686,8 @@ 8.1620 "If you are using a Unix-like system that has a sufficiently recent version of " 8.1621 "Python (2.3 or newer) available, it is easy to install Mercurial from source." 8.1622 msgstr "" 8.1623 +"如果你使用类 Unix 系统,并且有足够新的 Python (2.3 更新),从源代码安装 " 8.1624 +"Mercurial 就很容易了。" 8.1625 8.1626 #. type: Content of: <book><appendix><sect1><orderedlist><listitem><para> 8.1627 #: ../en/appC-srcinstall.xml:14 8.1628 @@ -882,18 +1695,20 @@ 8.1629 "Download a recent source tarball from <ulink url=\"http://www.selenic.com/" 8.1630 "mercurial/download\">http://www.selenic.com/mercurial/download</ulink>." 8.1631 msgstr "" 8.1632 +"从 <ulink url=\"http://www.selenic.com/mercurial/download\">http://www." 8.1633 +"selenic.com/mercurial/download</ulink> 下载最新的源代码。" 8.1634 8.1635 #. type: Content of: <book><appendix><sect1><orderedlist><listitem><para> 8.1636 #: ../en/appC-srcinstall.xml:17 8.1637 msgid "Unpack the tarball:" 8.1638 -msgstr "" 8.1639 +msgstr "解压:" 8.1640 8.1641 #. type: Content of: <book><appendix><sect1><orderedlist><listitem><para> 8.1642 #: ../en/appC-srcinstall.xml:20 8.1643 msgid "" 8.1644 "Go into the source directory and run the installer script. This will build " 8.1645 "Mercurial and install it in your home directory." 8.1646 -msgstr "" 8.1647 +msgstr "进入源代码目录,执行安装教本。这会构建 Mercurial,安装到你的家目录。" 8.1648 8.1649 #. type: Content of: <book><appendix><sect1><para> 8.1650 #: ../en/appC-srcinstall.xml:27 8.1651 @@ -902,6 +1717,8 @@ 8.1652 "subdirectory of your home directory. Don't forget to make sure that this " 8.1653 "directory is present in your shell's search path." 8.1654 msgstr "" 8.1655 +"安装完成后,Mercurial 就位于家目录的 <literal>bin</literal> 子目录。不要忘记将" 8.1656 +"这个目录加入到你的可执行文件搜索路径中。" 8.1657 8.1658 #. type: Content of: <book><appendix><sect1><para> 8.1659 #: ../en/appC-srcinstall.xml:32 8.1660 @@ -915,6 +1732,11 @@ 8.1661 "see where the contents of the <literal>mercurial</literal> directory were " 8.1662 "installed to." 8.1663 msgstr "" 8.1664 +"你可能需要设置环境变量 <envar>PYTHONPATH</envar>,以便 Mercurial 可执行文件能" 8.1665 +"找到 Mercurial 包。例如,在我的笔记本电脑中,必须设置为 <literal>/home/bos/" 8.1666 +"lib/python</literal>。你需要使用的路径依赖于 Python 的构建方式,这很容易找出" 8.1667 +"来。如果你不确定,仔细察看上面的安装脚本输出,检查包含 <literal>mercurial</" 8.1668 +"literal> 目录的内容的安装位置。" 8.1669 8.1670 #. type: Content of: <book><appendix><sect1><title> 8.1671 #: ../en/appC-srcinstall.xml:44 8.1672 @@ -930,6 +1752,9 @@ 8.1673 "user</quote>. Unless you intend to hack on Mercurial, I strongly suggest " 8.1674 "that you use a binary package instead." 8.1675 msgstr "" 8.1676 +"在 Windows 中构建和安装 Mercurial 需要各种工具,相当多的技术背景,以及足够的耐" 8.1677 +"心。如果你是一个<quote>初级用户</quote>,我<emphasis>很不赞成</emphasis>这个方" 8.1678 +"法。我强烈建议你使用二进制安装包,除非你想深入研究 Mercurial 本身。" 8.1679 8.1680 #. type: Content of: <book><appendix><sect1><para> 8.1681 #: ../en/appC-srcinstall.xml:53 8.1682 @@ -940,16 +1765,21 @@ 8.1683 "selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, and expect the " 8.1684 "process to involve a lot of fiddly work." 8.1685 msgstr "" 8.1686 +"If you are intent on building Mercurial from source on Windows, follow the " 8.1687 +"<quote>hard way</quote> directions on the Mercurial wiki at <ulink url=" 8.1688 +"\"http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall\">http://www." 8.1689 +"selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, and expect the " 8.1690 +"process to involve a lot of fiddly work." 8.1691 8.1692 #. type: Content of: <book><appendix><title> 8.1693 #: ../en/appD-license.xml:5 8.1694 msgid "Open Publication License" 8.1695 -msgstr "" 8.1696 +msgstr "开放出版协议" 8.1697 8.1698 #. type: Content of: <book><appendix><para> 8.1699 #: ../en/appD-license.xml:7 8.1700 msgid "Version 1.0, 8 June 1999" 8.1701 -msgstr "" 8.1702 +msgstr "版本 1.0,1999 年 6 月 8 日。" 8.1703 8.1704 #. type: Content of: <book><appendix><sect1><title> 8.1705 #: ../en/appD-license.xml:10 8.1706 @@ -1195,11 +2025,362 @@ 8.1707 8.1708 #. type: Content of: <book><preface><sect1><title> 8.1709 #: ../en/ch00-preface.xml:8 8.1710 +msgid "Technical storytelling" 8.1711 +msgstr "技术背景" 8.1712 + 8.1713 +#. type: Content of: <book><preface><sect1><para> 8.1714 +#: ../en/ch00-preface.xml:10 8.1715 +msgid "" 8.1716 +"A few years ago, when I wanted to explain why I believed that distributed " 8.1717 +"revision control is important, the field was then so new that there was " 8.1718 +"almost no published literature to refer people to." 8.1719 +msgstr "" 8.1720 + 8.1721 +#. type: Content of: <book><preface><sect1><para> 8.1722 +#: ../en/ch00-preface.xml:15 8.1723 +msgid "" 8.1724 +"Although at that time I spent some time working on the internals of Mercurial " 8.1725 +"itself, I switched to writing this book because that seemed like the most " 8.1726 +"effective way to help the software to reach a wide audience, along with the " 8.1727 +"idea that revision control ought to be distributed in nature. I publish the " 8.1728 +"book online under a liberal license for the same reason: to get the word out." 8.1729 +msgstr "" 8.1730 + 8.1731 +#. type: Content of: <book><preface><sect1><para> 8.1732 +#: ../en/ch00-preface.xml:23 8.1733 +msgid "" 8.1734 +"There's a familiar rhythm to a good software book that closely resembles " 8.1735 +"telling a story: What is this thing? Why does it matter? How will it help me? " 8.1736 +"How do I use it? In this book, I try to answer those questions for " 8.1737 +"distributed revision control in general, and for Mercurial in particular." 8.1738 +msgstr "" 8.1739 + 8.1740 +#. type: Content of: <book><preface><sect1><title> 8.1741 +#: ../en/ch00-preface.xml:31 8.1742 +msgid "Thank you for supporting Mercurial" 8.1743 +msgstr "谢谢你支持 Mercurial" 8.1744 + 8.1745 +#. type: Content of: <book><preface><sect1><para> 8.1746 +#: ../en/ch00-preface.xml:33 8.1747 +msgid "" 8.1748 +"By purchasing a copy of this book, you are supporting the continued " 8.1749 +"development and freedom of Mercurial in particular, and of open source and " 8.1750 +"free software in general. O'Reilly Media and I are donating my royalties on " 8.1751 +"the sales of this book to the Software Freedom Conservancy (<ulink url=" 8.1752 +"\"http://www.softwarefreedom.org/\">http://www.softwarefreedom.org/</ulink>) " 8.1753 +"which provides clerical and legal support to Mercurial and a number of other " 8.1754 +"prominent and worthy open source software projects." 8.1755 +msgstr "" 8.1756 + 8.1757 +#. type: Content of: <book><preface><sect1><title> 8.1758 +#: ../en/ch00-preface.xml:45 8.1759 +msgid "Acknowledgments" 8.1760 +msgstr "致谢" 8.1761 + 8.1762 +#. type: Content of: <book><preface><sect1><para> 8.1763 +#: ../en/ch00-preface.xml:47 8.1764 +msgid "" 8.1765 +"This book would not exist were it not for the efforts of Matt Mackall, the " 8.1766 +"author and project lead of Mercurial. He is ably assisted by hundreds of " 8.1767 +"volunteer contributors across the world." 8.1768 +msgstr "" 8.1769 + 8.1770 +#. type: Content of: <book><preface><sect1><para> 8.1771 +#: ../en/ch00-preface.xml:52 8.1772 +msgid "" 8.1773 +"My children, Cian and Ruairi, always stood ready to help me to unwind with " 8.1774 +"wonderful, madcap little-boy games. I'd also like to thank my ex-wife, " 8.1775 +"Shannon, for her support." 8.1776 +msgstr "" 8.1777 + 8.1778 +#. type: Content of: <book><preface><sect1><para> 8.1779 +#: ../en/ch00-preface.xml:56 8.1780 +msgid "" 8.1781 +"My colleagues and friends provided help and support in innumerable ways. " 8.1782 +"This list of people is necessarily very incomplete: Stephen Hahn, Karyn " 8.1783 +"Ritter, Bonnie Corwin, James Vasile, Matt Norwood, Eben Moglen, Bradley Kuhn, " 8.1784 +"Robert Walsh, Jeremy Fitzhardinge, Rachel Chalmers." 8.1785 +msgstr "" 8.1786 + 8.1787 +#. type: Content of: <book><preface><sect1><para> 8.1788 +#: ../en/ch00-preface.xml:62 8.1789 +msgid "" 8.1790 +"I developed this book in the open, posting drafts of chapters to the book web " 8.1791 +"site as I completed them. Readers then submitted feedback using a web " 8.1792 +"application that I developed. By the time I finished writing the book, more " 8.1793 +"than 100 people had submitted comments, an amazing number considering that " 8.1794 +"the comment system was live for only about two months towards the end of the " 8.1795 +"writing process." 8.1796 +msgstr "" 8.1797 + 8.1798 +#. type: Content of: <book><preface><sect1><para> 8.1799 +#: ../en/ch00-preface.xml:70 8.1800 +msgid "" 8.1801 +"I would particularly like to recognize the following people, who between them " 8.1802 +"contributed over a third of the total number of comments. I would like to " 8.1803 +"thank them for their care and effort in providing so much detailed feedback." 8.1804 +msgstr "" 8.1805 + 8.1806 +#. type: Content of: <book><preface><sect1><para> 8.1807 +#: ../en/ch00-preface.xml:75 8.1808 +msgid "" 8.1809 +"Martin Geisler, Damien Cassou, Alexey Bakhirkin, Till Plewe, Dan Himes, Paul " 8.1810 +"Sargent, Gokberk Hamurcu, Matthijs van der Vleuten, Michael Chermside, John " 8.1811 +"Mulligan, Jordi Fita, Jon Parise." 8.1812 +msgstr "" 8.1813 + 8.1814 +#. type: Content of: <book><preface><sect1><para> 8.1815 +#: ../en/ch00-preface.xml:80 8.1816 +msgid "" 8.1817 +"I also want to acknowledge the help of the many people who caught errors and " 8.1818 +"provided helpful suggestions throughout the book." 8.1819 +msgstr "" 8.1820 + 8.1821 +#. type: Content of: <book><preface><sect1><para> 8.1822 +#: ../en/ch00-preface.xml:84 8.1823 +msgid "" 8.1824 +"Jeremy W. Sherman, Brian Mearns, Vincent Furia, Iwan Luijks, Billy Edwards, " 8.1825 +"Andreas Sliwka, Paweł Sołyga, Eric Hanchrow, Steve Nicolai, Michał Masłowski, " 8.1826 +"Kevin Fitch, Johan Holmberg, Hal Wine, Volker Simonis, Thomas P Jakobsen, Ted " 8.1827 +"Stresen-Reuter, Stephen Rasku, Raphael Das Gupta, Ned Batchelder, Lou Keeble, " 8.1828 +"Li Linxiao, Kao Cardoso Félix, Joseph Wecker, Jon Prescot, Jon Maken, John " 8.1829 +"Yeary, Jason Harris, Geoffrey Zheng, Fredrik Jonson, Ed Davies, David " 8.1830 +"Zumbrunnen, David Mercer, David Cabana, Ben Karel, Alan Franzoni, Yousry " 8.1831 +"Abdallah, Whitney Young, Vinay Sajip, Tom Towle, Tim Ottinger, Thomas " 8.1832 +"Schraitle, Tero Saarni, Ted Mielczarek, Svetoslav Agafonkin, Shaun Rowland, " 8.1833 +"Rocco Rutte, Polo-Francois Poli, Philip Jenvey, Petr Tesałék, Peter R. " 8.1834 +"Annema, Paul Bonser, Olivier Scherler, Olivier Fournier, Nick Parker, Nick " 8.1835 +"Fabry, Nicholas Guarracino, Mike Driscoll, Mike Coleman, Mietek Bák, Michael " 8.1836 +"Maloney, László Nagy, Kent Johnson, Julio Nobrega, Jord Fita, Jonathan March, " 8.1837 +"Jonas Nockert, Jim Tittsler, Jeduan Cornejo Legorreta, Jan Larres, James " 8.1838 +"Murphy, Henri Wiechers, Hagen Möbius, Gábor Farkas, Fabien Engels, Evert Rol, " 8.1839 +"Evan Willms, Eduardo Felipe Castegnaro, Dennis Decker Jensen, Deniz Dogan, " 8.1840 +"David Smith, Daed Lee, Christine Slotty, Charles Merriam, Guillaume Catto, " 8.1841 +"Brian Dorsey, Bob Nystrom, Benoit Boissinot, Avi Rosenschein, Andrew Watts, " 8.1842 +"Andrew Donkin, Alexey Rodriguez, Ahmed Chaudhary." 8.1843 +msgstr "" 8.1844 + 8.1845 +#. type: Content of: <book><preface><sect1><title> 8.1846 +#: ../en/ch00-preface.xml:111 8.1847 +msgid "Conventions Used in This Book" 8.1848 +msgstr "本书的约定" 8.1849 + 8.1850 +#. type: Content of: <book><preface><sect1><para> 8.1851 +#: ../en/ch00-preface.xml:113 8.1852 +msgid "The following typographical conventions are used in this book:" 8.1853 +msgstr "本书使用如下的印刷约定:" 8.1854 + 8.1855 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 8.1856 +#: ../en/ch00-preface.xml:118 8.1857 +msgid "Italic" 8.1858 +msgstr "斜体" 8.1859 + 8.1860 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 8.1861 +#: ../en/ch00-preface.xml:121 8.1862 +msgid "" 8.1863 +"Indicates new terms, URLs, email addresses, filenames, and file extensions." 8.1864 +msgstr "标识新术语,URL,电子邮件地址,文件名称与扩展名。" 8.1865 + 8.1866 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 8.1867 +#: ../en/ch00-preface.xml:127 8.1868 +msgid "<literal>Constant width</literal>" 8.1869 +msgstr "<literal>等宽</literal>" 8.1870 + 8.1871 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 8.1872 +#: ../en/ch00-preface.xml:130 8.1873 +msgid "" 8.1874 +"Used for program listings, as well as within paragraphs to refer to program " 8.1875 +"elements such as variable or function names, databases, data types, " 8.1876 +"environment variables, statements, and keywords." 8.1877 +msgstr "" 8.1878 +"用于程序列表,以及段内引用的程序元素,例如变量、函数名称、数据库、数据类型、环" 8.1879 +"境变量、声明和关键字。" 8.1880 + 8.1881 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 8.1882 +#: ../en/ch00-preface.xml:138 8.1883 +msgid "<userinput>Constant width bold</userinput>" 8.1884 +msgstr "<userinput>等宽粗体</userinput>" 8.1885 + 8.1886 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 8.1887 +#: ../en/ch00-preface.xml:141 8.1888 +msgid "Shows commands or other text that should be typed literally by the user." 8.1889 +msgstr "标识命令或者其它用户应该逐字输入的文本。" 8.1890 + 8.1891 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><term> 8.1892 +#: ../en/ch00-preface.xml:147 8.1893 +msgid "<replaceable>Constant width italic</replaceable>" 8.1894 +msgstr "<replaceable>等宽斜体</replaceable>" 8.1895 + 8.1896 +#. type: Content of: <book><preface><sect1><variablelist><varlistentry><listitem><para> 8.1897 +#: ../en/ch00-preface.xml:150 8.1898 +msgid "" 8.1899 +"Shows text that should be replaced with user-supplied values or by values " 8.1900 +"determined by context." 8.1901 +msgstr "标识应该被用户提供的值或者取决于上下文的值替换的文本。" 8.1902 + 8.1903 +#. type: Content of: <book><preface><sect1><tip><para> 8.1904 +#: ../en/ch00-preface.xml:157 8.1905 +msgid "This icon signifies a tip, suggestion, or general note." 8.1906 +msgstr "此图标表示提示,建议或者一般的的注释。" 8.1907 + 8.1908 +#. type: Content of: <book><preface><sect1><caution><para> 8.1909 +#: ../en/ch00-preface.xml:162 8.1910 +msgid "This icon indicates a warning or caution." 8.1911 +msgstr "此图标表示警告。" 8.1912 + 8.1913 +#. type: Content of: <book><preface><sect1><title> 8.1914 +#: ../en/ch00-preface.xml:167 8.1915 +msgid "Using Code Examples" 8.1916 +msgstr "使用样例代码" 8.1917 + 8.1918 +#. type: Content of: <book><preface><sect1><para> 8.1919 +#: ../en/ch00-preface.xml:169 8.1920 +msgid "" 8.1921 +"This book is here to help you get your job done. In general, you may use the " 8.1922 +"code in this book in your programs and documentation. You do not need to " 8.1923 +"contact us for permission unless you’re reproducing a significant portion of " 8.1924 +"the code. For example, writing a program that uses several chunks of code " 8.1925 +"from this book does not require permission. Selling or distributing a CD-ROM " 8.1926 +"of examples from O’Reilly books does require permission. Answering a " 8.1927 +"question by citing this book and quoting example code does not require " 8.1928 +"permission. Incorporating a significant amount of example code from this book " 8.1929 +"into your product’s documentation does require permission." 8.1930 +msgstr "" 8.1931 + 8.1932 +#. type: Content of: <book><preface><sect1><para> 8.1933 +#: ../en/ch00-preface.xml:181 8.1934 +msgid "" 8.1935 +"We appreciate, but do not require, attribution. An attribution usually " 8.1936 +"includes the title, author, publisher, and ISBN. For example: “<emphasis>Book " 8.1937 +"Title</emphasis> by Some Author. Copyright 2008 O’Reilly Media, Inc., 978-0-" 8.1938 +"596-xxxx-x.”" 8.1939 +msgstr "" 8.1940 + 8.1941 +#. type: Content of: <book><preface><sect1><para> 8.1942 +#: ../en/ch00-preface.xml:187 8.1943 +msgid "" 8.1944 +"If you feel your use of code examples falls outside fair use or the " 8.1945 +"permission given above, feel free to contact us at <email>permissions@oreilly." 8.1946 +"com</email>." 8.1947 +msgstr "" 8.1948 + 8.1949 +#. type: Content of: <book><preface><sect1><title> 8.1950 +#: ../en/ch00-preface.xml:193 8.1951 +msgid "Safari® Books Online" 8.1952 +msgstr "Safari® 在线书库" 8.1953 + 8.1954 +#. type: Content of: <book><preface><sect1><note><para> 8.1955 +#: ../en/ch00-preface.xml:196 8.1956 +msgid "" 8.1957 +"When you see a Safari® Books Online icon on the cover of your favorite " 8.1958 +"technology book, that means the book is available online through the O’Reilly " 8.1959 +"Network Safari Bookshelf." 8.1960 +msgstr "" 8.1961 + 8.1962 +#. type: Content of: <book><preface><sect1><para> 8.1963 +#: ../en/ch00-preface.xml:202 8.1964 +msgid "" 8.1965 +"Safari offers a solution that’s better than e-books. It’s a virtual library " 8.1966 +"that lets you easily search thousands of top tech books, cut and paste code " 8.1967 +"samples, download chapters, and find quick answers when you need the most " 8.1968 +"accurate, current information. Try it for free at <ulink role=\"orm:hideurl:" 8.1969 +"ital\" url=\"http://my.safaribooksonline.com/?portal=oreilly\">http://my." 8.1970 +"safaribooksonline.com</ulink>." 8.1971 +msgstr "" 8.1972 + 8.1973 +#. type: Content of: <book><preface><sect1><title> 8.1974 +#: ../en/ch00-preface.xml:211 8.1975 +msgid "How to Contact Us" 8.1976 +msgstr "联系我们" 8.1977 + 8.1978 +#. type: Content of: <book><preface><sect1><para> 8.1979 +#: ../en/ch00-preface.xml:213 8.1980 +msgid "" 8.1981 +"Please address comments and questions concerning this book to the publisher:" 8.1982 +msgstr "" 8.1983 + 8.1984 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.1985 +#: ../en/ch00-preface.xml:217 8.1986 +msgid "O’Reilly Media, Inc." 8.1987 +msgstr "" 8.1988 + 8.1989 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.1990 +#: ../en/ch00-preface.xml:219 8.1991 +msgid "1005 Gravenstein Highway North" 8.1992 +msgstr "" 8.1993 + 8.1994 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.1995 +#: ../en/ch00-preface.xml:221 8.1996 +msgid "Sebastopol, CA 95472" 8.1997 +msgstr "" 8.1998 + 8.1999 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2000 +#: ../en/ch00-preface.xml:223 8.2001 +msgid "800-998-9938 (in the United States or Canada)" 8.2002 +msgstr "" 8.2003 + 8.2004 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2005 +#: ../en/ch00-preface.xml:225 8.2006 +msgid "707-829-0515 (international or local)" 8.2007 +msgstr "" 8.2008 + 8.2009 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2010 +#: ../en/ch00-preface.xml:227 8.2011 +msgid "707 829-0104 (fax)" 8.2012 +msgstr "" 8.2013 + 8.2014 +#. type: Content of: <book><preface><sect1><para> 8.2015 +#: ../en/ch00-preface.xml:230 8.2016 +msgid "" 8.2017 +"We have a web page for this book, where we list errata, examples, and any " 8.2018 +"additional information. You can access this page at:" 8.2019 +msgstr "" 8.2020 + 8.2021 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2022 +#: ../en/ch00-preface.xml:235 8.2023 +msgid "" 8.2024 +"<ulink url=\"http://www.oreilly.com/catalog/<catalog page>\"></ulink>" 8.2025 +msgstr "" 8.2026 + 8.2027 +#. type: Content of: <book><preface><sect1><remark> 8.2028 +#: ../en/ch00-preface.xml:239 8.2029 +msgid "Don’t forget to update the <url> attribute, too." 8.2030 +msgstr "" 8.2031 + 8.2032 +#. type: Content of: <book><preface><sect1><para> 8.2033 +#: ../en/ch00-preface.xml:242 8.2034 +msgid "To comment or ask technical questions about this book, send email to:" 8.2035 +msgstr "" 8.2036 + 8.2037 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2038 +#: ../en/ch00-preface.xml:246 8.2039 +msgid "<email>bookquestions@oreilly.com</email>" 8.2040 +msgstr "<email>bookquestions@oreilly.com</email>" 8.2041 + 8.2042 +#. type: Content of: <book><preface><sect1><para> 8.2043 +#: ../en/ch00-preface.xml:249 8.2044 +msgid "" 8.2045 +"For more information about our books, conferences, Resource Centers, and the " 8.2046 +"O’Reilly Network, see our web site at:" 8.2047 +msgstr "" 8.2048 + 8.2049 +#. type: Content of: <book><preface><sect1><simplelist><member> 8.2050 +#: ../en/ch00-preface.xml:253 8.2051 +msgid "<ulink url=\"http://www.oreilly.com\"></ulink>" 8.2052 +msgstr "<ulink url=\"http://www.oreilly.com\"></ulink>" 8.2053 + 8.2054 +#. type: Content of: <book><chapter><title> 8.2055 +#: ../en/ch01-intro.xml:5 8.2056 +msgid "How did we get here?" 8.2057 +msgstr "" 8.2058 + 8.2059 +#. type: Content of: <book><chapter><sect1><title> 8.2060 +#: ../en/ch01-intro.xml:8 8.2061 msgid "Why revision control? Why Mercurial?" 8.2062 msgstr "为什么使用版本控制? 为什么使用 Mercurial?" 8.2063 8.2064 -#. type: Content of: <book><preface><sect1><para> 8.2065 -#: ../en/ch00-preface.xml:10 8.2066 +#. type: Content of: <book><chapter><sect1><para> 8.2067 +#: ../en/ch01-intro.xml:10 8.2068 msgid "" 8.2069 "Revision control is the process of managing multiple versions of a piece of " 8.2070 "information. In its simplest form, this is something that many people do by " 8.2071 @@ -1207,8 +2388,8 @@ 8.2072 "number, each one higher than the number of the preceding version." 8.2073 msgstr "" 8.2074 8.2075 -#. type: Content of: <book><preface><sect1><para> 8.2076 -#: ../en/ch00-preface.xml:16 8.2077 +#. type: Content of: <book><chapter><sect1><para> 8.2078 +#: ../en/ch01-intro.xml:16 8.2079 msgid "" 8.2080 "Manually managing multiple versions of even a single file is an error-prone " 8.2081 "task, though, so software tools to help automate this process have long been " 8.2082 @@ -1220,16 +2401,16 @@ 8.2083 "working together on projects that consist of hundreds of thousands of files." 8.2084 msgstr "" 8.2085 8.2086 -#. type: Content of: <book><preface><sect1><para> 8.2087 -#: ../en/ch00-preface.xml:27 8.2088 +#. type: Content of: <book><chapter><sect1><para> 8.2089 +#: ../en/ch01-intro.xml:27 8.2090 msgid "" 8.2091 "The arrival of distributed revision control is relatively recent, and so far " 8.2092 "this new field has grown due to people's willingness to explore ill-charted " 8.2093 "territory." 8.2094 msgstr "" 8.2095 8.2096 -#. type: Content of: <book><preface><sect1><para> 8.2097 -#: ../en/ch00-preface.xml:31 8.2098 +#. type: Content of: <book><chapter><sect1><para> 8.2099 +#: ../en/ch01-intro.xml:31 8.2100 msgid "" 8.2101 "I am writing a book about distributed revision control because I believe that " 8.2102 "it is an important subject that deserves a field guide. I chose to write " 8.2103 @@ -1238,20 +2419,20 @@ 8.2104 "other revision control tools buckle." 8.2105 msgstr "" 8.2106 8.2107 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2108 -#: ../en/ch00-preface.xml:39 8.2109 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2110 +#: ../en/ch01-intro.xml:39 8.2111 msgid "Why use revision control?" 8.2112 msgstr "为什么使用版本控制?" 8.2113 8.2114 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2115 -#: ../en/ch00-preface.xml:41 8.2116 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2117 +#: ../en/ch01-intro.xml:41 8.2118 msgid "" 8.2119 "There are a number of reasons why you or your team might want to use an " 8.2120 "automated revision control tool for a project." 8.2121 msgstr "" 8.2122 8.2123 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2124 -#: ../en/ch00-preface.xml:46 8.2125 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2126 +#: ../en/ch01-intro.xml:46 8.2127 msgid "" 8.2128 "It will track the history and evolution of your project, so you don't have " 8.2129 "to. For every change, you'll have a log of <emphasis>who</emphasis> made it; " 8.2130 @@ -1259,8 +2440,8 @@ 8.2131 "it; and <emphasis>what</emphasis> the change was." 8.2132 msgstr "" 8.2133 8.2134 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2135 -#: ../en/ch00-preface.xml:53 8.2136 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2137 +#: ../en/ch01-intro.xml:53 8.2138 msgid "" 8.2139 "When you're working with other people, revision control software makes it " 8.2140 "easier for you to collaborate. For example, when people more or less " 8.2141 @@ -1268,8 +2449,8 @@ 8.2142 "you to identify and resolve those conflicts." 8.2143 msgstr "" 8.2144 8.2145 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2146 -#: ../en/ch00-preface.xml:59 8.2147 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2148 +#: ../en/ch01-intro.xml:59 8.2149 msgid "" 8.2150 "It can help you to recover from mistakes. If you make a change that later " 8.2151 "turns out to be in error, you can revert to an earlier version of one or more " 8.2152 @@ -1278,23 +2459,23 @@ 8.2153 "introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)." 8.2154 msgstr "" 8.2155 8.2156 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2157 -#: ../en/ch00-preface.xml:66 8.2158 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2159 +#: ../en/ch01-intro.xml:66 8.2160 msgid "" 8.2161 "It will help you to work simultaneously on, and manage the drift between, " 8.2162 "multiple versions of your project." 8.2163 msgstr "" 8.2164 8.2165 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2166 -#: ../en/ch00-preface.xml:71 8.2167 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2168 +#: ../en/ch01-intro.xml:71 8.2169 msgid "" 8.2170 "Most of these reasons are equally valid&emdash;at least in theory&emdash;" 8.2171 "whether you're working on a project by yourself, or with a hundred other " 8.2172 "people." 8.2173 msgstr "" 8.2174 8.2175 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2176 -#: ../en/ch00-preface.xml:76 8.2177 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2178 +#: ../en/ch01-intro.xml:76 8.2179 msgid "" 8.2180 "A key question about the practicality of revision control at these two " 8.2181 "different scales (<quote>lone hacker</quote> and <quote>huge team</quote>) is " 8.2182 @@ -1303,8 +2484,8 @@ 8.2183 "going to impose a high cost." 8.2184 msgstr "" 8.2185 8.2186 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2187 -#: ../en/ch00-preface.xml:84 8.2188 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2189 +#: ../en/ch01-intro.xml:84 8.2190 msgid "" 8.2191 "A five-hundred-person project is likely to collapse under its own weight " 8.2192 "almost immediately without a revision control tool and process. In this case, " 8.2193 @@ -1312,16 +2493,16 @@ 8.2194 "<emphasis>without</emphasis> it, failure is almost guaranteed." 8.2195 msgstr "" 8.2196 8.2197 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2198 -#: ../en/ch00-preface.xml:91 8.2199 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2200 +#: ../en/ch01-intro.xml:91 8.2201 msgid "" 8.2202 "On the other hand, a one-person <quote>quick hack</quote> might seem like a " 8.2203 "poor place to use a revision control tool, because surely the cost of using " 8.2204 "one must be close to the overall cost of the project. Right?" 8.2205 msgstr "" 8.2206 8.2207 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2208 -#: ../en/ch00-preface.xml:96 8.2209 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2210 +#: ../en/ch01-intro.xml:96 8.2211 msgid "" 8.2212 "Mercurial uniquely supports <emphasis>both</emphasis> of these scales of " 8.2213 "development. You can learn the basics in just a few minutes, and due to its " 8.2214 @@ -1333,81 +2514,67 @@ 8.2215 "projects." 8.2216 msgstr "" 8.2217 8.2218 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2219 -#: ../en/ch00-preface.xml:106 8.2220 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2221 +#: ../en/ch01-intro.xml:106 8.2222 msgid "" 8.2223 "No revision control tool can rescue a poorly run project, but a good choice " 8.2224 "of tools can make a huge difference to the fluidity with which you can work " 8.2225 "on a project." 8.2226 msgstr "" 8.2227 8.2228 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2229 -#: ../en/ch00-preface.xml:113 8.2230 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2231 +#: ../en/ch01-intro.xml:113 8.2232 msgid "The many names of revision control" 8.2233 msgstr "版本控制的别名" 8.2234 8.2235 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2236 -#: ../en/ch00-preface.xml:115 8.2237 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2238 +#: ../en/ch01-intro.xml:115 8.2239 msgid "" 8.2240 "Revision control is a diverse field, so much so that it is referred to by " 8.2241 "many names and acronyms. Here are a few of the more common variations you'll " 8.2242 "encounter:" 8.2243 msgstr "" 8.2244 8.2245 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2246 -#: ../en/ch00-preface.xml:119 8.2247 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2248 +#: ../en/ch01-intro.xml:119 8.2249 msgid "Revision control (RCS)" 8.2250 msgstr "版本控制(RCS)" 8.2251 8.2252 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2253 -#: ../en/ch00-preface.xml:120 8.2254 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2255 +#: ../en/ch01-intro.xml:120 8.2256 msgid "Software configuration management (SCM), or configuration management" 8.2257 msgstr "软件配置管理(SCM),或配置管理" 8.2258 8.2259 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2260 -#: ../en/ch00-preface.xml:122 8.2261 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2262 +#: ../en/ch01-intro.xml:122 8.2263 msgid "Source code management" 8.2264 msgstr "源代码管理" 8.2265 8.2266 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2267 -#: ../en/ch00-preface.xml:123 8.2268 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2269 +#: ../en/ch01-intro.xml:123 8.2270 msgid "Source code control, or source control" 8.2271 msgstr "源代码控制,或源控制" 8.2272 8.2273 -#. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 8.2274 -#: ../en/ch00-preface.xml:125 8.2275 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.2276 +#: ../en/ch01-intro.xml:125 8.2277 msgid "Version control (VCS)" 8.2278 msgstr "版本控制(VCS)" 8.2279 8.2280 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2281 -#: ../en/ch00-preface.xml:127 8.2282 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2283 +#: ../en/ch01-intro.xml:127 8.2284 msgid "" 8.2285 "Some people claim that these terms actually have different meanings, but in " 8.2286 "practice they overlap so much that there's no agreed or even useful way to " 8.2287 "tease them apart." 8.2288 msgstr "" 8.2289 8.2290 -#. type: Content of: <book><preface><sect1><title> 8.2291 -#: ../en/ch00-preface.xml:135 8.2292 -msgid "This book is a work in progress" 8.2293 -msgstr "本书正在编写中" 8.2294 - 8.2295 -#. type: Content of: <book><preface><sect1><para> 8.2296 -#: ../en/ch00-preface.xml:137 8.2297 -msgid "" 8.2298 -"I am releasing this book while I am still writing it, in the hope that it " 8.2299 -"will prove useful to others. I am writing under an open license in the hope " 8.2300 -"that you, my readers, will contribute feedback and perhaps content of your " 8.2301 -"own." 8.2302 -msgstr "" 8.2303 - 8.2304 -#. type: Content of: <book><preface><sect1><title> 8.2305 -#: ../en/ch00-preface.xml:144 8.2306 +#. type: Content of: <book><chapter><sect1><title> 8.2307 +#: ../en/ch01-intro.xml:135 8.2308 msgid "About the examples in this book" 8.2309 msgstr "本书的例子" 8.2310 8.2311 -#. type: Content of: <book><preface><sect1><para> 8.2312 -#: ../en/ch00-preface.xml:146 8.2313 +#. type: Content of: <book><chapter><sect1><para> 8.2314 +#: ../en/ch01-intro.xml:137 8.2315 msgid "" 8.2316 "This book takes an unusual approach to code samples. Every example is " 8.2317 "<quote>live</quote>&emdash;each one is actually the result of a shell script " 8.2318 @@ -1416,18 +2583,18 @@ 8.2319 "run, and their current results compared against their expected results." 8.2320 msgstr "" 8.2321 8.2322 -#. type: Content of: <book><preface><sect1><para> 8.2323 -#: ../en/ch00-preface.xml:153 8.2324 +#. type: Content of: <book><chapter><sect1><para> 8.2325 +#: ../en/ch01-intro.xml:144 8.2326 msgid "" 8.2327 "The advantage of this approach is that the examples are always accurate; they " 8.2328 -"describe <emphasis>exactly</emphasis> the behaviour of the version of " 8.2329 +"describe <emphasis>exactly</emphasis> the behavior of the version of " 8.2330 "Mercurial that's mentioned at the front of the book. If I update the version " 8.2331 "of Mercurial that I'm documenting, and the output of some command changes, " 8.2332 "the build fails." 8.2333 msgstr "" 8.2334 8.2335 -#. type: Content of: <book><preface><sect1><para> 8.2336 -#: ../en/ch00-preface.xml:160 8.2337 +#. type: Content of: <book><chapter><sect1><para> 8.2338 +#: ../en/ch01-intro.xml:151 8.2339 msgid "" 8.2340 "There is a small disadvantage to this approach, which is that the dates and " 8.2341 "times you'll see in examples tend to be <quote>squashed</quote> together in a " 8.2342 @@ -1437,8 +2604,8 @@ 8.2343 "run many commands in one second." 8.2344 msgstr "" 8.2345 8.2346 -#. type: Content of: <book><preface><sect1><para> 8.2347 -#: ../en/ch00-preface.xml:168 8.2348 +#. type: Content of: <book><chapter><sect1><para> 8.2349 +#: ../en/ch01-intro.xml:159 8.2350 msgid "" 8.2351 "As an instance of this, several consecutive commits in an example can show up " 8.2352 "as having occurred during the same second. You can see this occur in the " 8.2353 @@ -1446,29 +2613,29 @@ 8.2354 "bisect\"/>, for instance." 8.2355 msgstr "" 8.2356 8.2357 -#. type: Content of: <book><preface><sect1><para> 8.2358 -#: ../en/ch00-preface.xml:174 8.2359 +#. type: Content of: <book><chapter><sect1><para> 8.2360 +#: ../en/ch01-intro.xml:165 8.2361 msgid "" 8.2362 "So when you're reading examples, don't place too much weight on the dates or " 8.2363 "times you see in the output of commands. But <emphasis>do</emphasis> be " 8.2364 -"confident that the behaviour you're seeing is consistent and reproducible." 8.2365 -msgstr "" 8.2366 - 8.2367 -#. type: Content of: <book><preface><sect1><title> 8.2368 -#: ../en/ch00-preface.xml:182 8.2369 +"confident that the behavior you're seeing is consistent and reproducible." 8.2370 +msgstr "" 8.2371 + 8.2372 +#. type: Content of: <book><chapter><sect1><title> 8.2373 +#: ../en/ch01-intro.xml:173 8.2374 msgid "Trends in the field" 8.2375 msgstr "版本控制的发展趋势" 8.2376 8.2377 -#. type: Content of: <book><preface><sect1><para> 8.2378 -#: ../en/ch00-preface.xml:184 8.2379 +#. type: Content of: <book><chapter><sect1><para> 8.2380 +#: ../en/ch01-intro.xml:175 8.2381 msgid "" 8.2382 "There has been an unmistakable trend in the development and use of revision " 8.2383 "control tools over the past four decades, as people have become familiar with " 8.2384 "the capabilities of their tools and constrained by their limitations." 8.2385 msgstr "" 8.2386 8.2387 -#. type: Content of: <book><preface><sect1><para> 8.2388 -#: ../en/ch00-preface.xml:189 8.2389 +#. type: Content of: <book><chapter><sect1><para> 8.2390 +#: ../en/ch01-intro.xml:180 8.2391 msgid "" 8.2392 "The first generation began by managing single files on individual computers. " 8.2393 "Although these tools represented a huge advance over ad-hoc manual revision " 8.2394 @@ -1476,8 +2643,8 @@ 8.2395 "to small, tightly-knit teams." 8.2396 msgstr "" 8.2397 8.2398 -#. type: Content of: <book><preface><sect1><para> 8.2399 -#: ../en/ch00-preface.xml:195 8.2400 +#. type: Content of: <book><chapter><sect1><para> 8.2401 +#: ../en/ch01-intro.xml:186 8.2402 msgid "" 8.2403 "The second generation loosened these constraints by moving to network-" 8.2404 "centered architectures, and managing entire projects at a time. As projects " 8.2405 @@ -1490,8 +2657,8 @@ 8.2406 "natural way, as they could not record their changes." 8.2407 msgstr "" 8.2408 8.2409 -#. type: Content of: <book><preface><sect1><para> 8.2410 -#: ../en/ch00-preface.xml:207 8.2411 +#. type: Content of: <book><chapter><sect1><para> 8.2412 +#: ../en/ch01-intro.xml:198 8.2413 msgid "" 8.2414 "The current generation of revision control tools is peer-to-peer in nature. " 8.2415 "All of these systems have dropped the dependency on a single central server, " 8.2416 @@ -1502,13 +2669,13 @@ 8.2417 "when syncing changes with another repository." 8.2418 msgstr "" 8.2419 8.2420 -#. type: Content of: <book><preface><sect1><title> 8.2421 -#: ../en/ch00-preface.xml:219 8.2422 +#. type: Content of: <book><chapter><sect1><title> 8.2423 +#: ../en/ch01-intro.xml:210 8.2424 msgid "A few of the advantages of distributed revision control" 8.2425 msgstr "分布版本控制的优点" 8.2426 8.2427 -#. type: Content of: <book><preface><sect1><para> 8.2428 -#: ../en/ch00-preface.xml:222 8.2429 +#. type: Content of: <book><chapter><sect1><para> 8.2430 +#: ../en/ch01-intro.xml:213 8.2431 msgid "" 8.2432 "Even though distributed revision control tools have for several years been as " 8.2433 "robust and usable as their previous-generation counterparts, people using " 8.2434 @@ -1517,8 +2684,8 @@ 8.2435 "ones." 8.2436 msgstr "" 8.2437 8.2438 -#. type: Content of: <book><preface><sect1><para> 8.2439 -#: ../en/ch00-preface.xml:229 8.2440 +#. type: Content of: <book><chapter><sect1><para> 8.2441 +#: ../en/ch01-intro.xml:220 8.2442 msgid "" 8.2443 "For an individual developer, distributed tools are almost always much faster " 8.2444 "than centralised tools. This is for a simple reason: a centralised tool " 8.2445 @@ -1530,8 +2697,8 @@ 8.2446 "interacting with your revision control software." 8.2447 msgstr "" 8.2448 8.2449 -#. type: Content of: <book><preface><sect1><para> 8.2450 -#: ../en/ch00-preface.xml:240 8.2451 +#. type: Content of: <book><chapter><sect1><para> 8.2452 +#: ../en/ch01-intro.xml:231 8.2453 msgid "" 8.2454 "Distributed tools are indifferent to the vagaries of your server " 8.2455 "infrastructure, again because they replicate metadata to so many locations. " 8.2456 @@ -1541,8 +2708,8 @@ 8.2457 "available on every contributor's computer." 8.2458 msgstr "" 8.2459 8.2460 -#. type: Content of: <book><preface><sect1><para> 8.2461 -#: ../en/ch00-preface.xml:248 8.2462 +#. type: Content of: <book><chapter><sect1><para> 8.2463 +#: ../en/ch01-intro.xml:239 8.2464 msgid "" 8.2465 "The reliability of your network will affect distributed tools far less than " 8.2466 "it will centralised tools. You can't even use a centralised tool without a " 8.2467 @@ -1554,13 +2721,13 @@ 8.2468 "may be significant." 8.2469 msgstr "" 8.2470 8.2471 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2472 -#: ../en/ch00-preface.xml:259 8.2473 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2474 +#: ../en/ch01-intro.xml:250 8.2475 msgid "Advantages for open source projects" 8.2476 msgstr "开源项目的优点" 8.2477 8.2478 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2479 -#: ../en/ch00-preface.xml:261 8.2480 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2481 +#: ../en/ch01-intro.xml:252 8.2482 msgid "" 8.2483 "If you take a shine to an open source project and decide that you would like " 8.2484 "to start hacking on it, and that project uses a distributed revision control " 8.2485 @@ -1575,13 +2742,13 @@ 8.2486 "your client's view of the repository." 8.2487 msgstr "" 8.2488 8.2489 -#. type: Content of: <book><preface><sect1><sect2><sect3><title> 8.2490 -#: ../en/ch00-preface.xml:277 8.2491 +#. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.2492 +#: ../en/ch01-intro.xml:268 8.2493 msgid "The forking non-problem" 8.2494 msgstr "分叉不是问题" 8.2495 8.2496 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 8.2497 -#: ../en/ch00-preface.xml:279 8.2498 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.2499 +#: ../en/ch01-intro.xml:270 8.2500 msgid "" 8.2501 "It has been suggested that distributed revision control tools pose some sort " 8.2502 "of risk to open source projects because they make it easy to <quote>fork</" 8.2503 @@ -1592,8 +2759,8 @@ 8.2504 "own direction." 8.2505 msgstr "" 8.2506 8.2507 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 8.2508 -#: ../en/ch00-preface.xml:289 8.2509 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.2510 +#: ../en/ch01-intro.xml:280 8.2511 msgid "" 8.2512 "Sometimes the camps in a fork decide to reconcile their differences. With a " 8.2513 "centralised revision control system, the <emphasis>technical</emphasis> " 8.2514 @@ -1603,8 +2770,8 @@ 8.2515 "usually loses some or all of one side's revision history." 8.2516 msgstr "" 8.2517 8.2518 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 8.2519 -#: ../en/ch00-preface.xml:298 8.2520 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.2521 +#: ../en/ch01-intro.xml:289 8.2522 msgid "" 8.2523 "What distributed tools do with respect to forking is they make forking the " 8.2524 "<emphasis>only</emphasis> way to develop a project. Every single change that " 8.2525 @@ -1614,8 +2781,8 @@ 8.2526 "they happen all the time." 8.2527 msgstr "" 8.2528 8.2529 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 8.2530 -#: ../en/ch00-preface.xml:307 8.2531 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.2532 +#: ../en/ch01-intro.xml:298 8.2533 msgid "" 8.2534 "If every piece of work that everybody does, all the time, is framed in terms " 8.2535 "of forking and merging, then what the open source world refers to as a " 8.2536 @@ -1624,23 +2791,23 @@ 8.2537 "fork:" 8.2538 msgstr "" 8.2539 8.2540 -#. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para> 8.2541 -#: ../en/ch00-preface.xml:314 8.2542 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.2543 +#: ../en/ch01-intro.xml:305 8.2544 msgid "" 8.2545 "They eliminate the social distinction that centralised tools impose: that " 8.2546 "between insiders (people with commit access) and outsiders (people without)." 8.2547 msgstr "" 8.2548 8.2549 -#. type: Content of: <book><preface><sect1><sect2><sect3><itemizedlist><listitem><para> 8.2550 -#: ../en/ch00-preface.xml:318 8.2551 +#. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.2552 +#: ../en/ch01-intro.xml:309 8.2553 msgid "" 8.2554 "They make it easier to reconcile after a social fork, because all that's " 8.2555 "involved from the perspective of the revision control software is just " 8.2556 "another merge." 8.2557 msgstr "" 8.2558 8.2559 -#. type: Content of: <book><preface><sect1><sect2><sect3><para> 8.2560 -#: ../en/ch00-preface.xml:323 8.2561 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.2562 +#: ../en/ch01-intro.xml:314 8.2563 msgid "" 8.2564 "Some people resist distributed tools because they want to retain tight " 8.2565 "control over their projects, and they believe that centralised tools give " 8.2566 @@ -1652,13 +2819,13 @@ 8.2567 "people feel compelled to mirror and fork your history." 8.2568 msgstr "" 8.2569 8.2570 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2571 -#: ../en/ch00-preface.xml:338 8.2572 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2573 +#: ../en/ch01-intro.xml:329 8.2574 msgid "Advantages for commercial projects" 8.2575 msgstr "商业项目的优点" 8.2576 8.2577 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2578 -#: ../en/ch00-preface.xml:340 8.2579 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2580 +#: ../en/ch01-intro.xml:331 8.2581 msgid "" 8.2582 "Many commercial projects are undertaken by teams that are scattered across " 8.2583 "the globe. Contributors who are far from a central server will see slower " 8.2584 @@ -1671,8 +2838,8 @@ 8.2585 "expensive long-haul network links." 8.2586 msgstr "" 8.2587 8.2588 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2589 -#: ../en/ch00-preface.xml:352 8.2590 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2591 +#: ../en/ch01-intro.xml:343 8.2592 msgid "" 8.2593 "Centralised revision control systems tend to have relatively low " 8.2594 "scalability. It's not unusual for an expensive centralised system to fall " 8.2595 @@ -1685,8 +2852,8 @@ 8.2596 "of scripting." 8.2597 msgstr "" 8.2598 8.2599 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2600 -#: ../en/ch00-preface.xml:364 8.2601 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2602 +#: ../en/ch01-intro.xml:355 8.2603 msgid "" 8.2604 "If you have an employee in the field, troubleshooting a problem at a " 8.2605 "customer's site, they'll benefit from distributed revision control. The tool " 8.2606 @@ -1696,40 +2863,40 @@ 8.2607 "to your company's network." 8.2608 msgstr "" 8.2609 8.2610 -#. type: Content of: <book><preface><sect1><title> 8.2611 -#: ../en/ch00-preface.xml:375 8.2612 +#. type: Content of: <book><chapter><sect1><title> 8.2613 +#: ../en/ch01-intro.xml:366 8.2614 msgid "Why choose Mercurial?" 8.2615 msgstr "为什么选择 Mercurial?" 8.2616 8.2617 -#. type: Content of: <book><preface><sect1><para> 8.2618 -#: ../en/ch00-preface.xml:377 8.2619 +#. type: Content of: <book><chapter><sect1><para> 8.2620 +#: ../en/ch01-intro.xml:368 8.2621 msgid "" 8.2622 "Mercurial has a unique set of properties that make it a particularly good " 8.2623 "choice as a revision control system." 8.2624 msgstr "" 8.2625 8.2626 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2627 -#: ../en/ch00-preface.xml:380 8.2628 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.2629 +#: ../en/ch01-intro.xml:371 8.2630 msgid "It is easy to learn and use." 8.2631 msgstr "" 8.2632 8.2633 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2634 -#: ../en/ch00-preface.xml:381 8.2635 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.2636 +#: ../en/ch01-intro.xml:372 8.2637 msgid "It is lightweight." 8.2638 msgstr "" 8.2639 8.2640 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2641 -#: ../en/ch00-preface.xml:382 8.2642 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.2643 +#: ../en/ch01-intro.xml:373 8.2644 msgid "It scales excellently." 8.2645 msgstr "" 8.2646 8.2647 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2648 -#: ../en/ch00-preface.xml:383 8.2649 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.2650 +#: ../en/ch01-intro.xml:374 8.2651 msgid "It is easy to customise." 8.2652 msgstr "" 8.2653 8.2654 -#. type: Content of: <book><preface><sect1><para> 8.2655 -#: ../en/ch00-preface.xml:386 8.2656 +#. type: Content of: <book><chapter><sect1><para> 8.2657 +#: ../en/ch01-intro.xml:377 8.2658 msgid "" 8.2659 "If you are at all familiar with revision control systems, you should be able " 8.2660 "to get up and running with Mercurial in less than five minutes. Even if not, " 8.2661 @@ -1738,8 +2905,8 @@ 8.2662 "few general rules instead of a host of exceptions." 8.2663 msgstr "" 8.2664 8.2665 -#. type: Content of: <book><preface><sect1><para> 8.2666 -#: ../en/ch00-preface.xml:393 8.2667 +#. type: Content of: <book><chapter><sect1><para> 8.2668 +#: ../en/ch01-intro.xml:384 8.2669 msgid "" 8.2670 "On a small project, you can start working with Mercurial in moments. Creating " 8.2671 "new changes and branches; transferring changes around (whether locally or " 8.2672 @@ -1748,16 +2915,16 @@ 8.2673 "cognitive overhead with blazingly fast operations." 8.2674 msgstr "" 8.2675 8.2676 -#. type: Content of: <book><preface><sect1><para> 8.2677 -#: ../en/ch00-preface.xml:400 8.2678 +#. type: Content of: <book><chapter><sect1><para> 8.2679 +#: ../en/ch01-intro.xml:391 8.2680 msgid "" 8.2681 "The usefulness of Mercurial is not limited to small projects: it is used by " 8.2682 "projects with hundreds to thousands of contributors, each containing tens of " 8.2683 "thousands of files and hundreds of megabytes of source code." 8.2684 msgstr "" 8.2685 8.2686 -#. type: Content of: <book><preface><sect1><para> 8.2687 -#: ../en/ch00-preface.xml:405 8.2688 +#. type: Content of: <book><chapter><sect1><para> 8.2689 +#: ../en/ch01-intro.xml:396 8.2690 msgid "" 8.2691 "If the core functionality of Mercurial is not enough for you, it's easy to " 8.2692 "build on. Mercurial is well suited to scripting tasks, and its clean " 8.2693 @@ -1767,13 +2934,13 @@ 8.2694 "performance." 8.2695 msgstr "" 8.2696 8.2697 -#. type: Content of: <book><preface><sect1><title> 8.2698 -#: ../en/ch00-preface.xml:415 8.2699 +#. type: Content of: <book><chapter><sect1><title> 8.2700 +#: ../en/ch01-intro.xml:406 8.2701 msgid "Mercurial compared with other tools" 8.2702 msgstr "Mercurial 与其它工具的比较" 8.2703 8.2704 -#. type: Content of: <book><preface><sect1><para> 8.2705 -#: ../en/ch00-preface.xml:417 8.2706 +#. type: Content of: <book><chapter><sect1><para> 8.2707 +#: ../en/ch01-intro.xml:408 8.2708 msgid "" 8.2709 "Before you read on, please understand that this section necessarily reflects " 8.2710 "my own experiences, interests, and (dare I say it) biases. I have used every " 8.2711 @@ -1781,28 +2948,23 @@ 8.2712 "years at a time." 8.2713 msgstr "" 8.2714 8.2715 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2716 -#: ../en/ch00-preface.xml:425 ../en/ch00-preface.xml:636 8.2717 -msgid "Subversion" 8.2718 -msgstr "" 8.2719 - 8.2720 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2721 -#: ../en/ch00-preface.xml:427 8.2722 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2723 +#: ../en/ch01-intro.xml:418 8.2724 msgid "" 8.2725 "Subversion is a popular revision control tool, developed to replace CVS. It " 8.2726 "has a centralised client/server architecture." 8.2727 msgstr "" 8.2728 8.2729 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2730 -#: ../en/ch00-preface.xml:431 8.2731 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2732 +#: ../en/ch01-intro.xml:422 8.2733 msgid "" 8.2734 "Subversion and Mercurial have similarly named commands for performing the " 8.2735 "same operations, so if you're familiar with one, it is easy to learn to use " 8.2736 "the other. Both tools are portable to all popular operating systems." 8.2737 msgstr "" 8.2738 8.2739 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2740 -#: ../en/ch00-preface.xml:436 8.2741 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2742 +#: ../en/ch01-intro.xml:427 8.2743 msgid "" 8.2744 "Prior to version 1.5, Subversion had no useful support for merges. At the " 8.2745 "time of writing, its merge tracking capability is new, and known to be <ulink " 8.2746 @@ -1810,8 +2972,8 @@ 8.2747 "html#svn.branchmerge.advanced.finalword\">complicated and buggy</ulink>." 8.2748 msgstr "" 8.2749 8.2750 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2751 -#: ../en/ch00-preface.xml:442 8.2752 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2753 +#: ../en/ch01-intro.xml:433 8.2754 msgid "" 8.2755 "Mercurial has a substantial performance advantage over Subversion on every " 8.2756 "revision control operation I have benchmarked. I have measured its advantage " 8.2757 @@ -1824,8 +2986,8 @@ 8.2758 "network bandwidth become bottlenecks for modestly large projects." 8.2759 msgstr "" 8.2760 8.2761 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2762 -#: ../en/ch00-preface.xml:455 8.2763 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2764 +#: ../en/ch01-intro.xml:446 8.2765 msgid "" 8.2766 "Additionally, Subversion incurs substantial storage overhead to avoid network " 8.2767 "transactions for a few common operations, such as finding modified files " 8.2768 @@ -1836,8 +2998,8 @@ 8.2769 "of the project." 8.2770 msgstr "" 8.2771 8.2772 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2773 -#: ../en/ch00-preface.xml:465 8.2774 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2775 +#: ../en/ch01-intro.xml:456 8.2776 msgid "" 8.2777 "Subversion is widely supported by third party tools. Mercurial currently " 8.2778 "lags considerably in this area. This gap is closing, however, and indeed " 8.2779 @@ -1845,8 +3007,8 @@ 8.2780 "Like Mercurial, Subversion has an excellent user manual." 8.2781 msgstr "" 8.2782 8.2783 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2784 -#: ../en/ch00-preface.xml:471 8.2785 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2786 +#: ../en/ch01-intro.xml:462 8.2787 msgid "" 8.2788 "Because Subversion doesn't store revision history on the client, it is well " 8.2789 "suited to managing projects that deal with lots of large, opaque binary " 8.2790 @@ -1856,8 +3018,8 @@ 8.2791 "because the differences between each revision are large." 8.2792 msgstr "" 8.2793 8.2794 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2795 -#: ../en/ch00-preface.xml:480 8.2796 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2797 +#: ../en/ch01-intro.xml:471 8.2798 msgid "" 8.2799 "In addition, it's often difficult or, more usually, impossible to merge " 8.2800 "different versions of a binary file. Subversion's ability to let a user lock " 8.2801 @@ -1866,8 +3028,8 @@ 8.2802 "widely used." 8.2803 msgstr "" 8.2804 8.2805 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2806 -#: ../en/ch00-preface.xml:487 8.2807 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2808 +#: ../en/ch01-intro.xml:478 8.2809 msgid "" 8.2810 "Mercurial can import revision history from a Subversion repository. It can " 8.2811 "also export revision history to a Subversion repository. This makes it easy " 8.2812 @@ -1877,29 +3039,29 @@ 8.2813 "afterwards to bring in new changes." 8.2814 msgstr "" 8.2815 8.2816 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2817 -#: ../en/ch00-preface.xml:499 ../en/ch00-preface.xml:638 8.2818 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.2819 +#: ../en/ch01-intro.xml:490 ../en/ch01-intro.xml:629 8.2820 msgid "Git" 8.2821 msgstr "Git" 8.2822 8.2823 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2824 -#: ../en/ch00-preface.xml:501 8.2825 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2826 +#: ../en/ch01-intro.xml:492 8.2827 msgid "" 8.2828 "Git is a distributed revision control tool that was developed for managing " 8.2829 "the Linux kernel source tree. Like Mercurial, its early design was somewhat " 8.2830 "influenced by Monotone." 8.2831 msgstr "" 8.2832 8.2833 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2834 -#: ../en/ch00-preface.xml:506 8.2835 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2836 +#: ../en/ch01-intro.xml:497 8.2837 msgid "" 8.2838 "Git has a very large command set, with version 1.5.0 providing 139 individual " 8.2839 "commands. It has something of a reputation for being difficult to learn. " 8.2840 "Compared to Git, Mercurial has a strong focus on simplicity." 8.2841 msgstr "" 8.2842 8.2843 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2844 -#: ../en/ch00-preface.xml:511 8.2845 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2846 +#: ../en/ch01-intro.xml:502 8.2847 msgid "" 8.2848 "In terms of performance, Git is extremely fast. In several cases, it is " 8.2849 "faster than Mercurial, at least on Linux, while Mercurial performs better on " 8.2850 @@ -1908,8 +3070,8 @@ 8.2851 "Mercurial." 8.2852 msgstr "" 8.2853 8.2854 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2855 -#: ../en/ch00-preface.xml:518 8.2856 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2857 +#: ../en/ch01-intro.xml:509 8.2858 msgid "" 8.2859 "While a Mercurial repository needs no maintenance, a Git repository requires " 8.2860 "frequent manual <quote>repacks</quote> of its metadata. Without these, " 8.2861 @@ -1921,8 +3083,8 @@ 8.2862 "repository, but an unpacked repository is several orders of magnitude larger." 8.2863 msgstr "" 8.2864 8.2865 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2866 -#: ../en/ch00-preface.xml:529 8.2867 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2868 +#: ../en/ch01-intro.xml:520 8.2869 msgid "" 8.2870 "The core of Git is written in C. Many Git commands are implemented as shell " 8.2871 "or Perl scripts, and the quality of these scripts varies widely. I have " 8.2872 @@ -1930,26 +3092,21 @@ 8.2873 "presence of errors that should have been fatal." 8.2874 msgstr "" 8.2875 8.2876 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2877 -#: ../en/ch00-preface.xml:535 8.2878 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2879 +#: ../en/ch01-intro.xml:526 8.2880 msgid "Mercurial can import revision history from a Git repository." 8.2881 msgstr "" 8.2882 8.2883 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.2884 -#: ../en/ch00-preface.xml:541 ../en/ch00-preface.xml:637 8.2885 -msgid "CVS" 8.2886 -msgstr "CVS" 8.2887 - 8.2888 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2889 -#: ../en/ch00-preface.xml:543 8.2890 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2891 +#: ../en/ch01-intro.xml:534 8.2892 msgid "" 8.2893 "CVS is probably the most widely used revision control tool in the world. Due " 8.2894 "to its age and internal untidiness, it has been only lightly maintained for " 8.2895 "many years." 8.2896 msgstr "" 8.2897 8.2898 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2899 -#: ../en/ch00-preface.xml:547 8.2900 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2901 +#: ../en/ch01-intro.xml:538 8.2902 msgid "" 8.2903 "It has a centralised client/server architecture. It does not group related " 8.2904 "file changes into atomic commits, making it easy for people to <quote>break " 8.2905 @@ -1962,8 +3119,8 @@ 8.2906 "those files were)." 8.2907 msgstr "" 8.2908 8.2909 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2910 -#: ../en/ch00-preface.xml:559 8.2911 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2912 +#: ../en/ch01-intro.xml:550 8.2913 msgid "" 8.2914 "CVS has a muddled notion of tags and branches that I will not attempt to even " 8.2915 "describe. It does not support renaming of files or directories well, making " 8.2916 @@ -1973,8 +3130,8 @@ 8.2917 "existing or new." 8.2918 msgstr "" 8.2919 8.2920 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2921 -#: ../en/ch00-preface.xml:567 8.2922 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2923 +#: ../en/ch01-intro.xml:558 8.2924 msgid "" 8.2925 "Mercurial can import CVS revision history. However, there are a few caveats " 8.2926 "that apply; these are true of every other revision control tool's CVS " 8.2927 @@ -1988,18 +3145,18 @@ 8.2928 "of the less interesting problems I can recall from personal experience)." 8.2929 msgstr "" 8.2930 8.2931 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2932 -#: ../en/ch00-preface.xml:581 8.2933 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2934 +#: ../en/ch01-intro.xml:572 8.2935 msgid "Mercurial can import revision history from a CVS repository." 8.2936 msgstr "" 8.2937 8.2938 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2939 -#: ../en/ch00-preface.xml:587 8.2940 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2941 +#: ../en/ch01-intro.xml:578 8.2942 msgid "Commercial tools" 8.2943 msgstr "商业工具" 8.2944 8.2945 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2946 -#: ../en/ch00-preface.xml:589 8.2947 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2948 +#: ../en/ch01-intro.xml:580 8.2949 msgid "" 8.2950 "Perforce has a centralised client/server architecture, with no client-side " 8.2951 "caching of any data. Unlike modern revision control tools, Perforce requires " 8.2952 @@ -2007,8 +3164,8 @@ 8.2953 "to edit." 8.2954 msgstr "" 8.2955 8.2956 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2957 -#: ../en/ch00-preface.xml:595 8.2958 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2959 +#: ../en/ch01-intro.xml:586 8.2960 msgid "" 8.2961 "The performance of Perforce is quite good for small teams, but it falls off " 8.2962 "rapidly as the number of users grows beyond a few dozen. Modestly large " 8.2963 @@ -2016,41 +3173,41 @@ 8.2964 "load their users generate." 8.2965 msgstr "" 8.2966 8.2967 -#. type: Content of: <book><preface><sect1><sect2><title> 8.2968 -#: ../en/ch00-preface.xml:604 8.2969 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.2970 +#: ../en/ch01-intro.xml:595 8.2971 msgid "Choosing a revision control tool" 8.2972 msgstr "选择版本控制工具" 8.2973 8.2974 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2975 -#: ../en/ch00-preface.xml:606 8.2976 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2977 +#: ../en/ch01-intro.xml:597 8.2978 msgid "" 8.2979 "With the exception of CVS, all of the tools listed above have unique " 8.2980 "strengths that suit them to particular styles of work. There is no single " 8.2981 "revision control tool that is best in all situations." 8.2982 msgstr "" 8.2983 8.2984 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2985 -#: ../en/ch00-preface.xml:611 8.2986 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2987 +#: ../en/ch01-intro.xml:602 8.2988 msgid "" 8.2989 "As an example, Subversion is a good choice for working with frequently edited " 8.2990 "binary files, due to its centralised nature and support for file locking." 8.2991 msgstr "" 8.2992 8.2993 -#. type: Content of: <book><preface><sect1><sect2><para> 8.2994 -#: ../en/ch00-preface.xml:615 8.2995 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.2996 +#: ../en/ch01-intro.xml:606 8.2997 msgid "" 8.2998 "I personally find Mercurial's properties of simplicity, performance, and good " 8.2999 "merge support to be a compelling combination that has served me well for " 8.3000 "several years." 8.3001 msgstr "" 8.3002 8.3003 -#. type: Content of: <book><preface><sect1><title> 8.3004 -#: ../en/ch00-preface.xml:623 8.3005 +#. type: Content of: <book><chapter><sect1><title> 8.3006 +#: ../en/ch01-intro.xml:614 8.3007 msgid "Switching from another tool to Mercurial" 8.3008 msgstr "从其它工具切换到 Mercurial" 8.3009 8.3010 -#. type: Content of: <book><preface><sect1><para> 8.3011 -#: ../en/ch00-preface.xml:625 8.3012 +#. type: Content of: <book><chapter><sect1><para> 8.3013 +#: ../en/ch01-intro.xml:616 8.3014 msgid "" 8.3015 "Mercurial is bundled with an extension named <literal role=\"hg-ext" 8.3016 "\">convert</literal>, which can incrementally import revision history from " 8.3017 @@ -2060,20 +3217,15 @@ 8.3018 "conversion." 8.3019 msgstr "" 8.3020 8.3021 -#. type: Content of: <book><preface><sect1><para> 8.3022 -#: ../en/ch00-preface.xml:633 8.3023 +#. type: Content of: <book><chapter><sect1><para> 8.3024 +#: ../en/ch01-intro.xml:624 8.3025 msgid "" 8.3026 "The revision control tools supported by <literal role=\"hg-ext\">convert</" 8.3027 "literal> are as follows:" 8.3028 msgstr "<literal role=\"hg-ext\">convert</literal> 支持的版本控制工具有:" 8.3029 8.3030 -#. type: Content of: <book><preface><sect1><itemizedlist><listitem><para> 8.3031 -#: ../en/ch00-preface.xml:639 8.3032 -msgid "Darcs" 8.3033 -msgstr "Darcs" 8.3034 - 8.3035 -#. type: Content of: <book><preface><sect1><para> 8.3036 -#: ../en/ch00-preface.xml:641 8.3037 +#. type: Content of: <book><chapter><sect1><para> 8.3038 +#: ../en/ch01-intro.xml:632 8.3039 msgid "" 8.3040 "In addition, <literal role=\"hg-ext\">convert</literal> can export changes " 8.3041 "from Mercurial to Subversion. This makes it possible to try Subversion and " 8.3042 @@ -2081,8 +3233,8 @@ 8.3043 "loss of any work." 8.3044 msgstr "" 8.3045 8.3046 -#. type: Content of: <book><preface><sect1><para> 8.3047 -#: ../en/ch00-preface.xml:647 8.3048 +#. type: Content of: <book><chapter><sect1><para> 8.3049 +#: ../en/ch01-intro.xml:638 8.3050 msgid "" 8.3051 "The <command role=\"hg-ext-convert\">convert</command> command is easy to " 8.3052 "use. Simply point it at the path or URL of the source repository, optionally " 8.3053 @@ -2091,13 +3243,13 @@ 8.3054 "changes." 8.3055 msgstr "" 8.3056 8.3057 -#. type: Content of: <book><preface><sect1><title> 8.3058 -#: ../en/ch00-preface.xml:656 8.3059 +#. type: Content of: <book><chapter><sect1><title> 8.3060 +#: ../en/ch01-intro.xml:647 8.3061 msgid "A short history of revision control" 8.3062 msgstr "版本控制简史" 8.3063 8.3064 -#. type: Content of: <book><preface><sect1><para> 8.3065 -#: ../en/ch00-preface.xml:658 8.3066 +#. type: Content of: <book><chapter><sect1><para> 8.3067 +#: ../en/ch01-intro.xml:649 8.3068 msgid "" 8.3069 "The best known of the old-time revision control tools is SCCS (Source Code " 8.3070 "Control System), which Marc Rochkind wrote at Bell Labs, in the early 1970s. " 8.3071 @@ -2109,8 +3261,8 @@ 8.3072 "help of an administrator." 8.3073 msgstr "" 8.3074 8.3075 -#. type: Content of: <book><preface><sect1><para> 8.3076 -#: ../en/ch00-preface.xml:669 8.3077 +#. type: Content of: <book><chapter><sect1><para> 8.3078 +#: ../en/ch01-intro.xml:660 8.3079 msgid "" 8.3080 "Walter Tichy developed a free alternative to SCCS in the early 1980s; he " 8.3081 "called his program RCS (Revision Control System). Like SCCS, RCS required " 8.3082 @@ -2118,8 +3270,8 @@ 8.3083 "multiple people from modifying them simultaneously." 8.3084 msgstr "" 8.3085 8.3086 -#. type: Content of: <book><preface><sect1><para> 8.3087 -#: ../en/ch00-preface.xml:675 8.3088 +#. type: Content of: <book><chapter><sect1><para> 8.3089 +#: ../en/ch01-intro.xml:666 8.3090 msgid "" 8.3091 "Later in the 1980s, Dick Grune used RCS as a building block for a set of " 8.3092 "shell scripts he initially called cmt, but then renamed to CVS (Concurrent " 8.3093 @@ -2131,8 +3283,8 @@ 8.3094 "to merge their edits prior to committing changes to the central repository." 8.3095 msgstr "" 8.3096 8.3097 -#. type: Content of: <book><preface><sect1><para> 8.3098 -#: ../en/ch00-preface.xml:686 8.3099 +#. type: Content of: <book><chapter><sect1><para> 8.3100 +#: ../en/ch01-intro.xml:677 8.3101 msgid "" 8.3102 "Brian Berliner took Grune's original scripts and rewrote them in C, releasing " 8.3103 "in 1989 the code that has since developed into the modern version of CVS. " 8.3104 @@ -2145,8 +3297,8 @@ 8.3105 "system." 8.3106 msgstr "" 8.3107 8.3108 -#. type: Content of: <book><preface><sect1><para> 8.3109 -#: ../en/ch00-preface.xml:697 8.3110 +#. type: Content of: <book><chapter><sect1><para> 8.3111 +#: ../en/ch01-intro.xml:688 8.3112 msgid "" 8.3113 "In the early 1990s, Sun Microsystems developed an early distributed revision " 8.3114 "control system, called TeamWare. A TeamWare workspace contains a complete " 8.3115 @@ -2155,8 +3307,8 @@ 8.3116 "SCCS.)" 8.3117 msgstr "" 8.3118 8.3119 -#. type: Content of: <book><preface><sect1><para> 8.3120 -#: ../en/ch00-preface.xml:704 8.3121 +#. type: Content of: <book><chapter><sect1><para> 8.3122 +#: ../en/ch01-intro.xml:695 8.3123 msgid "" 8.3124 "As the 1990s progressed, awareness grew of a number of problems with CVS. It " 8.3125 "records simultaneous changes to multiple files individually, instead of " 8.3126 @@ -2167,8 +3319,8 @@ 8.3127 "architectural problems prohibitive." 8.3128 msgstr "" 8.3129 8.3130 -#. type: Content of: <book><preface><sect1><para> 8.3131 -#: ../en/ch00-preface.xml:714 8.3132 +#. type: Content of: <book><chapter><sect1><para> 8.3133 +#: ../en/ch01-intro.xml:705 8.3134 msgid "" 8.3135 "In 2001, Jim Blandy and Karl Fogel, two developers who had worked on CVS, " 8.3136 "started a project to replace it with a tool that would have a better " 8.3137 @@ -2179,8 +3331,8 @@ 8.3138 "grown in popularity." 8.3139 msgstr "" 8.3140 8.3141 -#. type: Content of: <book><preface><sect1><para> 8.3142 -#: ../en/ch00-preface.xml:723 8.3143 +#. type: Content of: <book><chapter><sect1><para> 8.3144 +#: ../en/ch01-intro.xml:714 8.3145 msgid "" 8.3146 "More or less simultaneously, Graydon Hoare began working on an ambitious " 8.3147 "distributed revision control system that he named Monotone. While Monotone " 8.3148 @@ -2190,48 +3342,26 @@ 8.3149 "integral notion of <quote>trust</quote> for code from different sources." 8.3150 msgstr "" 8.3151 8.3152 -#. type: Content of: <book><preface><sect1><para> 8.3153 -#: ../en/ch00-preface.xml:732 8.3154 +#. type: Content of: <book><chapter><sect1><para> 8.3155 +#: ../en/ch01-intro.xml:723 8.3156 msgid "" 8.3157 "Mercurial began life in 2005. While a few aspects of its design are " 8.3158 "influenced by Monotone, Mercurial focuses on ease of use, high performance, " 8.3159 "and scalability to very large projects." 8.3160 msgstr "" 8.3161 8.3162 -#. type: Content of: <book><preface><sect1><title> 8.3163 -#: ../en/ch00-preface.xml:740 8.3164 -msgid "Colophon&emdash;this book is Free" 8.3165 -msgstr "后记—本书是自由的!" 8.3166 - 8.3167 -#. type: Content of: <book><preface><sect1><para> 8.3168 -#: ../en/ch00-preface.xml:742 8.3169 -msgid "" 8.3170 -"This book is licensed under the Open Publication License, and is produced " 8.3171 -"entirely using Free Software tools. It is typeset with DocBook XML. " 8.3172 -"Illustrations are drawn and rendered with <ulink url=\"http://www.inkscape." 8.3173 -"org/\">Inkscape</ulink>." 8.3174 -msgstr "" 8.3175 - 8.3176 -#. type: Content of: <book><preface><sect1><para> 8.3177 -#: ../en/ch00-preface.xml:747 8.3178 -msgid "" 8.3179 -"The complete source code for this book is published as a Mercurial " 8.3180 -"repository, at <ulink url=\"http://hg.serpentine.com/mercurial/book\">http://" 8.3181 -"hg.serpentine.com/mercurial/book</ulink>." 8.3182 -msgstr "" 8.3183 - 8.3184 #. type: Content of: <book><chapter><title> 8.3185 -#: ../en/ch01-tour-basic.xml:5 8.3186 +#: ../en/ch02-tour-basic.xml:5 8.3187 msgid "A tour of Mercurial: the basics" 8.3188 msgstr "Mercurial 教程: 基础知识" 8.3189 8.3190 #. type: Content of: <book><chapter><sect1><title> 8.3191 -#: ../en/ch01-tour-basic.xml:8 8.3192 +#: ../en/ch02-tour-basic.xml:8 8.3193 msgid "Installing Mercurial on your system" 8.3194 msgstr "安装 Mercurial" 8.3195 8.3196 #. type: Content of: <book><chapter><sect1><para> 8.3197 -#: ../en/ch01-tour-basic.xml:10 8.3198 +#: ../en/ch02-tour-basic.xml:10 8.3199 msgid "" 8.3200 "Prebuilt binary packages of Mercurial are available for every popular " 8.3201 "operating system. These make it easy to start using Mercurial on your " 8.3202 @@ -2241,12 +3371,12 @@ 8.3203 "用 Mercurial 变得很容易。" 8.3204 8.3205 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3206 -#: ../en/ch01-tour-basic.xml:15 8.3207 +#: ../en/ch02-tour-basic.xml:15 8.3208 msgid "Windows" 8.3209 msgstr "Windows" 8.3210 8.3211 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3212 -#: ../en/ch01-tour-basic.xml:17 8.3213 +#: ../en/ch02-tour-basic.xml:17 8.3214 msgid "" 8.3215 "The best version of Mercurial for Windows is TortoiseHg, which can be found " 8.3216 "at <ulink url=\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://" 8.3217 @@ -2254,26 +3384,32 @@ 8.3218 "external dependencies; it <quote>just works</quote>. It provides both " 8.3219 "command line and graphical user interfaces." 8.3220 msgstr "" 8.3221 +"Windows 中最好的 Mercurial 版本是TortoiseHg,它的主页地址是 <ulink url=" 8.3222 +"\"http://bitbucket.org/tortoisehg/stable/wiki/Home\">http://bitbucket.org/" 8.3223 +"tortoisehg/stable/wiki/Home</ulink>。这个软件没有外部依赖,它可以<quote>独立工" 8.3224 +"作</quote>,同时提供了命令行和图形用户界面。" 8.3225 8.3226 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3227 -#: ../en/ch01-tour-basic.xml:27 8.3228 +#: ../en/ch02-tour-basic.xml:27 8.3229 msgid "Mac OS X" 8.3230 msgstr "Mac OS X" 8.3231 8.3232 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3233 -#: ../en/ch01-tour-basic.xml:29 8.3234 +#: ../en/ch02-tour-basic.xml:29 8.3235 msgid "" 8.3236 "Lee Cantey publishes an installer of Mercurial for Mac OS X at <ulink url=" 8.3237 "\"http://mercurial.berkwood.com\">http://mercurial.berkwood.com</ulink>." 8.3238 msgstr "" 8.3239 +"Lee Cantey 为 Mac OS X 在 <ulink url=\"http://mercurial.berkwood.com" 8.3240 +"\">http://mercurial.berkwood.com</ulink> 发布了 Mercurial 安装程序。" 8.3241 8.3242 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3243 -#: ../en/ch01-tour-basic.xml:35 8.3244 +#: ../en/ch02-tour-basic.xml:35 8.3245 msgid "Linux" 8.3246 msgstr "Linux" 8.3247 8.3248 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3249 -#: ../en/ch01-tour-basic.xml:37 8.3250 +#: ../en/ch02-tour-basic.xml:37 8.3251 msgid "" 8.3252 "Because each Linux distribution has its own packaging tools, policies, and " 8.3253 "rate of development, it's difficult to give a comprehensive set of " 8.3254 @@ -2286,7 +3422,7 @@ 8.3255 "使用的发行版的 Mercurial 维护者的活跃程度。" 8.3256 8.3257 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3258 -#: ../en/ch01-tour-basic.xml:44 8.3259 +#: ../en/ch02-tour-basic.xml:44 8.3260 msgid "" 8.3261 "To keep things simple, I will focus on installing Mercurial from the command " 8.3262 "line under the most popular Linux distributions. Most of these distributions " 8.3263 @@ -2298,27 +3434,32 @@ 8.3264 "Mercurial;寻找的包名称是 <literal>mercurial</literal>。" 8.3265 8.3266 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3267 -#: ../en/ch01-tour-basic.xml:52 8.3268 +#: ../en/ch02-tour-basic.xml:52 8.3269 msgid "Ubuntu and Debian:" 8.3270 msgstr "Ubuntu 与 Debian:" 8.3271 8.3272 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3273 -#: ../en/ch01-tour-basic.xml:54 8.3274 -msgid "Fedora and OpenSUSE:" 8.3275 -msgstr "Fedora and OpenSUSE:" 8.3276 +#: ../en/ch02-tour-basic.xml:54 8.3277 +msgid "Fedora:" 8.3278 +msgstr "Fedora:" 8.3279 8.3280 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3281 -#: ../en/ch01-tour-basic.xml:56 8.3282 +#: ../en/ch02-tour-basic.xml:56 8.3283 +msgid "OpenSUSE:" 8.3284 +msgstr "OpenSUSE:" 8.3285 + 8.3286 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3287 +#: ../en/ch02-tour-basic.xml:58 8.3288 msgid "Gentoo:" 8.3289 msgstr "Gentoo:" 8.3290 8.3291 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3292 -#: ../en/ch01-tour-basic.xml:62 8.3293 +#: ../en/ch02-tour-basic.xml:64 8.3294 msgid "Solaris" 8.3295 msgstr "Solaris" 8.3296 8.3297 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3298 -#: ../en/ch01-tour-basic.xml:64 8.3299 +#: ../en/ch02-tour-basic.xml:66 8.3300 msgid "" 8.3301 "SunFreeWare, at <ulink url=\"http://www.sunfreeware.com\">http://www." 8.3302 "sunfreeware.com</ulink>, provides prebuilt packages of Mercurial." 8.3303 @@ -2327,26 +3468,29 @@ 8.3304 "ulink> 的 SunFreeWare 提供了 Mercurial 的二进制安装包。" 8.3305 8.3306 #. type: Content of: <book><chapter><sect1><title> 8.3307 -#: ../en/ch01-tour-basic.xml:73 8.3308 +#: ../en/ch02-tour-basic.xml:75 8.3309 msgid "Getting started" 8.3310 msgstr "开始" 8.3311 8.3312 #. type: Content of: <book><chapter><sect1><para> 8.3313 -#: ../en/ch01-tour-basic.xml:75 8.3314 +#: ../en/ch02-tour-basic.xml:77 8.3315 msgid "" 8.3316 "To begin, we'll use the <command role=\"hg-cmd\">hg version</command> command " 8.3317 -"to find out whether Mercurial is actually installed properly. The actual " 8.3318 -"version information that it prints isn't so important; it's whether it prints " 8.3319 -"anything at all that we care about." 8.3320 -msgstr "" 8.3321 +"to find out whether Mercurial is installed properly. The actual version " 8.3322 +"information that it prints isn't so important; we simply care whether the " 8.3323 +"command runs and prints anything at all." 8.3324 +msgstr "" 8.3325 +"首先,我们使用 <command role=\"hg-cmd\">hg version</command> 命令检查 " 8.3326 +"Mercurial 是否已经正确安装。它打印出来的实际版本信息并不重要;我们只关心它是否" 8.3327 +"能够运行,打印出信息。" 8.3328 8.3329 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3330 -#: ../en/ch01-tour-basic.xml:84 8.3331 +#: ../en/ch02-tour-basic.xml:86 8.3332 msgid "Built-in help" 8.3333 msgstr "内置帮助" 8.3334 8.3335 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3336 -#: ../en/ch01-tour-basic.xml:86 8.3337 +#: ../en/ch02-tour-basic.xml:88 8.3338 msgid "" 8.3339 "Mercurial provides a built-in help system. This is invaluable for those " 8.3340 "times when you find yourself stuck trying to remember how to run a command. " 8.3341 @@ -2355,9 +3499,13 @@ 8.3342 "what each does. If you ask for help on a specific command (as below), it " 8.3343 "prints more detailed information." 8.3344 msgstr "" 8.3345 - 8.3346 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.3347 -#: ../en/ch01-tour-basic.xml:97 8.3348 +"Mercurial 内置了帮助系统。当你不记得如何执行一个命令时,它会给你重要的帮助。如" 8.3349 +"果你完全没有头绪,那就直接运行 <command role=\"hg-cmd\">hg help</command>;它" 8.3350 +"会给出命令的简短列表,还描述了每个命令的作用。如果你需要具体命令的帮助(下述)," 8.3351 +"它会给出更详细的信息。" 8.3352 + 8.3353 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.3354 +#: ../en/ch02-tour-basic.xml:99 8.3355 msgid "" 8.3356 "For a more impressive level of detail (which you won't usually need) run " 8.3357 "<command role=\"hg-cmd\">hg help <option role=\"hg-opt-global\">-v</option></" 8.3358 @@ -2365,14 +3513,18 @@ 8.3359 "<option role=\"hg-opt-global\">--verbose</option>, and tells Mercurial to " 8.3360 "print more information than it usually would." 8.3361 msgstr "" 8.3362 +"要获得更多的详细信息(通常不需要),可以执行 <command role=\"hg-cmd\">hg help " 8.3363 +"<option role=\"hg-opt-global\">-v</option></command>。选项 <option role=\"hg-" 8.3364 +"opt-global\">-v</option> 是 <option role=\"hg-opt-global\">--verbose</option> " 8.3365 +"的短格式,告诉 Mercurial 要打印通常不需要的更多信息。" 8.3366 8.3367 #. type: Content of: <book><chapter><sect1><title> 8.3368 -#: ../en/ch01-tour-basic.xml:108 8.3369 +#: ../en/ch02-tour-basic.xml:110 8.3370 msgid "Working with a repository" 8.3371 msgstr "使用版本库" 8.3372 8.3373 #. type: Content of: <book><chapter><sect1><para> 8.3374 -#: ../en/ch01-tour-basic.xml:110 8.3375 +#: ../en/ch02-tour-basic.xml:112 8.3376 msgid "" 8.3377 "In Mercurial, everything happens inside a <emphasis>repository</emphasis>. " 8.3378 "The repository for a project contains all of the files that <quote>belong to</" 8.3379 @@ -2380,7 +3532,7 @@ 8.3380 msgstr "" 8.3381 8.3382 #. type: Content of: <book><chapter><sect1><para> 8.3383 -#: ../en/ch01-tour-basic.xml:116 8.3384 +#: ../en/ch02-tour-basic.xml:118 8.3385 msgid "" 8.3386 "There's nothing particularly magical about a repository; it is simply a " 8.3387 "directory tree in your filesystem that Mercurial treats as special. You can " 8.3388 @@ -2389,12 +3541,12 @@ 8.3389 msgstr "" 8.3390 8.3391 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3392 -#: ../en/ch01-tour-basic.xml:123 8.3393 +#: ../en/ch02-tour-basic.xml:125 8.3394 msgid "Making a local copy of a repository" 8.3395 msgstr "创建版本库的工作副本" 8.3396 8.3397 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3398 -#: ../en/ch01-tour-basic.xml:125 8.3399 +#: ../en/ch02-tour-basic.xml:127 8.3400 msgid "" 8.3401 "<emphasis>Copying</emphasis> a repository is just a little bit special. " 8.3402 "While you could use a normal file copying command to make a copy of a " 8.3403 @@ -2404,7 +3556,7 @@ 8.3404 msgstr "" 8.3405 8.3406 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3407 -#: ../en/ch01-tour-basic.xml:134 8.3408 +#: ../en/ch02-tour-basic.xml:136 8.3409 msgid "" 8.3410 "One advantage of using <command role=\"hg-cmd\">hg clone</command> is that, " 8.3411 "as we can see above, it lets us clone repositories over the network. Another " 8.3412 @@ -2413,21 +3565,21 @@ 8.3413 msgstr "" 8.3414 8.3415 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3416 -#: ../en/ch01-tour-basic.xml:140 8.3417 +#: ../en/ch02-tour-basic.xml:142 8.3418 msgid "" 8.3419 "If our clone succeeded, we should now have a local directory called <filename " 8.3420 "class=\"directory\">hello</filename>. This directory will contain some files." 8.3421 msgstr "" 8.3422 8.3423 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3424 -#: ../en/ch01-tour-basic.xml:146 8.3425 +#: ../en/ch02-tour-basic.xml:148 8.3426 msgid "" 8.3427 "These files have the same contents and history in our repository as they do " 8.3428 "in the repository we cloned." 8.3429 msgstr "" 8.3430 8.3431 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3432 -#: ../en/ch01-tour-basic.xml:149 8.3433 +#: ../en/ch02-tour-basic.xml:151 8.3434 msgid "" 8.3435 "Every Mercurial repository is complete, self-contained, and independent. It " 8.3436 "contains its own private copy of a project's files and history. As we just " 8.3437 @@ -2437,7 +3589,7 @@ 8.3438 msgstr "" 8.3439 8.3440 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3441 -#: ../en/ch01-tour-basic.xml:156 8.3442 +#: ../en/ch02-tour-basic.xml:158 8.3443 msgid "" 8.3444 "What this means for now is that we're free to experiment with our repository, " 8.3445 "safe in the knowledge that it's a private <quote>sandbox</quote> that won't " 8.3446 @@ -2445,12 +3597,12 @@ 8.3447 msgstr "" 8.3448 8.3449 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3450 -#: ../en/ch01-tour-basic.xml:162 8.3451 +#: ../en/ch02-tour-basic.xml:164 8.3452 msgid "What's in a repository?" 8.3453 msgstr "什么是版本库?" 8.3454 8.3455 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3456 -#: ../en/ch01-tour-basic.xml:164 8.3457 +#: ../en/ch02-tour-basic.xml:166 8.3458 msgid "" 8.3459 "When we take a more detailed look inside a repository, we can see that it " 8.3460 "contains a directory named <filename class=\"directory\">.hg</filename>. " 8.3461 @@ -2458,7 +3610,7 @@ 8.3462 msgstr "" 8.3463 8.3464 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3465 -#: ../en/ch01-tour-basic.xml:171 8.3466 +#: ../en/ch02-tour-basic.xml:173 8.3467 msgid "" 8.3468 "The contents of the <filename class=\"directory\">.hg</filename> directory " 8.3469 "and its subdirectories are private to Mercurial. Every other file and " 8.3470 @@ -2466,7 +3618,7 @@ 8.3471 msgstr "" 8.3472 8.3473 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3474 -#: ../en/ch01-tour-basic.xml:177 8.3475 +#: ../en/ch02-tour-basic.xml:179 8.3476 msgid "" 8.3477 "To introduce a little terminology, the <filename class=\"directory\">.hg</" 8.3478 "filename> directory is the <quote>real</quote> repository, and all of the " 8.3479 @@ -2479,12 +3631,12 @@ 8.3480 msgstr "" 8.3481 8.3482 #. type: Content of: <book><chapter><sect1><title> 8.3483 -#: ../en/ch01-tour-basic.xml:192 8.3484 +#: ../en/ch02-tour-basic.xml:194 8.3485 msgid "A tour through history" 8.3486 msgstr "回溯历史" 8.3487 8.3488 #. type: Content of: <book><chapter><sect1><para> 8.3489 -#: ../en/ch01-tour-basic.xml:194 8.3490 +#: ../en/ch02-tour-basic.xml:196 8.3491 msgid "" 8.3492 "One of the first things we might want to do with a new, unfamiliar repository " 8.3493 "is understand its history. The <command role=\"hg-cmd\">hg log</command> " 8.3494 @@ -2492,7 +3644,7 @@ 8.3495 msgstr "" 8.3496 8.3497 #. type: Content of: <book><chapter><sect1><para> 8.3498 -#: ../en/ch01-tour-basic.xml:201 8.3499 +#: ../en/ch02-tour-basic.xml:203 8.3500 msgid "" 8.3501 "By default, this command prints a brief paragraph of output for each change " 8.3502 "to the project that was recorded. In Mercurial terminology, we call each of " 8.3503 @@ -2501,27 +3653,26 @@ 8.3504 msgstr "" 8.3505 8.3506 #. type: Content of: <book><chapter><sect1><para> 8.3507 -#: ../en/ch01-tour-basic.xml:207 8.3508 +#: ../en/ch02-tour-basic.xml:209 8.3509 msgid "" 8.3510 "The fields in a record of output from <command role=\"hg-cmd\">hg log</" 8.3511 "command> are as follows." 8.3512 msgstr "" 8.3513 8.3514 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3515 -#: ../en/ch01-tour-basic.xml:211 8.3516 +#: ../en/ch02-tour-basic.xml:213 8.3517 msgid "" 8.3518 "<literal>changeset</literal>: This field has the format of a number, followed " 8.3519 "by a colon, followed by a hexadecimal (or <emphasis>hex</emphasis>) string. " 8.3520 "These are <emphasis>identifiers</emphasis> for the changeset. The hex string " 8.3521 "is a unique identifier: the same hex string will always refer to the same " 8.3522 -"changeset. The number is shorter and easier to type than the hex string, but " 8.3523 -"it isn't unique: the same number in two different clones of a repository may " 8.3524 -"identify different changesets. Why provide the number at all, then? For " 8.3525 -"local convenience." 8.3526 +"changeset in every copy of this repository. The number is shorter and easier " 8.3527 +"to type than the hex string, but it isn't unique: the same number in two " 8.3528 +"different clones of a repository may identify different changesets." 8.3529 msgstr "" 8.3530 8.3531 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3532 -#: ../en/ch01-tour-basic.xml:223 8.3533 +#: ../en/ch02-tour-basic.xml:224 8.3534 msgid "" 8.3535 "<literal>user</literal>: The identity of the person who created the " 8.3536 "changeset. This is a free-form field, but it most often contains a person's " 8.3537 @@ -2529,7 +3680,7 @@ 8.3538 msgstr "" 8.3539 8.3540 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3541 -#: ../en/ch01-tour-basic.xml:227 8.3542 +#: ../en/ch02-tour-basic.xml:228 8.3543 msgid "" 8.3544 "<literal>date</literal>: The date and time on which the changeset was " 8.3545 "created, and the timezone in which it was created. (The date and time are " 8.3546 @@ -2538,14 +3689,14 @@ 8.3547 msgstr "" 8.3548 8.3549 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3550 -#: ../en/ch01-tour-basic.xml:232 8.3551 +#: ../en/ch02-tour-basic.xml:233 8.3552 msgid "" 8.3553 "<literal>summary</literal>: The first line of the text message that the " 8.3554 "creator of the changeset entered to describe the changeset." 8.3555 msgstr "" 8.3556 8.3557 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3558 -#: ../en/ch01-tour-basic.xml:236 8.3559 +#: ../en/ch02-tour-basic.xml:237 8.3560 msgid "" 8.3561 "Some changesets, such as the first in the list above, have a <literal>tag</" 8.3562 "literal> field. A tag is another way to identify a changeset, by giving it " 8.3563 @@ -2554,14 +3705,14 @@ 8.3564 msgstr "" 8.3565 8.3566 #. type: Content of: <book><chapter><sect1><para> 8.3567 -#: ../en/ch01-tour-basic.xml:244 8.3568 +#: ../en/ch02-tour-basic.xml:245 8.3569 msgid "" 8.3570 "The default output printed by <command role=\"hg-cmd\">hg log</command> is " 8.3571 "purely a summary; it is missing a lot of detail." 8.3572 msgstr "" 8.3573 8.3574 #. type: Content of: <book><chapter><sect1><para> 8.3575 -#: ../en/ch01-tour-basic.xml:248 8.3576 +#: ../en/ch02-tour-basic.xml:249 8.3577 msgid "" 8.3578 "<xref linkend=\"fig:tour-basic:history\"/> provides a graphical " 8.3579 "representation of the history of the <filename class=\"directory\">hello</" 8.3580 @@ -2571,45 +3722,47 @@ 8.3581 msgstr "" 8.3582 8.3583 #. type: Content of: <book><chapter><sect1><figure><title> 8.3584 -#: ../en/ch01-tour-basic.xml:257 8.3585 +#: ../en/ch02-tour-basic.xml:258 8.3586 msgid "" 8.3587 "Graphical history of the <filename class=\"directory\">hello</filename> " 8.3588 "repository" 8.3589 msgstr "版本库 <filename class=\"directory\">hello</filename> 的历史图" 8.3590 8.3591 #. type: Content of: <book><chapter><sect1><figure> 8.3592 -#: ../en/ch01-tour-basic.xml:259 ../en/ch02-tour-merge.xml:50 8.3593 -#: ../en/ch02-tour-merge.xml:181 ../en/ch03-concepts.xml:293 8.3594 +#: ../en/ch02-tour-basic.xml:260 ../en/ch03-tour-merge.xml:61 8.3595 +#: ../en/ch03-tour-merge.xml:207 ../en/ch04-concepts.xml:290 8.3596 msgid "<placeholder type=\"mediaobject\" id=\"0\"/>" 8.3597 msgstr "" 8.3598 8.3599 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 8.3600 -#: ../en/ch01-tour-basic.xml:260 8.3601 +#: ../en/ch02-tour-basic.xml:261 8.3602 msgid "" 8.3603 "<imageobject><imagedata fileref=\"figs/tour-history.png\"/></imageobject>" 8.3604 msgstr "" 8.3605 8.3606 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase> 8.3607 -#: ../en/ch01-tour-basic.xml:261 ../en/ch02-tour-merge.xml:52 8.3608 -#: ../en/ch02-tour-merge.xml:82 ../en/ch02-tour-merge.xml:129 8.3609 -#: ../en/ch02-tour-merge.xml:183 ../en/ch02-tour-merge.xml:254 8.3610 -#: ../en/ch03-concepts.xml:57 ../en/ch03-concepts.xml:106 8.3611 -#: ../en/ch03-concepts.xml:191 ../en/ch03-concepts.xml:295 8.3612 -#: ../en/ch03-concepts.xml:346 ../en/ch03-concepts.xml:361 8.3613 -#: ../en/ch03-concepts.xml:402 ../en/ch03-concepts.xml:422 8.3614 -#: ../en/ch03-concepts.xml:465 ../en/ch05-collab.xml:276 8.3615 -#: ../en/ch08-undo.xml:365 ../en/ch08-undo.xml:412 ../en/ch08-undo.xml:477 8.3616 -#: ../en/ch08-undo.xml:515 ../en/ch11-mq.xml:412 8.3617 +#: ../en/ch02-tour-basic.xml:262 ../en/ch03-tour-merge.xml:63 8.3618 +#: ../en/ch03-tour-merge.xml:95 ../en/ch03-tour-merge.xml:182 8.3619 +#: ../en/ch03-tour-merge.xml:209 ../en/ch03-tour-merge.xml:279 8.3620 +#: ../en/ch04-concepts.xml:59 ../en/ch04-concepts.xml:108 8.3621 +#: ../en/ch04-concepts.xml:198 ../en/ch04-concepts.xml:292 8.3622 +#: ../en/ch04-concepts.xml:347 ../en/ch04-concepts.xml:362 8.3623 +#: ../en/ch04-concepts.xml:403 ../en/ch04-concepts.xml:423 8.3624 +#: ../en/ch04-concepts.xml:469 ../en/ch06-collab.xml:316 8.3625 +#: ../en/ch09-undo.xml:344 ../en/ch09-undo.xml:391 ../en/ch09-undo.xml:464 8.3626 +#: ../en/ch09-undo.xml:502 ../en/ch09-undo.xml:658 ../en/ch09-undo.xml:682 8.3627 +#: ../en/ch09-undo.xml:700 ../en/ch09-undo.xml:714 ../en/ch09-undo.xml:727 8.3628 +#: ../en/ch12-mq.xml:413 8.3629 msgid "XXX add text" 8.3630 msgstr "" 8.3631 8.3632 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3633 -#: ../en/ch01-tour-basic.xml:266 8.3634 +#: ../en/ch02-tour-basic.xml:267 8.3635 msgid "Changesets, revisions, and talking to other people" 8.3636 msgstr "修改集,版本,与其它用户交互" 8.3637 8.3638 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3639 -#: ../en/ch01-tour-basic.xml:269 8.3640 +#: ../en/ch02-tour-basic.xml:270 8.3641 msgid "" 8.3642 "As English is a notoriously sloppy language, and computer science has a " 8.3643 "hallowed history of terminological confusion (why use one term when four will " 8.3644 @@ -2621,7 +3774,7 @@ 8.3645 msgstr "" 8.3646 8.3647 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3648 -#: ../en/ch01-tour-basic.xml:279 8.3649 +#: ../en/ch02-tour-basic.xml:280 8.3650 msgid "" 8.3651 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to " 8.3652 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</" 8.3653 @@ -2632,14 +3785,14 @@ 8.3654 msgstr "" 8.3655 8.3656 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3657 -#: ../en/ch01-tour-basic.xml:288 8.3658 +#: ../en/ch02-tour-basic.xml:289 8.3659 msgid "" 8.3660 "The revision number is a handy notation that is <emphasis>only valid in that " 8.3661 "repository</emphasis>." 8.3662 msgstr "" 8.3663 8.3664 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.3665 -#: ../en/ch01-tour-basic.xml:291 8.3666 +#: ../en/ch02-tour-basic.xml:292 8.3667 msgid "" 8.3668 "The hexadecimal string is the <emphasis>permanent, unchanging identifier</" 8.3669 "emphasis> that will always identify that exact changeset in <emphasis>every</" 8.3670 @@ -2647,7 +3800,7 @@ 8.3671 msgstr "" 8.3672 8.3673 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3674 -#: ../en/ch01-tour-basic.xml:297 8.3675 +#: ../en/ch02-tour-basic.xml:298 8.3676 msgid "" 8.3677 "This distinction is important. If you send someone an email talking about " 8.3678 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 " 8.3679 @@ -2660,7 +3813,7 @@ 8.3680 msgstr "" 8.3681 8.3682 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3683 -#: ../en/ch01-tour-basic.xml:309 8.3684 +#: ../en/ch02-tour-basic.xml:310 8.3685 msgid "" 8.3686 "Mercurial uses revision numbers purely as a convenient shorthand. If you " 8.3687 "need to discuss a changeset with someone, or make a record of a changeset for " 8.3688 @@ -2669,12 +3822,12 @@ 8.3689 msgstr "" 8.3690 8.3691 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3692 -#: ../en/ch01-tour-basic.xml:317 8.3693 +#: ../en/ch02-tour-basic.xml:318 8.3694 msgid "Viewing specific revisions" 8.3695 msgstr "察看指定版本" 8.3696 8.3697 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3698 -#: ../en/ch01-tour-basic.xml:319 8.3699 +#: ../en/ch02-tour-basic.xml:320 8.3700 msgid "" 8.3701 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a " 8.3702 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option " 8.3703 @@ -2684,7 +3837,7 @@ 8.3704 msgstr "" 8.3705 8.3706 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3707 -#: ../en/ch01-tour-basic.xml:328 8.3708 +#: ../en/ch02-tour-basic.xml:329 8.3709 msgid "" 8.3710 "If you want to see the history of several revisions without having to list " 8.3711 "each one, you can use <emphasis>range notation</emphasis>; this lets you " 8.3712 @@ -2693,7 +3846,7 @@ 8.3713 msgstr "" 8.3714 8.3715 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3716 -#: ../en/ch01-tour-basic.xml:336 8.3717 +#: ../en/ch02-tour-basic.xml:337 8.3718 msgid "" 8.3719 "Mercurial also honours the order in which you specify revisions, so <command " 8.3720 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " 8.3721 @@ -2701,12 +3854,12 @@ 8.3722 msgstr "" 8.3723 8.3724 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3725 -#: ../en/ch01-tour-basic.xml:343 8.3726 +#: ../en/ch02-tour-basic.xml:344 8.3727 msgid "More detailed information" 8.3728 msgstr "更详细的信息" 8.3729 8.3730 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3731 -#: ../en/ch01-tour-basic.xml:345 8.3732 +#: ../en/ch02-tour-basic.xml:346 8.3733 msgid "" 8.3734 "While the summary information printed by <command role=\"hg-cmd\">hg log</" 8.3735 "command> is useful if you already know what you're looking for, you may need " 8.3736 @@ -2718,7 +3871,7 @@ 8.3737 msgstr "" 8.3738 8.3739 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3740 -#: ../en/ch01-tour-basic.xml:357 8.3741 +#: ../en/ch02-tour-basic.xml:358 8.3742 msgid "" 8.3743 "If you want to see both the description and content of a change, add the " 8.3744 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--" 8.3745 @@ -2728,19 +3881,19 @@ 8.3746 msgstr "" 8.3747 8.3748 #. type: Content of: <book><chapter><sect1><sect2><para> 8.3749 -#: ../en/ch01-tour-basic.xml:367 8.3750 +#: ../en/ch02-tour-basic.xml:368 8.3751 msgid "" 8.3752 "The <option role=\"hg-opt-log\">-p</option> option is tremendously useful, so " 8.3753 "it's well worth remembering." 8.3754 msgstr "" 8.3755 8.3756 #. type: Content of: <book><chapter><sect1><title> 8.3757 -#: ../en/ch01-tour-basic.xml:374 8.3758 +#: ../en/ch02-tour-basic.xml:375 8.3759 msgid "All about command options" 8.3760 msgstr "命令选项" 8.3761 8.3762 #. type: Content of: <book><chapter><sect1><para> 8.3763 -#: ../en/ch01-tour-basic.xml:376 8.3764 +#: ../en/ch02-tour-basic.xml:377 8.3765 msgid "" 8.3766 "Let's take a brief break from exploring Mercurial commands to discuss a " 8.3767 "pattern in the way that they work; you may find this useful to keep in mind " 8.3768 @@ -2748,7 +3901,7 @@ 8.3769 msgstr "" 8.3770 8.3771 #. type: Content of: <book><chapter><sect1><para> 8.3772 -#: ../en/ch01-tour-basic.xml:380 8.3773 +#: ../en/ch02-tour-basic.xml:381 8.3774 msgid "" 8.3775 "Mercurial has a consistent and straightforward approach to dealing with the " 8.3776 "options that you can pass to commands. It follows the conventions for " 8.3777 @@ -2756,7 +3909,7 @@ 8.3778 msgstr "" 8.3779 8.3780 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3781 -#: ../en/ch01-tour-basic.xml:387 8.3782 +#: ../en/ch02-tour-basic.xml:388 8.3783 msgid "" 8.3784 "Every option has a long name. For example, as we've already seen, the " 8.3785 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" 8.3786 @@ -2764,7 +3917,7 @@ 8.3787 msgstr "" 8.3788 8.3789 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3790 -#: ../en/ch01-tour-basic.xml:393 8.3791 +#: ../en/ch02-tour-basic.xml:394 8.3792 msgid "" 8.3793 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--" 8.3794 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The " 8.3795 @@ -2773,7 +3926,7 @@ 8.3796 msgstr "" 8.3797 8.3798 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3799 -#: ../en/ch01-tour-basic.xml:400 8.3800 +#: ../en/ch02-tour-basic.xml:401 8.3801 msgid "" 8.3802 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</" 8.3803 "option>), while short options start with one (e.g. <option role=\"hg-opt-log" 8.3804 @@ -2781,7 +3934,7 @@ 8.3805 msgstr "" 8.3806 8.3807 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3808 -#: ../en/ch01-tour-basic.xml:406 8.3809 +#: ../en/ch02-tour-basic.xml:407 8.3810 msgid "" 8.3811 "Option naming and usage is consistent across commands. For example, every " 8.3812 "command that lets you specify a changeset ID or revision number accepts both " 8.3813 @@ -2790,7 +3943,7 @@ 8.3814 msgstr "" 8.3815 8.3816 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.3817 -#: ../en/ch01-tour-basic.xml:413 8.3818 +#: ../en/ch02-tour-basic.xml:414 8.3819 msgid "" 8.3820 "If you are using short options, you can save typing by running them together. " 8.3821 "For example, the command <command role=\"hg-cmd\">hg log -v -p -r 2</command> " 8.3822 @@ -2798,15 +3951,15 @@ 8.3823 msgstr "" 8.3824 8.3825 #. type: Content of: <book><chapter><sect1><para> 8.3826 -#: ../en/ch01-tour-basic.xml:420 8.3827 -msgid "" 8.3828 -"In the examples throughout this book, I use short options instead of long. " 8.3829 -"This just reflects my own preference, so don't read anything significant into " 8.3830 -"it." 8.3831 -msgstr "" 8.3832 - 8.3833 -#. type: Content of: <book><chapter><sect1><para> 8.3834 -#: ../en/ch01-tour-basic.xml:424 8.3835 +#: ../en/ch02-tour-basic.xml:421 8.3836 +msgid "" 8.3837 +"In the examples throughout this book, I usually use short options instead of " 8.3838 +"long. This simply reflects my own preference, so don't read anything " 8.3839 +"significant into it." 8.3840 +msgstr "" 8.3841 + 8.3842 +#. type: Content of: <book><chapter><sect1><para> 8.3843 +#: ../en/ch02-tour-basic.xml:425 8.3844 msgid "" 8.3845 "Most commands that print output of some kind will print more output when " 8.3846 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-" 8.3847 @@ -2815,12 +3968,12 @@ 8.3848 msgstr "" 8.3849 8.3850 #. type: Content of: <book><chapter><sect1><note><title> 8.3851 -#: ../en/ch01-tour-basic.xml:431 8.3852 +#: ../en/ch02-tour-basic.xml:432 8.3853 msgid "Option naming consistency" 8.3854 msgstr "" 8.3855 8.3856 #. type: Content of: <book><chapter><sect1><note><para> 8.3857 -#: ../en/ch01-tour-basic.xml:433 8.3858 +#: ../en/ch02-tour-basic.xml:434 8.3859 msgid "" 8.3860 "Almost always, Mercurial commands use consistent option names to refer to the " 8.3861 "same concepts. For instance, if a command deals with changesets, you'll " 8.3862 @@ -2830,19 +3983,19 @@ 8.3863 msgstr "" 8.3864 8.3865 #. type: Content of: <book><chapter><sect1><title> 8.3866 -#: ../en/ch01-tour-basic.xml:444 8.3867 +#: ../en/ch02-tour-basic.xml:445 8.3868 msgid "Making and reviewing changes" 8.3869 msgstr "创建和复审修改" 8.3870 8.3871 #. type: Content of: <book><chapter><sect1><para> 8.3872 -#: ../en/ch01-tour-basic.xml:446 8.3873 +#: ../en/ch02-tour-basic.xml:447 8.3874 msgid "" 8.3875 "Now that we have a grasp of viewing history in Mercurial, let's take a look " 8.3876 "at making some changes and examining them." 8.3877 msgstr "" 8.3878 8.3879 #. type: Content of: <book><chapter><sect1><para> 8.3880 -#: ../en/ch01-tour-basic.xml:450 8.3881 +#: ../en/ch02-tour-basic.xml:451 8.3882 msgid "" 8.3883 "The first thing we'll do is isolate our experiment in a repository of its " 8.3884 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we " 8.3885 @@ -2853,7 +4006,7 @@ 8.3886 msgstr "" 8.3887 8.3888 #. type: Content of: <book><chapter><sect1><para><footnote><para> 8.3889 -#: ../en/ch01-tour-basic.xml:457 8.3890 +#: ../en/ch02-tour-basic.xml:458 8.3891 msgid "" 8.3892 "The saving of space arises when source and destination repositories are on " 8.3893 "the same filesystem, in which case Mercurial will use hardlinks to do copy-on-" 8.3894 @@ -2863,7 +4016,7 @@ 8.3895 msgstr "" 8.3896 8.3897 #. type: Content of: <book><chapter><sect1><para> 8.3898 -#: ../en/ch01-tour-basic.xml:467 8.3899 +#: ../en/ch02-tour-basic.xml:468 8.3900 msgid "" 8.3901 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy " 8.3902 "of a remote repository around, which you can then make temporary clones of to " 8.3903 @@ -2875,7 +4028,7 @@ 8.3904 msgstr "" 8.3905 8.3906 #. type: Content of: <book><chapter><sect1><para> 8.3907 -#: ../en/ch01-tour-basic.xml:476 8.3908 +#: ../en/ch02-tour-basic.xml:477 8.3909 msgid "" 8.3910 "In our <filename class=\"directory\">my-hello</filename> repository, we have " 8.3911 "a file <filename>hello.c</filename> that contains the classic <quote>hello, " 8.3912 @@ -2883,19 +4036,19 @@ 8.3913 msgstr "" 8.3914 8.3915 #. type: Content of: <book><chapter><sect1><para> 8.3916 -#: ../en/ch01-tour-basic.xml:482 8.3917 +#: ../en/ch02-tour-basic.xml:483 8.3918 msgid "Let's edit this file so that it prints a second line of output." 8.3919 msgstr "" 8.3920 8.3921 #. type: Content of: <book><chapter><sect1><para> 8.3922 -#: ../en/ch01-tour-basic.xml:487 8.3923 +#: ../en/ch02-tour-basic.xml:488 8.3924 msgid "" 8.3925 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " 8.3926 "what Mercurial knows about the files in the repository." 8.3927 msgstr "" 8.3928 8.3929 #. type: Content of: <book><chapter><sect1><para> 8.3930 -#: ../en/ch01-tour-basic.xml:493 8.3931 +#: ../en/ch02-tour-basic.xml:494 8.3932 msgid "" 8.3933 "The <command role=\"hg-cmd\">hg status</command> command prints no output for " 8.3934 "some files, but a line starting with <quote><literal>M</literal></quote> for " 8.3935 @@ -2905,7 +4058,7 @@ 8.3936 msgstr "" 8.3937 8.3938 #. type: Content of: <book><chapter><sect1><para> 8.3939 -#: ../en/ch01-tour-basic.xml:500 8.3940 +#: ../en/ch02-tour-basic.xml:501 8.3941 msgid "" 8.3942 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed " 8.3943 "that we modified <filename>hello.c</filename>. We didn't need to " 8.3944 @@ -2915,7 +4068,7 @@ 8.3945 msgstr "" 8.3946 8.3947 #. type: Content of: <book><chapter><sect1><para> 8.3948 -#: ../en/ch01-tour-basic.xml:508 8.3949 +#: ../en/ch02-tour-basic.xml:509 8.3950 msgid "" 8.3951 "It's somewhat helpful to know that we've modified <filename>hello.c</" 8.3952 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> " 8.3953 @@ -2924,24 +4077,24 @@ 8.3954 msgstr "" 8.3955 8.3956 #. type: Content of: <book><chapter><sect1><title> 8.3957 -#: ../en/ch01-tour-basic.xml:517 ../en/ch11-mq.xml:187 8.3958 +#: ../en/ch02-tour-basic.xml:518 ../en/ch12-mq.xml:187 8.3959 msgid "Understanding patches" 8.3960 msgstr "理解补丁" 8.3961 8.3962 #. type: Content of: <book><chapter><sect1><tip><para> 8.3963 -#: ../en/ch01-tour-basic.xml:519 8.3964 +#: ../en/ch02-tour-basic.xml:520 8.3965 msgid "" 8.3966 "Remember to take a look at <xref linkend=\"sec:mq:patch\"/> if you don't know " 8.3967 "how to read output above." 8.3968 msgstr "" 8.3969 8.3970 #. type: Content of: <book><chapter><sect1><title> 8.3971 -#: ../en/ch01-tour-basic.xml:525 8.3972 +#: ../en/ch02-tour-basic.xml:526 8.3973 msgid "Recording changes in a new changeset" 8.3974 msgstr "在新修改集中记录修改" 8.3975 8.3976 #. type: Content of: <book><chapter><sect1><para> 8.3977 -#: ../en/ch01-tour-basic.xml:527 8.3978 +#: ../en/ch02-tour-basic.xml:528 8.3979 msgid "" 8.3980 "We can modify files, build and test our changes, and use <command role=\"hg-" 8.3981 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to " 8.3982 @@ -2950,7 +4103,7 @@ 8.3983 msgstr "" 8.3984 8.3985 #. type: Content of: <book><chapter><sect1><para> 8.3986 -#: ../en/ch01-tour-basic.xml:534 8.3987 +#: ../en/ch02-tour-basic.xml:535 8.3988 msgid "" 8.3989 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new " 8.3990 "changeset; we'll usually refer to this as <quote>making a commit</quote> or " 8.3991 @@ -2958,12 +4111,12 @@ 8.3992 msgstr "" 8.3993 8.3994 #. type: Content of: <book><chapter><sect1><sect2><title> 8.3995 -#: ../en/ch01-tour-basic.xml:540 8.3996 +#: ../en/ch02-tour-basic.xml:541 8.3997 msgid "Setting up a username" 8.3998 msgstr "配置用户名称" 8.3999 8.4000 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4001 -#: ../en/ch01-tour-basic.xml:542 8.4002 +#: ../en/ch02-tour-basic.xml:543 8.4003 msgid "" 8.4004 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the " 8.4005 "first time, it is not guaranteed to succeed. Mercurial records your name and " 8.4006 @@ -2974,7 +4127,7 @@ 8.4007 msgstr "" 8.4008 8.4009 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.4010 -#: ../en/ch01-tour-basic.xml:551 8.4011 +#: ../en/ch02-tour-basic.xml:552 8.4012 msgid "" 8.4013 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the " 8.4014 "<command role=\"hg-cmd\">hg commit</command> command on the command line, " 8.4015 @@ -2982,14 +4135,14 @@ 8.4016 msgstr "" 8.4017 8.4018 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.4019 -#: ../en/ch01-tour-basic.xml:556 8.4020 +#: ../en/ch02-tour-basic.xml:557 8.4021 msgid "" 8.4022 "If you have set the <envar>HGUSER</envar> environment variable, this is " 8.4023 "checked next." 8.4024 msgstr "" 8.4025 8.4026 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.4027 -#: ../en/ch01-tour-basic.xml:559 8.4028 +#: ../en/ch02-tour-basic.xml:560 8.4029 msgid "" 8.4030 "If you create a file in your home directory called <filename role=\"special" 8.4031 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> " 8.4032 @@ -2998,14 +4151,14 @@ 8.4033 msgstr "" 8.4034 8.4035 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.4036 -#: ../en/ch01-tour-basic.xml:567 8.4037 +#: ../en/ch02-tour-basic.xml:568 8.4038 msgid "" 8.4039 "If you have set the <envar>EMAIL</envar> environment variable, this will be " 8.4040 "used next." 8.4041 msgstr "" 8.4042 8.4043 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.4044 -#: ../en/ch01-tour-basic.xml:570 8.4045 +#: ../en/ch02-tour-basic.xml:571 8.4046 msgid "" 8.4047 "Mercurial will query your system to find out your local user name and host " 8.4048 "name, and construct a username from these components. Since this often " 8.4049 @@ -3014,7 +4167,7 @@ 8.4050 msgstr "" 8.4051 8.4052 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4053 -#: ../en/ch01-tour-basic.xml:577 8.4054 +#: ../en/ch02-tour-basic.xml:578 8.4055 msgid "" 8.4056 "If all of these mechanisms fail, Mercurial will fail, printing an error " 8.4057 "message. In this case, it will not let you commit until you set up a " 8.4058 @@ -3022,7 +4175,7 @@ 8.4059 msgstr "" 8.4060 8.4061 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4062 -#: ../en/ch01-tour-basic.xml:581 8.4063 +#: ../en/ch02-tour-basic.xml:582 8.4064 msgid "" 8.4065 "You should think of the <envar>HGUSER</envar> environment variable and the " 8.4066 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-" 8.4067 @@ -3033,27 +4186,47 @@ 8.4068 msgstr "" 8.4069 8.4070 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.4071 -#: ../en/ch01-tour-basic.xml:590 8.4072 +#: ../en/ch02-tour-basic.xml:591 8.4073 msgid "Creating a Mercurial configuration file" 8.4074 msgstr "创建 Mercurial 的配置文件" 8.4075 8.4076 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.4077 -#: ../en/ch01-tour-basic.xml:592 8.4078 -msgid "" 8.4079 -"To set a user name, use your favourite editor to create a file called " 8.4080 +#: ../en/ch02-tour-basic.xml:593 8.4081 +msgid "" 8.4082 +"To set a user name, use your favorite editor to create a file called " 8.4083 "<filename role=\"special\">.hgrc</filename> in your home directory. " 8.4084 "Mercurial will use this file to look up your personalised configuration " 8.4085 "settings. The initial contents of your <filename role=\"special\">.hgrc</" 8.4086 "filename> should look like this." 8.4087 msgstr "" 8.4088 8.4089 -#. type: Content of: <book><chapter><sect1><sect2><sect3><remark> 8.4090 -#: ../en/ch01-tour-basic.xml:600 8.4091 -msgid "Figure out what the appropriate directory is on Windows." 8.4092 -msgstr "" 8.4093 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><title> 8.4094 +#: ../en/ch02-tour-basic.xml:602 8.4095 +msgid "<quote>Home directory</quote> on Windows" 8.4096 +msgstr "" 8.4097 + 8.4098 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><para> 8.4099 +#: ../en/ch02-tour-basic.xml:604 8.4100 +msgid "" 8.4101 +"When we refer to your home directory, on an English language installation of " 8.4102 +"Windows this will usually be a folder named after your user name in " 8.4103 +"<filename>C:\\Documents and Settings</filename>. You can find out the exact " 8.4104 +"name of your home directory by opening a command prompt window and running " 8.4105 +"the following command." 8.4106 +msgstr "" 8.4107 + 8.4108 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><prompt> 8.4109 +#: ../en/ch02-tour-basic.xml:612 8.4110 +msgid "C:\\>" 8.4111 +msgstr "C:\\>" 8.4112 + 8.4113 +#. type: Content of: <book><chapter><sect1><sect2><sect3><tip><screen><userinput> 8.4114 +#: ../en/ch02-tour-basic.xml:612 8.4115 +msgid "echo %UserProfile%" 8.4116 +msgstr "echo %UserProfile%" 8.4117 8.4118 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.4119 -#: ../en/ch01-tour-basic.xml:607 8.4120 +#: ../en/ch02-tour-basic.xml:619 8.4121 msgid "" 8.4122 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</" 8.4123 "emphasis> of the config file, so you can read the <quote><literal>username " 8.4124 @@ -3065,12 +4238,12 @@ 8.4125 msgstr "" 8.4126 8.4127 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.4128 -#: ../en/ch01-tour-basic.xml:620 8.4129 +#: ../en/ch02-tour-basic.xml:632 8.4130 msgid "Choosing a user name" 8.4131 msgstr "选择用户名称" 8.4132 8.4133 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.4134 -#: ../en/ch01-tour-basic.xml:622 8.4135 +#: ../en/ch02-tour-basic.xml:634 8.4136 msgid "" 8.4137 "You can use any text you like as the value of the <literal>username</literal> " 8.4138 "config item, since this information is for reading by other people, but will " 8.4139 @@ -3079,7 +4252,7 @@ 8.4140 msgstr "" 8.4141 8.4142 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 8.4143 -#: ../en/ch01-tour-basic.xml:629 8.4144 +#: ../en/ch02-tour-basic.xml:641 8.4145 msgid "" 8.4146 "Mercurial's built-in web server obfuscates email addresses, to make it more " 8.4147 "difficult for the email harvesting tools that spammers use. This reduces the " 8.4148 @@ -3088,12 +4261,12 @@ 8.4149 msgstr "" 8.4150 8.4151 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4152 -#: ../en/ch01-tour-basic.xml:639 8.4153 +#: ../en/ch02-tour-basic.xml:650 8.4154 msgid "Writing a commit message" 8.4155 msgstr "写提交日志" 8.4156 8.4157 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4158 -#: ../en/ch01-tour-basic.xml:641 8.4159 +#: ../en/ch02-tour-basic.xml:652 8.4160 msgid "" 8.4161 "When we commit a change, Mercurial drops us into a text editor, to enter a " 8.4162 "message that will describe the modifications we've made in this changeset. " 8.4163 @@ -3103,7 +4276,7 @@ 8.4164 msgstr "" 8.4165 8.4166 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4167 -#: ../en/ch01-tour-basic.xml:651 8.4168 +#: ../en/ch02-tour-basic.xml:662 8.4169 msgid "" 8.4170 "The editor that the <command role=\"hg-cmd\">hg commit</command> command " 8.4171 "drops us into will contain an empty line or two, followed by a number of " 8.4172 @@ -3111,7 +4284,7 @@ 8.4173 msgstr "" 8.4174 8.4175 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4176 -#: ../en/ch01-tour-basic.xml:665 8.4177 +#: ../en/ch02-tour-basic.xml:676 8.4178 msgid "" 8.4179 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></" 8.4180 "quote>; it uses them only to tell us which files it's recording changes to. " 8.4181 @@ -3119,12 +4292,12 @@ 8.4182 msgstr "" 8.4183 8.4184 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4185 -#: ../en/ch01-tour-basic.xml:671 8.4186 +#: ../en/ch02-tour-basic.xml:682 8.4187 msgid "Writing a good commit message" 8.4188 msgstr "写好提交日志" 8.4189 8.4190 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4191 -#: ../en/ch01-tour-basic.xml:673 8.4192 +#: ../en/ch02-tour-basic.xml:684 8.4193 msgid "" 8.4194 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of " 8.4195 "a commit message by default, it's best to write a commit message whose first " 8.4196 @@ -3134,7 +4307,7 @@ 8.4197 msgstr "" 8.4198 8.4199 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4200 -#: ../en/ch01-tour-basic.xml:687 8.4201 +#: ../en/ch02-tour-basic.xml:697 8.4202 msgid "" 8.4203 "As far as the remainder of the contents of the commit message are concerned, " 8.4204 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care " 8.4205 @@ -3143,20 +4316,44 @@ 8.4206 msgstr "" 8.4207 8.4208 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4209 -#: ../en/ch01-tour-basic.xml:693 8.4210 +#: ../en/ch02-tour-basic.xml:702 8.4211 msgid "" 8.4212 "My personal preference is for short, but informative, commit messages that " 8.4213 "tell me something that I can't figure out with a quick glance at the output " 8.4214 "of <command role=\"hg-cmd\">hg log --patch</command>." 8.4215 msgstr "" 8.4216 8.4217 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4218 +#: ../en/ch02-tour-basic.xml:706 8.4219 +msgid "" 8.4220 +"If we run the <command role=\"hg-cmd\">hg commit</command> command without " 8.4221 +"any arguments, it records all of the changes we've made, as reported by " 8.4222 +"<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 8.4223 +"diff</command>." 8.4224 +msgstr "" 8.4225 + 8.4226 +#. type: Content of: <book><chapter><sect1><sect2><note><title> 8.4227 +#: ../en/ch02-tour-basic.xml:713 8.4228 +msgid "A surprise for Subversion users" 8.4229 +msgstr "" 8.4230 + 8.4231 +#. type: Content of: <book><chapter><sect1><sect2><note><para> 8.4232 +#: ../en/ch02-tour-basic.xml:715 8.4233 +msgid "" 8.4234 +"Like other Mercurial commands, if we don't supply explicit names to commit to " 8.4235 +"the <command role=\"hg-cmd\">hg commit</command>, it will operate across a " 8.4236 +"repository's entire working directory. Be wary of this if you're coming from " 8.4237 +"the Subversion or CVS world, since you might expect it to operate only on the " 8.4238 +"current directory that you happen to be visiting and its subdirectories." 8.4239 +msgstr "" 8.4240 + 8.4241 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4242 -#: ../en/ch01-tour-basic.xml:700 8.4243 +#: ../en/ch02-tour-basic.xml:726 8.4244 msgid "Aborting a commit" 8.4245 msgstr "终止提交" 8.4246 8.4247 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4248 -#: ../en/ch01-tour-basic.xml:702 8.4249 +#: ../en/ch02-tour-basic.xml:728 8.4250 msgid "" 8.4251 "If you decide that you don't want to commit while in the middle of editing a " 8.4252 "commit message, simply exit from your editor without saving the file that " 8.4253 @@ -3164,22 +4361,13 @@ 8.4254 "the working directory." 8.4255 msgstr "" 8.4256 8.4257 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4258 -#: ../en/ch01-tour-basic.xml:707 8.4259 -msgid "" 8.4260 -"If we run the <command role=\"hg-cmd\">hg commit</command> command without " 8.4261 -"any arguments, it records all of the changes we've made, as reported by " 8.4262 -"<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 8.4263 -"diff</command>." 8.4264 -msgstr "" 8.4265 - 8.4266 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4267 -#: ../en/ch01-tour-basic.xml:714 8.4268 +#: ../en/ch02-tour-basic.xml:736 8.4269 msgid "Admiring our new handiwork" 8.4270 msgstr "欣赏我们的成果" 8.4271 8.4272 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4273 -#: ../en/ch01-tour-basic.xml:716 8.4274 +#: ../en/ch02-tour-basic.xml:738 8.4275 msgid "" 8.4276 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg " 8.4277 "tip</command> command to display the changeset we just created. This command " 8.4278 @@ -3188,14 +4376,14 @@ 8.4279 msgstr "" 8.4280 8.4281 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4282 -#: ../en/ch01-tour-basic.xml:725 8.4283 +#: ../en/ch02-tour-basic.xml:746 8.4284 msgid "" 8.4285 "We refer to the newest revision in the repository as the <emphasis>tip " 8.4286 "revision</emphasis>, or simply the <emphasis>tip</emphasis>." 8.4287 msgstr "" 8.4288 8.4289 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4290 -#: ../en/ch01-tour-basic.xml:729 8.4291 +#: ../en/ch02-tour-basic.xml:750 8.4292 msgid "" 8.4293 "By the way, the <command role=\"hg-cmd\">hg tip</command> command accepts " 8.4294 "many of the same options as <command role=\"hg-cmd\">hg log</command>, so " 8.4295 @@ -3206,12 +4394,12 @@ 8.4296 msgstr "" 8.4297 8.4298 #. type: Content of: <book><chapter><sect1><title> 8.4299 -#: ../en/ch01-tour-basic.xml:741 8.4300 +#: ../en/ch02-tour-basic.xml:762 8.4301 msgid "Sharing changes" 8.4302 msgstr "共享修改" 8.4303 8.4304 #. type: Content of: <book><chapter><sect1><para> 8.4305 -#: ../en/ch01-tour-basic.xml:743 8.4306 +#: ../en/ch02-tour-basic.xml:764 8.4307 msgid "" 8.4308 "We mentioned earlier that repositories in Mercurial are self-contained. This " 8.4309 "means that the changeset we just created exists only in our <filename class=" 8.4310 @@ -3220,12 +4408,12 @@ 8.4311 msgstr "" 8.4312 8.4313 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4314 -#: ../en/ch01-tour-basic.xml:751 8.4315 +#: ../en/ch02-tour-basic.xml:772 8.4316 msgid "Pulling changes from another repository" 8.4317 msgstr "从其它版本库取得修改" 8.4318 8.4319 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4320 -#: ../en/ch01-tour-basic.xml:752 8.4321 +#: ../en/ch02-tour-basic.xml:774 8.4322 msgid "" 8.4323 "To get started, let's clone our original <filename class=\"directory\">hello</" 8.4324 "filename> repository, which does not contain the change we just committed. " 8.4325 @@ -3234,7 +4422,7 @@ 8.4326 msgstr "" 8.4327 8.4328 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4329 -#: ../en/ch01-tour-basic.xml:760 8.4330 +#: ../en/ch02-tour-basic.xml:782 8.4331 msgid "" 8.4332 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring " 8.4333 "changes from <filename class=\"directory\">my-hello</filename> into <filename " 8.4334 @@ -3247,8 +4435,34 @@ 8.4335 msgstr "" 8.4336 8.4337 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4338 -#: ../en/ch01-tour-basic.xml:773 8.4339 -msgid "" 8.4340 +#: ../en/ch02-tour-basic.xml:795 8.4341 +msgid "" 8.4342 +"Bringing changes into a repository is a simple matter of running the <command " 8.4343 +"role=\"hg-cmd\">hg pull</command> command, and optionally telling it which " 8.4344 +"repository to pull from." 8.4345 +msgstr "" 8.4346 + 8.4347 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4348 +#: ../en/ch02-tour-basic.xml:801 8.4349 +msgid "" 8.4350 +"As you can see from the before-and-after output of <command role=\"hg-cmd" 8.4351 +"\">hg tip</command>, we have successfully pulled changes into our " 8.4352 +"repository. However, Mercurial separates pulling changes in from updating " 8.4353 +"the working directory. There remains one step before we will see the changes " 8.4354 +"that we just pulled appear in the working directory." 8.4355 +msgstr "" 8.4356 + 8.4357 +#. type: Content of: <book><chapter><sect1><sect2><tip><title> 8.4358 +#: ../en/ch02-tour-basic.xml:810 8.4359 +msgid "Pulling specific changes" 8.4360 +msgstr "提取指定的修改" 8.4361 + 8.4362 +#. type: Content of: <book><chapter><sect1><sect2><tip><para> 8.4363 +#: ../en/ch02-tour-basic.xml:812 8.4364 +msgid "" 8.4365 +"It is possible that due to the delay between running <command role=\"hg-cmd" 8.4366 +"\">hg incoming</command> and <command role=\"hg-cmd\">hg pull</command>, you " 8.4367 +"may not see all changesets that will be brought from the other repository. " 8.4368 "Suppose you're pulling changes from a repository on the network somewhere. " 8.4369 "While you are looking at the <command role=\"hg-cmd\">hg incoming</command> " 8.4370 "output, and before you pull those changes, someone might have committed " 8.4371 @@ -3257,30 +4471,22 @@ 8.4372 "command>." 8.4373 msgstr "" 8.4374 8.4375 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4376 -#: ../en/ch01-tour-basic.xml:781 8.4377 -msgid "" 8.4378 -"Bringing changes into a repository is a simple matter of running the <command " 8.4379 -"role=\"hg-cmd\">hg pull</command> command, and telling it which repository to " 8.4380 -"pull from." 8.4381 -msgstr "" 8.4382 - 8.4383 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4384 -#: ../en/ch01-tour-basic.xml:788 8.4385 -msgid "" 8.4386 -"As you can see from the before-and-after output of <command role=\"hg-cmd" 8.4387 -"\">hg tip</command>, we have successfully pulled changes into our " 8.4388 -"repository. There remains one step before we can see these changes in the " 8.4389 -"working directory." 8.4390 +#. type: Content of: <book><chapter><sect1><sect2><tip><para> 8.4391 +#: ../en/ch02-tour-basic.xml:824 8.4392 +msgid "" 8.4393 +"If you only want to pull precisely the changes that were listed by <command " 8.4394 +"role=\"hg-cmd\">hg incoming</command>, or you have some other reason to pull " 8.4395 +"a subset of changes, simply identify the change that you want to pull by its " 8.4396 +"changeset ID, e.g. <command>hg pull -r7e95bb</command>." 8.4397 msgstr "" 8.4398 8.4399 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4400 -#: ../en/ch01-tour-basic.xml:796 8.4401 +#: ../en/ch02-tour-basic.xml:834 8.4402 msgid "Updating the working directory" 8.4403 msgstr "更新工作目录" 8.4404 8.4405 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4406 -#: ../en/ch01-tour-basic.xml:798 8.4407 +#: ../en/ch02-tour-basic.xml:836 8.4408 msgid "" 8.4409 "We have so far glossed over the relationship between a repository and its " 8.4410 "working directory. The <command role=\"hg-cmd\">hg pull</command> command " 8.4411 @@ -3292,7 +4498,7 @@ 8.4412 msgstr "" 8.4413 8.4414 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4415 -#: ../en/ch01-tour-basic.xml:810 8.4416 +#: ../en/ch02-tour-basic.xml:848 8.4417 msgid "" 8.4418 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> " 8.4419 "doesn't update the working directory automatically. There's actually a good " 8.4420 @@ -3306,31 +4512,31 @@ 8.4421 msgstr "" 8.4422 8.4423 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4424 -#: ../en/ch01-tour-basic.xml:821 8.4425 -msgid "" 8.4426 -"However, since pull-then-update is such a common thing to do, Mercurial lets " 8.4427 -"you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> " 8.4428 -"option to <command role=\"hg-cmd\">hg pull</command>." 8.4429 -msgstr "" 8.4430 - 8.4431 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4432 -#: ../en/ch01-tour-basic.xml:826 8.4433 +#: ../en/ch02-tour-basic.xml:860 8.4434 +msgid "" 8.4435 +"Since pull-then-update is such a common sequence of operations, Mercurial " 8.4436 +"lets you combine the two by passing the <option role=\"hg-opt-pull\">-u</" 8.4437 +"option> option to <command role=\"hg-cmd\">hg pull</command>." 8.4438 +msgstr "" 8.4439 + 8.4440 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4441 +#: ../en/ch02-tour-basic.xml:865 8.4442 msgid "" 8.4443 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> " 8.4444 "in <xref linkend=\"sec:tour:pull\"/> when we ran it without <option role=\"hg-" 8.4445 "opt-pull\">-u</option>, you can see that it printed a helpful reminder that " 8.4446 -"we'd have to take an explicit step to update the working directory:" 8.4447 -msgstr "" 8.4448 - 8.4449 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4450 -#: ../en/ch01-tour-basic.xml:835 8.4451 +"we'd have to take an explicit step to update the working directory." 8.4452 +msgstr "" 8.4453 + 8.4454 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4455 +#: ../en/ch02-tour-basic.xml:872 8.4456 msgid "" 8.4457 "To find out what revision the working directory is at, use the <command role=" 8.4458 "\"hg-cmd\">hg parents</command> command." 8.4459 msgstr "" 8.4460 8.4461 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4462 -#: ../en/ch01-tour-basic.xml:841 8.4463 +#: ../en/ch02-tour-basic.xml:878 8.4464 msgid "" 8.4465 "If you look back at <xref linkend=\"fig:tour-basic:history\"/>, you'll see " 8.4466 "arrows connecting each changeset. The node that the arrow leads " 8.4467 @@ -3341,7 +4547,7 @@ 8.4468 msgstr "" 8.4469 8.4470 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4471 -#: ../en/ch01-tour-basic.xml:850 8.4472 +#: ../en/ch02-tour-basic.xml:887 8.4473 msgid "" 8.4474 "To update the working directory to a particular revision, give a revision " 8.4475 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " 8.4476 @@ -3349,7 +4555,7 @@ 8.4477 msgstr "" 8.4478 8.4479 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4480 -#: ../en/ch01-tour-basic.xml:857 8.4481 +#: ../en/ch02-tour-basic.xml:893 8.4482 msgid "" 8.4483 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</" 8.4484 "command> will update to the tip revision, as shown by the second call to " 8.4485 @@ -3357,35 +4563,35 @@ 8.4486 msgstr "" 8.4487 8.4488 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4489 -#: ../en/ch01-tour-basic.xml:865 8.4490 +#: ../en/ch02-tour-basic.xml:901 8.4491 msgid "Pushing changes to another repository" 8.4492 msgstr "发布修改到其它版本库" 8.4493 8.4494 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4495 -#: ../en/ch01-tour-basic.xml:867 8.4496 +#: ../en/ch02-tour-basic.xml:903 8.4497 msgid "" 8.4498 "Mercurial lets us push changes to another repository, from the repository " 8.4499 -"we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 8.4500 +"we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 8.4501 "pull</command> above, we'll create a temporary repository to push our changes " 8.4502 "into." 8.4503 msgstr "" 8.4504 8.4505 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4506 -#: ../en/ch01-tour-basic.xml:875 8.4507 +#: ../en/ch02-tour-basic.xml:911 8.4508 msgid "" 8.4509 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " 8.4510 "changes would be pushed into another repository." 8.4511 msgstr "" 8.4512 8.4513 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4514 -#: ../en/ch01-tour-basic.xml:881 8.4515 +#: ../en/ch02-tour-basic.xml:917 8.4516 msgid "" 8.4517 "And the <command role=\"hg-cmd\">hg push</command> command does the actual " 8.4518 "push." 8.4519 msgstr "" 8.4520 8.4521 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4522 -#: ../en/ch01-tour-basic.xml:887 8.4523 +#: ../en/ch02-tour-basic.xml:922 8.4524 msgid "" 8.4525 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd" 8.4526 "\">hg push</command> command does not update the working directory in the " 8.4527 @@ -3399,19 +4605,53 @@ 8.4528 msgstr "" 8.4529 8.4530 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4531 -#: ../en/ch01-tour-basic.xml:899 8.4532 +#: ../en/ch02-tour-basic.xml:934 8.4533 msgid "" 8.4534 "What happens if we try to pull or push changes and the receiving repository " 8.4535 "already has those changes? Nothing too exciting." 8.4536 msgstr "" 8.4537 8.4538 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4539 -#: ../en/ch01-tour-basic.xml:906 8.4540 +#: ../en/ch02-tour-basic.xml:942 8.4541 +msgid "Default locations" 8.4542 +msgstr "默认位置" 8.4543 + 8.4544 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4545 +#: ../en/ch02-tour-basic.xml:944 8.4546 +msgid "" 8.4547 +"When we clone a repository, Mercurial records the location of the repository " 8.4548 +"we cloned in the <filename>.hg/hgrc</filename> file of the new repository. " 8.4549 +"If we don't supply a location to <command>hg pull</command> from or " 8.4550 +"<command>hg push</command> to, those commands will use this location as a " 8.4551 +"default. The <command>hg incoming</command> and <command>hg outgoing</" 8.4552 +"command> commands do so too." 8.4553 +msgstr "" 8.4554 + 8.4555 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4556 +#: ../en/ch02-tour-basic.xml:952 8.4557 +msgid "" 8.4558 +"If you open a repository's <filename>.hg/hgrc</filename> file in a text " 8.4559 +"editor, you will see contents like the following." 8.4560 +msgstr "" 8.4561 + 8.4562 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4563 +#: ../en/ch02-tour-basic.xml:959 8.4564 +msgid "" 8.4565 +"It is possible&emdash;and often useful&emdash;to have the default location " 8.4566 +"for <command>hg push</command> and <command>hg outgoing</command> be " 8.4567 +"different from those for <command>hg pull</command> and <command>hg incoming</" 8.4568 +"command>. We can do this by adding a <literal>default-push</literal> entry " 8.4569 +"to the <literal>[paths]</literal> section of the <filename>.hg/hgrc</" 8.4570 +"filename> file, as follows." 8.4571 +msgstr "" 8.4572 + 8.4573 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.4574 +#: ../en/ch02-tour-basic.xml:973 8.4575 msgid "Sharing changes over a network" 8.4576 msgstr "通过网络共享修改" 8.4577 8.4578 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4579 -#: ../en/ch01-tour-basic.xml:908 8.4580 +#: ../en/ch02-tour-basic.xml:975 8.4581 msgid "" 8.4582 "The commands we have covered in the previous few sections are not limited to " 8.4583 "working with local repositories. Each works in exactly the same fashion over " 8.4584 @@ -3419,20 +4659,70 @@ 8.4585 msgstr "" 8.4586 8.4587 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4588 -#: ../en/ch01-tour-basic.xml:916 8.4589 +#: ../en/ch02-tour-basic.xml:983 8.4590 msgid "" 8.4591 "In this example, we can see what changes we could push to the remote " 8.4592 "repository, but the repository is understandably not set up to let anonymous " 8.4593 "users push to it." 8.4594 msgstr "" 8.4595 8.4596 +#. type: Content of: <book><chapter><sect1><title> 8.4597 +#: ../en/ch02-tour-basic.xml:993 8.4598 +msgid "Starting a new project" 8.4599 +msgstr "开始新项目" 8.4600 + 8.4601 +#. type: Content of: <book><chapter><sect1><para> 8.4602 +#: ../en/ch02-tour-basic.xml:995 8.4603 +msgid "" 8.4604 +"It is just as easy to begin a new project as to work on one that already " 8.4605 +"exists. The <command>hg init</command> command creates a new, empty " 8.4606 +"Mercurial repository." 8.4607 +msgstr "" 8.4608 + 8.4609 +#. type: Content of: <book><chapter><sect1><para> 8.4610 +#: ../en/ch02-tour-basic.xml:1001 8.4611 +msgid "" 8.4612 +"This simply creates a repository named <filename>myproject</filename> in the " 8.4613 +"current directory." 8.4614 +msgstr "" 8.4615 + 8.4616 +#. type: Content of: <book><chapter><sect1><para> 8.4617 +#: ../en/ch02-tour-basic.xml:1006 8.4618 +msgid "" 8.4619 +"We can tell that <filename>myproject</filename> is a Mercurial repository, " 8.4620 +"because it contains a <filename>.hg</filename> directory." 8.4621 +msgstr "" 8.4622 + 8.4623 +#. type: Content of: <book><chapter><sect1><para> 8.4624 +#: ../en/ch02-tour-basic.xml:1012 8.4625 +msgid "" 8.4626 +"If we want to add some pre-existing files to the repository, we copy them " 8.4627 +"into place, and tell Mercurial to start tracking them using the <command>hg " 8.4628 +"add</command> command." 8.4629 +msgstr "" 8.4630 + 8.4631 +#. type: Content of: <book><chapter><sect1><para> 8.4632 +#: ../en/ch02-tour-basic.xml:1018 8.4633 +msgid "" 8.4634 +"Once we are satisfied that our project looks right, we commit our changes." 8.4635 +msgstr "" 8.4636 + 8.4637 +#. type: Content of: <book><chapter><sect1><para> 8.4638 +#: ../en/ch02-tour-basic.xml:1023 8.4639 +msgid "" 8.4640 +"It takes just a few moments to start using Mercurial on a new project, which " 8.4641 +"is part of its appeal. Revision control is now so easy to work with, we can " 8.4642 +"use it on the smallest of projects that we might not have considered with a " 8.4643 +"more complicated tool." 8.4644 +msgstr "" 8.4645 + 8.4646 #. type: Content of: <book><chapter><title> 8.4647 -#: ../en/ch02-tour-merge.xml:5 8.4648 +#: ../en/ch03-tour-merge.xml:5 8.4649 msgid "A tour of Mercurial: merging work" 8.4650 msgstr "Mercurial 教程: 合并工作" 8.4651 8.4652 #. type: Content of: <book><chapter><para> 8.4653 -#: ../en/ch02-tour-merge.xml:7 8.4654 +#: ../en/ch03-tour-merge.xml:7 8.4655 msgid "" 8.4656 "We've now covered cloning a repository, making changes in a repository, and " 8.4657 "pulling or pushing changes from one repository into another. Our next step " 8.4658 @@ -3440,19 +4730,19 @@ 8.4659 msgstr "" 8.4660 8.4661 #. type: Content of: <book><chapter><sect1><title> 8.4662 -#: ../en/ch02-tour-merge.xml:13 8.4663 +#: ../en/ch03-tour-merge.xml:13 8.4664 msgid "Merging streams of work" 8.4665 msgstr "合并的流程" 8.4666 8.4667 #. type: Content of: <book><chapter><sect1><para> 8.4668 -#: ../en/ch02-tour-merge.xml:15 8.4669 +#: ../en/ch03-tour-merge.xml:15 8.4670 msgid "" 8.4671 "Merging is a fundamental part of working with a distributed revision control " 8.4672 -"tool." 8.4673 +"tool. Here are a few cases in which the need to merge work arises." 8.4674 msgstr "" 8.4675 8.4676 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.4677 -#: ../en/ch02-tour-merge.xml:18 8.4678 +#: ../en/ch03-tour-merge.xml:20 8.4679 msgid "" 8.4680 "Alice and Bob each have a personal copy of a repository for a project they're " 8.4681 "collaborating on. Alice fixes a bug in her repository; Bob adds a new " 8.4682 @@ -3461,31 +4751,37 @@ 8.4683 msgstr "" 8.4684 8.4685 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.4686 -#: ../en/ch02-tour-merge.xml:24 8.4687 -msgid "" 8.4688 -"I frequently work on several different tasks for a single project at once, " 8.4689 -"each safely isolated in its own repository. Working this way means that I " 8.4690 -"often need to merge one piece of my own work with another." 8.4691 -msgstr "" 8.4692 - 8.4693 -#. type: Content of: <book><chapter><sect1><para> 8.4694 -#: ../en/ch02-tour-merge.xml:30 8.4695 -msgid "" 8.4696 -"Because merging is such a common thing to need to do, Mercurial makes it " 8.4697 -"easy. Let's walk through the process. We'll begin by cloning yet another " 8.4698 -"repository (see how often they spring up?) and making a change in it." 8.4699 -msgstr "" 8.4700 - 8.4701 -#. type: Content of: <book><chapter><sect1><para> 8.4702 -#: ../en/ch02-tour-merge.xml:37 8.4703 +#: ../en/ch03-tour-merge.xml:27 8.4704 +msgid "" 8.4705 +"Cynthia frequently works on several different tasks for a single project at " 8.4706 +"once, each safely isolated in its own repository. Working this way means that " 8.4707 +"she often needs to merge one piece of her own work with another." 8.4708 +msgstr "" 8.4709 + 8.4710 +#. type: Content of: <book><chapter><sect1><para> 8.4711 +#: ../en/ch03-tour-merge.xml:35 8.4712 +msgid "" 8.4713 +"Because we need to merge often, Mercurial makes the process easy. Let's walk " 8.4714 +"through a merge. We'll begin by cloning yet another repository (see how " 8.4715 +"often they spring up?) and making a change in it." 8.4716 +msgstr "" 8.4717 + 8.4718 +#. type: Content of: <book><chapter><sect1><para> 8.4719 +#: ../en/ch03-tour-merge.xml:42 8.4720 msgid "" 8.4721 "We should now have two copies of <filename>hello.c</filename> with different " 8.4722 "contents. The histories of the two repositories have also diverged, as " 8.4723 -"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>." 8.4724 +"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>. Here is a copy " 8.4725 +"of our file from one repository." 8.4726 +msgstr "" 8.4727 + 8.4728 +#. type: Content of: <book><chapter><sect1><para> 8.4729 +#: ../en/ch03-tour-merge.xml:51 8.4730 +msgid "And here is our slightly different version from the other repository." 8.4731 msgstr "" 8.4732 8.4733 #. type: Content of: <book><chapter><sect1><figure><title> 8.4734 -#: ../en/ch02-tour-merge.xml:46 8.4735 +#: ../en/ch03-tour-merge.xml:57 8.4736 msgid "" 8.4737 "Divergent recent histories of the <filename class=\"directory\">my-hello</" 8.4738 "filename> and <filename class=\"directory\">my-new-hello</filename> " 8.4739 @@ -3495,14 +4791,14 @@ 8.4740 "\"directory\">my-new-hello</filename> 最新的历史分叉" 8.4741 8.4742 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 8.4743 -#: ../en/ch02-tour-merge.xml:51 8.4744 +#: ../en/ch03-tour-merge.xml:62 8.4745 msgid "" 8.4746 "<imageobject><imagedata fileref=\"figs/tour-merge-sep-repos.png\"/></" 8.4747 "imageobject>" 8.4748 msgstr "" 8.4749 8.4750 #. type: Content of: <book><chapter><sect1><para> 8.4751 -#: ../en/ch02-tour-merge.xml:56 8.4752 +#: ../en/ch03-tour-merge.xml:67 8.4753 msgid "" 8.4754 "We already know that pulling changes from our <filename class=\"directory" 8.4755 "\">my-hello</filename> repository will have no effect on the working " 8.4756 @@ -3510,28 +4806,29 @@ 8.4757 msgstr "" 8.4758 8.4759 #. type: Content of: <book><chapter><sect1><para> 8.4760 -#: ../en/ch02-tour-merge.xml:62 8.4761 +#: ../en/ch03-tour-merge.xml:73 8.4762 msgid "" 8.4763 "However, the <command role=\"hg-cmd\">hg pull</command> command says " 8.4764 "something about <quote>heads</quote>." 8.4765 msgstr "" 8.4766 8.4767 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4768 -#: ../en/ch02-tour-merge.xml:66 8.4769 +#: ../en/ch03-tour-merge.xml:77 8.4770 msgid "Head changesets" 8.4771 msgstr "顶点修改集" 8.4772 8.4773 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4774 -#: ../en/ch02-tour-merge.xml:68 8.4775 -msgid "" 8.4776 -"A head is a change that has no descendants, or children, as they're also " 8.4777 -"known. The tip revision is thus a head, because the newest revision in a " 8.4778 -"repository doesn't have any children, but a repository can contain more than " 8.4779 -"one head." 8.4780 +#: ../en/ch03-tour-merge.xml:79 8.4781 +msgid "" 8.4782 +"Remember that Mercurial records what the parent of each change is. If a " 8.4783 +"change has a parent, we call it a child or descendant of the parent. A head " 8.4784 +"is a change that has no children. The tip revision is thus a head, because " 8.4785 +"the newest revision in a repository doesn't have any children. There are " 8.4786 +"times when a repository can contain more than one head." 8.4787 msgstr "" 8.4788 8.4789 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.4790 -#: ../en/ch02-tour-merge.xml:75 8.4791 +#: ../en/ch03-tour-merge.xml:88 8.4792 msgid "" 8.4793 "Repository contents after pulling from <filename class=\"directory\">my-" 8.4794 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>" 8.4795 @@ -3540,25 +4837,27 @@ 8.4796 "\"directory\">my-new-hello</filename> 之后版本库的内容" 8.4797 8.4798 #. type: Content of: <book><chapter><sect1><sect2><figure> 8.4799 -#: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:125 8.4800 -#: ../en/ch02-tour-merge.xml:250 ../en/ch03-concepts.xml:55 8.4801 -#: ../en/ch03-concepts.xml:104 ../en/ch03-concepts.xml:189 8.4802 -#: ../en/ch03-concepts.xml:344 ../en/ch03-concepts.xml:359 8.4803 -#: ../en/ch03-concepts.xml:400 ../en/ch03-concepts.xml:420 8.4804 -#: ../en/ch03-concepts.xml:461 ../en/ch05-collab.xml:274 8.4805 -#: ../en/ch08-undo.xml:363 ../en/ch08-undo.xml:410 ../en/ch08-undo.xml:475 8.4806 -#: ../en/ch08-undo.xml:513 ../en/ch11-mq.xml:410 8.4807 +#: ../en/ch03-tour-merge.xml:91 ../en/ch03-tour-merge.xml:178 8.4808 +#: ../en/ch03-tour-merge.xml:275 ../en/ch04-concepts.xml:57 8.4809 +#: ../en/ch04-concepts.xml:106 ../en/ch04-concepts.xml:196 8.4810 +#: ../en/ch04-concepts.xml:345 ../en/ch04-concepts.xml:360 8.4811 +#: ../en/ch04-concepts.xml:401 ../en/ch04-concepts.xml:421 8.4812 +#: ../en/ch04-concepts.xml:465 ../en/ch06-collab.xml:314 8.4813 +#: ../en/ch09-undo.xml:342 ../en/ch09-undo.xml:389 ../en/ch09-undo.xml:462 8.4814 +#: ../en/ch09-undo.xml:500 ../en/ch09-undo.xml:656 ../en/ch09-undo.xml:680 8.4815 +#: ../en/ch09-undo.xml:698 ../en/ch09-undo.xml:712 ../en/ch09-undo.xml:725 8.4816 +#: ../en/ch12-mq.xml:411 8.4817 msgid " <placeholder type=\"mediaobject\" id=\"0\"/>" 8.4818 msgstr "" 8.4819 8.4820 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.4821 -#: ../en/ch02-tour-merge.xml:79 8.4822 +#: ../en/ch03-tour-merge.xml:92 8.4823 msgid "" 8.4824 "<imageobject> <imagedata fileref=\"figs/tour-merge-pull.png\"/> </imageobject>" 8.4825 msgstr "" 8.4826 8.4827 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4828 -#: ../en/ch02-tour-merge.xml:86 8.4829 +#: ../en/ch03-tour-merge.xml:99 8.4830 msgid "" 8.4831 "In <xref linkend=\"fig:tour-merge:pull\"/>, you can see the effect of the " 8.4832 "pull from <filename class=\"directory\">my-hello</filename> into <filename " 8.4833 @@ -3574,55 +4873,51 @@ 8.4834 msgstr "" 8.4835 8.4836 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4837 -#: ../en/ch02-tour-merge.xml:105 8.4838 +#: ../en/ch03-tour-merge.xml:118 8.4839 msgid "Performing the merge" 8.4840 msgstr "执行合并" 8.4841 8.4842 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4843 -#: ../en/ch02-tour-merge.xml:107 8.4844 +#: ../en/ch03-tour-merge.xml:120 8.4845 msgid "" 8.4846 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</" 8.4847 "command> command to update to the new tip?" 8.4848 msgstr "" 8.4849 8.4850 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4851 -#: ../en/ch02-tour-merge.xml:113 8.4852 +#: ../en/ch03-tour-merge.xml:126 8.4853 msgid "" 8.4854 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> " 8.4855 "command won't do a merge; it won't update the working directory when it " 8.4856 -"thinks we might be wanting to do a merge, unless we force it to do so. " 8.4857 -"Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to " 8.4858 -"merge the two heads." 8.4859 -msgstr "" 8.4860 - 8.4861 -#. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.4862 -#: ../en/ch02-tour-merge.xml:123 8.4863 -msgid "Working directory and repository during merge, and following commit" 8.4864 -msgstr "在合并期间,以及提交之后的工作目录与版本库" 8.4865 - 8.4866 -#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.4867 -#: ../en/ch02-tour-merge.xml:126 8.4868 -msgid "" 8.4869 -"<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </" 8.4870 -"imageobject>" 8.4871 -msgstr "" 8.4872 - 8.4873 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.4874 -#: ../en/ch02-tour-merge.xml:133 8.4875 -msgid "" 8.4876 -"This updates the working directory so that it contains changes from " 8.4877 -"<emphasis>both</emphasis> heads, which is reflected in both the output of " 8.4878 -"<command role=\"hg-cmd\">hg parents</command> and the contents of " 8.4879 -"<filename>hello.c</filename>." 8.4880 +"thinks we might want to do a merge, unless we force it to do so. " 8.4881 +"(Incidentally, forcing the update with <command>hg update -C</command> would " 8.4882 +"revert any uncommitted changes in the working directory.)" 8.4883 +msgstr "" 8.4884 + 8.4885 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4886 +#: ../en/ch03-tour-merge.xml:134 8.4887 +msgid "" 8.4888 +"To start a merge between the two heads, we use the <command role=\"hg-cmd" 8.4889 +"\">hg merge</command> command." 8.4890 +msgstr "" 8.4891 +"我们使用 <command role=\"hg-cmd\">hg merge</command> 命令来合并两个顶点。" 8.4892 + 8.4893 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4894 +#: ../en/ch03-tour-merge.xml:139 8.4895 +msgid "" 8.4896 +"We resolve the contents of <filename>hello.c</filename> This updates the " 8.4897 +"working directory so that it contains changes from <emphasis>both</emphasis> " 8.4898 +"heads, which is reflected in both the output of <command role=\"hg-cmd\">hg " 8.4899 +"parents</command> and the contents of <filename>hello.c</filename>." 8.4900 msgstr "" 8.4901 8.4902 #. type: Content of: <book><chapter><sect1><sect2><title> 8.4903 -#: ../en/ch02-tour-merge.xml:143 8.4904 +#: ../en/ch03-tour-merge.xml:151 8.4905 msgid "Committing the results of the merge" 8.4906 msgstr "提交合并结果" 8.4907 8.4908 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4909 -#: ../en/ch02-tour-merge.xml:145 8.4910 +#: ../en/ch03-tour-merge.xml:153 8.4911 msgid "" 8.4912 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> " 8.4913 "will display two parents until we <command role=\"hg-cmd\">hg commit</" 8.4914 @@ -3630,7 +4925,7 @@ 8.4915 msgstr "" 8.4916 8.4917 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4918 -#: ../en/ch02-tour-merge.xml:152 8.4919 +#: ../en/ch03-tour-merge.xml:160 8.4920 msgid "" 8.4921 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> " 8.4922 "of our former heads as its parents. These are the same revisions that were " 8.4923 @@ -3638,7 +4933,7 @@ 8.4924 msgstr "" 8.4925 8.4926 #. type: Content of: <book><chapter><sect1><sect2><para> 8.4927 -#: ../en/ch02-tour-merge.xml:159 8.4928 +#: ../en/ch03-tour-merge.xml:167 8.4929 msgid "" 8.4930 "In <xref linkend=\"fig:tour-merge:merge\"/>, you can see a representation of " 8.4931 "what happens to the working directory during the merge, and how this affects " 8.4932 @@ -3647,35 +4942,57 @@ 8.4933 "changeset." 8.4934 msgstr "" 8.4935 8.4936 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.4937 +#: ../en/ch03-tour-merge.xml:176 8.4938 +msgid "Working directory and repository during merge, and following commit" 8.4939 +msgstr "在合并期间,以及提交之后的工作目录与版本库" 8.4940 + 8.4941 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.4942 +#: ../en/ch03-tour-merge.xml:179 8.4943 +msgid "" 8.4944 +"<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </" 8.4945 +"imageobject>" 8.4946 +msgstr "" 8.4947 + 8.4948 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.4949 +#: ../en/ch03-tour-merge.xml:186 8.4950 +msgid "" 8.4951 +"We sometimes talk about a merge having <emphasis>sides</emphasis>: the left " 8.4952 +"side is the first parent in the output of <command role=\"hg-cmd\">hg " 8.4953 +"parents</command>, and the right side is the second. If the working " 8.4954 +"directory was at e.g. revision 5 before we began a merge, that revision will " 8.4955 +"become the left side of the merge." 8.4956 +msgstr "" 8.4957 + 8.4958 #. type: Content of: <book><chapter><sect1><title> 8.4959 -#: ../en/ch02-tour-merge.xml:170 8.4960 +#: ../en/ch03-tour-merge.xml:196 8.4961 msgid "Merging conflicting changes" 8.4962 msgstr "合并有冲突的改变" 8.4963 8.4964 #. type: Content of: <book><chapter><sect1><para> 8.4965 -#: ../en/ch02-tour-merge.xml:172 8.4966 +#: ../en/ch03-tour-merge.xml:198 8.4967 msgid "" 8.4968 "Most merges are simple affairs, but sometimes you'll find yourself merging " 8.4969 -"changes where each modifies the same portions of the same files. Unless both " 8.4970 -"modifications are identical, this results in a <emphasis>conflict</emphasis>, " 8.4971 -"where you have to decide how to reconcile the different changes into " 8.4972 -"something coherent." 8.4973 +"changes where each side modifies the same portions of the same files. Unless " 8.4974 +"both modifications are identical, this results in a <emphasis>conflict</" 8.4975 +"emphasis>, where you have to decide how to reconcile the different changes " 8.4976 +"into something coherent." 8.4977 msgstr "" 8.4978 8.4979 #. type: Content of: <book><chapter><sect1><figure><title> 8.4980 -#: ../en/ch02-tour-merge.xml:180 8.4981 +#: ../en/ch03-tour-merge.xml:206 8.4982 msgid "Conflicting changes to a document" 8.4983 msgstr "冲突的修改" 8.4984 8.4985 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 8.4986 -#: ../en/ch02-tour-merge.xml:182 8.4987 +#: ../en/ch03-tour-merge.xml:208 8.4988 msgid "" 8.4989 "<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></" 8.4990 "imageobject>" 8.4991 msgstr "" 8.4992 8.4993 #. type: Content of: <book><chapter><sect1><para> 8.4994 -#: ../en/ch02-tour-merge.xml:187 8.4995 +#: ../en/ch03-tour-merge.xml:213 8.4996 msgid "" 8.4997 "<xref linkend=\"fig:tour-merge:conflict\"/> illustrates an instance of two " 8.4998 "conflicting changes to a document. We started with a single version of the " 8.4999 @@ -3685,33 +5002,32 @@ 8.5000 msgstr "" 8.5001 8.5002 #. type: Content of: <book><chapter><sect1><para> 8.5003 -#: ../en/ch02-tour-merge.xml:194 8.5004 +#: ../en/ch03-tour-merge.xml:220 8.5005 msgid "" 8.5006 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, " 8.5007 -"it runs an external program called <command>hgmerge</command>. This is a " 8.5008 -"shell script that is bundled with Mercurial; you can change it to behave " 8.5009 -"however you please. What it does by default is try to find one of several " 8.5010 -"different merging tools that are likely to be installed on your system. It " 8.5011 -"first tries a few fully automatic merging tools; if these don't succeed " 8.5012 -"(because the resolution process requires human guidance) or aren't present, " 8.5013 -"the script tries a few different graphical merging tools." 8.5014 -msgstr "" 8.5015 - 8.5016 -#. type: Content of: <book><chapter><sect1><para> 8.5017 -#: ../en/ch02-tour-merge.xml:205 8.5018 -msgid "" 8.5019 -"It's also possible to get Mercurial to run another program or script instead " 8.5020 -"of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> " 8.5021 -"environment variable to the name of your preferred program." 8.5022 +"it runs an external program, usually one that displays some kind of graphical " 8.5023 +"conflict resolution interface. By default, Mercurial tries to find one of " 8.5024 +"several different merging tools that are likely to be installed on your " 8.5025 +"system. It first tries a few fully automatic merging tools; if these don't " 8.5026 +"succeed (because the resolution process requires human guidance) or aren't " 8.5027 +"present, it tries a few different graphical merging tools." 8.5028 +msgstr "" 8.5029 + 8.5030 +#. type: Content of: <book><chapter><sect1><para> 8.5031 +#: ../en/ch03-tour-merge.xml:230 8.5032 +msgid "" 8.5033 +"It's also possible to get Mercurial to run a specific program or script, by " 8.5034 +"setting the <envar>HGMERGE</envar> environment variable to the name of your " 8.5035 +"preferred program." 8.5036 msgstr "" 8.5037 8.5038 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5039 -#: ../en/ch02-tour-merge.xml:211 8.5040 +#: ../en/ch03-tour-merge.xml:236 8.5041 msgid "Using a graphical merge tool" 8.5042 msgstr "使用图形合并工具" 8.5043 8.5044 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5045 -#: ../en/ch02-tour-merge.xml:213 8.5046 +#: ../en/ch03-tour-merge.xml:238 8.5047 msgid "" 8.5048 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll " 8.5049 "use to describe the features that are common to graphical file merging " 8.5050 @@ -3723,7 +5039,7 @@ 8.5051 msgstr "" 8.5052 8.5053 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.5054 -#: ../en/ch02-tour-merge.xml:223 8.5055 +#: ../en/ch03-tour-merge.xml:248 8.5056 msgid "" 8.5057 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the " 8.5058 "most recent version from which the two versions we're trying to merge are " 8.5059 @@ -3731,21 +5047,21 @@ 8.5060 msgstr "" 8.5061 8.5062 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.5063 -#: ../en/ch02-tour-merge.xml:228 8.5064 +#: ../en/ch03-tour-merge.xml:253 8.5065 msgid "" 8.5066 "In the middle is <quote>our</quote> version of the file, with the contents " 8.5067 "that we modified." 8.5068 msgstr "" 8.5069 8.5070 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.5071 -#: ../en/ch02-tour-merge.xml:231 8.5072 +#: ../en/ch03-tour-merge.xml:256 8.5073 msgid "" 8.5074 "On the right is <quote>their</quote> version of the file, the one that from " 8.5075 "the changeset that we're trying to merge with." 8.5076 msgstr "" 8.5077 8.5078 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5079 -#: ../en/ch02-tour-merge.xml:235 8.5080 +#: ../en/ch03-tour-merge.xml:260 8.5081 msgid "" 8.5082 "In the pane below these is the current <emphasis>result</emphasis> of the " 8.5083 "merge. Our task is to replace all of the red text, which indicates unresolved " 8.5084 @@ -3754,7 +5070,7 @@ 8.5085 msgstr "" 8.5086 8.5087 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5088 -#: ../en/ch02-tour-merge.xml:242 8.5089 +#: ../en/ch03-tour-merge.xml:267 8.5090 msgid "" 8.5091 "All four of these panes are <emphasis>locked together</emphasis>; if we " 8.5092 "scroll vertically or horizontally in any of them, the others are updated to " 8.5093 @@ -3762,19 +5078,19 @@ 8.5094 msgstr "" 8.5095 8.5096 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5097 -#: ../en/ch02-tour-merge.xml:248 8.5098 +#: ../en/ch03-tour-merge.xml:273 8.5099 msgid "Using <command>kdiff3</command> to merge versions of a file" 8.5100 msgstr "使用 <command>kdiff3</command> 合并文件的不同版本" 8.5101 8.5102 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5103 -#: ../en/ch02-tour-merge.xml:251 8.5104 +#: ../en/ch03-tour-merge.xml:276 8.5105 msgid "" 8.5106 "<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></" 8.5107 "imageobject>" 8.5108 msgstr "" 8.5109 8.5110 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5111 -#: ../en/ch02-tour-merge.xml:259 8.5112 +#: ../en/ch03-tour-merge.xml:284 8.5113 msgid "" 8.5114 "For each conflicting portion of the file, we can choose to resolve the " 8.5115 "conflict using some combination of text from the base version, ours, or " 8.5116 @@ -3783,7 +5099,7 @@ 8.5117 msgstr "" 8.5118 8.5119 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5120 -#: ../en/ch02-tour-merge.xml:265 8.5121 +#: ../en/ch03-tour-merge.xml:290 8.5122 msgid "" 8.5123 "There are <emphasis>many</emphasis> file merging tools available, too many to " 8.5124 "cover here. They vary in which platforms they are available for, and in " 8.5125 @@ -3793,12 +5109,12 @@ 8.5126 msgstr "" 8.5127 8.5128 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5129 -#: ../en/ch02-tour-merge.xml:274 8.5130 +#: ../en/ch03-tour-merge.xml:299 8.5131 msgid "A worked example" 8.5132 msgstr "合并实例" 8.5133 8.5134 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5135 -#: ../en/ch02-tour-merge.xml:276 8.5136 +#: ../en/ch03-tour-merge.xml:301 8.5137 msgid "" 8.5138 "In this example, we will reproduce the file modification history of <xref " 8.5139 "linkend=\"fig:tour-merge:conflict\"/> above. Let's begin by creating a " 8.5140 @@ -3806,12 +5122,12 @@ 8.5141 msgstr "" 8.5142 8.5143 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5144 -#: ../en/ch02-tour-merge.xml:283 8.5145 +#: ../en/ch03-tour-merge.xml:308 8.5146 msgid "We'll clone the repository and make a change to the file." 8.5147 msgstr "" 8.5148 8.5149 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5150 -#: ../en/ch02-tour-merge.xml:288 8.5151 +#: ../en/ch03-tour-merge.xml:313 8.5152 msgid "" 8.5153 "And another clone, to simulate someone else making a change to the file. " 8.5154 "(This hints at the idea that it's not all that unusual to merge with yourself " 8.5155 @@ -3820,31 +5136,24 @@ 8.5156 msgstr "" 8.5157 8.5158 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5159 -#: ../en/ch02-tour-merge.xml:296 8.5160 +#: ../en/ch03-tour-merge.xml:321 8.5161 msgid "" 8.5162 "Having created two different versions of the file, we'll set up an " 8.5163 "environment suitable for running our merge." 8.5164 msgstr "" 8.5165 8.5166 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5167 -#: ../en/ch02-tour-merge.xml:302 8.5168 -msgid "" 8.5169 -"In this example, I won't use Mercurial's normal <command>hgmerge</command> " 8.5170 -"program to do the merge, because it would drop my nice automated example-" 8.5171 -"running tool into a graphical user interface. Instead, I'll set " 8.5172 -"<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive " 8.5173 -"<command>merge</command> command. This is bundled with many Unix-like " 8.5174 -"systems. If you're following this example on your computer, don't bother " 8.5175 -"setting <envar>HGMERGE</envar>." 8.5176 -msgstr "" 8.5177 - 8.5178 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.5179 -#: ../en/ch02-tour-merge.xml:312 8.5180 -msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>" 8.5181 -msgstr "" 8.5182 - 8.5183 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.5184 -#: ../en/ch02-tour-merge.xml:317 8.5185 +#: ../en/ch03-tour-merge.xml:327 8.5186 +msgid "" 8.5187 +"In this example, I'll set <envar>HGMERGE</envar> to tell Mercurial to use the " 8.5188 +"non-interactive <command>merge</command> command. This is bundled with many " 8.5189 +"Unix-like systems. (If you're following this example on your computer, don't " 8.5190 +"bother setting <envar>HGMERGE</envar>. You'll get dropped into a GUI file " 8.5191 +"merge tool instead, which is much preferable.)" 8.5192 +msgstr "" 8.5193 + 8.5194 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.5195 +#: ../en/ch03-tour-merge.xml:337 8.5196 msgid "" 8.5197 "Because <command>merge</command> can't resolve the conflicting changes, it " 8.5198 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, " 8.5199 @@ -3853,7 +5162,7 @@ 8.5200 msgstr "" 8.5201 8.5202 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5203 -#: ../en/ch02-tour-merge.xml:323 8.5204 +#: ../en/ch03-tour-merge.xml:343 8.5205 msgid "" 8.5206 "Mercurial can tell from the way <command>merge</command> exits that it wasn't " 8.5207 "able to merge successfully, so it tells us what commands we'll need to run if " 8.5208 @@ -3863,27 +5172,43 @@ 8.5209 msgstr "" 8.5210 8.5211 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5212 -#: ../en/ch02-tour-merge.xml:330 8.5213 +#: ../en/ch03-tour-merge.xml:350 8.5214 msgid "" 8.5215 "If automatic or manual merges fail, there's nothing to prevent us from " 8.5216 "<quote>fixing up</quote> the affected files ourselves, and committing the " 8.5217 "results of our merge:" 8.5218 msgstr "" 8.5219 8.5220 +#. type: Content of: <book><chapter><sect1><sect2><note><title> 8.5221 +#: ../en/ch03-tour-merge.xml:357 8.5222 +msgid "Where is the <command>hg resolve</command> command?" 8.5223 +msgstr "在哪里能找到 <command role=\"hg-cmd\">hg resolve</command> 命令?" 8.5224 + 8.5225 +#. type: Content of: <book><chapter><sect1><sect2><note><para> 8.5226 +#: ../en/ch03-tour-merge.xml:359 8.5227 +msgid "" 8.5228 +"The <command>hg resolve</command> command was introduced in Mercurial 1.1, " 8.5229 +"which was released in December 2008. If you are using an older version of " 8.5230 +"Mercurial (run <command>hg version</command> to see), this command will not " 8.5231 +"be present. If your version of Mercurial is older than 1.1, you should " 8.5232 +"strongly consider upgrading to a newer version before trying to tackle " 8.5233 +"complicated merges." 8.5234 +msgstr "" 8.5235 + 8.5236 #. type: Content of: <book><chapter><sect1><title> 8.5237 -#: ../en/ch02-tour-merge.xml:339 8.5238 +#: ../en/ch03-tour-merge.xml:371 8.5239 msgid "Simplifying the pull-merge-commit sequence" 8.5240 msgstr "简化拉-合并-提交程序" 8.5241 8.5242 #. type: Content of: <book><chapter><sect1><para> 8.5243 -#: ../en/ch02-tour-merge.xml:341 8.5244 +#: ../en/ch03-tour-merge.xml:373 8.5245 msgid "" 8.5246 "The process of merging changes as outlined above is straightforward, but " 8.5247 "requires running three commands in sequence." 8.5248 msgstr "" 8.5249 8.5250 #. type: Content of: <book><chapter><sect1><para> 8.5251 -#: ../en/ch02-tour-merge.xml:347 8.5252 +#: ../en/ch03-tour-merge.xml:379 8.5253 msgid "" 8.5254 "In the case of the final commit, you also need to enter a commit message, " 8.5255 "which is almost always going to be a piece of uninteresting " 8.5256 @@ -3891,7 +5216,7 @@ 8.5257 msgstr "" 8.5258 8.5259 #. type: Content of: <book><chapter><sect1><para> 8.5260 -#: ../en/ch02-tour-merge.xml:351 8.5261 +#: ../en/ch03-tour-merge.xml:383 8.5262 msgid "" 8.5263 "It would be nice to reduce the number of steps needed, if this were " 8.5264 "possible. Indeed, Mercurial is distributed with an extension called <literal " 8.5265 @@ -3899,74 +5224,114 @@ 8.5266 msgstr "" 8.5267 8.5268 #. type: Content of: <book><chapter><sect1><para> 8.5269 -#: ../en/ch02-tour-merge.xml:356 8.5270 +#: ../en/ch03-tour-merge.xml:388 8.5271 msgid "" 8.5272 "Mercurial provides a flexible extension mechanism that lets people extend its " 8.5273 "functionality, while keeping the core of Mercurial small and easy to deal " 8.5274 "with. Some extensions add new commands that you can use from the command " 8.5275 "line, while others work <quote>behind the scenes,</quote> for example adding " 8.5276 -"capabilities to the server." 8.5277 -msgstr "" 8.5278 - 8.5279 -#. type: Content of: <book><chapter><sect1><para> 8.5280 -#: ../en/ch02-tour-merge.xml:363 8.5281 +"capabilities to Mercurial's built-in server mode." 8.5282 +msgstr "" 8.5283 + 8.5284 +#. type: Content of: <book><chapter><sect1><para> 8.5285 +#: ../en/ch03-tour-merge.xml:395 8.5286 msgid "" 8.5287 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " 8.5288 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " 8.5289 -"extension acts as a combination of <command role=\"hg-cmd\">hg pull</" 8.5290 -"command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-" 8.5291 -"cmd\">hg merge</command>. It begins by pulling changes from another " 8.5292 +"extension acts as a combination of <command role=\"hg-cmd\">hg pull -u</" 8.5293 +"command>, <command role=\"hg-cmd\">hg merge</command> and <command role=\"hg-" 8.5294 +"cmd\">hg commit</command>. It begins by pulling changes from another " 8.5295 "repository into the current repository. If it finds that the changes added a " 8.5296 -"new head to the repository, it begins a merge, then commits the result of the " 8.5297 -"merge with an automatically-generated commit message. If no new heads were " 8.5298 -"added, it updates the working directory to the new tip changeset." 8.5299 -msgstr "" 8.5300 - 8.5301 -#. type: Content of: <book><chapter><sect1><para> 8.5302 -#: ../en/ch02-tour-merge.xml:376 8.5303 +"new head to the repository, it updates to the new head, begins a merge, then " 8.5304 +"(if the merge succeeded) commits the result of the merge with an " 8.5305 +"automatically-generated commit message. If no new heads were added, it " 8.5306 +"updates the working directory to the new tip changeset." 8.5307 +msgstr "" 8.5308 + 8.5309 +#. type: Content of: <book><chapter><sect1><para> 8.5310 +#: ../en/ch03-tour-merge.xml:409 8.5311 msgid "" 8.5312 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. " 8.5313 -"Edit your <filename role=\"special\">.hgrc</filename>, and either go to the " 8.5314 -"<literal role=\"rc-extensions\">extensions</literal> section or create an " 8.5315 -"<literal role=\"rc-extensions\">extensions</literal> section. Then add a line " 8.5316 -"that simply reads <quote><literal>fetch </literal></quote>." 8.5317 -msgstr "" 8.5318 - 8.5319 -#. type: Content of: <book><chapter><sect1><para> 8.5320 -#: ../en/ch02-tour-merge.xml:385 8.5321 -msgid "" 8.5322 -"(Normally, on the right-hand side of the <quote><literal>=</literal></quote> " 8.5323 -"would appear the location of the extension, but since the <literal role=\"hg-" 8.5324 +"Edit the <filename role=\"special\">.hgrc</filename> file in your home " 8.5325 +"directory, and either go to the <literal role=\"rc-extensions\">extensions</" 8.5326 +"literal> section or create an <literal role=\"rc-extensions\">extensions</" 8.5327 +"literal> section. Then add a line that simply reads <quote><literal>fetch=</" 8.5328 +"literal></quote>." 8.5329 +msgstr "" 8.5330 + 8.5331 +#. type: Content of: <book><chapter><sect1><para> 8.5332 +#: ../en/ch03-tour-merge.xml:421 8.5333 +msgid "" 8.5334 +"(Normally, the right-hand side of the <quote><literal>=</literal></quote> " 8.5335 +"would indicate where to find the extension, but since the <literal role=\"hg-" 8.5336 "ext\">fetch</literal> extension is in the standard distribution, Mercurial " 8.5337 "knows where to search for it.)" 8.5338 msgstr "" 8.5339 8.5340 +#. type: Content of: <book><chapter><sect1><title> 8.5341 +#: ../en/ch03-tour-merge.xml:429 8.5342 +msgid "Renaming, copying, and merging" 8.5343 +msgstr "改名,复制与合并" 8.5344 + 8.5345 +#. type: Content of: <book><chapter><sect1><para> 8.5346 +#: ../en/ch03-tour-merge.xml:431 8.5347 +msgid "" 8.5348 +"During the life of a project, we will often want to change the layout of its " 8.5349 +"files and directories. This can be as simple as renaming a single file, or as " 8.5350 +"complex as restructuring the entire hierarchy of files within the project." 8.5351 +msgstr "" 8.5352 + 8.5353 +#. type: Content of: <book><chapter><sect1><para> 8.5354 +#: ../en/ch03-tour-merge.xml:436 8.5355 +msgid "" 8.5356 +"Mercurial supports these kinds of complex changes fluently, provided we tell " 8.5357 +"it what we're doing. If we want to rename a file, we should use the " 8.5358 +"<command>hg rename</command><placeholder type=\"footnote\" id=\"0\"/> command " 8.5359 +"to rename it, so that Mercurial can do the right thing later when we merge." 8.5360 +msgstr "" 8.5361 + 8.5362 +#. type: Content of: <book><chapter><sect1><para><footnote><para> 8.5363 +#: ../en/ch03-tour-merge.xml:439 8.5364 +msgid "" 8.5365 +"If you're a Unix user, you'll be glad to know that the <command>hg rename</" 8.5366 +"command> command can be abbreviated as <command>hg mv</command>." 8.5367 +msgstr "" 8.5368 + 8.5369 +#. type: Content of: <book><chapter><sect1><para> 8.5370 +#: ../en/ch03-tour-merge.xml:445 8.5371 +msgid "" 8.5372 +"We will cover the use of these commands in more detail in <xref linkend=" 8.5373 +"\"chap:daily.copy\"/>." 8.5374 +msgstr "" 8.5375 + 8.5376 #. type: Content of: <book><chapter><title> 8.5377 -#: ../en/ch03-concepts.xml:5 8.5378 +#: ../en/ch04-concepts.xml:5 8.5379 msgid "Behind the scenes" 8.5380 msgstr "Mercurial 内幕" 8.5381 8.5382 #. type: Content of: <book><chapter><para> 8.5383 -#: ../en/ch03-concepts.xml:7 8.5384 +#: ../en/ch04-concepts.xml:7 8.5385 msgid "" 8.5386 "Unlike many revision control systems, the concepts upon which Mercurial is " 8.5387 "built are simple enough that it's easy to understand how the software really " 8.5388 -"works. Knowing this certainly isn't necessary, but I find it useful to have " 8.5389 -"a <quote>mental model</quote> of what's going on." 8.5390 +"works. Knowing these details certainly isn't necessary, so it is certainly " 8.5391 +"safe to skip this chapter. However, I think you will get more out of the " 8.5392 +"software with a <quote>mental model</quote> of what's going on." 8.5393 msgstr "" 8.5394 8.5395 #. type: Content of: <book><chapter><para> 8.5396 -#: ../en/ch03-concepts.xml:13 8.5397 -msgid "" 8.5398 -"This understanding gives me confidence that Mercurial has been carefully " 8.5399 -"designed to be both <emphasis>safe</emphasis> and <emphasis>efficient</" 8.5400 -"emphasis>. And just as importantly, if it's easy for me to retain a good " 8.5401 -"idea of what the software is doing when I perform a revision control task, " 8.5402 -"I'm less likely to be surprised by its behaviour." 8.5403 +#: ../en/ch04-concepts.xml:14 8.5404 +msgid "" 8.5405 +"Being able to understand what's going on behind the scenes gives me " 8.5406 +"confidence that Mercurial has been carefully designed to be both " 8.5407 +"<emphasis>safe</emphasis> and <emphasis>efficient</emphasis>. And just as " 8.5408 +"importantly, if it's easy for me to retain a good idea of what the software " 8.5409 +"is doing when I perform a revision control task, I'm less likely to be " 8.5410 +"surprised by its behavior." 8.5411 msgstr "" 8.5412 8.5413 #. type: Content of: <book><chapter><para> 8.5414 -#: ../en/ch03-concepts.xml:20 8.5415 +#: ../en/ch04-concepts.xml:22 8.5416 msgid "" 8.5417 "In this chapter, we'll initially cover the core concepts behind Mercurial's " 8.5418 "design, then continue to discuss some of the interesting details of its " 8.5419 @@ -3974,17 +5339,17 @@ 8.5420 msgstr "" 8.5421 8.5422 #. type: Content of: <book><chapter><sect1><title> 8.5423 -#: ../en/ch03-concepts.xml:25 8.5424 +#: ../en/ch04-concepts.xml:27 8.5425 msgid "Mercurial's historical record" 8.5426 msgstr "Mercurial 的历史记录" 8.5427 8.5428 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5429 -#: ../en/ch03-concepts.xml:28 8.5430 +#: ../en/ch04-concepts.xml:30 8.5431 msgid "Tracking the history of a single file" 8.5432 msgstr "跟踪单一文件的历史" 8.5433 8.5434 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5435 -#: ../en/ch03-concepts.xml:30 8.5436 +#: ../en/ch04-concepts.xml:32 8.5437 msgid "" 8.5438 "When Mercurial tracks modifications to a file, it stores the history of that " 8.5439 "file in a metadata object called a <emphasis>filelog</emphasis>. Each entry " 8.5440 @@ -3996,7 +5361,7 @@ 8.5441 msgstr "" 8.5442 8.5443 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5444 -#: ../en/ch03-concepts.xml:41 8.5445 +#: ../en/ch04-concepts.xml:43 8.5446 msgid "" 8.5447 "A file that is large, or has a lot of history, has its filelog stored in " 8.5448 "separate data (<quote><literal>.d</literal></quote> suffix) and index " 8.5449 @@ -4008,23 +5373,23 @@ 8.5450 msgstr "" 8.5451 8.5452 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5453 -#: ../en/ch03-concepts.xml:53 8.5454 +#: ../en/ch04-concepts.xml:55 8.5455 msgid "" 8.5456 "Relationships between files in working directory and filelogs in repository" 8.5457 msgstr "工作目录中的文件与版本库中的文件日志之间的关系" 8.5458 8.5459 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5460 -#: ../en/ch03-concepts.xml:56 8.5461 +#: ../en/ch04-concepts.xml:58 8.5462 msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>" 8.5463 msgstr "" 8.5464 8.5465 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5466 -#: ../en/ch03-concepts.xml:63 8.5467 +#: ../en/ch04-concepts.xml:65 8.5468 msgid "Managing tracked files" 8.5469 msgstr "管理跟踪的文件" 8.5470 8.5471 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5472 -#: ../en/ch03-concepts.xml:65 8.5473 +#: ../en/ch04-concepts.xml:67 8.5474 msgid "" 8.5475 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " 8.5476 "together information about the files that it tracks. Each entry in the " 8.5477 @@ -4034,12 +5399,12 @@ 8.5478 msgstr "" 8.5479 8.5480 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5481 -#: ../en/ch03-concepts.xml:75 8.5482 +#: ../en/ch04-concepts.xml:77 8.5483 msgid "Recording changeset information" 8.5484 msgstr "记录修改集信息" 8.5485 8.5486 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5487 -#: ../en/ch03-concepts.xml:77 8.5488 +#: ../en/ch04-concepts.xml:79 8.5489 msgid "" 8.5490 "The <emphasis>changelog</emphasis> contains information about each " 8.5491 "changeset. Each revision records who committed a change, the changeset " 8.5492 @@ -4048,12 +5413,12 @@ 8.5493 msgstr "" 8.5494 8.5495 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5496 -#: ../en/ch03-concepts.xml:85 8.5497 +#: ../en/ch04-concepts.xml:87 8.5498 msgid "Relationships between revisions" 8.5499 msgstr "版本之间的关系" 8.5500 8.5501 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5502 -#: ../en/ch03-concepts.xml:87 8.5503 +#: ../en/ch04-concepts.xml:89 8.5504 msgid "" 8.5505 "Within a changelog, a manifest, or a filelog, each revision stores a pointer " 8.5506 "to its immediate parent (or to its two parents, if it's a merge revision). " 8.5507 @@ -4063,7 +5428,7 @@ 8.5508 msgstr "" 8.5509 8.5510 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5511 -#: ../en/ch03-concepts.xml:94 8.5512 +#: ../en/ch04-concepts.xml:96 8.5513 msgid "" 8.5514 "For every changeset in a repository, there is exactly one revision stored in " 8.5515 "the changelog. Each revision of the changelog contains a pointer to a single " 8.5516 @@ -4074,46 +5439,53 @@ 8.5517 msgstr "" 8.5518 8.5519 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5520 -#: ../en/ch03-concepts.xml:103 8.5521 +#: ../en/ch04-concepts.xml:105 8.5522 msgid "Metadata relationships" 8.5523 msgstr "元数据之间的关系" 8.5524 8.5525 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5526 -#: ../en/ch03-concepts.xml:105 8.5527 +#: ../en/ch04-concepts.xml:107 8.5528 msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>" 8.5529 msgstr "" 8.5530 8.5531 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5532 -#: ../en/ch03-concepts.xml:110 8.5533 +#: ../en/ch04-concepts.xml:112 8.5534 msgid "" 8.5535 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " 8.5536 "one</quote> relationship between revisions in the changelog, manifest, or " 8.5537 -"filelog. If the manifest hasn't changed between two changesets, the changelog " 8.5538 -"entries for those changesets will point to the same revision of the " 8.5539 -"manifest. If a file that Mercurial tracks hasn't changed between two " 8.5540 +"filelog. If a file that Mercurial tracks hasn't changed between two " 8.5541 "changesets, the entry for that file in the two revisions of the manifest will " 8.5542 -"point to the same revision of its filelog." 8.5543 +"point to the same revision of its filelog<placeholder type=\"footnote\" id=\"0" 8.5544 +"\"/>." 8.5545 +msgstr "" 8.5546 + 8.5547 +#. type: Content of: <book><chapter><sect1><sect2><para><footnote><para> 8.5548 +#: ../en/ch04-concepts.xml:119 8.5549 +msgid "" 8.5550 +"It is possible (though unusual) for the manifest to remain the same between " 8.5551 +"two changesets, in which case the changelog entries for those changesets will " 8.5552 +"point to the same revision of the manifest." 8.5553 msgstr "" 8.5554 8.5555 #. type: Content of: <book><chapter><sect1><title> 8.5556 -#: ../en/ch03-concepts.xml:123 8.5557 +#: ../en/ch04-concepts.xml:128 8.5558 msgid "Safe, efficient storage" 8.5559 msgstr "安全,高效的存储" 8.5560 8.5561 #. type: Content of: <book><chapter><sect1><para> 8.5562 -#: ../en/ch03-concepts.xml:125 8.5563 +#: ../en/ch04-concepts.xml:130 8.5564 msgid "" 8.5565 "The underpinnings of changelogs, manifests, and filelogs are provided by a " 8.5566 "single structure called the <emphasis>revlog</emphasis>." 8.5567 msgstr "" 8.5568 8.5569 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5570 -#: ../en/ch03-concepts.xml:130 8.5571 +#: ../en/ch04-concepts.xml:135 8.5572 msgid "Efficient storage" 8.5573 msgstr "高效存储" 8.5574 8.5575 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5576 -#: ../en/ch03-concepts.xml:132 8.5577 +#: ../en/ch04-concepts.xml:137 8.5578 msgid "" 8.5579 "The revlog provides efficient storage of revisions using a <emphasis>delta</" 8.5580 "emphasis> mechanism. Instead of storing a complete copy of a file for each " 8.5581 @@ -4123,7 +5495,7 @@ 8.5582 msgstr "" 8.5583 8.5584 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5585 -#: ../en/ch03-concepts.xml:140 8.5586 +#: ../en/ch04-concepts.xml:145 8.5587 msgid "" 8.5588 "Some obsolete revision control systems can only work with deltas of text " 8.5589 "files. They must either store binary files as complete snapshots or encoded " 8.5590 @@ -4133,12 +5505,12 @@ 8.5591 msgstr "" 8.5592 8.5593 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5594 -#: ../en/ch03-concepts.xml:149 8.5595 +#: ../en/ch04-concepts.xml:154 8.5596 msgid "Safe operation" 8.5597 msgstr "安全操作" 8.5598 8.5599 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5600 -#: ../en/ch03-concepts.xml:151 8.5601 +#: ../en/ch04-concepts.xml:156 8.5602 msgid "" 8.5603 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog " 8.5604 "file. It never modifies a section of a file after it has written it. This is " 8.5605 @@ -4147,7 +5519,7 @@ 8.5606 msgstr "" 8.5607 8.5608 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5609 -#: ../en/ch03-concepts.xml:157 8.5610 +#: ../en/ch04-concepts.xml:162 8.5611 msgid "" 8.5612 "In addition, Mercurial treats every write as part of a <emphasis>transaction</" 8.5613 "emphasis> that can span a number of files. A transaction is " 8.5614 @@ -4159,7 +5531,7 @@ 8.5615 msgstr "" 8.5616 8.5617 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5618 -#: ../en/ch03-concepts.xml:167 8.5619 +#: ../en/ch04-concepts.xml:172 8.5620 msgid "" 8.5621 "The fact that Mercurial only appends to files makes it easier to provide this " 8.5622 "transactional guarantee. The easier it is to do stuff like this, the more " 8.5623 @@ -4167,17 +5539,18 @@ 8.5624 msgstr "" 8.5625 8.5626 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5627 -#: ../en/ch03-concepts.xml:174 8.5628 +#: ../en/ch04-concepts.xml:179 8.5629 msgid "Fast retrieval" 8.5630 msgstr "快速检索" 8.5631 8.5632 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5633 -#: ../en/ch03-concepts.xml:176 8.5634 +#: ../en/ch04-concepts.xml:181 8.5635 msgid "" 8.5636 "Mercurial cleverly avoids a pitfall common to all earlier revision control " 8.5637 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " 8.5638 "revision control systems store the contents of a revision as an incremental " 8.5639 -"series of modifications against a <quote>snapshot</quote>. To reconstruct a " 8.5640 +"series of modifications against a <quote>snapshot</quote>. (Some base the " 8.5641 +"snapshot on the oldest revision, others on the newest.) To reconstruct a " 8.5642 "specific revision, you must first read the snapshot, and then every one of " 8.5643 "the revisions between the snapshot and your target revision. The more " 8.5644 "history that a file accumulates, the more revisions you must read, hence the " 8.5645 @@ -4185,17 +5558,17 @@ 8.5646 msgstr "" 8.5647 8.5648 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5649 -#: ../en/ch03-concepts.xml:188 8.5650 +#: ../en/ch04-concepts.xml:195 8.5651 msgid "Snapshot of a revlog, with incremental deltas" 8.5652 msgstr "版本日志的快照,以及增量差异" 8.5653 8.5654 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5655 -#: ../en/ch03-concepts.xml:190 8.5656 +#: ../en/ch04-concepts.xml:197 8.5657 msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>" 8.5658 msgstr "" 8.5659 8.5660 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5661 -#: ../en/ch03-concepts.xml:195 8.5662 +#: ../en/ch04-concepts.xml:202 8.5663 msgid "" 8.5664 "The innovation that Mercurial applies to this problem is simple but " 8.5665 "effective. Once the cumulative amount of delta information stored since the " 8.5666 @@ -4207,7 +5580,7 @@ 8.5667 msgstr "" 8.5668 8.5669 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5670 -#: ../en/ch03-concepts.xml:204 8.5671 +#: ../en/ch04-concepts.xml:211 8.5672 msgid "" 8.5673 "<xref linkend=\"fig:concepts:snapshot\"/> illustrates the idea. In an entry " 8.5674 "in a revlog's index file, Mercurial stores the range of entries from the data " 8.5675 @@ -4215,41 +5588,33 @@ 8.5676 msgstr "" 8.5677 8.5678 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.5679 -#: ../en/ch03-concepts.xml:210 8.5680 +#: ../en/ch04-concepts.xml:217 8.5681 msgid "Aside: the influence of video compression" 8.5682 msgstr "旁白: 视频压缩的影响" 8.5683 8.5684 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.5685 -#: ../en/ch03-concepts.xml:212 8.5686 +#: ../en/ch04-concepts.xml:219 8.5687 msgid "" 8.5688 "If you're familiar with video compression or have ever watched a TV feed " 8.5689 "through a digital cable or satellite service, you may know that most video " 8.5690 "compression schemes store each frame of video as a delta against its " 8.5691 -"predecessor frame. In addition, these schemes use <quote>lossy</quote> " 8.5692 -"compression techniques to increase the compression ratio, so visual errors " 8.5693 -"accumulate over the course of a number of inter-frame deltas." 8.5694 +"predecessor frame." 8.5695 msgstr "" 8.5696 8.5697 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.5698 -#: ../en/ch03-concepts.xml:221 8.5699 -msgid "" 8.5700 -"Because it's possible for a video stream to <quote>drop out</quote> " 8.5701 -"occasionally due to signal glitches, and to limit the accumulation of " 8.5702 -"artefacts introduced by the lossy compression process, video encoders " 8.5703 -"periodically insert a complete frame (called a <quote>key frame</quote>) into " 8.5704 -"the video stream; the next delta is generated against that frame. This means " 8.5705 -"that if the video signal gets interrupted, it will resume once the next key " 8.5706 -"frame is received. Also, the accumulation of encoding errors restarts anew " 8.5707 -"with each key frame." 8.5708 +#: ../en/ch04-concepts.xml:225 8.5709 +msgid "" 8.5710 +"Mercurial borrows this idea to make it possible to reconstruct a revision " 8.5711 +"from a snapshot and a small number of deltas." 8.5712 msgstr "" 8.5713 8.5714 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5715 -#: ../en/ch03-concepts.xml:235 8.5716 +#: ../en/ch04-concepts.xml:232 8.5717 msgid "Identification and strong integrity" 8.5718 msgstr "鉴别和强完整性" 8.5719 8.5720 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5721 -#: ../en/ch03-concepts.xml:237 8.5722 +#: ../en/ch04-concepts.xml:234 8.5723 msgid "" 8.5724 "Along with delta or snapshot information, a revlog entry contains a " 8.5725 "cryptographic hash of the data that it represents. This makes it difficult " 8.5726 @@ -4257,7 +5622,7 @@ 8.5727 msgstr "" 8.5728 8.5729 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5730 -#: ../en/ch03-concepts.xml:242 8.5731 +#: ../en/ch04-concepts.xml:239 8.5732 msgid "" 8.5733 "Hashes provide more than a mere check against corruption; they are used as " 8.5734 "the identifiers for revisions. The changeset identification hashes that you " 8.5735 @@ -4266,7 +5631,7 @@ 8.5736 msgstr "" 8.5737 8.5738 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5739 -#: ../en/ch03-concepts.xml:249 8.5740 +#: ../en/ch04-concepts.xml:246 8.5741 msgid "" 8.5742 "Mercurial verifies that hashes are correct when it retrieves file revisions " 8.5743 "and when it pulls changes from another repository. If it encounters an " 8.5744 @@ -4274,7 +5639,7 @@ 8.5745 msgstr "" 8.5746 8.5747 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5748 -#: ../en/ch03-concepts.xml:254 8.5749 +#: ../en/ch04-concepts.xml:251 8.5750 msgid "" 8.5751 "In addition to the effect it has on retrieval efficiency, Mercurial's use of " 8.5752 "periodic snapshots makes it more robust against partial data corruption. If " 8.5753 @@ -4285,12 +5650,12 @@ 8.5754 msgstr "" 8.5755 8.5756 #. type: Content of: <book><chapter><sect1><title> 8.5757 -#: ../en/ch03-concepts.xml:266 8.5758 +#: ../en/ch04-concepts.xml:263 8.5759 msgid "Revision history, branching, and merging" 8.5760 msgstr "修订历史,分支与合并" 8.5761 8.5762 #. type: Content of: <book><chapter><sect1><para> 8.5763 -#: ../en/ch03-concepts.xml:268 8.5764 +#: ../en/ch04-concepts.xml:265 8.5765 msgid "" 8.5766 "Every entry in a Mercurial revlog knows the identity of its immediate " 8.5767 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " 8.5768 @@ -4301,7 +5666,7 @@ 8.5769 msgstr "" 8.5770 8.5771 #. type: Content of: <book><chapter><sect1><para> 8.5772 -#: ../en/ch03-concepts.xml:276 8.5773 +#: ../en/ch04-concepts.xml:273 8.5774 msgid "" 8.5775 "In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the " 8.5776 "conceptual structure of a revlog. Filelogs, manifests, and changelogs all " 8.5777 @@ -4310,7 +5675,7 @@ 8.5778 msgstr "" 8.5779 8.5780 #. type: Content of: <book><chapter><sect1><para> 8.5781 -#: ../en/ch03-concepts.xml:282 8.5782 +#: ../en/ch04-concepts.xml:279 8.5783 msgid "" 8.5784 "The first revision in a revlog (at the bottom of the image) has the null ID " 8.5785 "in both of its parent slots. For a <quote>normal</quote> revision, its first " 8.5786 @@ -4322,29 +5687,29 @@ 8.5787 msgstr "" 8.5788 8.5789 #. type: Content of: <book><chapter><sect1><figure><title> 8.5790 -#: ../en/ch03-concepts.xml:292 8.5791 +#: ../en/ch04-concepts.xml:289 8.5792 msgid "The conceptual structure of a revlog" 8.5793 msgstr "版本日志的设计结构" 8.5794 8.5795 #. type: Content of: <book><chapter><sect1><figure><mediaobject> 8.5796 -#: ../en/ch03-concepts.xml:294 8.5797 +#: ../en/ch04-concepts.xml:291 8.5798 msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>" 8.5799 msgstr "" 8.5800 8.5801 #. type: Content of: <book><chapter><sect1><title> 8.5802 -#: ../en/ch03-concepts.xml:301 8.5803 +#: ../en/ch04-concepts.xml:298 8.5804 msgid "The working directory" 8.5805 msgstr "工作目录" 8.5806 8.5807 #. type: Content of: <book><chapter><sect1><para> 8.5808 -#: ../en/ch03-concepts.xml:303 8.5809 +#: ../en/ch04-concepts.xml:300 8.5810 msgid "" 8.5811 "In the working directory, Mercurial stores a snapshot of the files from the " 8.5812 "repository as of a particular changeset." 8.5813 msgstr "" 8.5814 8.5815 #. type: Content of: <book><chapter><sect1><para> 8.5816 -#: ../en/ch03-concepts.xml:306 8.5817 +#: ../en/ch04-concepts.xml:303 8.5818 msgid "" 8.5819 "The working directory <quote>knows</quote> which changeset it contains. When " 8.5820 "you update the working directory to contain a particular changeset, Mercurial " 8.5821 @@ -4355,16 +5720,19 @@ 8.5822 msgstr "" 8.5823 8.5824 #. type: Content of: <book><chapter><sect1><para> 8.5825 -#: ../en/ch03-concepts.xml:315 8.5826 -msgid "" 8.5827 -"The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " 8.5828 -"working directory. This details which changeset the working directory is " 8.5829 -"updated to, and all of the files that Mercurial is tracking in the working " 8.5830 -"directory." 8.5831 -msgstr "" 8.5832 - 8.5833 -#. type: Content of: <book><chapter><sect1><para> 8.5834 -#: ../en/ch03-concepts.xml:321 8.5835 +#: ../en/ch04-concepts.xml:312 8.5836 +msgid "" 8.5837 +"The <emphasis>dirstate</emphasis> is a special structure that contains " 8.5838 +"Mercurial's knowledge of the working directory. It is maintained as a file " 8.5839 +"named <filename>.hg/dirstate</filename> inside a repository. The dirstate " 8.5840 +"details which changeset the working directory is updated to, and all of the " 8.5841 +"files that Mercurial is tracking in the working directory. It also lets " 8.5842 +"Mercurial quickly notice changed files, by recording their checkout times and " 8.5843 +"sizes." 8.5844 +msgstr "" 8.5845 + 8.5846 +#. type: Content of: <book><chapter><sect1><para> 8.5847 +#: ../en/ch04-concepts.xml:322 8.5848 msgid "" 8.5849 "Just as a revision of a revlog has room for two parents, so that it can " 8.5850 "represent either a normal revision (with one parent) or a merge of two " 8.5851 @@ -4379,12 +5747,12 @@ 8.5852 msgstr "" 8.5853 8.5854 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5855 -#: ../en/ch03-concepts.xml:335 8.5856 +#: ../en/ch04-concepts.xml:336 8.5857 msgid "What happens when you commit" 8.5858 msgstr "当你提交时发生的事情" 8.5859 8.5860 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5861 -#: ../en/ch03-concepts.xml:337 8.5862 +#: ../en/ch04-concepts.xml:338 8.5863 msgid "" 8.5864 "The dirstate stores parent information for more than just book-keeping " 8.5865 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " 8.5866 @@ -4392,17 +5760,17 @@ 8.5867 msgstr "" 8.5868 8.5869 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5870 -#: ../en/ch03-concepts.xml:343 8.5871 +#: ../en/ch04-concepts.xml:344 8.5872 msgid "The working directory can have two parents" 8.5873 msgstr "工作目录可以有两个父亲" 8.5874 8.5875 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5876 -#: ../en/ch03-concepts.xml:345 8.5877 +#: ../en/ch04-concepts.xml:346 8.5878 msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>" 8.5879 msgstr "" 8.5880 8.5881 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5882 -#: ../en/ch03-concepts.xml:350 8.5883 +#: ../en/ch04-concepts.xml:351 8.5884 msgid "" 8.5885 "<xref linkend=\"fig:concepts:wdir\"/> shows the normal state of the working " 8.5886 "directory, where it has a single changeset as parent. That changeset is the " 8.5887 @@ -4411,18 +5779,18 @@ 8.5888 msgstr "" 8.5889 8.5890 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5891 -#: ../en/ch03-concepts.xml:357 8.5892 +#: ../en/ch04-concepts.xml:358 8.5893 msgid "The working directory gains new parents after a commit" 8.5894 msgstr "提交之后,工作目录的父亲就改变了" 8.5895 8.5896 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5897 -#: ../en/ch03-concepts.xml:360 8.5898 +#: ../en/ch04-concepts.xml:361 8.5899 msgid "" 8.5900 "<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>" 8.5901 msgstr "" 8.5902 8.5903 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5904 -#: ../en/ch03-concepts.xml:365 8.5905 +#: ../en/ch04-concepts.xml:366 8.5906 msgid "" 8.5907 "It's useful to think of the working directory as <quote>the changeset I'm " 8.5908 "about to commit</quote>. Any files that you tell Mercurial that you've " 8.5909 @@ -4432,7 +5800,7 @@ 8.5910 msgstr "" 8.5911 8.5912 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5913 -#: ../en/ch03-concepts.xml:373 8.5914 +#: ../en/ch04-concepts.xml:374 8.5915 msgid "" 8.5916 "After a commit, Mercurial will update the parents of the working directory, " 8.5917 "so that the first parent is the ID of the new changeset, and the second is " 8.5918 @@ -4442,12 +5810,12 @@ 8.5919 msgstr "" 8.5920 8.5921 #. type: Content of: <book><chapter><sect1><sect2><title> 8.5922 -#: ../en/ch03-concepts.xml:384 8.5923 +#: ../en/ch04-concepts.xml:385 8.5924 msgid "Creating a new head" 8.5925 msgstr "创建新顶点" 8.5926 8.5927 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5928 -#: ../en/ch03-concepts.xml:386 8.5929 +#: ../en/ch04-concepts.xml:387 8.5930 msgid "" 8.5931 "It's perfectly normal to update the working directory to a changeset other " 8.5932 "than the current tip. For example, you might want to know what your project " 8.5933 @@ -4460,18 +5828,18 @@ 8.5934 msgstr "" 8.5935 8.5936 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5937 -#: ../en/ch03-concepts.xml:398 8.5938 +#: ../en/ch04-concepts.xml:399 8.5939 msgid "The working directory, updated to an older changeset" 8.5940 msgstr "同步到旧修改集的工作目录" 8.5941 8.5942 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5943 -#: ../en/ch03-concepts.xml:401 8.5944 +#: ../en/ch04-concepts.xml:402 8.5945 msgid "" 8.5946 "<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>" 8.5947 msgstr "" 8.5948 8.5949 #. type: Content of: <book><chapter><sect1><sect2><para> 8.5950 -#: ../en/ch03-concepts.xml:406 8.5951 +#: ../en/ch04-concepts.xml:407 8.5952 msgid "" 8.5953 "Having updated the working directory to an older changeset, what happens if " 8.5954 "you make some changes, and then commit? Mercurial behaves in the same way as " 8.5955 @@ -4483,17 +5851,17 @@ 8.5956 msgstr "" 8.5957 8.5958 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.5959 -#: ../en/ch03-concepts.xml:418 8.5960 +#: ../en/ch04-concepts.xml:419 8.5961 msgid "After a commit made while synced to an older changeset" 8.5962 msgstr "对同步到旧修改集的工作目录提交之后" 8.5963 8.5964 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.5965 -#: ../en/ch03-concepts.xml:421 8.5966 +#: ../en/ch04-concepts.xml:422 8.5967 msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>" 8.5968 msgstr "" 8.5969 8.5970 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.5971 -#: ../en/ch03-concepts.xml:427 8.5972 +#: ../en/ch04-concepts.xml:428 8.5973 msgid "" 8.5974 "If you're new to Mercurial, you should keep in mind a common <quote>error</" 8.5975 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> " 8.5976 @@ -4503,27 +5871,29 @@ 8.5977 "working directory will stay synced at the same changeset as before the pull. " 8.5978 "If you make some changes and commit afterwards, you'll thus create a new " 8.5979 "head, because your working directory isn't synced to whatever the current tip " 8.5980 -"is." 8.5981 +"is. To combine the operation of a pull, followed by an update, run " 8.5982 +"<command>hg pull -u</command>." 8.5983 msgstr "" 8.5984 8.5985 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.5986 -#: ../en/ch03-concepts.xml:439 8.5987 +#: ../en/ch04-concepts.xml:442 8.5988 msgid "" 8.5989 "I put the word <quote>error</quote> in quotes because all that you need to do " 8.5990 -"to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, " 8.5991 -"then <command role=\"hg-cmd\">hg commit</command>. In other words, this " 8.5992 -"almost never has negative consequences; it just surprises people. I'll " 8.5993 -"discuss other ways to avoid this behaviour, and why Mercurial behaves in this " 8.5994 -"initially surprising way, later on." 8.5995 +"to rectify the situation where you created a new head by accident is <command " 8.5996 +"role=\"hg-cmd\">hg merge</command>, then <command role=\"hg-cmd\">hg commit</" 8.5997 +"command>. In other words, this almost never has negative consequences; it's " 8.5998 +"just something of a surprise for newcomers. I'll discuss other ways to avoid " 8.5999 +"this behavior, and why Mercurial behaves in this initially surprising way, " 8.6000 +"later on." 8.6001 msgstr "" 8.6002 8.6003 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6004 -#: ../en/ch03-concepts.xml:451 8.6005 -msgid "Merging heads" 8.6006 -msgstr "合并顶点" 8.6007 - 8.6008 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6009 -#: ../en/ch03-concepts.xml:453 8.6010 +#: ../en/ch04-concepts.xml:455 8.6011 +msgid "Merging changes" 8.6012 +msgstr "合并修改" 8.6013 + 8.6014 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6015 +#: ../en/ch04-concepts.xml:457 8.6016 msgid "" 8.6017 "When you run the <command role=\"hg-cmd\">hg merge</command> command, " 8.6018 "Mercurial leaves the first parent of the working directory unchanged, and " 8.6019 @@ -4532,18 +5902,18 @@ 8.6020 msgstr "" 8.6021 8.6022 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.6023 -#: ../en/ch03-concepts.xml:460 8.6024 +#: ../en/ch04-concepts.xml:464 8.6025 msgid "Merging two heads" 8.6026 msgstr "合并两个顶点" 8.6027 8.6028 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.6029 -#: ../en/ch03-concepts.xml:462 8.6030 +#: ../en/ch04-concepts.xml:466 8.6031 msgid "" 8.6032 "<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>" 8.6033 msgstr "" 8.6034 8.6035 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6036 -#: ../en/ch03-concepts.xml:469 8.6037 +#: ../en/ch04-concepts.xml:473 8.6038 msgid "" 8.6039 "Mercurial also has to modify the working directory, to merge the files " 8.6040 "managed in the two changesets. Simplified a little, the merging process goes " 8.6041 @@ -4551,33 +5921,33 @@ 8.6042 msgstr "" 8.6043 8.6044 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6045 -#: ../en/ch03-concepts.xml:474 8.6046 +#: ../en/ch04-concepts.xml:478 8.6047 msgid "If neither changeset has modified a file, do nothing with that file." 8.6048 msgstr "" 8.6049 8.6050 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6051 -#: ../en/ch03-concepts.xml:477 8.6052 +#: ../en/ch04-concepts.xml:481 8.6053 msgid "" 8.6054 "If one changeset has modified a file, and the other hasn't, create the " 8.6055 "modified copy of the file in the working directory." 8.6056 msgstr "" 8.6057 8.6058 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6059 -#: ../en/ch03-concepts.xml:481 8.6060 +#: ../en/ch04-concepts.xml:485 8.6061 msgid "" 8.6062 "If one changeset has removed a file, and the other hasn't (or has also " 8.6063 "deleted it), delete the file from the working directory." 8.6064 msgstr "" 8.6065 8.6066 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6067 -#: ../en/ch03-concepts.xml:485 8.6068 +#: ../en/ch04-concepts.xml:489 8.6069 msgid "" 8.6070 "If one changeset has removed a file, but the other has modified the file, ask " 8.6071 "the user what to do: keep the modified file, or remove it?" 8.6072 msgstr "" 8.6073 8.6074 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6075 -#: ../en/ch03-concepts.xml:489 8.6076 +#: ../en/ch04-concepts.xml:493 8.6077 msgid "" 8.6078 "If both changesets have modified a file, invoke an external merge program to " 8.6079 "choose the new contents for the merged file. This may require input from the " 8.6080 @@ -4585,14 +5955,14 @@ 8.6081 msgstr "" 8.6082 8.6083 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6084 -#: ../en/ch03-concepts.xml:494 8.6085 +#: ../en/ch04-concepts.xml:498 8.6086 msgid "" 8.6087 "If one changeset has modified a file, and the other has renamed or copied the " 8.6088 "file, make sure that the changes follow the new name of the file." 8.6089 msgstr "" 8.6090 8.6091 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6092 -#: ../en/ch03-concepts.xml:498 8.6093 +#: ../en/ch04-concepts.xml:502 8.6094 msgid "" 8.6095 "There are more details&emdash;merging has plenty of corner cases&emdash;but " 8.6096 "these are the most common choices that are involved in a merge. As you can " 8.6097 @@ -4601,7 +5971,7 @@ 8.6098 msgstr "" 8.6099 8.6100 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6101 -#: ../en/ch03-concepts.xml:505 8.6102 +#: ../en/ch04-concepts.xml:509 8.6103 msgid "" 8.6104 "When you're thinking about what happens when you commit after a merge, once " 8.6105 "again the working directory is <quote>the changeset I'm about to commit</" 8.6106 @@ -4611,23 +5981,48 @@ 8.6107 msgstr "" 8.6108 8.6109 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6110 -#: ../en/ch03-concepts.xml:512 8.6111 +#: ../en/ch04-concepts.xml:516 8.6112 msgid "" 8.6113 "Mercurial lets you perform multiple merges, but you must commit the results " 8.6114 "of each individual merge as you go. This is necessary because Mercurial only " 8.6115 "tracks two parents for both revisions and the working directory. While it " 8.6116 -"would be technically possible to merge multiple changesets at once, the " 8.6117 -"prospect of user confusion and making a terrible mess of a merge immediately " 8.6118 -"becomes overwhelming." 8.6119 +"would be technically feasible to merge multiple changesets at once, Mercurial " 8.6120 +"avoids this for simplicity. With multi-way merges, the risks of user " 8.6121 +"confusion, nasty conflict resolution, and making a terrible mess of a merge " 8.6122 +"would grow intolerable." 8.6123 +msgstr "" 8.6124 + 8.6125 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.6126 +#: ../en/ch04-concepts.xml:529 8.6127 +msgid "Merging and renames" 8.6128 +msgstr "合并与改名" 8.6129 + 8.6130 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6131 +#: ../en/ch04-concepts.xml:531 8.6132 +msgid "" 8.6133 +"A surprising number of revision control systems pay little or no attention to " 8.6134 +"a file's <emphasis>name</emphasis> over time. For instance, it used to be " 8.6135 +"common that if a file got renamed on one side of a merge, the changes from " 8.6136 +"the other side would be silently dropped." 8.6137 +msgstr "" 8.6138 + 8.6139 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6140 +#: ../en/ch04-concepts.xml:537 8.6141 +msgid "" 8.6142 +"Mercurial records metadata when you tell it to perform a rename or copy. It " 8.6143 +"uses this metadata during a merge to do the right thing in the case of a " 8.6144 +"merge. For instance, if I rename a file, and you edit it without renaming " 8.6145 +"it, when we merge our work the file will be renamed and have your edits " 8.6146 +"applied." 8.6147 msgstr "" 8.6148 8.6149 #. type: Content of: <book><chapter><sect1><title> 8.6150 -#: ../en/ch03-concepts.xml:523 8.6151 +#: ../en/ch04-concepts.xml:547 8.6152 msgid "Other interesting design features" 8.6153 msgstr "其它有趣的设计特性" 8.6154 8.6155 #. type: Content of: <book><chapter><sect1><para> 8.6156 -#: ../en/ch03-concepts.xml:525 8.6157 +#: ../en/ch04-concepts.xml:549 8.6158 msgid "" 8.6159 "In the sections above, I've tried to highlight some of the most important " 8.6160 "aspects of Mercurial's design, to illustrate that it pays careful attention " 8.6161 @@ -4640,12 +6035,12 @@ 8.6162 msgstr "" 8.6163 8.6164 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6165 -#: ../en/ch03-concepts.xml:536 8.6166 +#: ../en/ch04-concepts.xml:560 8.6167 msgid "Clever compression" 8.6168 msgstr "智能压缩" 8.6169 8.6170 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6171 -#: ../en/ch03-concepts.xml:538 8.6172 +#: ../en/ch04-concepts.xml:562 8.6173 msgid "" 8.6174 "When appropriate, Mercurial will store both snapshots and deltas in " 8.6175 "compressed form. It does this by always <emphasis>trying to</emphasis> " 8.6176 @@ -4654,7 +6049,7 @@ 8.6177 msgstr "" 8.6178 8.6179 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6180 -#: ../en/ch03-concepts.xml:544 8.6181 +#: ../en/ch04-concepts.xml:568 8.6182 msgid "" 8.6183 "This means that Mercurial does <quote>the right thing</quote> when storing a " 8.6184 "file whose native form is compressed, such as a <literal>zip</literal> " 8.6185 @@ -4664,7 +6059,7 @@ 8.6186 msgstr "" 8.6187 8.6188 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6189 -#: ../en/ch03-concepts.xml:552 8.6190 +#: ../en/ch04-concepts.xml:576 8.6191 msgid "" 8.6192 "Deltas between revisions of a compressed file are usually larger than " 8.6193 "snapshots of the file, and Mercurial again does <quote>the right thing</" 8.6194 @@ -4674,12 +6069,12 @@ 8.6195 msgstr "" 8.6196 8.6197 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.6198 -#: ../en/ch03-concepts.xml:561 8.6199 +#: ../en/ch04-concepts.xml:585 8.6200 msgid "Network recompression" 8.6201 msgstr "网络重新压缩" 8.6202 8.6203 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.6204 -#: ../en/ch03-concepts.xml:563 8.6205 +#: ../en/ch04-concepts.xml:587 8.6206 msgid "" 8.6207 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " 8.6208 "compression algorithm (the same one used by the popular <literal>zip</" 8.6209 @@ -4689,7 +6084,7 @@ 8.6210 msgstr "" 8.6211 8.6212 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.6213 -#: ../en/ch03-concepts.xml:571 8.6214 +#: ../en/ch04-concepts.xml:595 8.6215 msgid "" 8.6216 "If the connection is over HTTP, Mercurial recompresses the entire stream of " 8.6217 "data using a compression algorithm that gives a better compression ratio (the " 8.6218 @@ -4697,24 +6092,26 @@ 8.6219 "compression package). This combination of algorithm and compression of the " 8.6220 "entire stream (instead of a revision at a time) substantially reduces the " 8.6221 "number of bytes to be transferred, yielding better network performance over " 8.6222 -"almost all kinds of network." 8.6223 +"most kinds of network." 8.6224 msgstr "" 8.6225 8.6226 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.6227 -#: ../en/ch03-concepts.xml:581 8.6228 -msgid "" 8.6229 -"(If the connection is over <command>ssh</command>, Mercurial " 8.6230 +#: ../en/ch04-concepts.xml:605 8.6231 +msgid "" 8.6232 +"If the connection is over <command>ssh</command>, Mercurial " 8.6233 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" 8.6234 -"command> can already do this itself.)" 8.6235 +"command> can already do this itself. You can tell Mercurial to always use " 8.6236 +"<command>ssh</command>'s compression feature by editing the <filename>.hgrc</" 8.6237 +"filename> file in your home directory as follows." 8.6238 msgstr "" 8.6239 8.6240 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6241 -#: ../en/ch03-concepts.xml:589 8.6242 +#: ../en/ch04-concepts.xml:620 8.6243 msgid "Read/write ordering and atomicity" 8.6244 msgstr "读写顺序与原子性" 8.6245 8.6246 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6247 -#: ../en/ch03-concepts.xml:591 8.6248 +#: ../en/ch04-concepts.xml:622 8.6249 msgid "" 8.6250 "Appending to files isn't the whole story when it comes to guaranteeing that a " 8.6251 "reader won't see a partial write. If you recall <xref linkend=\"fig:concepts:" 8.6252 @@ -4724,7 +6121,7 @@ 8.6253 msgstr "" 8.6254 8.6255 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6256 -#: ../en/ch03-concepts.xml:599 8.6257 +#: ../en/ch04-concepts.xml:629 8.6258 msgid "" 8.6259 "A writer starts a transaction by writing filelog and manifest data, and " 8.6260 "doesn't write any changelog data until those are finished. A reader starts " 8.6261 @@ -4732,7 +6129,7 @@ 8.6262 msgstr "" 8.6263 8.6264 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6265 -#: ../en/ch03-concepts.xml:604 8.6266 +#: ../en/ch04-concepts.xml:634 8.6267 msgid "" 8.6268 "Since the writer has always finished writing filelog and manifest data before " 8.6269 "it writes to the changelog, a reader will never read a pointer to a partially " 8.6270 @@ -4741,23 +6138,23 @@ 8.6271 msgstr "" 8.6272 8.6273 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6274 -#: ../en/ch03-concepts.xml:612 8.6275 +#: ../en/ch04-concepts.xml:642 8.6276 msgid "Concurrent access" 8.6277 msgstr "并发访问" 8.6278 8.6279 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6280 -#: ../en/ch03-concepts.xml:614 8.6281 +#: ../en/ch04-concepts.xml:644 8.6282 msgid "" 8.6283 "The read/write ordering and atomicity guarantees mean that Mercurial never " 8.6284 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even " 8.6285 "if the repository is being written to while the read is occurring. This has a " 8.6286 "big effect on scalability; you can have an arbitrary number of Mercurial " 8.6287 -"processes safely reading data from a repository safely all at once, no matter " 8.6288 +"processes safely reading data from a repository all at once, no matter " 8.6289 "whether it's being written to or not." 8.6290 msgstr "" 8.6291 8.6292 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6293 -#: ../en/ch03-concepts.xml:623 8.6294 +#: ../en/ch04-concepts.xml:653 8.6295 msgid "" 8.6296 "The lockless nature of reading means that if you're sharing a repository on a " 8.6297 "multi-user system, you don't need to grant other local users permission to " 8.6298 @@ -4771,7 +6168,7 @@ 8.6299 msgstr "" 8.6300 8.6301 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6302 -#: ../en/ch03-concepts.xml:636 8.6303 +#: ../en/ch04-concepts.xml:666 8.6304 msgid "" 8.6305 "Mercurial uses locks to ensure that only one process can write to a " 8.6306 "repository at a time (the locking mechanism is safe even over filesystems " 8.6307 @@ -4785,12 +6182,12 @@ 8.6308 msgstr "" 8.6309 8.6310 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.6311 -#: ../en/ch03-concepts.xml:648 8.6312 +#: ../en/ch04-concepts.xml:678 8.6313 msgid "Safe dirstate access" 8.6314 msgstr "安全的目录状态访问" 8.6315 8.6316 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.6317 -#: ../en/ch03-concepts.xml:650 8.6318 +#: ../en/ch04-concepts.xml:680 8.6319 msgid "" 8.6320 "As with revision data, Mercurial doesn't take a lock to read the dirstate " 8.6321 "file; it does acquire a lock to write it. To avoid the possibility of " 8.6322 @@ -4802,12 +6199,12 @@ 8.6323 msgstr "" 8.6324 8.6325 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6326 -#: ../en/ch03-concepts.xml:663 8.6327 +#: ../en/ch04-concepts.xml:693 8.6328 msgid "Avoiding seeks" 8.6329 msgstr "避免查找" 8.6330 8.6331 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6332 -#: ../en/ch03-concepts.xml:665 8.6333 +#: ../en/ch04-concepts.xml:695 8.6334 msgid "" 8.6335 "Critical to Mercurial's performance is the avoidance of seeks of the disk " 8.6336 "head, since any seek is far more expensive than even a comparatively large " 8.6337 @@ -4815,7 +6212,7 @@ 8.6338 msgstr "" 8.6339 8.6340 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6341 -#: ../en/ch03-concepts.xml:669 8.6342 +#: ../en/ch04-concepts.xml:699 8.6343 msgid "" 8.6344 "This is why, for example, the dirstate is stored in a single file. If there " 8.6345 "were a dirstate file per directory that Mercurial tracked, the disk would " 8.6346 @@ -4824,7 +6221,7 @@ 8.6347 msgstr "" 8.6348 8.6349 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6350 -#: ../en/ch03-concepts.xml:675 8.6351 +#: ../en/ch04-concepts.xml:705 8.6352 msgid "" 8.6353 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a " 8.6354 "repository on local storage. Instead of copying every revlog file from the " 8.6355 @@ -4837,24 +6234,24 @@ 8.6356 msgstr "" 8.6357 8.6358 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6359 -#: ../en/ch03-concepts.xml:686 8.6360 +#: ../en/ch04-concepts.xml:716 8.6361 msgid "" 8.6362 "A few revision control developers have pointed out that this idea of making a " 8.6363 "complete private copy of a file is not very efficient in its use of storage. " 8.6364 "While this is true, storage is cheap, and this method gives the highest " 8.6365 "performance while deferring most book-keeping to the operating system. An " 8.6366 "alternative scheme would most likely reduce performance and increase the " 8.6367 -"complexity of the software, each of which is much more important to the " 8.6368 +"complexity of the software, but speed and simplicity are key to the " 8.6369 "<quote>feel</quote> of day-to-day use." 8.6370 msgstr "" 8.6371 8.6372 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6373 -#: ../en/ch03-concepts.xml:698 8.6374 +#: ../en/ch04-concepts.xml:728 8.6375 msgid "Other contents of the dirstate" 8.6376 msgstr "目录状态的其它内容" 8.6377 8.6378 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6379 -#: ../en/ch03-concepts.xml:700 8.6380 +#: ../en/ch04-concepts.xml:730 8.6381 msgid "" 8.6382 "Because Mercurial doesn't force you to tell it when you're modifying a file, " 8.6383 "it uses the dirstate to store some extra information so it can determine " 8.6384 @@ -4864,7 +6261,7 @@ 8.6385 msgstr "" 8.6386 8.6387 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6388 -#: ../en/ch03-concepts.xml:707 8.6389 +#: ../en/ch04-concepts.xml:737 8.6390 msgid "" 8.6391 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role=" 8.6392 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> " 8.6393 @@ -4873,31 +6270,50 @@ 8.6394 msgstr "" 8.6395 8.6396 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6397 -#: ../en/ch03-concepts.xml:714 8.6398 -msgid "" 8.6399 -"When Mercurial is checking the states of files in the working directory, it " 8.6400 -"first checks a file's modification time. If that has not changed, the file " 8.6401 -"must not have been modified. If the file's size has changed, the file must " 8.6402 -"have been modified. If the modification time has changed, but the size has " 8.6403 -"not, only then does Mercurial need to read the actual contents of the file to " 8.6404 -"see if they've changed. Storing these few extra pieces of information " 8.6405 -"dramatically reduces the amount of data that Mercurial needs to read, which " 8.6406 -"yields large performance improvements compared to other revision control " 8.6407 -"systems." 8.6408 +#: ../en/ch04-concepts.xml:744 8.6409 +msgid "" 8.6410 +"The dirstate helps Mercurial to efficiently check the status of files in a " 8.6411 +"repository." 8.6412 +msgstr "" 8.6413 + 8.6414 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6415 +#: ../en/ch04-concepts.xml:749 8.6416 +msgid "" 8.6417 +"When Mercurial checks the state of a file in the working directory, it first " 8.6418 +"checks a file's modification time against the time in the dirstate that " 8.6419 +"records when Mercurial last wrote the file. If the last modified time is the " 8.6420 +"same as the time when Mercurial wrote the file, the file must not have been " 8.6421 +"modified, so Mercurial does not need to check any further." 8.6422 +msgstr "" 8.6423 + 8.6424 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6425 +#: ../en/ch04-concepts.xml:758 8.6426 +msgid "" 8.6427 +"If the file's size has changed, the file must have been modified. If the " 8.6428 +"modification time has changed, but the size has not, only then does Mercurial " 8.6429 +"need to actually read the contents of the file to see if it has changed." 8.6430 +msgstr "" 8.6431 + 8.6432 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6433 +#: ../en/ch04-concepts.xml:766 8.6434 +msgid "" 8.6435 +"Storing the modification time and size dramatically reduces the number of " 8.6436 +"read operations that Mercurial needs to perform when we run commands like " 8.6437 +"<command>hg status</command>. This results in large performance improvements." 8.6438 msgstr "" 8.6439 8.6440 #. type: Content of: <book><chapter><title> 8.6441 -#: ../en/ch04-daily.xml:5 8.6442 +#: ../en/ch05-daily.xml:5 8.6443 msgid "Mercurial in daily use" 8.6444 msgstr "Mercurial 的日常使用" 8.6445 8.6446 #. type: Content of: <book><chapter><sect1><title> 8.6447 -#: ../en/ch04-daily.xml:8 8.6448 +#: ../en/ch05-daily.xml:8 8.6449 msgid "Telling Mercurial which files to track" 8.6450 msgstr "告诉 Mercurial 要跟踪哪些文件" 8.6451 8.6452 #. type: Content of: <book><chapter><sect1><para> 8.6453 -#: ../en/ch04-daily.xml:10 8.6454 +#: ../en/ch05-daily.xml:10 8.6455 msgid "" 8.6456 "Mercurial does not work with files in your repository unless you tell it to " 8.6457 "manage them. The <command role=\"hg-cmd\">hg status</command> command will " 8.6458 @@ -4907,7 +6323,7 @@ 8.6459 8.6460 # 8.6461 #. type: Content of: <book><chapter><sect1><para> 8.6462 -#: ../en/ch04-daily.xml:17 8.6463 +#: ../en/ch05-daily.xml:17 8.6464 msgid "" 8.6465 "To tell Mercurial to track a file, use the <command role=\"hg-cmd\">hg add</" 8.6466 "command> command. Once you have added a file, the entry in the output of " 8.6467 @@ -4916,21 +6332,21 @@ 8.6468 msgstr "" 8.6469 8.6470 #. type: Content of: <book><chapter><sect1><para> 8.6471 -#: ../en/ch04-daily.xml:26 8.6472 +#: ../en/ch05-daily.xml:26 8.6473 msgid "" 8.6474 "After you run a <command role=\"hg-cmd\">hg commit</command>, the files that " 8.6475 "you added before the commit will no longer be listed in the output of " 8.6476 -"<command role=\"hg-cmd\">hg status</command>. The reason for this is that " 8.6477 -"<command role=\"hg-cmd\">hg status</command> only tells you about " 8.6478 -"<quote>interesting</quote> files&emdash;those that you have modified or told " 8.6479 -"Mercurial to do something with&emdash;by default. If you have a repository " 8.6480 -"that contains thousands of files, you will rarely want to know about files " 8.6481 -"that Mercurial is tracking, but that have not changed. (You can still get " 8.6482 -"this information; we'll return to this later.)" 8.6483 -msgstr "" 8.6484 - 8.6485 -#. type: Content of: <book><chapter><sect1><para> 8.6486 -#: ../en/ch04-daily.xml:38 8.6487 +"<command role=\"hg-cmd\">hg status</command>. The reason for this is that by " 8.6488 +"default, <command role=\"hg-cmd\">hg status</command> only tells you about " 8.6489 +"<quote>interesting</quote> files&emdash;those that you have (for example) " 8.6490 +"modified, removed, or renamed. If you have a repository that contains " 8.6491 +"thousands of files, you will rarely want to know about files that Mercurial " 8.6492 +"is tracking, but that have not changed. (You can still get this information; " 8.6493 +"we'll return to this later.)" 8.6494 +msgstr "" 8.6495 + 8.6496 +#. type: Content of: <book><chapter><sect1><para> 8.6497 +#: ../en/ch05-daily.xml:38 8.6498 msgid "" 8.6499 "Once you add a file, Mercurial doesn't do anything with it immediately. " 8.6500 "Instead, it will take a snapshot of the file's state the next time you " 8.6501 @@ -4939,52 +6355,52 @@ 8.6502 msgstr "" 8.6503 8.6504 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6505 -#: ../en/ch04-daily.xml:45 8.6506 +#: ../en/ch05-daily.xml:45 8.6507 msgid "Explicit versus implicit file naming" 8.6508 msgstr "明确与隐含文件命名" 8.6509 8.6510 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6511 -#: ../en/ch04-daily.xml:47 8.6512 -msgid "" 8.6513 -"A useful behaviour that Mercurial has is that if you pass the name of a " 8.6514 +#: ../en/ch05-daily.xml:47 8.6515 +msgid "" 8.6516 +"A useful behavior that Mercurial has is that if you pass the name of a " 8.6517 "directory to a command, every Mercurial command will treat this as <quote>I " 8.6518 "want to operate on every file in this directory and its subdirectories</" 8.6519 "quote>." 8.6520 msgstr "" 8.6521 8.6522 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6523 -#: ../en/ch04-daily.xml:54 8.6524 +#: ../en/ch05-daily.xml:54 8.6525 msgid "" 8.6526 "Notice in this example that Mercurial printed the names of the files it " 8.6527 -"added, whereas it didn't do so when we added the file named <filename>a</" 8.6528 -"filename> in the earlier example." 8.6529 -msgstr "" 8.6530 - 8.6531 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6532 -#: ../en/ch04-daily.xml:59 8.6533 +"added, whereas it didn't do so when we added the file named <filename>myfile." 8.6534 +"txt</filename> in the earlier example." 8.6535 +msgstr "" 8.6536 + 8.6537 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6538 +#: ../en/ch05-daily.xml:59 8.6539 msgid "" 8.6540 "What's going on is that in the former case, we explicitly named the file to " 8.6541 -"add on the command line, so the assumption that Mercurial makes in such cases " 8.6542 -"is that you know what you were doing, and it doesn't print any output." 8.6543 -msgstr "" 8.6544 - 8.6545 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6546 -#: ../en/ch04-daily.xml:64 8.6547 +"add on the command line. The assumption that Mercurial makes in such cases " 8.6548 +"is that we know what we are doing, and it doesn't print any output." 8.6549 +msgstr "" 8.6550 + 8.6551 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6552 +#: ../en/ch05-daily.xml:64 8.6553 msgid "" 8.6554 "However, when we <emphasis>imply</emphasis> the names of files by giving the " 8.6555 "name of a directory, Mercurial takes the extra step of printing the name of " 8.6556 "each file that it does something with. This makes it more clear what is " 8.6557 "happening, and reduces the likelihood of a silent and nasty surprise. This " 8.6558 -"behaviour is common to most Mercurial commands." 8.6559 +"behavior is common to most Mercurial commands." 8.6560 msgstr "" 8.6561 8.6562 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6563 -#: ../en/ch04-daily.xml:73 8.6564 -msgid "Aside: Mercurial tracks files, not directories" 8.6565 -msgstr "旁白: Mercurial 只跟踪文件,不跟踪目录" 8.6566 - 8.6567 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6568 -#: ../en/ch04-daily.xml:75 8.6569 +#: ../en/ch05-daily.xml:73 8.6570 +msgid "Mercurial tracks files, not directories" 8.6571 +msgstr "Mercurial 只跟踪文件,不跟踪目录" 8.6572 + 8.6573 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6574 +#: ../en/ch05-daily.xml:75 8.6575 msgid "" 8.6576 "Mercurial does not track directory information. Instead, it tracks the path " 8.6577 "to a file. Before creating a file, it first creates any missing directory " 8.6578 @@ -4995,7 +6411,7 @@ 8.6579 msgstr "" 8.6580 8.6581 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6582 -#: ../en/ch04-daily.xml:84 8.6583 +#: ../en/ch05-daily.xml:84 8.6584 msgid "" 8.6585 "Empty directories are rarely useful, and there are unintrusive workarounds " 8.6586 "that you can use to achieve an appropriate effect. The developers of " 8.6587 @@ -5004,7 +6420,7 @@ 8.6588 msgstr "" 8.6589 8.6590 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6591 -#: ../en/ch04-daily.xml:91 8.6592 +#: ../en/ch05-daily.xml:91 8.6593 msgid "" 8.6594 "If you need an empty directory in your repository, there are a few ways to " 8.6595 "achieve this. One is to create a directory, then <command role=\"hg-cmd\">hg " 8.6596 @@ -5015,30 +6431,29 @@ 8.6597 msgstr "" 8.6598 8.6599 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6600 -#: ../en/ch04-daily.xml:102 8.6601 +#: ../en/ch05-daily.xml:102 8.6602 msgid "" 8.6603 "Another way to tackle a need for an empty directory is to simply create one " 8.6604 "in your automated build scripts before they will need it." 8.6605 msgstr "" 8.6606 8.6607 #. type: Content of: <book><chapter><sect1><title> 8.6608 -#: ../en/ch04-daily.xml:109 8.6609 +#: ../en/ch05-daily.xml:109 8.6610 msgid "How to stop tracking a file" 8.6611 msgstr "如何停止跟踪文件" 8.6612 8.6613 -# 8.6614 -#. type: Content of: <book><chapter><sect1><para> 8.6615 -#: ../en/ch04-daily.xml:111 8.6616 +#. type: Content of: <book><chapter><sect1><para> 8.6617 +#: ../en/ch05-daily.xml:111 8.6618 msgid "" 8.6619 "Once you decide that a file no longer belongs in your repository, use the " 8.6620 -"<command role=\"hg-cmd\">hg remove</command> command; this deletes the file, " 8.6621 -"and tells Mercurial to stop tracking it. A removed file is represented in " 8.6622 -"the output of <command role=\"hg-cmd\">hg status</command> with a " 8.6623 -"<quote><literal>R</literal></quote>." 8.6624 -msgstr "" 8.6625 - 8.6626 -#. type: Content of: <book><chapter><sect1><para> 8.6627 -#: ../en/ch04-daily.xml:120 8.6628 +"<command role=\"hg-cmd\">hg remove</command> command. This deletes the file, " 8.6629 +"and tells Mercurial to stop tracking it (which will occur at the next " 8.6630 +"commit). A removed file is represented in the output of <command role=\"hg-" 8.6631 +"cmd\">hg status</command> with a <quote><literal>R</literal></quote>." 8.6632 +msgstr "" 8.6633 + 8.6634 +#. type: Content of: <book><chapter><sect1><para> 8.6635 +#: ../en/ch05-daily.xml:121 8.6636 msgid "" 8.6637 "After you <command role=\"hg-cmd\">hg remove</command> a file, Mercurial will " 8.6638 "no longer track changes to that file, even if you recreate a file with the " 8.6639 @@ -5049,51 +6464,52 @@ 8.6640 msgstr "" 8.6641 8.6642 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6643 -#: ../en/ch04-daily.xml:129 8.6644 +#: ../en/ch05-daily.xml:130 8.6645 msgid "Removing a file does not affect its history" 8.6646 msgstr "删除文件不影响历史" 8.6647 8.6648 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6649 -#: ../en/ch04-daily.xml:131 8.6650 +#: ../en/ch05-daily.xml:132 8.6651 msgid "It is important to understand that removing a file has only two effects." 8.6652 msgstr "" 8.6653 8.6654 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6655 -#: ../en/ch04-daily.xml:134 8.6656 +#: ../en/ch05-daily.xml:135 8.6657 msgid "It removes the current version of the file from the working directory." 8.6658 msgstr "" 8.6659 8.6660 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.6661 -#: ../en/ch04-daily.xml:137 8.6662 +#: ../en/ch05-daily.xml:138 8.6663 msgid "" 8.6664 "It stops Mercurial from tracking changes to the file, from the time of the " 8.6665 "next commit." 8.6666 msgstr "" 8.6667 8.6668 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6669 -#: ../en/ch04-daily.xml:140 8.6670 +#: ../en/ch05-daily.xml:141 8.6671 msgid "" 8.6672 "Removing a file <emphasis>does not</emphasis> in any way alter the " 8.6673 "<emphasis>history</emphasis> of the file." 8.6674 msgstr "" 8.6675 8.6676 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6677 -#: ../en/ch04-daily.xml:143 8.6678 -msgid "" 8.6679 -"If you update the working directory to a changeset in which a file that you " 8.6680 -"have removed was still tracked, it will reappear in the working directory, " 8.6681 -"with the contents it had when you committed that changeset. If you then " 8.6682 -"update the working directory to a later changeset, in which the file had been " 8.6683 -"removed, Mercurial will once again remove the file from the working directory." 8.6684 +#: ../en/ch05-daily.xml:144 8.6685 +msgid "" 8.6686 +"If you update the working directory to a changeset that was committed when it " 8.6687 +"was still tracking a file that you later removed, the file will reappear in " 8.6688 +"the working directory, with the contents it had when you committed that " 8.6689 +"changeset. If you then update the working directory to a later changeset, in " 8.6690 +"which the file had been removed, Mercurial will once again remove the file " 8.6691 +"from the working directory." 8.6692 msgstr "" 8.6693 8.6694 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6695 -#: ../en/ch04-daily.xml:153 8.6696 +#: ../en/ch05-daily.xml:155 8.6697 msgid "Missing files" 8.6698 msgstr "丢失的文件" 8.6699 8.6700 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6701 -#: ../en/ch04-daily.xml:155 8.6702 +#: ../en/ch05-daily.xml:157 8.6703 msgid "" 8.6704 "Mercurial considers a file that you have deleted, but not used <command role=" 8.6705 "\"hg-cmd\">hg remove</command> to delete, to be <emphasis>missing</" 8.6706 @@ -5103,7 +6519,7 @@ 8.6707 msgstr "" 8.6708 8.6709 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6710 -#: ../en/ch04-daily.xml:165 8.6711 +#: ../en/ch05-daily.xml:167 8.6712 msgid "" 8.6713 "If your repository contains a file that <command role=\"hg-cmd\">hg status</" 8.6714 "command> reports as missing, and you want the file to stay gone, you can run " 8.6715 @@ -5113,7 +6529,7 @@ 8.6716 msgstr "" 8.6717 8.6718 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6719 -#: ../en/ch04-daily.xml:175 8.6720 +#: ../en/ch05-daily.xml:177 8.6721 msgid "" 8.6722 "On the other hand, if you deleted the missing file by accident, give <command " 8.6723 "role=\"hg-cmd\">hg revert</command> the name of the file to recover. It will " 8.6724 @@ -5121,12 +6537,12 @@ 8.6725 msgstr "" 8.6726 8.6727 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6728 -#: ../en/ch04-daily.xml:184 8.6729 +#: ../en/ch05-daily.xml:186 8.6730 msgid "Aside: why tell Mercurial explicitly to remove a file?" 8.6731 msgstr "旁白: 为什么要明确告诉 Mercurial 删除文件?" 8.6732 8.6733 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6734 -#: ../en/ch04-daily.xml:187 8.6735 +#: ../en/ch05-daily.xml:189 8.6736 msgid "" 8.6737 "You might wonder why Mercurial requires you to explicitly tell it that you " 8.6738 "are deleting a file. Early during the development of Mercurial, it let you " 8.6739 @@ -5137,12 +6553,12 @@ 8.6740 msgstr "" 8.6741 8.6742 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6743 -#: ../en/ch04-daily.xml:198 8.6744 +#: ../en/ch05-daily.xml:200 8.6745 msgid "Useful shorthand&emdash;adding and removing files in one step" 8.6746 msgstr "有用的速记—一个步骤添加和删除文件" 8.6747 8.6748 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6749 -#: ../en/ch04-daily.xml:201 8.6750 +#: ../en/ch05-daily.xml:203 8.6751 msgid "" 8.6752 "Mercurial offers a combination command, <command role=\"hg-cmd\">hg " 8.6753 "addremove</command>, that adds untracked files and marks missing files as " 8.6754 @@ -5150,7 +6566,7 @@ 8.6755 msgstr "" 8.6756 8.6757 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6758 -#: ../en/ch04-daily.xml:207 8.6759 +#: ../en/ch05-daily.xml:209 8.6760 msgid "" 8.6761 "The <command role=\"hg-cmd\">hg commit</command> command also provides a " 8.6762 "<option role=\"hg-opt-commit\">-A</option> option that performs this same add-" 8.6763 @@ -5158,12 +6574,12 @@ 8.6764 msgstr "" 8.6765 8.6766 #. type: Content of: <book><chapter><sect1><title> 8.6767 -#: ../en/ch04-daily.xml:217 8.6768 +#: ../en/ch05-daily.xml:219 8.6769 msgid "Copying files" 8.6770 msgstr "复制文件" 8.6771 8.6772 #. type: Content of: <book><chapter><sect1><para> 8.6773 -#: ../en/ch04-daily.xml:219 8.6774 +#: ../en/ch05-daily.xml:221 8.6775 msgid "" 8.6776 "Mercurial provides a <command role=\"hg-cmd\">hg copy</command> command that " 8.6777 "lets you make a new copy of a file. When you copy a file using this command, " 8.6778 @@ -5173,12 +6589,12 @@ 8.6779 msgstr "" 8.6780 8.6781 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6782 -#: ../en/ch04-daily.xml:227 8.6783 +#: ../en/ch05-daily.xml:229 8.6784 msgid "The results of copying during a merge" 8.6785 msgstr "合并期间的复制结果" 8.6786 8.6787 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6788 -#: ../en/ch04-daily.xml:229 8.6789 +#: ../en/ch05-daily.xml:231 8.6790 msgid "" 8.6791 "What happens during a merge is that changes <quote>follow</quote> a copy. To " 8.6792 "best illustrate what this means, let's create an example. We'll start with " 8.6793 @@ -5186,28 +6602,28 @@ 8.6794 msgstr "" 8.6795 8.6796 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6797 -#: ../en/ch04-daily.xml:236 8.6798 +#: ../en/ch05-daily.xml:238 8.6799 msgid "" 8.6800 "We need to do some work in parallel, so that we'll have something to merge. " 8.6801 "So let's clone our repository." 8.6802 msgstr "" 8.6803 8.6804 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6805 -#: ../en/ch04-daily.xml:242 8.6806 +#: ../en/ch05-daily.xml:244 8.6807 msgid "" 8.6808 "Back in our initial repository, let's use the <command role=\"hg-cmd\">hg " 8.6809 "copy</command> command to make a copy of the first file we created." 8.6810 msgstr "" 8.6811 8.6812 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6813 -#: ../en/ch04-daily.xml:248 8.6814 +#: ../en/ch05-daily.xml:250 8.6815 msgid "" 8.6816 "If we look at the output of the <command role=\"hg-cmd\">hg status</command> " 8.6817 "command afterwards, the copied file looks just like a normal added file." 8.6818 msgstr "" 8.6819 8.6820 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6821 -#: ../en/ch04-daily.xml:254 8.6822 +#: ../en/ch05-daily.xml:256 8.6823 msgid "" 8.6824 "But if we pass the <option role=\"hg-opt-status\">-C</option> option to " 8.6825 "<command role=\"hg-cmd\">hg status</command>, it prints another line of " 8.6826 @@ -5216,14 +6632,14 @@ 8.6827 msgstr "" 8.6828 8.6829 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6830 -#: ../en/ch04-daily.xml:262 8.6831 +#: ../en/ch05-daily.xml:264 8.6832 msgid "" 8.6833 "Now, back in the repository we cloned, let's make a change in parallel. " 8.6834 "We'll add a line of content to the original file that we created." 8.6835 msgstr "" 8.6836 8.6837 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6838 -#: ../en/ch04-daily.xml:268 8.6839 +#: ../en/ch05-daily.xml:270 8.6840 msgid "" 8.6841 "Now we have a modified <filename>file</filename> in this repository. When we " 8.6842 "pull the changes from the first repository, and merge the two heads, " 8.6843 @@ -5232,19 +6648,19 @@ 8.6844 msgstr "" 8.6845 8.6846 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6847 -#: ../en/ch04-daily.xml:278 8.6848 +#: ../en/ch05-daily.xml:280 8.6849 msgid "Why should changes follow copies?" 8.6850 msgstr "为什么复制后需要后续修改?" 8.6851 8.6852 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6853 -#: ../en/ch04-daily.xml:280 8.6854 -msgid "" 8.6855 -"This behaviour, of changes to a file propagating out to copies of the file, " 8.6856 -"might seem esoteric, but in most cases it's highly desirable." 8.6857 -msgstr "" 8.6858 - 8.6859 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6860 -#: ../en/ch04-daily.xml:284 8.6861 +#: ../en/ch05-daily.xml:282 8.6862 +msgid "" 8.6863 +"This behavior&emdash;of changes to a file propagating out to copies of the " 8.6864 +"file&emdash;might seem esoteric, but in most cases it's highly desirable." 8.6865 +msgstr "" 8.6866 + 8.6867 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6868 +#: ../en/ch05-daily.xml:286 8.6869 msgid "" 8.6870 "First of all, remember that this propagation <emphasis>only</emphasis> " 8.6871 "happens when you merge. So if you <command role=\"hg-cmd\">hg copy</command> " 8.6872 @@ -5253,15 +6669,15 @@ 8.6873 msgstr "" 8.6874 8.6875 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6876 -#: ../en/ch04-daily.xml:290 8.6877 +#: ../en/ch05-daily.xml:292 8.6878 msgid "" 8.6879 "The second thing to know is that modifications will only propagate across a " 8.6880 -"copy as long as the repository that you're pulling changes from " 8.6881 -"<emphasis>doesn't know</emphasis> about the copy." 8.6882 -msgstr "" 8.6883 - 8.6884 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6885 -#: ../en/ch04-daily.xml:295 8.6886 +"copy as long as the changeset that you're merging changes from " 8.6887 +"<emphasis>hasn't yet seen</emphasis> the copy." 8.6888 +msgstr "" 8.6889 + 8.6890 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6891 +#: ../en/ch05-daily.xml:297 8.6892 msgid "" 8.6893 "The reason that Mercurial does this is as follows. Let's say I make an " 8.6894 "important bug fix in a source file, and commit my changes. Meanwhile, you've " 8.6895 @@ -5271,16 +6687,16 @@ 8.6896 msgstr "" 8.6897 8.6898 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6899 -#: ../en/ch04-daily.xml:302 8.6900 +#: ../en/ch05-daily.xml:304 8.6901 msgid "" 8.6902 "If you pulled and merged my changes, and Mercurial <emphasis>didn't</" 8.6903 -"emphasis> propagate changes across copies, your source file would now contain " 8.6904 -"the bug, and unless you remembered to propagate the bug fix by hand, the bug " 8.6905 -"would <emphasis>remain</emphasis> in your copy of the file." 8.6906 -msgstr "" 8.6907 - 8.6908 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6909 -#: ../en/ch04-daily.xml:308 8.6910 +"emphasis> propagate changes across copies, your new source file would now " 8.6911 +"contain the bug, and unless you knew to propagate the bug fix by hand, the " 8.6912 +"bug would <emphasis>remain</emphasis> in your copy of the file." 8.6913 +msgstr "" 8.6914 + 8.6915 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6916 +#: ../en/ch05-daily.xml:310 8.6917 msgid "" 8.6918 "By automatically propagating the change that fixed the bug from the original " 8.6919 "file to the copy, Mercurial prevents this class of problem. To my knowledge, " 8.6920 @@ -5289,97 +6705,103 @@ 8.6921 msgstr "" 8.6922 8.6923 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6924 -#: ../en/ch04-daily.xml:314 8.6925 +#: ../en/ch05-daily.xml:316 8.6926 msgid "" 8.6927 "Once your change history has a record that the copy and subsequent merge " 8.6928 "occurred, there's usually no further need to propagate changes from the " 8.6929 "original file to the copied file, and that's why Mercurial only propagates " 8.6930 -"changes across copies until this point, and no further." 8.6931 +"changes across copies at the first merge, and not afterwards." 8.6932 msgstr "" 8.6933 8.6934 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6935 -#: ../en/ch04-daily.xml:322 8.6936 +#: ../en/ch05-daily.xml:324 8.6937 msgid "How to make changes <emphasis>not</emphasis> follow a copy" 8.6938 msgstr "如何让复制后<emphasis>不</emphasis>修改?" 8.6939 8.6940 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6941 -#: ../en/ch04-daily.xml:325 8.6942 +#: ../en/ch05-daily.xml:327 8.6943 msgid "" 8.6944 "If, for some reason, you decide that this business of automatically " 8.6945 "propagating changes across copies is not for you, simply use your system's " 8.6946 "normal file copy command (on Unix-like systems, that's <command>cp</command>) " 8.6947 "to make a copy of a file, then <command role=\"hg-cmd\">hg add</command> the " 8.6948 "new copy by hand. Before you do so, though, please do reread <xref linkend=" 8.6949 -"\"sec:daily:why-copy\"/>, and make an informed decision that this behaviour " 8.6950 -"is not appropriate to your specific case." 8.6951 +"\"sec:daily:why-copy\"/>, and make an informed decision that this behavior is " 8.6952 +"not appropriate to your specific case." 8.6953 msgstr "" 8.6954 8.6955 #. type: Content of: <book><chapter><sect1><sect2><title> 8.6956 -#: ../en/ch04-daily.xml:338 8.6957 -msgid "Behaviour of the <command role=\"hg-cmd\">hg copy</command> command" 8.6958 +#: ../en/ch05-daily.xml:340 8.6959 +msgid "Behavior of the <command role=\"hg-cmd\">hg copy</command> command" 8.6960 msgstr "命令 <command role=\"hg-cmd\">hg copy</command> 的特性" 8.6961 8.6962 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6963 -#: ../en/ch04-daily.xml:341 8.6964 +#: ../en/ch05-daily.xml:343 8.6965 msgid "" 8.6966 "When you use the <command role=\"hg-cmd\">hg copy</command> command, " 8.6967 "Mercurial makes a copy of each source file as it currently stands in the " 8.6968 "working directory. This means that if you make some modifications to a file, " 8.6969 "then <command role=\"hg-cmd\">hg copy</command> it without first having " 8.6970 "committed those changes, the new copy will also contain the modifications you " 8.6971 -"have made up until that point. (I find this behaviour a little " 8.6972 +"have made up until that point. (I find this behavior a little " 8.6973 "counterintuitive, which is why I mention it here.)" 8.6974 msgstr "" 8.6975 8.6976 #. type: Content of: <book><chapter><sect1><sect2><para> 8.6977 -#: ../en/ch04-daily.xml:351 8.6978 +#: ../en/ch05-daily.xml:353 8.6979 msgid "" 8.6980 "The <command role=\"hg-cmd\">hg copy</command> command acts similarly to the " 8.6981 "Unix <command>cp</command> command (you can use the <command role=\"hg-cmd" 8.6982 -"\">hg cp</command> alias if you prefer). The last argument is the " 8.6983 -"<emphasis>destination</emphasis>, and all prior arguments are " 8.6984 -"<emphasis>sources</emphasis>. If you pass it a single file as the source, " 8.6985 -"and the destination does not exist, it creates a new file with that name." 8.6986 -msgstr "" 8.6987 - 8.6988 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.6989 -#: ../en/ch04-daily.xml:362 8.6990 +"\">hg cp</command> alias if you prefer). We must supply two or more " 8.6991 +"arguments, of which the last is treated as the <emphasis>destination</" 8.6992 +"emphasis>, and all others are <emphasis>sources</emphasis>." 8.6993 +msgstr "" 8.6994 + 8.6995 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.6996 +#: ../en/ch05-daily.xml:361 8.6997 +msgid "" 8.6998 +"If you pass <command role=\"hg-cmd\">hg copy</command> a single file as the " 8.6999 +"source, and the destination does not exist, it creates a new file with that " 8.7000 +"name." 8.7001 +msgstr "" 8.7002 + 8.7003 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7004 +#: ../en/ch05-daily.xml:367 8.7005 msgid "" 8.7006 "If the destination is a directory, Mercurial copies its sources into that " 8.7007 "directory." 8.7008 msgstr "" 8.7009 8.7010 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7011 -#: ../en/ch04-daily.xml:367 8.7012 +#: ../en/ch05-daily.xml:372 8.7013 msgid "" 8.7014 "Copying a directory is recursive, and preserves the directory structure of " 8.7015 "the source." 8.7016 msgstr "" 8.7017 8.7018 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7019 -#: ../en/ch04-daily.xml:373 8.7020 +#: ../en/ch05-daily.xml:378 8.7021 msgid "" 8.7022 "If the source and destination are both directories, the source tree is " 8.7023 "recreated in the destination directory." 8.7024 msgstr "" 8.7025 8.7026 -# 8.7027 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.7028 -#: ../en/ch04-daily.xml:378 8.7029 -msgid "" 8.7030 -"As with the <command role=\"hg-cmd\">hg rename</command> command, if you copy " 8.7031 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7032 +#: ../en/ch05-daily.xml:383 8.7033 +msgid "" 8.7034 +"As with the <command role=\"hg-cmd\">hg remove</command> command, if you copy " 8.7035 "a file manually and then want Mercurial to know that you've copied the file, " 8.7036 "simply use the <option role=\"hg-opt-copy\">--after</option> option to " 8.7037 "<command role=\"hg-cmd\">hg copy</command>." 8.7038 msgstr "" 8.7039 8.7040 #. type: Content of: <book><chapter><sect1><title> 8.7041 -#: ../en/ch04-daily.xml:389 8.7042 +#: ../en/ch05-daily.xml:394 8.7043 msgid "Renaming files" 8.7044 msgstr "改名文件" 8.7045 8.7046 #. type: Content of: <book><chapter><sect1><para> 8.7047 -#: ../en/ch04-daily.xml:391 8.7048 +#: ../en/ch05-daily.xml:396 8.7049 msgid "" 8.7050 "It's rather more common to need to rename a file than to make a copy of it. " 8.7051 "The reason I discussed the <command role=\"hg-cmd\">hg copy</command> command " 8.7052 @@ -5389,7 +6811,7 @@ 8.7053 msgstr "" 8.7054 8.7055 #. type: Content of: <book><chapter><sect1><para> 8.7056 -#: ../en/ch04-daily.xml:399 8.7057 +#: ../en/ch05-daily.xml:404 8.7058 msgid "" 8.7059 "When you use the <command role=\"hg-cmd\">hg rename</command> command, " 8.7060 "Mercurial makes a copy of each source file, then deletes it and marks the " 8.7061 @@ -5397,14 +6819,14 @@ 8.7062 msgstr "" 8.7063 8.7064 #. type: Content of: <book><chapter><sect1><para> 8.7065 -#: ../en/ch04-daily.xml:405 8.7066 +#: ../en/ch05-daily.xml:410 8.7067 msgid "" 8.7068 "The <command role=\"hg-cmd\">hg status</command> command shows the newly " 8.7069 "copied file as added, and the copied-from file as removed." 8.7070 msgstr "" 8.7071 8.7072 #. type: Content of: <book><chapter><sect1><para> 8.7073 -#: ../en/ch04-daily.xml:411 8.7074 +#: ../en/ch05-daily.xml:416 8.7075 msgid "" 8.7076 "As with the results of a <command role=\"hg-cmd\">hg copy</command>, we must " 8.7077 "use the <option role=\"hg-opt-status\">-C</option> option to <command role=" 8.7078 @@ -5413,30 +6835,38 @@ 8.7079 msgstr "" 8.7080 8.7081 #. type: Content of: <book><chapter><sect1><para> 8.7082 -#: ../en/ch04-daily.xml:420 8.7083 +#: ../en/ch05-daily.xml:425 8.7084 msgid "" 8.7085 "As with <command role=\"hg-cmd\">hg remove</command> and <command role=\"hg-" 8.7086 "cmd\">hg copy</command>, you can tell Mercurial about a rename after the fact " 8.7087 "using the <option role=\"hg-opt-rename\">--after</option> option. In most " 8.7088 -"other respects, the behaviour of the <command role=\"hg-cmd\">hg rename</" 8.7089 +"other respects, the behavior of the <command role=\"hg-cmd\">hg rename</" 8.7090 "command> command, and the options it accepts, are similar to the <command " 8.7091 "role=\"hg-cmd\">hg copy</command> command." 8.7092 msgstr "" 8.7093 8.7094 +#. type: Content of: <book><chapter><sect1><para> 8.7095 +#: ../en/ch05-daily.xml:434 8.7096 +msgid "" 8.7097 +"If you're familiar with the Unix command line, you'll be glad to know that " 8.7098 +"<command role=\"hg-cmd\">hg rename</command> command can be invoked as " 8.7099 +"<command role=\"hg-cmd\">hg mv</command>." 8.7100 +msgstr "" 8.7101 + 8.7102 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7103 -#: ../en/ch04-daily.xml:430 8.7104 +#: ../en/ch05-daily.xml:440 8.7105 msgid "Renaming files and merging changes" 8.7106 msgstr "改名文件与合并修改" 8.7107 8.7108 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7109 -#: ../en/ch04-daily.xml:432 8.7110 +#: ../en/ch05-daily.xml:442 8.7111 msgid "" 8.7112 "Since Mercurial's rename is implemented as copy-and-remove, the same " 8.7113 "propagation of changes happens when you merge after a rename as after a copy." 8.7114 msgstr "" 8.7115 8.7116 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7117 -#: ../en/ch04-daily.xml:436 8.7118 +#: ../en/ch05-daily.xml:446 8.7119 msgid "" 8.7120 "If I modify a file, and you rename it to a new name, and then we merge our " 8.7121 "respective changes, my modifications to the file under its original name will " 8.7122 @@ -5446,7 +6876,7 @@ 8.7123 msgstr "" 8.7124 8.7125 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7126 -#: ../en/ch04-daily.xml:443 8.7127 +#: ../en/ch05-daily.xml:453 8.7128 msgid "" 8.7129 "Whereas having changes follow a copy is a feature where you can perhaps nod " 8.7130 "and say <quote>yes, that might be useful,</quote> it should be clear that " 8.7131 @@ -5456,12 +6886,12 @@ 8.7132 msgstr "" 8.7133 8.7134 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7135 -#: ../en/ch04-daily.xml:452 8.7136 +#: ../en/ch05-daily.xml:462 8.7137 msgid "Divergent renames and merging" 8.7138 msgstr "改名与合并的分歧" 8.7139 8.7140 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7141 -#: ../en/ch04-daily.xml:454 8.7142 +#: ../en/ch05-daily.xml:464 8.7143 msgid "" 8.7144 "The case of diverging names occurs when two developers start with a " 8.7145 "file&emdash;let's call it <filename>foo</filename>&emdash;in their respective " 8.7146 @@ -5469,45 +6899,47 @@ 8.7147 msgstr "" 8.7148 8.7149 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7150 -#: ../en/ch04-daily.xml:461 8.7151 +#: ../en/ch05-daily.xml:471 8.7152 msgid "Anne renames the file to <filename>bar</filename>." 8.7153 msgstr "" 8.7154 8.7155 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7156 -#: ../en/ch04-daily.xml:465 8.7157 -msgid "Meanwhile, Bob renames it to <filename>quux</filename>." 8.7158 -msgstr "" 8.7159 - 8.7160 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.7161 -#: ../en/ch04-daily.xml:470 8.7162 +#: ../en/ch05-daily.xml:475 8.7163 +msgid "" 8.7164 +"Meanwhile, Bob renames it to <filename>quux</filename>. (Remember that " 8.7165 +"<command role=\"hg-cmd\">hg mv</command> is an alias for <command role=\"hg-" 8.7166 +"cmd\">hg rename</command>.)" 8.7167 +msgstr "" 8.7168 + 8.7169 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7170 +#: ../en/ch05-daily.xml:482 8.7171 msgid "" 8.7172 "I like to think of this as a conflict because each developer has expressed " 8.7173 "different intentions about what the file ought to be named." 8.7174 msgstr "" 8.7175 8.7176 -# 8.7177 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.7178 -#: ../en/ch04-daily.xml:474 8.7179 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7180 +#: ../en/ch05-daily.xml:486 8.7181 msgid "" 8.7182 "What do you think should happen when they merge their work? Mercurial's " 8.7183 -"actual behaviour is that it always preserves <emphasis>both</emphasis> names " 8.7184 +"actual behavior is that it always preserves <emphasis>both</emphasis> names " 8.7185 "when it merges changesets that contain divergent renames." 8.7186 msgstr "" 8.7187 8.7188 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7189 -#: ../en/ch04-daily.xml:481 8.7190 -msgid "" 8.7191 -"Notice that Mercurial does warn about the divergent renames, but it leaves it " 8.7192 +#: ../en/ch05-daily.xml:493 8.7193 +msgid "" 8.7194 +"Notice that while Mercurial warns about the divergent renames, it leaves it " 8.7195 "up to you to do something about the divergence after the merge." 8.7196 msgstr "" 8.7197 8.7198 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7199 -#: ../en/ch04-daily.xml:487 8.7200 +#: ../en/ch05-daily.xml:499 8.7201 msgid "Convergent renames and merging" 8.7202 msgstr "收敛改名与合并" 8.7203 8.7204 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7205 -#: ../en/ch04-daily.xml:489 8.7206 +#: ../en/ch05-daily.xml:501 8.7207 msgid "" 8.7208 "Another kind of rename conflict occurs when two people choose to rename " 8.7209 "different <emphasis>source</emphasis> files to the same " 8.7210 @@ -5516,12 +6948,12 @@ 8.7211 msgstr "" 8.7212 8.7213 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7214 -#: ../en/ch04-daily.xml:497 8.7215 +#: ../en/ch05-daily.xml:509 8.7216 msgid "Other name-related corner cases" 8.7217 msgstr "其它名称相关的角落" 8.7218 8.7219 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7220 -#: ../en/ch04-daily.xml:499 8.7221 +#: ../en/ch05-daily.xml:511 8.7222 msgid "" 8.7223 "Mercurial has a longstanding bug in which it fails to handle a merge where " 8.7224 "one side has a file with a given name, while another has a directory with the " 8.7225 @@ -5530,19 +6962,19 @@ 8.7226 msgstr "" 8.7227 8.7228 #. type: Content of: <book><chapter><sect1><title> 8.7229 -#: ../en/ch04-daily.xml:511 8.7230 +#: ../en/ch05-daily.xml:524 8.7231 msgid "Recovering from mistakes" 8.7232 msgstr "从错误恢复" 8.7233 8.7234 #. type: Content of: <book><chapter><sect1><para> 8.7235 -#: ../en/ch04-daily.xml:513 8.7236 +#: ../en/ch05-daily.xml:526 8.7237 msgid "" 8.7238 "Mercurial has some useful commands that will help you to recover from some " 8.7239 "common mistakes." 8.7240 msgstr "" 8.7241 8.7242 #. type: Content of: <book><chapter><sect1><para> 8.7243 -#: ../en/ch04-daily.xml:516 8.7244 +#: ../en/ch05-daily.xml:529 8.7245 msgid "" 8.7246 "The <command role=\"hg-cmd\">hg revert</command> command lets you undo " 8.7247 "changes that you have made to your working directory. For example, if you " 8.7248 @@ -5554,29 +6986,399 @@ 8.7249 msgstr "" 8.7250 8.7251 #. type: Content of: <book><chapter><sect1><para> 8.7252 -#: ../en/ch04-daily.xml:526 8.7253 -msgid "" 8.7254 -"It's useful to remember that the <command role=\"hg-cmd\">hg revert</command> " 8.7255 -"command is useful for changes that you have not yet committed. Once you've " 8.7256 -"committed a change, if you decide it was a mistake, you can still do " 8.7257 +#: ../en/ch05-daily.xml:539 8.7258 +msgid "" 8.7259 +"It is helpful to remember that the <command role=\"hg-cmd\">hg revert</" 8.7260 +"command> command is useful for changes that you have not yet committed. Once " 8.7261 +"you've committed a change, if you decide it was a mistake, you can still do " 8.7262 "something about it, though your options may be more limited." 8.7263 msgstr "" 8.7264 8.7265 #. type: Content of: <book><chapter><sect1><para> 8.7266 -#: ../en/ch04-daily.xml:532 8.7267 +#: ../en/ch05-daily.xml:546 8.7268 msgid "" 8.7269 "For more information about the <command role=\"hg-cmd\">hg revert</command> " 8.7270 "command, and details about how to deal with changes you have already " 8.7271 "committed, see <xref linkend=\"chap:undo\"/>." 8.7272 msgstr "" 8.7273 8.7274 +#. type: Content of: <book><chapter><sect1><title> 8.7275 +#: ../en/ch05-daily.xml:553 8.7276 +msgid "Dealing with tricky merges" 8.7277 +msgstr "合并的技巧" 8.7278 + 8.7279 +#. type: Content of: <book><chapter><sect1><para> 8.7280 +#: ../en/ch05-daily.xml:555 8.7281 +msgid "" 8.7282 +"In a complicated or large project, it's not unusual for a merge of two " 8.7283 +"changesets to result in some headaches. Suppose there's a big source file " 8.7284 +"that's been extensively edited by each side of a merge: this is almost " 8.7285 +"inevitably going to result in conflicts, some of which can take a few tries " 8.7286 +"to sort out." 8.7287 +msgstr "" 8.7288 + 8.7289 +#. type: Content of: <book><chapter><sect1><para> 8.7290 +#: ../en/ch05-daily.xml:562 8.7291 +msgid "" 8.7292 +"Let's develop a simple case of this and see how to deal with it. We'll start " 8.7293 +"off with a repository containing one file, and clone it twice." 8.7294 +msgstr "" 8.7295 + 8.7296 +#. type: Content of: <book><chapter><sect1><para> 8.7297 +#: ../en/ch05-daily.xml:568 8.7298 +msgid "In one clone, we'll modify the file in one way." 8.7299 +msgstr "" 8.7300 + 8.7301 +#. type: Content of: <book><chapter><sect1><para> 8.7302 +#: ../en/ch05-daily.xml:572 8.7303 +msgid "In another, we'll modify the file differently." 8.7304 +msgstr "" 8.7305 + 8.7306 +#. type: Content of: <book><chapter><sect1><para> 8.7307 +#: ../en/ch05-daily.xml:576 8.7308 +msgid "Next, we'll pull each set of changes into our original repo." 8.7309 +msgstr "" 8.7310 + 8.7311 +#. type: Content of: <book><chapter><sect1><para> 8.7312 +#: ../en/ch05-daily.xml:581 8.7313 +msgid "We expect our repository to now contain two heads." 8.7314 +msgstr "" 8.7315 + 8.7316 +#. type: Content of: <book><chapter><sect1><para> 8.7317 +#: ../en/ch05-daily.xml:585 8.7318 +msgid "" 8.7319 +"Normally, if we run <command role=\"hg-cmd\">hg merge</command> at this " 8.7320 +"point, it will drop us into a GUI that will let us manually resolve the " 8.7321 +"conflicting edits to <filename>myfile.txt</filename>. However, to simplify " 8.7322 +"things for presentation here, we'd like the merge to fail immediately " 8.7323 +"instead. Here's one way we can do so." 8.7324 +msgstr "" 8.7325 + 8.7326 +#. type: Content of: <book><chapter><sect1><para> 8.7327 +#: ../en/ch05-daily.xml:594 8.7328 +msgid "" 8.7329 +"We've told Mercurial's merge machinery to run the command <command>false</" 8.7330 +"command> (which, as we desire, fails immediately) if it detects a merge that " 8.7331 +"it can't sort out automatically." 8.7332 +msgstr "" 8.7333 + 8.7334 +#. type: Content of: <book><chapter><sect1><para> 8.7335 +#: ../en/ch05-daily.xml:599 8.7336 +msgid "" 8.7337 +"If we now fire up <command role=\"hg-cmd\">hg merge</command>, it should " 8.7338 +"grind to a halt and report a failure." 8.7339 +msgstr "" 8.7340 + 8.7341 +#. type: Content of: <book><chapter><sect1><para> 8.7342 +#: ../en/ch05-daily.xml:605 8.7343 +msgid "" 8.7344 +"Even if we don't notice that the merge failed, Mercurial will prevent us from " 8.7345 +"accidentally committing the result of a failed merge." 8.7346 +msgstr "" 8.7347 + 8.7348 +#. type: Content of: <book><chapter><sect1><para> 8.7349 +#: ../en/ch05-daily.xml:611 8.7350 +msgid "" 8.7351 +"When <command role=\"hg-cmd\">hg commit</command> fails in this case, it " 8.7352 +"suggests that we use the unfamiliar <command role=\"hg-cmd\">hg resolve</" 8.7353 +"command> command. As usual, <command role=\"hg-cmd\">hg help resolve</" 8.7354 +"command> will print a helpful synopsis." 8.7355 +msgstr "" 8.7356 + 8.7357 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.7358 +#: ../en/ch05-daily.xml:618 8.7359 +msgid "File resolution states" 8.7360 +msgstr "文件的解决状态" 8.7361 + 8.7362 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7363 +#: ../en/ch05-daily.xml:620 8.7364 +msgid "" 8.7365 +"When a merge occurs, most files will usually remain unmodified. For each " 8.7366 +"file where Mercurial has to do something, it tracks the state of the file." 8.7367 +msgstr "" 8.7368 + 8.7369 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.7370 +#: ../en/ch05-daily.xml:626 8.7371 +msgid "" 8.7372 +"A <emphasis>resolved</emphasis> file has been successfully merged, either " 8.7373 +"automatically by Mercurial or manually with human intervention." 8.7374 +msgstr "" 8.7375 + 8.7376 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.7377 +#: ../en/ch05-daily.xml:631 8.7378 +msgid "" 8.7379 +"An <emphasis>unresolved</emphasis> file was not merged successfully, and " 8.7380 +"needs more attention." 8.7381 +msgstr "" 8.7382 + 8.7383 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7384 +#: ../en/ch05-daily.xml:636 8.7385 +msgid "" 8.7386 +"If Mercurial sees <emphasis>any</emphasis> file in the unresolved state after " 8.7387 +"a merge, it considers the merge to have failed. Fortunately, we do not need " 8.7388 +"to restart the entire merge from scratch." 8.7389 +msgstr "" 8.7390 + 8.7391 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7392 +#: ../en/ch05-daily.xml:641 8.7393 +msgid "" 8.7394 +"The <option role=\"hg-opt-resolve\">--list</option> or <option role=\"hg-opt-" 8.7395 +"resolve\">-l</option> option to <command role=\"hg-cmd\">hg resolve</command> " 8.7396 +"prints out the state of each merged file." 8.7397 +msgstr "" 8.7398 + 8.7399 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7400 +#: ../en/ch05-daily.xml:648 8.7401 +msgid "" 8.7402 +"In the output from <command role=\"hg-cmd\">hg resolve</command>, a resolved " 8.7403 +"file is marked with <literal>R</literal>, while an unresolved file is marked " 8.7404 +"with <literal>U</literal>. If any files are listed with <literal>U</" 8.7405 +"literal>, we know that an attempt to commit the results of the merge will " 8.7406 +"fail." 8.7407 +msgstr "" 8.7408 + 8.7409 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.7410 +#: ../en/ch05-daily.xml:657 8.7411 +msgid "Resolving a file merge" 8.7412 +msgstr "合并文件" 8.7413 + 8.7414 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7415 +#: ../en/ch05-daily.xml:659 8.7416 +msgid "" 8.7417 +"We have several options to move a file from the unresolved into the resolved " 8.7418 +"state. By far the most common is to rerun <command role=\"hg-cmd\">hg " 8.7419 +"resolve</command>. If we pass the names of individual files or directories, " 8.7420 +"it will retry the merges of any unresolved files present in those locations. " 8.7421 +"We can also pass the <option role=\"hg-opt-resolve\">--all</option> or " 8.7422 +"<option role=\"hg-opt-resolve\">-a</option> option, which will retry the " 8.7423 +"merges of <emphasis>all</emphasis> unresolved files." 8.7424 +msgstr "" 8.7425 + 8.7426 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7427 +#: ../en/ch05-daily.xml:669 8.7428 +msgid "" 8.7429 +"Mercurial also lets us modify the resolution state of a file directly. We " 8.7430 +"can manually mark a file as resolved using the <option role=\"hg-opt-resolve" 8.7431 +"\">--mark</option> option, or as unresolved using the <option role=\"hg-opt-" 8.7432 +"resolve\">--unmark</option> option. This allows us to clean up a " 8.7433 +"particularly messy merge by hand, and to keep track of our progress with each " 8.7434 +"file as we go." 8.7435 +msgstr "" 8.7436 + 8.7437 +#. type: Content of: <book><chapter><sect1><title> 8.7438 +#: ../en/ch05-daily.xml:680 8.7439 +msgid "More useful diffs" 8.7440 +msgstr "更有用的差异" 8.7441 + 8.7442 +#. type: Content of: <book><chapter><sect1><para> 8.7443 +#: ../en/ch05-daily.xml:682 8.7444 +msgid "" 8.7445 +"The default output of the <command role=\"hg-cmd\">hg diff</command> command " 8.7446 +"is backwards compatible with the regular <command>diff</command> command, but " 8.7447 +"this has some drawbacks." 8.7448 +msgstr "" 8.7449 + 8.7450 +#. type: Content of: <book><chapter><sect1><para> 8.7451 +#: ../en/ch05-daily.xml:687 8.7452 +msgid "" 8.7453 +"Consider the case where we use <command role=\"hg-cmd\">hg rename</command> " 8.7454 +"to rename a file." 8.7455 +msgstr "" 8.7456 +"设想我们使用 <command role=\"hg-cmd\">hg rename</command> 命令来改名文件。" 8.7457 + 8.7458 +#. type: Content of: <book><chapter><sect1><para> 8.7459 +#: ../en/ch05-daily.xml:692 8.7460 +msgid "" 8.7461 +"The output of <command role=\"hg-cmd\">hg diff</command> above obscures the " 8.7462 +"fact that we simply renamed a file. The <command role=\"hg-cmd\">hg diff</" 8.7463 +"command> command accepts an option, <option>--git</option> or <option>-g</" 8.7464 +"option>, to use a newer diff format that displays such information in a more " 8.7465 +"readable form." 8.7466 +msgstr "" 8.7467 + 8.7468 +#. type: Content of: <book><chapter><sect1><para> 8.7469 +#: ../en/ch05-daily.xml:701 8.7470 +msgid "" 8.7471 +"This option also helps with a case that can otherwise be confusing: a file " 8.7472 +"that appears to be modified according to <command role=\"hg-cmd\">hg status</" 8.7473 +"command>, but for which <command role=\"hg-cmd\">hg diff</command> prints " 8.7474 +"nothing. This situation can arise if we change the file's execute permissions." 8.7475 +msgstr "" 8.7476 + 8.7477 +#. type: Content of: <book><chapter><sect1><para> 8.7478 +#: ../en/ch05-daily.xml:710 8.7479 +msgid "" 8.7480 +"The normal <command>diff</command> command pays no attention to file " 8.7481 +"permissions, which is why <command role=\"hg-cmd\">hg diff</command> prints " 8.7482 +"nothing by default. If we supply it with the <option>-g</option> option, it " 8.7483 +"tells us what really happened." 8.7484 +msgstr "" 8.7485 + 8.7486 +#. type: Content of: <book><chapter><sect1><title> 8.7487 +#: ../en/ch05-daily.xml:720 8.7488 +msgid "Which files to manage, and which to avoid" 8.7489 +msgstr "需要管理哪些文件,应该避免的事情" 8.7490 + 8.7491 +#. type: Content of: <book><chapter><sect1><para> 8.7492 +#: ../en/ch05-daily.xml:722 8.7493 +msgid "" 8.7494 +"Revision control systems are generally best at managing text files that are " 8.7495 +"written by humans, such as source code, where the files do not change much " 8.7496 +"from one revision to the next. Some centralized revision control systems can " 8.7497 +"also deal tolerably well with binary files, such as bitmap images." 8.7498 +msgstr "" 8.7499 + 8.7500 +#. type: Content of: <book><chapter><sect1><para> 8.7501 +#: ../en/ch05-daily.xml:728 8.7502 +msgid "" 8.7503 +"For instance, a game development team will typically manage both its source " 8.7504 +"code and all of its binary assets (e.g. geometry data, textures, map layouts) " 8.7505 +"in a revision control system." 8.7506 +msgstr "" 8.7507 + 8.7508 +#. type: Content of: <book><chapter><sect1><para> 8.7509 +#: ../en/ch05-daily.xml:733 8.7510 +msgid "" 8.7511 +"Because it is usually impossible to merge two conflicting modifications to a " 8.7512 +"binary file, centralized systems often provide a file locking mechanism that " 8.7513 +"allow a user to say <quote>I am the only person who can edit this file</" 8.7514 +"quote>." 8.7515 +msgstr "" 8.7516 + 8.7517 +#. type: Content of: <book><chapter><sect1><para> 8.7518 +#: ../en/ch05-daily.xml:739 8.7519 +msgid "" 8.7520 +"Compared to a centralized system, a distributed revision control system " 8.7521 +"changes some of the factors that guide decisions over which files to manage " 8.7522 +"and how." 8.7523 +msgstr "" 8.7524 + 8.7525 +#. type: Content of: <book><chapter><sect1><para> 8.7526 +#: ../en/ch05-daily.xml:743 8.7527 +msgid "" 8.7528 +"For instance, a distributed revision control system cannot, by its nature, " 8.7529 +"offer a file locking facility. There is thus no built-in mechanism to " 8.7530 +"prevent two people from making conflicting changes to a binary file. If you " 8.7531 +"have a team where several people may be editing binary files frequently, it " 8.7532 +"may not be a good idea to use Mercurial&emdash;or any other distributed " 8.7533 +"revision control system&emdash;to manage those files." 8.7534 +msgstr "" 8.7535 + 8.7536 +#. type: Content of: <book><chapter><sect1><para> 8.7537 +#: ../en/ch05-daily.xml:751 8.7538 +msgid "" 8.7539 +"When storing modifications to a file, Mercurial usually saves only the " 8.7540 +"differences between the previous and current versions of the file. For most " 8.7541 +"text files, this is extremely efficient. However, some files (particularly " 8.7542 +"binary files) are laid out in such a way that even a small change to a file's " 8.7543 +"logical content results in many or most of the bytes inside the file " 8.7544 +"changing. For instance, compressed files are particularly susceptible to " 8.7545 +"this. If the differences between each successive version of a file are always " 8.7546 +"large, Mercurial will not be able to store the file's revision history very " 8.7547 +"efficiently. This can affect both local storage needs and the amount of time " 8.7548 +"it takes to clone a repository." 8.7549 +msgstr "" 8.7550 + 8.7551 +#. type: Content of: <book><chapter><sect1><para> 8.7552 +#: ../en/ch05-daily.xml:764 8.7553 +msgid "" 8.7554 +"To get an idea of how this could affect you in practice, suppose you want to " 8.7555 +"use Mercurial to manage an OpenOffice document. OpenOffice stores documents " 8.7556 +"on disk as compressed zip files. Edit even a single letter of your document " 8.7557 +"in OpenOffice, and almost every byte in the entire file will change when you " 8.7558 +"save it. Now suppose that file is 2MB in size. Because most of the file " 8.7559 +"changes every time you save, Mercurial will have to store all 2MB of the file " 8.7560 +"every time you commit, even though from your perspective, perhaps only a few " 8.7561 +"words are changing each time. A single frequently-edited file that is not " 8.7562 +"friendly to Mercurial's storage assumptions can easily have an outsized " 8.7563 +"effect on the size of the repository." 8.7564 +msgstr "" 8.7565 + 8.7566 +#. type: Content of: <book><chapter><sect1><para> 8.7567 +#: ../en/ch05-daily.xml:777 8.7568 +msgid "" 8.7569 +"Even worse, if both you and someone else edit the OpenOffice document you're " 8.7570 +"working on, there is no useful way to merge your work. In fact, there isn't " 8.7571 +"even a good way to tell what the differences are between your respective " 8.7572 +"changes." 8.7573 +msgstr "" 8.7574 + 8.7575 +#. type: Content of: <book><chapter><sect1><para> 8.7576 +#: ../en/ch05-daily.xml:782 8.7577 +msgid "" 8.7578 +"There are thus a few clear recommendations about specific kinds of files to " 8.7579 +"be very careful with." 8.7580 +msgstr "" 8.7581 + 8.7582 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.7583 +#: ../en/ch05-daily.xml:787 8.7584 +msgid "" 8.7585 +"Files that are very large and incompressible, e.g. ISO CD-ROM images, will by " 8.7586 +"virtue of sheer size make clones over a network very slow." 8.7587 +msgstr "" 8.7588 + 8.7589 +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.7590 +#: ../en/ch05-daily.xml:792 8.7591 +msgid "" 8.7592 +"Files that change a lot from one revision to the next may be expensive to " 8.7593 +"store if you edit them frequently, and conflicts due to concurrent edits may " 8.7594 +"be difficult to resolve." 8.7595 +msgstr "" 8.7596 + 8.7597 +#. type: Content of: <book><chapter><sect1><title> 8.7598 +#: ../en/ch05-daily.xml:801 8.7599 +msgid "Backups and mirroring" 8.7600 +msgstr "备份与镜像" 8.7601 + 8.7602 +#. type: Content of: <book><chapter><sect1><para> 8.7603 +#: ../en/ch05-daily.xml:803 8.7604 +msgid "" 8.7605 +"Since Mercurial maintains a complete copy of history in each clone, everyone " 8.7606 +"who uses Mercurial to collaborate on a project can potentially act as a " 8.7607 +"source of backups in the event of a catastrophe. If a central repository " 8.7608 +"becomes unavailable, you can construct a replacement simply by cloning a copy " 8.7609 +"of the repository from one contributor, and pulling any changes they may not " 8.7610 +"have seen from others." 8.7611 +msgstr "" 8.7612 + 8.7613 +#. type: Content of: <book><chapter><sect1><para> 8.7614 +#: ../en/ch05-daily.xml:811 8.7615 +msgid "" 8.7616 +"It is simple to use Mercurial to perform off-site backups and remote " 8.7617 +"mirrors. Set up a periodic job (e.g. via the <command>cron</command> " 8.7618 +"command) on a remote server to pull changes from your master repositories " 8.7619 +"every hour. This will only be tricky in the unlikely case that the number of " 8.7620 +"master repositories you maintain changes frequently, in which case you'll " 8.7621 +"need to do a little scripting to refresh the list of repositories to back up." 8.7622 +msgstr "" 8.7623 + 8.7624 +#. type: Content of: <book><chapter><sect1><para> 8.7625 +#: ../en/ch05-daily.xml:820 8.7626 +msgid "" 8.7627 +"If you perform traditional backups of your master repositories to tape or " 8.7628 +"disk, and you want to back up a repository named <filename>myrepo</filename>, " 8.7629 +"use <command>hg clone -U myrepo myrepo.bak</command> to create a clone of " 8.7630 +"<filename>myrepo</filename> before you start your backups. The <option>-U</" 8.7631 +"option> option doesn't check out a working directory after the clone " 8.7632 +"completes, since that would be superfluous and make the backup take longer." 8.7633 +msgstr "" 8.7634 + 8.7635 +#. type: Content of: <book><chapter><sect1><para> 8.7636 +#: ../en/ch05-daily.xml:829 8.7637 +msgid "" 8.7638 +"If you then back up <filename>myrepo.bak</filename> instead of " 8.7639 +"<filename>myrepo</filename>, you will be guaranteed to have a consistent " 8.7640 +"snapshot of your repository that won't be pushed to by an insomniac developer " 8.7641 +"in mid-backup." 8.7642 +msgstr "" 8.7643 + 8.7644 #. type: Content of: <book><chapter><title> 8.7645 -#: ../en/ch05-collab.xml:5 8.7646 +#: ../en/ch06-collab.xml:5 8.7647 msgid "Collaborating with other people" 8.7648 msgstr "团体协作" 8.7649 8.7650 #. type: Content of: <book><chapter><para> 8.7651 -#: ../en/ch05-collab.xml:7 8.7652 +#: ../en/ch06-collab.xml:7 8.7653 msgid "" 8.7654 "As a completely decentralised tool, Mercurial doesn't impose any policy on " 8.7655 "how people ought to work with each other. However, if you're new to " 8.7656 @@ -5585,32 +7387,33 @@ 8.7657 msgstr "" 8.7658 8.7659 #. type: Content of: <book><chapter><sect1><title> 8.7660 -#: ../en/ch05-collab.xml:14 8.7661 +#: ../en/ch06-collab.xml:14 8.7662 msgid "Mercurial's web interface" 8.7663 msgstr "Mercurial 的 web 接口" 8.7664 8.7665 #. type: Content of: <book><chapter><sect1><para> 8.7666 -#: ../en/ch05-collab.xml:16 8.7667 +#: ../en/ch06-collab.xml:16 8.7668 msgid "" 8.7669 "Mercurial has a powerful web interface that provides several useful " 8.7670 "capabilities." 8.7671 msgstr "" 8.7672 8.7673 #. type: Content of: <book><chapter><sect1><para> 8.7674 -#: ../en/ch05-collab.xml:19 8.7675 +#: ../en/ch06-collab.xml:19 8.7676 msgid "" 8.7677 "For interactive use, the web interface lets you browse a single repository or " 8.7678 "a collection of repositories. You can view the history of a repository, " 8.7679 "examine each change (comments and diffs), and view the contents of each " 8.7680 -"directory and file." 8.7681 -msgstr "" 8.7682 - 8.7683 -#. type: Content of: <book><chapter><sect1><para> 8.7684 -#: ../en/ch05-collab.xml:24 8.7685 -msgid "" 8.7686 -"Also for human consumption, the web interface provides an RSS feed of the " 8.7687 -"changes in a repository. This lets you <quote>subscribe</quote> to a " 8.7688 -"repository using your favourite feed reader, and be automatically notified of " 8.7689 +"directory and file. You can even get a view of history that gives a " 8.7690 +"graphical view of the relationships between individual changes and merges." 8.7691 +msgstr "" 8.7692 + 8.7693 +#. type: Content of: <book><chapter><sect1><para> 8.7694 +#: ../en/ch06-collab.xml:26 8.7695 +msgid "" 8.7696 +"Also for human consumption, the web interface provides Atom and RSS feeds of " 8.7697 +"the changes in a repository. This lets you <quote>subscribe</quote> to a " 8.7698 +"repository using your favorite feed reader, and be automatically notified of " 8.7699 "activity in that repository as soon as it happens. I find this capability " 8.7700 "much more convenient than the model of subscribing to a mailing list to which " 8.7701 "notifications are sent, as it requires no additional configuration on the " 8.7702 @@ -5618,7 +7421,7 @@ 8.7703 msgstr "" 8.7704 8.7705 #. type: Content of: <book><chapter><sect1><para> 8.7706 -#: ../en/ch05-collab.xml:34 8.7707 +#: ../en/ch06-collab.xml:36 8.7708 msgid "" 8.7709 "The web interface also lets remote users clone a repository, pull changes " 8.7710 "from it, and (when the server is configured to permit it) push changes back " 8.7711 @@ -5627,35 +7430,57 @@ 8.7712 msgstr "" 8.7713 8.7714 #. type: Content of: <book><chapter><sect1><para> 8.7715 -#: ../en/ch05-collab.xml:40 8.7716 +#: ../en/ch06-collab.xml:42 8.7717 msgid "" 8.7718 "The easiest way to get started with the web interface is to use your web " 8.7719 "browser to visit an existing repository, such as the master Mercurial " 8.7720 -"repository at <ulink url=\"http://www.selenic.com/repo/hg?style=gitweb" 8.7721 -"\">http://www.selenic.com/repo/hg?style=gitweb</ulink>." 8.7722 -msgstr "" 8.7723 - 8.7724 -#. type: Content of: <book><chapter><sect1><para> 8.7725 -#: ../en/ch05-collab.xml:45 8.7726 +"repository at <ulink url=\"http://www.selenic.com/repo/hg\">http://www." 8.7727 +"selenic.com/repo/hg</ulink>." 8.7728 +msgstr "" 8.7729 + 8.7730 +#. type: Content of: <book><chapter><sect1><para> 8.7731 +#: ../en/ch06-collab.xml:47 8.7732 msgid "" 8.7733 "If you're interested in providing a web interface to your own repositories, " 8.7734 -"Mercurial provides two ways to do this. The first is using the <command role=" 8.7735 -"\"hg-cmd\">hg serve</command> command, which is best suited to short-term " 8.7736 -"<quote>lightweight</quote> serving. See <xref linkend=\"sec:collab:serve\"/> " 8.7737 -"below for details of how to use this command. If you have a long-lived " 8.7738 -"repository that you'd like to make permanently available, Mercurial has built-" 8.7739 -"in support for the CGI (Common Gateway Interface) standard, which all common " 8.7740 -"web servers support. See <xref linkend=\"sec:collab:cgi\"/> for details of " 8.7741 -"CGI configuration." 8.7742 +"there are several good ways to do this." 8.7743 +msgstr "" 8.7744 + 8.7745 +#. type: Content of: <book><chapter><sect1><para> 8.7746 +#: ../en/ch06-collab.xml:51 8.7747 +msgid "" 8.7748 +"The easiest and fastest way to get started in an informal environment is to " 8.7749 +"use the <command role=\"hg-cmd\">hg serve</command> command, which is best " 8.7750 +"suited to short-term <quote>lightweight</quote> serving. See <xref linkend=" 8.7751 +"\"sec:collab:serve\"/> below for details of how to use this command." 8.7752 +msgstr "" 8.7753 + 8.7754 +#. type: Content of: <book><chapter><sect1><para> 8.7755 +#: ../en/ch06-collab.xml:58 8.7756 +msgid "" 8.7757 +"For longer-lived repositories that you'd like to have permanently available, " 8.7758 +"there are several public hosting services available. Some are free to open " 8.7759 +"source projects, while others offer paid commercial hosting. An up-to-date " 8.7760 +"list is available at <ulink url=\"http://www.selenic.com/mercurial/wiki/index." 8.7761 +"cgi/MercurialHosting\">http://www.selenic.com/mercurial/wiki/index.cgi/" 8.7762 +"MercurialHosting</ulink>." 8.7763 +msgstr "" 8.7764 + 8.7765 +#. type: Content of: <book><chapter><sect1><para> 8.7766 +#: ../en/ch06-collab.xml:65 8.7767 +msgid "" 8.7768 +"If you would prefer to host your own repositories, Mercurial has built-in " 8.7769 +"support for several popular hosting technologies, most notably CGI (Common " 8.7770 +"Gateway Interface), and WSGI (Web Services Gateway Interface). See <xref " 8.7771 +"linkend=\"sec:collab:cgi\"/> for details of CGI and WSGI configuration." 8.7772 msgstr "" 8.7773 8.7774 #. type: Content of: <book><chapter><sect1><title> 8.7775 -#: ../en/ch05-collab.xml:60 8.7776 +#: ../en/ch06-collab.xml:74 8.7777 msgid "Collaboration models" 8.7778 msgstr "协作模型" 8.7779 8.7780 #. type: Content of: <book><chapter><sect1><para> 8.7781 -#: ../en/ch05-collab.xml:62 8.7782 +#: ../en/ch06-collab.xml:76 8.7783 msgid "" 8.7784 "With a suitably flexible tool, making decisions about workflow is much more " 8.7785 "of a social engineering challenge than a technical one. Mercurial imposes few " 8.7786 @@ -5665,12 +7490,12 @@ 8.7787 msgstr "" 8.7788 8.7789 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7790 -#: ../en/ch05-collab.xml:70 8.7791 +#: ../en/ch06-collab.xml:84 8.7792 msgid "Factors to keep in mind" 8.7793 msgstr "要牢记的因素" 8.7794 8.7795 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7796 -#: ../en/ch05-collab.xml:72 8.7797 +#: ../en/ch06-collab.xml:86 8.7798 msgid "" 8.7799 "The most important aspect of any model that you must keep in mind is how well " 8.7800 "it matches the needs and capabilities of the people who will be using it. " 8.7801 @@ -5679,7 +7504,7 @@ 8.7802 msgstr "" 8.7803 8.7804 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7805 -#: ../en/ch05-collab.xml:78 8.7806 +#: ../en/ch06-collab.xml:92 8.7807 msgid "" 8.7808 "I once put together a workflow model that seemed to make perfect sense to me, " 8.7809 "but that caused a considerable amount of consternation and strife within my " 8.7810 @@ -5692,7 +7517,7 @@ 8.7811 msgstr "" 8.7812 8.7813 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7814 -#: ../en/ch05-collab.xml:88 8.7815 +#: ../en/ch06-collab.xml:102 8.7816 msgid "" 8.7817 "Don't sweep foreseeable social or technical problems under the rug. Whatever " 8.7818 "scheme you put into effect, you should plan for mistakes and problem " 8.7819 @@ -5706,12 +7531,12 @@ 8.7820 msgstr "" 8.7821 8.7822 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7823 -#: ../en/ch05-collab.xml:102 8.7824 +#: ../en/ch06-collab.xml:116 8.7825 msgid "Informal anarchy" 8.7826 msgstr "无政府状态" 8.7827 8.7828 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7829 -#: ../en/ch05-collab.xml:104 8.7830 +#: ../en/ch06-collab.xml:118 8.7831 msgid "" 8.7832 "I wouldn't suggest an <quote>anything goes</quote> approach as something " 8.7833 "sustainable, but it's a model that's easy to grasp, and it works perfectly " 8.7834 @@ -5719,11 +7544,11 @@ 8.7835 msgstr "" 8.7836 8.7837 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7838 -#: ../en/ch05-collab.xml:109 8.7839 +#: ../en/ch06-collab.xml:123 8.7840 msgid "" 8.7841 "As one example, many projects have a loose-knit group of collaborators who " 8.7842 "rarely physically meet each other. Some groups like to overcome the " 8.7843 -"isolation of working at a distance by organising occasional <quote>sprints</" 8.7844 +"isolation of working at a distance by organizing occasional <quote>sprints</" 8.7845 "quote>. In a sprint, a number of people get together in a single location (a " 8.7846 "company's conference room, a hotel meeting room, that kind of place) and " 8.7847 "spend several days more or less locked in there, hacking intensely on a " 8.7848 @@ -5731,37 +7556,38 @@ 8.7849 msgstr "" 8.7850 8.7851 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7852 -#: ../en/ch05-collab.xml:118 8.7853 -msgid "" 8.7854 -"A sprint is the perfect place to use the <command role=\"hg-cmd\">hg serve</" 8.7855 -"command> command, since <command role=\"hg-cmd\">hg serve</command> does not " 8.7856 -"require any fancy server infrastructure. You can get started with <command " 8.7857 -"role=\"hg-cmd\">hg serve</command> in moments, by reading <xref linkend=\"sec:" 8.7858 -"collab:serve\"/> below. Then simply tell the person next to you that you're " 8.7859 -"running a server, send the URL to them in an instant message, and you " 8.7860 -"immediately have a quick-turnaround way to work together. They can type your " 8.7861 -"URL into their web browser and quickly review your changes; or they can pull " 8.7862 -"a bugfix from you and verify it; or they can clone a branch containing a new " 8.7863 -"feature and try it out." 8.7864 -msgstr "" 8.7865 - 8.7866 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.7867 -#: ../en/ch05-collab.xml:132 8.7868 +#: ../en/ch06-collab.xml:132 8.7869 +msgid "" 8.7870 +"A sprint or a hacking session in a coffee shop are the perfect places to use " 8.7871 +"the <command role=\"hg-cmd\">hg serve</command> command, since <command role=" 8.7872 +"\"hg-cmd\">hg serve</command> does not require any fancy server " 8.7873 +"infrastructure. You can get started with <command role=\"hg-cmd\">hg serve</" 8.7874 +"command> in moments, by reading <xref linkend=\"sec:collab:serve\"/> below. " 8.7875 +"Then simply tell the person next to you that you're running a server, send " 8.7876 +"the URL to them in an instant message, and you immediately have a quick-" 8.7877 +"turnaround way to work together. They can type your URL into their web " 8.7878 +"browser and quickly review your changes; or they can pull a bugfix from you " 8.7879 +"and verify it; or they can clone a branch containing a new feature and try it " 8.7880 +"out." 8.7881 +msgstr "" 8.7882 + 8.7883 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7884 +#: ../en/ch06-collab.xml:146 8.7885 msgid "" 8.7886 "The charm, and the problem, with doing things in an ad hoc fashion like this " 8.7887 "is that only people who know about your changes, and where they are, can see " 8.7888 "them. Such an informal approach simply doesn't scale beyond a handful " 8.7889 -"people, because each individual needs to know about $n$ different " 8.7890 -"repositories to pull from." 8.7891 +"people, because each individual needs to know about <emphasis>n</emphasis> " 8.7892 +"different repositories to pull from." 8.7893 msgstr "" 8.7894 8.7895 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7896 -#: ../en/ch05-collab.xml:141 8.7897 +#: ../en/ch06-collab.xml:156 8.7898 msgid "A single central repository" 8.7899 msgstr "单一中央版本库" 8.7900 8.7901 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7902 -#: ../en/ch05-collab.xml:143 8.7903 +#: ../en/ch06-collab.xml:158 8.7904 msgid "" 8.7905 "For smaller projects migrating from a centralised revision control tool, " 8.7906 "perhaps the easiest way to get started is to have changes flow through a " 8.7907 @@ -5770,7 +7596,7 @@ 8.7908 msgstr "" 8.7909 8.7910 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7911 -#: ../en/ch05-collab.xml:149 8.7912 +#: ../en/ch06-collab.xml:164 8.7913 msgid "" 8.7914 "Contributors start by cloning a copy of this repository. They can pull " 8.7915 "changes from it whenever they need to, and some (perhaps all) developers have " 8.7916 @@ -5779,7 +7605,7 @@ 8.7917 msgstr "" 8.7918 8.7919 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7920 -#: ../en/ch05-collab.xml:154 8.7921 +#: ../en/ch06-collab.xml:169 8.7922 msgid "" 8.7923 "Under this model, it can still often make sense for people to pull changes " 8.7924 "directly from each other, without going through the central repository. " 8.7925 @@ -5792,24 +7618,55 @@ 8.7926 msgstr "" 8.7927 8.7928 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7929 -#: ../en/ch05-collab.xml:165 8.7930 -msgid "" 8.7931 -"In this kind of scenario, people usually use the <command>ssh</command> " 8.7932 -"protocol to securely push changes to the central repository, as documented in " 8.7933 -"<xref linkend=\"sec:collab:ssh\"/>. It's also usual to publish a read-only " 8.7934 -"copy of the repository over HTTP using CGI, as in <xref linkend=\"sec:collab:" 8.7935 -"cgi\"/>. Publishing over HTTP satisfies the needs of people who don't have " 8.7936 -"push access, and those who want to use web browsers to browse the " 8.7937 -"repository's history." 8.7938 +#: ../en/ch06-collab.xml:180 8.7939 +msgid "" 8.7940 +"If a team is hosting its own repository in this kind of scenario, people will " 8.7941 +"usually use the <command>ssh</command> protocol to securely push changes to " 8.7942 +"the central repository, as documented in <xref linkend=\"sec:collab:ssh\"/>. " 8.7943 +"It's also usual to publish a read-only copy of the repository over HTTP, as " 8.7944 +"in <xref linkend=\"sec:collab:cgi\"/>. Publishing over HTTP satisfies the " 8.7945 +"needs of people who don't have push access, and those who want to use web " 8.7946 +"browsers to browse the repository's history." 8.7947 msgstr "" 8.7948 8.7949 #. type: Content of: <book><chapter><sect1><sect2><title> 8.7950 -#: ../en/ch05-collab.xml:177 8.7951 +#: ../en/ch06-collab.xml:193 8.7952 +msgid "A hosted central repository" 8.7953 +msgstr "托管的中央版本库" 8.7954 + 8.7955 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7956 +#: ../en/ch06-collab.xml:195 8.7957 +msgid "" 8.7958 +"A wonderful thing about public hosting services like <ulink url=\"http://" 8.7959 +"bitbucket.org/\">Bitbucket</ulink> is that not only do they handle the fiddly " 8.7960 +"server configuration details, such as user accounts, authentication, and " 8.7961 +"secure wire protocols, they provide additional infrastructure to make this " 8.7962 +"model work well." 8.7963 +msgstr "" 8.7964 + 8.7965 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7966 +#: ../en/ch06-collab.xml:202 8.7967 +msgid "" 8.7968 +"For instance, a well-engineered hosting service will let people clone their " 8.7969 +"own copies of a repository with a single click. This lets people work in " 8.7970 +"separate spaces and share their changes when they're ready." 8.7971 +msgstr "" 8.7972 + 8.7973 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.7974 +#: ../en/ch06-collab.xml:207 8.7975 +msgid "" 8.7976 +"In addition, a good hosting service will let people communicate with each " 8.7977 +"other, for instance to say <quote>there are changes ready for you to review " 8.7978 +"in this tree</quote>." 8.7979 +msgstr "" 8.7980 + 8.7981 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.7982 +#: ../en/ch06-collab.xml:214 8.7983 msgid "Working with multiple branches" 8.7984 msgstr "使用多个分支工作" 8.7985 8.7986 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7987 -#: ../en/ch05-collab.xml:179 8.7988 +#: ../en/ch06-collab.xml:216 8.7989 msgid "" 8.7990 "Projects of any significant size naturally tend to make progress on several " 8.7991 "fronts simultaneously. In the case of software, it's common for a project to " 8.7992 @@ -5823,30 +7680,30 @@ 8.7993 msgstr "" 8.7994 8.7995 #. type: Content of: <book><chapter><sect1><sect2><para> 8.7996 -#: ../en/ch05-collab.xml:192 8.7997 +#: ../en/ch06-collab.xml:229 8.7998 msgid "" 8.7999 "Mercurial is particularly well suited to managing a number of simultaneous, " 8.8000 "but not identical, branches. Each <quote>development direction</quote> can " 8.8001 "live in its own central repository, and you can merge changes from one to " 8.8002 "another as the need arises. Because repositories are independent of each " 8.8003 "other, unstable changes in a development branch will never affect a stable " 8.8004 -"branch unless someone explicitly merges those changes in." 8.8005 -msgstr "" 8.8006 - 8.8007 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8008 -#: ../en/ch05-collab.xml:201 8.8009 +"branch unless someone explicitly merges those changes into the stable branch." 8.8010 +msgstr "" 8.8011 + 8.8012 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8013 +#: ../en/ch06-collab.xml:238 8.8014 msgid "" 8.8015 "Here's an example of how this can work in practice. Let's say you have one " 8.8016 "<quote>main branch</quote> on a central server." 8.8017 msgstr "" 8.8018 8.8019 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8020 -#: ../en/ch05-collab.xml:207 8.8021 +#: ../en/ch06-collab.xml:244 8.8022 msgid "People clone it, make changes locally, test them, and push them back." 8.8023 msgstr "" 8.8024 8.8025 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8026 -#: ../en/ch05-collab.xml:210 8.8027 +#: ../en/ch06-collab.xml:247 8.8028 msgid "" 8.8029 "Once the main branch reaches a release milestone, you can use the <command " 8.8030 "role=\"hg-cmd\">hg tag</command> command to give a permanent name to the " 8.8031 @@ -5854,12 +7711,12 @@ 8.8032 msgstr "" 8.8033 8.8034 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8035 -#: ../en/ch05-collab.xml:216 8.8036 +#: ../en/ch06-collab.xml:253 8.8037 msgid "Let's say some ongoing development occurs on the main branch." 8.8038 msgstr "" 8.8039 8.8040 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8041 -#: ../en/ch05-collab.xml:221 8.8042 +#: ../en/ch06-collab.xml:258 8.8043 msgid "" 8.8044 "Using the tag that was recorded at the milestone, people who clone that " 8.8045 "repository at any time in the future can use <command role=\"hg-cmd\">hg " 8.8046 @@ -5867,57 +7724,57 @@ 8.8047 "when that tagged revision was committed." 8.8048 msgstr "" 8.8049 8.8050 -# 8.8051 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8052 -#: ../en/ch05-collab.xml:229 8.8053 -msgid "" 8.8054 -"In addition, immediately after the main branch is tagged, someone can then " 8.8055 -"clone the main branch on the server to a new <quote>stable</quote> branch, " 8.8056 -"also on the server." 8.8057 -msgstr "" 8.8058 - 8.8059 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8060 -#: ../en/ch05-collab.xml:235 8.8061 -msgid "" 8.8062 -"Someone who needs to make a change to the stable branch can then clone " 8.8063 -"<emphasis>that</emphasis> repository, make their changes, commit, and push " 8.8064 -"their changes back there." 8.8065 -msgstr "" 8.8066 - 8.8067 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8068 -#: ../en/ch05-collab.xml:241 8.8069 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8070 +#: ../en/ch06-collab.xml:266 8.8071 +msgid "" 8.8072 +"In addition, immediately after the main branch is tagged, we can then clone " 8.8073 +"the main branch on the server to a new <quote>stable</quote> branch, also on " 8.8074 +"the server." 8.8075 +msgstr "" 8.8076 + 8.8077 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8078 +#: ../en/ch06-collab.xml:272 8.8079 +msgid "" 8.8080 +"If we need to make a change to the stable branch, we can then clone " 8.8081 +"<emphasis>that</emphasis> repository, make our changes, commit, and push our " 8.8082 +"changes back there." 8.8083 +msgstr "" 8.8084 + 8.8085 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8086 +#: ../en/ch06-collab.xml:279 8.8087 msgid "" 8.8088 "Because Mercurial repositories are independent, and Mercurial doesn't move " 8.8089 "changes around automatically, the stable and main branches are " 8.8090 -"<emphasis>isolated</emphasis> from each other. The changes that you made on " 8.8091 +"<emphasis>isolated</emphasis> from each other. The changes that we made on " 8.8092 "the main branch don't <quote>leak</quote> to the stable branch, and vice " 8.8093 "versa." 8.8094 msgstr "" 8.8095 8.8096 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8097 -#: ../en/ch05-collab.xml:248 8.8098 -msgid "" 8.8099 -"You'll often want all of your bugfixes on the stable branch to show up on the " 8.8100 -"main branch, too. Rather than rewrite a bugfix on the main branch, you can " 8.8101 +#: ../en/ch06-collab.xml:286 8.8102 +msgid "" 8.8103 +"We'll often want all of our bugfixes on the stable branch to show up on the " 8.8104 +"main branch, too. Rather than rewrite a bugfix on the main branch, we can " 8.8105 "simply pull and merge changes from the stable to the main branch, and " 8.8106 -"Mercurial will bring those bugfixes in for you." 8.8107 -msgstr "" 8.8108 - 8.8109 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8110 -#: ../en/ch05-collab.xml:256 8.8111 +"Mercurial will bring those bugfixes in for us." 8.8112 +msgstr "" 8.8113 + 8.8114 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8115 +#: ../en/ch06-collab.xml:294 8.8116 msgid "" 8.8117 "The main branch will still contain changes that are not on the stable branch, " 8.8118 "but it will also contain all of the bugfixes from the stable branch. The " 8.8119 -"stable branch remains unaffected by these changes." 8.8120 +"stable branch remains unaffected by these changes, since changes are only " 8.8121 +"flowing from the stable to the main branch, and not the other way." 8.8122 msgstr "" 8.8123 8.8124 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.8125 -#: ../en/ch05-collab.xml:263 ../en/ch05-collab.xml:273 8.8126 +#: ../en/ch06-collab.xml:303 ../en/ch06-collab.xml:313 8.8127 msgid "Feature branches" 8.8128 msgstr "特性分支" 8.8129 8.8130 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8131 -#: ../en/ch05-collab.xml:265 8.8132 +#: ../en/ch06-collab.xml:305 8.8133 msgid "" 8.8134 "For larger projects, an effective way to manage change is to break up a team " 8.8135 "into smaller groups. Each group has a shared branch of its own, cloned from " 8.8136 @@ -5927,14 +7784,14 @@ 8.8137 msgstr "" 8.8138 8.8139 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.8140 -#: ../en/ch05-collab.xml:275 8.8141 +#: ../en/ch06-collab.xml:315 8.8142 msgid "" 8.8143 "<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/" 8.8144 "></imageobject>" 8.8145 msgstr "" 8.8146 8.8147 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8148 -#: ../en/ch05-collab.xml:280 8.8149 +#: ../en/ch06-collab.xml:320 8.8150 msgid "" 8.8151 "When a particular feature is deemed to be in suitable shape, someone on that " 8.8152 "feature team pulls and merges from the master branch into the feature branch, " 8.8153 @@ -5942,20 +7799,20 @@ 8.8154 msgstr "" 8.8155 8.8156 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8157 -#: ../en/ch05-collab.xml:287 8.8158 +#: ../en/ch06-collab.xml:327 8.8159 msgid "The release train" 8.8160 msgstr "发布列车" 8.8161 8.8162 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8163 -#: ../en/ch05-collab.xml:289 8.8164 -msgid "" 8.8165 -"Some projects are organised on a <quote>train</quote> basis: a release is " 8.8166 +#: ../en/ch06-collab.xml:329 8.8167 +msgid "" 8.8168 +"Some projects are organized on a <quote>train</quote> basis: a release is " 8.8169 "scheduled to happen every few months, and whatever features are ready when " 8.8170 "the <quote>train</quote> is ready to leave are allowed in." 8.8171 msgstr "" 8.8172 8.8173 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8174 -#: ../en/ch05-collab.xml:294 8.8175 +#: ../en/ch06-collab.xml:334 8.8176 msgid "" 8.8177 "This model resembles working with feature branches. The difference is that " 8.8178 "when a feature branch misses a train, someone on the feature team pulls and " 8.8179 @@ -5965,12 +7822,12 @@ 8.8180 msgstr "" 8.8181 8.8182 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8183 -#: ../en/ch05-collab.xml:303 8.8184 +#: ../en/ch06-collab.xml:343 8.8185 msgid "The Linux kernel model" 8.8186 msgstr "Linux 内核模型" 8.8187 8.8188 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8189 -#: ../en/ch05-collab.xml:305 8.8190 +#: ../en/ch06-collab.xml:345 8.8191 msgid "" 8.8192 "The development of the Linux kernel has a shallow hierarchical structure, " 8.8193 "surrounded by a cloud of apparent chaos. Because most Linux developers use " 8.8194 @@ -5980,7 +7837,7 @@ 8.8195 msgstr "" 8.8196 8.8197 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8198 -#: ../en/ch05-collab.xml:313 8.8199 +#: ../en/ch06-collab.xml:353 8.8200 msgid "" 8.8201 "At the center of the community sits Linus Torvalds, the creator of Linux. He " 8.8202 "publishes a single source repository that is considered the " 8.8203 @@ -5990,7 +7847,7 @@ 8.8204 msgstr "" 8.8205 8.8206 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8207 -#: ../en/ch05-collab.xml:320 8.8208 +#: ../en/ch06-collab.xml:360 8.8209 msgid "" 8.8210 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, " 8.8211 "he pulls whatever changes they publish, in most cases without even reviewing " 8.8212 @@ -6004,7 +7861,7 @@ 8.8213 msgstr "" 8.8214 8.8215 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8216 -#: ../en/ch05-collab.xml:332 8.8217 +#: ../en/ch06-collab.xml:372 8.8218 msgid "" 8.8219 "Individual lieutenants have their own approaches to reviewing, accepting, and " 8.8220 "publishing changes; and for deciding when to feed them to Linus. In " 8.8221 @@ -6017,7 +7874,7 @@ 8.8222 msgstr "" 8.8223 8.8224 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8225 -#: ../en/ch05-collab.xml:343 8.8226 +#: ../en/ch06-collab.xml:383 8.8227 msgid "" 8.8228 "This model has two notable features. The first is that it's <quote>pull " 8.8229 "only</quote>. You have to ask, convince, or beg another developer to take a " 8.8230 @@ -6027,7 +7884,7 @@ 8.8231 msgstr "" 8.8232 8.8233 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8234 -#: ../en/ch05-collab.xml:350 8.8235 +#: ../en/ch06-collab.xml:390 8.8236 msgid "" 8.8237 "The second is that it's based on reputation and acclaim. If you're an " 8.8238 "unknown, Linus will probably ignore changes from you without even " 8.8239 @@ -6041,7 +7898,7 @@ 8.8240 msgstr "" 8.8241 8.8242 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8243 -#: ../en/ch05-collab.xml:361 8.8244 +#: ../en/ch06-collab.xml:401 8.8245 msgid "" 8.8246 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" 8.8247 "quote> boundaries. If you're a respected but specialised storage hacker, and " 8.8248 @@ -6050,7 +7907,7 @@ 8.8249 msgstr "" 8.8250 8.8251 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8252 -#: ../en/ch05-collab.xml:368 8.8253 +#: ../en/ch06-collab.xml:408 8.8254 msgid "" 8.8255 "To people who come from more orderly project backgrounds, the comparatively " 8.8256 "chaotic Linux kernel development process often seems completely insane. It's " 8.8257 @@ -6060,12 +7917,12 @@ 8.8258 msgstr "" 8.8259 8.8260 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8261 -#: ../en/ch05-collab.xml:378 8.8262 +#: ../en/ch06-collab.xml:418 8.8263 msgid "Pull-only versus shared-push collaboration" 8.8264 msgstr "只读与共享写协作" 8.8265 8.8266 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8267 -#: ../en/ch05-collab.xml:380 8.8268 +#: ../en/ch06-collab.xml:420 8.8269 msgid "" 8.8270 "A perpetual source of heat in the open source community is whether a " 8.8271 "development model in which people only ever pull changes from others is " 8.8272 @@ -6074,7 +7931,7 @@ 8.8273 msgstr "" 8.8274 8.8275 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8276 -#: ../en/ch05-collab.xml:386 8.8277 +#: ../en/ch06-collab.xml:426 8.8278 msgid "" 8.8279 "Typically, the backers of the shared-push model use tools that actively " 8.8280 "enforce this approach. If you're using a centralised revision control tool " 8.8281 @@ -6085,21 +7942,20 @@ 8.8282 msgstr "" 8.8283 8.8284 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8285 -#: ../en/ch05-collab.xml:394 8.8286 -msgid "" 8.8287 -"A good distributed revision control tool, such as Mercurial, will support " 8.8288 -"both models. You and your collaborators can then structure how you work " 8.8289 -"together based on your own needs and preferences, not on what contortions " 8.8290 -"your tools force you into." 8.8291 +#: ../en/ch06-collab.xml:434 8.8292 +msgid "" 8.8293 +"A good distributed revision control tool will support both models. You and " 8.8294 +"your collaborators can then structure how you work together based on your own " 8.8295 +"needs and preferences, not on what contortions your tools force you into." 8.8296 msgstr "" 8.8297 8.8298 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8299 -#: ../en/ch05-collab.xml:402 8.8300 +#: ../en/ch06-collab.xml:441 8.8301 msgid "Where collaboration meets branch management" 8.8302 msgstr "协作与分支管理" 8.8303 8.8304 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8305 -#: ../en/ch05-collab.xml:404 8.8306 +#: ../en/ch06-collab.xml:443 8.8307 msgid "" 8.8308 "Once you and your team set up some shared repositories and start propagating " 8.8309 "changes back and forth between local and shared repos, you begin to face a " 8.8310 @@ -6110,24 +7966,24 @@ 8.8311 msgstr "" 8.8312 8.8313 #. type: Content of: <book><chapter><sect1><title> 8.8314 -#: ../en/ch05-collab.xml:416 8.8315 +#: ../en/ch06-collab.xml:455 8.8316 msgid "The technical side of sharing" 8.8317 msgstr "共享的技术因素" 8.8318 8.8319 #. type: Content of: <book><chapter><sect1><para> 8.8320 -#: ../en/ch05-collab.xml:418 8.8321 -msgid "" 8.8322 -"The remainder of this chapter is devoted to the question of serving data to " 8.8323 -"your collaborators." 8.8324 +#: ../en/ch06-collab.xml:457 8.8325 +msgid "" 8.8326 +"The remainder of this chapter is devoted to the question of sharing changes " 8.8327 +"with your collaborators." 8.8328 msgstr "" 8.8329 8.8330 #. type: Content of: <book><chapter><sect1><title> 8.8331 -#: ../en/ch05-collab.xml:423 8.8332 +#: ../en/ch06-collab.xml:462 8.8333 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>" 8.8334 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享" 8.8335 8.8336 #. type: Content of: <book><chapter><sect1><para> 8.8337 -#: ../en/ch05-collab.xml:426 8.8338 +#: ../en/ch06-collab.xml:465 8.8339 msgid "" 8.8340 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " 8.8341 "wonderfully suited to small, tight-knit, and fast-paced group environments. " 8.8342 @@ -6136,7 +7992,7 @@ 8.8343 msgstr "" 8.8344 8.8345 #. type: Content of: <book><chapter><sect1><para> 8.8346 -#: ../en/ch05-collab.xml:431 8.8347 +#: ../en/ch06-collab.xml:470 8.8348 msgid "" 8.8349 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in " 8.8350 "under a second it will bring up a specialised HTTP server; this will accept " 8.8351 @@ -6149,21 +8005,21 @@ 8.8352 msgstr "" 8.8353 8.8354 #. type: Content of: <book><chapter><sect1><para> 8.8355 -#: ../en/ch05-collab.xml:442 8.8356 +#: ../en/ch06-collab.xml:481 8.8357 msgid "" 8.8358 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</" 8.8359 "emphasis> a general-purpose web server. It can do only two things:" 8.8360 msgstr "" 8.8361 8.8362 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.8363 -#: ../en/ch05-collab.xml:446 8.8364 +#: ../en/ch06-collab.xml:485 8.8365 msgid "" 8.8366 "Allow people to browse the history of the repository it's serving, from their " 8.8367 "normal web browsers." 8.8368 msgstr "" 8.8369 8.8370 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.8371 -#: ../en/ch05-collab.xml:450 8.8372 +#: ../en/ch06-collab.xml:489 8.8373 msgid "" 8.8374 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd" 8.8375 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes " 8.8376 @@ -6171,7 +8027,7 @@ 8.8377 msgstr "" 8.8378 8.8379 #. type: Content of: <book><chapter><sect1><para> 8.8380 -#: ../en/ch05-collab.xml:455 8.8381 +#: ../en/ch06-collab.xml:494 8.8382 msgid "" 8.8383 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote " 8.8384 "users to <emphasis>modify</emphasis> your repository. It's intended for read-" 8.8385 @@ -6179,7 +8035,7 @@ 8.8386 msgstr "" 8.8387 8.8388 #. type: Content of: <book><chapter><sect1><para> 8.8389 -#: ../en/ch05-collab.xml:459 8.8390 +#: ../en/ch06-collab.xml:498 8.8391 msgid "" 8.8392 "If you're getting started with Mercurial, there's nothing to prevent you from " 8.8393 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on " 8.8394 @@ -6190,12 +8046,12 @@ 8.8395 msgstr "" 8.8396 8.8397 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8398 -#: ../en/ch05-collab.xml:469 8.8399 +#: ../en/ch06-collab.xml:508 8.8400 msgid "A few things to keep in mind" 8.8401 msgstr "要牢记的几件事" 8.8402 8.8403 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8404 -#: ../en/ch05-collab.xml:471 8.8405 +#: ../en/ch06-collab.xml:510 8.8406 msgid "" 8.8407 "Because it provides unauthenticated read access to all clients, you should " 8.8408 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where " 8.8409 @@ -6204,7 +8060,7 @@ 8.8410 msgstr "" 8.8411 8.8412 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8413 -#: ../en/ch05-collab.xml:477 8.8414 +#: ../en/ch06-collab.xml:516 8.8415 msgid "" 8.8416 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about " 8.8417 "any firewall software you might have installed on your system or network. It " 8.8418 @@ -6215,7 +8071,7 @@ 8.8419 msgstr "" 8.8420 8.8421 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8422 -#: ../en/ch05-collab.xml:486 8.8423 +#: ../en/ch06-collab.xml:525 8.8424 msgid "" 8.8425 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming " 8.8426 "connections on port 8000. If another process is already listening on the " 8.8427 @@ -6224,7 +8080,7 @@ 8.8428 msgstr "" 8.8429 8.8430 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8431 -#: ../en/ch05-collab.xml:492 8.8432 +#: ../en/ch06-collab.xml:531 8.8433 msgid "" 8.8434 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints " 8.8435 "no output, which can be a bit unnerving. If you'd like to confirm that it is " 8.8436 @@ -6234,12 +8090,12 @@ 8.8437 msgstr "" 8.8438 8.8439 #. type: Content of: <book><chapter><sect1><title> 8.8440 -#: ../en/ch05-collab.xml:502 8.8441 +#: ../en/ch06-collab.xml:541 8.8442 msgid "Using the Secure Shell (ssh) protocol" 8.8443 msgstr "使用 ssh 协议" 8.8444 8.8445 #. type: Content of: <book><chapter><sect1><para> 8.8446 -#: ../en/ch05-collab.xml:504 8.8447 +#: ../en/ch06-collab.xml:543 8.8448 msgid "" 8.8449 "You can pull and push changes securely over a network connection using the " 8.8450 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " 8.8451 @@ -6248,40 +8104,40 @@ 8.8452 msgstr "" 8.8453 8.8454 #. type: Content of: <book><chapter><sect1><para> 8.8455 -#: ../en/ch05-collab.xml:509 8.8456 -msgid "" 8.8457 -"If you're not familiar with ssh, it's a network protocol that lets you " 8.8458 -"securely communicate with another computer. To use it with Mercurial, you'll " 8.8459 -"be setting up one or more user accounts on a server so that remote users can " 8.8460 -"log in and execute commands." 8.8461 -msgstr "" 8.8462 - 8.8463 -#. type: Content of: <book><chapter><sect1><para> 8.8464 -#: ../en/ch05-collab.xml:515 8.8465 +#: ../en/ch06-collab.xml:548 8.8466 +msgid "" 8.8467 +"If you're not familiar with ssh, it's the name of both a command and a " 8.8468 +"network protocol that let you securely communicate with another computer. To " 8.8469 +"use it with Mercurial, you'll be setting up one or more user accounts on a " 8.8470 +"server so that remote users can log in and execute commands." 8.8471 +msgstr "" 8.8472 + 8.8473 +#. type: Content of: <book><chapter><sect1><para> 8.8474 +#: ../en/ch06-collab.xml:554 8.8475 msgid "" 8.8476 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some " 8.8477 "of the material that follows to be elementary in nature.)" 8.8478 msgstr "" 8.8479 8.8480 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8481 -#: ../en/ch05-collab.xml:520 8.8482 +#: ../en/ch06-collab.xml:559 8.8483 msgid "How to read and write ssh URLs" 8.8484 msgstr "如何读写 ssh 路径" 8.8485 8.8486 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8487 -#: ../en/ch05-collab.xml:522 8.8488 +#: ../en/ch06-collab.xml:561 8.8489 msgid "An ssh URL tends to look like this:" 8.8490 msgstr "" 8.8491 8.8492 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.8493 -#: ../en/ch05-collab.xml:525 8.8494 +#: ../en/ch06-collab.xml:564 8.8495 msgid "" 8.8496 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the " 8.8497 "ssh protocol." 8.8498 msgstr "" 8.8499 8.8500 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.8501 -#: ../en/ch05-collab.xml:528 8.8502 +#: ../en/ch06-collab.xml:567 8.8503 msgid "" 8.8504 "The <quote><literal>bos@</literal></quote> component indicates what username " 8.8505 "to log into the server as. You can leave this out if the remote username is " 8.8506 @@ -6289,14 +8145,14 @@ 8.8507 msgstr "" 8.8508 8.8509 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.8510 -#: ../en/ch05-collab.xml:533 8.8511 +#: ../en/ch06-collab.xml:572 8.8512 msgid "" 8.8513 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of " 8.8514 "the server to log into." 8.8515 msgstr "" 8.8516 8.8517 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.8518 -#: ../en/ch05-collab.xml:537 8.8519 +#: ../en/ch06-collab.xml:576 8.8520 msgid "" 8.8521 "The <quote>:22</quote> identifies the port number to connect to the server " 8.8522 "on. The default port is 22, so you only need to specify a colon and port " 8.8523 @@ -6304,13 +8160,13 @@ 8.8524 msgstr "" 8.8525 8.8526 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.8527 -#: ../en/ch05-collab.xml:542 8.8528 +#: ../en/ch06-collab.xml:581 8.8529 msgid "" 8.8530 "The remainder of the URL is the local path to the repository on the server." 8.8531 msgstr "" 8.8532 8.8533 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8534 -#: ../en/ch05-collab.xml:546 8.8535 +#: ../en/ch06-collab.xml:585 8.8536 msgid "" 8.8537 "There's plenty of scope for confusion with the path component of ssh URLs, as " 8.8538 "there is no standard way for tools to interpret it. Some programs behave " 8.8539 @@ -6320,7 +8176,7 @@ 8.8540 msgstr "" 8.8541 8.8542 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8543 -#: ../en/ch05-collab.xml:553 8.8544 +#: ../en/ch06-collab.xml:592 8.8545 msgid "" 8.8546 "Mercurial treats the path to a repository on the server as relative to the " 8.8547 "remote user's home directory. For example, if user <literal>foo</literal> on " 8.8548 @@ -6331,7 +8187,7 @@ 8.8549 msgstr "" 8.8550 8.8551 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8552 -#: ../en/ch05-collab.xml:562 8.8553 +#: ../en/ch06-collab.xml:601 8.8554 msgid "" 8.8555 "If you want to specify a path relative to another user's home directory, you " 8.8556 "can use a path that starts with a tilde character followed by the user's name " 8.8557 @@ -6339,19 +8195,19 @@ 8.8558 msgstr "" 8.8559 8.8560 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8561 -#: ../en/ch05-collab.xml:568 8.8562 +#: ../en/ch06-collab.xml:607 8.8563 msgid "" 8.8564 "And if you really want to specify an <emphasis>absolute</emphasis> path on " 8.8565 "the server, begin the path component with two slashes, as in this example." 8.8566 msgstr "" 8.8567 8.8568 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8569 -#: ../en/ch05-collab.xml:575 8.8570 +#: ../en/ch06-collab.xml:614 8.8571 msgid "Finding an ssh client for your system" 8.8572 msgstr "为你的系统寻找 ssh 客户端" 8.8573 8.8574 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8575 -#: ../en/ch05-collab.xml:577 8.8576 +#: ../en/ch06-collab.xml:616 8.8577 msgid "" 8.8578 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're " 8.8579 "using such a system, run <literal>which ssh</literal> to find out if the " 8.8580 @@ -6362,60 +8218,58 @@ 8.8581 msgstr "" 8.8582 8.8583 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8584 -#: ../en/ch05-collab.xml:585 8.8585 -msgid "" 8.8586 -"On Windows, you'll first need to download a suitable ssh client. There are " 8.8587 -"two alternatives." 8.8588 -msgstr "" 8.8589 - 8.8590 -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8591 -#: ../en/ch05-collab.xml:588 8.8592 -msgid "" 8.8593 -"Simon Tatham's excellent PuTTY package <citation>web:putty</citation> " 8.8594 -"provides a complete suite of ssh client commands." 8.8595 -msgstr "" 8.8596 - 8.8597 -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8598 -#: ../en/ch05-collab.xml:592 8.8599 -msgid "" 8.8600 -"If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH." 8.8601 -msgstr "" 8.8602 - 8.8603 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8604 -#: ../en/ch05-collab.xml:595 8.8605 -msgid "" 8.8606 -"In either case, you'll need to edit your <filename role=\"special\">hg.ini</" 8.8607 -"filename> file to tell Mercurial where to find the actual client command. " 8.8608 -"For example, if you're using PuTTY, you'll need to use the <command>plink</" 8.8609 -"command> command as a command-line ssh client." 8.8610 -msgstr "" 8.8611 - 8.8612 -#. type: Content of: <book><chapter><sect1><sect2><note><para> 8.8613 -#: ../en/ch05-collab.xml:605 8.8614 -msgid "" 8.8615 -"The path to <command>plink</command> shouldn't contain any whitespace " 8.8616 -"characters, or Mercurial may not be able to run it correctly (so putting it " 8.8617 -"in <filename class=\"directory\">C:\\Program Files</filename> is probably not " 8.8618 -"a good idea)." 8.8619 +#: ../en/ch06-collab.xml:624 8.8620 +msgid "" 8.8621 +"On Windows, the TortoiseHg package is bundled with a version of Simon " 8.8622 +"Tatham's excellent <command>plink</command> command, and you should not need " 8.8623 +"to do any further configuration." 8.8624 msgstr "" 8.8625 8.8626 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8627 -#: ../en/ch05-collab.xml:614 8.8628 +#: ../en/ch06-collab.xml:631 8.8629 msgid "Generating a key pair" 8.8630 msgstr "产生密钥对" 8.8631 8.8632 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8633 -#: ../en/ch05-collab.xml:616 8.8634 +#: ../en/ch06-collab.xml:633 8.8635 msgid "" 8.8636 "To avoid the need to repetitively type a password every time you need to use " 8.8637 -"your ssh client, I recommend generating a key pair. On a Unix-like system, " 8.8638 -"the <command>ssh-keygen</command> command will do the trick. On Windows, if " 8.8639 -"you're using PuTTY, the <command>puttygen</command> command is what you'll " 8.8640 -"need." 8.8641 -msgstr "" 8.8642 - 8.8643 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8644 -#: ../en/ch05-collab.xml:624 8.8645 +"your ssh client, I recommend generating a key pair." 8.8646 +msgstr "" 8.8647 + 8.8648 +#. type: Content of: <book><chapter><sect1><sect2><tip><title> 8.8649 +#: ../en/ch06-collab.xml:638 8.8650 +msgid "Key pairs are not mandatory" 8.8651 +msgstr "" 8.8652 + 8.8653 +#. type: Content of: <book><chapter><sect1><sect2><tip><para> 8.8654 +#: ../en/ch06-collab.xml:640 8.8655 +msgid "" 8.8656 +"Mercurial knows nothing about ssh authentication or key pairs. You can, if " 8.8657 +"you like, safely ignore this section and the one that follows until you grow " 8.8658 +"tired of repeatedly typing ssh passwords." 8.8659 +msgstr "" 8.8660 + 8.8661 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8662 +#: ../en/ch06-collab.xml:648 8.8663 +msgid "" 8.8664 +"On a Unix-like system, the <command>ssh-keygen</command> command will do the " 8.8665 +"trick." 8.8666 +msgstr "" 8.8667 + 8.8668 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8669 +#: ../en/ch06-collab.xml:651 8.8670 +msgid "" 8.8671 +"On Windows, if you're using TortoiseHg, you may need to download a command " 8.8672 +"named <command>puttygen</command> from <ulink url=\"http://www.chiark." 8.8673 +"greenend.org.uk/~sgtatham/putty\">the PuTTY web site</ulink> to generate a " 8.8674 +"key pair. See <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/" 8.8675 +"Chapter8.html#pubkey-puttygen\">the <command>puttygen</command> " 8.8676 +"documentation</ulink> for details of how use the command." 8.8677 +msgstr "" 8.8678 + 8.8679 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8680 +#: ../en/ch06-collab.xml:663 8.8681 msgid "" 8.8682 "When you generate a key pair, it's usually <emphasis>highly</emphasis> " 8.8683 "advisable to protect it with a passphrase. (The only time that you might not " 8.8684 @@ -6424,7 +8278,7 @@ 8.8685 msgstr "" 8.8686 8.8687 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8688 -#: ../en/ch05-collab.xml:630 8.8689 +#: ../en/ch06-collab.xml:669 8.8690 msgid "" 8.8691 "Simply generating a key pair isn't enough, however. You'll need to add the " 8.8692 "public key to the set of authorised keys for whatever user you're logging in " 8.8693 @@ -6435,7 +8289,7 @@ 8.8694 msgstr "" 8.8695 8.8696 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8697 -#: ../en/ch05-collab.xml:639 8.8698 +#: ../en/ch06-collab.xml:678 8.8699 msgid "" 8.8700 "On a Unix-like system, your public key will have a <filename>.pub</filename> " 8.8701 "extension. If you're using <command>puttygen</command> on Windows, you can " 8.8702 @@ -6445,12 +8299,12 @@ 8.8703 msgstr "" 8.8704 8.8705 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8706 -#: ../en/ch05-collab.xml:648 8.8707 +#: ../en/ch06-collab.xml:686 8.8708 msgid "Using an authentication agent" 8.8709 msgstr "使用认证代理" 8.8710 8.8711 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8712 -#: ../en/ch05-collab.xml:650 8.8713 +#: ../en/ch06-collab.xml:688 8.8714 msgid "" 8.8715 "An authentication agent is a daemon that stores passphrases in memory (so it " 8.8716 "will forget passphrases if you log out and log back in again). An ssh client " 8.8717 @@ -6462,7 +8316,7 @@ 8.8718 msgstr "" 8.8719 8.8720 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8721 -#: ../en/ch05-collab.xml:659 8.8722 +#: ../en/ch06-collab.xml:697 8.8723 msgid "" 8.8724 "The downside of storing passphrases in an agent is that it's possible for a " 8.8725 "well-prepared attacker to recover the plain text of your passphrases, in some " 8.8726 @@ -6471,34 +8325,44 @@ 8.8727 "of repeated typing." 8.8728 msgstr "" 8.8729 8.8730 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8731 -#: ../en/ch05-collab.xml:666 8.8732 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8733 +#: ../en/ch06-collab.xml:706 8.8734 msgid "" 8.8735 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and " 8.8736 "it's often run automatically for you when you log in. You'll need to use the " 8.8737 -"<command>ssh-add</command> command to add passphrases to the agent's store. " 8.8738 -"On Windows, if you're using PuTTY, the <command>pageant</command> command " 8.8739 -"acts as the agent. It adds an icon to your system tray that will let you " 8.8740 -"manage stored passphrases." 8.8741 +"<command>ssh-add</command> command to add passphrases to the agent's store." 8.8742 +msgstr "" 8.8743 + 8.8744 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8745 +#: ../en/ch06-collab.xml:713 8.8746 +msgid "" 8.8747 +"On Windows, if you're using TortoiseHg, the <command>pageant</command> " 8.8748 +"command acts as the agent. As with <command>puttygen</command>, you'll need " 8.8749 +"to <ulink url=\"http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download." 8.8750 +"html\">download <command>pageant</command></ulink> from the PuTTY web site " 8.8751 +"and read <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/" 8.8752 +"Chapter9.html#pageant\">its documentation</ulink>. The <command>pageant</" 8.8753 +"command> command adds an icon to your system tray that will let you manage " 8.8754 +"stored passphrases." 8.8755 msgstr "" 8.8756 8.8757 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8758 -#: ../en/ch05-collab.xml:677 8.8759 +#: ../en/ch06-collab.xml:728 8.8760 msgid "Configuring the server side properly" 8.8761 msgstr "正确配置服务器端" 8.8762 8.8763 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8764 -#: ../en/ch05-collab.xml:679 8.8765 -msgid "" 8.8766 -"Because ssh can be fiddly to set up if you're new to it, there's a variety of " 8.8767 -"things that can go wrong. Add Mercurial on top, and there's plenty more " 8.8768 -"scope for head-scratching. Most of these potential problems occur on the " 8.8769 -"server side, not the client side. The good news is that once you've gotten a " 8.8770 -"configuration working, it will usually continue to work indefinitely." 8.8771 -msgstr "" 8.8772 - 8.8773 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.8774 -#: ../en/ch05-collab.xml:687 8.8775 +#: ../en/ch06-collab.xml:730 8.8776 +msgid "" 8.8777 +"Because ssh can be fiddly to set up if you're new to it, a variety of things " 8.8778 +"can go wrong. Add Mercurial on top, and there's plenty more scope for head-" 8.8779 +"scratching. Most of these potential problems occur on the server side, not " 8.8780 +"the client side. The good news is that once you've gotten a configuration " 8.8781 +"working, it will usually continue to work indefinitely." 8.8782 +msgstr "" 8.8783 + 8.8784 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.8785 +#: ../en/ch06-collab.xml:738 8.8786 msgid "" 8.8787 "Before you try using Mercurial to talk to an ssh server, it's best to make " 8.8788 "sure that you can use the normal <command>ssh</command> or <command>putty</" 8.8789 @@ -6511,7 +8375,7 @@ 8.8790 msgstr "" 8.8791 8.8792 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8793 -#: ../en/ch05-collab.xml:698 8.8794 +#: ../en/ch06-collab.xml:749 8.8795 msgid "" 8.8796 "The first thing to be sure of on the server side is that you can actually log " 8.8797 "in from another machine at all. If you can't use <command>ssh</command> or " 8.8798 @@ -6520,7 +8384,7 @@ 8.8799 msgstr "" 8.8800 8.8801 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8802 -#: ../en/ch05-collab.xml:705 8.8803 +#: ../en/ch06-collab.xml:756 8.8804 msgid "" 8.8805 "If you get a <quote>connection refused</quote> error, either there isn't an " 8.8806 "SSH daemon running on the server at all, or it's inaccessible due to firewall " 8.8807 @@ -6528,7 +8392,7 @@ 8.8808 msgstr "" 8.8809 8.8810 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8811 -#: ../en/ch05-collab.xml:710 8.8812 +#: ../en/ch06-collab.xml:761 8.8813 msgid "" 8.8814 "If you get a <quote>no route to host</quote> error, you either have an " 8.8815 "incorrect address for the server or a seriously locked down firewall that " 8.8816 @@ -6536,7 +8400,7 @@ 8.8817 msgstr "" 8.8818 8.8819 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8820 -#: ../en/ch05-collab.xml:715 8.8821 +#: ../en/ch06-collab.xml:766 8.8822 msgid "" 8.8823 "If you get a <quote>permission denied</quote> error, you may have mistyped " 8.8824 "the username on the server, or you could have mistyped your key's passphrase " 8.8825 @@ -6544,7 +8408,7 @@ 8.8826 msgstr "" 8.8827 8.8828 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8829 -#: ../en/ch05-collab.xml:720 8.8830 +#: ../en/ch06-collab.xml:771 8.8831 msgid "" 8.8832 "In summary, if you're having trouble talking to the server's ssh daemon, " 8.8833 "first make sure that one is running at all. On many systems it will be " 8.8834 @@ -6556,7 +8420,7 @@ 8.8835 msgstr "" 8.8836 8.8837 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8838 -#: ../en/ch05-collab.xml:730 8.8839 +#: ../en/ch06-collab.xml:781 8.8840 msgid "" 8.8841 "If you're using an authentication agent on the client side to store " 8.8842 "passphrases for your keys, you ought to be able to log into the server " 8.8843 @@ -6565,26 +8429,26 @@ 8.8844 msgstr "" 8.8845 8.8846 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8847 -#: ../en/ch05-collab.xml:736 8.8848 +#: ../en/ch06-collab.xml:787 8.8849 msgid "" 8.8850 "You might have forgotten to use <command>ssh-add</command> or " 8.8851 "<command>pageant</command> to store the passphrase." 8.8852 msgstr "" 8.8853 8.8854 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8855 -#: ../en/ch05-collab.xml:740 8.8856 +#: ../en/ch06-collab.xml:791 8.8857 msgid "You might have stored the passphrase for the wrong key." 8.8858 msgstr "" 8.8859 8.8860 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8861 -#: ../en/ch05-collab.xml:743 8.8862 +#: ../en/ch06-collab.xml:794 8.8863 msgid "" 8.8864 "If you're being prompted for the remote user's password, there are another " 8.8865 "few possible problems to check." 8.8866 msgstr "" 8.8867 8.8868 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8869 -#: ../en/ch05-collab.xml:746 8.8870 +#: ../en/ch06-collab.xml:797 8.8871 msgid "" 8.8872 "Either the user's home directory or their <filename role=\"special\" class=" 8.8873 "\"directory\">.ssh</filename> directory might have excessively liberal " 8.8874 @@ -6595,7 +8459,7 @@ 8.8875 msgstr "" 8.8876 8.8877 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8878 -#: ../en/ch05-collab.xml:755 8.8879 +#: ../en/ch06-collab.xml:806 8.8880 msgid "" 8.8881 "The user's <filename role=\"special\">authorized_keys</filename> file may " 8.8882 "have a problem. If anyone other than the user owns or can write to that file, " 8.8883 @@ -6603,7 +8467,7 @@ 8.8884 msgstr "" 8.8885 8.8886 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8887 -#: ../en/ch05-collab.xml:762 8.8888 +#: ../en/ch06-collab.xml:813 8.8889 msgid "" 8.8890 "In the ideal world, you should be able to run the following command " 8.8891 "successfully, and it should print exactly one line of output, the current " 8.8892 @@ -6611,14 +8475,14 @@ 8.8893 msgstr "" 8.8894 8.8895 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8896 -#: ../en/ch05-collab.xml:767 8.8897 +#: ../en/ch06-collab.xml:818 8.8898 msgid "" 8.8899 "If, on your server, you have login scripts that print banners or other junk " 8.8900 "even when running non-interactive commands like this, you should fix them " 8.8901 "before you continue, so that they only print output if they're run " 8.8902 "interactively. Otherwise these banners will at least clutter up Mercurial's " 8.8903 "output. Worse, they could potentially cause problems with running Mercurial " 8.8904 -"commands remotely. Mercurial makes tries to detect and ignore banners in non-" 8.8905 +"commands remotely. Mercurial tries to detect and ignore banners in non-" 8.8906 "interactive <command>ssh</command> sessions, but it is not foolproof. (If " 8.8907 "you're editing your login scripts on your server, the usual way to see if a " 8.8908 "login script is running in an interactive shell is to check the return code " 8.8909 @@ -6626,7 +8490,7 @@ 8.8910 msgstr "" 8.8911 8.8912 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8913 -#: ../en/ch05-collab.xml:781 8.8914 +#: ../en/ch06-collab.xml:832 8.8915 msgid "" 8.8916 "Once you've verified that plain old ssh is working with your server, the next " 8.8917 "step is to ensure that Mercurial runs on the server. The following command " 8.8918 @@ -6634,7 +8498,7 @@ 8.8919 msgstr "" 8.8920 8.8921 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8922 -#: ../en/ch05-collab.xml:788 8.8923 +#: ../en/ch06-collab.xml:839 8.8924 msgid "" 8.8925 "If you see an error message instead of normal <command role=\"hg-cmd\">hg " 8.8926 "version</command> output, this is usually because you haven't installed " 8.8927 @@ -6644,21 +8508,21 @@ 8.8928 msgstr "" 8.8929 8.8930 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8931 -#: ../en/ch05-collab.xml:795 8.8932 +#: ../en/ch06-collab.xml:846 8.8933 msgid "" 8.8934 "Is Mercurial really installed on the server at all? I know this sounds " 8.8935 "trivial, but it's worth checking!" 8.8936 msgstr "" 8.8937 8.8938 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8939 -#: ../en/ch05-collab.xml:799 8.8940 +#: ../en/ch06-collab.xml:850 8.8941 msgid "" 8.8942 "Maybe your shell's search path (usually set via the <envar>PATH</envar> " 8.8943 "environment variable) is simply misconfigured." 8.8944 msgstr "" 8.8945 8.8946 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8947 -#: ../en/ch05-collab.xml:803 8.8948 +#: ../en/ch06-collab.xml:854 8.8949 msgid "" 8.8950 "Perhaps your <envar>PATH</envar> environment variable is only being set to " 8.8951 "point to the location of the <command>hg</command> executable if the login " 8.8952 @@ -6667,7 +8531,7 @@ 8.8953 msgstr "" 8.8954 8.8955 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.8956 -#: ../en/ch05-collab.xml:810 8.8957 +#: ../en/ch06-collab.xml:861 8.8958 msgid "" 8.8959 "The <envar>PYTHONPATH</envar> environment variable may need to contain the " 8.8960 "path to the Mercurial Python modules. It might not be set at all; it could " 8.8961 @@ -6675,7 +8539,7 @@ 8.8962 msgstr "" 8.8963 8.8964 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8965 -#: ../en/ch05-collab.xml:817 8.8966 +#: ../en/ch06-collab.xml:868 8.8967 msgid "" 8.8968 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh " 8.8969 "connection, well done! You've got the server and client sorted out. You " 8.8970 @@ -6686,20 +8550,20 @@ 8.8971 msgstr "" 8.8972 8.8973 #. type: Content of: <book><chapter><sect1><sect2><title> 8.8974 -#: ../en/ch05-collab.xml:827 8.8975 +#: ../en/ch06-collab.xml:877 8.8976 msgid "Using compression with ssh" 8.8977 msgstr "通过 ssh 使用压缩" 8.8978 8.8979 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8980 -#: ../en/ch05-collab.xml:829 8.8981 +#: ../en/ch06-collab.xml:879 8.8982 msgid "" 8.8983 "Mercurial does not compress data when it uses the ssh protocol, because the " 8.8984 -"ssh protocol can transparently compress data. However, the default behaviour " 8.8985 +"ssh protocol can transparently compress data. However, the default behavior " 8.8986 "of ssh clients is <emphasis>not</emphasis> to request compression." 8.8987 msgstr "" 8.8988 8.8989 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8990 -#: ../en/ch05-collab.xml:834 8.8991 +#: ../en/ch06-collab.xml:884 8.8992 msgid "" 8.8993 "Over any network other than a fast LAN (even a wireless network), using " 8.8994 "compression is likely to significantly speed up Mercurial's network " 8.8995 @@ -6709,55 +8573,69 @@ 8.8996 msgstr "" 8.8997 8.8998 #. type: Content of: <book><chapter><sect1><sect2><para> 8.8999 -#: ../en/ch05-collab.xml:841 8.9000 +#: ../en/ch06-collab.xml:891 8.9001 msgid "" 8.9002 "Both <command>ssh</command> and <command>plink</command> accept a <option " 8.9003 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can " 8.9004 "easily edit your <filename role=\"special\">~/.hgrc</filename> to enable " 8.9005 -"compression for all of Mercurial's uses of the ssh protocol." 8.9006 -msgstr "" 8.9007 - 8.9008 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.9009 -#: ../en/ch05-collab.xml:849 8.9010 -msgid "" 8.9011 -"If you use <command>ssh</command>, you can configure it to always use " 8.9012 -"compression when talking to your server. To do this, edit your <filename " 8.9013 -"role=\"special\">.ssh/config</filename> file (which may not yet exist), as " 8.9014 -"follows." 8.9015 -msgstr "" 8.9016 - 8.9017 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.9018 -#: ../en/ch05-collab.xml:857 8.9019 -msgid "" 8.9020 -"This defines an alias, <literal>hg</literal>. When you use it on the " 8.9021 -"<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-" 8.9022 -"protocol URL, it will cause <command>ssh</command> to connect to <literal>hg." 8.9023 -"example.com</literal> and use compression. This gives you both a shorter " 8.9024 -"name to type and compression, each of which is a good thing in its own right." 8.9025 +"compression for all of Mercurial's uses of the ssh protocol. Here is how to " 8.9026 +"do so for regular <command>ssh</command> on Unix-like systems, for example." 8.9027 +msgstr "" 8.9028 + 8.9029 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9030 +#: ../en/ch06-collab.xml:901 8.9031 +msgid "" 8.9032 +"If you use <command>ssh</command> on a Unix-like system, you can configure it " 8.9033 +"to always use compression when talking to your server. To do this, edit your " 8.9034 +"<filename role=\"special\">.ssh/config</filename> file (which may not yet " 8.9035 +"exist), as follows." 8.9036 +msgstr "" 8.9037 + 8.9038 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9039 +#: ../en/ch06-collab.xml:911 8.9040 +msgid "" 8.9041 +"This defines a hostname alias, <literal>hg</literal>. When you use that " 8.9042 +"hostname on the <command>ssh</command> command line or in a Mercurial " 8.9043 +"<literal>ssh</literal>-protocol URL, it will cause <command>ssh</command> to " 8.9044 +"connect to <literal>hg.example.com</literal> and use compression. This gives " 8.9045 +"you both a shorter name to type and compression, each of which is a good " 8.9046 +"thing in its own right." 8.9047 msgstr "" 8.9048 8.9049 #. type: Content of: <book><chapter><sect1><title> 8.9050 -#: ../en/ch05-collab.xml:868 8.9051 +#: ../en/ch06-collab.xml:923 8.9052 msgid "Serving over HTTP using CGI" 8.9053 msgstr "使用 CGI 通过 HTTP 提供服务" 8.9054 8.9055 #. type: Content of: <book><chapter><sect1><para> 8.9056 -#: ../en/ch05-collab.xml:870 8.9057 +#: ../en/ch06-collab.xml:925 8.9058 +msgid "" 8.9059 +"The simplest way to host one or more repositories in a permanent way is to " 8.9060 +"use a web server and Mercurial's CGI support." 8.9061 +msgstr "" 8.9062 + 8.9063 +#. type: Content of: <book><chapter><sect1><para> 8.9064 +#: ../en/ch06-collab.xml:929 8.9065 msgid "" 8.9066 "Depending on how ambitious you are, configuring Mercurial's CGI interface can " 8.9067 "take anything from a few moments to several hours." 8.9068 msgstr "" 8.9069 8.9070 #. type: Content of: <book><chapter><sect1><para> 8.9071 -#: ../en/ch05-collab.xml:874 8.9072 +#: ../en/ch06-collab.xml:933 8.9073 msgid "" 8.9074 "We'll begin with the simplest of examples, and work our way towards a more " 8.9075 "complex configuration. Even for the most basic case, you're almost certainly " 8.9076 "going to need to read and modify your web server's configuration." 8.9077 msgstr "" 8.9078 8.9079 +#. type: Content of: <book><chapter><sect1><note><title> 8.9080 +#: ../en/ch06-collab.xml:939 8.9081 +msgid "High pain tolerance required" 8.9082 +msgstr "" 8.9083 + 8.9084 #. type: Content of: <book><chapter><sect1><note><para> 8.9085 -#: ../en/ch05-collab.xml:880 8.9086 +#: ../en/ch06-collab.xml:941 8.9087 msgid "" 8.9088 "Configuring a web server is a complex, fiddly, and highly system-dependent " 8.9089 "activity. I can't possibly give you instructions that will cover anything " 8.9090 @@ -6766,34 +8644,43 @@ 8.9091 "mistakes, and to spend a lot of time reading your server's error logs." 8.9092 msgstr "" 8.9093 8.9094 +#. type: Content of: <book><chapter><sect1><note><para> 8.9095 +#: ../en/ch06-collab.xml:949 8.9096 +msgid "" 8.9097 +"If you don't have a strong stomach for tweaking configurations over and over, " 8.9098 +"or a compelling need to host your own services, you might want to try one of " 8.9099 +"the public hosting services that I mentioned earlier." 8.9100 +msgstr "" 8.9101 + 8.9102 #. type: Content of: <book><chapter><sect1><sect2><title> 8.9103 -#: ../en/ch05-collab.xml:890 8.9104 +#: ../en/ch06-collab.xml:956 8.9105 msgid "Web server configuration checklist" 8.9106 msgstr "Web 服务器配置检查表" 8.9107 8.9108 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9109 -#: ../en/ch05-collab.xml:892 8.9110 +#: ../en/ch06-collab.xml:958 8.9111 msgid "" 8.9112 "Before you continue, do take a few moments to check a few aspects of your " 8.9113 "system's setup." 8.9114 msgstr "" 8.9115 8.9116 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.9117 -#: ../en/ch05-collab.xml:896 8.9118 -msgid "" 8.9119 -"Do you have a web server installed at all? Mac OS X ships with Apache, but " 8.9120 -"many other systems may not have a web server installed." 8.9121 +#: ../en/ch06-collab.xml:962 8.9122 +msgid "" 8.9123 +"Do you have a web server installed at all? Mac OS X and some Linux " 8.9124 +"distributions ship with Apache, but many other systems may not have a web " 8.9125 +"server installed." 8.9126 msgstr "" 8.9127 8.9128 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.9129 -#: ../en/ch05-collab.xml:900 8.9130 +#: ../en/ch06-collab.xml:967 8.9131 msgid "" 8.9132 "If you have a web server installed, is it actually running? On most systems, " 8.9133 "even if one is present, it will be disabled by default." 8.9134 msgstr "" 8.9135 8.9136 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.9137 -#: ../en/ch05-collab.xml:904 8.9138 +#: ../en/ch06-collab.xml:971 8.9139 msgid "" 8.9140 "Is your server configured to allow you to run CGI programs in the directory " 8.9141 "where you plan to do so? Most servers default to explicitly disabling the " 8.9142 @@ -6801,7 +8688,7 @@ 8.9143 msgstr "" 8.9144 8.9145 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9146 -#: ../en/ch05-collab.xml:910 8.9147 +#: ../en/ch06-collab.xml:977 8.9148 msgid "" 8.9149 "If you don't have a web server installed, and don't have substantial " 8.9150 "experience configuring Apache, you should consider using the " 8.9151 @@ -6814,12 +8701,12 @@ 8.9152 msgstr "" 8.9153 8.9154 #. type: Content of: <book><chapter><sect1><sect2><title> 8.9155 -#: ../en/ch05-collab.xml:923 8.9156 +#: ../en/ch06-collab.xml:990 8.9157 msgid "Basic CGI configuration" 8.9158 msgstr "基本 CGI 配置" 8.9159 8.9160 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9161 -#: ../en/ch05-collab.xml:925 8.9162 +#: ../en/ch06-collab.xml:992 8.9163 msgid "" 8.9164 "On Unix-like systems, it's common for users to have a subdirectory named " 8.9165 "something like <filename class=\"directory\">public_html</filename> in their " 8.9166 @@ -6829,7 +8716,7 @@ 8.9167 msgstr "" 8.9168 8.9169 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9170 -#: ../en/ch05-collab.xml:933 8.9171 +#: ../en/ch06-collab.xml:1000 8.9172 msgid "" 8.9173 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> " 8.9174 "script that should be present in your Mercurial installation. If you can't " 8.9175 @@ -6839,14 +8726,14 @@ 8.9176 msgstr "" 8.9177 8.9178 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9179 -#: ../en/ch05-collab.xml:940 ../en/ch05-collab.xml:1109 8.9180 +#: ../en/ch06-collab.xml:1007 ../en/ch06-collab.xml:1175 8.9181 msgid "" 8.9182 "You'll need to copy this script into your <filename class=\"directory" 8.9183 "\">public_html</filename> directory, and ensure that it's executable." 8.9184 msgstr "" 8.9185 8.9186 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9187 -#: ../en/ch05-collab.xml:945 8.9188 +#: ../en/ch06-collab.xml:1012 8.9189 msgid "" 8.9190 "The <literal>755</literal> argument to <command>chmod</command> is a little " 8.9191 "more general than just making the script executable: it ensures that the " 8.9192 @@ -6859,26 +8746,26 @@ 8.9193 msgstr "" 8.9194 8.9195 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9196 -#: ../en/ch05-collab.xml:959 8.9197 +#: ../en/ch06-collab.xml:1026 8.9198 msgid "What could <emphasis>possibly</emphasis> go wrong?" 8.9199 msgstr "什么<emphasis>可能</emphasis>会出错?" 8.9200 8.9201 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9202 -#: ../en/ch05-collab.xml:962 8.9203 +#: ../en/ch06-collab.xml:1029 8.9204 msgid "" 8.9205 "Once you've copied the CGI script into place, go into a web browser, and try " 8.9206 -"to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://" 8.9207 -"myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself " 8.9208 -"for instant failure. There's a high probability that trying to visit this " 8.9209 -"URL will fail, and there are many possible reasons for this. In fact, you're " 8.9210 -"likely to stumble over almost every one of the possible errors below, so " 8.9211 -"please read carefully. The following are all of the problems I ran into on a " 8.9212 -"system running Fedora 7, with a fresh installation of Apache, and a user " 8.9213 -"account that I created specially to perform this exercise." 8.9214 +"to open the URL <literal>http://myhostname/~myuser/hgweb.cgi</literal>, " 8.9215 +"<emphasis>but</emphasis> brace yourself for instant failure. There's a high " 8.9216 +"probability that trying to visit this URL will fail, and there are many " 8.9217 +"possible reasons for this. In fact, you're likely to stumble over almost " 8.9218 +"every one of the possible errors below, so please read carefully. The " 8.9219 +"following are all of the problems I ran into on a system running Fedora 7, " 8.9220 +"with a fresh installation of Apache, and a user account that I created " 8.9221 +"specially to perform this exercise." 8.9222 msgstr "" 8.9223 8.9224 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9225 -#: ../en/ch05-collab.xml:976 8.9226 +#: ../en/ch06-collab.xml:1042 8.9227 msgid "" 8.9228 "Your web server may have per-user directories disabled. If you're using " 8.9229 "Apache, search your config file for a <literal>UserDir</literal> directive. " 8.9230 @@ -6891,7 +8778,7 @@ 8.9231 msgstr "" 8.9232 8.9233 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9234 -#: ../en/ch05-collab.xml:987 8.9235 +#: ../en/ch06-collab.xml:1053 8.9236 msgid "" 8.9237 "Your file access permissions may be too restrictive. The web server must be " 8.9238 "able to traverse your home directory and directories under your <filename " 8.9239 @@ -6901,7 +8788,7 @@ 8.9240 msgstr "" 8.9241 8.9242 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9243 -#: ../en/ch05-collab.xml:997 8.9244 +#: ../en/ch06-collab.xml:1063 8.9245 msgid "" 8.9246 "The other possibility with permissions is that you might get a completely " 8.9247 "empty window when you try to load the script. In this case, it's likely that " 8.9248 @@ -6911,7 +8798,7 @@ 8.9249 msgstr "" 8.9250 8.9251 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9252 -#: ../en/ch05-collab.xml:1004 8.9253 +#: ../en/ch06-collab.xml:1070 8.9254 msgid "" 8.9255 "Your web server may be configured to disallow execution of CGI programs in " 8.9256 "your per-user web directory. Here's Apache's default per-user configuration " 8.9257 @@ -6919,7 +8806,7 @@ 8.9258 msgstr "" 8.9259 8.9260 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9261 -#: ../en/ch05-collab.xml:1011 8.9262 +#: ../en/ch06-collab.xml:1077 8.9263 msgid "" 8.9264 "If you find a similar-looking <literal>Directory</literal> group in your " 8.9265 "Apache configuration, the directive to look at inside it is <literal>Options</" 8.9266 @@ -6928,7 +8815,7 @@ 8.9267 msgstr "" 8.9268 8.9269 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9270 -#: ../en/ch05-collab.xml:1018 8.9271 +#: ../en/ch06-collab.xml:1084 8.9272 msgid "" 8.9273 "If you find that Apache serves you the text of the CGI script instead of " 8.9274 "executing it, you may need to either uncomment (if already present) or add a " 8.9275 @@ -6936,7 +8823,7 @@ 8.9276 msgstr "" 8.9277 8.9278 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9279 -#: ../en/ch05-collab.xml:1024 8.9280 +#: ../en/ch06-collab.xml:1090 8.9281 msgid "" 8.9282 "The next possibility is that you might be served with a colourful Python " 8.9283 "backtrace claiming that it can't import a <literal>mercurial</literal>-" 8.9284 @@ -6951,9 +8838,9 @@ 8.9285 msgstr "" 8.9286 8.9287 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9288 -#: ../en/ch05-collab.xml:1038 8.9289 -msgid "" 8.9290 -"Finally, you are <emphasis>certain</emphasis> to by served with another " 8.9291 +#: ../en/ch06-collab.xml:1104 8.9292 +msgid "" 8.9293 +"Finally, you are <emphasis>certain</emphasis> to be served with another " 8.9294 "colourful Python backtrace: this one will complain that it can't find " 8.9295 "<filename class=\"directory\">/path/to/repository</filename>. Edit your " 8.9296 "<filename role=\"special\">hgweb.cgi</filename> script and replace the " 8.9297 @@ -6962,19 +8849,19 @@ 8.9298 msgstr "" 8.9299 8.9300 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9301 -#: ../en/ch05-collab.xml:1048 8.9302 +#: ../en/ch06-collab.xml:1114 8.9303 msgid "" 8.9304 "At this point, when you try to reload the page, you should be presented with " 8.9305 "a nice HTML view of your repository's history. Whew!" 8.9306 msgstr "" 8.9307 8.9308 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9309 -#: ../en/ch05-collab.xml:1054 8.9310 +#: ../en/ch06-collab.xml:1120 8.9311 msgid "Configuring lighttpd" 8.9312 msgstr "配置 lighttpd" 8.9313 8.9314 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9315 -#: ../en/ch05-collab.xml:1056 8.9316 +#: ../en/ch06-collab.xml:1122 8.9317 msgid "" 8.9318 "To be exhaustive in my experiments, I tried configuring the increasingly " 8.9319 "popular <literal>lighttpd</literal> web server to serve the same repository " 8.9320 @@ -6985,7 +8872,7 @@ 8.9321 msgstr "" 8.9322 8.9323 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9324 -#: ../en/ch05-collab.xml:1066 8.9325 +#: ../en/ch06-collab.xml:1132 8.9326 msgid "" 8.9327 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the " 8.9328 "repository was a snap (in other words, even if you're trying to use " 8.9329 @@ -6997,7 +8884,7 @@ 8.9330 msgstr "" 8.9331 8.9332 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9333 -#: ../en/ch05-collab.xml:1078 8.9334 +#: ../en/ch06-collab.xml:1144 8.9335 msgid "" 8.9336 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " 8.9337 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " 8.9338 @@ -7008,12 +8895,12 @@ 8.9339 msgstr "" 8.9340 8.9341 #. type: Content of: <book><chapter><sect1><sect2><title> 8.9342 -#: ../en/ch05-collab.xml:1091 8.9343 +#: ../en/ch06-collab.xml:1157 8.9344 msgid "Sharing multiple repositories with one CGI script" 8.9345 msgstr "使用一个 CGI 脚本共享多个版本库" 8.9346 8.9347 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9348 -#: ../en/ch05-collab.xml:1093 8.9349 +#: ../en/ch06-collab.xml:1159 8.9350 msgid "" 8.9351 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " 8.9352 "publish a single repository, which is an annoying restriction. If you want " 8.9353 @@ -7023,7 +8910,7 @@ 8.9354 msgstr "" 8.9355 8.9356 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9357 -#: ../en/ch05-collab.xml:1101 8.9358 +#: ../en/ch06-collab.xml:1167 8.9359 msgid "" 8.9360 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " 8.9361 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" 8.9362 @@ -7034,17 +8921,17 @@ 8.9363 msgstr "" 8.9364 8.9365 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9366 -#: ../en/ch05-collab.xml:1116 8.9367 -msgid "" 8.9368 -"With basic configuration out of the way, try to visit <ulink url=\"http://" 8.9369 -"myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" 8.9370 -"ulink> in your browser. It should display an empty list of repositories. If " 8.9371 -"you get a blank window or error message, try walking through the list of " 8.9372 -"potential problems in <xref linkend=\"sec:collab:wtf\"/>." 8.9373 -msgstr "" 8.9374 - 8.9375 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.9376 -#: ../en/ch05-collab.xml:1125 8.9377 +#: ../en/ch06-collab.xml:1182 8.9378 +msgid "" 8.9379 +"With basic configuration out of the way, try to visit <literal>http://" 8.9380 +"myhostname/~myuser/hgwebdir.cgi</literal> in your\tbrowser. It should " 8.9381 +"display an empty list of repositories. If you get a blank window or error " 8.9382 +"message, try walking through the list of potential problems in <xref linkend=" 8.9383 +"\"sec:collab:wtf\"/>." 8.9384 +msgstr "" 8.9385 + 8.9386 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9387 +#: ../en/ch06-collab.xml:1190 8.9388 msgid "" 8.9389 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " 8.9390 "external configuration file. By default, it searches for a file named " 8.9391 @@ -7056,7 +8943,7 @@ 8.9392 msgstr "" 8.9393 8.9394 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9395 -#: ../en/ch05-collab.xml:1135 8.9396 +#: ../en/ch06-collab.xml:1200 8.9397 msgid "" 8.9398 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" 8.9399 "filename> is with a section named <literal>collections</literal>. This will " 8.9400 @@ -7065,7 +8952,7 @@ 8.9401 msgstr "" 8.9402 8.9403 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9404 -#: ../en/ch05-collab.xml:1143 8.9405 +#: ../en/ch06-collab.xml:1208 8.9406 msgid "" 8.9407 "Mercurial interprets this by looking at the directory name on the " 8.9408 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" 8.9409 @@ -7077,21 +8964,20 @@ 8.9410 msgstr "" 8.9411 8.9412 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9413 -#: ../en/ch05-collab.xml:1152 8.9414 +#: ../en/ch06-collab.xml:1217 8.9415 msgid "" 8.9416 "Given the example above, if we have a repository whose local path is " 8.9417 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script " 8.9418 "will strip the leading <filename class=\"directory\">/my/root</filename> from " 8.9419 "the name, and publish the repository with a virtual path of <filename class=" 8.9420 "\"directory\">this/repo</filename>. If the base URL for our CGI script is " 8.9421 -"<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ " 8.9422 -"myuser/hgwebdir.cgi</ulink>, the complete URL for that repository will be " 8.9423 -"<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://" 8.9424 -"myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>." 8.9425 -msgstr "" 8.9426 - 8.9427 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.9428 -#: ../en/ch05-collab.xml:1166 8.9429 +"<literal>http://myhostname/~myuser/hgwebdir.cgi</literal>, the complete URL " 8.9430 +"for that repository will be <literal>http://myhostname/~myuser/hgwebdir.cgi/" 8.9431 +"this/repo</literal>." 8.9432 +msgstr "" 8.9433 + 8.9434 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9435 +#: ../en/ch06-collab.xml:1229 8.9436 msgid "" 8.9437 "If we replace <filename class=\"directory\">/my/root</filename> on the left " 8.9438 "hand side of this example with <filename class=\"directory\">/my</filename>, " 8.9439 @@ -7102,7 +8988,7 @@ 8.9440 msgstr "" 8.9441 8.9442 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9443 -#: ../en/ch05-collab.xml:1176 8.9444 +#: ../en/ch06-collab.xml:1239 8.9445 msgid "" 8.9446 "The <filename role=\"special\">hgwebdir.cgi</filename> script will " 8.9447 "recursively search each directory listed in the <literal>collections</" 8.9448 @@ -7111,7 +8997,7 @@ 8.9449 msgstr "" 8.9450 8.9451 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9452 -#: ../en/ch05-collab.xml:1182 8.9453 +#: ../en/ch06-collab.xml:1245 8.9454 msgid "" 8.9455 "The <literal>collections</literal> mechanism makes it easy to publish many " 8.9456 "repositories in a <quote>fire and forget</quote> manner. You only need to " 8.9457 @@ -7122,12 +9008,12 @@ 8.9458 msgstr "" 8.9459 8.9460 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9461 -#: ../en/ch05-collab.xml:1192 8.9462 +#: ../en/ch06-collab.xml:1255 8.9463 msgid "Explicitly specifying which repositories to publish" 8.9464 msgstr "明确指出要发布的版本库" 8.9465 8.9466 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9467 -#: ../en/ch05-collab.xml:1195 8.9468 +#: ../en/ch06-collab.xml:1258 8.9469 msgid "" 8.9470 "In addition to the <literal>collections</literal> mechanism, the <filename " 8.9471 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " 8.9472 @@ -7136,7 +9022,7 @@ 8.9473 msgstr "" 8.9474 8.9475 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9476 -#: ../en/ch05-collab.xml:1204 8.9477 +#: ../en/ch06-collab.xml:1267 8.9478 msgid "" 8.9479 "In this case, the virtual path (the component that will appear in a URL) is " 8.9480 "on the left hand side of each definition, while the path to the repository is " 8.9481 @@ -7146,28 +9032,33 @@ 8.9482 msgstr "" 8.9483 8.9484 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9485 -#: ../en/ch05-collab.xml:1211 8.9486 +#: ../en/ch06-collab.xml:1274 8.9487 msgid "" 8.9488 "If you wish, you can use both the <literal>collections</literal> and " 8.9489 "<literal>paths</literal> mechanisms simultaneously in a single configuration " 8.9490 "file." 8.9491 msgstr "" 8.9492 8.9493 +#. type: Content of: <book><chapter><sect1><sect2><sect3><note><title> 8.9494 +#: ../en/ch06-collab.xml:1280 8.9495 +msgid "Beware duplicate virtual paths" 8.9496 +msgstr "" 8.9497 + 8.9498 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 8.9499 -#: ../en/ch05-collab.xml:1217 8.9500 -msgid "" 8.9501 -"If multiple repositories have the same virtual path, <filename role=\"special" 8.9502 +#: ../en/ch06-collab.xml:1282 8.9503 +msgid "" 8.9504 +"If several repositories have the same virtual path, <filename role=\"special" 8.9505 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " 8.9506 "unpredictably." 8.9507 msgstr "" 8.9508 8.9509 #. type: Content of: <book><chapter><sect1><sect2><title> 8.9510 -#: ../en/ch05-collab.xml:1226 8.9511 +#: ../en/ch06-collab.xml:1291 8.9512 msgid "Downloading source archives" 8.9513 msgstr "下载源代码档案包" 8.9514 8.9515 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9516 -#: ../en/ch05-collab.xml:1228 8.9517 +#: ../en/ch06-collab.xml:1293 8.9518 msgid "" 8.9519 "Mercurial's web interface lets users download an archive of any revision. " 8.9520 "This archive will contain a snapshot of the working directory as of that " 8.9521 @@ -7175,21 +9066,21 @@ 8.9522 msgstr "" 8.9523 8.9524 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9525 -#: ../en/ch05-collab.xml:1233 8.9526 +#: ../en/ch06-collab.xml:1298 8.9527 msgid "" 8.9528 "By default, this feature is not enabled. To enable it, you'll need to add an " 8.9529 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role=" 8.9530 "\"rc-web\">web</literal> section of your <filename role=\"special\">~/.hgrc</" 8.9531 -"filename>." 8.9532 +"filename>; see below for details." 8.9533 msgstr "" 8.9534 8.9535 #. type: Content of: <book><chapter><sect1><sect2><title> 8.9536 -#: ../en/ch05-collab.xml:1241 8.9537 +#: ../en/ch06-collab.xml:1305 8.9538 msgid "Web configuration options" 8.9539 msgstr "Web 配置选项" 8.9540 8.9541 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9542 -#: ../en/ch05-collab.xml:1243 8.9543 +#: ../en/ch06-collab.xml:1307 8.9544 msgid "" 8.9545 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " 8.9546 "command, and the <filename role=\"special\">hgweb.cgi</filename> and " 8.9547 @@ -7199,7 +9090,7 @@ 8.9548 msgstr "" 8.9549 8.9550 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9551 -#: ../en/ch05-collab.xml:1251 8.9552 +#: ../en/ch06-collab.xml:1315 8.9553 msgid "" 8.9554 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " 8.9555 "archive download mechanisms Mercurial supports. If you enable this feature, " 8.9556 @@ -7209,7 +9100,7 @@ 8.9557 msgstr "" 8.9558 8.9559 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9560 -#: ../en/ch05-collab.xml:1260 8.9561 +#: ../en/ch06-collab.xml:1324 8.9562 msgid "" 8.9563 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " 8.9564 "<literal>bzip2</literal> compression. This has the best compression ratio, " 8.9565 @@ -7217,14 +9108,14 @@ 8.9566 msgstr "" 8.9567 8.9568 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9569 -#: ../en/ch05-collab.xml:1266 8.9570 +#: ../en/ch06-collab.xml:1330 8.9571 msgid "" 8.9572 "<literal>gz</literal>: A <command>tar</command> archive, compressed using " 8.9573 "<literal>gzip</literal> compression." 8.9574 msgstr "" 8.9575 8.9576 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9577 -#: ../en/ch05-collab.xml:1270 8.9578 +#: ../en/ch06-collab.xml:1334 8.9579 msgid "" 8.9580 "<literal>zip</literal>: A <command>zip</command> archive, compressed using " 8.9581 "LZW compression. This format has the worst compression ratio, but is widely " 8.9582 @@ -7232,7 +9123,7 @@ 8.9583 msgstr "" 8.9584 8.9585 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9586 -#: ../en/ch05-collab.xml:1276 8.9587 +#: ../en/ch06-collab.xml:1340 8.9588 msgid "" 8.9589 "If you provide an empty list, or don't have an <envar role=\"rc-item-web" 8.9590 "\">allow_archive</envar> entry at all, this feature will be disabled. Here " 8.9591 @@ -7240,7 +9131,7 @@ 8.9592 msgstr "" 8.9593 8.9594 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9595 -#: ../en/ch05-collab.xml:1283 8.9596 +#: ../en/ch06-collab.xml:1347 8.9597 msgid "" 8.9598 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " 8.9599 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" 8.9600 @@ -7250,7 +9141,7 @@ 8.9601 msgstr "" 8.9602 8.9603 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9604 -#: ../en/ch05-collab.xml:1292 8.9605 +#: ../en/ch06-collab.xml:1356 8.9606 msgid "" 8.9607 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but " 8.9608 "preferably brief) string identifying the person or group in charge of the " 8.9609 @@ -7262,21 +9153,21 @@ 8.9610 msgstr "" 8.9611 8.9612 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9613 -#: ../en/ch05-collab.xml:1303 8.9614 +#: ../en/ch06-collab.xml:1367 8.9615 msgid "" 8.9616 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum " 8.9617 "number of changesets to display in a single page of output." 8.9618 msgstr "" 8.9619 8.9620 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9621 -#: ../en/ch05-collab.xml:1307 8.9622 +#: ../en/ch06-collab.xml:1371 8.9623 msgid "" 8.9624 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum " 8.9625 "number of modified files to display in a single page of output." 8.9626 msgstr "" 8.9627 8.9628 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9629 -#: ../en/ch05-collab.xml:1311 8.9630 +#: ../en/ch06-collab.xml:1375 8.9631 msgid "" 8.9632 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " 8.9633 "displays alternating <quote>stripes</quote> to make it easier to visually " 8.9634 @@ -7285,18 +9176,49 @@ 8.9635 msgstr "" 8.9636 8.9637 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9638 -#: ../en/ch05-collab.xml:1317 8.9639 +#: ../en/ch06-collab.xml:1381 8.9640 msgid "" 8.9641 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial " 8.9642 -"uses to display the web interface. Mercurial ships with two web templates, " 8.9643 -"named <literal>default</literal> and <literal>gitweb</literal> (the latter is " 8.9644 -"much more visually attractive). You can also specify a custom template of " 8.9645 -"your own; see <xref linkend=\"chap:template\"/> for details. Here, you can " 8.9646 -"see how to enable the <literal>gitweb</literal> style." 8.9647 +"uses to display the web interface. Mercurial ships with several web " 8.9648 +"templates." 8.9649 +msgstr "" 8.9650 + 8.9651 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9652 +#: ../en/ch06-collab.xml:1387 8.9653 +msgid "<literal>coal</literal> is monochromatic." 8.9654 +msgstr "" 8.9655 + 8.9656 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9657 +#: ../en/ch06-collab.xml:1390 8.9658 +msgid "" 8.9659 +"<literal>gitweb</literal> emulates the visual style of git's web interface." 8.9660 +msgstr "" 8.9661 + 8.9662 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9663 +#: ../en/ch06-collab.xml:1394 8.9664 +msgid "<literal>monoblue</literal> uses solid blues and greys." 8.9665 +msgstr "" 8.9666 + 8.9667 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9668 +#: ../en/ch06-collab.xml:1398 8.9669 +msgid "<literal>paper</literal> is the default." 8.9670 +msgstr "" 8.9671 + 8.9672 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 8.9673 +#: ../en/ch06-collab.xml:1401 8.9674 +msgid "<literal>spartan</literal> was the default for a long time." 8.9675 msgstr "" 8.9676 8.9677 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9678 -#: ../en/ch05-collab.xml:1330 8.9679 +#: ../en/ch06-collab.xml:1405 8.9680 +msgid "" 8.9681 +"You can also specify a custom template of your own; see <xref linkend=\"chap:" 8.9682 +"template\"/> for details. Here, you can see how to enable the " 8.9683 +"<literal>gitweb</literal> style." 8.9684 +msgstr "" 8.9685 + 8.9686 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.9687 +#: ../en/ch06-collab.xml:1413 8.9688 msgid "" 8.9689 "<envar role=\"rc-item-web\">templates</envar>: Path. The directory in which " 8.9690 "to search for template files. By default, Mercurial searches in the " 8.9691 @@ -7304,7 +9226,7 @@ 8.9692 msgstr "" 8.9693 8.9694 #. type: Content of: <book><chapter><sect1><sect2><para> 8.9695 -#: ../en/ch05-collab.xml:1335 8.9696 +#: ../en/ch06-collab.xml:1418 8.9697 msgid "" 8.9698 "If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can " 8.9699 "place a few configuration items in a <literal role=\"rc-web\">web</literal> " 8.9700 @@ -7315,12 +9237,12 @@ 8.9701 msgstr "" 8.9702 8.9703 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9704 -#: ../en/ch05-collab.xml:1346 8.9705 +#: ../en/ch06-collab.xml:1429 8.9706 msgid "Options specific to an individual repository" 8.9707 msgstr "针对单个版本库的选项" 8.9708 8.9709 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9710 -#: ../en/ch05-collab.xml:1348 8.9711 +#: ../en/ch06-collab.xml:1431 8.9712 msgid "" 8.9713 "A few <literal role=\"rc-web\">web</literal> configuration items ought to be " 8.9714 "placed in a repository's local <filename role=\"special\">.hg/hgrc</" 8.9715 @@ -7329,7 +9251,7 @@ 8.9716 msgstr "" 8.9717 8.9718 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9719 -#: ../en/ch05-collab.xml:1353 8.9720 +#: ../en/ch06-collab.xml:1436 8.9721 msgid "" 8.9722 "<envar role=\"rc-item-web\">description</envar>: String. A free-form (but " 8.9723 "preferably brief) string that describes the contents or purpose of the " 8.9724 @@ -7337,7 +9259,7 @@ 8.9725 msgstr "" 8.9726 8.9727 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9728 -#: ../en/ch05-collab.xml:1358 8.9729 +#: ../en/ch06-collab.xml:1441 8.9730 msgid "" 8.9731 "<envar role=\"rc-item-web\">name</envar>: String. The name to use for the " 8.9732 "repository in the web interface. This overrides the default name, which is " 8.9733 @@ -7345,13 +9267,13 @@ 8.9734 msgstr "" 8.9735 8.9736 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9737 -#: ../en/ch05-collab.xml:1366 8.9738 +#: ../en/ch06-collab.xml:1449 8.9739 msgid "" 8.9740 "Options specific to the <command role=\"hg-cmd\">hg serve</command> command" 8.9741 msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项" 8.9742 8.9743 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9744 -#: ../en/ch05-collab.xml:1369 8.9745 +#: ../en/ch06-collab.xml:1452 8.9746 msgid "" 8.9747 "Some of the items in the <literal role=\"rc-web\">web</literal> section of a " 8.9748 "<filename role=\"special\">~/.hgrc</filename> file are only for use with the " 8.9749 @@ -7359,7 +9281,7 @@ 8.9750 msgstr "" 8.9751 8.9752 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9753 -#: ../en/ch05-collab.xml:1375 8.9754 +#: ../en/ch06-collab.xml:1458 8.9755 msgid "" 8.9756 "<envar role=\"rc-item-web\">accesslog</envar>: Path. The name of a file into " 8.9757 "which to write an access log. By default, the <command role=\"hg-cmd\">hg " 8.9758 @@ -7369,7 +9291,7 @@ 8.9759 msgstr "" 8.9760 8.9761 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9762 -#: ../en/ch05-collab.xml:1383 8.9763 +#: ../en/ch06-collab.xml:1466 8.9764 msgid "" 8.9765 "<envar role=\"rc-item-web\">address</envar>: String. The local address on " 8.9766 "which the server should listen for incoming connections. By default, the " 8.9767 @@ -7377,7 +9299,7 @@ 8.9768 msgstr "" 8.9769 8.9770 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9771 -#: ../en/ch05-collab.xml:1388 8.9772 +#: ../en/ch06-collab.xml:1471 8.9773 msgid "" 8.9774 "<envar role=\"rc-item-web\">errorlog</envar>: Path. The name of a file into " 8.9775 "which to write an error log. By default, the <command role=\"hg-cmd\">hg " 8.9776 @@ -7386,21 +9308,21 @@ 8.9777 msgstr "" 8.9778 8.9779 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9780 -#: ../en/ch05-collab.xml:1394 8.9781 +#: ../en/ch06-collab.xml:1477 8.9782 msgid "" 8.9783 "<envar role=\"rc-item-web\">ipv6</envar>: Boolean. Whether to use the IPv6 " 8.9784 "protocol. By default, IPv6 is not used." 8.9785 msgstr "" 8.9786 8.9787 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.9788 -#: ../en/ch05-collab.xml:1398 8.9789 +#: ../en/ch06-collab.xml:1481 8.9790 msgid "" 8.9791 "<envar role=\"rc-item-web\">port</envar>: Integer. The TCP port number on " 8.9792 "which the server should listen. The default port number used is 8000." 8.9793 msgstr "" 8.9794 8.9795 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.9796 -#: ../en/ch05-collab.xml:1405 8.9797 +#: ../en/ch06-collab.xml:1488 8.9798 msgid "" 8.9799 "Choosing the right <filename role=\"special\">~/.hgrc</filename> file to add " 8.9800 "<literal role=\"rc-web\">web</literal> items to" 8.9801 @@ -7409,7 +9331,7 @@ 8.9802 "role=\"rc-web\">web</literal> 条目" 8.9803 8.9804 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9805 -#: ../en/ch05-collab.xml:1409 8.9806 +#: ../en/ch06-collab.xml:1492 8.9807 msgid "" 8.9808 "It is important to remember that a web server like Apache or " 8.9809 "<literal>lighttpd</literal> will run under a user ID that is different to " 8.9810 @@ -7418,37 +9340,86 @@ 8.9811 msgstr "" 8.9812 8.9813 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.9814 -#: ../en/ch05-collab.xml:1416 8.9815 +#: ../en/ch06-collab.xml:1499 8.9816 msgid "" 8.9817 "If you add <literal role=\"rc-web\">web</literal> items to your own personal " 8.9818 "<filename role=\"special\">~/.hgrc</filename> file, CGI scripts won't read " 8.9819 "that <filename role=\"special\">~/.hgrc</filename> file. Those settings will " 8.9820 -"thus only affect the behaviour of the <command role=\"hg-cmd\">hg serve</" 8.9821 +"thus only affect the behavior of the <command role=\"hg-cmd\">hg serve</" 8.9822 "command> command when you run it. To cause CGI scripts to see your settings, " 8.9823 "either create a <filename role=\"special\">~/.hgrc</filename> file in the " 8.9824 "home directory of the user ID that runs your web server, or add those " 8.9825 -"settings to a system-wide <filename role=\"special\">~/.hgrc</filename> file." 8.9826 +"settings to a system-wide <filename role=\"special\">hgrc</filename> file." 8.9827 +msgstr "" 8.9828 + 8.9829 +#. type: Content of: <book><chapter><sect1><title> 8.9830 +#: ../en/ch06-collab.xml:1514 8.9831 +msgid "System-wide configuration" 8.9832 +msgstr "全局配置" 8.9833 + 8.9834 +#. type: Content of: <book><chapter><sect1><para> 8.9835 +#: ../en/ch06-collab.xml:1516 8.9836 +msgid "" 8.9837 +"On Unix-like systems shared by multiple users (such as a server to which " 8.9838 +"people publish changes), it often makes sense to set up some global default " 8.9839 +"behaviors, such as what theme to use in web interfaces." 8.9840 +msgstr "" 8.9841 + 8.9842 +#. type: Content of: <book><chapter><sect1><para> 8.9843 +#: ../en/ch06-collab.xml:1521 8.9844 +msgid "" 8.9845 +"If a file named <filename>/etc/mercurial/hgrc</filename> exists, Mercurial " 8.9846 +"will read it at startup time and apply any configuration settings it finds in " 8.9847 +"that file. It will also look for files ending in a <literal>.rc</literal> " 8.9848 +"extension in a directory named <filename>/etc/mercurial/hgrc.d</filename>, " 8.9849 +"and apply any configuration settings it finds in each of those files." 8.9850 +msgstr "" 8.9851 + 8.9852 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.9853 +#: ../en/ch06-collab.xml:1530 8.9854 +msgid "Making Mercurial more trusting" 8.9855 +msgstr "让 Mercurial 更可信" 8.9856 + 8.9857 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9858 +#: ../en/ch06-collab.xml:1532 8.9859 +msgid "" 8.9860 +"One situation in which a global <filename>hgrc</filename> can be useful is if " 8.9861 +"users are pulling changes owned by other users. By default, Mercurial will " 8.9862 +"not trust most of the configuration items in a <filename>.hg/hgrc</filename> " 8.9863 +"file inside a repository that is owned by a different user. If we clone or " 8.9864 +"pull changes from such a repository, Mercurial will print a warning stating " 8.9865 +"that it does not trust their <filename>.hg/hgrc</filename>." 8.9866 +msgstr "" 8.9867 + 8.9868 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.9869 +#: ../en/ch06-collab.xml:1541 8.9870 +msgid "" 8.9871 +"If everyone in a particular Unix group is on the same team and " 8.9872 +"<emphasis>should</emphasis> trust each other's configuration settings, or we " 8.9873 +"want to trust particular users, we can override Mercurial's skeptical " 8.9874 +"defaults by creating a system-wide <filename>hgrc</filename> file such as the " 8.9875 +"following:" 8.9876 msgstr "" 8.9877 8.9878 #. type: Content of: <book><chapter><title> 8.9879 -#: ../en/ch06-filenames.xml:5 8.9880 +#: ../en/ch07-filenames.xml:5 8.9881 msgid "File names and pattern matching" 8.9882 msgstr "文件名称与模式匹配" 8.9883 8.9884 #. type: Content of: <book><chapter><para> 8.9885 -#: ../en/ch06-filenames.xml:7 8.9886 +#: ../en/ch07-filenames.xml:7 8.9887 msgid "" 8.9888 "Mercurial provides mechanisms that let you work with file names in a " 8.9889 "consistent and expressive way." 8.9890 msgstr "" 8.9891 8.9892 #. type: Content of: <book><chapter><sect1><title> 8.9893 -#: ../en/ch06-filenames.xml:11 8.9894 +#: ../en/ch07-filenames.xml:11 8.9895 msgid "Simple file naming" 8.9896 msgstr "简单文件名称" 8.9897 8.9898 #. type: Content of: <book><chapter><sect1><para> 8.9899 -#: ../en/ch06-filenames.xml:13 8.9900 +#: ../en/ch07-filenames.xml:13 8.9901 msgid "" 8.9902 "Mercurial uses a unified piece of machinery <quote>under the hood</quote> to " 8.9903 "handle file names. Every command behaves uniformly with respect to file " 8.9904 @@ -7456,7 +9427,7 @@ 8.9905 msgstr "" 8.9906 8.9907 #. type: Content of: <book><chapter><sect1><para> 8.9908 -#: ../en/ch06-filenames.xml:18 8.9909 +#: ../en/ch07-filenames.xml:18 8.9910 msgid "" 8.9911 "If you explicitly name real files on the command line, Mercurial works with " 8.9912 "exactly those files, as you would expect. &interaction.filenames.files;" 8.9913 @@ -7464,7 +9435,7 @@ 8.9914 8.9915 # 8.9916 #. type: Content of: <book><chapter><sect1><para> 8.9917 -#: ../en/ch06-filenames.xml:22 8.9918 +#: ../en/ch07-filenames.xml:22 8.9919 msgid "" 8.9920 "When you provide a directory name, Mercurial will interpret this as " 8.9921 "<quote>operate on every file in this directory and its subdirectories</" 8.9922 @@ -7474,29 +9445,29 @@ 8.9923 msgstr "" 8.9924 8.9925 #. type: Content of: <book><chapter><sect1><title> 8.9926 -#: ../en/ch06-filenames.xml:33 8.9927 +#: ../en/ch07-filenames.xml:33 8.9928 msgid "Running commands without any file names" 8.9929 msgstr "不提供文件名称的执行命令" 8.9930 8.9931 #. type: Content of: <book><chapter><sect1><para> 8.9932 -#: ../en/ch06-filenames.xml:35 8.9933 -msgid "" 8.9934 -"Mercurial's commands that work with file names have useful default behaviours " 8.9935 +#: ../en/ch07-filenames.xml:35 8.9936 +msgid "" 8.9937 +"Mercurial's commands that work with file names have useful default behaviors " 8.9938 "when you invoke them without providing any file names or patterns. What kind " 8.9939 -"of behaviour you should expect depends on what the command does. Here are a " 8.9940 +"of behavior you should expect depends on what the command does. Here are a " 8.9941 "few rules of thumb you can use to predict what a command is likely to do if " 8.9942 "you don't give it any names to work with." 8.9943 msgstr "" 8.9944 8.9945 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.9946 -#: ../en/ch06-filenames.xml:42 8.9947 +#: ../en/ch07-filenames.xml:42 8.9948 msgid "" 8.9949 "Most commands will operate on the entire working directory. This is what the " 8.9950 "<command role=\"hg-cmd\">hg add</command> command does, for example." 8.9951 msgstr "" 8.9952 8.9953 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.9954 -#: ../en/ch06-filenames.xml:46 8.9955 +#: ../en/ch07-filenames.xml:46 8.9956 msgid "" 8.9957 "If the command has effects that are difficult or impossible to reverse, it " 8.9958 "will force you to explicitly provide at least one name or pattern (see " 8.9959 @@ -7504,11 +9475,10 @@ 8.9960 "<command role=\"hg-cmd\">hg remove</command> with no arguments, for example." 8.9961 msgstr "" 8.9962 8.9963 -# 8.9964 -#. type: Content of: <book><chapter><sect1><para> 8.9965 -#: ../en/ch06-filenames.xml:54 8.9966 -msgid "" 8.9967 -"It's easy to work around these default behaviours if they don't suit you. If " 8.9968 +#. type: Content of: <book><chapter><sect1><para> 8.9969 +#: ../en/ch07-filenames.xml:54 8.9970 +msgid "" 8.9971 +"It's easy to work around these default behaviors if they don't suit you. If " 8.9972 "a command normally operates on the whole working directory, you can invoke it " 8.9973 "on just the current directory and its subdirectories by giving it the name " 8.9974 "<quote><filename class=\"directory\">.</filename></quote>." 8.9975 @@ -7516,7 +9486,7 @@ 8.9976 8.9977 # 8.9978 #. type: Content of: <book><chapter><sect1><para> 8.9979 -#: ../en/ch06-filenames.xml:62 8.9980 +#: ../en/ch07-filenames.xml:62 8.9981 msgid "" 8.9982 "Along the same lines, some commands normally print file names relative to the " 8.9983 "root of the repository, even if you're invoking them from a subdirectory. " 8.9984 @@ -7529,12 +9499,12 @@ 8.9985 msgstr "" 8.9986 8.9987 #. type: Content of: <book><chapter><sect1><title> 8.9988 -#: ../en/ch06-filenames.xml:76 8.9989 +#: ../en/ch07-filenames.xml:76 8.9990 msgid "Telling you what's going on" 8.9991 msgstr "告诉你正在做什么" 8.9992 8.9993 #. type: Content of: <book><chapter><sect1><para> 8.9994 -#: ../en/ch06-filenames.xml:78 8.9995 +#: ../en/ch07-filenames.xml:78 8.9996 msgid "" 8.9997 "The <command role=\"hg-cmd\">hg add</command> example in the preceding " 8.9998 "section illustrates something else that's helpful about Mercurial commands. " 8.9999 @@ -7544,17 +9514,17 @@ 8.10000 msgstr "" 8.10001 8.10002 #. type: Content of: <book><chapter><sect1><para> 8.10003 -#: ../en/ch06-filenames.xml:85 8.10004 +#: ../en/ch07-filenames.xml:85 8.10005 msgid "" 8.10006 "The principle here is of <emphasis>least surprise</emphasis>. If you've " 8.10007 "exactly named a file on the command line, there's no point in repeating it " 8.10008 "back at you. If Mercurial is acting on a file <emphasis>implicitly</" 8.10009 -"emphasis>, because you provided no names, or a directory, or a pattern (see " 8.10010 -"below), it's safest to tell you what it's doing." 8.10011 -msgstr "" 8.10012 - 8.10013 -#. type: Content of: <book><chapter><sect1><para> 8.10014 -#: ../en/ch06-filenames.xml:92 8.10015 +"emphasis>, e.g. because you provided no names, or a directory, or a pattern " 8.10016 +"(see below), it is safest to tell you what files it's operating on." 8.10017 +msgstr "" 8.10018 + 8.10019 +#. type: Content of: <book><chapter><sect1><para> 8.10020 +#: ../en/ch07-filenames.xml:92 8.10021 msgid "" 8.10022 "For commands that behave this way, you can silence them using the <option " 8.10023 "role=\"hg-opt-global\">-q</option> option. You can also get them to print " 8.10024 @@ -7563,12 +9533,12 @@ 8.10025 msgstr "" 8.10026 8.10027 #. type: Content of: <book><chapter><sect1><title> 8.10028 -#: ../en/ch06-filenames.xml:100 8.10029 +#: ../en/ch07-filenames.xml:100 8.10030 msgid "Using patterns to identify files" 8.10031 msgstr "使用模式标识文件" 8.10032 8.10033 #. type: Content of: <book><chapter><sect1><para> 8.10034 -#: ../en/ch06-filenames.xml:102 8.10035 +#: ../en/ch07-filenames.xml:102 8.10036 msgid "" 8.10037 "In addition to working with file and directory names, Mercurial lets you use " 8.10038 "<emphasis>patterns</emphasis> to identify files. Mercurial's pattern " 8.10039 @@ -7576,7 +9546,7 @@ 8.10040 msgstr "" 8.10041 8.10042 #. type: Content of: <book><chapter><sect1><para> 8.10043 -#: ../en/ch06-filenames.xml:106 8.10044 +#: ../en/ch07-filenames.xml:106 8.10045 msgid "" 8.10046 "On Unix-like systems (Linux, MacOS, etc.), the job of matching file names to " 8.10047 "patterns normally falls to the shell. On these systems, you must explicitly " 8.10048 @@ -7586,21 +9556,21 @@ 8.10049 msgstr "" 8.10050 8.10051 #. type: Content of: <book><chapter><sect1><para> 8.10052 -#: ../en/ch06-filenames.xml:113 8.10053 +#: ../en/ch07-filenames.xml:113 8.10054 msgid "" 8.10055 "To provide a pattern in place of a regular name on the command line, the " 8.10056 "mechanism is simple:" 8.10057 msgstr "" 8.10058 8.10059 #. type: Content of: <book><chapter><sect1><para> 8.10060 -#: ../en/ch06-filenames.xml:116 8.10061 +#: ../en/ch07-filenames.xml:116 8.10062 msgid "" 8.10063 "That is, a pattern is identified by a short text string that says what kind " 8.10064 "of pattern this is, followed by a colon, followed by the actual pattern." 8.10065 msgstr "" 8.10066 8.10067 #. type: Content of: <book><chapter><sect1><para> 8.10068 -#: ../en/ch06-filenames.xml:120 8.10069 +#: ../en/ch07-filenames.xml:120 8.10070 msgid "" 8.10071 "Mercurial supports two kinds of pattern syntax. The most frequently used is " 8.10072 "called <literal>glob</literal>; this is the same kind of pattern matching " 8.10073 @@ -7609,7 +9579,7 @@ 8.10074 msgstr "" 8.10075 8.10076 #. type: Content of: <book><chapter><sect1><para> 8.10077 -#: ../en/ch06-filenames.xml:125 8.10078 +#: ../en/ch07-filenames.xml:125 8.10079 msgid "" 8.10080 "When Mercurial does automatic pattern matching on Windows, it uses " 8.10081 "<literal>glob</literal> syntax. You can thus omit the <quote><literal>glob:</" 8.10082 @@ -7617,14 +9587,14 @@ 8.10083 msgstr "" 8.10084 8.10085 #. type: Content of: <book><chapter><sect1><para> 8.10086 -#: ../en/ch06-filenames.xml:130 8.10087 +#: ../en/ch07-filenames.xml:130 8.10088 msgid "" 8.10089 "The <literal>re</literal> syntax is more powerful; it lets you specify " 8.10090 "patterns using regular expressions, also known as regexps." 8.10091 msgstr "" 8.10092 8.10093 #. type: Content of: <book><chapter><sect1><para> 8.10094 -#: ../en/ch06-filenames.xml:134 8.10095 +#: ../en/ch07-filenames.xml:134 8.10096 msgid "" 8.10097 "By the way, in the examples that follow, notice that I'm careful to wrap all " 8.10098 "of my patterns in quote characters, so that they won't get expanded by the " 8.10099 @@ -7632,12 +9602,12 @@ 8.10100 msgstr "" 8.10101 8.10102 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10103 -#: ../en/ch06-filenames.xml:140 8.10104 +#: ../en/ch07-filenames.xml:140 8.10105 msgid "Shell-style <literal>glob</literal> patterns" 8.10106 msgstr "外壳风格的 <literal>glob</literal> 模式" 8.10107 8.10108 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10109 -#: ../en/ch06-filenames.xml:142 8.10110 +#: ../en/ch07-filenames.xml:142 8.10111 msgid "" 8.10112 "This is an overview of the kinds of patterns you can use when you're matching " 8.10113 "on glob patterns." 8.10114 @@ -7645,7 +9615,7 @@ 8.10115 8.10116 # 8.10117 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10118 -#: ../en/ch06-filenames.xml:145 8.10119 +#: ../en/ch07-filenames.xml:145 8.10120 msgid "" 8.10121 "The <quote><literal>*</literal></quote> character matches any string, within " 8.10122 "a single directory." 8.10123 @@ -7653,7 +9623,7 @@ 8.10124 8.10125 # 8.10126 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10127 -#: ../en/ch06-filenames.xml:150 8.10128 +#: ../en/ch07-filenames.xml:150 8.10129 msgid "" 8.10130 "The <quote><literal>**</literal></quote> pattern matches any string, and " 8.10131 "crosses directory boundaries. It's not a standard Unix glob token, but it's " 8.10132 @@ -7662,13 +9632,13 @@ 8.10133 8.10134 # 8.10135 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10136 -#: ../en/ch06-filenames.xml:157 8.10137 +#: ../en/ch07-filenames.xml:157 8.10138 msgid "" 8.10139 "The <quote><literal>?</literal></quote> pattern matches any single character." 8.10140 msgstr "" 8.10141 8.10142 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10143 -#: ../en/ch06-filenames.xml:162 8.10144 +#: ../en/ch07-filenames.xml:162 8.10145 msgid "" 8.10146 "The <quote><literal>[</literal></quote> character begins a " 8.10147 "<emphasis>character class</emphasis>. This matches any single character " 8.10148 @@ -7679,7 +9649,7 @@ 8.10149 msgstr "" 8.10150 8.10151 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10152 -#: ../en/ch06-filenames.xml:172 8.10153 +#: ../en/ch07-filenames.xml:172 8.10154 msgid "" 8.10155 "If the first character after the <quote><literal>[</literal></quote> in a " 8.10156 "character class is a <quote><literal>!</literal></quote>, it " 8.10157 @@ -7688,7 +9658,7 @@ 8.10158 msgstr "" 8.10159 8.10160 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10161 -#: ../en/ch06-filenames.xml:178 8.10162 +#: ../en/ch07-filenames.xml:178 8.10163 msgid "" 8.10164 "A <quote><literal>{</literal></quote> begins a group of subpatterns, where " 8.10165 "the whole group matches if any subpattern in the group matches. The " 8.10166 @@ -7697,13 +9667,13 @@ 8.10167 msgstr "" 8.10168 8.10169 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.10170 -#: ../en/ch06-filenames.xml:187 8.10171 +#: ../en/ch07-filenames.xml:187 8.10172 msgid "Watch out!" 8.10173 msgstr "千万小心!" 8.10174 8.10175 # 8.10176 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.10177 -#: ../en/ch06-filenames.xml:189 8.10178 +#: ../en/ch07-filenames.xml:189 8.10179 msgid "" 8.10180 "Don't forget that if you want to match a pattern in any directory, you should " 8.10181 "not be using the <quote><literal>*</literal></quote> match-any token, as this " 8.10182 @@ -7713,12 +9683,12 @@ 8.10183 msgstr "" 8.10184 8.10185 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10186 -#: ../en/ch06-filenames.xml:201 8.10187 +#: ../en/ch07-filenames.xml:201 8.10188 msgid "Regular expression matching with <literal>re</literal> patterns" 8.10189 msgstr "使用 <literal>re</literal> 模式的正则表达式匹配" 8.10190 8.10191 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10192 -#: ../en/ch06-filenames.xml:204 8.10193 +#: ../en/ch07-filenames.xml:204 8.10194 msgid "" 8.10195 "Mercurial accepts the same regular expression syntax as the Python " 8.10196 "programming language (it uses Python's regexp engine internally). This is " 8.10197 @@ -7727,7 +9697,7 @@ 8.10198 msgstr "" 8.10199 8.10200 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10201 -#: ../en/ch06-filenames.xml:210 8.10202 +#: ../en/ch07-filenames.xml:210 8.10203 msgid "" 8.10204 "I won't discuss Mercurial's regexp dialect in any detail here, as regexps are " 8.10205 "not often used. Perl-style regexps are in any case already exhaustively " 8.10206 @@ -7737,7 +9707,7 @@ 8.10207 msgstr "" 8.10208 8.10209 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10210 -#: ../en/ch06-filenames.xml:217 8.10211 +#: ../en/ch07-filenames.xml:217 8.10212 msgid "" 8.10213 "A regexp is matched against an entire file name, relative to the root of the " 8.10214 "repository. In other words, even if you're already in subbdirectory " 8.10215 @@ -7747,7 +9717,7 @@ 8.10216 msgstr "" 8.10217 8.10218 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10219 -#: ../en/ch06-filenames.xml:224 8.10220 +#: ../en/ch07-filenames.xml:224 8.10221 msgid "" 8.10222 "One thing to note, if you're familiar with Perl-style regexps, is that " 8.10223 "Mercurial's are <emphasis>rooted</emphasis>. That is, a regexp starts " 8.10224 @@ -7757,12 +9727,12 @@ 8.10225 msgstr "" 8.10226 8.10227 #. type: Content of: <book><chapter><sect1><title> 8.10228 -#: ../en/ch06-filenames.xml:234 8.10229 +#: ../en/ch07-filenames.xml:234 8.10230 msgid "Filtering files" 8.10231 msgstr "过滤文件" 8.10232 8.10233 #. type: Content of: <book><chapter><sect1><para> 8.10234 -#: ../en/ch06-filenames.xml:236 8.10235 +#: ../en/ch07-filenames.xml:236 8.10236 msgid "" 8.10237 "Not only does Mercurial give you a variety of ways to specify files; it lets " 8.10238 "you further winnow those files using <emphasis>filters</emphasis>. Commands " 8.10239 @@ -7770,7 +9740,7 @@ 8.10240 msgstr "" 8.10241 8.10242 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10243 -#: ../en/ch06-filenames.xml:241 8.10244 +#: ../en/ch07-filenames.xml:241 8.10245 msgid "" 8.10246 "<option role=\"hg-opt-global\">-I</option>, or <option role=\"hg-opt-global" 8.10247 "\">--include</option>, lets you specify a pattern that file names must match " 8.10248 @@ -7778,7 +9748,7 @@ 8.10249 msgstr "" 8.10250 8.10251 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10252 -#: ../en/ch06-filenames.xml:246 8.10253 +#: ../en/ch07-filenames.xml:246 8.10254 msgid "" 8.10255 "<option role=\"hg-opt-global\">-X</option>, or <option role=\"hg-opt-global" 8.10256 "\">--exclude</option>, gives you a way to <emphasis>avoid</emphasis> " 8.10257 @@ -7786,7 +9756,7 @@ 8.10258 msgstr "" 8.10259 8.10260 #. type: Content of: <book><chapter><sect1><para> 8.10261 -#: ../en/ch06-filenames.xml:251 8.10262 +#: ../en/ch07-filenames.xml:251 8.10263 msgid "" 8.10264 "You can provide multiple <option role=\"hg-opt-global\">-I</option> and " 8.10265 "<option role=\"hg-opt-global\">-X</option> options on the command line, and " 8.10266 @@ -7795,36 +9765,77 @@ 8.10267 msgstr "" 8.10268 8.10269 #. type: Content of: <book><chapter><sect1><para> 8.10270 -#: ../en/ch06-filenames.xml:258 8.10271 +#: ../en/ch07-filenames.xml:258 8.10272 msgid "" 8.10273 "You can read a <option role=\"hg-opt-global\">-I</option> filter as " 8.10274 "<quote>process only the files that match this filter</quote>." 8.10275 msgstr "" 8.10276 8.10277 #. type: Content of: <book><chapter><sect1><para> 8.10278 -#: ../en/ch06-filenames.xml:264 8.10279 +#: ../en/ch07-filenames.xml:264 8.10280 msgid "" 8.10281 "The <option role=\"hg-opt-global\">-X</option> filter is best read as " 8.10282 "<quote>process only the files that don't match this pattern</quote>." 8.10283 msgstr "" 8.10284 8.10285 #. type: Content of: <book><chapter><sect1><title> 8.10286 -#: ../en/ch06-filenames.xml:272 8.10287 -msgid "Ignoring unwanted files and directories" 8.10288 -msgstr "忽略不需要的文件和目录" 8.10289 - 8.10290 -#. type: Content of: <book><chapter><sect1><para> 8.10291 -#: ../en/ch06-filenames.xml:274 8.10292 -msgid "XXX." 8.10293 +#: ../en/ch07-filenames.xml:272 8.10294 +msgid "Permanently ignoring unwanted files and directories" 8.10295 +msgstr "始终忽略不需要的文件和目录" 8.10296 + 8.10297 +#. type: Content of: <book><chapter><sect1><para> 8.10298 +#: ../en/ch07-filenames.xml:274 8.10299 +msgid "" 8.10300 +"When you create a new repository, the chances are that over time it will grow " 8.10301 +"to contain files that ought to <emphasis>not</emphasis> be managed by " 8.10302 +"Mercurial, but which you don't want to see listed every time you run " 8.10303 +"<command>hg status</command>. For instance, <quote>build products</quote> " 8.10304 +"are files that are created as part of a build but which should not be managed " 8.10305 +"by a revision control system. The most common build products are output " 8.10306 +"files produced by software tools such as compilers. As another example, many " 8.10307 +"text editors litter a directory with lock files, temporary working files, and " 8.10308 +"backup files, which it also makes no sense to manage." 8.10309 +msgstr "" 8.10310 + 8.10311 +#. type: Content of: <book><chapter><sect1><para> 8.10312 +#: ../en/ch07-filenames.xml:286 8.10313 +msgid "" 8.10314 +"To have Mercurial permanently ignore such files, create a file named " 8.10315 +"<filename>.hgignore</filename> in the root of your repository. You " 8.10316 +"<emphasis>should</emphasis> <command>hg add</command> this file so that it " 8.10317 +"gets tracked with the rest of your repository contents, since your " 8.10318 +"collaborators will probably find it useful too." 8.10319 +msgstr "" 8.10320 + 8.10321 +#. type: Content of: <book><chapter><sect1><para> 8.10322 +#: ../en/ch07-filenames.xml:293 8.10323 +msgid "" 8.10324 +"By default, the <filename>.hgignore</filename> file should contain a list of " 8.10325 +"regular expressions, one per line. Empty lines are skipped. Most people " 8.10326 +"prefer to describe the files they want to ignore using the <quote>glob</" 8.10327 +"quote> syntax that we described above, so a typical <filename>.hgignore</" 8.10328 +"filename> file will start with this directive:" 8.10329 +msgstr "" 8.10330 + 8.10331 +#. type: Content of: <book><chapter><sect1><para> 8.10332 +#: ../en/ch07-filenames.xml:302 8.10333 +msgid "" 8.10334 +"This tells Mercurial to interpret the lines that follow as glob patterns, not " 8.10335 +"regular expressions." 8.10336 +msgstr "" 8.10337 + 8.10338 +#. type: Content of: <book><chapter><sect1><para> 8.10339 +#: ../en/ch07-filenames.xml:305 8.10340 +msgid "Here is a typical-looking <filename>.hgignore</filename> file." 8.10341 msgstr "" 8.10342 8.10343 #. type: Content of: <book><chapter><sect1><title> 8.10344 -#: ../en/ch06-filenames.xml:278 8.10345 +#: ../en/ch07-filenames.xml:329 8.10346 msgid "Case sensitivity" 8.10347 msgstr "大小写敏感性" 8.10348 8.10349 #. type: Content of: <book><chapter><sect1><para> 8.10350 -#: ../en/ch06-filenames.xml:280 8.10351 +#: ../en/ch07-filenames.xml:331 8.10352 msgid "" 8.10353 "If you're working in a mixed development environment that contains both Linux " 8.10354 "(or other Unix) systems and Macs or Windows systems, you should keep in the " 8.10355 @@ -7835,7 +9846,7 @@ 8.10356 msgstr "" 8.10357 8.10358 #. type: Content of: <book><chapter><sect1><para> 8.10359 -#: ../en/ch06-filenames.xml:289 8.10360 +#: ../en/ch07-filenames.xml:340 8.10361 msgid "" 8.10362 "Operating systems and filesystems differ in the way they handle the " 8.10363 "<emphasis>case</emphasis> of characters in file and directory names. There " 8.10364 @@ -7843,7 +9854,7 @@ 8.10365 msgstr "" 8.10366 8.10367 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10368 -#: ../en/ch06-filenames.xml:294 8.10369 +#: ../en/ch07-filenames.xml:345 8.10370 msgid "" 8.10371 "Completely case insensitive. Uppercase and lowercase versions of a letter " 8.10372 "are treated as identical, both when creating a file and during subsequent " 8.10373 @@ -7851,7 +9862,7 @@ 8.10374 msgstr "" 8.10375 8.10376 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10377 -#: ../en/ch06-filenames.xml:299 8.10378 +#: ../en/ch07-filenames.xml:350 8.10379 msgid "" 8.10380 "Case preserving, but insensitive. When a file or directory is created, the " 8.10381 "case of its name is stored, and can be retrieved and displayed by the " 8.10382 @@ -7863,15 +9874,15 @@ 8.10383 msgstr "" 8.10384 8.10385 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10386 -#: ../en/ch06-filenames.xml:310 8.10387 +#: ../en/ch07-filenames.xml:361 8.10388 msgid "" 8.10389 "Case sensitive. The case of a name is significant at all times. The names " 8.10390 -"<filename>foo</filename> and {FoO} identify different files. This is the way " 8.10391 -"Linux and Unix systems normally work." 8.10392 -msgstr "" 8.10393 - 8.10394 -#. type: Content of: <book><chapter><sect1><para> 8.10395 -#: ../en/ch06-filenames.xml:316 8.10396 +"<filename>foo</filename> and <filename>FoO</filename> identify different " 8.10397 +"files. This is the way Linux and Unix systems normally work." 8.10398 +msgstr "" 8.10399 + 8.10400 +#. type: Content of: <book><chapter><sect1><para> 8.10401 +#: ../en/ch07-filenames.xml:368 8.10402 msgid "" 8.10403 "On Unix-like systems, it is possible to have any or all of the above ways of " 8.10404 "handling case in action at once. For example, if you use a USB thumb drive " 8.10405 @@ -7880,12 +9891,12 @@ 8.10406 msgstr "" 8.10407 8.10408 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10409 -#: ../en/ch06-filenames.xml:323 8.10410 +#: ../en/ch07-filenames.xml:375 8.10411 msgid "Safe, portable repository storage" 8.10412 msgstr "安全,可移植的版本库存储" 8.10413 8.10414 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10415 -#: ../en/ch06-filenames.xml:325 8.10416 +#: ../en/ch07-filenames.xml:377 8.10417 msgid "" 8.10418 "Mercurial's repository storage mechanism is <emphasis>case safe</emphasis>. " 8.10419 "It translates file names so that they can be safely stored on both case " 8.10420 @@ -7896,12 +9907,12 @@ 8.10421 msgstr "" 8.10422 8.10423 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10424 -#: ../en/ch06-filenames.xml:336 8.10425 +#: ../en/ch07-filenames.xml:388 8.10426 msgid "Detecting case conflicts" 8.10427 msgstr "检测大小写冲突" 8.10428 8.10429 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10430 -#: ../en/ch06-filenames.xml:338 8.10431 +#: ../en/ch07-filenames.xml:390 8.10432 msgid "" 8.10433 "When operating in the working directory, Mercurial honours the naming policy " 8.10434 "of the filesystem where the working directory is located. If the filesystem " 8.10435 @@ -7910,7 +9921,7 @@ 8.10436 msgstr "" 8.10437 8.10438 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10439 -#: ../en/ch06-filenames.xml:344 8.10440 +#: ../en/ch07-filenames.xml:396 8.10441 msgid "" 8.10442 "An important aspect of this approach is that it is possible to commit a " 8.10443 "changeset on a case sensitive (typically Linux or Unix) filesystem that will " 8.10444 @@ -7923,7 +9934,7 @@ 8.10445 msgstr "" 8.10446 8.10447 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10448 -#: ../en/ch06-filenames.xml:355 8.10449 +#: ../en/ch07-filenames.xml:407 8.10450 msgid "" 8.10451 "If a Windows or Mac user pulls this change, they will not initially have a " 8.10452 "problem, because Mercurial's repository storage mechanism is case safe. " 8.10453 @@ -7935,12 +9946,12 @@ 8.10454 msgstr "" 8.10455 8.10456 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10457 -#: ../en/ch06-filenames.xml:367 8.10458 +#: ../en/ch07-filenames.xml:419 8.10459 msgid "Fixing a case conflict" 8.10460 msgstr "修正大小写冲突" 8.10461 8.10462 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10463 -#: ../en/ch06-filenames.xml:369 8.10464 +#: ../en/ch07-filenames.xml:421 8.10465 msgid "" 8.10466 "If you are using Windows or a Mac in a mixed environment where some of your " 8.10467 "collaborators are using Linux or Unix, and Mercurial reports a case folding " 8.10468 @@ -7950,7 +9961,7 @@ 8.10469 msgstr "" 8.10470 8.10471 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10472 -#: ../en/ch06-filenames.xml:376 8.10473 +#: ../en/ch07-filenames.xml:428 8.10474 msgid "" 8.10475 "Just find a nearby Linux or Unix box, clone the problem repository onto it, " 8.10476 "and use Mercurial's <command role=\"hg-cmd\">hg rename</command> command to " 8.10477 @@ -7962,7 +9973,7 @@ 8.10478 msgstr "" 8.10479 8.10480 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10481 -#: ../en/ch06-filenames.xml:386 8.10482 +#: ../en/ch07-filenames.xml:438 8.10483 msgid "" 8.10484 "The changeset with case-conflicting names will remain in your project's " 8.10485 "history, and you still won't be able to <command role=\"hg-cmd\">hg update</" 8.10486 @@ -7970,22 +9981,13 @@ 8.10487 "system, but you can continue development unimpeded." 8.10488 msgstr "" 8.10489 8.10490 -#. type: Content of: <book><chapter><sect1><sect2><note><para> 8.10491 -#: ../en/ch06-filenames.xml:393 8.10492 -msgid "" 8.10493 -"Prior to version 0.9.3, Mercurial did not use a case safe repository storage " 8.10494 -"mechanism, and did not detect case folding conflicts. If you are using an " 8.10495 -"older version of Mercurial on Windows or MacOS, I strongly recommend that you " 8.10496 -"upgrade." 8.10497 -msgstr "" 8.10498 - 8.10499 #. type: Content of: <book><chapter><title> 8.10500 -#: ../en/ch07-branch.xml:5 8.10501 +#: ../en/ch08-branch.xml:5 8.10502 msgid "Managing releases and branchy development" 8.10503 msgstr "发布管理与分支开发" 8.10504 8.10505 #. type: Content of: <book><chapter><para> 8.10506 -#: ../en/ch07-branch.xml:7 8.10507 +#: ../en/ch08-branch.xml:7 8.10508 msgid "" 8.10509 "Mercurial provides several mechanisms for you to manage a project that is " 8.10510 "making progress on multiple fronts at once. To understand these mechanisms, " 8.10511 @@ -7993,7 +9995,7 @@ 8.10512 msgstr "" 8.10513 8.10514 #. type: Content of: <book><chapter><para> 8.10515 -#: ../en/ch07-branch.xml:12 8.10516 +#: ../en/ch08-branch.xml:12 8.10517 msgid "" 8.10518 "Many software projects issue periodic <quote>major</quote> releases that " 8.10519 "contain substantial new features. In parallel, they may issue <quote>minor</" 8.10520 @@ -8002,7 +10004,7 @@ 8.10521 msgstr "" 8.10522 8.10523 #. type: Content of: <book><chapter><para> 8.10524 -#: ../en/ch07-branch.xml:18 8.10525 +#: ../en/ch08-branch.xml:18 8.10526 msgid "" 8.10527 "In this chapter, we'll start by talking about how to keep records of project " 8.10528 "milestones such as releases. We'll then continue on to talk about the flow " 8.10529 @@ -8011,12 +10013,12 @@ 8.10530 msgstr "" 8.10531 8.10532 #. type: Content of: <book><chapter><sect1><title> 8.10533 -#: ../en/ch07-branch.xml:25 8.10534 +#: ../en/ch08-branch.xml:25 8.10535 msgid "Giving a persistent name to a revision" 8.10536 msgstr "给版本指定一个永久的名称" 8.10537 8.10538 #. type: Content of: <book><chapter><sect1><para> 8.10539 -#: ../en/ch07-branch.xml:27 8.10540 +#: ../en/ch08-branch.xml:27 8.10541 msgid "" 8.10542 "Once you decide that you'd like to call a particular revision a " 8.10543 "<quote>release</quote>, it's a good idea to record the identity of that " 8.10544 @@ -8027,7 +10029,7 @@ 8.10545 8.10546 # 8.10547 #. type: Content of: <book><chapter><sect1><para> 8.10548 -#: ../en/ch07-branch.xml:34 8.10549 +#: ../en/ch08-branch.xml:34 8.10550 msgid "" 8.10551 "Mercurial lets you give a permanent name to any revision using the <command " 8.10552 "role=\"hg-cmd\">hg tag</command> command. Not surprisingly, these names are " 8.10553 @@ -8035,7 +10037,7 @@ 8.10554 msgstr "" 8.10555 8.10556 #. type: Content of: <book><chapter><sect1><para> 8.10557 -#: ../en/ch07-branch.xml:40 8.10558 +#: ../en/ch08-branch.xml:40 8.10559 msgid "" 8.10560 "A tag is nothing more than a <quote>symbolic name</quote> for a revision. " 8.10561 "Tags exist purely for your convenience, so that you have a handy permanent " 8.10562 @@ -8046,22 +10048,22 @@ 8.10563 msgstr "" 8.10564 8.10565 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10566 -#: ../en/ch07-branch.xml:49 8.10567 +#: ../en/ch08-branch.xml:49 8.10568 msgid "Colon (ASCII 58, <quote><literal>:</literal></quote>)" 8.10569 msgstr "" 8.10570 8.10571 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10572 -#: ../en/ch07-branch.xml:52 8.10573 +#: ../en/ch08-branch.xml:52 8.10574 msgid "Carriage return (ASCII 13, <quote><literal>\\r</literal></quote>)" 8.10575 msgstr "" 8.10576 8.10577 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10578 -#: ../en/ch07-branch.xml:55 8.10579 +#: ../en/ch08-branch.xml:55 8.10580 msgid "Newline (ASCII 10, <quote><literal>\\n</literal></quote>)" 8.10581 msgstr "" 8.10582 8.10583 #. type: Content of: <book><chapter><sect1><para> 8.10584 -#: ../en/ch07-branch.xml:59 8.10585 +#: ../en/ch08-branch.xml:59 8.10586 msgid "" 8.10587 "You can use the <command role=\"hg-cmd\">hg tags</command> command to display " 8.10588 "the tags present in your repository. In the output, each tagged revision is " 8.10589 @@ -8070,7 +10072,7 @@ 8.10590 msgstr "" 8.10591 8.10592 #. type: Content of: <book><chapter><sect1><para> 8.10593 -#: ../en/ch07-branch.xml:67 8.10594 +#: ../en/ch08-branch.xml:67 8.10595 msgid "" 8.10596 "Notice that <literal>tip</literal> is listed in the output of <command role=" 8.10597 "\"hg-cmd\">hg tags</command>. The <literal>tip</literal> tag is a special " 8.10598 @@ -8079,7 +10081,7 @@ 8.10599 msgstr "" 8.10600 8.10601 #. type: Content of: <book><chapter><sect1><para> 8.10602 -#: ../en/ch07-branch.xml:73 8.10603 +#: ../en/ch08-branch.xml:73 8.10604 msgid "" 8.10605 "In the output of the <command role=\"hg-cmd\">hg tags</command> command, tags " 8.10606 "are listed in reverse order, by revision number. This usually means that " 8.10607 @@ -8089,7 +10091,7 @@ 8.10608 msgstr "" 8.10609 8.10610 #. type: Content of: <book><chapter><sect1><para> 8.10611 -#: ../en/ch07-branch.xml:80 8.10612 +#: ../en/ch08-branch.xml:80 8.10613 msgid "" 8.10614 "When you run <command role=\"hg-cmd\">hg log</command>, if it displays a " 8.10615 "revision that has tags associated with it, it will print those tags." 8.10616 @@ -8097,7 +10099,7 @@ 8.10617 8.10618 # 8.10619 #. type: Content of: <book><chapter><sect1><para> 8.10620 -#: ../en/ch07-branch.xml:86 8.10621 +#: ../en/ch08-branch.xml:86 8.10622 msgid "" 8.10623 "Any time you need to provide a revision ID to a Mercurial command, the " 8.10624 "command will accept a tag name in its place. Internally, Mercurial will " 8.10625 @@ -8105,7 +10107,7 @@ 8.10626 msgstr "" 8.10627 8.10628 #. type: Content of: <book><chapter><sect1><para> 8.10629 -#: ../en/ch07-branch.xml:93 8.10630 +#: ../en/ch08-branch.xml:93 8.10631 msgid "" 8.10632 "There's no limit on the number of tags you can have in a repository, or on " 8.10633 "the number of tags that a single revision can have. As a practical matter, " 8.10634 @@ -8116,7 +10118,7 @@ 8.10635 msgstr "" 8.10636 8.10637 #. type: Content of: <book><chapter><sect1><para> 8.10638 -#: ../en/ch07-branch.xml:101 8.10639 +#: ../en/ch08-branch.xml:101 8.10640 msgid "" 8.10641 "For example, if your project has milestones as frequent as every few days, " 8.10642 "it's perfectly reasonable to tag each one of those. But if you have a " 8.10643 @@ -8127,14 +10129,14 @@ 8.10644 msgstr "" 8.10645 8.10646 #. type: Content of: <book><chapter><sect1><para> 8.10647 -#: ../en/ch07-branch.xml:109 8.10648 +#: ../en/ch08-branch.xml:109 8.10649 msgid "" 8.10650 "If you want to remove a tag that you no longer want, use <command role=\"hg-" 8.10651 "cmd\">hg tag --remove</command>." 8.10652 msgstr "" 8.10653 8.10654 #. type: Content of: <book><chapter><sect1><para> 8.10655 -#: ../en/ch07-branch.xml:114 8.10656 +#: ../en/ch08-branch.xml:114 8.10657 msgid "" 8.10658 "You can also modify a tag at any time, so that it identifies a different " 8.10659 "revision, by simply issuing a new <command role=\"hg-cmd\">hg tag</command> " 8.10660 @@ -8144,7 +10146,7 @@ 8.10661 msgstr "" 8.10662 8.10663 #. type: Content of: <book><chapter><sect1><para> 8.10664 -#: ../en/ch07-branch.xml:123 8.10665 +#: ../en/ch08-branch.xml:123 8.10666 msgid "" 8.10667 "There will still be a permanent record of the previous identity of the tag, " 8.10668 "but Mercurial will no longer use it. There's thus no penalty to tagging the " 8.10669 @@ -8152,26 +10154,26 @@ 8.10670 "revision once you discover your error." 8.10671 msgstr "" 8.10672 8.10673 -# 8.10674 -#. type: Content of: <book><chapter><sect1><para> 8.10675 -#: ../en/ch07-branch.xml:129 8.10676 +#. type: Content of: <book><chapter><sect1><para> 8.10677 +#: ../en/ch08-branch.xml:129 8.10678 msgid "" 8.10679 "Mercurial stores tags in a normal revision-controlled file in your " 8.10680 -"repository. If you've created any tags, you'll find them in a file named " 8.10681 -"<filename role=\"special\">.hgtags</filename>. When you run the <command " 8.10682 -"role=\"hg-cmd\">hg tag</command> command, Mercurial modifies this file, then " 8.10683 -"automatically commits the change to it. This means that every time you run " 8.10684 -"<command role=\"hg-cmd\">hg tag</command>, you'll see a corresponding " 8.10685 -"changeset in the output of <command role=\"hg-cmd\">hg log</command>." 8.10686 +"repository. If you've created any tags, you'll find them in a file in the " 8.10687 +"root of your repository named <filename role=\"special\">.hgtags</filename>. " 8.10688 +"When you run the <command role=\"hg-cmd\">hg tag</command> command, Mercurial " 8.10689 +"modifies this file, then automatically commits the change to it. This means " 8.10690 +"that every time you run <command role=\"hg-cmd\">hg tag</command>, you'll see " 8.10691 +"a corresponding changeset in the output of <command role=\"hg-cmd\">hg log</" 8.10692 +"command>." 8.10693 msgstr "" 8.10694 8.10695 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10696 -#: ../en/ch07-branch.xml:142 8.10697 +#: ../en/ch08-branch.xml:142 8.10698 msgid "Handling tag conflicts during a merge" 8.10699 msgstr "在合并期间处理标签冲突" 8.10700 8.10701 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10702 -#: ../en/ch07-branch.xml:144 8.10703 +#: ../en/ch08-branch.xml:144 8.10704 msgid "" 8.10705 "You won't often need to care about the <filename role=\"special\">.hgtags</" 8.10706 "filename> file, but it sometimes makes its presence known during a merge. " 8.10707 @@ -8181,7 +10183,7 @@ 8.10708 msgstr "" 8.10709 8.10710 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10711 -#: ../en/ch07-branch.xml:151 8.10712 +#: ../en/ch08-branch.xml:151 8.10713 msgid "" 8.10714 "If you're resolving a conflict in the <filename role=\"special\">.hgtags</" 8.10715 "filename> file during a merge, there's one twist to modifying the <filename " 8.10716 @@ -8192,7 +10194,7 @@ 8.10717 msgstr "" 8.10718 8.10719 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10720 -#: ../en/ch07-branch.xml:161 8.10721 +#: ../en/ch08-branch.xml:161 8.10722 msgid "" 8.10723 "An unfortunate consequence of this design is that you can't actually verify " 8.10724 "that your merged <filename role=\"special\">.hgtags</filename> file is " 8.10725 @@ -8206,12 +10208,12 @@ 8.10726 msgstr "" 8.10727 8.10728 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10729 -#: ../en/ch07-branch.xml:176 8.10730 +#: ../en/ch08-branch.xml:176 8.10731 msgid "Tags and cloning" 8.10732 msgstr "标签与克隆" 8.10733 8.10734 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10735 -#: ../en/ch07-branch.xml:178 8.10736 +#: ../en/ch08-branch.xml:178 8.10737 msgid "" 8.10738 "You may have noticed that the <command role=\"hg-cmd\">hg clone</command> " 8.10739 "command has a <option role=\"hg-opt-clone\">-r</option> option that lets you " 8.10740 @@ -8221,26 +10223,26 @@ 8.10741 msgstr "" 8.10742 8.10743 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10744 -#: ../en/ch07-branch.xml:186 8.10745 +#: ../en/ch08-branch.xml:186 8.10746 msgid "" 8.10747 "Recall that a tag is stored as a revision to the <filename role=\"special\">." 8.10748 -"hgtags</filename> file, so that when you create a tag, the changeset in which " 8.10749 -"it's recorded necessarily refers to an older changeset. When you run " 8.10750 -"<command role=\"hg-cmd\">hg clone -r foo</command> to clone a repository as " 8.10751 -"of tag <literal>foo</literal>, the new clone <emphasis>will not contain the " 8.10752 -"history that created the tag</emphasis> that you used to clone the " 8.10753 -"repository. The result is that you'll get exactly the right subset of the " 8.10754 +"hgtags</filename> file. When you create a tag, the changeset in which its " 8.10755 +"recorded refers to an older changeset. When you run <command role=\"hg-cmd" 8.10756 +"\">hg clone -r foo</command> to clone a repository as of tag <literal>foo</" 8.10757 +"literal>, the new clone <emphasis>will not contain any revision newer than " 8.10758 +"the one the tag refers to, including the revision where the tag was created</" 8.10759 +"emphasis>. The result is that you'll get exactly the right subset of the " 8.10760 "project's history in the new repository, but <emphasis>not</emphasis> the tag " 8.10761 "you might have expected." 8.10762 msgstr "" 8.10763 8.10764 #. type: Content of: <book><chapter><sect1><sect2><title> 8.10765 -#: ../en/ch07-branch.xml:201 8.10766 +#: ../en/ch08-branch.xml:201 8.10767 msgid "When permanent tags are too much" 8.10768 msgstr "当永久标签太多的时候" 8.10769 8.10770 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10771 -#: ../en/ch07-branch.xml:203 8.10772 +#: ../en/ch08-branch.xml:203 8.10773 msgid "" 8.10774 "Since Mercurial's tags are revision controlled and carried around with a " 8.10775 "project's history, everyone you work with will see the tags you create. But " 8.10776 @@ -8251,7 +10253,7 @@ 8.10777 msgstr "" 8.10778 8.10779 #. type: Content of: <book><chapter><sect1><sect2><para> 8.10780 -#: ../en/ch07-branch.xml:213 8.10781 +#: ../en/ch08-branch.xml:213 8.10782 msgid "" 8.10783 "For cases like this, what you might want to use are <emphasis>local</" 8.10784 "emphasis> tags. You can create a local tag with the <option role=\"hg-opt-tag" 8.10785 @@ -8265,20 +10267,20 @@ 8.10786 msgstr "" 8.10787 8.10788 #. type: Content of: <book><chapter><sect1><title> 8.10789 -#: ../en/ch07-branch.xml:228 8.10790 +#: ../en/ch08-branch.xml:228 8.10791 msgid "The flow of changes&emdash;big picture vs. little" 8.10792 msgstr "修改流程—宏观与微观" 8.10793 8.10794 #. type: Content of: <book><chapter><sect1><para> 8.10795 -#: ../en/ch07-branch.xml:230 8.10796 -msgid "" 8.10797 -"To return to the outline I sketched at the beginning of a chapter, let's " 8.10798 +#: ../en/ch08-branch.xml:230 8.10799 +msgid "" 8.10800 +"To return to the outline I sketched at the beginning of the chapter, let's " 8.10801 "think about a project that has multiple concurrent pieces of work under " 8.10802 "development at once." 8.10803 msgstr "" 8.10804 8.10805 #. type: Content of: <book><chapter><sect1><para> 8.10806 -#: ../en/ch07-branch.xml:234 8.10807 +#: ../en/ch08-branch.xml:235 8.10808 msgid "" 8.10809 "There might be a push for a new <quote>main</quote> release; a new minor " 8.10810 "bugfix release to the last main release; and an unexpected <quote>hot fix</" 8.10811 @@ -8286,7 +10288,7 @@ 8.10812 msgstr "" 8.10813 8.10814 #. type: Content of: <book><chapter><sect1><para> 8.10815 -#: ../en/ch07-branch.xml:239 8.10816 +#: ../en/ch08-branch.xml:240 8.10817 msgid "" 8.10818 "The usual way people refer to these different concurrent directions of " 8.10819 "development is as <quote>branches</quote>. However, we've already seen " 8.10820 @@ -8296,14 +10298,14 @@ 8.10821 msgstr "" 8.10822 8.10823 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10824 -#: ../en/ch07-branch.xml:246 8.10825 +#: ../en/ch08-branch.xml:247 8.10826 msgid "" 8.10827 "<quote>Big picture</quote> branches represent the sweep of a project's " 8.10828 "evolution; people give them names, and talk about them in conversation." 8.10829 msgstr "" 8.10830 8.10831 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.10832 -#: ../en/ch07-branch.xml:250 8.10833 +#: ../en/ch08-branch.xml:251 8.10834 msgid "" 8.10835 "<quote>Little picture</quote> branches are artefacts of the day-to-day " 8.10836 "activity of developing and merging changes. They expose the narrative of how " 8.10837 @@ -8311,12 +10313,12 @@ 8.10838 msgstr "" 8.10839 8.10840 #. type: Content of: <book><chapter><sect1><title> 8.10841 -#: ../en/ch07-branch.xml:258 8.10842 +#: ../en/ch08-branch.xml:259 8.10843 msgid "Managing big-picture branches in repositories" 8.10844 msgstr "在版本库中管理分支" 8.10845 8.10846 #. type: Content of: <book><chapter><sect1><para> 8.10847 -#: ../en/ch07-branch.xml:260 8.10848 +#: ../en/ch08-branch.xml:261 8.10849 msgid "" 8.10850 "The easiest way to isolate a <quote>big picture</quote> branch in Mercurial " 8.10851 "is in a dedicated repository. If you have an existing shared " 8.10852 @@ -8327,14 +10329,14 @@ 8.10853 msgstr "" 8.10854 8.10855 #. type: Content of: <book><chapter><sect1><para> 8.10856 -#: ../en/ch07-branch.xml:270 8.10857 +#: ../en/ch08-branch.xml:271 8.10858 msgid "" 8.10859 "You can then clone a new shared <literal>myproject-1.0.1</literal> repository " 8.10860 "as of that tag." 8.10861 msgstr "" 8.10862 8.10863 #. type: Content of: <book><chapter><sect1><para> 8.10864 -#: ../en/ch07-branch.xml:276 8.10865 +#: ../en/ch08-branch.xml:277 8.10866 msgid "" 8.10867 "Afterwards, if someone needs to work on a bug fix that ought to go into an " 8.10868 "upcoming 1.0.1 minor release, they clone the <literal>myproject-1.0.1</" 8.10869 @@ -8342,19 +10344,19 @@ 8.10870 msgstr "" 8.10871 8.10872 #. type: Content of: <book><chapter><sect1><para> 8.10873 -#: ../en/ch07-branch.xml:283 8.10874 +#: ../en/ch08-branch.xml:284 8.10875 msgid "" 8.10876 "Meanwhile, development for the next major release can continue, isolated and " 8.10877 "unabated, in the <literal>myproject</literal> repository." 8.10878 msgstr "" 8.10879 8.10880 #. type: Content of: <book><chapter><sect1><title> 8.10881 -#: ../en/ch07-branch.xml:291 8.10882 +#: ../en/ch08-branch.xml:292 8.10883 msgid "Don't repeat yourself: merging across branches" 8.10884 msgstr "不要重复劳动:在分支间合并" 8.10885 8.10886 #. type: Content of: <book><chapter><sect1><para> 8.10887 -#: ../en/ch07-branch.xml:293 8.10888 +#: ../en/ch08-branch.xml:294 8.10889 msgid "" 8.10890 "In many cases, if you have a bug to fix on a maintenance branch, the chances " 8.10891 "are good that the bug exists on your project's main branch (and possibly " 8.10892 @@ -8364,26 +10366,26 @@ 8.10893 msgstr "" 8.10894 8.10895 #. type: Content of: <book><chapter><sect1><para> 8.10896 -#: ../en/ch07-branch.xml:301 8.10897 +#: ../en/ch08-branch.xml:302 8.10898 msgid "" 8.10899 "In the simplest instance, all you need to do is pull changes from your " 8.10900 "maintenance branch into your local clone of the target branch." 8.10901 msgstr "" 8.10902 8.10903 #. type: Content of: <book><chapter><sect1><para> 8.10904 -#: ../en/ch07-branch.xml:307 8.10905 +#: ../en/ch08-branch.xml:308 8.10906 msgid "" 8.10907 "You'll then need to merge the heads of the two branches, and push back to the " 8.10908 "main branch." 8.10909 msgstr "" 8.10910 8.10911 #. type: Content of: <book><chapter><sect1><title> 8.10912 -#: ../en/ch07-branch.xml:314 8.10913 +#: ../en/ch08-branch.xml:315 8.10914 msgid "Naming branches within one repository" 8.10915 msgstr "版本库中的命名分支" 8.10916 8.10917 #. type: Content of: <book><chapter><sect1><para> 8.10918 -#: ../en/ch07-branch.xml:316 8.10919 +#: ../en/ch08-branch.xml:317 8.10920 msgid "" 8.10921 "In most instances, isolating branches in repositories is the right approach. " 8.10922 "Its simplicity makes it easy to understand; and so it's hard to make " 8.10923 @@ -8393,7 +10395,7 @@ 8.10924 msgstr "" 8.10925 8.10926 #. type: Content of: <book><chapter><sect1><para> 8.10927 -#: ../en/ch07-branch.xml:323 8.10928 +#: ../en/ch08-branch.xml:324 8.10929 msgid "" 8.10930 "If you're more in the <quote>power user</quote> category (<emphasis>and</" 8.10931 "emphasis> your collaborators are too), there is an alternative way of " 8.10932 @@ -8406,7 +10408,7 @@ 8.10933 msgstr "" 8.10934 8.10935 #. type: Content of: <book><chapter><sect1><para> 8.10936 -#: ../en/ch07-branch.xml:334 8.10937 +#: ../en/ch08-branch.xml:335 8.10938 msgid "" 8.10939 "The key to working this way is that Mercurial lets you assign a persistent " 8.10940 "<emphasis>name</emphasis> to a branch. There always exists a branch named " 8.10941 @@ -8416,7 +10418,7 @@ 8.10942 msgstr "" 8.10943 8.10944 #. type: Content of: <book><chapter><sect1><para> 8.10945 -#: ../en/ch07-branch.xml:341 8.10946 +#: ../en/ch08-branch.xml:342 8.10947 msgid "" 8.10948 "As an example, when you run the <command role=\"hg-cmd\">hg commit</command> " 8.10949 "command, and it pops up your editor so that you can enter a commit message, " 8.10950 @@ -8426,7 +10428,7 @@ 8.10951 msgstr "" 8.10952 8.10953 #. type: Content of: <book><chapter><sect1><para> 8.10954 -#: ../en/ch07-branch.xml:348 8.10955 +#: ../en/ch08-branch.xml:349 8.10956 msgid "" 8.10957 "To start working with named branches, use the <command role=\"hg-cmd\">hg " 8.10958 "branches</command> command. This command lists the named branches already " 8.10959 @@ -8434,14 +10436,14 @@ 8.10960 msgstr "" 8.10961 8.10962 #. type: Content of: <book><chapter><sect1><para> 8.10963 -#: ../en/ch07-branch.xml:355 8.10964 +#: ../en/ch08-branch.xml:356 8.10965 msgid "" 8.10966 "Since you haven't created any named branches yet, the only one that exists is " 8.10967 "<literal>default</literal>." 8.10968 msgstr "" 8.10969 8.10970 #. type: Content of: <book><chapter><sect1><para> 8.10971 -#: ../en/ch07-branch.xml:358 8.10972 +#: ../en/ch08-branch.xml:359 8.10973 msgid "" 8.10974 "To find out what the <quote>current</quote> branch is, run the <command role=" 8.10975 "\"hg-cmd\">hg branch</command> command, giving it no arguments. This tells " 8.10976 @@ -8450,7 +10452,7 @@ 8.10977 8.10978 # 8.10979 #. type: Content of: <book><chapter><sect1><para> 8.10980 -#: ../en/ch07-branch.xml:365 8.10981 +#: ../en/ch08-branch.xml:366 8.10982 msgid "" 8.10983 "To create a new branch, run the <command role=\"hg-cmd\">hg branch</command> " 8.10984 "command again. This time, give it one argument: the name of the branch you " 8.10985 @@ -8458,7 +10460,7 @@ 8.10986 msgstr "" 8.10987 8.10988 #. type: Content of: <book><chapter><sect1><para> 8.10989 -#: ../en/ch07-branch.xml:371 8.10990 +#: ../en/ch08-branch.xml:372 8.10991 msgid "" 8.10992 "After you've created a branch, you might wonder what effect the <command role=" 8.10993 "\"hg-cmd\">hg branch</command> command has had. What do the <command role=" 8.10994 @@ -8467,7 +10469,7 @@ 8.10995 msgstr "" 8.10996 8.10997 #. type: Content of: <book><chapter><sect1><para> 8.10998 -#: ../en/ch07-branch.xml:378 8.10999 +#: ../en/ch08-branch.xml:379 8.11000 msgid "" 8.11001 "Nothing has changed in the working directory, and there's been no new history " 8.11002 "created. As this suggests, running the <command role=\"hg-cmd\">hg branch</" 8.11003 @@ -8476,7 +10478,7 @@ 8.11004 msgstr "" 8.11005 8.11006 #. type: Content of: <book><chapter><sect1><para> 8.11007 -#: ../en/ch07-branch.xml:385 8.11008 +#: ../en/ch08-branch.xml:386 8.11009 msgid "" 8.11010 "When you commit a change, Mercurial records the name of the branch on which " 8.11011 "you committed. Once you've switched from the <literal>default</literal> " 8.11012 @@ -8487,7 +10489,7 @@ 8.11013 msgstr "" 8.11014 8.11015 #. type: Content of: <book><chapter><sect1><para> 8.11016 -#: ../en/ch07-branch.xml:395 8.11017 +#: ../en/ch08-branch.xml:396 8.11018 msgid "" 8.11019 "The <command role=\"hg-cmd\">hg log</command>-like commands will print the " 8.11020 "branch name of every changeset that's not on the <literal>default</literal> " 8.11021 @@ -8496,7 +10498,7 @@ 8.11022 msgstr "" 8.11023 8.11024 #. type: Content of: <book><chapter><sect1><para> 8.11025 -#: ../en/ch07-branch.xml:400 8.11026 +#: ../en/ch08-branch.xml:401 8.11027 msgid "" 8.11028 "Once you've named a branch and committed a change with that name, every " 8.11029 "subsequent commit that descends from that change will inherit the same branch " 8.11030 @@ -8505,47 +10507,47 @@ 8.11031 msgstr "" 8.11032 8.11033 #. type: Content of: <book><chapter><sect1><para> 8.11034 -#: ../en/ch07-branch.xml:408 8.11035 +#: ../en/ch08-branch.xml:409 8.11036 msgid "" 8.11037 "In practice, this is something you won't do very often, as branch names tend " 8.11038 "to have fairly long lifetimes. (This isn't a rule, just an observation.)" 8.11039 msgstr "" 8.11040 8.11041 #. type: Content of: <book><chapter><sect1><title> 8.11042 -#: ../en/ch07-branch.xml:414 8.11043 +#: ../en/ch08-branch.xml:415 8.11044 msgid "Dealing with multiple named branches in a repository" 8.11045 msgstr "在版本库中处理多个命名分支" 8.11046 8.11047 #. type: Content of: <book><chapter><sect1><para> 8.11048 -#: ../en/ch07-branch.xml:417 8.11049 +#: ../en/ch08-branch.xml:418 8.11050 msgid "" 8.11051 "If you have more than one named branch in a repository, Mercurial will " 8.11052 -"remember the branch that your working directory on when you start a command " 8.11053 -"like <command role=\"hg-cmd\">hg update</command> or <command role=\"hg-cmd" 8.11054 -"\">hg pull -u</command>. It will update the working directory to the tip of " 8.11055 -"this branch, no matter what the <quote>repo-wide</quote> tip is. To update " 8.11056 -"to a revision that's on a different named branch, you may need to use the " 8.11057 -"<option role=\"hg-opt-update\">-C</option> option to <command role=\"hg-cmd" 8.11058 -"\">hg update</command>." 8.11059 -msgstr "" 8.11060 - 8.11061 -#. type: Content of: <book><chapter><sect1><para> 8.11062 -#: ../en/ch07-branch.xml:427 8.11063 -msgid "" 8.11064 -"This behaviour is a little subtle, so let's see it in action. First, let's " 8.11065 +"remember the branch that your working directory is on when you start a " 8.11066 +"command like <command role=\"hg-cmd\">hg update</command> or <command role=" 8.11067 +"\"hg-cmd\">hg pull -u</command>. It will update the working directory to the " 8.11068 +"tip of this branch, no matter what the <quote>repo-wide</quote> tip is. To " 8.11069 +"update to a revision that's on a different named branch, you may need to use " 8.11070 +"the <option role=\"hg-opt-update\">-C</option> option to <command role=\"hg-" 8.11071 +"cmd\">hg update</command>." 8.11072 +msgstr "" 8.11073 + 8.11074 +#. type: Content of: <book><chapter><sect1><para> 8.11075 +#: ../en/ch08-branch.xml:428 8.11076 +msgid "" 8.11077 +"This behavior is a little subtle, so let's see it in action. First, let's " 8.11078 "remind ourselves what branch we're currently on, and what branches are in our " 8.11079 "repository." 8.11080 msgstr "" 8.11081 8.11082 #. type: Content of: <book><chapter><sect1><para> 8.11083 -#: ../en/ch07-branch.xml:433 8.11084 +#: ../en/ch08-branch.xml:434 8.11085 msgid "" 8.11086 "We're on the <literal>bar</literal> branch, but there also exists an older " 8.11087 "<command role=\"hg-cmd\">hg foo</command> branch." 8.11088 msgstr "" 8.11089 8.11090 #. type: Content of: <book><chapter><sect1><para> 8.11091 -#: ../en/ch07-branch.xml:437 8.11092 +#: ../en/ch08-branch.xml:438 8.11093 msgid "" 8.11094 "We can <command role=\"hg-cmd\">hg update</command> back and forth between " 8.11095 "the tips of the <literal>foo</literal> and <literal>bar</literal> branches " 8.11096 @@ -8556,7 +10558,7 @@ 8.11097 8.11098 # 8.11099 #. type: Content of: <book><chapter><sect1><para> 8.11100 -#: ../en/ch07-branch.xml:446 8.11101 +#: ../en/ch08-branch.xml:447 8.11102 msgid "" 8.11103 "If we go back to the <literal>foo</literal> branch and then run <command role=" 8.11104 "\"hg-cmd\">hg update</command>, it will keep us on <literal>foo</literal>, " 8.11105 @@ -8565,19 +10567,19 @@ 8.11106 8.11107 # 8.11108 #. type: Content of: <book><chapter><sect1><para> 8.11109 -#: ../en/ch07-branch.xml:453 8.11110 +#: ../en/ch08-branch.xml:454 8.11111 msgid "" 8.11112 "Committing a new change on the <literal>foo</literal> branch introduces a new " 8.11113 "head." 8.11114 msgstr "" 8.11115 8.11116 #. type: Content of: <book><chapter><sect1><title> 8.11117 -#: ../en/ch07-branch.xml:460 8.11118 +#: ../en/ch08-branch.xml:461 8.11119 msgid "Branch names and merging" 8.11120 msgstr "分支名称与合并" 8.11121 8.11122 #. type: Content of: <book><chapter><sect1><para> 8.11123 -#: ../en/ch07-branch.xml:462 8.11124 +#: ../en/ch08-branch.xml:463 8.11125 msgid "" 8.11126 "As you've probably noticed, merges in Mercurial are not symmetrical. Let's " 8.11127 "say our repository has two heads, 17 and 23. If I <command role=\"hg-cmd" 8.11128 @@ -8589,7 +10591,7 @@ 8.11129 msgstr "" 8.11130 8.11131 #. type: Content of: <book><chapter><sect1><para> 8.11132 -#: ../en/ch07-branch.xml:472 8.11133 +#: ../en/ch08-branch.xml:473 8.11134 msgid "" 8.11135 "This affects Mercurial's choice of branch name when you merge. After a " 8.11136 "merge, Mercurial will retain the branch name of the first parent when you " 8.11137 @@ -8599,7 +10601,7 @@ 8.11138 msgstr "" 8.11139 8.11140 #. type: Content of: <book><chapter><sect1><para> 8.11141 -#: ../en/ch07-branch.xml:479 8.11142 +#: ../en/ch08-branch.xml:480 8.11143 msgid "" 8.11144 "It's not unusual for a repository to contain multiple heads, each with the " 8.11145 "same branch name. Let's say I'm working on the <literal>foo</literal> " 8.11146 @@ -8611,7 +10613,7 @@ 8.11147 8.11148 # 8.11149 #. type: Content of: <book><chapter><sect1><para> 8.11150 -#: ../en/ch07-branch.xml:487 8.11151 +#: ../en/ch08-branch.xml:488 8.11152 msgid "" 8.11153 "But if I'm working on the <literal>bar</literal> branch, and I merge work " 8.11154 "from the <literal>foo</literal> branch, the result will remain on the " 8.11155 @@ -8619,7 +10621,7 @@ 8.11156 msgstr "" 8.11157 8.11158 #. type: Content of: <book><chapter><sect1><para> 8.11159 -#: ../en/ch07-branch.xml:493 8.11160 +#: ../en/ch08-branch.xml:494 8.11161 msgid "" 8.11162 "To give a more concrete example, if I'm working on the <literal>bleeding-" 8.11163 "edge</literal> branch, and I want to bring in the latest fixes from the " 8.11164 @@ -8629,12 +10631,12 @@ 8.11165 msgstr "" 8.11166 8.11167 #. type: Content of: <book><chapter><sect1><title> 8.11168 -#: ../en/ch07-branch.xml:502 8.11169 +#: ../en/ch08-branch.xml:503 8.11170 msgid "Branch naming is generally useful" 8.11171 msgstr "分支名称通常都很有用" 8.11172 8.11173 #. type: Content of: <book><chapter><sect1><para> 8.11174 -#: ../en/ch07-branch.xml:504 8.11175 +#: ../en/ch08-branch.xml:505 8.11176 msgid "" 8.11177 "You shouldn't think of named branches as applicable only to situations where " 8.11178 "you have multiple long-lived branches cohabiting in a single repository. " 8.11179 @@ -8642,7 +10644,7 @@ 8.11180 msgstr "" 8.11181 8.11182 #. type: Content of: <book><chapter><sect1><para> 8.11183 -#: ../en/ch07-branch.xml:509 8.11184 +#: ../en/ch08-branch.xml:510 8.11185 msgid "" 8.11186 "In the simplest case, giving a name to each branch gives you a permanent " 8.11187 "record of which branch a changeset originated on. This gives you more " 8.11188 @@ -8651,7 +10653,7 @@ 8.11189 msgstr "" 8.11190 8.11191 #. type: Content of: <book><chapter><sect1><para> 8.11192 -#: ../en/ch07-branch.xml:514 8.11193 +#: ../en/ch08-branch.xml:515 8.11194 msgid "" 8.11195 "If you're working with shared repositories, you can set up a <literal role=" 8.11196 "\"hook\">pretxnchangegroup</literal> hook on each that will block incoming " 8.11197 @@ -8663,12 +10665,12 @@ 8.11198 msgstr "" 8.11199 8.11200 #. type: Content of: <book><chapter><title> 8.11201 -#: ../en/ch08-undo.xml:5 8.11202 +#: ../en/ch09-undo.xml:5 8.11203 msgid "Finding and fixing mistakes" 8.11204 msgstr "查找和修改错误" 8.11205 8.11206 #. type: Content of: <book><chapter><para> 8.11207 -#: ../en/ch08-undo.xml:7 8.11208 +#: ../en/ch09-undo.xml:7 8.11209 msgid "" 8.11210 "To err might be human, but to really handle the consequences well takes a top-" 8.11211 "notch revision control system. In this chapter, we'll discuss some of the " 8.11212 @@ -8678,17 +10680,17 @@ 8.11213 msgstr "" 8.11214 8.11215 #. type: Content of: <book><chapter><sect1><title> 8.11216 -#: ../en/ch08-undo.xml:15 8.11217 +#: ../en/ch09-undo.xml:15 8.11218 msgid "Erasing local history" 8.11219 msgstr "销毁本地历史" 8.11220 8.11221 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11222 -#: ../en/ch08-undo.xml:18 8.11223 +#: ../en/ch09-undo.xml:18 8.11224 msgid "The accidental commit" 8.11225 msgstr "意外的提交" 8.11226 8.11227 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11228 -#: ../en/ch08-undo.xml:20 8.11229 +#: ../en/ch09-undo.xml:20 8.11230 msgid "" 8.11231 "I have the occasional but persistent problem of typing rather more quickly " 8.11232 "than I can think, which sometimes results in me committing a changeset that " 8.11233 @@ -8699,12 +10701,12 @@ 8.11234 msgstr "" 8.11235 8.11236 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11237 -#: ../en/ch08-undo.xml:31 8.11238 +#: ../en/ch09-undo.xml:31 8.11239 msgid "Rolling back a transaction" 8.11240 msgstr "回滚一个事务" 8.11241 8.11242 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11243 -#: ../en/ch08-undo.xml:33 8.11244 +#: ../en/ch09-undo.xml:33 8.11245 msgid "" 8.11246 "In <xref linkend=\"sec:concepts:txn\"/>, I mentioned that Mercurial treats " 8.11247 "each modification of a repository as a <emphasis>transaction</emphasis>. " 8.11248 @@ -8716,7 +10718,7 @@ 8.11249 msgstr "" 8.11250 8.11251 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11252 -#: ../en/ch08-undo.xml:43 8.11253 +#: ../en/ch09-undo.xml:43 8.11254 msgid "" 8.11255 "Here's a mistake that I often find myself making: committing a change in " 8.11256 "which I've created a new file, but forgotten to <command role=\"hg-cmd\">hg " 8.11257 @@ -8724,14 +10726,14 @@ 8.11258 msgstr "" 8.11259 8.11260 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11261 -#: ../en/ch08-undo.xml:50 8.11262 +#: ../en/ch09-undo.xml:50 8.11263 msgid "" 8.11264 "Looking at the output of <command role=\"hg-cmd\">hg status</command> after " 8.11265 "the commit immediately confirms the error." 8.11266 msgstr "" 8.11267 8.11268 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11269 -#: ../en/ch08-undo.xml:56 8.11270 +#: ../en/ch09-undo.xml:56 8.11271 msgid "" 8.11272 "The commit captured the changes to the file <filename>a</filename>, but not " 8.11273 "the new file <filename>b</filename>. If I were to push this changeset to a " 8.11274 @@ -8742,7 +10744,7 @@ 8.11275 msgstr "" 8.11276 8.11277 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11278 -#: ../en/ch08-undo.xml:65 8.11279 +#: ../en/ch09-undo.xml:65 8.11280 msgid "" 8.11281 "However, luck is with me&emdash;I've caught my error before I pushed the " 8.11282 "changeset. I use the <command role=\"hg-cmd\">hg rollback</command> command, " 8.11283 @@ -8750,7 +10752,7 @@ 8.11284 msgstr "" 8.11285 8.11286 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11287 -#: ../en/ch08-undo.xml:72 8.11288 +#: ../en/ch09-undo.xml:72 8.11289 msgid "" 8.11290 "Notice that the changeset is no longer present in the repository's history, " 8.11291 "and the working directory once again thinks that the file <filename>a</" 8.11292 @@ -8761,12 +10763,12 @@ 8.11293 msgstr "" 8.11294 8.11295 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11296 -#: ../en/ch08-undo.xml:85 8.11297 +#: ../en/ch09-undo.xml:85 8.11298 msgid "The erroneous pull" 8.11299 msgstr "错误的抓取" 8.11300 8.11301 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11302 -#: ../en/ch08-undo.xml:87 8.11303 +#: ../en/ch09-undo.xml:87 8.11304 msgid "" 8.11305 "It's common practice with Mercurial to maintain separate development branches " 8.11306 "of a project in different repositories. Your development team might have one " 8.11307 @@ -8775,7 +10777,7 @@ 8.11308 msgstr "" 8.11309 8.11310 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11311 -#: ../en/ch08-undo.xml:94 8.11312 +#: ../en/ch09-undo.xml:94 8.11313 msgid "" 8.11314 "Given this, you can imagine that the consequences could be messy if you had a " 8.11315 "local <quote>0.9</quote> repository, and accidentally pulled changes from the " 8.11316 @@ -8788,7 +10790,7 @@ 8.11317 msgstr "" 8.11318 8.11319 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11320 -#: ../en/ch08-undo.xml:106 8.11321 +#: ../en/ch09-undo.xml:106 8.11322 msgid "" 8.11323 "The <command role=\"hg-cmd\">hg rollback</command> command will work nicely " 8.11324 "to expunge all of the changesets that you just pulled. Mercurial groups all " 8.11325 @@ -8798,12 +10800,12 @@ 8.11326 msgstr "" 8.11327 8.11328 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11329 -#: ../en/ch08-undo.xml:115 8.11330 +#: ../en/ch09-undo.xml:115 8.11331 msgid "Rolling back is useless once you've pushed" 8.11332 msgstr "当完成推送后,回滚是无效的" 8.11333 8.11334 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11335 -#: ../en/ch08-undo.xml:117 8.11336 +#: ../en/ch09-undo.xml:117 8.11337 msgid "" 8.11338 "The value of the <command role=\"hg-cmd\">hg rollback</command> command drops " 8.11339 "to zero once you've pushed your changes to another repository. Rolling back " 8.11340 @@ -8814,57 +10816,57 @@ 8.11341 msgstr "" 8.11342 8.11343 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11344 -#: ../en/ch08-undo.xml:126 8.11345 +#: ../en/ch09-undo.xml:126 8.11346 msgid "" 8.11347 "If you've pushed a change to another repository&emdash;particularly if it's a " 8.11348 "shared repository&emdash;it has essentially <quote>escaped into the wild,</" 8.11349 -"quote> and you'll have to recover from your mistake in a different way. What " 8.11350 -"will happen if you push a changeset somewhere, then roll it back, then pull " 8.11351 -"from the repository you pushed to, is that the changeset will reappear in " 8.11352 -"your repository." 8.11353 -msgstr "" 8.11354 - 8.11355 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.11356 -#: ../en/ch08-undo.xml:135 8.11357 +"quote> and you'll have to recover from your mistake in a different way. If " 8.11358 +"you push a changeset somewhere, then roll it back, then pull from the " 8.11359 +"repository you pushed to, the changeset you thought you'd gotten rid of will " 8.11360 +"simply reappear in your repository." 8.11361 +msgstr "" 8.11362 + 8.11363 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.11364 +#: ../en/ch09-undo.xml:135 8.11365 msgid "" 8.11366 "(If you absolutely know for sure that the change you want to roll back is the " 8.11367 "most recent change in the repository that you pushed to, <emphasis>and</" 8.11368 "emphasis> you know that nobody else could have pulled it from that " 8.11369 "repository, you can roll back the changeset there, too, but you really should " 8.11370 -"really not rely on this working reliably. If you do this, sooner or later a " 8.11371 -"change really will make it into a repository that you don't directly control " 8.11372 -"(or have forgotten about), and come back to bite you.)" 8.11373 +"not expect this to work reliably. Sooner or later a change really will make " 8.11374 +"it into a repository that you don't directly control (or have forgotten " 8.11375 +"about), and come back to bite you.)" 8.11376 msgstr "" 8.11377 8.11378 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11379 -#: ../en/ch08-undo.xml:147 8.11380 +#: ../en/ch09-undo.xml:147 8.11381 msgid "You can only roll back once" 8.11382 msgstr "你只能回滚一次" 8.11383 8.11384 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11385 -#: ../en/ch08-undo.xml:149 8.11386 +#: ../en/ch09-undo.xml:149 8.11387 msgid "" 8.11388 "Mercurial stores exactly one transaction in its transaction log; that " 8.11389 "transaction is the most recent one that occurred in the repository. This " 8.11390 "means that you can only roll back one transaction. If you expect to be able " 8.11391 -"to roll back one transaction, then its predecessor, this is not the behaviour " 8.11392 +"to roll back one transaction, then its predecessor, this is not the behavior " 8.11393 "you will get." 8.11394 msgstr "" 8.11395 8.11396 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11397 -#: ../en/ch08-undo.xml:158 8.11398 +#: ../en/ch09-undo.xml:158 8.11399 msgid "" 8.11400 "Once you've rolled back one transaction in a repository, you can't roll back " 8.11401 "again in that repository until you perform another commit or pull." 8.11402 msgstr "" 8.11403 8.11404 #. type: Content of: <book><chapter><sect1><title> 8.11405 -#: ../en/ch08-undo.xml:165 8.11406 +#: ../en/ch09-undo.xml:165 8.11407 msgid "Reverting the mistaken change" 8.11408 msgstr "撤销错误的修改" 8.11409 8.11410 #. type: Content of: <book><chapter><sect1><para> 8.11411 -#: ../en/ch08-undo.xml:167 8.11412 +#: ../en/ch09-undo.xml:167 8.11413 msgid "" 8.11414 "If you make a modification to a file, and decide that you really didn't want " 8.11415 "to change the file at all, and you haven't yet committed your changes, the " 8.11416 @@ -8876,7 +10878,7 @@ 8.11417 msgstr "" 8.11418 8.11419 #. type: Content of: <book><chapter><sect1><para> 8.11420 -#: ../en/ch08-undo.xml:176 8.11421 +#: ../en/ch09-undo.xml:176 8.11422 msgid "" 8.11423 "Let's illustrate how the <command role=\"hg-cmd\">hg revert</command> command " 8.11424 "works with yet another small example. We'll begin by modifying a file that " 8.11425 @@ -8884,22 +10886,40 @@ 8.11426 msgstr "" 8.11427 8.11428 #. type: Content of: <book><chapter><sect1><para> 8.11429 -#: ../en/ch08-undo.xml:183 8.11430 +#: ../en/ch09-undo.xml:183 8.11431 msgid "" 8.11432 "If we don't want that change, we can simply <command role=\"hg-cmd\">hg " 8.11433 "revert</command> the file." 8.11434 msgstr "" 8.11435 8.11436 #. type: Content of: <book><chapter><sect1><para> 8.11437 -#: ../en/ch08-undo.xml:189 8.11438 +#: ../en/ch09-undo.xml:189 8.11439 msgid "" 8.11440 "The <command role=\"hg-cmd\">hg revert</command> command provides us with an " 8.11441 "extra degree of safety by saving our modified file with a <filename>.orig</" 8.11442 "filename> extension." 8.11443 msgstr "" 8.11444 8.11445 -#. type: Content of: <book><chapter><sect1><para> 8.11446 -#: ../en/ch08-undo.xml:196 8.11447 +#. type: Content of: <book><chapter><sect1><tip><title> 8.11448 +#: ../en/ch09-undo.xml:197 8.11449 +msgid "Be careful with <filename>.orig</filename> files" 8.11450 +msgstr "小心 <filename>.orig</filename> 文件" 8.11451 + 8.11452 +#. type: Content of: <book><chapter><sect1><tip><para> 8.11453 +#: ../en/ch09-undo.xml:199 8.11454 +msgid "" 8.11455 +"It's extremely unlikely that you are either using Mercurial to manage files " 8.11456 +"with <filename>.orig</filename> extensions or that you even care about the " 8.11457 +"contents of such files. Just in case, though, it's useful to remember that " 8.11458 +"<command role=\"hg-cmd\">hg revert</command> will unconditionally overwrite " 8.11459 +"an existing file with a <filename>.orig</filename> extension. For instance, " 8.11460 +"if you already have a file named <filename>foo.orig</filename> when you " 8.11461 +"revert <filename>foo</filename>, the contents of <filename>foo.orig</" 8.11462 +"filename> will be clobbered." 8.11463 +msgstr "" 8.11464 + 8.11465 +#. type: Content of: <book><chapter><sect1><para> 8.11466 +#: ../en/ch09-undo.xml:211 8.11467 msgid "" 8.11468 "Here is a summary of the cases that the <command role=\"hg-cmd\">hg revert</" 8.11469 "command> command can deal with. We will describe each of these in more " 8.11470 @@ -8907,26 +10927,26 @@ 8.11471 msgstr "" 8.11472 8.11473 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.11474 -#: ../en/ch08-undo.xml:201 8.11475 +#: ../en/ch09-undo.xml:216 8.11476 msgid "If you modify a file, it will restore the file to its unmodified state." 8.11477 msgstr "" 8.11478 8.11479 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.11480 -#: ../en/ch08-undo.xml:204 8.11481 +#: ../en/ch09-undo.xml:219 8.11482 msgid "" 8.11483 "If you <command role=\"hg-cmd\">hg add</command> a file, it will undo the " 8.11484 "<quote>added</quote> state of the file, but leave the file itself untouched." 8.11485 msgstr "" 8.11486 8.11487 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.11488 -#: ../en/ch08-undo.xml:208 8.11489 +#: ../en/ch09-undo.xml:223 8.11490 msgid "" 8.11491 "If you delete a file without telling Mercurial, it will restore the file to " 8.11492 "its unmodified contents." 8.11493 msgstr "" 8.11494 8.11495 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.11496 -#: ../en/ch08-undo.xml:211 8.11497 +#: ../en/ch09-undo.xml:226 8.11498 msgid "" 8.11499 "If you use the <command role=\"hg-cmd\">hg remove</command> command to remove " 8.11500 "a file, it will undo the <quote>removed</quote> state of the file, and " 8.11501 @@ -8934,12 +10954,12 @@ 8.11502 msgstr "" 8.11503 8.11504 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11505 -#: ../en/ch08-undo.xml:218 8.11506 +#: ../en/ch09-undo.xml:233 8.11507 msgid "File management errors" 8.11508 msgstr "文件管理错误" 8.11509 8.11510 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11511 -#: ../en/ch08-undo.xml:220 8.11512 +#: ../en/ch09-undo.xml:235 8.11513 msgid "" 8.11514 "The <command role=\"hg-cmd\">hg revert</command> command is useful for more " 8.11515 "than just modified files. It lets you reverse the results of all of " 8.11516 @@ -8949,7 +10969,7 @@ 8.11517 8.11518 # 8.11519 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11520 -#: ../en/ch08-undo.xml:226 8.11521 +#: ../en/ch09-undo.xml:241 8.11522 msgid "" 8.11523 "If you <command role=\"hg-cmd\">hg add</command> a file, then decide that in " 8.11524 "fact you don't want Mercurial to track it, use <command role=\"hg-cmd\">hg " 8.11525 @@ -8958,7 +10978,7 @@ 8.11526 msgstr "" 8.11527 8.11528 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11529 -#: ../en/ch08-undo.xml:234 8.11530 +#: ../en/ch09-undo.xml:249 8.11531 msgid "" 8.11532 "Similarly, if you ask Mercurial to <command role=\"hg-cmd\">hg remove</" 8.11533 "command> a file, you can use <command role=\"hg-cmd\">hg revert</command> to " 8.11534 @@ -8970,7 +10990,7 @@ 8.11535 8.11536 # 8.11537 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11538 -#: ../en/ch08-undo.xml:245 8.11539 +#: ../en/ch09-undo.xml:260 8.11540 msgid "" 8.11541 "If you revert a <command role=\"hg-cmd\">hg copy</command>, the copied-to " 8.11542 "file remains in your working directory afterwards, untracked. Since a copy " 8.11543 @@ -8978,90 +10998,39 @@ 8.11544 "with the copied-from file." 8.11545 msgstr "" 8.11546 8.11547 -#. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.11548 -#: ../en/ch08-undo.xml:254 8.11549 -msgid "A slightly special case: reverting a rename" 8.11550 -msgstr "一个稍微特别的案例:撤销改名" 8.11551 - 8.11552 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11553 -#: ../en/ch08-undo.xml:256 8.11554 -msgid "" 8.11555 -"If you <command role=\"hg-cmd\">hg rename</command> a file, there is one " 8.11556 -"small detail that you should remember. When you <command role=\"hg-cmd\">hg " 8.11557 -"revert</command> a rename, it's not enough to provide the name of the renamed-" 8.11558 -"to file, as you can see here." 8.11559 -msgstr "" 8.11560 - 8.11561 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11562 -#: ../en/ch08-undo.xml:264 8.11563 -msgid "" 8.11564 -"As you can see from the output of <command role=\"hg-cmd\">hg status</" 8.11565 -"command>, the renamed-to file is no longer identified as added, but the " 8.11566 -"renamed-<emphasis>from</emphasis> file is still removed! This is counter-" 8.11567 -"intuitive (at least to me), but at least it's easy to deal with." 8.11568 -msgstr "" 8.11569 - 8.11570 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11571 -#: ../en/ch08-undo.xml:273 8.11572 -msgid "" 8.11573 -"So remember, to revert a <command role=\"hg-cmd\">hg rename</command>, you " 8.11574 -"must provide <emphasis>both</emphasis> the source and destination names." 8.11575 -msgstr "" 8.11576 - 8.11577 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11578 -#: ../en/ch08-undo.xml:278 8.11579 -msgid "% TODO: the output doesn't look like it will be removed!" 8.11580 -msgstr "" 8.11581 - 8.11582 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11583 -#: ../en/ch08-undo.xml:281 8.11584 -msgid "" 8.11585 -"(By the way, if you rename a file, then modify the renamed-to file, then " 8.11586 -"revert both components of the rename, when Mercurial restores the file that " 8.11587 -"was removed as part of the rename, it will be unmodified. If you need the " 8.11588 -"modifications in the renamed-to file to show up in the renamed-from file, " 8.11589 -"don't forget to copy them over.)" 8.11590 -msgstr "" 8.11591 - 8.11592 -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11593 -#: ../en/ch08-undo.xml:288 8.11594 -msgid "" 8.11595 -"These fiddly aspects of reverting a rename arguably constitute a small bug in " 8.11596 -"Mercurial." 8.11597 -msgstr "" 8.11598 - 8.11599 #. type: Content of: <book><chapter><sect1><title> 8.11600 -#: ../en/ch08-undo.xml:295 8.11601 +#: ../en/ch09-undo.xml:271 8.11602 msgid "Dealing with committed changes" 8.11603 msgstr "处理已经提交的修改" 8.11604 8.11605 #. type: Content of: <book><chapter><sect1><para> 8.11606 -#: ../en/ch08-undo.xml:297 8.11607 -msgid "" 8.11608 -"Consider a case where you have committed a change $a$, and another change $b$ " 8.11609 -"on top of it; you then realise that change $a$ was incorrect. Mercurial lets " 8.11610 -"you <quote>back out</quote> an entire changeset automatically, and building " 8.11611 -"blocks that let you reverse part of a changeset by hand." 8.11612 -msgstr "" 8.11613 - 8.11614 -#. type: Content of: <book><chapter><sect1><para> 8.11615 -#: ../en/ch08-undo.xml:303 8.11616 +#: ../en/ch09-undo.xml:273 8.11617 +msgid "" 8.11618 +"Consider a case where you have committed a change <emphasis>a</emphasis>, and " 8.11619 +"another change <emphasis>b</emphasis> on top of it; you then realise that " 8.11620 +"change <emphasis>a</emphasis> was incorrect. Mercurial lets you <quote>back " 8.11621 +"out</quote> an entire changeset automatically, and building blocks that let " 8.11622 +"you reverse part of a changeset by hand." 8.11623 +msgstr "" 8.11624 + 8.11625 +#. type: Content of: <book><chapter><sect1><para> 8.11626 +#: ../en/ch09-undo.xml:281 8.11627 msgid "" 8.11628 "Before you read this section, here's something to keep in mind: the <command " 8.11629 -"role=\"hg-cmd\">hg backout</command> command undoes changes by " 8.11630 -"<emphasis>adding</emphasis> history, not by modifying or erasing it. It's " 8.11631 -"the right tool to use if you're fixing bugs, but not if you're trying to undo " 8.11632 -"some change that has catastrophic consequences. To deal with those, see " 8.11633 -"<xref linkend=\"sec:undo:aaaiiieee\"/>." 8.11634 +"role=\"hg-cmd\">hg backout</command> command undoes the effect of a change by " 8.11635 +"<emphasis>adding</emphasis> to your repository's history, not by modifying or " 8.11636 +"erasing it. It's the right tool to use if you're fixing bugs, but not if " 8.11637 +"you're trying to undo some change that has catastrophic consequences. To " 8.11638 +"deal with those, see <xref linkend=\"sec:undo:aaaiiieee\"/>." 8.11639 msgstr "" 8.11640 8.11641 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11642 -#: ../en/ch08-undo.xml:312 8.11643 +#: ../en/ch09-undo.xml:291 8.11644 msgid "Backing out a changeset" 8.11645 msgstr "恢复一个修改集" 8.11646 8.11647 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11648 -#: ../en/ch08-undo.xml:314 8.11649 +#: ../en/ch09-undo.xml:293 8.11650 msgid "" 8.11651 "The <command role=\"hg-cmd\">hg backout</command> command lets you " 8.11652 "<quote>undo</quote> the effects of an entire changeset in an automated " 8.11653 @@ -9073,7 +11042,7 @@ 8.11654 8.11655 # 8.11656 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11657 -#: ../en/ch08-undo.xml:323 8.11658 +#: ../en/ch09-undo.xml:302 8.11659 msgid "" 8.11660 "The operation of the <command role=\"hg-cmd\">hg backout</command> command is " 8.11661 "a little intricate, so let's illustrate it with some examples. First, we'll " 8.11662 @@ -9081,7 +11050,7 @@ 8.11663 msgstr "" 8.11664 8.11665 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11666 -#: ../en/ch08-undo.xml:330 8.11667 +#: ../en/ch09-undo.xml:309 8.11668 msgid "" 8.11669 "The <command role=\"hg-cmd\">hg backout</command> command takes a single " 8.11670 "changeset ID as its argument; this is the changeset to back out. Normally, " 8.11671 @@ -9092,17 +11061,17 @@ 8.11672 msgstr "" 8.11673 8.11674 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11675 -#: ../en/ch08-undo.xml:341 8.11676 +#: ../en/ch09-undo.xml:320 8.11677 msgid "Backing out the tip changeset" 8.11678 msgstr "恢复顶点修改集" 8.11679 8.11680 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11681 -#: ../en/ch08-undo.xml:343 8.11682 +#: ../en/ch09-undo.xml:322 8.11683 msgid "We're going to start by backing out the last changeset we committed." 8.11684 msgstr "" 8.11685 8.11686 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11687 -#: ../en/ch08-undo.xml:348 8.11688 +#: ../en/ch09-undo.xml:327 8.11689 msgid "" 8.11690 "You can see that the second line from <filename>myfile</filename> is no " 8.11691 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg " 8.11692 @@ -9115,24 +11084,24 @@ 8.11693 msgstr "" 8.11694 8.11695 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.11696 -#: ../en/ch08-undo.xml:361 ../en/ch08-undo.xml:473 8.11697 +#: ../en/ch09-undo.xml:340 ../en/ch09-undo.xml:460 8.11698 msgid "" 8.11699 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> " 8.11700 "command" 8.11701 msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 恢复一个修改" 8.11702 8.11703 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.11704 -#: ../en/ch08-undo.xml:364 8.11705 +#: ../en/ch09-undo.xml:343 8.11706 msgid "<imageobject><imagedata fileref=\"figs/undo-simple.png\"/></imageobject>" 8.11707 msgstr "" 8.11708 8.11709 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11710 -#: ../en/ch08-undo.xml:371 8.11711 +#: ../en/ch09-undo.xml:350 8.11712 msgid "Backing out a non-tip change" 8.11713 msgstr "恢复非顶点的修改" 8.11714 8.11715 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11716 -#: ../en/ch08-undo.xml:373 8.11717 +#: ../en/ch09-undo.xml:352 8.11718 msgid "" 8.11719 "If you want to back out a change other than the last one you committed, pass " 8.11720 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command " 8.11721 @@ -9140,14 +11109,14 @@ 8.11722 msgstr "" 8.11723 8.11724 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11725 -#: ../en/ch08-undo.xml:380 8.11726 +#: ../en/ch09-undo.xml:359 8.11727 msgid "" 8.11728 "This makes backing out any changeset a <quote>one-shot</quote> operation " 8.11729 "that's usually simple and fast." 8.11730 msgstr "" 8.11731 8.11732 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11733 -#: ../en/ch08-undo.xml:386 8.11734 +#: ../en/ch09-undo.xml:365 8.11735 msgid "" 8.11736 "If you take a look at the contents of <filename>myfile</filename> after the " 8.11737 "backout finishes, you'll see that the first and third changes are present, " 8.11738 @@ -9155,53 +11124,58 @@ 8.11739 msgstr "" 8.11740 8.11741 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11742 -#: ../en/ch08-undo.xml:393 8.11743 +#: ../en/ch09-undo.xml:372 8.11744 msgid "" 8.11745 "As the graphical history in <xref linkend=\"fig:undo:backout-non-tip\"/> " 8.11746 -"illustrates, Mercurial actually commits <emphasis>two</emphasis> changes in " 8.11747 -"this kind of situation (the box-shaped nodes are the ones that Mercurial " 8.11748 -"commits automatically). Before Mercurial begins the backout process, it " 8.11749 -"first remembers what the current parent of the working directory is. It then " 8.11750 -"backs out the target changeset, and commits that as a changeset. Finally, it " 8.11751 -"merges back to the previous parent of the working directory, and commits the " 8.11752 -"result of the merge." 8.11753 -msgstr "" 8.11754 - 8.11755 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.11756 -#: ../en/ch08-undo.xml:404 8.11757 -msgid "" 8.11758 -"% TODO: to me it looks like mercurial doesn't commit the second merge " 8.11759 -"automatically!" 8.11760 +"illustrates, Mercurial still commits one change in this kind of situation " 8.11761 +"(the box-shaped node is the ones that Mercurial commits automatically), but " 8.11762 +"the revision graph now looks different. Before Mercurial begins the backout " 8.11763 +"process, it first remembers what the current parent of the working directory " 8.11764 +"is. It then backs out the target changeset, and commits that as a " 8.11765 +"changeset. Finally, it merges back to the previous parent of the working " 8.11766 +"directory, but notice that it <emphasis>does not commit</emphasis> the result " 8.11767 +"of the merge. The repository now contains two heads, and the working " 8.11768 +"directory is in a merge state." 8.11769 msgstr "" 8.11770 8.11771 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.11772 -#: ../en/ch08-undo.xml:408 8.11773 +#: ../en/ch09-undo.xml:387 8.11774 msgid "" 8.11775 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg " 8.11776 "backout</command> command" 8.11777 msgstr "使用 <command role=\"hg-cmd\">hg backout</command> 自动恢复非顶点的修改" 8.11778 8.11779 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.11780 -#: ../en/ch08-undo.xml:411 8.11781 +#: ../en/ch09-undo.xml:390 8.11782 msgid "" 8.11783 "<imageobject><imagedata fileref=\"figs/undo-non-tip.png\"/></imageobject>" 8.11784 msgstr "" 8.11785 8.11786 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11787 -#: ../en/ch08-undo.xml:416 8.11788 +#: ../en/ch09-undo.xml:395 8.11789 msgid "" 8.11790 "The result is that you end up <quote>back where you were</quote>, only with " 8.11791 "some extra history that undoes the effect of the changeset you wanted to back " 8.11792 "out." 8.11793 msgstr "" 8.11794 8.11795 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.11796 +#: ../en/ch09-undo.xml:399 8.11797 +msgid "" 8.11798 +"You might wonder why Mercurial does not commit the result of the merge that " 8.11799 +"it performed. The reason lies in Mercurial behaving conservatively: a merge " 8.11800 +"naturally has more scope for error than simply undoing the effect of the tip " 8.11801 +"changeset, so your work will be safest if you first inspect (and test!) the " 8.11802 +"result of the merge, <emphasis>then</emphasis> commit it." 8.11803 +msgstr "" 8.11804 + 8.11805 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.11806 -#: ../en/ch08-undo.xml:421 8.11807 +#: ../en/ch09-undo.xml:408 8.11808 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option" 8.11809 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>" 8.11810 8.11811 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.11812 -#: ../en/ch08-undo.xml:424 8.11813 +#: ../en/ch09-undo.xml:411 8.11814 msgid "" 8.11815 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option " 8.11816 "will do the <quote>right thing</quote> whether or not the changeset you're " 8.11817 @@ -9211,12 +11185,12 @@ 8.11818 msgstr "" 8.11819 8.11820 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11821 -#: ../en/ch08-undo.xml:435 8.11822 +#: ../en/ch09-undo.xml:422 8.11823 msgid "Gaining more control of the backout process" 8.11824 msgstr "在恢复处理中获得更多控制" 8.11825 8.11826 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11827 -#: ../en/ch08-undo.xml:437 8.11828 +#: ../en/ch09-undo.xml:424 8.11829 msgid "" 8.11830 "While I've recommended that you always use the <option role=\"hg-opt-backout" 8.11831 "\">--merge</option> option when backing out a change, the <command role=\"hg-" 8.11832 @@ -9229,14 +11203,14 @@ 8.11833 msgstr "" 8.11834 8.11835 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11836 -#: ../en/ch08-undo.xml:450 8.11837 +#: ../en/ch09-undo.xml:437 8.11838 msgid "" 8.11839 "As with our earlier example, We'll commit a third changeset, then back out " 8.11840 "its parent, and see what happens." 8.11841 msgstr "" 8.11842 8.11843 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11844 -#: ../en/ch08-undo.xml:456 8.11845 +#: ../en/ch09-undo.xml:443 8.11846 msgid "" 8.11847 "Our new changeset is again a descendant of the changeset we backout out; it's " 8.11848 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that " 8.11849 @@ -9245,7 +11219,7 @@ 8.11850 msgstr "" 8.11851 8.11852 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11853 -#: ../en/ch08-undo.xml:464 8.11854 +#: ../en/ch09-undo.xml:451 8.11855 msgid "" 8.11856 "Again, it's easier to see what has happened by looking at a graph of the " 8.11857 "revision history, in <xref linkend=\"fig:undo:backout-manual\"/>. This makes " 8.11858 @@ -9255,12 +11229,12 @@ 8.11859 msgstr "" 8.11860 8.11861 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.11862 -#: ../en/ch08-undo.xml:476 8.11863 +#: ../en/ch09-undo.xml:463 8.11864 msgid "<imageobject><imagedata fileref=\"figs/undo-manual.png\"/></imageobject>" 8.11865 msgstr "" 8.11866 8.11867 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11868 -#: ../en/ch08-undo.xml:481 8.11869 +#: ../en/ch09-undo.xml:468 8.11870 msgid "" 8.11871 "After the <command role=\"hg-cmd\">hg backout</command> command has " 8.11872 "completed, it leaves the new <quote>backout</quote> changeset as the parent " 8.11873 @@ -9268,12 +11242,12 @@ 8.11874 msgstr "" 8.11875 8.11876 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11877 -#: ../en/ch08-undo.xml:488 8.11878 +#: ../en/ch09-undo.xml:475 8.11879 msgid "Now we have two isolated sets of changes." 8.11880 msgstr "" 8.11881 8.11882 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11883 -#: ../en/ch08-undo.xml:492 8.11884 +#: ../en/ch09-undo.xml:479 8.11885 msgid "" 8.11886 "Let's think about what we expect to see as the contents of <filename>myfile</" 8.11887 "filename> now. The first change should be present, because we've never " 8.11888 @@ -9284,73 +11258,73 @@ 8.11889 msgstr "" 8.11890 8.11891 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11892 -#: ../en/ch08-undo.xml:502 8.11893 +#: ../en/ch09-undo.xml:489 8.11894 msgid "" 8.11895 "To get the third change back into the file, we just do a normal merge of our " 8.11896 "two heads." 8.11897 msgstr "" 8.11898 8.11899 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11900 -#: ../en/ch08-undo.xml:507 8.11901 +#: ../en/ch09-undo.xml:494 8.11902 msgid "" 8.11903 "Afterwards, the graphical history of our repository looks like <xref linkend=" 8.11904 "\"fig:undo:backout-manual-merge\"/>." 8.11905 msgstr "" 8.11906 8.11907 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.11908 -#: ../en/ch08-undo.xml:512 8.11909 +#: ../en/ch09-undo.xml:499 8.11910 msgid "Manually merging a backout change" 8.11911 msgstr "手工合并恢复修改" 8.11912 8.11913 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.11914 -#: ../en/ch08-undo.xml:514 8.11915 +#: ../en/ch09-undo.xml:501 8.11916 msgid "" 8.11917 "<imageobject><imagedata fileref=\"figs/undo-manual-merge.png\"/></imageobject>" 8.11918 msgstr "" 8.11919 8.11920 #. type: Content of: <book><chapter><sect1><sect2><title> 8.11921 -#: ../en/ch08-undo.xml:521 8.11922 +#: ../en/ch09-undo.xml:508 8.11923 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does" 8.11924 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕" 8.11925 8.11926 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11927 -#: ../en/ch08-undo.xml:524 8.11928 +#: ../en/ch09-undo.xml:511 8.11929 msgid "" 8.11930 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</" 8.11931 "command> command works." 8.11932 msgstr "" 8.11933 8.11934 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11935 -#: ../en/ch08-undo.xml:527 8.11936 +#: ../en/ch09-undo.xml:514 8.11937 msgid "" 8.11938 "It ensures that the working directory is <quote>clean</quote>, i.e. that the " 8.11939 "output of <command role=\"hg-cmd\">hg status</command> would be empty." 8.11940 msgstr "" 8.11941 8.11942 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11943 -#: ../en/ch08-undo.xml:531 8.11944 +#: ../en/ch09-undo.xml:518 8.11945 msgid "" 8.11946 "It remembers the current parent of the working directory. Let's call this " 8.11947 -"changeset <literal>orig</literal>" 8.11948 +"changeset <literal>orig</literal>." 8.11949 msgstr "" 8.11950 8.11951 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11952 -#: ../en/ch08-undo.xml:535 8.11953 +#: ../en/ch09-undo.xml:522 8.11954 msgid "" 8.11955 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to " 8.11956 "sync the working directory to the changeset you want to back out. Let's call " 8.11957 -"this changeset <literal>backout</literal>" 8.11958 +"this changeset <literal>backout</literal>." 8.11959 msgstr "" 8.11960 8.11961 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11962 -#: ../en/ch08-undo.xml:540 8.11963 +#: ../en/ch09-undo.xml:527 8.11964 msgid "" 8.11965 "It finds the parent of that changeset. Let's call that changeset " 8.11966 "<literal>parent</literal>." 8.11967 msgstr "" 8.11968 8.11969 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11970 -#: ../en/ch08-undo.xml:543 8.11971 +#: ../en/ch09-undo.xml:530 8.11972 msgid "" 8.11973 "For each file that the <literal>backout</literal> changeset affected, it does " 8.11974 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on " 8.11975 @@ -9359,14 +11333,14 @@ 8.11976 msgstr "" 8.11977 8.11978 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11979 -#: ../en/ch08-undo.xml:550 8.11980 +#: ../en/ch09-undo.xml:537 8.11981 msgid "" 8.11982 "It commits the result as a new changeset. This changeset has " 8.11983 "<literal>backout</literal> as its parent." 8.11984 msgstr "" 8.11985 8.11986 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.11987 -#: ../en/ch08-undo.xml:554 8.11988 +#: ../en/ch09-undo.xml:541 8.11989 msgid "" 8.11990 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the " 8.11991 "command line, it merges with <literal>orig</literal>, and commits the result " 8.11992 @@ -9374,7 +11348,7 @@ 8.11993 msgstr "" 8.11994 8.11995 #. type: Content of: <book><chapter><sect1><sect2><para> 8.11996 -#: ../en/ch08-undo.xml:560 8.11997 +#: ../en/ch09-undo.xml:547 8.11998 msgid "" 8.11999 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</" 8.12000 "command> command would be to <command role=\"hg-cmd\">hg export</command> the " 8.12001 @@ -9385,7 +11359,7 @@ 8.12002 msgstr "" 8.12003 8.12004 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12005 -#: ../en/ch08-undo.xml:570 8.12006 +#: ../en/ch09-undo.xml:557 8.12007 msgid "" 8.12008 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, " 8.12009 "a commit, a merge, and another commit is to give the merge machinery the best " 8.12010 @@ -9394,7 +11368,7 @@ 8.12011 msgstr "" 8.12012 8.12013 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12014 -#: ../en/ch08-undo.xml:577 8.12015 +#: ../en/ch09-undo.xml:564 8.12016 msgid "" 8.12017 "If you're backing out a changeset that's 100 revisions back in your project's " 8.12018 "history, the chances that the <command>patch</command> command will be able " 8.12019 @@ -9409,12 +11383,12 @@ 8.12020 msgstr "" 8.12021 8.12022 #. type: Content of: <book><chapter><sect1><title> 8.12023 -#: ../en/ch08-undo.xml:594 8.12024 +#: ../en/ch09-undo.xml:581 8.12025 msgid "Changes that should never have been" 8.12026 msgstr "不该发生的修改" 8.12027 8.12028 #. type: Content of: <book><chapter><sect1><para> 8.12029 -#: ../en/ch08-undo.xml:596 8.12030 +#: ../en/ch09-undo.xml:583 8.12031 msgid "" 8.12032 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command " 8.12033 "is exactly what you need if you want to undo the effects of a change. It " 8.12034 @@ -9423,7 +11397,7 @@ 8.12035 msgstr "" 8.12036 8.12037 #. type: Content of: <book><chapter><sect1><para> 8.12038 -#: ../en/ch08-undo.xml:602 8.12039 +#: ../en/ch09-undo.xml:589 8.12040 msgid "" 8.12041 "On rare occasions, though, you may find that you've committed a change that " 8.12042 "really should not be present in the repository at all. For example, it would " 8.12043 @@ -9435,7 +11409,7 @@ 8.12044 msgstr "" 8.12045 8.12046 #. type: Content of: <book><chapter><sect1><para> 8.12047 -#: ../en/ch08-undo.xml:611 8.12048 +#: ../en/ch09-undo.xml:598 8.12049 msgid "" 8.12050 "Before I discuss the options that you have if you commit a <quote>brown paper " 8.12051 "bag</quote> change (the kind that's so bad that you want to pull a brown " 8.12052 @@ -9444,7 +11418,7 @@ 8.12053 msgstr "" 8.12054 8.12055 #. type: Content of: <book><chapter><sect1><para> 8.12056 -#: ../en/ch08-undo.xml:616 8.12057 +#: ../en/ch09-undo.xml:603 8.12058 msgid "" 8.12059 "Since Mercurial treats history as accumulative&emdash;every change builds on " 8.12060 "top of all changes that preceded it&emdash;you generally can't just make " 8.12061 @@ -9456,7 +11430,7 @@ 8.12062 msgstr "" 8.12063 8.12064 #. type: Content of: <book><chapter><sect1><para> 8.12065 -#: ../en/ch08-undo.xml:625 8.12066 +#: ../en/ch09-undo.xml:612 8.12067 msgid "" 8.12068 "After you've pushed a bad change to another repository, you <emphasis>could</" 8.12069 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make " 8.12070 @@ -9466,18 +11440,18 @@ 8.12071 msgstr "" 8.12072 8.12073 #. type: Content of: <book><chapter><sect1><para> 8.12074 -#: ../en/ch08-undo.xml:633 8.12075 +#: ../en/ch09-undo.xml:620 8.12076 msgid "" 8.12077 "If a situation like this arises, and you know which repositories your bad " 8.12078 "change has propagated into, you can <emphasis>try</emphasis> to get rid of " 8.12079 -"the changeefrom <emphasis>every</emphasis> one of those repositories. This " 8.12080 +"the change from <emphasis>every</emphasis> one of those repositories. This " 8.12081 "is, of course, not a satisfactory solution: if you miss even a single " 8.12082 "repository while you're expunging, the change is still <quote>in the wild</" 8.12083 "quote>, and could propagate further." 8.12084 msgstr "" 8.12085 8.12086 #. type: Content of: <book><chapter><sect1><para> 8.12087 -#: ../en/ch08-undo.xml:641 8.12088 +#: ../en/ch09-undo.xml:628 8.12089 msgid "" 8.12090 "If you've committed one or more changes <emphasis>after</emphasis> the change " 8.12091 "that you'd like to see disappear, your options are further reduced. Mercurial " 8.12092 @@ -9485,21 +11459,135 @@ 8.12093 "changesets intact." 8.12094 msgstr "" 8.12095 8.12096 -#. type: Content of: <book><chapter><sect1><para> 8.12097 -#: ../en/ch08-undo.xml:647 8.12098 -msgid "" 8.12099 -"XXX This needs filling out. The <literal>hg-replay</literal> script in the " 8.12100 -"<literal>examples</literal> directory works, but doesn't handle merge " 8.12101 -"changesets. Kind of an important omission." 8.12102 -msgstr "" 8.12103 - 8.12104 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12105 -#: ../en/ch08-undo.xml:653 8.12106 +#: ../en/ch09-undo.xml:635 8.12107 +msgid "Backing out a merge" 8.12108 +msgstr "撤销一个合并" 8.12109 + 8.12110 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12111 +#: ../en/ch09-undo.xml:637 8.12112 +msgid "" 8.12113 +"Since merges are often complicated, it is not unheard of for a merge to be " 8.12114 +"mangled badly, but committed erroneously. Mercurial provides an important " 8.12115 +"safeguard against bad merges by refusing to commit unresolved files, but " 8.12116 +"human ingenuity guarantees that it is still possible to mess a merge up and " 8.12117 +"commit it." 8.12118 +msgstr "" 8.12119 + 8.12120 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12121 +#: ../en/ch09-undo.xml:644 8.12122 +msgid "" 8.12123 +"Given a bad merge that has been committed, usually the best way to approach " 8.12124 +"it is to simply try to repair the damage by hand. A complete disaster that " 8.12125 +"cannot be easily fixed up by hand ought to be very rare, but the <command " 8.12126 +"role=\"hg-cmd\">hg backout</command> command may help in making the cleanup " 8.12127 +"easier. It offers a <option role=\"hg-opt-backout\">--parent</option> option, " 8.12128 +"which lets you specify which parent to revert to when backing out a merge." 8.12129 +msgstr "" 8.12130 + 8.12131 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.12132 +#: ../en/ch09-undo.xml:655 8.12133 +msgid "A bad merge" 8.12134 +msgstr "错误的合并" 8.12135 + 8.12136 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.12137 +#: ../en/ch09-undo.xml:657 8.12138 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-1.png\"/></imageobject>" 8.12139 +msgstr "" 8.12140 + 8.12141 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12142 +#: ../en/ch09-undo.xml:662 8.12143 +msgid "" 8.12144 +"Suppose we have a revision graph like that in <xref linkend=\"fig:undo:bad-" 8.12145 +"merge-1\"/>. What we'd like is to <emphasis>redo</emphasis> the merge of " 8.12146 +"revisions 2 and 3." 8.12147 +msgstr "" 8.12148 + 8.12149 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12150 +#: ../en/ch09-undo.xml:667 8.12151 +msgid "One way to do so would be as follows." 8.12152 +msgstr "" 8.12153 + 8.12154 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12155 +#: ../en/ch09-undo.xml:671 8.12156 +msgid "" 8.12157 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=2</command>. This " 8.12158 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4, " 8.12159 +"which is the bad merge, and to when deciding which revision to prefer, to " 8.12160 +"choose parent 2, one of the parents of the merge. The effect can be seen in " 8.12161 +"<xref linkend=\"fig:undo:bad-merge-2\"/>." 8.12162 +msgstr "" 8.12163 + 8.12164 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 8.12165 +#: ../en/ch09-undo.xml:679 8.12166 +msgid "Backing out the merge, favoring one parent" 8.12167 +msgstr "拆除合并,关注一个父亲" 8.12168 + 8.12169 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 8.12170 +#: ../en/ch09-undo.xml:681 8.12171 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-2.png\"/></imageobject>" 8.12172 +msgstr "" 8.12173 +"<imageobject><imagedata fileref=\"figs/bad-merge-2.png\"/></imageobject>" 8.12174 + 8.12175 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12176 +#: ../en/ch09-undo.xml:688 8.12177 +msgid "" 8.12178 +"Call <command role=\"hg-cmd\">hg backout --rev=4 --parent=3</command>. This " 8.12179 +"tells <command role=\"hg-cmd\">hg backout</command> to back out revision 4 " 8.12180 +"again, but this time to choose parent 3, the other parent of the merge. The " 8.12181 +"result is visible in <xref linkend=\"fig:undo:bad-merge-3\"/>, in which the " 8.12182 +"repository now contains three heads." 8.12183 +msgstr "" 8.12184 + 8.12185 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 8.12186 +#: ../en/ch09-undo.xml:696 8.12187 +msgid "Backing out the merge, favoring the other parent" 8.12188 +msgstr "拆除合并,关注其它父亲" 8.12189 + 8.12190 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 8.12191 +#: ../en/ch09-undo.xml:699 8.12192 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-3.png\"/></imageobject>" 8.12193 +msgstr "" 8.12194 +"<imageobject><imagedata fileref=\"figs/bad-merge-3.png\"/></imageobject>" 8.12195 + 8.12196 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12197 +#: ../en/ch09-undo.xml:706 8.12198 +msgid "" 8.12199 +"Redo the bad merge by merging the two backout heads, which reduces the number " 8.12200 +"of heads in the repository to two, as can be seen in <xref linkend=\"fig:undo:" 8.12201 +"bad-merge-4\"/>." 8.12202 +msgstr "" 8.12203 + 8.12204 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><title> 8.12205 +#: ../en/ch09-undo.xml:711 ../en/ch09-undo.xml:724 8.12206 +msgid "Merging the backouts" 8.12207 +msgstr "合并拆除" 8.12208 + 8.12209 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 8.12210 +#: ../en/ch09-undo.xml:713 8.12211 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-4.png\"/></imageobject>" 8.12212 +msgstr "" 8.12213 +"<imageobject><imagedata fileref=\"figs/bad-merge-4.png\"/></imageobject>" 8.12214 + 8.12215 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12216 +#: ../en/ch09-undo.xml:720 8.12217 +msgid "" 8.12218 +"Merge with the commit that was made after the bad merge, as shown in <xref " 8.12219 +"linkend=\"fig:undo:bad-merge-5\"/>." 8.12220 +msgstr "" 8.12221 + 8.12222 +#. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><figure><mediaobject> 8.12223 +#: ../en/ch09-undo.xml:726 8.12224 +msgid "<imageobject><imagedata fileref=\"figs/bad-merge-5.png\"/></imageobject>" 8.12225 +msgstr "" 8.12226 + 8.12227 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.12228 +#: ../en/ch09-undo.xml:735 8.12229 msgid "Protect yourself from <quote>escaped</quote> changes" 8.12230 msgstr "使用<quote>校验</quote>修改来保护你自己" 8.12231 8.12232 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12233 -#: ../en/ch08-undo.xml:656 8.12234 +#: ../en/ch09-undo.xml:738 8.12235 msgid "" 8.12236 "If you've committed some changes to your local repository and they've been " 8.12237 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can " 8.12238 @@ -9509,7 +11597,7 @@ 8.12239 msgstr "" 8.12240 8.12241 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12242 -#: ../en/ch08-undo.xml:663 8.12243 +#: ../en/ch09-undo.xml:745 8.12244 msgid "" 8.12245 "By configuring some hooks on that repository to validate incoming changesets " 8.12246 "(see chapter <xref linkend=\"chap:hook\"/>), you can automatically prevent " 8.12247 @@ -9521,20 +11609,83 @@ 8.12248 msgstr "" 8.12249 8.12250 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12251 -#: ../en/ch08-undo.xml:673 8.12252 +#: ../en/ch09-undo.xml:755 8.12253 msgid "" 8.12254 "For instance, an incoming change hook that verifies that a changeset will " 8.12255 -"actually compile can prevent people from inadvertantly <quote>breaking the " 8.12256 +"actually compile can prevent people from inadvertently <quote>breaking the " 8.12257 "build</quote>." 8.12258 msgstr "" 8.12259 8.12260 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.12261 +#: ../en/ch09-undo.xml:762 8.12262 +msgid "What to do about sensitive changes that escape" 8.12263 +msgstr "处理敏感信息泄漏的方法" 8.12264 + 8.12265 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12266 +#: ../en/ch09-undo.xml:764 8.12267 +msgid "" 8.12268 +"Even a carefully run project can suffer an unfortunate event such as the " 8.12269 +"committing and uncontrolled propagation of a file that contains important " 8.12270 +"passwords." 8.12271 +msgstr "" 8.12272 + 8.12273 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12274 +#: ../en/ch09-undo.xml:768 8.12275 +msgid "" 8.12276 +"If something like this happens to you, and the information that gets " 8.12277 +"accidentally propagated is truly sensitive, your first step should be to " 8.12278 +"mitigate the effect of the leak without trying to control the leak itself. If " 8.12279 +"you are not 100% certain that you know exactly who could have seen the " 8.12280 +"changes, you should immediately change passwords, cancel credit cards, or " 8.12281 +"find some other way to make sure that the information that has leaked is no " 8.12282 +"longer useful. In other words, assume that the change has propagated far and " 8.12283 +"wide, and that there's nothing more you can do." 8.12284 +msgstr "" 8.12285 + 8.12286 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12287 +#: ../en/ch09-undo.xml:779 8.12288 +msgid "" 8.12289 +"You might hope that there would be mechanisms you could use to either figure " 8.12290 +"out who has seen a change or to erase the change permanently everywhere, but " 8.12291 +"there are good reasons why these are not possible." 8.12292 +msgstr "" 8.12293 + 8.12294 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12295 +#: ../en/ch09-undo.xml:784 8.12296 +msgid "" 8.12297 +"Mercurial does not provide an audit trail of who has pulled changes from a " 8.12298 +"repository, because it is usually either impossible to record such " 8.12299 +"information or trivial to spoof it. In a multi-user or networked " 8.12300 +"environment, you should thus be extremely skeptical of yourself if you think " 8.12301 +"that you have identified every place that a sensitive changeset has " 8.12302 +"propagated to. Don't forget that people can and will send bundles by email, " 8.12303 +"have their backup software save data offsite, carry repositories on USB " 8.12304 +"sticks, and find other completely innocent ways to confound your attempts to " 8.12305 +"track down every copy of a problematic change." 8.12306 +msgstr "" 8.12307 + 8.12308 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12309 +#: ../en/ch09-undo.xml:796 8.12310 +msgid "" 8.12311 +"Mercurial also does not provide a way to make a file or changeset completely " 8.12312 +"disappear from history, because there is no way to enforce its disappearance; " 8.12313 +"someone could easily modify their copy of Mercurial to ignore such " 8.12314 +"directives. In addition, even if Mercurial provided such a capability, " 8.12315 +"someone who simply hadn't pulled a <quote>make this file disappear</quote> " 8.12316 +"changeset wouldn't be affected by it, nor would web crawlers visiting at the " 8.12317 +"wrong time, disk backups, or other mechanisms. Indeed, no distributed " 8.12318 +"revision control system can make data reliably vanish. Providing the illusion " 8.12319 +"of such control could easily give a false sense of security, and be worse " 8.12320 +"than not providing it at all." 8.12321 +msgstr "" 8.12322 + 8.12323 #. type: Content of: <book><chapter><sect1><title> 8.12324 -#: ../en/ch08-undo.xml:680 8.12325 +#: ../en/ch09-undo.xml:812 8.12326 msgid "Finding the source of a bug" 8.12327 msgstr "查找问题的根源" 8.12328 8.12329 #. type: Content of: <book><chapter><sect1><para> 8.12330 -#: ../en/ch08-undo.xml:682 8.12331 +#: ../en/ch09-undo.xml:814 8.12332 msgid "" 8.12333 "While it's all very well to be able to back out a changeset that introduced a " 8.12334 "bug, this requires that you know which changeset to back out. Mercurial " 8.12335 @@ -9544,26 +11695,25 @@ 8.12336 msgstr "" 8.12337 8.12338 #. type: Content of: <book><chapter><sect1><para> 8.12339 -#: ../en/ch08-undo.xml:689 8.12340 +#: ../en/ch09-undo.xml:821 8.12341 msgid "" 8.12342 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is " 8.12343 -"that a changeset has introduced some change of behaviour that you can " 8.12344 -"identify with a simple binary test. You don't know which piece of code " 8.12345 -"introduced the change, but you know how to test for the presence of the bug. " 8.12346 -"The <command role=\"hg-cmd\">hg bisect</command> command uses your test to " 8.12347 -"direct its search for the changeset that introduced the code that caused the " 8.12348 -"bug." 8.12349 -msgstr "" 8.12350 - 8.12351 -#. type: Content of: <book><chapter><sect1><para> 8.12352 -#: ../en/ch08-undo.xml:698 8.12353 +"that a changeset has introduced some change of behavior that you can identify " 8.12354 +"with a simple pass/fail test. You don't know which piece of code introduced " 8.12355 +"the change, but you know how to test for the presence of the bug. The " 8.12356 +"<command role=\"hg-cmd\">hg bisect</command> command uses your test to direct " 8.12357 +"its search for the changeset that introduced the code that caused the bug." 8.12358 +msgstr "" 8.12359 + 8.12360 +#. type: Content of: <book><chapter><sect1><para> 8.12361 +#: ../en/ch09-undo.xml:830 8.12362 msgid "" 8.12363 "Here are a few scenarios to help you understand how you might apply this " 8.12364 "command." 8.12365 msgstr "" 8.12366 8.12367 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12368 -#: ../en/ch08-undo.xml:701 8.12369 +#: ../en/ch09-undo.xml:833 8.12370 msgid "" 8.12371 "The most recent version of your software has a bug that you remember wasn't " 8.12372 "present a few weeks ago, but you don't know when it was introduced. Here, " 8.12373 @@ -9571,7 +11721,7 @@ 8.12374 msgstr "" 8.12375 8.12376 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12377 -#: ../en/ch08-undo.xml:706 8.12378 +#: ../en/ch09-undo.xml:838 8.12379 msgid "" 8.12380 "You fixed a bug in a rush, and now it's time to close the entry in your " 8.12381 "team's bug database. The bug database requires a changeset ID when you close " 8.12382 @@ -9580,7 +11730,7 @@ 8.12383 msgstr "" 8.12384 8.12385 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12386 -#: ../en/ch08-undo.xml:713 8.12387 +#: ../en/ch09-undo.xml:845 8.12388 msgid "" 8.12389 "Your software works correctly, but runs 15% slower than the last time you " 8.12390 "measured it. You want to know which changeset introduced the performance " 8.12391 @@ -9589,14 +11739,14 @@ 8.12392 msgstr "" 8.12393 8.12394 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12395 -#: ../en/ch08-undo.xml:720 8.12396 +#: ../en/ch09-undo.xml:852 8.12397 msgid "" 8.12398 "The sizes of the components of your project that you ship exploded recently, " 8.12399 "and you suspect that something changed in the way you build your project." 8.12400 msgstr "" 8.12401 8.12402 #. type: Content of: <book><chapter><sect1><para> 8.12403 -#: ../en/ch08-undo.xml:725 8.12404 +#: ../en/ch09-undo.xml:857 8.12405 msgid "" 8.12406 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg " 8.12407 "bisect</command> command is not useful only for finding the sources of bugs. " 8.12408 @@ -9606,7 +11756,7 @@ 8.12409 msgstr "" 8.12410 8.12411 #. type: Content of: <book><chapter><sect1><para> 8.12412 -#: ../en/ch08-undo.xml:732 8.12413 +#: ../en/ch09-undo.xml:864 8.12414 msgid "" 8.12415 "We'll introduce a little bit of terminology here, just to make it clear which " 8.12416 "parts of the search process are your responsibility, and which are " 8.12417 @@ -9620,7 +11770,7 @@ 8.12418 msgstr "" 8.12419 8.12420 #. type: Content of: <book><chapter><sect1><para> 8.12421 -#: ../en/ch08-undo.xml:745 8.12422 +#: ../en/ch09-undo.xml:877 8.12423 msgid "" 8.12424 "One simple way to automate the searching process would be simply to probe " 8.12425 "every changeset. However, this scales poorly. If it took ten minutes to " 8.12426 @@ -9633,7 +11783,7 @@ 8.12427 msgstr "" 8.12428 8.12429 #. type: Content of: <book><chapter><sect1><para> 8.12430 -#: ../en/ch08-undo.xml:755 8.12431 +#: ../en/ch09-undo.xml:887 8.12432 msgid "" 8.12433 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its " 8.12434 "knowledge of the <quote>shape</quote> of your project's revision history to " 8.12435 @@ -9646,7 +11796,7 @@ 8.12436 msgstr "" 8.12437 8.12438 #. type: Content of: <book><chapter><sect1><para> 8.12439 -#: ../en/ch08-undo.xml:766 8.12440 +#: ../en/ch09-undo.xml:898 8.12441 msgid "" 8.12442 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the " 8.12443 "<quote>branchy</quote> nature of a Mercurial project's revision history, so " 8.12444 @@ -9656,18 +11806,18 @@ 8.12445 msgstr "" 8.12446 8.12447 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12448 -#: ../en/ch08-undo.xml:774 8.12449 +#: ../en/ch09-undo.xml:906 8.12450 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command" 8.12451 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 8.12452 8.12453 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12454 -#: ../en/ch08-undo.xml:777 8.12455 +#: ../en/ch09-undo.xml:909 8.12456 msgid "" 8.12457 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action." 8.12458 msgstr "" 8.12459 8.12460 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.12461 -#: ../en/ch08-undo.xml:781 8.12462 +#: ../en/ch09-undo.xml:913 8.12463 msgid "" 8.12464 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg " 8.12465 "bisect</command> was not a core command: it was distributed with Mercurial as " 8.12466 @@ -9676,14 +11826,14 @@ 8.12467 msgstr "" 8.12468 8.12469 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12470 -#: ../en/ch08-undo.xml:788 8.12471 +#: ../en/ch09-undo.xml:920 8.12472 msgid "" 8.12473 "Now let's create a repository, so that we can try out the <command role=\"hg-" 8.12474 "cmd\">hg bisect</command> command in isolation." 8.12475 msgstr "" 8.12476 8.12477 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12478 -#: ../en/ch08-undo.xml:794 8.12479 +#: ../en/ch09-undo.xml:926 8.12480 msgid "" 8.12481 "We'll simulate a project that has a bug in it in a simple-minded way: create " 8.12482 "trivial changes in a loop, and nominate one specific change that will have " 8.12483 @@ -9693,7 +11843,7 @@ 8.12484 msgstr "" 8.12485 8.12486 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12487 -#: ../en/ch08-undo.xml:804 8.12488 +#: ../en/ch09-undo.xml:936 8.12489 msgid "" 8.12490 "The next thing that we'd like to do is figure out how to use the <command " 8.12491 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal " 8.12492 @@ -9701,46 +11851,49 @@ 8.12493 msgstr "" 8.12494 8.12495 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12496 -#: ../en/ch08-undo.xml:811 8.12497 +#: ../en/ch09-undo.xml:943 8.12498 msgid "" 8.12499 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. " 8.12500 "Each step proceeds as follows." 8.12501 msgstr "" 8.12502 8.12503 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12504 -#: ../en/ch08-undo.xml:814 8.12505 +#: ../en/ch09-undo.xml:946 8.12506 msgid "You run your binary test." 8.12507 msgstr "" 8.12508 8.12509 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 8.12510 -#: ../en/ch08-undo.xml:816 8.12511 +#: ../en/ch09-undo.xml:948 8.12512 msgid "" 8.12513 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> " 8.12514 -"by running the <command role=\"hg-cmd\">hg bisect good</command> command." 8.12515 -msgstr "" 8.12516 +"by running the <command role=\"hg-cmd\">hg bisect --good</command> command." 8.12517 +msgstr "" 8.12518 +"当测试成功后,使用 <command role=\"hg-cmd\">hg bisect --good</command> 命令告" 8.12519 +"诉 <command role=\"hg-cmd\">hg bisect</command> 命令。" 8.12520 8.12521 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 8.12522 -#: ../en/ch08-undo.xml:821 8.12523 -msgid "" 8.12524 -"If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> " 8.12525 +#: ../en/ch09-undo.xml:953 8.12526 +msgid "" 8.12527 +"If it failed, run the <command role=\"hg-cmd\">hg bisect --bad</command> " 8.12528 "command." 8.12529 msgstr "" 8.12530 +"如果失败,执行 <command role=\"hg-cmd\">hg bisect --bad</command> 命令。" 8.12531 8.12532 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12533 -#: ../en/ch08-undo.xml:825 8.12534 +#: ../en/ch09-undo.xml:957 8.12535 msgid "" 8.12536 "The command uses your information to decide which changeset to test next." 8.12537 msgstr "" 8.12538 8.12539 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 8.12540 -#: ../en/ch08-undo.xml:828 8.12541 +#: ../en/ch09-undo.xml:960 8.12542 msgid "" 8.12543 "It updates the working directory to that changeset, and the process begins " 8.12544 "again." 8.12545 msgstr "" 8.12546 8.12547 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12548 -#: ../en/ch08-undo.xml:831 8.12549 +#: ../en/ch09-undo.xml:963 8.12550 msgid "" 8.12551 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies " 8.12552 "a unique changeset that marks the point where your test transitioned from " 8.12553 @@ -9749,14 +11902,14 @@ 8.12554 8.12555 # 8.12556 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12557 -#: ../en/ch08-undo.xml:836 8.12558 +#: ../en/ch09-undo.xml:968 8.12559 msgid "" 8.12560 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --" 8.12561 "reset</command> command." 8.12562 msgstr "" 8.12563 8.12564 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12565 -#: ../en/ch08-undo.xml:841 8.12566 +#: ../en/ch09-undo.xml:973 8.12567 msgid "" 8.12568 "In our case, the binary test we use is simple: we check to see if any file in " 8.12569 "the repository contains the string <quote>i have a gub</quote>. If it does, " 8.12570 @@ -9766,7 +11919,7 @@ 8.12571 msgstr "" 8.12572 8.12573 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12574 -#: ../en/ch08-undo.xml:849 8.12575 +#: ../en/ch09-undo.xml:981 8.12576 msgid "" 8.12577 "Most of the time, the revision to which the working directory is synced " 8.12578 "(usually the tip) already exhibits the problem introduced by the buggy " 8.12579 @@ -9775,7 +11928,7 @@ 8.12580 8.12581 # 8.12582 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12583 -#: ../en/ch08-undo.xml:856 8.12584 +#: ../en/ch09-undo.xml:988 8.12585 msgid "" 8.12586 "Our next task is to nominate a changeset that we know <emphasis>doesn't</" 8.12587 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> " 8.12588 @@ -9786,26 +11939,26 @@ 8.12589 msgstr "" 8.12590 8.12591 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12592 -#: ../en/ch08-undo.xml:866 8.12593 +#: ../en/ch09-undo.xml:998 8.12594 msgid "Notice that this command printed some output." 8.12595 msgstr "" 8.12596 8.12597 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12598 -#: ../en/ch08-undo.xml:868 8.12599 +#: ../en/ch09-undo.xml:1000 8.12600 msgid "" 8.12601 "It told us how many changesets it must consider before it can identify the " 8.12602 "one that introduced the bug, and how many tests that will require." 8.12603 msgstr "" 8.12604 8.12605 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12606 -#: ../en/ch08-undo.xml:872 8.12607 +#: ../en/ch09-undo.xml:1004 8.12608 msgid "" 8.12609 "It updated the working directory to the next changeset to test, and told us " 8.12610 "which changeset it's testing." 8.12611 msgstr "" 8.12612 8.12613 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12614 -#: ../en/ch08-undo.xml:877 8.12615 +#: ../en/ch09-undo.xml:1009 8.12616 msgid "" 8.12617 "We now run our test in the working directory. We use the <command>grep</" 8.12618 "command> command to see if our <quote>bad</quote> file is present in the " 8.12619 @@ -9814,26 +11967,26 @@ 8.12620 msgstr "" 8.12621 8.12622 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12623 -#: ../en/ch08-undo.xml:883 8.12624 +#: ../en/ch09-undo.xml:1015 8.12625 msgid "" 8.12626 "This test looks like a perfect candidate for automation, so let's turn it " 8.12627 "into a shell function." 8.12628 msgstr "" 8.12629 8.12630 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12631 -#: ../en/ch08-undo.xml:887 8.12632 +#: ../en/ch09-undo.xml:1019 8.12633 msgid "" 8.12634 "We can now run an entire test step with a single command, <literal>mytest</" 8.12635 "literal>." 8.12636 msgstr "" 8.12637 8.12638 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12639 -#: ../en/ch08-undo.xml:892 8.12640 +#: ../en/ch09-undo.xml:1024 8.12641 msgid "A few more invocations of our canned test step command, and we're done." 8.12642 msgstr "" 8.12643 8.12644 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12645 -#: ../en/ch08-undo.xml:897 8.12646 +#: ../en/ch09-undo.xml:1029 8.12647 msgid "" 8.12648 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd" 8.12649 "\">hg bisect</command> command let us find the changeset that introduced our " 8.12650 @@ -9845,35 +11998,34 @@ 8.12651 msgstr "" 8.12652 8.12653 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12654 -#: ../en/ch08-undo.xml:908 8.12655 +#: ../en/ch09-undo.xml:1040 8.12656 msgid "Cleaning up after your search" 8.12657 msgstr "搜索后的清理" 8.12658 8.12659 -# 8.12660 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.12661 -#: ../en/ch08-undo.xml:910 8.12662 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.12663 +#: ../en/ch09-undo.xml:1042 8.12664 msgid "" 8.12665 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> " 8.12666 -"command in a repository, you can use the <command role=\"hg-cmd\">hg bisect " 8.12667 +"command in a repository, you can use the <command role=\"hg-cmd\">hg bisect --" 8.12668 "reset</command> command to drop the information it was using to drive your " 8.12669 "search. The command doesn't use much space, so it doesn't matter if you " 8.12670 "forget to run this command. However, <command role=\"hg-cmd\">hg bisect</" 8.12671 "command> won't let you start a new search in that repository until you do a " 8.12672 -"<command role=\"hg-cmd\">hg bisect reset</command>." 8.12673 +"<command role=\"hg-cmd\">hg bisect --reset</command>." 8.12674 msgstr "" 8.12675 8.12676 #. type: Content of: <book><chapter><sect1><title> 8.12677 -#: ../en/ch08-undo.xml:925 8.12678 +#: ../en/ch09-undo.xml:1057 8.12679 msgid "Tips for finding bugs effectively" 8.12680 msgstr "有效查找问题的技巧" 8.12681 8.12682 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12683 -#: ../en/ch08-undo.xml:928 8.12684 +#: ../en/ch09-undo.xml:1060 8.12685 msgid "Give consistent input" 8.12686 msgstr "给出一致的输入" 8.12687 8.12688 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12689 -#: ../en/ch08-undo.xml:930 8.12690 +#: ../en/ch09-undo.xml:1062 8.12691 msgid "" 8.12692 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you " 8.12693 "correctly report the result of every test you perform. If you tell it that a " 8.12694 @@ -9885,12 +12037,12 @@ 8.12695 msgstr "" 8.12696 8.12697 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12698 -#: ../en/ch08-undo.xml:942 8.12699 +#: ../en/ch09-undo.xml:1074 8.12700 msgid "Automate as much as possible" 8.12701 msgstr "尽量自动" 8.12702 8.12703 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12704 -#: ../en/ch08-undo.xml:944 8.12705 +#: ../en/ch09-undo.xml:1076 8.12706 msgid "" 8.12707 "When I started using the <command role=\"hg-cmd\">hg bisect</command> " 8.12708 "command, I tried a few times to run my tests by hand, on the command line. " 8.12709 @@ -9900,7 +12052,7 @@ 8.12710 msgstr "" 8.12711 8.12712 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12713 -#: ../en/ch08-undo.xml:952 8.12714 +#: ../en/ch09-undo.xml:1084 8.12715 msgid "" 8.12716 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</" 8.12717 "command> command by hand occurred even with simple searches on small " 8.12718 @@ -9911,24 +12063,24 @@ 8.12719 msgstr "" 8.12720 8.12721 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12722 -#: ../en/ch08-undo.xml:961 8.12723 +#: ../en/ch09-undo.xml:1093 8.12724 msgid "The key to automated testing is twofold:" 8.12725 msgstr "" 8.12726 8.12727 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12728 -#: ../en/ch08-undo.xml:963 8.12729 +#: ../en/ch09-undo.xml:1095 8.12730 msgid "always test for the same symptom, and" 8.12731 msgstr "" 8.12732 8.12733 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12734 -#: ../en/ch08-undo.xml:965 8.12735 +#: ../en/ch09-undo.xml:1097 8.12736 msgid "" 8.12737 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</" 8.12738 "command> command." 8.12739 msgstr "" 8.12740 8.12741 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12742 -#: ../en/ch08-undo.xml:968 8.12743 +#: ../en/ch09-undo.xml:1100 8.12744 msgid "" 8.12745 "In my tutorial example above, the <command>grep</command> command tests for " 8.12746 "the symptom, and the <literal>if</literal> statement takes the result of this " 8.12747 @@ -9939,12 +12091,12 @@ 8.12748 msgstr "" 8.12749 8.12750 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12751 -#: ../en/ch08-undo.xml:978 8.12752 +#: ../en/ch09-undo.xml:1110 8.12753 msgid "Check your results" 8.12754 msgstr "检查你的结果" 8.12755 8.12756 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12757 -#: ../en/ch08-undo.xml:980 8.12758 +#: ../en/ch09-undo.xml:1112 8.12759 msgid "" 8.12760 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search " 8.12761 "is only as good as the input you give it, don't take the changeset it reports " 8.12762 @@ -9953,32 +12105,32 @@ 8.12763 msgstr "" 8.12764 8.12765 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12766 -#: ../en/ch08-undo.xml:986 8.12767 +#: ../en/ch09-undo.xml:1118 8.12768 msgid "" 8.12769 "The changeset that it reports as the first bad revision. Your test should " 8.12770 "still report this as bad." 8.12771 msgstr "" 8.12772 8.12773 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12774 -#: ../en/ch08-undo.xml:990 8.12775 +#: ../en/ch09-undo.xml:1122 8.12776 msgid "" 8.12777 "The parent of that changeset (either parent, if it's a merge). Your test " 8.12778 "should report this changeset as good." 8.12779 msgstr "" 8.12780 8.12781 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.12782 -#: ../en/ch08-undo.xml:994 8.12783 +#: ../en/ch09-undo.xml:1126 8.12784 msgid "" 8.12785 "A child of that changeset. Your test should report this changeset as bad." 8.12786 msgstr "" 8.12787 8.12788 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12789 -#: ../en/ch08-undo.xml:1000 8.12790 +#: ../en/ch09-undo.xml:1132 8.12791 msgid "Beware interference between bugs" 8.12792 msgstr "谨防问题之间的冲突" 8.12793 8.12794 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12795 -#: ../en/ch08-undo.xml:1002 8.12796 +#: ../en/ch09-undo.xml:1134 8.12797 msgid "" 8.12798 "It's possible that your search for one bug could be disrupted by the presence " 8.12799 "of another. For example, let's say your software crashes at revision 100, " 8.12800 @@ -9988,7 +12140,7 @@ 8.12801 msgstr "" 8.12802 8.12803 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12804 -#: ../en/ch08-undo.xml:1010 8.12805 +#: ../en/ch09-undo.xml:1142 8.12806 msgid "" 8.12807 "It is possible that this other bug completely <quote>masks</quote> yours, " 8.12808 "which is to say that it occurs before your bug has a chance to manifest " 8.12809 @@ -10000,7 +12152,7 @@ 8.12810 msgstr "" 8.12811 8.12812 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12813 -#: ../en/ch08-undo.xml:1020 8.12814 +#: ../en/ch09-undo.xml:1152 8.12815 msgid "" 8.12816 "A different problem could arise if your test for a bug's presence is not " 8.12817 "specific enough. If you check for <quote>my program crashes</quote>, then " 8.12818 @@ -10009,7 +12161,7 @@ 8.12819 msgstr "" 8.12820 8.12821 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12822 -#: ../en/ch08-undo.xml:1027 8.12823 +#: ../en/ch09-undo.xml:1159 8.12824 msgid "" 8.12825 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --" 8.12826 "skip</command> is if you can't test a revision because your project was in a " 8.12827 @@ -10018,12 +12170,12 @@ 8.12828 msgstr "" 8.12829 8.12830 #. type: Content of: <book><chapter><sect1><sect2><title> 8.12831 -#: ../en/ch08-undo.xml:1036 8.12832 +#: ../en/ch09-undo.xml:1168 8.12833 msgid "Bracket your search lazily" 8.12834 msgstr "减少你的查找工作" 8.12835 8.12836 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12837 -#: ../en/ch08-undo.xml:1038 8.12838 +#: ../en/ch09-undo.xml:1170 8.12839 msgid "" 8.12840 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that " 8.12841 "will mark the end points of your search is often easy, but it bears a little " 8.12842 @@ -10033,7 +12185,7 @@ 8.12843 msgstr "" 8.12844 8.12845 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12846 -#: ../en/ch08-undo.xml:1046 8.12847 +#: ../en/ch09-undo.xml:1178 8.12848 msgid "" 8.12849 "If you're having trouble remembering when a suitable <quote>good</quote> " 8.12850 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</" 8.12851 @@ -10044,21 +12196,21 @@ 8.12852 msgstr "" 8.12853 8.12854 #. type: Content of: <book><chapter><sect1><sect2><para> 8.12855 -#: ../en/ch08-undo.xml:1055 8.12856 +#: ../en/ch09-undo.xml:1187 8.12857 msgid "" 8.12858 "Even if you end up <quote>early</quote> by thousands of changesets or months " 8.12859 "of history, you will only add a handful of tests to the total number that " 8.12860 "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its " 8.12861 -"logarithmic behaviour." 8.12862 +"logarithmic behavior." 8.12863 msgstr "" 8.12864 8.12865 #. type: Content of: <book><chapter><title> 8.12866 -#: ../en/ch09-hook.xml:5 8.12867 +#: ../en/ch10-hook.xml:5 8.12868 msgid "Handling repository events with hooks" 8.12869 msgstr "使用钩子处理版本库事件" 8.12870 8.12871 #. type: Content of: <book><chapter><para> 8.12872 -#: ../en/ch09-hook.xml:7 8.12873 +#: ../en/ch10-hook.xml:7 8.12874 msgid "" 8.12875 "Mercurial offers a powerful mechanism to let you perform automated actions in " 8.12876 "response to events that occur in a repository. In some cases, you can even " 8.12877 @@ -10066,7 +12218,7 @@ 8.12878 msgstr "" 8.12879 8.12880 #. type: Content of: <book><chapter><para> 8.12881 -#: ../en/ch09-hook.xml:12 8.12882 +#: ../en/ch10-hook.xml:12 8.12883 msgid "" 8.12884 "The name Mercurial uses for one of these actions is a <emphasis>hook</" 8.12885 "emphasis>. Hooks are called <quote>triggers</quote> in some revision control " 8.12886 @@ -10074,33 +12226,42 @@ 8.12887 msgstr "" 8.12888 8.12889 #. type: Content of: <book><chapter><sect1><title> 8.12890 -#: ../en/ch09-hook.xml:18 8.12891 +#: ../en/ch10-hook.xml:18 8.12892 msgid "An overview of hooks in Mercurial" 8.12893 msgstr "Mercurial 钩子概述" 8.12894 8.12895 #. type: Content of: <book><chapter><sect1><para> 8.12896 -#: ../en/ch09-hook.xml:20 8.12897 +#: ../en/ch10-hook.xml:20 8.12898 msgid "" 8.12899 "Here is a brief list of the hooks that Mercurial supports. We will revisit " 8.12900 "each of these hooks in more detail later, in <xref linkend=\"sec:hook:ref\"/>." 8.12901 msgstr "" 8.12902 8.12903 +#. type: Content of: <book><chapter><sect1><para> 8.12904 +#: ../en/ch10-hook.xml:24 8.12905 +msgid "" 8.12906 +"Each of the hooks whose description begins with the word <quote>Controlling</" 8.12907 +"quote> has the ability to determine whether an activity can proceed. If the " 8.12908 +"hook succeeds, the activity may proceed; if it fails, the activity is either " 8.12909 +"not permitted or undone, depending on the hook." 8.12910 +msgstr "" 8.12911 + 8.12912 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12913 -#: ../en/ch09-hook.xml:25 8.12914 +#: ../en/ch10-hook.xml:31 8.12915 msgid "" 8.12916 "<literal role=\"hook\">changegroup</literal>: This is run after a group of " 8.12917 "changesets has been brought into the repository from elsewhere." 8.12918 msgstr "" 8.12919 8.12920 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12921 -#: ../en/ch09-hook.xml:29 8.12922 +#: ../en/ch10-hook.xml:35 8.12923 msgid "" 8.12924 "<literal role=\"hook\">commit</literal>: This is run after a new changeset " 8.12925 "has been created in the local repository." 8.12926 msgstr "" 8.12927 8.12928 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12929 -#: ../en/ch09-hook.xml:33 8.12930 +#: ../en/ch10-hook.xml:39 8.12931 msgid "" 8.12932 "<literal role=\"hook\">incoming</literal>: This is run once for each new " 8.12933 "changeset that is brought into the repository from elsewhere. Notice the " 8.12934 @@ -10109,42 +12270,42 @@ 8.12935 msgstr "" 8.12936 8.12937 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12938 -#: ../en/ch09-hook.xml:40 8.12939 +#: ../en/ch10-hook.xml:46 8.12940 msgid "" 8.12941 "<literal role=\"hook\">outgoing</literal>: This is run after a group of " 8.12942 "changesets has been transmitted from this repository." 8.12943 msgstr "" 8.12944 8.12945 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12946 -#: ../en/ch09-hook.xml:44 8.12947 +#: ../en/ch10-hook.xml:50 8.12948 msgid "" 8.12949 "<literal role=\"hook\">prechangegroup</literal>: This is run before starting " 8.12950 "to bring a group of changesets into the repository." 8.12951 msgstr "" 8.12952 8.12953 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12954 -#: ../en/ch09-hook.xml:49 8.12955 +#: ../en/ch10-hook.xml:55 8.12956 msgid "" 8.12957 "<literal role=\"hook\">precommit</literal>: Controlling. This is run before " 8.12958 "starting a commit." 8.12959 msgstr "" 8.12960 8.12961 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12962 -#: ../en/ch09-hook.xml:53 8.12963 +#: ../en/ch10-hook.xml:59 8.12964 msgid "" 8.12965 "<literal role=\"hook\">preoutgoing</literal>: Controlling. This is run before " 8.12966 "starting to transmit a group of changesets from this repository." 8.12967 msgstr "" 8.12968 8.12969 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12970 -#: ../en/ch09-hook.xml:58 8.12971 +#: ../en/ch10-hook.xml:64 8.12972 msgid "" 8.12973 "<literal role=\"hook\">pretag</literal>: Controlling. This is run before " 8.12974 "creating a tag." 8.12975 msgstr "" 8.12976 8.12977 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12978 -#: ../en/ch09-hook.xml:62 8.12979 +#: ../en/ch10-hook.xml:68 8.12980 msgid "" 8.12981 "<literal role=\"hook\">pretxnchangegroup</literal>: Controlling. This is run " 8.12982 "after a group of changesets has been brought into the local repository from " 8.12983 @@ -10153,7 +12314,7 @@ 8.12984 msgstr "" 8.12985 8.12986 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12987 -#: ../en/ch09-hook.xml:70 8.12988 +#: ../en/ch10-hook.xml:76 8.12989 msgid "" 8.12990 "<literal role=\"hook\">pretxncommit</literal>: Controlling. This is run after " 8.12991 "a new changeset has been created in the local repository, but before the " 8.12992 @@ -10161,46 +12322,37 @@ 8.12993 msgstr "" 8.12994 8.12995 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.12996 -#: ../en/ch09-hook.xml:76 8.12997 +#: ../en/ch10-hook.xml:82 8.12998 msgid "" 8.12999 "<literal role=\"hook\">preupdate</literal>: Controlling. This is run before " 8.13000 "starting an update or merge of the working directory." 8.13001 msgstr "" 8.13002 8.13003 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.13004 -#: ../en/ch09-hook.xml:81 8.13005 +#: ../en/ch10-hook.xml:87 8.13006 msgid "" 8.13007 "<literal role=\"hook\">tag</literal>: This is run after a tag is created." 8.13008 msgstr "" 8.13009 8.13010 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.13011 -#: ../en/ch09-hook.xml:85 8.13012 +#: ../en/ch10-hook.xml:91 8.13013 msgid "" 8.13014 "<literal role=\"hook\">update</literal>: This is run after an update or merge " 8.13015 "of the working directory has finished." 8.13016 msgstr "" 8.13017 8.13018 -#. type: Content of: <book><chapter><sect1><para> 8.13019 -#: ../en/ch09-hook.xml:90 8.13020 -msgid "" 8.13021 -"Each of the hooks whose description begins with the word <quote>Controlling</" 8.13022 -"quote> has the ability to determine whether an activity can proceed. If the " 8.13023 -"hook succeeds, the activity may proceed; if it fails, the activity is either " 8.13024 -"not permitted or undone, depending on the hook." 8.13025 -msgstr "" 8.13026 - 8.13027 #. type: Content of: <book><chapter><sect1><title> 8.13028 -#: ../en/ch09-hook.xml:99 8.13029 +#: ../en/ch10-hook.xml:99 8.13030 msgid "Hooks and security" 8.13031 msgstr "钩子与安全性" 8.13032 8.13033 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13034 -#: ../en/ch09-hook.xml:102 8.13035 +#: ../en/ch10-hook.xml:102 8.13036 msgid "Hooks are run with your privileges" 8.13037 msgstr "钩子以你的特权执行" 8.13038 8.13039 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13040 -#: ../en/ch09-hook.xml:104 8.13041 +#: ../en/ch10-hook.xml:104 8.13042 msgid "" 8.13043 "When you run a Mercurial command in a repository, and the command causes a " 8.13044 "hook to run, that hook runs on <emphasis>your</emphasis> system, under " 8.13045 @@ -10211,7 +12363,7 @@ 8.13046 msgstr "" 8.13047 8.13048 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13049 -#: ../en/ch09-hook.xml:115 8.13050 +#: ../en/ch10-hook.xml:115 8.13051 msgid "" 8.13052 "In some cases, you may be exposed to hooks that you did not install " 8.13053 "yourself. If you work with Mercurial on an unfamiliar system, Mercurial will " 8.13054 @@ -10220,7 +12372,7 @@ 8.13055 msgstr "" 8.13056 8.13057 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13058 -#: ../en/ch09-hook.xml:122 8.13059 +#: ../en/ch10-hook.xml:122 8.13060 msgid "" 8.13061 "If you are working with a repository owned by another user, Mercurial can run " 8.13062 "hooks defined in that user's repository, but it will still run them as " 8.13063 @@ -10232,7 +12384,7 @@ 8.13064 msgstr "" 8.13065 8.13066 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.13067 -#: ../en/ch09-hook.xml:134 8.13068 +#: ../en/ch10-hook.xml:134 8.13069 msgid "" 8.13070 "This only applies if you are pulling from a repository on a local or network " 8.13071 "filesystem. If you're pulling over http or ssh, any <literal role=\"hook" 8.13072 @@ -10241,10 +12393,10 @@ 8.13073 msgstr "" 8.13074 8.13075 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13076 -#: ../en/ch09-hook.xml:142 8.13077 -msgid "" 8.13078 -"XXX To see what hooks are defined in a repository, use the <command role=\"hg-" 8.13079 -"cmd\">hg config hooks</command> command. If you are working in one " 8.13080 +#: ../en/ch10-hook.xml:142 8.13081 +msgid "" 8.13082 +"To see what hooks are defined in a repository, use the <command role=\"hg-cmd" 8.13083 +"\">hg showconfig hooks</command> command. If you are working in one " 8.13084 "repository, but talking to another that you do not own (e.g. using <command " 8.13085 "role=\"hg-cmd\">hg pull</command> or <command role=\"hg-cmd\">hg incoming</" 8.13086 "command>), remember that it is the other repository's hooks you should be " 8.13087 @@ -10252,12 +12404,12 @@ 8.13088 msgstr "" 8.13089 8.13090 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13091 -#: ../en/ch09-hook.xml:153 8.13092 +#: ../en/ch10-hook.xml:153 8.13093 msgid "Hooks do not propagate" 8.13094 msgstr "钩子不会传播" 8.13095 8.13096 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13097 -#: ../en/ch09-hook.xml:155 8.13098 +#: ../en/ch10-hook.xml:155 8.13099 msgid "" 8.13100 "In Mercurial, hooks are not revision controlled, and do not propagate when " 8.13101 "you clone, or pull from, a repository. The reason for this is simple: a hook " 8.13102 @@ -10266,7 +12418,7 @@ 8.13103 msgstr "" 8.13104 8.13105 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13106 -#: ../en/ch09-hook.xml:162 8.13107 +#: ../en/ch10-hook.xml:162 8.13108 msgid "" 8.13109 "It would be extremely reckless for any distributed revision control system to " 8.13110 "implement revision-controlled hooks, as this would offer an easily " 8.13111 @@ -10275,7 +12427,7 @@ 8.13112 msgstr "" 8.13113 8.13114 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13115 -#: ../en/ch09-hook.xml:168 8.13116 +#: ../en/ch10-hook.xml:168 8.13117 msgid "" 8.13118 "Since Mercurial does not propagate hooks, if you are collaborating with other " 8.13119 "people on a common project, you should not assume that they are using the " 8.13120 @@ -10284,7 +12436,7 @@ 8.13121 msgstr "" 8.13122 8.13123 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13124 -#: ../en/ch09-hook.xml:175 8.13125 +#: ../en/ch10-hook.xml:175 8.13126 msgid "" 8.13127 "In a corporate intranet, this is somewhat easier to control, as you can for " 8.13128 "example provide a <quote>standard</quote> installation of Mercurial on an NFS " 8.13129 @@ -10294,20 +12446,20 @@ 8.13130 msgstr "" 8.13131 8.13132 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13133 -#: ../en/ch09-hook.xml:184 8.13134 +#: ../en/ch10-hook.xml:184 8.13135 msgid "Hooks can be overridden" 8.13136 msgstr "钩子可以被覆盖" 8.13137 8.13138 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13139 -#: ../en/ch09-hook.xml:186 8.13140 +#: ../en/ch10-hook.xml:186 8.13141 msgid "" 8.13142 "Mercurial allows you to override a hook definition by redefining the hook. " 8.13143 "You can disable it by setting its value to the empty string, or change its " 8.13144 -"behaviour as you wish." 8.13145 -msgstr "" 8.13146 - 8.13147 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.13148 -#: ../en/ch09-hook.xml:191 8.13149 +"behavior as you wish." 8.13150 +msgstr "" 8.13151 + 8.13152 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.13153 +#: ../en/ch10-hook.xml:191 8.13154 msgid "" 8.13155 "If you deploy a system- or site-wide <filename role=\"special\">~/.hgrc</" 8.13156 "filename> file that defines some hooks, you should thus understand that your " 8.13157 @@ -10315,12 +12467,12 @@ 8.13158 msgstr "" 8.13159 8.13160 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13161 -#: ../en/ch09-hook.xml:199 8.13162 +#: ../en/ch10-hook.xml:199 8.13163 msgid "Ensuring that critical hooks are run" 8.13164 msgstr "确保关键钩子的执行" 8.13165 8.13166 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13167 -#: ../en/ch09-hook.xml:201 8.13168 +#: ../en/ch10-hook.xml:201 8.13169 msgid "" 8.13170 "Sometimes you may want to enforce a policy that you do not want others to be " 8.13171 "able to work around. For example, you may have a requirement that every " 8.13172 @@ -10331,7 +12483,7 @@ 8.13173 msgstr "" 8.13174 8.13175 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13176 -#: ../en/ch09-hook.xml:210 8.13177 +#: ../en/ch10-hook.xml:210 8.13178 msgid "" 8.13179 "Instead, you can set up your policies for use of Mercurial so that people are " 8.13180 "expected to propagate changes through a well-known <quote>canonical</quote> " 8.13181 @@ -10339,7 +12491,7 @@ 8.13182 msgstr "" 8.13183 8.13184 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13185 -#: ../en/ch09-hook.xml:216 8.13186 +#: ../en/ch10-hook.xml:216 8.13187 msgid "" 8.13188 "One way to do this is via a combination of social engineering and " 8.13189 "technology. Set up a restricted-access account; users can push changes over " 8.13190 @@ -10349,7 +12501,7 @@ 8.13191 msgstr "" 8.13192 8.13193 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13194 -#: ../en/ch09-hook.xml:225 8.13195 +#: ../en/ch10-hook.xml:225 8.13196 msgid "" 8.13197 "When someone pushes a changeset to the server that everyone pulls from, the " 8.13198 "server will test the changeset before it accepts it as permanent, and reject " 8.13199 @@ -10359,144 +12511,12 @@ 8.13200 msgstr "" 8.13201 8.13202 #. type: Content of: <book><chapter><sect1><title> 8.13203 -#: ../en/ch09-hook.xml:236 8.13204 -msgid "Care with <literal>pretxn</literal> hooks in a shared-access repository" 8.13205 -msgstr "在共享版本库中注意 <literal>pretxn</literal> 钩子" 8.13206 - 8.13207 -#. type: Content of: <book><chapter><sect1><para> 8.13208 -#: ../en/ch09-hook.xml:239 8.13209 -msgid "" 8.13210 -"If you want to use hooks to do some automated work in a repository that a " 8.13211 -"number of people have shared access to, you need to be careful in how you do " 8.13212 -"this." 8.13213 -msgstr "" 8.13214 - 8.13215 -#. type: Content of: <book><chapter><sect1><para> 8.13216 -#: ../en/ch09-hook.xml:244 8.13217 -msgid "" 8.13218 -"Mercurial only locks a repository when it is writing to the repository, and " 8.13219 -"only the parts of Mercurial that write to the repository pay attention to " 8.13220 -"locks. Write locks are necessary to prevent multiple simultaneous writers " 8.13221 -"from scribbling on each other's work, corrupting the repository." 8.13222 -msgstr "" 8.13223 - 8.13224 -#. type: Content of: <book><chapter><sect1><para> 8.13225 -#: ../en/ch09-hook.xml:251 8.13226 -msgid "" 8.13227 -"Because Mercurial is careful with the order in which it reads and writes " 8.13228 -"data, it does not need to acquire a lock when it wants to read data from the " 8.13229 -"repository. The parts of Mercurial that read from the repository never pay " 8.13230 -"attention to locks. This lockless reading scheme greatly increases " 8.13231 -"performance and concurrency." 8.13232 -msgstr "" 8.13233 - 8.13234 -#. type: Content of: <book><chapter><sect1><para> 8.13235 -#: ../en/ch09-hook.xml:259 8.13236 -msgid "" 8.13237 -"With great performance comes a trade-off, though, one which has the potential " 8.13238 -"to cause you trouble unless you're aware of it. To describe this requires a " 8.13239 -"little detail about how Mercurial adds changesets to a repository and reads " 8.13240 -"those changes." 8.13241 -msgstr "" 8.13242 - 8.13243 -#. type: Content of: <book><chapter><sect1><para> 8.13244 -#: ../en/ch09-hook.xml:266 8.13245 -msgid "" 8.13246 -"When Mercurial <emphasis>writes</emphasis> metadata, it writes it straight " 8.13247 -"into the destination file. It writes file data first, then manifest data " 8.13248 -"(which contains pointers to the new file data), then changelog data (which " 8.13249 -"contains pointers to the new manifest data). Before the first write to each " 8.13250 -"file, it stores a record of where the end of the file was in its transaction " 8.13251 -"log. If the transaction must be rolled back, Mercurial simply truncates each " 8.13252 -"file back to the size it was before the transaction began." 8.13253 -msgstr "" 8.13254 - 8.13255 -#. type: Content of: <book><chapter><sect1><para> 8.13256 -#: ../en/ch09-hook.xml:277 8.13257 -msgid "" 8.13258 -"When Mercurial <emphasis>reads</emphasis> metadata, it reads the changelog " 8.13259 -"first, then everything else. Since a reader will only access parts of the " 8.13260 -"manifest or file metadata that it can see in the changelog, it can never see " 8.13261 -"partially written data." 8.13262 -msgstr "" 8.13263 - 8.13264 -#. type: Content of: <book><chapter><sect1><para> 8.13265 -#: ../en/ch09-hook.xml:283 8.13266 -msgid "" 8.13267 -"Some controlling hooks (<literal role=\"hook\">pretxncommit</literal> and " 8.13268 -"<literal role=\"hook\">pretxnchangegroup</literal>) run when a transaction is " 8.13269 -"almost complete. All of the metadata has been written, but Mercurial can " 8.13270 -"still roll the transaction back and cause the newly-written data to disappear." 8.13271 -msgstr "" 8.13272 - 8.13273 -#. type: Content of: <book><chapter><sect1><para> 8.13274 -#: ../en/ch09-hook.xml:291 8.13275 -msgid "" 8.13276 -"If one of these hooks runs for long, it opens a window of time during which a " 8.13277 -"reader can see the metadata for changesets that are not yet permanent, and " 8.13278 -"should not be thought of as <quote>really there</quote>. The longer the hook " 8.13279 -"runs, the longer that window is open." 8.13280 -msgstr "" 8.13281 - 8.13282 -#. type: Content of: <book><chapter><sect1><sect2><title> 8.13283 -#: ../en/ch09-hook.xml:299 8.13284 -msgid "The problem illustrated" 8.13285 -msgstr "问题的演示" 8.13286 - 8.13287 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.13288 -#: ../en/ch09-hook.xml:301 8.13289 -msgid "" 8.13290 -"In principle, a good use for the <literal role=\"hook\">pretxnchangegroup</" 8.13291 -"literal> hook would be to automatically build and test incoming changes " 8.13292 -"before they are accepted into a central repository. This could let you " 8.13293 -"guarantee that nobody can push changes to this repository that <quote>break " 8.13294 -"the build</quote>. But if a client can pull changes while they're being " 8.13295 -"tested, the usefulness of the test is zero; an unsuspecting someone can pull " 8.13296 -"untested changes, potentially breaking their build." 8.13297 -msgstr "" 8.13298 - 8.13299 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.13300 -#: ../en/ch09-hook.xml:312 8.13301 -msgid "" 8.13302 -"The safest technological answer to this challenge is to set up such a " 8.13303 -"<quote>gatekeeper</quote> repository as <emphasis>unidirectional</emphasis>. " 8.13304 -"Let it take changes pushed in from the outside, but do not allow anyone to " 8.13305 -"pull changes from it (use the <literal role=\"hook\">preoutgoing</literal> " 8.13306 -"hook to lock it down). Configure a <literal role=\"hook\">changegroup</" 8.13307 -"literal> hook so that if a build or test succeeds, the hook will push the new " 8.13308 -"changes out to another repository that people <emphasis>can</emphasis> pull " 8.13309 -"from." 8.13310 -msgstr "" 8.13311 - 8.13312 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.13313 -#: ../en/ch09-hook.xml:324 8.13314 -msgid "" 8.13315 -"In practice, putting a centralised bottleneck like this in place is not often " 8.13316 -"a good idea, and transaction visibility has nothing to do with the problem. " 8.13317 -"As the size of a project&emdash;and the time it takes to build and " 8.13318 -"test&emdash;grows, you rapidly run into a wall with this <quote>try before " 8.13319 -"you buy</quote> approach, where you have more changesets to test than time in " 8.13320 -"which to deal with them. The inevitable result is frustration on the part of " 8.13321 -"all involved." 8.13322 -msgstr "" 8.13323 - 8.13324 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.13325 -#: ../en/ch09-hook.xml:335 8.13326 -msgid "" 8.13327 -"An approach that scales better is to get people to build and test before they " 8.13328 -"push, then run automated builds and tests centrally <emphasis>after</" 8.13329 -"emphasis> a push, to be sure all is well. The advantage of this approach is " 8.13330 -"that it does not impose a limit on the rate at which the repository can " 8.13331 -"accept changes." 8.13332 -msgstr "" 8.13333 - 8.13334 -#. type: Content of: <book><chapter><sect1><title> 8.13335 -#: ../en/ch09-hook.xml:346 8.13336 +#: ../en/ch10-hook.xml:237 8.13337 msgid "A short tutorial on using hooks" 8.13338 msgstr "使用钩子的简短指南" 8.13339 8.13340 #. type: Content of: <book><chapter><sect1><para> 8.13341 -#: ../en/ch09-hook.xml:348 8.13342 +#: ../en/ch10-hook.xml:239 8.13343 msgid "" 8.13344 "It is easy to write a Mercurial hook. Let's start with a hook that runs when " 8.13345 "you finish a <command role=\"hg-cmd\">hg commit</command>, and simply prints " 8.13346 @@ -10505,12 +12525,12 @@ 8.13347 msgstr "" 8.13348 8.13349 #. type: Content of: <book><chapter><sect1><para> 8.13350 -#: ../en/ch09-hook.xml:355 8.13351 +#: ../en/ch10-hook.xml:246 8.13352 msgid "All hooks follow the pattern in this example." 8.13353 msgstr "" 8.13354 8.13355 #. type: Content of: <book><chapter><sect1><para> 8.13356 -#: ../en/ch09-hook.xml:359 8.13357 +#: ../en/ch10-hook.xml:250 8.13358 msgid "" 8.13359 "You add an entry to the <literal role=\"rc-hooks\">hooks</literal> section of " 8.13360 "your <filename role=\"special\">~/.hgrc</filename>. On the left is the name " 8.13361 @@ -10521,19 +12541,19 @@ 8.13362 msgstr "" 8.13363 8.13364 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13365 -#: ../en/ch09-hook.xml:369 8.13366 +#: ../en/ch10-hook.xml:260 8.13367 msgid "Performing multiple actions per event" 8.13368 msgstr "每个事件执行多个操作" 8.13369 8.13370 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13371 -#: ../en/ch09-hook.xml:371 8.13372 +#: ../en/ch10-hook.xml:262 8.13373 msgid "" 8.13374 "Quite often, you will want to define more than one hook for a particular kind " 8.13375 "of event, as shown below." 8.13376 msgstr "" 8.13377 8.13378 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13379 -#: ../en/ch09-hook.xml:376 8.13380 +#: ../en/ch10-hook.xml:267 8.13381 msgid "" 8.13382 "Mercurial lets you do this by adding an <emphasis>extension</emphasis> to the " 8.13383 "end of a hook's name. You extend a hook's name by giving the name of the " 8.13384 @@ -10544,7 +12564,7 @@ 8.13385 msgstr "" 8.13386 8.13387 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13388 -#: ../en/ch09-hook.xml:387 8.13389 +#: ../en/ch10-hook.xml:278 8.13390 msgid "" 8.13391 "To give a well-defined order of execution when there are multiple hooks " 8.13392 "defined for an event, Mercurial sorts hooks by extension, and executes the " 8.13393 @@ -10554,7 +12574,7 @@ 8.13394 msgstr "" 8.13395 8.13396 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13397 -#: ../en/ch09-hook.xml:396 8.13398 +#: ../en/ch10-hook.xml:287 8.13399 msgid "" 8.13400 "It is a good idea to use a somewhat descriptive extension when you define a " 8.13401 "new hook. This will help you to remember what the hook was for. If the hook " 8.13402 @@ -10564,12 +12584,12 @@ 8.13403 msgstr "" 8.13404 8.13405 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13406 -#: ../en/ch09-hook.xml:407 8.13407 +#: ../en/ch10-hook.xml:298 8.13408 msgid "Controlling whether an activity can proceed" 8.13409 msgstr "控制处理的活动" 8.13410 8.13411 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13412 -#: ../en/ch09-hook.xml:409 8.13413 +#: ../en/ch10-hook.xml:300 8.13414 msgid "" 8.13415 "In our earlier examples, we used the <literal role=\"hook\">commit</literal> " 8.13416 "hook, which is run after a commit has completed. This is one of several " 8.13417 @@ -10578,7 +12598,7 @@ 8.13418 msgstr "" 8.13419 8.13420 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13421 -#: ../en/ch09-hook.xml:416 8.13422 +#: ../en/ch10-hook.xml:307 8.13423 msgid "" 8.13424 "Mercurial defines a number of events that occur before an activity starts; or " 8.13425 "after it starts, but before it finishes. Hooks that trigger on these events " 8.13426 @@ -10587,7 +12607,7 @@ 8.13427 msgstr "" 8.13428 8.13429 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13430 -#: ../en/ch09-hook.xml:422 8.13431 +#: ../en/ch10-hook.xml:313 8.13432 msgid "" 8.13433 "The <literal role=\"hook\">pretxncommit</literal> hook runs after a commit " 8.13434 "has all but completed. In other words, the metadata representing the " 8.13435 @@ -10598,7 +12618,7 @@ 8.13436 msgstr "" 8.13437 8.13438 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13439 -#: ../en/ch09-hook.xml:431 8.13440 +#: ../en/ch10-hook.xml:322 8.13441 msgid "" 8.13442 "If the <literal role=\"hook\">pretxncommit</literal> hook exits with a status " 8.13443 "code of zero, the transaction is allowed to complete; the commit finishes; " 8.13444 @@ -10609,19 +12629,19 @@ 8.13445 msgstr "" 8.13446 8.13447 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13448 -#: ../en/ch09-hook.xml:443 8.13449 +#: ../en/ch10-hook.xml:334 8.13450 msgid "" 8.13451 "The hook in the example above checks that a commit comment contains a bug " 8.13452 "ID. If it does, the commit can complete. If not, the commit is rolled back." 8.13453 msgstr "" 8.13454 8.13455 #. type: Content of: <book><chapter><sect1><title> 8.13456 -#: ../en/ch09-hook.xml:451 8.13457 +#: ../en/ch10-hook.xml:342 8.13458 msgid "Writing your own hooks" 8.13459 msgstr "编写钩子" 8.13460 8.13461 #. type: Content of: <book><chapter><sect1><para> 8.13462 -#: ../en/ch09-hook.xml:453 8.13463 +#: ../en/ch10-hook.xml:344 8.13464 msgid "" 8.13465 "When you are writing a hook, you might find it useful to run Mercurial either " 8.13466 "with the <option role=\"hg-opt-global\">-v</option> option, or the <envar " 8.13467 @@ -10630,12 +12650,12 @@ 8.13468 msgstr "" 8.13469 8.13470 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13471 -#: ../en/ch09-hook.xml:462 8.13472 +#: ../en/ch10-hook.xml:353 8.13473 msgid "Choosing how your hook should run" 8.13474 msgstr "选择钩子的执行方式" 8.13475 8.13476 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13477 -#: ../en/ch09-hook.xml:464 8.13478 +#: ../en/ch10-hook.xml:355 8.13479 msgid "" 8.13480 "You can write a hook either as a normal program&emdash;typically a shell " 8.13481 "script&emdash;or as a Python function that is executed within the Mercurial " 8.13482 @@ -10643,7 +12663,7 @@ 8.13483 msgstr "" 8.13484 8.13485 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13486 -#: ../en/ch09-hook.xml:469 8.13487 +#: ../en/ch10-hook.xml:360 8.13488 msgid "" 8.13489 "Writing a hook as an external program has the advantage that it requires no " 8.13490 "knowledge of Mercurial's internals. You can call normal Mercurial commands " 8.13491 @@ -10652,7 +12672,7 @@ 8.13492 msgstr "" 8.13493 8.13494 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13495 -#: ../en/ch09-hook.xml:476 8.13496 +#: ../en/ch10-hook.xml:367 8.13497 msgid "" 8.13498 "An in-process Python hook has complete access to the Mercurial API, and does " 8.13499 "not <quote>shell out</quote> to another process, so it is inherently faster " 8.13500 @@ -10662,7 +12682,7 @@ 8.13501 msgstr "" 8.13502 8.13503 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13504 -#: ../en/ch09-hook.xml:484 8.13505 +#: ../en/ch10-hook.xml:375 8.13506 msgid "" 8.13507 "If you are comfortable with Python, or require high performance, writing your " 8.13508 "hooks in Python may be a good choice. However, when you have a " 8.13509 @@ -10671,12 +12691,12 @@ 8.13510 msgstr "" 8.13511 8.13512 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13513 -#: ../en/ch09-hook.xml:493 8.13514 +#: ../en/ch10-hook.xml:384 8.13515 msgid "Hook parameters" 8.13516 msgstr "钩子的参数" 8.13517 8.13518 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13519 -#: ../en/ch09-hook.xml:495 8.13520 +#: ../en/ch10-hook.xml:386 8.13521 msgid "" 8.13522 "Mercurial calls each hook with a set of well-defined parameters. In Python, " 8.13523 "a parameter is passed as a keyword argument to your hook function. For an " 8.13524 @@ -10684,7 +12704,7 @@ 8.13525 msgstr "" 8.13526 8.13527 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13528 -#: ../en/ch09-hook.xml:501 8.13529 +#: ../en/ch10-hook.xml:392 8.13530 msgid "" 8.13531 "Whether your hook is written in Python or as a shell script, the hook-" 8.13532 "specific parameter names and values will be the same. A boolean parameter " 8.13533 @@ -10697,12 +12717,12 @@ 8.13534 msgstr "" 8.13535 8.13536 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13537 -#: ../en/ch09-hook.xml:515 8.13538 +#: ../en/ch10-hook.xml:406 8.13539 msgid "Hook return values and activity control" 8.13540 msgstr "钩子的返回值与活动控制" 8.13541 8.13542 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13543 -#: ../en/ch09-hook.xml:517 8.13544 +#: ../en/ch10-hook.xml:408 8.13545 msgid "" 8.13546 "A hook that executes successfully must exit with a status of zero if " 8.13547 "external, or return boolean <quote>false</quote> if in-process. Failure is " 8.13548 @@ -10712,19 +12732,19 @@ 8.13549 msgstr "" 8.13550 8.13551 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13552 -#: ../en/ch09-hook.xml:525 8.13553 +#: ../en/ch10-hook.xml:416 8.13554 msgid "" 8.13555 "For a hook that controls whether an activity can proceed, zero/false means " 8.13556 "<quote>allow</quote>, while non-zero/true/exception means <quote>deny</quote>." 8.13557 msgstr "" 8.13558 8.13559 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13560 -#: ../en/ch09-hook.xml:532 8.13561 +#: ../en/ch10-hook.xml:423 8.13562 msgid "Writing an external hook" 8.13563 msgstr "编写外部钩子" 8.13564 8.13565 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13566 -#: ../en/ch09-hook.xml:534 8.13567 +#: ../en/ch10-hook.xml:425 8.13568 msgid "" 8.13569 "When you define an external hook in your <filename role=\"special\">~/.hgrc</" 8.13570 "filename> and the hook is run, its value is passed to your shell, which " 8.13571 @@ -10733,14 +12753,14 @@ 8.13572 msgstr "" 8.13573 8.13574 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13575 -#: ../en/ch09-hook.xml:541 8.13576 +#: ../en/ch10-hook.xml:432 8.13577 msgid "" 8.13578 "An executable hook is always run with its current directory set to a " 8.13579 "repository's root directory." 8.13580 msgstr "" 8.13581 8.13582 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13583 -#: ../en/ch09-hook.xml:545 8.13584 +#: ../en/ch10-hook.xml:436 8.13585 msgid "" 8.13586 "Each hook parameter is passed in as an environment variable; the name is " 8.13587 "upper-cased, and prefixed with the string <quote><literal>HG_</literal></" 8.13588 @@ -10748,7 +12768,7 @@ 8.13589 msgstr "" 8.13590 8.13591 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13592 -#: ../en/ch09-hook.xml:550 8.13593 +#: ../en/ch10-hook.xml:441 8.13594 msgid "" 8.13595 "With the exception of hook parameters, Mercurial does not set or modify any " 8.13596 "environment variables when running a hook. This is useful to remember if you " 8.13597 @@ -10759,12 +12779,12 @@ 8.13598 msgstr "" 8.13599 8.13600 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13601 -#: ../en/ch09-hook.xml:561 8.13602 +#: ../en/ch10-hook.xml:452 8.13603 msgid "Telling Mercurial to use an in-process hook" 8.13604 msgstr "让 Mercurial 使用进程内钩子" 8.13605 8.13606 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13607 -#: ../en/ch09-hook.xml:563 8.13608 +#: ../en/ch10-hook.xml:454 8.13609 msgid "" 8.13610 "The <filename role=\"special\">~/.hgrc</filename> syntax for defining an in-" 8.13611 "process hook is slightly different than for an executable hook. The value of " 8.13612 @@ -10774,7 +12794,7 @@ 8.13613 msgstr "" 8.13614 8.13615 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13616 -#: ../en/ch09-hook.xml:571 8.13617 +#: ../en/ch10-hook.xml:462 8.13618 msgid "" 8.13619 "The module in which a hook lives is automatically imported when a hook is " 8.13620 "run. So long as you have the module name and <envar>PYTHONPATH</envar> " 8.13621 @@ -10782,14 +12802,14 @@ 8.13622 msgstr "" 8.13623 8.13624 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13625 -#: ../en/ch09-hook.xml:577 8.13626 +#: ../en/ch10-hook.xml:468 8.13627 msgid "" 8.13628 "The following <filename role=\"special\">~/.hgrc</filename> example snippet " 8.13629 "illustrates the syntax and meaning of the notions we just described." 8.13630 msgstr "" 8.13631 8.13632 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13633 -#: ../en/ch09-hook.xml:583 8.13634 +#: ../en/ch10-hook.xml:474 8.13635 msgid "" 8.13636 "When Mercurial runs the <literal>commit.example</literal> hook, it imports " 8.13637 "<literal>mymodule.submodule</literal>, looks for the callable object named " 8.13638 @@ -10797,19 +12817,19 @@ 8.13639 msgstr "" 8.13640 8.13641 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13642 -#: ../en/ch09-hook.xml:591 8.13643 +#: ../en/ch10-hook.xml:482 8.13644 msgid "Writing an in-process hook" 8.13645 msgstr "编写进程内钩子" 8.13646 8.13647 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13648 -#: ../en/ch09-hook.xml:593 8.13649 +#: ../en/ch10-hook.xml:484 8.13650 msgid "" 8.13651 "The simplest in-process hook does nothing, but illustrates the basic shape of " 8.13652 "the hook API:" 8.13653 msgstr "" 8.13654 8.13655 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13656 -#: ../en/ch09-hook.xml:598 8.13657 +#: ../en/ch10-hook.xml:489 8.13658 msgid "" 8.13659 "The first argument to a Python hook is always a <literal role=\"py-mod-" 8.13660 "mercurial.ui\">ui</literal> object. The second is a repository object; at " 8.13661 @@ -10821,17 +12841,17 @@ 8.13662 msgstr "" 8.13663 8.13664 #. type: Content of: <book><chapter><sect1><title> 8.13665 -#: ../en/ch09-hook.xml:613 8.13666 +#: ../en/ch10-hook.xml:504 8.13667 msgid "Some hook examples" 8.13668 msgstr "钩子样例" 8.13669 8.13670 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13671 -#: ../en/ch09-hook.xml:616 8.13672 +#: ../en/ch10-hook.xml:507 8.13673 msgid "Writing meaningful commit messages" 8.13674 msgstr "编写有意义的提交日志" 8.13675 8.13676 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13677 -#: ../en/ch09-hook.xml:618 8.13678 +#: ../en/ch10-hook.xml:509 8.13679 msgid "" 8.13680 "It's hard to imagine a useful commit message being very short. The simple " 8.13681 "<literal role=\"hook\">pretxncommit</literal> hook of the example below will " 8.13682 @@ -10840,12 +12860,12 @@ 8.13683 msgstr "" 8.13684 8.13685 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13686 -#: ../en/ch09-hook.xml:628 8.13687 +#: ../en/ch10-hook.xml:519 8.13688 msgid "Checking for trailing whitespace" 8.13689 msgstr "检查行尾空格" 8.13690 8.13691 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13692 -#: ../en/ch09-hook.xml:630 8.13693 +#: ../en/ch10-hook.xml:521 8.13694 msgid "" 8.13695 "An interesting use of a commit-related hook is to help you to write cleaner " 8.13696 "code. A simple example of <quote>cleaner code</quote> is the dictum that a " 8.13697 @@ -10857,7 +12877,7 @@ 8.13698 msgstr "" 8.13699 8.13700 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13701 -#: ../en/ch09-hook.xml:641 8.13702 +#: ../en/ch10-hook.xml:532 8.13703 msgid "" 8.13704 "You can use either the <literal role=\"hook\">precommit</literal> or <literal " 8.13705 "role=\"hook\">pretxncommit</literal> hook to tell whether you have a trailing " 8.13706 @@ -10872,7 +12892,7 @@ 8.13707 msgstr "" 8.13708 8.13709 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13710 -#: ../en/ch09-hook.xml:657 8.13711 +#: ../en/ch10-hook.xml:548 8.13712 msgid "" 8.13713 "Should you choose the <literal role=\"hook\">pretxncommit</literal> hook, the " 8.13714 "check won't occur until just before the transaction for the commit " 8.13715 @@ -10884,7 +12904,7 @@ 8.13716 msgstr "" 8.13717 8.13718 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13719 -#: ../en/ch09-hook.xml:670 8.13720 +#: ../en/ch10-hook.xml:561 8.13721 msgid "" 8.13722 "In this example, we introduce a simple <literal role=\"hook\">pretxncommit</" 8.13723 "literal> hook that checks for trailing whitespace. This hook is short, but " 8.13724 @@ -10896,7 +12916,7 @@ 8.13725 msgstr "" 8.13726 8.13727 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13728 -#: ../en/ch09-hook.xml:681 8.13729 +#: ../en/ch10-hook.xml:574 8.13730 msgid "" 8.13731 "The above version is much more complex, but also more useful. It parses a " 8.13732 "unified diff to see if any lines add trailing whitespace, and prints the name " 8.13733 @@ -10909,20 +12929,21 @@ 8.13734 msgstr "" 8.13735 8.13736 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13737 -#: ../en/ch09-hook.xml:695 8.13738 -msgid "" 8.13739 -"As a final aside, note in the example above the use of <command>perl</" 8.13740 +#: ../en/ch10-hook.xml:588 8.13741 +msgid "" 8.13742 +"As a final aside, note in the example above the use of <command>sed</" 8.13743 "command>'s in-place editing feature to get rid of trailing whitespace from a " 8.13744 -"file. This is concise and useful enough that I will reproduce it here." 8.13745 +"file. This is concise and useful enough that I will reproduce it here (using " 8.13746 +"<command>perl</command> for good measure)." 8.13747 msgstr "" 8.13748 8.13749 #. type: Content of: <book><chapter><sect1><title> 8.13750 -#: ../en/ch09-hook.xml:705 8.13751 +#: ../en/ch10-hook.xml:598 8.13752 msgid "Bundled hooks" 8.13753 msgstr "内置的钩子" 8.13754 8.13755 #. type: Content of: <book><chapter><sect1><para> 8.13756 -#: ../en/ch09-hook.xml:707 8.13757 +#: ../en/ch10-hook.xml:600 8.13758 msgid "" 8.13759 "Mercurial ships with several bundled hooks. You can find them in the " 8.13760 "<filename class=\"directory\">hgext</filename> directory of a Mercurial " 8.13761 @@ -10932,14 +12953,14 @@ 8.13762 msgstr "" 8.13763 8.13764 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13765 -#: ../en/ch09-hook.xml:716 8.13766 +#: ../en/ch10-hook.xml:609 8.13767 msgid "" 8.13768 "<literal role=\"hg-ext\">acl</literal>&emdash;access control for parts of a " 8.13769 "repository" 8.13770 msgstr "<literal role=\"hg-ext\">acl</literal>—版本库的访问控制" 8.13771 8.13772 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13773 -#: ../en/ch09-hook.xml:719 8.13774 +#: ../en/ch10-hook.xml:612 8.13775 msgid "" 8.13776 "The <literal role=\"hg-ext\">acl</literal> extension lets you control which " 8.13777 "remote users are allowed to push changesets to a networked server. You can " 8.13778 @@ -10949,7 +12970,7 @@ 8.13779 msgstr "" 8.13780 8.13781 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13782 -#: ../en/ch09-hook.xml:727 8.13783 +#: ../en/ch10-hook.xml:620 8.13784 msgid "" 8.13785 "This extension implements access control based on the identity of the user " 8.13786 "performing a push, <emphasis>not</emphasis> on who committed the changesets " 8.13787 @@ -10959,12 +12980,12 @@ 8.13788 msgstr "" 8.13789 8.13790 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.13791 -#: ../en/ch09-hook.xml:737 8.13792 +#: ../en/ch10-hook.xml:630 8.13793 msgid "Configuring the <literal role=\"hook\">acl</literal> hook" 8.13794 msgstr "配置 <literal role=\"hook\">acl</literal> 钩子" 8.13795 8.13796 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13797 -#: ../en/ch09-hook.xml:740 8.13798 +#: ../en/ch10-hook.xml:633 8.13799 msgid "" 8.13800 "In order to manage incoming changesets, the <literal role=\"hg-ext\">acl</" 8.13801 "literal> hook must be used as a <literal role=\"hook\">pretxnchangegroup</" 8.13802 @@ -10974,14 +12995,14 @@ 8.13803 msgstr "" 8.13804 8.13805 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13806 -#: ../en/ch09-hook.xml:750 8.13807 +#: ../en/ch10-hook.xml:643 8.13808 msgid "" 8.13809 "The <literal role=\"hg-ext\">acl</literal> extension is configured using " 8.13810 "three sections." 8.13811 msgstr "" 8.13812 8.13813 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13814 -#: ../en/ch09-hook.xml:754 8.13815 +#: ../en/ch10-hook.xml:647 8.13816 msgid "" 8.13817 "The <literal role=\"rc-acl\">acl</literal> section has only one entry, <envar " 8.13818 "role=\"rc-item-acl\">sources</envar>, which lists the sources of incoming " 8.13819 @@ -10990,7 +13011,7 @@ 8.13820 msgstr "" 8.13821 8.13822 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.13823 -#: ../en/ch09-hook.xml:761 8.13824 +#: ../en/ch10-hook.xml:654 8.13825 msgid "" 8.13826 "<envar role=\"rc-item-acl\">serve</envar>: Control incoming changesets that " 8.13827 "are arriving from a remote repository over http or ssh. This is the default " 8.13828 @@ -10999,28 +13020,28 @@ 8.13829 msgstr "" 8.13830 8.13831 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.13832 -#: ../en/ch09-hook.xml:769 8.13833 +#: ../en/ch10-hook.xml:662 8.13834 msgid "" 8.13835 "<envar role=\"rc-item-acl\">pull</envar>: Control incoming changesets that " 8.13836 "are arriving via a pull from a local repository." 8.13837 msgstr "" 8.13838 8.13839 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.13840 -#: ../en/ch09-hook.xml:774 8.13841 +#: ../en/ch10-hook.xml:667 8.13842 msgid "" 8.13843 "<envar role=\"rc-item-acl\">push</envar>: Control incoming changesets that " 8.13844 "are arriving via a push from a local repository." 8.13845 msgstr "" 8.13846 8.13847 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.13848 -#: ../en/ch09-hook.xml:779 8.13849 +#: ../en/ch10-hook.xml:672 8.13850 msgid "" 8.13851 "<envar role=\"rc-item-acl\">bundle</envar>: Control incoming changesets that " 8.13852 "are arriving from another repository via a bundle." 8.13853 msgstr "" 8.13854 8.13855 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13856 -#: ../en/ch09-hook.xml:785 8.13857 +#: ../en/ch10-hook.xml:678 8.13858 msgid "" 8.13859 "The <literal role=\"rc-acl.allow\">acl.allow</literal> section controls the " 8.13860 "users that are allowed to add changesets to the repository. If this section " 8.13861 @@ -11030,7 +13051,7 @@ 8.13862 msgstr "" 8.13863 8.13864 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13865 -#: ../en/ch09-hook.xml:794 8.13866 +#: ../en/ch10-hook.xml:687 8.13867 msgid "" 8.13868 "The <literal role=\"rc-acl.deny\">acl.deny</literal> section determines which " 8.13869 "users are denied from adding changesets to the repository. If this section " 8.13870 @@ -11038,7 +13059,7 @@ 8.13871 msgstr "" 8.13872 8.13873 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13874 -#: ../en/ch09-hook.xml:800 8.13875 +#: ../en/ch10-hook.xml:693 8.13876 msgid "" 8.13877 "The syntaxes for the <literal role=\"rc-acl.allow\">acl.allow</literal> and " 8.13878 "<literal role=\"rc-acl.deny\">acl.deny</literal> sections are identical. On " 8.13879 @@ -11047,7 +13068,7 @@ 8.13880 msgstr "" 8.13881 8.13882 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13883 -#: ../en/ch09-hook.xml:808 8.13884 +#: ../en/ch10-hook.xml:701 8.13885 msgid "" 8.13886 "In the following example, the user <literal>docwriter</literal> can only push " 8.13887 "changes to the <filename class=\"directory\">docs</filename> subtree of the " 8.13888 @@ -11056,12 +13077,12 @@ 8.13889 msgstr "" 8.13890 8.13891 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.13892 -#: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1279 8.13893 +#: ../en/ch10-hook.xml:715 ../en/ch10-hook.xml:979 ../en/ch10-hook.xml:1169 8.13894 msgid "Testing and troubleshooting" 8.13895 msgstr "测试与问题处理" 8.13896 8.13897 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13898 -#: ../en/ch09-hook.xml:824 8.13899 +#: ../en/ch10-hook.xml:717 8.13900 msgid "" 8.13901 "If you want to test the <literal role=\"hg-ext\">acl</literal> hook, run it " 8.13902 "with Mercurial's debugging output enabled. Since you'll probably be running " 8.13903 @@ -11072,7 +13093,7 @@ 8.13904 msgstr "" 8.13905 8.13906 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13907 -#: ../en/ch09-hook.xml:835 8.13908 +#: ../en/ch10-hook.xml:728 8.13909 msgid "" 8.13910 "With this enabled, the <literal role=\"hg-ext\">acl</literal> hook will print " 8.13911 "enough information to let you figure out why it is allowing or forbidding " 8.13912 @@ -11080,13 +13101,13 @@ 8.13913 msgstr "" 8.13914 8.13915 #. type: Content of: <book><chapter><sect1><sect2><title> 8.13916 -#: ../en/ch09-hook.xml:844 8.13917 +#: ../en/ch10-hook.xml:737 8.13918 msgid "" 8.13919 "<literal role=\"hg-ext\">bugzilla</literal>&emdash;integration with Bugzilla" 8.13920 msgstr "<literal role=\"hg-ext\">bugzilla</literal>—与 Bugzilla 的集成" 8.13921 8.13922 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13923 -#: ../en/ch09-hook.xml:848 8.13924 +#: ../en/ch10-hook.xml:741 8.13925 msgid "" 8.13926 "The <literal role=\"hg-ext\">bugzilla</literal> extension adds a comment to a " 8.13927 "Bugzilla bug whenever it finds a reference to that bug ID in a commit " 8.13928 @@ -11095,14 +13116,14 @@ 8.13929 msgstr "" 8.13930 8.13931 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13932 -#: ../en/ch09-hook.xml:855 8.13933 +#: ../en/ch10-hook.xml:748 8.13934 msgid "" 8.13935 "It adds a comment to the bug that looks like this (you can configure the " 8.13936 "contents of the comment&emdash;see below):" 8.13937 msgstr "" 8.13938 8.13939 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13940 -#: ../en/ch09-hook.xml:864 8.13941 +#: ../en/ch10-hook.xml:757 8.13942 msgid "" 8.13943 "The value of this hook is that it automates the process of updating a bug any " 8.13944 "time a changeset refers to it. If you configure the hook properly, it makes " 8.13945 @@ -11111,14 +13132,14 @@ 8.13946 msgstr "" 8.13947 8.13948 #. type: Content of: <book><chapter><sect1><sect2><para> 8.13949 -#: ../en/ch09-hook.xml:871 8.13950 +#: ../en/ch10-hook.xml:764 8.13951 msgid "" 8.13952 "You can use the code in this hook as a starting point for some more exotic " 8.13953 "Bugzilla integration recipes. Here are a few possibilities:" 8.13954 msgstr "" 8.13955 8.13956 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.13957 -#: ../en/ch09-hook.xml:876 8.13958 +#: ../en/ch10-hook.xml:769 8.13959 msgid "" 8.13960 "Require that every changeset pushed to the server have a valid bug ID in its " 8.13961 "commit comment. In this case, you'd want to configure the hook as a <literal " 8.13962 @@ -11127,7 +13148,7 @@ 8.13963 msgstr "" 8.13964 8.13965 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.13966 -#: ../en/ch09-hook.xml:884 8.13967 +#: ../en/ch10-hook.xml:777 8.13968 msgid "" 8.13969 "Allow incoming changesets to automatically modify the <emphasis>state</" 8.13970 "emphasis> of a bug, as well as simply adding a comment. For example, the " 8.13971 @@ -11137,12 +13158,12 @@ 8.13972 msgstr "" 8.13973 8.13974 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.13975 -#: ../en/ch09-hook.xml:894 8.13976 +#: ../en/ch10-hook.xml:787 8.13977 msgid "Configuring the <literal role=\"hook\">bugzilla</literal> hook" 8.13978 msgstr "配置 <literal role=\"hook\">bugzilla</literal> 钩子" 8.13979 8.13980 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13981 -#: ../en/ch09-hook.xml:897 8.13982 +#: ../en/ch10-hook.xml:790 8.13983 msgid "" 8.13984 "You should configure this hook in your server's <filename role=\"special\">~/." 8.13985 "hgrc</filename> as an <literal role=\"hook\">incoming</literal> hook, for " 8.13986 @@ -11150,7 +13171,7 @@ 8.13987 msgstr "" 8.13988 8.13989 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13990 -#: ../en/ch09-hook.xml:905 8.13991 +#: ../en/ch10-hook.xml:798 8.13992 msgid "" 8.13993 "Because of the specialised nature of this hook, and because Bugzilla was not " 8.13994 "written with this kind of integration in mind, configuring this hook is a " 8.13995 @@ -11158,7 +13179,7 @@ 8.13996 msgstr "" 8.13997 8.13998 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.13999 -#: ../en/ch09-hook.xml:911 8.14000 +#: ../en/ch10-hook.xml:804 8.14001 msgid "" 8.14002 "Before you begin, you must install the MySQL bindings for Python on the host" 8.14003 "(s) where you'll be running the hook. If this is not available as a binary " 8.14004 @@ -11167,7 +13188,7 @@ 8.14005 msgstr "" 8.14006 8.14007 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14008 -#: ../en/ch09-hook.xml:918 8.14009 +#: ../en/ch10-hook.xml:811 8.14010 msgid "" 8.14011 "Configuration information for this hook lives in the <literal role=\"rc-" 8.14012 "bugzilla\">bugzilla</literal> section of your <filename role=\"special\">~/." 8.14013 @@ -11175,16 +13196,15 @@ 8.14014 msgstr "" 8.14015 8.14016 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14017 -#: ../en/ch09-hook.xml:923 8.14018 +#: ../en/ch10-hook.xml:816 8.14019 msgid "" 8.14020 "<envar role=\"rc-item-bugzilla\">version</envar>: The version of Bugzilla " 8.14021 "installed on the server. The database schema that Bugzilla uses changes " 8.14022 -"occasionally, so this hook has to know exactly which schema to use. At the " 8.14023 -"moment, the only version supported is <literal>2.16</literal>." 8.14024 +"occasionally, so this hook has to know exactly which schema to use." 8.14025 msgstr "" 8.14026 8.14027 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14028 -#: ../en/ch09-hook.xml:932 8.14029 +#: ../en/ch10-hook.xml:822 8.14030 msgid "" 8.14031 "<envar role=\"rc-item-bugzilla\">host</envar>: The hostname of the MySQL " 8.14032 "server that stores your Bugzilla data. The database must be configured to " 8.14033 @@ -11193,7 +13213,7 @@ 8.14034 msgstr "" 8.14035 8.14036 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14037 -#: ../en/ch09-hook.xml:939 8.14038 +#: ../en/ch10-hook.xml:829 8.14039 msgid "" 8.14040 "<envar role=\"rc-item-bugzilla\">user</envar>: The username with which to " 8.14041 "connect to the MySQL server. The database must be configured to allow this " 8.14042 @@ -11204,7 +13224,7 @@ 8.14043 msgstr "" 8.14044 8.14045 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14046 -#: ../en/ch09-hook.xml:950 8.14047 +#: ../en/ch10-hook.xml:840 8.14048 msgid "" 8.14049 "<envar role=\"rc-item-bugzilla\">password</envar>: The MySQL password for the " 8.14050 "user you configured above. This is stored as plain text, so you should make " 8.14051 @@ -11213,7 +13233,7 @@ 8.14052 msgstr "" 8.14053 8.14054 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14055 -#: ../en/ch09-hook.xml:959 8.14056 +#: ../en/ch10-hook.xml:849 8.14057 msgid "" 8.14058 "<envar role=\"rc-item-bugzilla\">db</envar>: The name of the Bugzilla " 8.14059 "database on the MySQL server. The default value of this item is " 8.14060 @@ -11222,7 +13242,7 @@ 8.14061 msgstr "" 8.14062 8.14063 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14064 -#: ../en/ch09-hook.xml:966 8.14065 +#: ../en/ch10-hook.xml:856 8.14066 msgid "" 8.14067 "<envar role=\"rc-item-bugzilla\">notify</envar>: If you want Bugzilla to send " 8.14068 "out a notification email to subscribers after this hook has added a comment " 8.14069 @@ -11233,7 +13253,7 @@ 8.14070 msgstr "" 8.14071 8.14072 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14073 -#: ../en/ch09-hook.xml:979 8.14074 +#: ../en/ch10-hook.xml:869 8.14075 msgid "" 8.14076 "The Bugzilla <literal>processmail</literal> program expects to be given a bug " 8.14077 "ID (the hook replaces <quote><literal>%s</literal></quote> with the bug ID) " 8.14078 @@ -11244,12 +13264,12 @@ 8.14079 msgstr "" 8.14080 8.14081 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.14082 -#: ../en/ch09-hook.xml:994 8.14083 +#: ../en/ch10-hook.xml:884 8.14084 msgid "Mapping committer names to Bugzilla user names" 8.14085 msgstr "提交者的名称与 Bugzilla 用户名称的映射" 8.14086 8.14087 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14088 -#: ../en/ch09-hook.xml:996 8.14089 +#: ../en/ch10-hook.xml:886 8.14090 msgid "" 8.14091 "By default, the <literal role=\"hg-ext\">bugzilla</literal> hook tries to use " 8.14092 "the email address of a changeset's committer as the Bugzilla user name with " 8.14093 @@ -11259,14 +13279,14 @@ 8.14094 msgstr "" 8.14095 8.14096 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14097 -#: ../en/ch09-hook.xml:1005 8.14098 +#: ../en/ch10-hook.xml:895 8.14099 msgid "" 8.14100 "Each item in the <literal role=\"rc-usermap\">usermap</literal> section " 8.14101 "contains an email address on the left, and a Bugzilla user name on the right." 8.14102 msgstr "" 8.14103 8.14104 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14105 -#: ../en/ch09-hook.xml:1012 8.14106 +#: ../en/ch10-hook.xml:902 8.14107 msgid "" 8.14108 "You can either keep the <literal role=\"rc-usermap\">usermap</literal> data " 8.14109 "in a normal <filename role=\"special\">~/.hgrc</filename>, or tell the " 8.14110 @@ -11279,28 +13299,28 @@ 8.14111 msgstr "" 8.14112 8.14113 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14114 -#: ../en/ch09-hook.xml:1028 8.14115 +#: ../en/ch10-hook.xml:918 8.14116 msgid "" 8.14117 "While the <filename>usermap</filename> file that it refers to might look like " 8.14118 "this:" 8.14119 msgstr "" 8.14120 8.14121 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.14122 -#: ../en/ch09-hook.xml:1036 8.14123 +#: ../en/ch10-hook.xml:926 8.14124 msgid "Configuring the text that gets added to a bug" 8.14125 msgstr "配置增加到问题中的正文" 8.14126 8.14127 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14128 -#: ../en/ch09-hook.xml:1038 8.14129 +#: ../en/ch10-hook.xml:928 8.14130 msgid "" 8.14131 "You can configure the text that this hook adds as a comment; you specify it " 8.14132 "in the form of a Mercurial template. Several <filename role=\"special\">~/." 8.14133 "hgrc</filename> entries (still in the <literal role=\"rc-bugzilla\">bugzilla</" 8.14134 -"literal> section) control this behaviour." 8.14135 +"literal> section) control this behavior." 8.14136 msgstr "" 8.14137 8.14138 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14139 -#: ../en/ch09-hook.xml:1045 8.14140 +#: ../en/ch10-hook.xml:935 8.14141 msgid "" 8.14142 "<literal>strip</literal>: The number of leading path elements to strip from a " 8.14143 "repository's path name to construct a partial path for a URL. For example, if " 8.14144 @@ -11314,7 +13334,7 @@ 8.14145 msgstr "" 8.14146 8.14147 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14148 -#: ../en/ch09-hook.xml:1059 8.14149 +#: ../en/ch10-hook.xml:949 8.14150 msgid "" 8.14151 "<literal>template</literal>: The text of the template to use. In addition to " 8.14152 "the usual changeset-related variables, this template can use <literal>hgweb</" 8.14153 @@ -11324,7 +13344,7 @@ 8.14154 msgstr "" 8.14155 8.14156 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14157 -#: ../en/ch09-hook.xml:1069 8.14158 +#: ../en/ch10-hook.xml:959 8.14159 msgid "" 8.14160 "In addition, you can add a <envar role=\"rc-item-web\">baseurl</envar> item " 8.14161 "to the <literal role=\"rc-web\">web</literal> section of your <filename role=" 8.14162 @@ -11335,14 +13355,14 @@ 8.14163 msgstr "" 8.14164 8.14165 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14166 -#: ../en/ch09-hook.xml:1081 8.14167 +#: ../en/ch10-hook.xml:971 8.14168 msgid "" 8.14169 "Here is an example set of <literal role=\"hg-ext\">bugzilla</literal> hook " 8.14170 "config information." 8.14171 msgstr "" 8.14172 8.14173 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14174 -#: ../en/ch09-hook.xml:1091 8.14175 +#: ../en/ch10-hook.xml:981 8.14176 msgid "" 8.14177 "The most common problems with configuring the <literal role=\"hg-ext" 8.14178 "\">bugzilla</literal> hook relate to running Bugzilla's " 8.14179 @@ -11351,7 +13371,7 @@ 8.14180 msgstr "" 8.14181 8.14182 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14183 -#: ../en/ch09-hook.xml:1097 8.14184 +#: ../en/ch10-hook.xml:987 8.14185 msgid "" 8.14186 "Recall from <xref linkend=\"sec:hook:bugzilla:config\"/> above that the user " 8.14187 "that runs the Mercurial process on the server is also the one that will run " 8.14188 @@ -11362,7 +13382,7 @@ 8.14189 msgstr "" 8.14190 8.14191 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14192 -#: ../en/ch09-hook.xml:1108 8.14193 +#: ../en/ch10-hook.xml:998 8.14194 msgid "" 8.14195 "You can cause <filename>processmail</filename> to be run with the suitable " 8.14196 "user's identity using the <command>sudo</command> command. Here is an " 8.14197 @@ -11370,7 +13390,7 @@ 8.14198 msgstr "" 8.14199 8.14200 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14201 -#: ../en/ch09-hook.xml:1115 8.14202 +#: ../en/ch10-hook.xml:1005 8.14203 msgid "" 8.14204 "This allows the <literal>hg_user</literal> user to run a " 8.14205 "<filename>processmail-wrapper</filename> program under the identity of " 8.14206 @@ -11378,7 +13398,7 @@ 8.14207 msgstr "" 8.14208 8.14209 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14210 -#: ../en/ch09-hook.xml:1120 8.14211 +#: ../en/ch10-hook.xml:1010 8.14212 msgid "" 8.14213 "This indirection through a wrapper script is necessary, because " 8.14214 "<filename>processmail</filename> expects to be run with its current directory " 8.14215 @@ -11388,14 +13408,14 @@ 8.14216 msgstr "" 8.14217 8.14218 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14219 -#: ../en/ch09-hook.xml:1129 8.14220 +#: ../en/ch10-hook.xml:1019 8.14221 msgid "" 8.14222 "It doesn't seem to matter what email address you pass to " 8.14223 "<filename>processmail</filename>." 8.14224 msgstr "" 8.14225 8.14226 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14227 -#: ../en/ch09-hook.xml:1133 8.14228 +#: ../en/ch10-hook.xml:1023 8.14229 msgid "" 8.14230 "If your <literal role=\"rc-usermap\">usermap</literal> is not set up " 8.14231 "correctly, users will see an error message from the <literal role=\"hg-ext" 8.14232 @@ -11404,7 +13424,7 @@ 8.14233 msgstr "" 8.14234 8.14235 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14236 -#: ../en/ch09-hook.xml:1140 8.14237 +#: ../en/ch10-hook.xml:1030 8.14238 msgid "" 8.14239 "What this means is that the committer's address, <literal>john.q." 8.14240 "public@example.com</literal>, is not a valid Bugzilla user name, nor does it " 8.14241 @@ -11413,13 +13433,13 @@ 8.14242 msgstr "" 8.14243 8.14244 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14245 -#: ../en/ch09-hook.xml:1150 8.14246 +#: ../en/ch10-hook.xml:1040 8.14247 msgid "" 8.14248 "<literal role=\"hg-ext\">notify</literal>&emdash;send email notifications" 8.14249 msgstr "<literal role=\"hg-ext\">notify</literal>—邮件通知" 8.14250 8.14251 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14252 -#: ../en/ch09-hook.xml:1153 8.14253 +#: ../en/ch10-hook.xml:1043 8.14254 msgid "" 8.14255 "Although Mercurial's built-in web server provides RSS feeds of changes in " 8.14256 "every repository, many people prefer to receive change notifications via " 8.14257 @@ -11429,7 +13449,7 @@ 8.14258 msgstr "" 8.14259 8.14260 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14261 -#: ../en/ch09-hook.xml:1161 8.14262 +#: ../en/ch10-hook.xml:1051 8.14263 msgid "" 8.14264 "As with the <literal role=\"hg-ext\">bugzilla</literal> hook, the <literal " 8.14265 "role=\"hg-ext\">notify</literal> hook is template-driven, so you can " 8.14266 @@ -11437,7 +13457,7 @@ 8.14267 msgstr "" 8.14268 8.14269 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14270 -#: ../en/ch09-hook.xml:1167 8.14271 +#: ../en/ch10-hook.xml:1057 8.14272 msgid "" 8.14273 "By default, the <literal role=\"hg-ext\">notify</literal> hook includes a " 8.14274 "diff of every changeset that it sends out; you can limit the size of the " 8.14275 @@ -11446,12 +13466,12 @@ 8.14276 msgstr "" 8.14277 8.14278 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.14279 -#: ../en/ch09-hook.xml:1175 8.14280 +#: ../en/ch10-hook.xml:1065 8.14281 msgid "Configuring the <literal role=\"hg-ext\">notify</literal> hook" 8.14282 msgstr "配置 <literal role=\"hg-ext\">notify</literal> 钩子" 8.14283 8.14284 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14285 -#: ../en/ch09-hook.xml:1178 8.14286 +#: ../en/ch10-hook.xml:1068 8.14287 msgid "" 8.14288 "You can set up the <literal role=\"hg-ext\">notify</literal> hook to send one " 8.14289 "email message per incoming changeset, or one per incoming group of changesets " 8.14290 @@ -11459,7 +13479,7 @@ 8.14291 msgstr "" 8.14292 8.14293 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14294 -#: ../en/ch09-hook.xml:1190 8.14295 +#: ../en/ch10-hook.xml:1080 8.14296 msgid "" 8.14297 "Configuration information for this hook lives in the <literal role=\"rc-notify" 8.14298 "\">notify</literal> section of a <filename role=\"special\">~/.hgrc</" 8.14299 @@ -11467,7 +13487,7 @@ 8.14300 msgstr "" 8.14301 8.14302 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14303 -#: ../en/ch09-hook.xml:1195 8.14304 +#: ../en/ch10-hook.xml:1085 8.14305 msgid "" 8.14306 "<envar role=\"rc-item-notify\">test</envar>: By default, this hook does not " 8.14307 "send out email at all; instead, it prints the message that it " 8.14308 @@ -11479,7 +13499,7 @@ 8.14309 msgstr "" 8.14310 8.14311 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14312 -#: ../en/ch09-hook.xml:1207 8.14313 +#: ../en/ch10-hook.xml:1097 8.14314 msgid "" 8.14315 "<envar role=\"rc-item-notify\">config</envar>: The path to a configuration " 8.14316 "file that contains subscription information. This is kept separate from the " 8.14317 @@ -11489,7 +13509,7 @@ 8.14318 msgstr "" 8.14319 8.14320 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14321 -#: ../en/ch09-hook.xml:1216 8.14322 +#: ../en/ch10-hook.xml:1106 8.14323 msgid "" 8.14324 "<envar role=\"rc-item-notify\">strip</envar>: The number of leading path " 8.14325 "separator characters to strip from a repository's path, when deciding whether " 8.14326 @@ -11504,7 +13524,7 @@ 8.14327 msgstr "" 8.14328 8.14329 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14330 -#: ../en/ch09-hook.xml:1233 8.14331 +#: ../en/ch10-hook.xml:1123 8.14332 msgid "" 8.14333 "<envar role=\"rc-item-notify\">template</envar>: The template text to use " 8.14334 "when sending messages. This specifies both the contents of the message " 8.14335 @@ -11512,7 +13532,7 @@ 8.14336 msgstr "" 8.14337 8.14338 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14339 -#: ../en/ch09-hook.xml:1239 8.14340 +#: ../en/ch10-hook.xml:1129 8.14341 msgid "" 8.14342 "<envar role=\"rc-item-notify\">maxdiff</envar>: The maximum number of lines " 8.14343 "of diff data to append to the end of a message. If a diff is longer than " 8.14344 @@ -11521,7 +13541,7 @@ 8.14345 msgstr "" 8.14346 8.14347 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14348 -#: ../en/ch09-hook.xml:1248 8.14349 +#: ../en/ch10-hook.xml:1138 8.14350 msgid "" 8.14351 "<envar role=\"rc-item-notify\">sources</envar>: A list of sources of " 8.14352 "changesets to consider. This lets you limit <literal role=\"hg-ext\">notify</" 8.14353 @@ -11531,7 +13551,7 @@ 8.14354 msgstr "" 8.14355 8.14356 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14357 -#: ../en/ch09-hook.xml:1259 8.14358 +#: ../en/ch10-hook.xml:1149 8.14359 msgid "" 8.14360 "If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the " 8.14361 "<literal role=\"rc-web\">web</literal> section, you can use it in a template; " 8.14362 @@ -11539,19 +13559,19 @@ 8.14363 msgstr "" 8.14364 8.14365 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14366 -#: ../en/ch09-hook.xml:1265 8.14367 +#: ../en/ch10-hook.xml:1155 8.14368 msgid "" 8.14369 "Here is an example set of <literal role=\"hg-ext\">notify</literal> " 8.14370 "configuration information." 8.14371 msgstr "" 8.14372 8.14373 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14374 -#: ../en/ch09-hook.xml:1271 8.14375 +#: ../en/ch10-hook.xml:1161 8.14376 msgid "This will produce a message that looks like the following:" 8.14377 msgstr "" 8.14378 8.14379 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14380 -#: ../en/ch09-hook.xml:1281 8.14381 +#: ../en/ch10-hook.xml:1171 8.14382 msgid "" 8.14383 "Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> " 8.14384 "extension <emphasis>will not send any mail</emphasis> until you explicitly " 8.14385 @@ -11561,22 +13581,22 @@ 8.14386 msgstr "" 8.14387 8.14388 #. type: Content of: <book><chapter><sect1><title> 8.14389 -#: ../en/ch09-hook.xml:1293 8.14390 +#: ../en/ch10-hook.xml:1183 8.14391 msgid "Information for writers of hooks" 8.14392 msgstr "编写钩子的信息" 8.14393 8.14394 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14395 -#: ../en/ch09-hook.xml:1296 8.14396 +#: ../en/ch10-hook.xml:1186 8.14397 msgid "In-process hook execution" 8.14398 msgstr "进程内钩子的执行" 8.14399 8.14400 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14401 -#: ../en/ch09-hook.xml:1298 8.14402 +#: ../en/ch10-hook.xml:1188 8.14403 msgid "An in-process hook is called with arguments of the following form:" 8.14404 msgstr "" 8.14405 8.14406 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14407 -#: ../en/ch09-hook.xml:1302 8.14408 +#: ../en/ch10-hook.xml:1192 8.14409 msgid "" 8.14410 "The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui" 8.14411 "\">ui</literal> object. The <literal>repo</literal> parameter is a <literal " 8.14412 @@ -11586,7 +13606,7 @@ 8.14413 msgstr "" 8.14414 8.14415 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14416 -#: ../en/ch09-hook.xml:1311 8.14417 +#: ../en/ch10-hook.xml:1201 8.14418 msgid "" 8.14419 "If a parameter is named <literal>node</literal> or <literal>parentN</" 8.14420 "literal>, it will contain a hexadecimal changeset ID. The empty string is " 8.14421 @@ -11595,21 +13615,21 @@ 8.14422 msgstr "" 8.14423 8.14424 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14425 -#: ../en/ch09-hook.xml:1318 8.14426 +#: ../en/ch10-hook.xml:1208 8.14427 msgid "" 8.14428 "If a parameter is named <literal>url</literal>, it will contain the URL of a " 8.14429 "remote repository, if that can be determined." 8.14430 msgstr "" 8.14431 8.14432 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14433 -#: ../en/ch09-hook.xml:1323 8.14434 +#: ../en/ch10-hook.xml:1213 8.14435 msgid "" 8.14436 "Boolean-valued parameters are represented as Python <literal>bool</literal> " 8.14437 "objects." 8.14438 msgstr "" 8.14439 8.14440 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14441 -#: ../en/ch09-hook.xml:1328 8.14442 +#: ../en/ch10-hook.xml:1218 8.14443 msgid "" 8.14444 "An in-process hook is called without a change to the process's working " 8.14445 "directory (unlike external hooks, which are run in the root of the " 8.14446 @@ -11618,7 +13638,7 @@ 8.14447 msgstr "" 8.14448 8.14449 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14450 -#: ../en/ch09-hook.xml:1335 8.14451 +#: ../en/ch10-hook.xml:1225 8.14452 msgid "" 8.14453 "If a hook returns a boolean <quote>false</quote> value, it is considered to " 8.14454 "have succeeded. If it returns a boolean <quote>true</quote> value or raises " 8.14455 @@ -11627,7 +13647,7 @@ 8.14456 msgstr "" 8.14457 8.14458 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14459 -#: ../en/ch09-hook.xml:1342 8.14460 +#: ../en/ch10-hook.xml:1232 8.14461 msgid "" 8.14462 "Note that changeset IDs are passed into Python hooks as hexadecimal strings, " 8.14463 "not the binary hashes that Mercurial's APIs normally use. To convert a hash " 8.14464 @@ -11635,12 +13655,12 @@ 8.14465 msgstr "" 8.14466 8.14467 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14468 -#: ../en/ch09-hook.xml:1350 8.14469 +#: ../en/ch10-hook.xml:1240 8.14470 msgid "External hook execution" 8.14471 msgstr "外部钩子的执行" 8.14472 8.14473 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14474 -#: ../en/ch09-hook.xml:1352 8.14475 +#: ../en/ch10-hook.xml:1242 8.14476 msgid "" 8.14477 "An external hook is passed to the shell of the user running Mercurial. " 8.14478 "Features of that shell, such as variable substitution and command " 8.14479 @@ -11650,7 +13670,7 @@ 8.14480 msgstr "" 8.14481 8.14482 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14483 -#: ../en/ch09-hook.xml:1360 8.14484 +#: ../en/ch10-hook.xml:1250 8.14485 msgid "" 8.14486 "Hook parameters are passed to the hook as environment variables. Each " 8.14487 "environment variable's name is converted in upper case and prefixed with the " 8.14488 @@ -11661,7 +13681,7 @@ 8.14489 msgstr "" 8.14490 8.14491 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14492 -#: ../en/ch09-hook.xml:1369 8.14493 +#: ../en/ch10-hook.xml:1259 8.14494 msgid "" 8.14495 "A boolean parameter is represented as the string <quote><literal>1</literal></" 8.14496 "quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for " 8.14497 @@ -11674,19 +13694,19 @@ 8.14498 msgstr "" 8.14499 8.14500 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14501 -#: ../en/ch09-hook.xml:1381 8.14502 +#: ../en/ch10-hook.xml:1271 8.14503 msgid "" 8.14504 "If a hook exits with a status of zero, it is considered to have succeeded. " 8.14505 "If it exits with a non-zero status, it is considered to have failed." 8.14506 msgstr "" 8.14507 8.14508 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14509 -#: ../en/ch09-hook.xml:1388 8.14510 +#: ../en/ch10-hook.xml:1278 8.14511 msgid "Finding out where changesets come from" 8.14512 msgstr "检查修改集来自何处" 8.14513 8.14514 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14515 -#: ../en/ch09-hook.xml:1390 8.14516 +#: ../en/ch10-hook.xml:1280 8.14517 msgid "" 8.14518 "A hook that involves the transfer of changesets between a local repository " 8.14519 "and another may be able to find out information about the <quote>far side</" 8.14520 @@ -11696,12 +13716,12 @@ 8.14521 msgstr "" 8.14522 8.14523 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.14524 -#: ../en/ch09-hook.xml:1399 8.14525 +#: ../en/ch10-hook.xml:1289 8.14526 msgid "Sources of changesets" 8.14527 msgstr "修改集的来源" 8.14528 8.14529 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14530 -#: ../en/ch09-hook.xml:1401 8.14531 +#: ../en/ch10-hook.xml:1291 8.14532 msgid "" 8.14533 "Mercurial will tell a hook what means are, or were, used to transfer " 8.14534 "changesets between repositories. This is provided by Mercurial in a Python " 8.14535 @@ -11710,40 +13730,40 @@ 8.14536 msgstr "" 8.14537 8.14538 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14539 -#: ../en/ch09-hook.xml:1409 8.14540 +#: ../en/ch10-hook.xml:1299 8.14541 msgid "" 8.14542 "<literal>serve</literal>: Changesets are transferred to or from a remote " 8.14543 "repository over http or ssh." 8.14544 msgstr "" 8.14545 8.14546 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14547 -#: ../en/ch09-hook.xml:1414 8.14548 +#: ../en/ch10-hook.xml:1304 8.14549 msgid "" 8.14550 "<literal>pull</literal>: Changesets are being transferred via a pull from one " 8.14551 "repository into another." 8.14552 msgstr "" 8.14553 8.14554 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14555 -#: ../en/ch09-hook.xml:1419 8.14556 +#: ../en/ch10-hook.xml:1309 8.14557 msgid "" 8.14558 "<literal>push</literal>: Changesets are being transferred via a push from one " 8.14559 "repository into another." 8.14560 msgstr "" 8.14561 8.14562 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14563 -#: ../en/ch09-hook.xml:1424 8.14564 +#: ../en/ch10-hook.xml:1314 8.14565 msgid "" 8.14566 "<literal>bundle</literal>: Changesets are being transferred to or from a " 8.14567 "bundle." 8.14568 msgstr "" 8.14569 8.14570 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 8.14571 -#: ../en/ch09-hook.xml:1431 8.14572 +#: ../en/ch10-hook.xml:1321 8.14573 msgid "Where changes are going&emdash;remote repository URLs" 8.14574 msgstr "修改集要到哪里—远程版本库的地址" 8.14575 8.14576 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14577 -#: ../en/ch09-hook.xml:1434 8.14578 +#: ../en/ch10-hook.xml:1324 8.14579 msgid "" 8.14580 "When possible, Mercurial will tell a hook the location of the <quote>far " 8.14581 "side</quote> of an activity that transfers changeset data between " 8.14582 @@ -11753,7 +13773,7 @@ 8.14583 msgstr "" 8.14584 8.14585 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 8.14586 -#: ../en/ch09-hook.xml:1442 8.14587 +#: ../en/ch10-hook.xml:1332 8.14588 msgid "" 8.14589 "This information is not always known. If a hook is invoked in a repository " 8.14590 "that is being served via http or ssh, Mercurial cannot tell where the remote " 8.14591 @@ -11762,14 +13782,14 @@ 8.14592 msgstr "" 8.14593 8.14594 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14595 -#: ../en/ch09-hook.xml:1449 8.14596 +#: ../en/ch10-hook.xml:1339 8.14597 msgid "" 8.14598 "<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP " 8.14599 "address <literal>1.2.3.4</literal>." 8.14600 msgstr "" 8.14601 8.14602 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14603 -#: ../en/ch09-hook.xml:1454 8.14604 +#: ../en/ch10-hook.xml:1344 8.14605 msgid "" 8.14606 "<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP " 8.14607 "address <literal>1.2.3.4</literal>. If the client is using SSL, this will be " 8.14608 @@ -11777,24 +13797,24 @@ 8.14609 msgstr "" 8.14610 8.14611 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 8.14612 -#: ../en/ch09-hook.xml:1461 8.14613 +#: ../en/ch10-hook.xml:1351 8.14614 msgid "Empty&emdash;no information could be discovered about the remote client." 8.14615 msgstr "" 8.14616 8.14617 #. type: Content of: <book><chapter><sect1><title> 8.14618 -#: ../en/ch09-hook.xml:1470 8.14619 +#: ../en/ch10-hook.xml:1359 8.14620 msgid "Hook reference" 8.14621 msgstr "钩子参考" 8.14622 8.14623 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14624 -#: ../en/ch09-hook.xml:1473 8.14625 +#: ../en/ch10-hook.xml:1362 8.14626 msgid "" 8.14627 "<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets " 8.14628 "added" 8.14629 msgstr "<literal role=\"hook\">changegroup</literal>—增加远程修改集之后" 8.14630 8.14631 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14632 -#: ../en/ch09-hook.xml:1476 8.14633 +#: ../en/ch10-hook.xml:1365 8.14634 msgid "" 8.14635 "This hook is run after a group of pre-existing changesets has been added to " 8.14636 "the repository, for example via a <command role=\"hg-cmd\">hg pull</command> " 8.14637 @@ -11805,7 +13825,7 @@ 8.14638 msgstr "" 8.14639 8.14640 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14641 -#: ../en/ch09-hook.xml:1486 8.14642 +#: ../en/ch10-hook.xml:1375 8.14643 msgid "" 8.14644 "Some possible uses for this hook include kicking off an automated build or " 8.14645 "test of the added changesets, updating a bug database, or notifying " 8.14646 @@ -11813,15 +13833,15 @@ 8.14647 msgstr "" 8.14648 8.14649 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14650 -#: ../en/ch09-hook.xml:1492 ../en/ch09-hook.xml:1532 ../en/ch09-hook.xml:1576 8.14651 -#: ../en/ch09-hook.xml:1618 ../en/ch09-hook.xml:1673 ../en/ch09-hook.xml:1713 8.14652 -#: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1783 ../en/ch09-hook.xml:1846 8.14653 -#: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1940 ../en/ch09-hook.xml:1967 8.14654 +#: ../en/ch10-hook.xml:1381 ../en/ch10-hook.xml:1421 ../en/ch10-hook.xml:1465 8.14655 +#: ../en/ch10-hook.xml:1507 ../en/ch10-hook.xml:1562 ../en/ch10-hook.xml:1602 8.14656 +#: ../en/ch10-hook.xml:1638 ../en/ch10-hook.xml:1672 ../en/ch10-hook.xml:1736 8.14657 +#: ../en/ch10-hook.xml:1794 ../en/ch10-hook.xml:1830 ../en/ch10-hook.xml:1857 8.14658 msgid "Parameters to this hook:" 8.14659 msgstr "" 8.14660 8.14661 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14662 -#: ../en/ch09-hook.xml:1495 ../en/ch09-hook.xml:1849 8.14663 +#: ../en/ch10-hook.xml:1384 ../en/ch10-hook.xml:1739 8.14664 msgid "" 8.14665 "<literal>node</literal>: A changeset ID. The changeset ID of the first " 8.14666 "changeset in the group that was added. All changesets between this and " 8.14667 @@ -11831,23 +13851,23 @@ 8.14668 msgstr "" 8.14669 8.14670 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14671 -#: ../en/ch09-hook.xml:1504 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676 8.14672 -#: ../en/ch09-hook.xml:1859 8.14673 +#: ../en/ch10-hook.xml:1393 ../en/ch10-hook.xml:1472 ../en/ch10-hook.xml:1565 8.14674 +#: ../en/ch10-hook.xml:1749 8.14675 msgid "" 8.14676 "<literal>source</literal>: A string. The source of these changes. See <xref " 8.14677 "linkend=\"sec:hook:sources\"/> for details." 8.14678 msgstr "" 8.14679 8.14680 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14681 -#: ../en/ch09-hook.xml:1509 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639 8.14682 -#: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1762 ../en/ch09-hook.xml:1864 8.14683 +#: ../en/ch10-hook.xml:1398 ../en/ch10-hook.xml:1477 ../en/ch10-hook.xml:1528 8.14684 +#: ../en/ch10-hook.xml:1570 ../en/ch10-hook.xml:1651 ../en/ch10-hook.xml:1754 8.14685 msgid "" 8.14686 "<literal>url</literal>: A URL. The location of the remote repository, if " 8.14687 "known. See <xref linkend=\"sec:hook:url\"/> for more information." 8.14688 msgstr "" 8.14689 8.14690 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14691 -#: ../en/ch09-hook.xml:1515 8.14692 +#: ../en/ch10-hook.xml:1404 8.14693 msgid "" 8.14694 "See also: <literal role=\"hook\">incoming</literal> (<xref linkend=\"sec:hook:" 8.14695 "incoming\"/>), <literal role=\"hook\">prechangegroup</literal> (<xref linkend=" 8.14696 @@ -11856,40 +13876,40 @@ 8.14697 msgstr "" 8.14698 8.14699 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14700 -#: ../en/ch09-hook.xml:1526 8.14701 +#: ../en/ch10-hook.xml:1415 8.14702 msgid "" 8.14703 "<literal role=\"hook\">commit</literal>&emdash;after a new changeset is " 8.14704 "created" 8.14705 msgstr "<literal role=\"hook\">commit</literal>—创建新修改集之后" 8.14706 8.14707 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14708 -#: ../en/ch09-hook.xml:1529 8.14709 +#: ../en/ch10-hook.xml:1418 8.14710 msgid "This hook is run after a new changeset has been created." 8.14711 msgstr "" 8.14712 8.14713 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14714 -#: ../en/ch09-hook.xml:1535 ../en/ch09-hook.xml:1907 8.14715 +#: ../en/ch10-hook.xml:1424 ../en/ch10-hook.xml:1797 8.14716 msgid "" 8.14717 "<literal>node</literal>: A changeset ID. The changeset ID of the newly " 8.14718 "committed changeset." 8.14719 msgstr "" 8.14720 8.14721 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14722 -#: ../en/ch09-hook.xml:1539 ../en/ch09-hook.xml:1911 8.14723 +#: ../en/ch10-hook.xml:1428 ../en/ch10-hook.xml:1801 8.14724 msgid "" 8.14725 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " 8.14726 "parent of the newly committed changeset." 8.14727 msgstr "" 8.14728 8.14729 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14730 -#: ../en/ch09-hook.xml:1544 ../en/ch09-hook.xml:1916 8.14731 +#: ../en/ch10-hook.xml:1433 ../en/ch10-hook.xml:1806 8.14732 msgid "" 8.14733 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " 8.14734 "parent of the newly committed changeset." 8.14735 msgstr "" 8.14736 8.14737 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14738 -#: ../en/ch09-hook.xml:1550 8.14739 +#: ../en/ch10-hook.xml:1439 8.14740 msgid "" 8.14741 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" 8.14742 "hook:precommit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref " 8.14743 @@ -11897,14 +13917,14 @@ 8.14744 msgstr "" 8.14745 8.14746 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14747 -#: ../en/ch09-hook.xml:1559 8.14748 +#: ../en/ch10-hook.xml:1448 8.14749 msgid "" 8.14750 "<literal role=\"hook\">incoming</literal>&emdash;after one remote changeset " 8.14751 "is added" 8.14752 msgstr "<literal role=\"hook\">incoming</literal>—增加远程修改集之后" 8.14753 8.14754 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14755 -#: ../en/ch09-hook.xml:1562 8.14756 +#: ../en/ch10-hook.xml:1451 8.14757 msgid "" 8.14758 "This hook is run after a pre-existing changeset has been added to the " 8.14759 "repository, for example via a <command role=\"hg-cmd\">hg push</command>. If " 8.14760 @@ -11913,7 +13933,7 @@ 8.14761 msgstr "" 8.14762 8.14763 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14764 -#: ../en/ch09-hook.xml:1569 8.14765 +#: ../en/ch10-hook.xml:1458 8.14766 msgid "" 8.14767 "You can use this hook for the same purposes as the <literal role=\"hook" 8.14768 "\">changegroup</literal> hook (<xref linkend=\"sec:hook:changegroup\"/>); " 8.14769 @@ -11922,13 +13942,13 @@ 8.14770 msgstr "" 8.14771 8.14772 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14773 -#: ../en/ch09-hook.xml:1579 8.14774 +#: ../en/ch10-hook.xml:1468 8.14775 msgid "" 8.14776 "<literal>node</literal>: A changeset ID. The ID of the newly added changeset." 8.14777 msgstr "" 8.14778 8.14779 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14780 -#: ../en/ch09-hook.xml:1594 8.14781 +#: ../en/ch10-hook.xml:1483 8.14782 msgid "" 8.14783 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 8.14784 "hook:changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> (<xref " 8.14785 @@ -11938,14 +13958,14 @@ 8.14786 msgstr "" 8.14787 8.14788 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14789 -#: ../en/ch09-hook.xml:1605 8.14790 +#: ../en/ch10-hook.xml:1494 8.14791 msgid "" 8.14792 "<literal role=\"hook\">outgoing</literal>&emdash;after changesets are " 8.14793 "propagated" 8.14794 msgstr "<literal role=\"hook\">outgoing</literal>—传播修改集之后" 8.14795 8.14796 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14797 -#: ../en/ch09-hook.xml:1608 8.14798 +#: ../en/ch10-hook.xml:1497 8.14799 msgid "" 8.14800 "This hook is run after a group of changesets has been propagated out of this " 8.14801 "repository, for example by a <command role=\"hg-cmd\">hg push</command> or " 8.14802 @@ -11953,21 +13973,21 @@ 8.14803 msgstr "" 8.14804 8.14805 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14806 -#: ../en/ch09-hook.xml:1614 8.14807 +#: ../en/ch10-hook.xml:1503 8.14808 msgid "" 8.14809 "One possible use for this hook is to notify administrators that changes have " 8.14810 "been pulled." 8.14811 msgstr "" 8.14812 8.14813 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14814 -#: ../en/ch09-hook.xml:1621 8.14815 +#: ../en/ch10-hook.xml:1510 8.14816 msgid "" 8.14817 "<literal>node</literal>: A changeset ID. The changeset ID of the first " 8.14818 "changeset of the group that was sent." 8.14819 msgstr "" 8.14820 8.14821 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14822 -#: ../en/ch09-hook.xml:1626 8.14823 +#: ../en/ch10-hook.xml:1515 8.14824 msgid "" 8.14825 "<literal>source</literal>: A string. The source of the of the operation (see " 8.14826 "<xref linkend=\"sec:hook:sources\"/>). If a remote client pulled changes " 8.14827 @@ -11979,28 +13999,28 @@ 8.14828 msgstr "" 8.14829 8.14830 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14831 -#: ../en/ch09-hook.xml:1645 8.14832 +#: ../en/ch10-hook.xml:1534 8.14833 msgid "" 8.14834 "See also: <literal role=\"hook\">preoutgoing</literal> (<xref linkend=\"sec:" 8.14835 "hook:preoutgoing\"/>)" 8.14836 msgstr "" 8.14837 8.14838 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14839 -#: ../en/ch09-hook.xml:1652 8.14840 +#: ../en/ch10-hook.xml:1541 8.14841 msgid "" 8.14842 "<literal role=\"hook\">prechangegroup</literal>&emdash;before starting to add " 8.14843 "remote changesets" 8.14844 msgstr "<literal role=\"hook\">prechangegroup</literal>—增加远程修改集之前" 8.14845 8.14846 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14847 -#: ../en/ch09-hook.xml:1656 8.14848 +#: ../en/ch10-hook.xml:1545 8.14849 msgid "" 8.14850 "This controlling hook is run before Mercurial begins to add a group of " 8.14851 "changesets from another repository." 8.14852 msgstr "" 8.14853 8.14854 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14855 -#: ../en/ch09-hook.xml:1660 8.14856 +#: ../en/ch10-hook.xml:1549 8.14857 msgid "" 8.14858 "This hook does not have any information about the changesets to be added, " 8.14859 "because it is run before transmission of those changesets is allowed to " 8.14860 @@ -12008,7 +14028,7 @@ 8.14861 msgstr "" 8.14862 8.14863 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14864 -#: ../en/ch09-hook.xml:1666 8.14865 +#: ../en/ch10-hook.xml:1555 8.14866 msgid "" 8.14867 "One use for this hook is to prevent external changes from being added to a " 8.14868 "repository. For example, you could use this to <quote>freeze</quote> a " 8.14869 @@ -12017,7 +14037,7 @@ 8.14870 msgstr "" 8.14871 8.14872 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14873 -#: ../en/ch09-hook.xml:1687 8.14874 +#: ../en/ch10-hook.xml:1576 8.14875 msgid "" 8.14876 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 8.14877 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " 8.14878 @@ -12026,14 +14046,14 @@ 8.14879 msgstr "" 8.14880 8.14881 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14882 -#: ../en/ch09-hook.xml:1698 8.14883 +#: ../en/ch10-hook.xml:1587 8.14884 msgid "" 8.14885 "<literal role=\"hook\">precommit</literal>&emdash;before starting to commit a " 8.14886 "changeset" 8.14887 msgstr "<literal role=\"hook\">precommit</literal>—提交修改集之前" 8.14888 8.14889 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14890 -#: ../en/ch09-hook.xml:1701 8.14891 +#: ../en/ch10-hook.xml:1590 8.14892 msgid "" 8.14893 "This hook is run before Mercurial begins to commit a new changeset. It is run " 8.14894 "before Mercurial has any of the metadata for the commit, such as the files to " 8.14895 @@ -12041,7 +14061,7 @@ 8.14896 msgstr "" 8.14897 8.14898 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14899 -#: ../en/ch09-hook.xml:1707 8.14900 +#: ../en/ch10-hook.xml:1596 8.14901 msgid "" 8.14902 "One use for this hook is to disable the ability to commit new changesets, " 8.14903 "while still allowing incoming changesets. Another is to run a build or test, " 8.14904 @@ -12049,28 +14069,28 @@ 8.14905 msgstr "" 8.14906 8.14907 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14908 -#: ../en/ch09-hook.xml:1716 8.14909 +#: ../en/ch10-hook.xml:1605 8.14910 msgid "" 8.14911 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " 8.14912 "parent of the working directory." 8.14913 msgstr "" 8.14914 8.14915 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14916 -#: ../en/ch09-hook.xml:1721 8.14917 +#: ../en/ch10-hook.xml:1610 8.14918 msgid "" 8.14919 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " 8.14920 "parent of the working directory." 8.14921 msgstr "" 8.14922 8.14923 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14924 -#: ../en/ch09-hook.xml:1726 8.14925 +#: ../en/ch10-hook.xml:1615 8.14926 msgid "" 8.14927 "If the commit proceeds, the parents of the working directory will become the " 8.14928 "parents of the new changeset." 8.14929 msgstr "" 8.14930 8.14931 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14932 -#: ../en/ch09-hook.xml:1730 8.14933 +#: ../en/ch10-hook.xml:1619 8.14934 msgid "" 8.14935 "See also: <literal role=\"hook\">commit</literal> (<xref linkend=\"sec:hook:" 8.14936 "commit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref linkend=" 8.14937 @@ -12078,28 +14098,28 @@ 8.14938 msgstr "" 8.14939 8.14940 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14941 -#: ../en/ch09-hook.xml:1738 8.14942 +#: ../en/ch10-hook.xml:1627 8.14943 msgid "" 8.14944 "<literal role=\"hook\">preoutgoing</literal>&emdash;before starting to " 8.14945 "propagate changesets" 8.14946 msgstr "<literal role=\"hook\">preoutgoing</literal>—传播修改集之前" 8.14947 8.14948 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14949 -#: ../en/ch09-hook.xml:1741 8.14950 +#: ../en/ch10-hook.xml:1630 8.14951 msgid "" 8.14952 "This hook is invoked before Mercurial knows the identities of the changesets " 8.14953 "to be transmitted." 8.14954 msgstr "" 8.14955 8.14956 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14957 -#: ../en/ch09-hook.xml:1745 8.14958 +#: ../en/ch10-hook.xml:1634 8.14959 msgid "" 8.14960 "One use for this hook is to prevent changes from being transmitted to another " 8.14961 "repository." 8.14962 msgstr "" 8.14963 8.14964 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14965 -#: ../en/ch09-hook.xml:1752 8.14966 +#: ../en/ch10-hook.xml:1641 8.14967 msgid "" 8.14968 "<literal>source</literal>: A string. The source of the operation that is " 8.14969 "attempting to obtain changes from this repository (see <xref linkend=\"sec:" 8.14970 @@ -12109,27 +14129,27 @@ 8.14971 msgstr "" 8.14972 8.14973 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14974 -#: ../en/ch09-hook.xml:1768 8.14975 +#: ../en/ch10-hook.xml:1657 8.14976 msgid "" 8.14977 "See also: <literal role=\"hook\">outgoing</literal> (<xref linkend=\"sec:hook:" 8.14978 "outgoing\"/>)" 8.14979 msgstr "" 8.14980 8.14981 #. type: Content of: <book><chapter><sect1><sect2><title> 8.14982 -#: ../en/ch09-hook.xml:1775 8.14983 +#: ../en/ch10-hook.xml:1664 8.14984 msgid "" 8.14985 "<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset" 8.14986 msgstr "<literal role=\"hook\">pretag</literal>—创建标签之前" 8.14987 8.14988 #. type: Content of: <book><chapter><sect1><sect2><para> 8.14989 -#: ../en/ch09-hook.xml:1778 8.14990 +#: ../en/ch10-hook.xml:1667 8.14991 msgid "" 8.14992 "This controlling hook is run before a tag is created. If the hook succeeds, " 8.14993 "creation of the tag proceeds. If the hook fails, the tag is not created." 8.14994 msgstr "" 8.14995 8.14996 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.14997 -#: ../en/ch09-hook.xml:1786 8.14998 +#: ../en/ch10-hook.xml:1675 8.14999 msgid "" 8.15000 "<literal>local</literal>: A boolean. Whether the tag is local to this " 8.15001 "repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</" 8.15002 @@ -12138,19 +14158,19 @@ 8.15003 msgstr "" 8.15004 8.15005 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15006 -#: ../en/ch09-hook.xml:1793 8.15007 +#: ../en/ch10-hook.xml:1682 8.15008 msgid "" 8.15009 "<literal>node</literal>: A changeset ID. The ID of the changeset to be " 8.15010 "tagged." 8.15011 msgstr "" 8.15012 8.15013 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15014 -#: ../en/ch09-hook.xml:1797 8.15015 +#: ../en/ch10-hook.xml:1686 8.15016 msgid "<literal>tag</literal>: A string. The name of the tag to be created." 8.15017 msgstr "" 8.15018 8.15019 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15020 -#: ../en/ch09-hook.xml:1802 8.15021 +#: ../en/ch10-hook.xml:1691 8.15022 msgid "" 8.15023 "If the tag to be created is revision-controlled, the <literal role=\"hook" 8.15024 "\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> " 8.15025 @@ -12159,14 +14179,14 @@ 8.15026 msgstr "" 8.15027 8.15028 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15029 -#: ../en/ch09-hook.xml:1810 8.15030 +#: ../en/ch10-hook.xml:1699 8.15031 msgid "" 8.15032 "See also: <literal role=\"hook\">tag</literal> (<xref linkend=\"sec:hook:tag" 8.15033 "\"/>)" 8.15034 msgstr "" 8.15035 8.15036 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15037 -#: ../en/ch09-hook.xml:1815 8.15038 +#: ../en/ch10-hook.xml:1705 8.15039 msgid "" 8.15040 "<literal role=\"hook\">pretxnchangegroup</literal>&emdash;before completing " 8.15041 "addition of remote changesets" 8.15042 @@ -12174,7 +14194,7 @@ 8.15043 "<literal role=\"hook\">pretxnchangegroup</literal>—完成增加远程修改集之前" 8.15044 8.15045 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15046 -#: ../en/ch09-hook.xml:1819 8.15047 +#: ../en/ch10-hook.xml:1709 8.15048 msgid "" 8.15049 "This controlling hook is run before a transaction&emdash;that manages the " 8.15050 "addition of a group of new changesets from outside the repository&emdash;" 8.15051 @@ -12184,7 +14204,7 @@ 8.15052 msgstr "" 8.15053 8.15054 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15055 -#: ../en/ch09-hook.xml:1828 8.15056 +#: ../en/ch10-hook.xml:1718 8.15057 msgid "" 8.15058 "This hook can access the metadata associated with the almost-added " 8.15059 "changesets, but it should not do anything permanent with this data. It must " 8.15060 @@ -12192,7 +14212,7 @@ 8.15061 msgstr "" 8.15062 8.15063 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15064 -#: ../en/ch09-hook.xml:1834 8.15065 +#: ../en/ch10-hook.xml:1724 8.15066 msgid "" 8.15067 "While this hook is running, if other Mercurial processes access this " 8.15068 "repository, they will be able to see the almost-added changesets as if they " 8.15069 @@ -12201,7 +14221,7 @@ 8.15070 msgstr "" 8.15071 8.15072 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15073 -#: ../en/ch09-hook.xml:1841 8.15074 +#: ../en/ch10-hook.xml:1731 8.15075 msgid "" 8.15076 "This hook can be used to automatically vet a group of changesets. If the " 8.15077 "hook fails, all of the changesets are <quote>rejected</quote> when the " 8.15078 @@ -12209,7 +14229,7 @@ 8.15079 msgstr "" 8.15080 8.15081 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15082 -#: ../en/ch09-hook.xml:1870 8.15083 +#: ../en/ch10-hook.xml:1760 8.15084 msgid "" 8.15085 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" 8.15086 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " 8.15087 @@ -12218,14 +14238,14 @@ 8.15088 msgstr "" 8.15089 8.15090 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15091 -#: ../en/ch09-hook.xml:1881 8.15092 +#: ../en/ch10-hook.xml:1771 8.15093 msgid "" 8.15094 "<literal role=\"hook\">pretxncommit</literal>&emdash;before completing commit " 8.15095 "of new changeset" 8.15096 msgstr "<literal role=\"hook\">pretxncommit</literal>—完成提交之前" 8.15097 8.15098 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15099 -#: ../en/ch09-hook.xml:1884 8.15100 +#: ../en/ch10-hook.xml:1774 8.15101 msgid "" 8.15102 "This controlling hook is run before a transaction&emdash;that manages a new " 8.15103 "commit&emdash;completes. If the hook succeeds, the transaction completes and " 8.15104 @@ -12234,7 +14254,7 @@ 8.15105 msgstr "" 8.15106 8.15107 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15108 -#: ../en/ch09-hook.xml:1892 8.15109 +#: ../en/ch10-hook.xml:1782 8.15110 msgid "" 8.15111 "This hook can access the metadata associated with the almost-new changeset, " 8.15112 "but it should not do anything permanent with this data. It must also not " 8.15113 @@ -12242,7 +14262,7 @@ 8.15114 msgstr "" 8.15115 8.15116 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15117 -#: ../en/ch09-hook.xml:1898 8.15118 +#: ../en/ch10-hook.xml:1788 8.15119 msgid "" 8.15120 "While this hook is running, if other Mercurial processes access this " 8.15121 "repository, they will be able to see the almost-new changeset as if it is " 8.15122 @@ -12251,7 +14271,7 @@ 8.15123 msgstr "" 8.15124 8.15125 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15126 -#: ../en/ch09-hook.xml:1922 8.15127 +#: ../en/ch10-hook.xml:1812 8.15128 msgid "" 8.15129 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" 8.15130 "hook:precommit\"/>)" 8.15131 @@ -12260,14 +14280,14 @@ 8.15132 "precommit\"/>)" 8.15133 8.15134 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15135 -#: ../en/ch09-hook.xml:1929 8.15136 +#: ../en/ch10-hook.xml:1819 8.15137 msgid "" 8.15138 "<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging " 8.15139 "working directory" 8.15140 msgstr "<literal role=\"hook\">preupdate</literal>—更新或合并工作目录之前" 8.15141 8.15142 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15143 -#: ../en/ch09-hook.xml:1932 8.15144 +#: ../en/ch10-hook.xml:1822 8.15145 msgid "" 8.15146 "This controlling hook is run before an update or merge of the working " 8.15147 "directory begins. It is run only if Mercurial's normal pre-update checks " 8.15148 @@ -12276,7 +14296,7 @@ 8.15149 msgstr "" 8.15150 8.15151 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15152 -#: ../en/ch09-hook.xml:1943 8.15153 +#: ../en/ch10-hook.xml:1833 8.15154 msgid "" 8.15155 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 8.15156 "working directory is to be updated to. If the working directory is being " 8.15157 @@ -12284,7 +14304,7 @@ 8.15158 msgstr "" 8.15159 8.15160 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15161 -#: ../en/ch09-hook.xml:1949 8.15162 +#: ../en/ch10-hook.xml:1839 8.15163 msgid "" 8.15164 "<literal>parent2</literal>: A changeset ID. Only set if the working directory " 8.15165 "is being merged. The ID of the revision that the working directory is being " 8.15166 @@ -12292,24 +14312,24 @@ 8.15167 msgstr "" 8.15168 8.15169 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15170 -#: ../en/ch09-hook.xml:1956 8.15171 +#: ../en/ch10-hook.xml:1846 8.15172 msgid "" 8.15173 "See also: <literal role=\"hook\">update</literal> (<xref linkend=\"sec:hook:" 8.15174 "update\"/>)" 8.15175 msgstr "" 8.15176 8.15177 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15178 -#: ../en/ch09-hook.xml:1961 8.15179 +#: ../en/ch10-hook.xml:1851 8.15180 msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset" 8.15181 msgstr "<literal role=\"hook\">tag</literal>—创建标签之后" 8.15182 8.15183 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15184 -#: ../en/ch09-hook.xml:1964 8.15185 +#: ../en/ch10-hook.xml:1854 8.15186 msgid "This hook is run after a tag has been created." 8.15187 msgstr "" 8.15188 8.15189 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15190 -#: ../en/ch09-hook.xml:1970 8.15191 +#: ../en/ch10-hook.xml:1860 8.15192 msgid "" 8.15193 "<literal>local</literal>: A boolean. Whether the new tag is local to this " 8.15194 "repository instance (i.e. stored in <filename role=\"special\">.hg/" 8.15195 @@ -12318,19 +14338,19 @@ 8.15196 msgstr "" 8.15197 8.15198 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15199 -#: ../en/ch09-hook.xml:1978 8.15200 +#: ../en/ch10-hook.xml:1868 8.15201 msgid "" 8.15202 "<literal>node</literal>: A changeset ID. The ID of the changeset that was " 8.15203 "tagged." 8.15204 msgstr "" 8.15205 8.15206 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15207 -#: ../en/ch09-hook.xml:1982 8.15208 +#: ../en/ch10-hook.xml:1872 8.15209 msgid "<literal>tag</literal>: A string. The name of the tag that was created." 8.15210 msgstr "" 8.15211 8.15212 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15213 -#: ../en/ch09-hook.xml:1987 8.15214 +#: ../en/ch10-hook.xml:1877 8.15215 msgid "" 8.15216 "If the created tag is revision-controlled, the <literal role=\"hook\">commit</" 8.15217 "literal> hook (section <xref linkend=\"sec:hook:commit\"/>) is run before " 8.15218 @@ -12338,7 +14358,7 @@ 8.15219 msgstr "" 8.15220 8.15221 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15222 -#: ../en/ch09-hook.xml:1992 8.15223 +#: ../en/ch10-hook.xml:1882 8.15224 msgid "" 8.15225 "See also: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:" 8.15226 "pretag\"/>)" 8.15227 @@ -12347,14 +14367,14 @@ 8.15228 "\"/>)" 8.15229 8.15230 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15231 -#: ../en/ch09-hook.xml:1998 8.15232 +#: ../en/ch10-hook.xml:1888 8.15233 msgid "" 8.15234 "<literal role=\"hook\">update</literal>&emdash;after updating or merging " 8.15235 "working directory" 8.15236 msgstr "<literal role=\"hook\">update</literal>—更新或合并工作目录之后" 8.15237 8.15238 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15239 -#: ../en/ch09-hook.xml:2001 8.15240 +#: ../en/ch10-hook.xml:1891 8.15241 msgid "" 8.15242 "This hook is run after an update or merge of the working directory " 8.15243 "completes. Since a merge can fail (if the external <command>hgmerge</" 8.15244 @@ -12363,14 +14383,14 @@ 8.15245 msgstr "" 8.15246 8.15247 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15248 -#: ../en/ch09-hook.xml:2009 8.15249 +#: ../en/ch10-hook.xml:1899 8.15250 msgid "" 8.15251 "<literal>error</literal>: A boolean. Indicates whether the update or merge " 8.15252 "completed successfully." 8.15253 msgstr "" 8.15254 8.15255 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15256 -#: ../en/ch09-hook.xml:2014 8.15257 +#: ../en/ch10-hook.xml:1904 8.15258 msgid "" 8.15259 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 8.15260 "working directory was updated to. If the working directory was merged, it " 8.15261 @@ -12378,7 +14398,7 @@ 8.15262 msgstr "" 8.15263 8.15264 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15265 -#: ../en/ch09-hook.xml:2020 8.15266 +#: ../en/ch10-hook.xml:1910 8.15267 msgid "" 8.15268 "<literal>parent2</literal>: A changeset ID. Only set if the working " 8.15269 "directory was merged. The ID of the revision that the working directory was " 8.15270 @@ -12386,33 +14406,33 @@ 8.15271 msgstr "" 8.15272 8.15273 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15274 -#: ../en/ch09-hook.xml:2026 8.15275 +#: ../en/ch10-hook.xml:1916 8.15276 msgid "" 8.15277 "See also: <literal role=\"hook\">preupdate</literal> (<xref linkend=\"sec:" 8.15278 "hook:preupdate\"/>)" 8.15279 msgstr "" 8.15280 8.15281 #. type: Content of: <book><chapter><title> 8.15282 -#: ../en/ch10-template.xml:5 8.15283 -msgid "Customising the output of Mercurial" 8.15284 +#: ../en/ch11-template.xml:5 8.15285 +msgid "Customizing the output of Mercurial" 8.15286 msgstr "定制 Mercurial 的输出" 8.15287 8.15288 #. type: Content of: <book><chapter><para> 8.15289 -#: ../en/ch10-template.xml:7 8.15290 +#: ../en/ch11-template.xml:7 8.15291 msgid "" 8.15292 "Mercurial provides a powerful mechanism to let you control how it displays " 8.15293 "information. The mechanism is based on templates. You can use templates to " 8.15294 -"generate specific output for a single command, or to customise the entire " 8.15295 +"generate specific output for a single command, or to customize the entire " 8.15296 "appearance of the built-in web interface." 8.15297 msgstr "" 8.15298 8.15299 #. type: Content of: <book><chapter><sect1><title> 8.15300 -#: ../en/ch10-template.xml:14 8.15301 +#: ../en/ch11-template.xml:14 8.15302 msgid "Using precanned output styles" 8.15303 msgstr "使用预定义的输出样式" 8.15304 8.15305 #. type: Content of: <book><chapter><sect1><para> 8.15306 -#: ../en/ch10-template.xml:16 8.15307 +#: ../en/ch11-template.xml:16 8.15308 msgid "" 8.15309 "Packaged with Mercurial are some output styles that you can use immediately. " 8.15310 "A style is simply a precanned template that someone wrote and installed " 8.15311 @@ -12420,14 +14440,14 @@ 8.15312 msgstr "" 8.15313 8.15314 #. type: Content of: <book><chapter><sect1><para> 8.15315 -#: ../en/ch10-template.xml:21 8.15316 +#: ../en/ch11-template.xml:21 8.15317 msgid "" 8.15318 "Before we take a look at Mercurial's bundled styles, let's review its normal " 8.15319 "output." 8.15320 msgstr "" 8.15321 8.15322 #. type: Content of: <book><chapter><sect1><para> 8.15323 -#: ../en/ch10-template.xml:26 8.15324 +#: ../en/ch11-template.xml:26 8.15325 msgid "" 8.15326 "This is somewhat informative, but it takes up a lot of space&emdash;five " 8.15327 "lines of output per changeset. The <literal>compact</literal> style reduces " 8.15328 @@ -12435,7 +14455,7 @@ 8.15329 msgstr "" 8.15330 8.15331 #. type: Content of: <book><chapter><sect1><para> 8.15332 -#: ../en/ch10-template.xml:33 8.15333 +#: ../en/ch11-template.xml:33 8.15334 msgid "" 8.15335 "The <literal>changelog</literal> style hints at the expressive power of " 8.15336 "Mercurial's templating engine. This style attempts to follow the GNU " 8.15337 @@ -12443,19 +14463,19 @@ 8.15338 msgstr "" 8.15339 8.15340 #. type: Content of: <book><chapter><sect1><para> 8.15341 -#: ../en/ch10-template.xml:40 8.15342 +#: ../en/ch11-template.xml:40 8.15343 msgid "" 8.15344 "You will not be shocked to learn that Mercurial's default output style is " 8.15345 "named <literal>default</literal>." 8.15346 msgstr "" 8.15347 8.15348 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15349 -#: ../en/ch10-template.xml:44 8.15350 +#: ../en/ch11-template.xml:44 8.15351 msgid "Setting a default style" 8.15352 msgstr "设置默认样式" 8.15353 8.15354 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15355 -#: ../en/ch10-template.xml:46 8.15356 +#: ../en/ch11-template.xml:46 8.15357 msgid "" 8.15358 "You can modify the output style that Mercurial will use for every command by " 8.15359 "editing your <filename role=\"special\">~/.hgrc</filename> file, naming the " 8.15360 @@ -12463,7 +14483,7 @@ 8.15361 msgstr "" 8.15362 8.15363 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15364 -#: ../en/ch10-template.xml:54 8.15365 +#: ../en/ch11-template.xml:54 8.15366 msgid "" 8.15367 "If you write a style of your own, you can use it by either providing the path " 8.15368 "to your style file, or copying your style file into a location where " 8.15369 @@ -12472,12 +14492,12 @@ 8.15370 msgstr "" 8.15371 8.15372 #. type: Content of: <book><chapter><sect1><title> 8.15373 -#: ../en/ch10-template.xml:63 8.15374 +#: ../en/ch11-template.xml:63 8.15375 msgid "Commands that support styles and templates" 8.15376 msgstr "支持样式和模版的命令" 8.15377 8.15378 #. type: Content of: <book><chapter><sect1><para> 8.15379 -#: ../en/ch10-template.xml:65 8.15380 +#: ../en/ch11-template.xml:65 8.15381 msgid "" 8.15382 "All of Mercurial's <quote><literal>log</literal>-like</quote> commands let " 8.15383 "you use styles and templates: <command role=\"hg-cmd\">hg incoming</command>, " 8.15384 @@ -12486,21 +14506,21 @@ 8.15385 msgstr "" 8.15386 8.15387 #. type: Content of: <book><chapter><sect1><para> 8.15388 -#: ../en/ch10-template.xml:72 8.15389 +#: ../en/ch11-template.xml:72 8.15390 msgid "" 8.15391 "As I write this manual, these are so far the only commands that support " 8.15392 "styles and templates. Since these are the most important commands that need " 8.15393 -"customisable output, there has been little pressure from the Mercurial user " 8.15394 +"customizable output, there has been little pressure from the Mercurial user " 8.15395 "community to add style and template support to other commands." 8.15396 msgstr "" 8.15397 8.15398 #. type: Content of: <book><chapter><sect1><title> 8.15399 -#: ../en/ch10-template.xml:80 8.15400 +#: ../en/ch11-template.xml:80 8.15401 msgid "The basics of templating" 8.15402 msgstr "模版基础" 8.15403 8.15404 #. type: Content of: <book><chapter><sect1><para> 8.15405 -#: ../en/ch10-template.xml:82 8.15406 +#: ../en/ch11-template.xml:82 8.15407 msgid "" 8.15408 "At its simplest, a Mercurial template is a piece of text. Some of the text " 8.15409 "never changes, while other parts are <emphasis>expanded</emphasis>, or " 8.15410 @@ -12508,20 +14528,20 @@ 8.15411 msgstr "" 8.15412 8.15413 #. type: Content of: <book><chapter><sect1><para> 8.15414 -#: ../en/ch10-template.xml:87 8.15415 +#: ../en/ch11-template.xml:87 8.15416 msgid "" 8.15417 "Before we continue, let's look again at a simple example of Mercurial's " 8.15418 "normal output." 8.15419 msgstr "" 8.15420 8.15421 #. type: Content of: <book><chapter><sect1><para> 8.15422 -#: ../en/ch10-template.xml:92 8.15423 +#: ../en/ch11-template.xml:92 8.15424 msgid "" 8.15425 "Now, let's run the same command, but using a template to change its output." 8.15426 msgstr "" 8.15427 8.15428 #. type: Content of: <book><chapter><sect1><para> 8.15429 -#: ../en/ch10-template.xml:97 8.15430 +#: ../en/ch11-template.xml:97 8.15431 msgid "" 8.15432 "The example above illustrates the simplest possible template; it's just a " 8.15433 "piece of static text, printed once for each changeset. The <option role=\"hg-" 8.15434 @@ -12531,7 +14551,7 @@ 8.15435 msgstr "" 8.15436 8.15437 #. type: Content of: <book><chapter><sect1><para> 8.15438 -#: ../en/ch10-template.xml:105 8.15439 +#: ../en/ch11-template.xml:105 8.15440 msgid "" 8.15441 "Notice that the template string above ends with the text <quote><literal>\\n</" 8.15442 "literal></quote>. This is an <emphasis>escape sequence</emphasis>, telling " 8.15443 @@ -12541,14 +14561,14 @@ 8.15444 msgstr "" 8.15445 8.15446 #. type: Content of: <book><chapter><sect1><para> 8.15447 -#: ../en/ch10-template.xml:113 8.15448 +#: ../en/ch11-template.xml:113 8.15449 msgid "" 8.15450 "A template that prints a fixed string of text all the time isn't very useful; " 8.15451 "let's try something a bit more complex." 8.15452 msgstr "" 8.15453 8.15454 #. type: Content of: <book><chapter><sect1><para> 8.15455 -#: ../en/ch10-template.xml:119 8.15456 +#: ../en/ch11-template.xml:119 8.15457 msgid "" 8.15458 "As you can see, the string <quote><literal>{desc}</literal></quote> in the " 8.15459 "template has been replaced in the output with the description of each " 8.15460 @@ -12560,25 +14580,25 @@ 8.15461 msgstr "" 8.15462 8.15463 #. type: Content of: <book><chapter><sect1><title> 8.15464 -#: ../en/ch10-template.xml:131 8.15465 +#: ../en/ch11-template.xml:131 8.15466 msgid "Common template keywords" 8.15467 msgstr "模版关键字" 8.15468 8.15469 #. type: Content of: <book><chapter><sect1><para> 8.15470 -#: ../en/ch10-template.xml:133 8.15471 +#: ../en/ch11-template.xml:133 8.15472 msgid "" 8.15473 "You can start writing simple templates immediately using the keywords below." 8.15474 msgstr "" 8.15475 8.15476 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15477 -#: ../en/ch10-template.xml:137 8.15478 +#: ../en/ch11-template.xml:137 8.15479 msgid "" 8.15480 "<literal role=\"template-keyword\">author</literal>: String. The unmodified " 8.15481 "author of the changeset." 8.15482 msgstr "" 8.15483 8.15484 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15485 -#: ../en/ch10-template.xml:141 8.15486 +#: ../en/ch11-template.xml:141 8.15487 msgid "" 8.15488 "<literal role=\"template-keyword\">branches</literal>: String. The name of " 8.15489 "the branch on which the changeset was committed. Will be empty if the branch " 8.15490 @@ -12586,7 +14606,7 @@ 8.15491 msgstr "" 8.15492 8.15493 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15494 -#: ../en/ch10-template.xml:147 8.15495 +#: ../en/ch11-template.xml:147 8.15496 msgid "" 8.15497 "<literal role=\"template-keyword\">date</literal>: Date information. The " 8.15498 "date when the changeset was committed. This is <emphasis>not</emphasis> " 8.15499 @@ -12598,70 +14618,70 @@ 8.15500 msgstr "" 8.15501 8.15502 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15503 -#: ../en/ch10-template.xml:158 8.15504 +#: ../en/ch11-template.xml:158 8.15505 msgid "" 8.15506 "<literal role=\"template-keyword\">desc</literal>: String. The text of the " 8.15507 "changeset description." 8.15508 msgstr "" 8.15509 8.15510 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15511 -#: ../en/ch10-template.xml:161 8.15512 +#: ../en/ch11-template.xml:161 8.15513 msgid "" 8.15514 "<literal role=\"template-keyword\">files</literal>: List of strings. All " 8.15515 "files modified, added, or removed by this changeset." 8.15516 msgstr "" 8.15517 8.15518 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15519 -#: ../en/ch10-template.xml:166 8.15520 +#: ../en/ch11-template.xml:166 8.15521 msgid "" 8.15522 "<literal role=\"template-keyword\">file_adds</literal>: List of strings. " 8.15523 "Files added by this changeset." 8.15524 msgstr "" 8.15525 8.15526 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15527 -#: ../en/ch10-template.xml:170 8.15528 +#: ../en/ch11-template.xml:170 8.15529 msgid "" 8.15530 "<literal role=\"template-keyword\">file_dels</literal>: List of strings. " 8.15531 "Files removed by this changeset." 8.15532 msgstr "" 8.15533 8.15534 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15535 -#: ../en/ch10-template.xml:174 8.15536 +#: ../en/ch11-template.xml:174 8.15537 msgid "" 8.15538 "<literal role=\"template-keyword\">node</literal>: String. The changeset " 8.15539 "identification hash, as a 40-character hexadecimal string." 8.15540 msgstr "" 8.15541 8.15542 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15543 -#: ../en/ch10-template.xml:178 8.15544 +#: ../en/ch11-template.xml:178 8.15545 msgid "" 8.15546 "<literal role=\"template-keyword\">parents</literal>: List of strings. The " 8.15547 "parents of the changeset." 8.15548 msgstr "" 8.15549 8.15550 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15551 -#: ../en/ch10-template.xml:182 8.15552 +#: ../en/ch11-template.xml:182 8.15553 msgid "" 8.15554 "<literal role=\"template-keyword\">rev</literal>: Integer. The repository-" 8.15555 "local changeset revision number." 8.15556 msgstr "" 8.15557 8.15558 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15559 -#: ../en/ch10-template.xml:186 8.15560 +#: ../en/ch11-template.xml:186 8.15561 msgid "" 8.15562 "<literal role=\"template-keyword\">tags</literal>: List of strings. Any tags " 8.15563 "associated with the changeset." 8.15564 msgstr "" 8.15565 8.15566 #. type: Content of: <book><chapter><sect1><para> 8.15567 -#: ../en/ch10-template.xml:191 8.15568 +#: ../en/ch11-template.xml:192 8.15569 msgid "" 8.15570 "A few simple experiments will show us what to expect when we use these " 8.15571 "keywords; you can see the results below." 8.15572 msgstr "" 8.15573 8.15574 #. type: Content of: <book><chapter><sect1><para> 8.15575 -#: ../en/ch10-template.xml:196 8.15576 +#: ../en/ch11-template.xml:197 8.15577 msgid "" 8.15578 "As we noted above, the date keyword does not produce human-readable output, " 8.15579 "so we must treat it specially. This involves using a <emphasis>filter</" 8.15580 @@ -12669,12 +14689,12 @@ 8.15581 msgstr "" 8.15582 8.15583 #. type: Content of: <book><chapter><sect1><title> 8.15584 -#: ../en/ch10-template.xml:205 8.15585 +#: ../en/ch11-template.xml:206 8.15586 msgid "Escape sequences" 8.15587 msgstr "转义序列" 8.15588 8.15589 #. type: Content of: <book><chapter><sect1><para> 8.15590 -#: ../en/ch10-template.xml:207 8.15591 +#: ../en/ch11-template.xml:208 8.15592 msgid "" 8.15593 "Mercurial's templating engine recognises the most commonly used escape " 8.15594 "sequences in strings. When it sees a backslash (<quote><literal>\\</" 8.15595 @@ -12683,48 +14703,48 @@ 8.15596 msgstr "" 8.15597 8.15598 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15599 -#: ../en/ch10-template.xml:214 8.15600 +#: ../en/ch11-template.xml:215 8.15601 msgid "" 8.15602 "<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII " 8.15603 "134." 8.15604 msgstr "" 8.15605 8.15606 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15607 -#: ../en/ch10-template.xml:218 8.15608 +#: ../en/ch11-template.xml:219 8.15609 msgid "<literal>\\n</literal>: Newline, ASCII 12." 8.15610 msgstr "" 8.15611 8.15612 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15613 -#: ../en/ch10-template.xml:221 8.15614 +#: ../en/ch11-template.xml:222 8.15615 msgid "<literal>\\r</literal>: Carriage return, ASCII 15." 8.15616 msgstr "" 8.15617 8.15618 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15619 -#: ../en/ch10-template.xml:224 8.15620 +#: ../en/ch11-template.xml:225 8.15621 msgid "<literal>\\t</literal>: Tab, ASCII 11." 8.15622 msgstr "" 8.15623 8.15624 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15625 -#: ../en/ch10-template.xml:227 8.15626 +#: ../en/ch11-template.xml:228 8.15627 msgid "<literal>\\v</literal>: Vertical tab, ASCII 13." 8.15628 msgstr "" 8.15629 8.15630 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15631 -#: ../en/ch10-template.xml:230 8.15632 -msgid "" 8.15633 -"<literal>{</literal>: Open curly brace, <quote><literal>{</literal></quote>, " 8.15634 -"ASCII 173." 8.15635 +#: ../en/ch11-template.xml:231 8.15636 +msgid "" 8.15637 +"<literal>\\{</literal>: Open curly brace, <quote><literal>{</literal></" 8.15638 +"quote>, ASCII 173." 8.15639 msgstr "" 8.15640 8.15641 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15642 -#: ../en/ch10-template.xml:234 8.15643 -msgid "" 8.15644 -"<literal>}</literal>: Close curly brace, <quote><literal>}</literal></quote>, " 8.15645 -"ASCII 175." 8.15646 -msgstr "" 8.15647 - 8.15648 -#. type: Content of: <book><chapter><sect1><para> 8.15649 -#: ../en/ch10-template.xml:239 8.15650 +#: ../en/ch11-template.xml:235 8.15651 +msgid "" 8.15652 +"<literal>\\}</literal>: Close curly brace, <quote><literal>}</literal></" 8.15653 +"quote>, ASCII 175." 8.15654 +msgstr "" 8.15655 + 8.15656 +#. type: Content of: <book><chapter><sect1><para> 8.15657 +#: ../en/ch11-template.xml:240 8.15658 msgid "" 8.15659 "As indicated above, if you want the expansion of a template to contain a " 8.15660 "literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></" 8.15661 @@ -12732,12 +14752,12 @@ 8.15662 msgstr "" 8.15663 8.15664 #. type: Content of: <book><chapter><sect1><title> 8.15665 -#: ../en/ch10-template.xml:247 8.15666 +#: ../en/ch11-template.xml:248 8.15667 msgid "Filtering keywords to change their results" 8.15668 msgstr "通过过滤关键字来修改输出结果" 8.15669 8.15670 #. type: Content of: <book><chapter><sect1><para> 8.15671 -#: ../en/ch10-template.xml:249 8.15672 +#: ../en/ch11-template.xml:250 8.15673 msgid "" 8.15674 "Some of the results of template expansion are not immediately easy to use. " 8.15675 "Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> " 8.15676 @@ -12747,7 +14767,7 @@ 8.15677 msgstr "" 8.15678 8.15679 #. type: Content of: <book><chapter><sect1><para> 8.15680 -#: ../en/ch10-template.xml:256 8.15681 +#: ../en/ch11-template.xml:257 8.15682 msgid "" 8.15683 "Below is a list of the most commonly used filters that Mercurial supports. " 8.15684 "While some filters can be applied to any text, others can only be used in " 8.15685 @@ -12756,7 +14776,7 @@ 8.15686 msgstr "" 8.15687 8.15688 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15689 -#: ../en/ch10-template.xml:263 8.15690 +#: ../en/ch11-template.xml:264 8.15691 msgid "" 8.15692 "<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML " 8.15693 "<quote><literal><br/></literal></quote> tag before the end of every " 8.15694 @@ -12765,7 +14785,7 @@ 8.15695 msgstr "" 8.15696 8.15697 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15698 -#: ../en/ch10-template.xml:270 8.15699 +#: ../en/ch11-template.xml:271 8.15700 msgid "" 8.15701 "<literal role=\"template-kw-filt-date\">age</literal>: <literal role=" 8.15702 "\"template-keyword\">date</literal> keyword. Render the age of the date, " 8.15703 @@ -12774,7 +14794,7 @@ 8.15704 msgstr "" 8.15705 8.15706 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15707 -#: ../en/ch10-template.xml:277 8.15708 +#: ../en/ch11-template.xml:278 8.15709 msgid "" 8.15710 "<literal role=\"template-filter\">basename</literal>: Any text, but most " 8.15711 "useful for the <literal role=\"template-keyword\">files</literal> keyword and " 8.15712 @@ -12784,7 +14804,7 @@ 8.15713 msgstr "" 8.15714 8.15715 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15716 -#: ../en/ch10-template.xml:286 8.15717 +#: ../en/ch11-template.xml:287 8.15718 msgid "" 8.15719 "<literal role=\"template-kw-filt-date\">date</literal>: <literal role=" 8.15720 "\"template-keyword\">date</literal> keyword. Render a date in a similar " 8.15721 @@ -12794,7 +14814,7 @@ 8.15722 msgstr "" 8.15723 8.15724 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15725 -#: ../en/ch10-template.xml:294 8.15726 +#: ../en/ch11-template.xml:295 8.15727 msgid "" 8.15728 "<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but " 8.15729 "most useful for the <literal role=\"template-keyword\">author</literal> " 8.15730 @@ -12805,7 +14825,7 @@ 8.15731 msgstr "" 8.15732 8.15733 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15734 -#: ../en/ch10-template.xml:304 8.15735 +#: ../en/ch11-template.xml:305 8.15736 msgid "" 8.15737 "<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most " 8.15738 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 8.15739 @@ -12815,7 +14835,7 @@ 8.15740 msgstr "" 8.15741 8.15742 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15743 -#: ../en/ch10-template.xml:313 8.15744 +#: ../en/ch11-template.xml:314 8.15745 msgid "" 8.15746 "<literal role=\"template-filter\">escape</literal>: Any text. Replace the " 8.15747 "special XML/XHTML characters <quote><literal>&</literal></quote>, " 8.15748 @@ -12824,7 +14844,7 @@ 8.15749 msgstr "" 8.15750 8.15751 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15752 -#: ../en/ch10-template.xml:321 8.15753 +#: ../en/ch11-template.xml:322 8.15754 msgid "" 8.15755 "<literal role=\"template-filter\">fill68</literal>: Any text. Wrap the text " 8.15756 "to fit in 68 columns. This is useful before you pass text through the " 8.15757 @@ -12833,21 +14853,21 @@ 8.15758 msgstr "" 8.15759 8.15760 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15761 -#: ../en/ch10-template.xml:329 8.15762 +#: ../en/ch11-template.xml:330 8.15763 msgid "" 8.15764 "<literal role=\"template-filter\">fill76</literal>: Any text. Wrap the text " 8.15765 "to fit in 76 columns." 8.15766 msgstr "" 8.15767 8.15768 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15769 -#: ../en/ch10-template.xml:333 8.15770 +#: ../en/ch11-template.xml:334 8.15771 msgid "" 8.15772 "<literal role=\"template-filter\">firstline</literal>: Any text. Yield the " 8.15773 "first line of text, without any trailing newlines." 8.15774 msgstr "" 8.15775 8.15776 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15777 -#: ../en/ch10-template.xml:338 8.15778 +#: ../en/ch11-template.xml:339 8.15779 msgid "" 8.15780 "<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role=" 8.15781 "\"template-keyword\">date</literal> keyword. Render the date as a pair of " 8.15782 @@ -12856,7 +14876,7 @@ 8.15783 msgstr "" 8.15784 8.15785 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15786 -#: ../en/ch10-template.xml:345 8.15787 +#: ../en/ch11-template.xml:346 8.15788 msgid "" 8.15789 "<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role=" 8.15790 "\"template-keyword\">date</literal> keyword. Render the date as a text " 8.15791 @@ -12865,7 +14885,7 @@ 8.15792 msgstr "" 8.15793 8.15794 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15795 -#: ../en/ch10-template.xml:352 8.15796 +#: ../en/ch11-template.xml:353 8.15797 msgid "" 8.15798 "<literal role=\"template-filter\">obfuscate</literal>: Any text, but most " 8.15799 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 8.15800 @@ -12874,7 +14894,7 @@ 8.15801 msgstr "" 8.15802 8.15803 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15804 -#: ../en/ch10-template.xml:360 8.15805 +#: ../en/ch11-template.xml:361 8.15806 msgid "" 8.15807 "<literal role=\"template-kw-filt-author\">person</literal>: Any text, but " 8.15808 "most useful for the <literal role=\"template-keyword\">author</literal> " 8.15809 @@ -12884,7 +14904,7 @@ 8.15810 msgstr "" 8.15811 8.15812 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15813 -#: ../en/ch10-template.xml:369 8.15814 +#: ../en/ch11-template.xml:370 8.15815 msgid "" 8.15816 "<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role=" 8.15817 "\"template-keyword\">date</literal> keyword. Render a date using the same " 8.15818 @@ -12893,7 +14913,7 @@ 8.15819 msgstr "" 8.15820 8.15821 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15822 -#: ../en/ch10-template.xml:376 8.15823 +#: ../en/ch11-template.xml:377 8.15824 msgid "" 8.15825 "<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash. " 8.15826 "Yield the short form of a changeset hash, i.e. a 12-character hexadecimal " 8.15827 @@ -12901,7 +14921,7 @@ 8.15828 msgstr "" 8.15829 8.15830 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15831 -#: ../en/ch10-template.xml:381 8.15832 +#: ../en/ch11-template.xml:382 8.15833 msgid "" 8.15834 "<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role=" 8.15835 "\"template-keyword\">date</literal> keyword. Render the year, month, and day " 8.15836 @@ -12910,21 +14930,21 @@ 8.15837 msgstr "" 8.15838 8.15839 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15840 -#: ../en/ch10-template.xml:387 8.15841 +#: ../en/ch11-template.xml:388 8.15842 msgid "" 8.15843 "<literal role=\"template-filter\">strip</literal>: Any text. Strip all " 8.15844 "leading and trailing whitespace from the string." 8.15845 msgstr "" 8.15846 8.15847 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15848 -#: ../en/ch10-template.xml:391 8.15849 +#: ../en/ch11-template.xml:392 8.15850 msgid "" 8.15851 "<literal role=\"template-filter\">tabindent</literal>: Any text. Yield the " 8.15852 "text, with every line except the first starting with a tab character." 8.15853 msgstr "" 8.15854 8.15855 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15856 -#: ../en/ch10-template.xml:396 8.15857 +#: ../en/ch11-template.xml:397 8.15858 msgid "" 8.15859 "<literal role=\"template-filter\">urlescape</literal>: Any text. Escape all " 8.15860 "characters that are considered <quote>special</quote> by URL parsers. For " 8.15861 @@ -12932,7 +14952,7 @@ 8.15862 msgstr "" 8.15863 8.15864 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.15865 -#: ../en/ch10-template.xml:403 8.15866 +#: ../en/ch11-template.xml:404 8.15867 msgid "" 8.15868 "<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most " 8.15869 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 8.15870 @@ -12942,7 +14962,7 @@ 8.15871 msgstr "" 8.15872 8.15873 #. type: Content of: <book><chapter><sect1><note><para> 8.15874 -#: ../en/ch10-template.xml:416 8.15875 +#: ../en/ch11-template.xml:418 8.15876 msgid "" 8.15877 "If you try to apply a filter to a piece of data that it cannot process, " 8.15878 "Mercurial will fail and print a Python exception. For example, trying to run " 8.15879 @@ -12952,12 +14972,12 @@ 8.15880 msgstr "" 8.15881 8.15882 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15883 -#: ../en/ch10-template.xml:425 8.15884 +#: ../en/ch11-template.xml:427 8.15885 msgid "Combining filters" 8.15886 msgstr "组合过滤器" 8.15887 8.15888 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15889 -#: ../en/ch10-template.xml:427 8.15890 +#: ../en/ch11-template.xml:429 8.15891 msgid "" 8.15892 "It is easy to combine filters to yield output in the form you would like. " 8.15893 "The following chain of filters tidies up a description, then makes sure that " 8.15894 @@ -12967,7 +14987,7 @@ 8.15895 msgstr "" 8.15896 8.15897 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15898 -#: ../en/ch10-template.xml:436 8.15899 +#: ../en/ch11-template.xml:438 8.15900 msgid "" 8.15901 "Note the use of <quote><literal>\\t</literal></quote> (a tab character) in " 8.15902 "the template to force the first line to be indented; this is necessary since " 8.15903 @@ -12976,7 +14996,7 @@ 8.15904 msgstr "" 8.15905 8.15906 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15907 -#: ../en/ch10-template.xml:442 8.15908 +#: ../en/ch11-template.xml:444 8.15909 msgid "" 8.15910 "Keep in mind that the order of filters in a chain is significant. The first " 8.15911 "filter is applied to the result of the keyword; the second to the result of " 8.15912 @@ -12986,12 +15006,12 @@ 8.15913 msgstr "" 8.15914 8.15915 #. type: Content of: <book><chapter><sect1><title> 8.15916 -#: ../en/ch10-template.xml:453 8.15917 +#: ../en/ch11-template.xml:454 8.15918 msgid "From templates to styles" 8.15919 msgstr "从模版到样式" 8.15920 8.15921 #. type: Content of: <book><chapter><sect1><para> 8.15922 -#: ../en/ch10-template.xml:455 8.15923 +#: ../en/ch11-template.xml:456 8.15924 msgid "" 8.15925 "A command line template provides a quick and simple way to format some " 8.15926 "output. Templates can become verbose, though, and it's useful to be able to " 8.15927 @@ -13000,7 +15020,7 @@ 8.15928 msgstr "" 8.15929 8.15930 #. type: Content of: <book><chapter><sect1><para> 8.15931 -#: ../en/ch10-template.xml:460 8.15932 +#: ../en/ch11-template.xml:461 8.15933 msgid "" 8.15934 "More than that, using a style file unlocks the power of Mercurial's " 8.15935 "templating engine in ways that are not possible using the command line " 8.15936 @@ -13008,49 +15028,49 @@ 8.15937 msgstr "" 8.15938 8.15939 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15940 -#: ../en/ch10-template.xml:466 8.15941 +#: ../en/ch11-template.xml:467 8.15942 msgid "The simplest of style files" 8.15943 msgstr "最简单的样式文件" 8.15944 8.15945 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15946 -#: ../en/ch10-template.xml:468 8.15947 +#: ../en/ch11-template.xml:469 8.15948 msgid "Our simple style file contains just one line:" 8.15949 msgstr "" 8.15950 8.15951 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15952 -#: ../en/ch10-template.xml:472 8.15953 +#: ../en/ch11-template.xml:473 8.15954 msgid "" 8.15955 "This tells Mercurial, <quote>if you're printing a changeset, use the text on " 8.15956 "the right as the template</quote>." 8.15957 msgstr "" 8.15958 8.15959 #. type: Content of: <book><chapter><sect1><sect2><title> 8.15960 -#: ../en/ch10-template.xml:478 8.15961 +#: ../en/ch11-template.xml:479 8.15962 msgid "Style file syntax" 8.15963 msgstr "样式文件语法" 8.15964 8.15965 #. type: Content of: <book><chapter><sect1><sect2><para> 8.15966 -#: ../en/ch10-template.xml:480 8.15967 +#: ../en/ch11-template.xml:481 8.15968 msgid "The syntax rules for a style file are simple." 8.15969 msgstr "" 8.15970 8.15971 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15972 -#: ../en/ch10-template.xml:483 8.15973 +#: ../en/ch11-template.xml:484 8.15974 msgid "The file is processed one line at a time." 8.15975 msgstr "" 8.15976 8.15977 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15978 -#: ../en/ch10-template.xml:486 8.15979 +#: ../en/ch11-template.xml:487 8.15980 msgid "Leading and trailing white space are ignored." 8.15981 msgstr "" 8.15982 8.15983 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15984 -#: ../en/ch10-template.xml:489 8.15985 +#: ../en/ch11-template.xml:490 8.15986 msgid "Empty lines are skipped." 8.15987 msgstr "" 8.15988 8.15989 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15990 -#: ../en/ch10-template.xml:491 8.15991 +#: ../en/ch11-template.xml:492 8.15992 msgid "" 8.15993 "If a line starts with either of the characters <quote><literal>#</literal></" 8.15994 "quote> or <quote><literal>;</literal></quote>, the entire line is treated as " 8.15995 @@ -13058,7 +15078,7 @@ 8.15996 msgstr "" 8.15997 8.15998 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.15999 -#: ../en/ch10-template.xml:496 8.16000 +#: ../en/ch11-template.xml:497 8.16001 msgid "" 8.16002 "A line starts with a keyword. This must start with an alphabetic character " 8.16003 "or underscore, and can subsequently contain any alphanumeric character or " 8.16004 @@ -13067,21 +15087,21 @@ 8.16005 msgstr "" 8.16006 8.16007 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16008 -#: ../en/ch10-template.xml:502 8.16009 +#: ../en/ch11-template.xml:503 8.16010 msgid "" 8.16011 "The next element must be an <quote><literal>=</literal></quote> character, " 8.16012 "which can be preceded or followed by an arbitrary amount of white space." 8.16013 msgstr "" 8.16014 8.16015 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16016 -#: ../en/ch10-template.xml:507 8.16017 +#: ../en/ch11-template.xml:508 8.16018 msgid "" 8.16019 "If the rest of the line starts and ends with matching quote characters " 8.16020 "(either single or double quote), it is treated as a template body." 8.16021 msgstr "" 8.16022 8.16023 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16024 -#: ../en/ch10-template.xml:511 8.16025 +#: ../en/ch11-template.xml:512 8.16026 msgid "" 8.16027 "If the rest of the line <emphasis>does not</emphasis> start with a quote " 8.16028 "character, it is treated as the name of a file; the contents of this file " 8.16029 @@ -13089,12 +15109,12 @@ 8.16030 msgstr "" 8.16031 8.16032 #. type: Content of: <book><chapter><sect1><title> 8.16033 -#: ../en/ch10-template.xml:520 8.16034 +#: ../en/ch11-template.xml:521 8.16035 msgid "Style files by example" 8.16036 msgstr "样式文件例子" 8.16037 8.16038 #. type: Content of: <book><chapter><sect1><para> 8.16039 -#: ../en/ch10-template.xml:522 8.16040 +#: ../en/ch11-template.xml:523 8.16041 msgid "" 8.16042 "To illustrate how to write a style file, we will construct a few by example. " 8.16043 "Rather than provide a complete style file and walk through it, we'll mirror " 8.16044 @@ -13103,12 +15123,12 @@ 8.16045 msgstr "" 8.16046 8.16047 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16048 -#: ../en/ch10-template.xml:529 8.16049 +#: ../en/ch11-template.xml:530 8.16050 msgid "Identifying mistakes in style files" 8.16051 msgstr "在样式文件中定位错误" 8.16052 8.16053 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16054 -#: ../en/ch10-template.xml:531 8.16055 +#: ../en/ch11-template.xml:532 8.16056 msgid "" 8.16057 "If Mercurial encounters a problem in a style file you are working on, it " 8.16058 "prints a terse error message that, once you figure out what it means, is " 8.16059 @@ -13116,7 +15136,7 @@ 8.16060 msgstr "" 8.16061 8.16062 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16063 -#: ../en/ch10-template.xml:537 8.16064 +#: ../en/ch11-template.xml:538 8.16065 msgid "" 8.16066 "Notice that <filename>broken.style</filename> attempts to define a " 8.16067 "<literal>changeset</literal> keyword, but forgets to give any content for it. " 8.16068 @@ -13124,35 +15144,35 @@ 8.16069 msgstr "" 8.16070 8.16071 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16072 -#: ../en/ch10-template.xml:544 8.16073 +#: ../en/ch11-template.xml:545 8.16074 msgid "This error message looks intimidating, but it is not too hard to follow." 8.16075 msgstr "" 8.16076 8.16077 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16078 -#: ../en/ch10-template.xml:548 8.16079 +#: ../en/ch11-template.xml:549 8.16080 msgid "" 8.16081 "The first component is simply Mercurial's way of saying <quote>I am giving " 8.16082 "up</quote>." 8.16083 msgstr "" 8.16084 8.16085 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16086 -#: ../en/ch10-template.xml:552 8.16087 +#: ../en/ch11-template.xml:553 8.16088 msgid "Next comes the name of the style file that contains the error." 8.16089 msgstr "" 8.16090 8.16091 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16092 -#: ../en/ch10-template.xml:556 8.16093 +#: ../en/ch11-template.xml:557 8.16094 msgid "" 8.16095 "Following the file name is the line number where the error was encountered." 8.16096 msgstr "" 8.16097 8.16098 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16099 -#: ../en/ch10-template.xml:560 8.16100 +#: ../en/ch11-template.xml:561 8.16101 msgid "Finally, a description of what went wrong." 8.16102 msgstr "" 8.16103 8.16104 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16105 -#: ../en/ch10-template.xml:564 8.16106 +#: ../en/ch11-template.xml:565 8.16107 msgid "" 8.16108 "The description of the problem is not always clear (as in this case), but " 8.16109 "even when it is cryptic, it is almost always trivial to visually inspect the " 8.16110 @@ -13160,12 +15180,12 @@ 8.16111 msgstr "" 8.16112 8.16113 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16114 -#: ../en/ch10-template.xml:572 8.16115 +#: ../en/ch11-template.xml:574 8.16116 msgid "Uniquely identifying a repository" 8.16117 msgstr "版本库的唯一标识" 8.16118 8.16119 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16120 -#: ../en/ch10-template.xml:574 8.16121 +#: ../en/ch11-template.xml:576 8.16122 msgid "" 8.16123 "If you would like to be able to identify a Mercurial repository <quote>fairly " 8.16124 "uniquely</quote> using a short string as an identifier, you can use the first " 8.16125 @@ -13173,21 +15193,21 @@ 8.16126 msgstr "" 8.16127 8.16128 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16129 -#: ../en/ch10-template.xml:581 8.16130 -msgid "" 8.16131 -"This is not guaranteed to be unique, but it is nevertheless useful in many " 8.16132 -"cases." 8.16133 +#: ../en/ch11-template.xml:583 8.16134 +msgid "" 8.16135 +"This is likely to be unique, and so it is useful in many cases. There are a " 8.16136 +"few caveats." 8.16137 msgstr "" 8.16138 8.16139 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16140 -#: ../en/ch10-template.xml:584 8.16141 +#: ../en/ch11-template.xml:586 8.16142 msgid "" 8.16143 "It will not work in a completely empty repository, because such a repository " 8.16144 "does not have a revision zero." 8.16145 msgstr "" 8.16146 8.16147 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16148 -#: ../en/ch10-template.xml:588 8.16149 +#: ../en/ch11-template.xml:590 8.16150 msgid "" 8.16151 "Neither will it work in the (extremely rare) case where a repository is a " 8.16152 "merge of two or more formerly independent repositories, and you still have " 8.16153 @@ -13195,18 +15215,18 @@ 8.16154 msgstr "" 8.16155 8.16156 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16157 -#: ../en/ch10-template.xml:593 8.16158 +#: ../en/ch11-template.xml:595 8.16159 msgid "Here are some uses to which you could put this identifier:" 8.16160 msgstr "" 8.16161 8.16162 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16163 -#: ../en/ch10-template.xml:596 8.16164 +#: ../en/ch11-template.xml:598 8.16165 msgid "" 8.16166 "As a key into a table for a database that manages repositories on a server." 8.16167 msgstr "" 8.16168 8.16169 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16170 -#: ../en/ch10-template.xml:599 8.16171 +#: ../en/ch11-template.xml:601 8.16172 msgid "" 8.16173 "As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</" 8.16174 "emphasis>} tuple. Save this information away when you run an automated build " 8.16175 @@ -13215,13 +15235,25 @@ 8.16176 msgstr "" 8.16177 8.16178 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16179 -#: ../en/ch10-template.xml:608 8.16180 +#: ../en/ch11-template.xml:611 8.16181 +msgid "Listing files on multiple lines" 8.16182 +msgstr "每行列出一个文件" 8.16183 + 8.16184 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.16185 +#: ../en/ch11-template.xml:613 8.16186 +msgid "" 8.16187 +"Suppose we want to list the files changed by a changeset, one per line, with " 8.16188 +"a little indentation before each file name." 8.16189 +msgstr "" 8.16190 + 8.16191 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.16192 +#: ../en/ch11-template.xml:621 8.16193 msgid "Mimicking Subversion's output" 8.16194 msgstr "模仿 Subversion 的输出" 8.16195 8.16196 # 8.16197 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16198 -#: ../en/ch10-template.xml:610 8.16199 +#: ../en/ch11-template.xml:623 8.16200 msgid "" 8.16201 "Let's try to emulate the default output format used by another revision " 8.16202 "control tool, Subversion." 8.16203 @@ -13229,7 +15261,7 @@ 8.16204 8.16205 # 8.16206 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16207 -#: ../en/ch10-template.xml:615 8.16208 +#: ../en/ch11-template.xml:628 8.16209 msgid "" 8.16210 "Since Subversion's output style is fairly simple, it is easy to copy-and-" 8.16211 "paste a hunk of its output into a file, and replace the text produced above " 8.16212 @@ -13237,14 +15269,14 @@ 8.16213 msgstr "" 8.16214 8.16215 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16216 -#: ../en/ch10-template.xml:622 8.16217 +#: ../en/ch11-template.xml:635 8.16218 msgid "" 8.16219 "There are a few small ways in which this template deviates from the output " 8.16220 "produced by Subversion." 8.16221 msgstr "" 8.16222 8.16223 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16224 -#: ../en/ch10-template.xml:625 8.16225 +#: ../en/ch11-template.xml:638 8.16226 msgid "" 8.16227 "Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 " 8.16228 "Sep 2006</literal></quote> in the example output above) in parentheses. " 8.16229 @@ -13253,7 +15285,7 @@ 8.16230 msgstr "" 8.16231 8.16232 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16233 -#: ../en/ch10-template.xml:632 8.16234 +#: ../en/ch11-template.xml:645 8.16235 msgid "" 8.16236 "We emulate Subversion's printing of <quote>separator</quote> lines full of " 8.16237 "<quote><literal>-</literal></quote> characters by ending the template with " 8.16238 @@ -13263,7 +15295,7 @@ 8.16239 msgstr "" 8.16240 8.16241 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16242 -#: ../en/ch10-template.xml:641 8.16243 +#: ../en/ch11-template.xml:654 8.16244 msgid "" 8.16245 "Subversion's output includes a count in the header of the number of lines in " 8.16246 "the commit message. We cannot replicate this in Mercurial; the templating " 8.16247 @@ -13273,7 +15305,7 @@ 8.16248 8.16249 # 8.16250 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16251 -#: ../en/ch10-template.xml:647 8.16252 +#: ../en/ch11-template.xml:660 8.16253 msgid "" 8.16254 "It took me no more than a minute or two of work to replace literal text from " 8.16255 "an example of Subversion's output with some keywords and filters to give the " 8.16256 @@ -13281,7 +15313,7 @@ 8.16257 msgstr "" 8.16258 8.16259 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16260 -#: ../en/ch10-template.xml:654 8.16261 +#: ../en/ch11-template.xml:667 8.16262 msgid "" 8.16263 "We could have included the text of the template file directly in the style " 8.16264 "file by enclosing it in quotes and replacing the newlines with " 8.16265 @@ -13294,17 +15326,17 @@ 8.16266 msgstr "" 8.16267 8.16268 #. type: Content of: <book><chapter><title> 8.16269 -#: ../en/ch11-mq.xml:5 8.16270 +#: ../en/ch12-mq.xml:5 8.16271 msgid "Managing change with Mercurial Queues" 8.16272 msgstr "使用 MQ 管理修改" 8.16273 8.16274 #. type: Content of: <book><chapter><sect1><title> 8.16275 -#: ../en/ch11-mq.xml:8 8.16276 +#: ../en/ch12-mq.xml:8 8.16277 msgid "The patch management problem" 8.16278 msgstr "补丁的管理问题" 8.16279 8.16280 #. type: Content of: <book><chapter><sect1><para> 8.16281 -#: ../en/ch11-mq.xml:10 8.16282 +#: ../en/ch12-mq.xml:10 8.16283 msgid "" 8.16284 "Here is a common scenario: you need to install a software package from " 8.16285 "source, but you find a bug that you must fix in the source before you can " 8.16286 @@ -13316,7 +15348,7 @@ 8.16287 msgstr "" 8.16288 8.16289 #. type: Content of: <book><chapter><sect1><para> 8.16290 -#: ../en/ch11-mq.xml:20 8.16291 +#: ../en/ch12-mq.xml:20 8.16292 msgid "" 8.16293 "This is a simple case of the <quote>patch management</quote> problem. You " 8.16294 "have an <quote>upstream</quote> source tree that you can't change; you need " 8.16295 @@ -13326,7 +15358,7 @@ 8.16296 msgstr "" 8.16297 8.16298 #. type: Content of: <book><chapter><sect1><para> 8.16299 -#: ../en/ch11-mq.xml:27 8.16300 +#: ../en/ch12-mq.xml:27 8.16301 msgid "" 8.16302 "The patch management problem arises in many situations. Probably the most " 8.16303 "visible is that a user of an open source software project will contribute a " 8.16304 @@ -13334,7 +15366,7 @@ 8.16305 msgstr "" 8.16306 8.16307 #. type: Content of: <book><chapter><sect1><para> 8.16308 -#: ../en/ch11-mq.xml:32 8.16309 +#: ../en/ch12-mq.xml:32 8.16310 msgid "" 8.16311 "Distributors of operating systems that include open source software often " 8.16312 "need to make changes to the packages they distribute so that they will build " 8.16313 @@ -13342,7 +15374,7 @@ 8.16314 msgstr "" 8.16315 8.16316 #. type: Content of: <book><chapter><sect1><para> 8.16317 -#: ../en/ch11-mq.xml:37 8.16318 +#: ../en/ch12-mq.xml:37 8.16319 msgid "" 8.16320 "When you have few changes to maintain, it is easy to manage a single patch " 8.16321 "using the standard <command>diff</command> and <command>patch</command> " 8.16322 @@ -13359,7 +15391,7 @@ 8.16323 msgstr "" 8.16324 8.16325 #. type: Content of: <book><chapter><sect1><para> 8.16326 -#: ../en/ch11-mq.xml:52 8.16327 +#: ../en/ch12-mq.xml:52 8.16328 msgid "" 8.16329 "Maintaining a single patch against an upstream tree is a little tedious and " 8.16330 "error-prone, but not difficult. However, the complexity of the problem grows " 8.16331 @@ -13369,7 +15401,7 @@ 8.16332 msgstr "" 8.16333 8.16334 #. type: Content of: <book><chapter><sect1><para> 8.16335 -#: ../en/ch11-mq.xml:59 8.16336 +#: ../en/ch12-mq.xml:59 8.16337 msgid "" 8.16338 "Fortunately, Mercurial includes a powerful extension, Mercurial Queues (or " 8.16339 "simply <quote>MQ</quote>), that massively simplifies the patch management " 8.16340 @@ -13377,21 +15409,21 @@ 8.16341 msgstr "" 8.16342 8.16343 #. type: Content of: <book><chapter><sect1><title> 8.16344 -#: ../en/ch11-mq.xml:65 8.16345 +#: ../en/ch12-mq.xml:65 8.16346 msgid "The prehistory of Mercurial Queues" 8.16347 msgstr "MQ 的历史" 8.16348 8.16349 #. type: Content of: <book><chapter><sect1><para> 8.16350 -#: ../en/ch11-mq.xml:67 8.16351 +#: ../en/ch12-mq.xml:67 8.16352 msgid "" 8.16353 "During the late 1990s, several Linux kernel developers started to maintain " 8.16354 -"<quote>patch series</quote> that modified the behaviour of the Linux kernel. " 8.16355 +"<quote>patch series</quote> that modified the behavior of the Linux kernel. " 8.16356 "Some of these series were focused on stability, some on feature coverage, and " 8.16357 "others were more speculative." 8.16358 msgstr "" 8.16359 8.16360 #. type: Content of: <book><chapter><sect1><para> 8.16361 -#: ../en/ch11-mq.xml:73 8.16362 +#: ../en/ch12-mq.xml:73 8.16363 msgid "" 8.16364 "The sizes of these patch series grew rapidly. In 2002, Andrew Morton " 8.16365 "published some shell scripts he had been using to automate the task of " 8.16366 @@ -13400,12 +15432,12 @@ 8.16367 msgstr "" 8.16368 8.16369 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16370 -#: ../en/ch11-mq.xml:80 8.16371 +#: ../en/ch12-mq.xml:80 8.16372 msgid "A patchwork quilt" 8.16373 msgstr "" 8.16374 8.16375 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16376 -#: ../en/ch11-mq.xml:82 8.16377 +#: ../en/ch12-mq.xml:82 8.16378 msgid "" 8.16379 "In early 2003, Andreas Gruenbacher and Martin Quinson borrowed the approach " 8.16380 "of Andrew's scripts and published a tool called <quote>patchwork quilt</" 8.16381 @@ -13416,7 +15448,7 @@ 8.16382 msgstr "" 8.16383 8.16384 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16385 -#: ../en/ch11-mq.xml:91 8.16386 +#: ../en/ch12-mq.xml:91 8.16387 msgid "" 8.16388 "Quilt manages a <emphasis>stack of patches</emphasis> on top of a directory " 8.16389 "tree. To begin, you tell quilt to manage a directory tree, and tell it which " 8.16390 @@ -13426,7 +15458,7 @@ 8.16391 msgstr "" 8.16392 8.16393 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16394 -#: ../en/ch11-mq.xml:99 8.16395 +#: ../en/ch12-mq.xml:99 8.16396 msgid "" 8.16397 "The refresh step causes quilt to scan the directory tree; it updates the " 8.16398 "patch with all of the changes you have made. You can create another patch on " 8.16399 @@ -13436,7 +15468,7 @@ 8.16400 msgstr "" 8.16401 8.16402 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16403 -#: ../en/ch11-mq.xml:106 8.16404 +#: ../en/ch12-mq.xml:106 8.16405 msgid "" 8.16406 "You can <emphasis>change</emphasis> which patches are applied to the tree. " 8.16407 "If you <quote>pop</quote> a patch, the changes made by that patch will vanish " 8.16408 @@ -13450,27 +15482,26 @@ 8.16409 msgstr "" 8.16410 8.16411 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16412 -#: ../en/ch11-mq.xml:118 8.16413 +#: ../en/ch12-mq.xml:118 8.16414 msgid "" 8.16415 "Quilt knows nothing about revision control tools, so it works equally well on " 8.16416 "top of an unpacked tarball or a Subversion working copy." 8.16417 msgstr "" 8.16418 8.16419 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16420 -#: ../en/ch11-mq.xml:124 8.16421 +#: ../en/ch12-mq.xml:124 8.16422 msgid "From patchwork quilt to Mercurial Queues" 8.16423 msgstr "从 patchwork quilt 到 MQ" 8.16424 8.16425 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16426 -#: ../en/ch11-mq.xml:126 8.16427 +#: ../en/ch12-mq.xml:126 8.16428 msgid "" 8.16429 "In mid-2005, Chris Mason took the features of quilt and wrote an extension " 8.16430 -"that he called Mercurial Queues, which added quilt-like behaviour to " 8.16431 -"Mercurial." 8.16432 -msgstr "" 8.16433 - 8.16434 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.16435 -#: ../en/ch11-mq.xml:130 8.16436 +"that he called Mercurial Queues, which added quilt-like behavior to Mercurial." 8.16437 +msgstr "" 8.16438 + 8.16439 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.16440 +#: ../en/ch12-mq.xml:130 8.16441 msgid "" 8.16442 "The key difference between quilt and MQ is that quilt knows nothing about " 8.16443 "revision control systems, while MQ is <emphasis>integrated</emphasis> into " 8.16444 @@ -13479,7 +15510,7 @@ 8.16445 msgstr "" 8.16446 8.16447 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16448 -#: ../en/ch11-mq.xml:136 8.16449 +#: ../en/ch12-mq.xml:136 8.16450 msgid "" 8.16451 "Because quilt does not care about revision control tools, it is still a " 8.16452 "tremendously useful piece of software to know about for situations where you " 8.16453 @@ -13487,19 +15518,19 @@ 8.16454 msgstr "" 8.16455 8.16456 #. type: Content of: <book><chapter><sect1><title> 8.16457 -#: ../en/ch11-mq.xml:144 8.16458 +#: ../en/ch12-mq.xml:144 8.16459 msgid "The huge advantage of MQ" 8.16460 msgstr "MQ 的巨大优势" 8.16461 8.16462 #. type: Content of: <book><chapter><sect1><para> 8.16463 -#: ../en/ch11-mq.xml:146 8.16464 +#: ../en/ch12-mq.xml:146 8.16465 msgid "" 8.16466 "I cannot overstate the value that MQ offers through the unification of " 8.16467 "patches and revision control." 8.16468 msgstr "" 8.16469 8.16470 #. type: Content of: <book><chapter><sect1><para> 8.16471 -#: ../en/ch11-mq.xml:149 8.16472 +#: ../en/ch12-mq.xml:149 8.16473 msgid "" 8.16474 "A major reason that patches have persisted in the free software and open " 8.16475 "source world&emdash;in spite of the availability of increasingly capable " 8.16476 @@ -13508,7 +15539,7 @@ 8.16477 msgstr "" 8.16478 8.16479 #. type: Content of: <book><chapter><sect1><para> 8.16480 -#: ../en/ch11-mq.xml:155 8.16481 +#: ../en/ch12-mq.xml:155 8.16482 msgid "" 8.16483 "Traditional revision control tools make a permanent, irreversible record of " 8.16484 "everything that you do. While this has great value, it's also somewhat " 8.16485 @@ -13519,7 +15550,7 @@ 8.16486 msgstr "" 8.16487 8.16488 #. type: Content of: <book><chapter><sect1><para> 8.16489 -#: ../en/ch11-mq.xml:163 8.16490 +#: ../en/ch12-mq.xml:163 8.16491 msgid "" 8.16492 "By contrast, MQ's marriage of distributed revision control with patches makes " 8.16493 "it much easier to isolate your work. Your patches live on top of normal " 8.16494 @@ -13530,7 +15561,7 @@ 8.16495 msgstr "" 8.16496 8.16497 #. type: Content of: <book><chapter><sect1><para> 8.16498 -#: ../en/ch11-mq.xml:171 8.16499 +#: ../en/ch12-mq.xml:171 8.16500 msgid "" 8.16501 "As an example, the integration of patches with revision control makes " 8.16502 "understanding patches and debugging their effects&emdash;and their interplay " 8.16503 @@ -13545,14 +15576,14 @@ 8.16504 msgstr "" 8.16505 8.16506 #. type: Content of: <book><chapter><sect1><para> 8.16507 -#: ../en/ch11-mq.xml:189 8.16508 +#: ../en/ch12-mq.xml:189 8.16509 msgid "" 8.16510 "Because MQ doesn't hide its patch-oriented nature, it is helpful to " 8.16511 "understand what patches are, and a little about the tools that work with them." 8.16512 msgstr "" 8.16513 8.16514 #. type: Content of: <book><chapter><sect1><para> 8.16515 -#: ../en/ch11-mq.xml:193 8.16516 +#: ../en/ch12-mq.xml:193 8.16517 msgid "" 8.16518 "The traditional Unix <command>diff</command> command compares two files, and " 8.16519 "prints a list of differences between them. The <command>patch</command> " 8.16520 @@ -13562,7 +15593,7 @@ 8.16521 msgstr "" 8.16522 8.16523 #. type: Content of: <book><chapter><sect1><para> 8.16524 -#: ../en/ch11-mq.xml:202 8.16525 +#: ../en/ch12-mq.xml:202 8.16526 msgid "" 8.16527 "The type of file that <command>diff</command> generates (and <command>patch</" 8.16528 "command> takes as input) is called a <quote>patch</quote> or a <quote>diff</" 8.16529 @@ -13571,7 +15602,7 @@ 8.16530 msgstr "" 8.16531 8.16532 #. type: Content of: <book><chapter><sect1><para> 8.16533 -#: ../en/ch11-mq.xml:208 8.16534 +#: ../en/ch12-mq.xml:208 8.16535 msgid "" 8.16536 "A patch file can start with arbitrary text; the <command>patch</command> " 8.16537 "command ignores this text, but MQ uses it as the commit message when creating " 8.16538 @@ -13581,7 +15612,7 @@ 8.16539 msgstr "" 8.16540 8.16541 #. type: Content of: <book><chapter><sect1><para> 8.16542 -#: ../en/ch11-mq.xml:215 8.16543 +#: ../en/ch12-mq.xml:215 8.16544 msgid "" 8.16545 "MQ works with <emphasis>unified</emphasis> diffs (<command>patch</command> " 8.16546 "can accept several other diff formats, but MQ doesn't). A unified diff " 8.16547 @@ -13592,7 +15623,7 @@ 8.16548 msgstr "" 8.16549 8.16550 #. type: Content of: <book><chapter><sect1><para> 8.16551 -#: ../en/ch11-mq.xml:223 8.16552 +#: ../en/ch12-mq.xml:223 8.16553 msgid "" 8.16554 "After the file header comes a series of <emphasis>hunks</emphasis>. Each " 8.16555 "hunk starts with a header; this identifies the range of line numbers within " 8.16556 @@ -13605,7 +15636,7 @@ 8.16557 msgstr "" 8.16558 8.16559 #. type: Content of: <book><chapter><sect1><para> 8.16560 -#: ../en/ch11-mq.xml:235 8.16561 +#: ../en/ch12-mq.xml:235 8.16562 msgid "" 8.16563 "Each line of context begins with a space character. Within the hunk, a line " 8.16564 "that begins with <quote><literal>-</literal></quote> means <quote>remove this " 8.16565 @@ -13615,7 +15646,7 @@ 8.16566 msgstr "" 8.16567 8.16568 #. type: Content of: <book><chapter><sect1><para> 8.16569 -#: ../en/ch11-mq.xml:243 8.16570 +#: ../en/ch12-mq.xml:243 8.16571 msgid "" 8.16572 "We will return to some of the more subtle aspects of patches later (in <xref " 8.16573 "linkend=\"sec:mq:adv-patch\"/>), but you should have enough information now " 8.16574 @@ -13623,12 +15654,12 @@ 8.16575 msgstr "" 8.16576 8.16577 #. type: Content of: <book><chapter><sect1><title> 8.16578 -#: ../en/ch11-mq.xml:250 8.16579 +#: ../en/ch12-mq.xml:250 8.16580 msgid "Getting started with Mercurial Queues" 8.16581 msgstr "开始使用 MQ" 8.16582 8.16583 #. type: Content of: <book><chapter><sect1><para> 8.16584 -#: ../en/ch11-mq.xml:252 8.16585 +#: ../en/ch12-mq.xml:252 8.16586 msgid "" 8.16587 "Because MQ is implemented as an extension, you must explicitly enable before " 8.16588 "you can use it. (You don't need to download anything; MQ ships with the " 8.16589 @@ -13637,7 +15668,7 @@ 8.16590 msgstr "" 8.16591 8.16592 #. type: Content of: <book><chapter><sect1><para> 8.16593 -#: ../en/ch11-mq.xml:262 8.16594 +#: ../en/ch12-mq.xml:262 8.16595 msgid "" 8.16596 "Once the extension is enabled, it will make a number of new commands " 8.16597 "available. To verify that the extension is working, you can use <command " 8.16598 @@ -13646,7 +15677,7 @@ 8.16599 msgstr "" 8.16600 8.16601 #. type: Content of: <book><chapter><sect1><para> 8.16602 -#: ../en/ch11-mq.xml:270 8.16603 +#: ../en/ch12-mq.xml:270 8.16604 msgid "" 8.16605 "You can use MQ with <emphasis>any</emphasis> Mercurial repository, and its " 8.16606 "commands only operate within that repository. To get started, simply prepare " 8.16607 @@ -13654,7 +15685,7 @@ 8.16608 msgstr "" 8.16609 8.16610 #. type: Content of: <book><chapter><sect1><para> 8.16611 -#: ../en/ch11-mq.xml:277 8.16612 +#: ../en/ch12-mq.xml:277 8.16613 msgid "" 8.16614 "This command creates an empty directory called <filename role=\"special\" " 8.16615 "class=\"directory\">.hg/patches</filename>, where MQ will keep its metadata. " 8.16616 @@ -13663,12 +15694,12 @@ 8.16617 msgstr "" 8.16618 8.16619 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16620 -#: ../en/ch11-mq.xml:284 8.16621 +#: ../en/ch12-mq.xml:284 8.16622 msgid "Creating a new patch" 8.16623 msgstr "创建新补丁" 8.16624 8.16625 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16626 -#: ../en/ch11-mq.xml:286 8.16627 +#: ../en/ch12-mq.xml:286 8.16628 msgid "" 8.16629 "To begin work on a new patch, use the <command role=\"hg-ext-mq\">qnew</" 8.16630 "command> command. This command takes one argument, the name of the patch to " 8.16631 @@ -13676,14 +15707,14 @@ 8.16632 msgstr "" 8.16633 8.16634 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16635 -#: ../en/ch11-mq.xml:290 8.16636 +#: ../en/ch12-mq.xml:290 8.16637 msgid "" 8.16638 "MQ will use this as the name of an actual file in the <filename role=\"special" 8.16639 "\" class=\"directory\">.hg/patches</filename> directory, as you can see below." 8.16640 msgstr "" 8.16641 8.16642 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16643 -#: ../en/ch11-mq.xml:297 8.16644 +#: ../en/ch12-mq.xml:297 8.16645 msgid "" 8.16646 "Also newly present in the <filename role=\"special\" class=\"directory\">.hg/" 8.16647 "patches</filename> directory are two other files, <filename role=\"special" 8.16648 @@ -13696,7 +15727,7 @@ 8.16649 msgstr "" 8.16650 8.16651 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.16652 -#: ../en/ch11-mq.xml:309 8.16653 +#: ../en/ch12-mq.xml:309 8.16654 msgid "" 8.16655 "You may sometimes want to edit the <filename role=\"special\">series</" 8.16656 "filename> file by hand; for example, to change the sequence in which some " 8.16657 @@ -13706,7 +15737,7 @@ 8.16658 msgstr "" 8.16659 8.16660 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16661 -#: ../en/ch11-mq.xml:318 8.16662 +#: ../en/ch12-mq.xml:318 8.16663 msgid "" 8.16664 "Once you have created your new patch, you can edit files in the working " 8.16665 "directory as you usually would. All of the normal Mercurial commands, such " 8.16666 @@ -13715,12 +15746,12 @@ 8.16667 msgstr "" 8.16668 8.16669 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16670 -#: ../en/ch11-mq.xml:326 8.16671 +#: ../en/ch12-mq.xml:326 8.16672 msgid "Refreshing a patch" 8.16673 msgstr "刷新补丁" 8.16674 8.16675 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16676 -#: ../en/ch11-mq.xml:328 8.16677 +#: ../en/ch12-mq.xml:328 8.16678 msgid "" 8.16679 "When you reach a point where you want to save your work, use the <command " 8.16680 "role=\"hg-ext-mq\">qrefresh</command> command to update the patch you are " 8.16681 @@ -13728,14 +15759,14 @@ 8.16682 msgstr "" 8.16683 8.16684 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16685 -#: ../en/ch11-mq.xml:334 8.16686 +#: ../en/ch12-mq.xml:334 8.16687 msgid "" 8.16688 "This command folds the changes you have made in the working directory into " 8.16689 "your patch, and updates its corresponding changeset to contain those changes." 8.16690 msgstr "" 8.16691 8.16692 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16693 -#: ../en/ch11-mq.xml:338 8.16694 +#: ../en/ch12-mq.xml:338 8.16695 msgid "" 8.16696 "You can run <command role=\"hg-ext-mq\">qrefresh</command> as often as you " 8.16697 "like, so it's a good way to <quote>checkpoint</quote> your work. Refresh " 8.16698 @@ -13745,12 +15776,12 @@ 8.16699 msgstr "" 8.16700 8.16701 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16702 -#: ../en/ch11-mq.xml:349 8.16703 +#: ../en/ch12-mq.xml:349 8.16704 msgid "Stacking and tracking patches" 8.16705 msgstr "堆叠和跟踪补丁" 8.16706 8.16707 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16708 -#: ../en/ch11-mq.xml:351 8.16709 +#: ../en/ch12-mq.xml:351 8.16710 msgid "" 8.16711 "Once you have finished working on a patch, or need to work on another, you " 8.16712 "can use the <command role=\"hg-ext-mq\">qnew</command> command again to " 8.16713 @@ -13759,7 +15790,7 @@ 8.16714 msgstr "" 8.16715 8.16716 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16717 -#: ../en/ch11-mq.xml:358 8.16718 +#: ../en/ch12-mq.xml:359 8.16719 msgid "" 8.16720 "Notice that the patch contains the changes in our prior patch as part of its " 8.16721 "context (you can see this more clearly in the output of <command role=\"hg-cmd" 8.16722 @@ -13767,7 +15798,7 @@ 8.16723 msgstr "" 8.16724 8.16725 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16726 -#: ../en/ch11-mq.xml:363 8.16727 +#: ../en/ch12-mq.xml:364 8.16728 msgid "" 8.16729 "So far, with the exception of <command role=\"hg-ext-mq\">qnew</command> and " 8.16730 "<command role=\"hg-ext-mq\">qrefresh</command>, we've been careful to only " 8.16731 @@ -13776,7 +15807,7 @@ 8.16732 msgstr "" 8.16733 8.16734 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16735 -#: ../en/ch11-mq.xml:373 8.16736 +#: ../en/ch12-mq.xml:374 8.16737 msgid "" 8.16738 "The <command role=\"hg-ext-mq\">qseries</command> command lists every patch " 8.16739 "that MQ knows about in this repository, from oldest to newest (most recently " 8.16740 @@ -13784,7 +15815,7 @@ 8.16741 msgstr "" 8.16742 8.16743 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.16744 -#: ../en/ch11-mq.xml:379 8.16745 +#: ../en/ch12-mq.xml:380 8.16746 msgid "" 8.16747 "The <command role=\"hg-ext-mq\">qapplied</command> command lists every patch " 8.16748 "that MQ has <emphasis>applied</emphasis> in this repository, again from " 8.16749 @@ -13792,12 +15823,12 @@ 8.16750 msgstr "" 8.16751 8.16752 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16753 -#: ../en/ch11-mq.xml:388 8.16754 +#: ../en/ch12-mq.xml:389 8.16755 msgid "Manipulating the patch stack" 8.16756 msgstr "操作补丁堆栈" 8.16757 8.16758 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16759 -#: ../en/ch11-mq.xml:390 8.16760 +#: ../en/ch12-mq.xml:391 8.16761 msgid "" 8.16762 "The previous discussion implied that there must be a difference between " 8.16763 "<quote>known</quote> and <quote>applied</quote> patches, and there is. MQ " 8.16764 @@ -13805,7 +15836,7 @@ 8.16765 msgstr "" 8.16766 8.16767 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16768 -#: ../en/ch11-mq.xml:395 8.16769 +#: ../en/ch12-mq.xml:396 8.16770 msgid "" 8.16771 "An <emphasis>applied</emphasis> patch has a corresponding changeset in the " 8.16772 "repository, and the effects of the patch and changeset are visible in the " 8.16773 @@ -13818,17 +15849,17 @@ 8.16774 msgstr "" 8.16775 8.16776 #. type: Content of: <book><chapter><sect1><sect2><figure><title> 8.16777 -#: ../en/ch11-mq.xml:408 8.16778 +#: ../en/ch12-mq.xml:409 8.16779 msgid "Applied and unapplied patches in the MQ patch stack" 8.16780 msgstr "在 MQ 补丁堆栈中应用和撤销补丁" 8.16781 8.16782 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> 8.16783 -#: ../en/ch11-mq.xml:411 8.16784 +#: ../en/ch12-mq.xml:412 8.16785 msgid "<imageobject><imagedata fileref=\"figs/mq-stack.png\"/></imageobject>" 8.16786 msgstr "" 8.16787 8.16788 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16789 -#: ../en/ch11-mq.xml:416 8.16790 +#: ../en/ch12-mq.xml:417 8.16791 msgid "" 8.16792 "You can reapply an unapplied, or popped, patch using the <command role=\"hg-" 8.16793 "ext-mq\">qpush</command> command. This creates a new changeset to correspond " 8.16794 @@ -13838,7 +15869,7 @@ 8.16795 msgstr "" 8.16796 8.16797 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16798 -#: ../en/ch11-mq.xml:425 8.16799 +#: ../en/ch12-mq.xml:427 8.16800 msgid "" 8.16801 "Notice that once we have popped a patch or two patches, the output of " 8.16802 "<command role=\"hg-ext-mq\">qseries</command> remains the same, while that of " 8.16803 @@ -13846,12 +15877,12 @@ 8.16804 msgstr "" 8.16805 8.16806 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16807 -#: ../en/ch11-mq.xml:433 8.16808 +#: ../en/ch12-mq.xml:435 8.16809 msgid "Pushing and popping many patches" 8.16810 msgstr "压入或弹出多个补丁" 8.16811 8.16812 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16813 -#: ../en/ch11-mq.xml:435 8.16814 +#: ../en/ch12-mq.xml:437 8.16815 msgid "" 8.16816 "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-" 8.16817 "mq\">qpop</command> each operate on a single patch at a time by default, you " 8.16818 @@ -13864,12 +15895,12 @@ 8.16819 msgstr "" 8.16820 8.16821 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16822 -#: ../en/ch11-mq.xml:451 8.16823 +#: ../en/ch12-mq.xml:453 8.16824 msgid "Safety checks, and overriding them" 8.16825 msgstr "安全的检查,然后覆盖它们" 8.16826 8.16827 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16828 -#: ../en/ch11-mq.xml:453 8.16829 +#: ../en/ch12-mq.xml:455 8.16830 msgid "" 8.16831 "Several MQ commands check the working directory before they do anything, and " 8.16832 "fail if they find any modifications. They do this to ensure that you won't " 8.16833 @@ -13881,7 +15912,7 @@ 8.16834 msgstr "" 8.16835 8.16836 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16837 -#: ../en/ch11-mq.xml:465 8.16838 +#: ../en/ch12-mq.xml:467 8.16839 msgid "" 8.16840 "Commands that check the working directory all take an <quote>I know what I'm " 8.16841 "doing</quote> option, which is always named <option>-f</option>. The exact " 8.16842 @@ -13895,12 +15926,12 @@ 8.16843 msgstr "" 8.16844 8.16845 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16846 -#: ../en/ch11-mq.xml:480 8.16847 +#: ../en/ch12-mq.xml:482 8.16848 msgid "Working on several patches at once" 8.16849 msgstr "同时处理多个补丁" 8.16850 8.16851 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16852 -#: ../en/ch11-mq.xml:482 8.16853 +#: ../en/ch12-mq.xml:484 8.16854 msgid "" 8.16855 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes " 8.16856 "the <emphasis>topmost</emphasis> applied patch. This means that you can " 8.16857 @@ -13909,7 +15940,7 @@ 8.16858 msgstr "" 8.16859 8.16860 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16861 -#: ../en/ch11-mq.xml:489 8.16862 +#: ../en/ch12-mq.xml:491 8.16863 msgid "" 8.16864 "Here's an example that illustrates how you can use this ability. Let's say " 8.16865 "you're developing a new feature as two patches. The first is a change to the " 8.16866 @@ -13925,12 +15956,12 @@ 8.16867 msgstr "" 8.16868 8.16869 #. type: Content of: <book><chapter><sect1><title> 8.16870 -#: ../en/ch11-mq.xml:506 8.16871 +#: ../en/ch12-mq.xml:508 8.16872 msgid "More about patches" 8.16873 msgstr "关于补丁的更多信息" 8.16874 8.16875 #. type: Content of: <book><chapter><sect1><para> 8.16876 -#: ../en/ch11-mq.xml:508 8.16877 +#: ../en/ch12-mq.xml:510 8.16878 msgid "" 8.16879 "MQ uses the GNU <command>patch</command> command to apply patches, so it's " 8.16880 "helpful to know a few more detailed aspects of how <command>patch</command> " 8.16881 @@ -13938,12 +15969,12 @@ 8.16882 msgstr "" 8.16883 8.16884 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16885 -#: ../en/ch11-mq.xml:514 8.16886 +#: ../en/ch12-mq.xml:516 8.16887 msgid "The strip count" 8.16888 msgstr "修剪计数" 8.16889 8.16890 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16891 -#: ../en/ch11-mq.xml:516 8.16892 +#: ../en/ch12-mq.xml:518 8.16893 msgid "" 8.16894 "If you look at the file headers in a patch, you will notice that the " 8.16895 "pathnames usually have an extra component on the front that isn't present in " 8.16896 @@ -13953,7 +15984,7 @@ 8.16897 msgstr "" 8.16898 8.16899 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16900 -#: ../en/ch11-mq.xml:523 8.16901 +#: ../en/ch12-mq.xml:525 8.16902 msgid "" 8.16903 "Alice would unpack a tarball, edit her files, then decide that she wanted to " 8.16904 "create a patch. So she'd rename her working directory, unpack the tarball " 8.16905 @@ -13967,7 +15998,7 @@ 8.16906 msgstr "" 8.16907 8.16908 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16909 -#: ../en/ch11-mq.xml:536 8.16910 +#: ../en/ch12-mq.xml:538 8.16911 msgid "" 8.16912 "Since someone receiving a patch from the Alices of the net would be unlikely " 8.16913 "to have unmodified and modified directories with exactly the same names, the " 8.16914 @@ -13978,7 +16009,7 @@ 8.16915 msgstr "" 8.16916 8.16917 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16918 -#: ../en/ch11-mq.xml:544 8.16919 +#: ../en/ch12-mq.xml:546 8.16920 msgid "" 8.16921 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip " 8.16922 "count of one</quote>. If <command>patch</command> sees a file name " 8.16923 @@ -13992,7 +16023,7 @@ 8.16924 msgstr "" 8.16925 8.16926 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16927 -#: ../en/ch11-mq.xml:557 8.16928 +#: ../en/ch12-mq.xml:559 8.16929 msgid "" 8.16930 "The <quote>standard</quote> strip count for patches is one; almost all " 8.16931 "patches contain one leading path name component that needs to be stripped. " 8.16932 @@ -14002,7 +16033,7 @@ 8.16933 msgstr "" 8.16934 8.16935 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16936 -#: ../en/ch11-mq.xml:565 8.16937 +#: ../en/ch12-mq.xml:567 8.16938 msgid "" 8.16939 "If you receive a patch from someone that you want to add to your patch queue, " 8.16940 "and the patch needs a strip count other than one, you cannot just <command " 8.16941 @@ -14019,12 +16050,12 @@ 8.16942 msgstr "" 8.16943 8.16944 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16945 -#: ../en/ch11-mq.xml:584 8.16946 +#: ../en/ch12-mq.xml:587 8.16947 msgid "Strategies for applying a patch" 8.16948 msgstr "应用补丁的策略" 8.16949 8.16950 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16951 -#: ../en/ch11-mq.xml:586 8.16952 +#: ../en/ch12-mq.xml:589 8.16953 msgid "" 8.16954 "When <command>patch</command> applies a hunk, it tries a handful of " 8.16955 "successively less accurate strategies to try to make the hunk apply. This " 8.16956 @@ -14034,7 +16065,7 @@ 8.16957 msgstr "" 8.16958 8.16959 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16960 -#: ../en/ch11-mq.xml:593 8.16961 +#: ../en/ch12-mq.xml:596 8.16962 msgid "" 8.16963 "First, <command>patch</command> tries an exact match, where the line numbers, " 8.16964 "the context, and the text to be modified must apply exactly. If it cannot " 8.16965 @@ -14045,7 +16076,7 @@ 8.16966 msgstr "" 8.16967 8.16968 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16969 -#: ../en/ch11-mq.xml:602 8.16970 +#: ../en/ch12-mq.xml:605 8.16971 msgid "" 8.16972 "If a context-only match fails, <command>patch</command> removes the first and " 8.16973 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-" 8.16974 @@ -14056,7 +16087,7 @@ 8.16975 msgstr "" 8.16976 8.16977 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16978 -#: ../en/ch11-mq.xml:611 8.16979 +#: ../en/ch12-mq.xml:614 8.16980 msgid "" 8.16981 "When neither of these techniques works, <command>patch</command> prints a " 8.16982 "message saying that the hunk in question was rejected. It saves rejected " 8.16983 @@ -14073,33 +16104,33 @@ 8.16984 msgstr "" 8.16985 8.16986 #. type: Content of: <book><chapter><sect1><sect2><title> 8.16987 -#: ../en/ch11-mq.xml:629 8.16988 +#: ../en/ch12-mq.xml:632 8.16989 msgid "Some quirks of patch representation" 8.16990 msgstr "补丁的一些特性" 8.16991 8.16992 #. type: Content of: <book><chapter><sect1><sect2><para> 8.16993 -#: ../en/ch11-mq.xml:631 8.16994 +#: ../en/ch12-mq.xml:634 8.16995 msgid "" 8.16996 "There are a few useful things to know about how <command>patch</command> " 8.16997 "works with files." 8.16998 msgstr "" 8.16999 8.17000 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17001 -#: ../en/ch11-mq.xml:634 8.17002 +#: ../en/ch12-mq.xml:637 8.17003 msgid "" 8.17004 "This should already be obvious, but <command>patch</command> cannot handle " 8.17005 "binary files." 8.17006 msgstr "" 8.17007 8.17008 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17009 -#: ../en/ch11-mq.xml:638 8.17010 +#: ../en/ch12-mq.xml:641 8.17011 msgid "" 8.17012 "Neither does it care about the executable bit; it creates new files as " 8.17013 "readable, but not executable." 8.17014 msgstr "" 8.17015 8.17016 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17017 -#: ../en/ch11-mq.xml:642 8.17018 +#: ../en/ch12-mq.xml:645 8.17019 msgid "" 8.17020 "<command>patch</command> treats the removal of a file as a diff between the " 8.17021 "file to be removed and the empty file. So your idea of <quote>I deleted this " 8.17022 @@ -14108,7 +16139,7 @@ 8.17023 msgstr "" 8.17024 8.17025 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17026 -#: ../en/ch11-mq.xml:648 8.17027 +#: ../en/ch12-mq.xml:651 8.17028 msgid "" 8.17029 "It treats the addition of a file as a diff between the empty file and the " 8.17030 "file to be added. So in a patch, your idea of <quote>I added this file</" 8.17031 @@ -14116,7 +16147,7 @@ 8.17032 msgstr "" 8.17033 8.17034 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17035 -#: ../en/ch11-mq.xml:654 8.17036 +#: ../en/ch12-mq.xml:657 8.17037 msgid "" 8.17038 "It treats a renamed file as the removal of the old name, and the addition of " 8.17039 "the new name. This means that renamed files have a big footprint in " 8.17040 @@ -14125,7 +16156,7 @@ 8.17041 msgstr "" 8.17042 8.17043 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17044 -#: ../en/ch11-mq.xml:660 8.17045 +#: ../en/ch12-mq.xml:663 8.17046 msgid "" 8.17047 "<command>patch</command> cannot represent empty files, so you cannot use a " 8.17048 "patch to represent the notion <quote>I added this empty file to the tree</" 8.17049 @@ -14133,12 +16164,12 @@ 8.17050 msgstr "" 8.17051 8.17052 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17053 -#: ../en/ch11-mq.xml:667 8.17054 +#: ../en/ch12-mq.xml:671 8.17055 msgid "Beware the fuzz" 8.17056 msgstr "当心毛刺" 8.17057 8.17058 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17059 -#: ../en/ch11-mq.xml:669 8.17060 +#: ../en/ch12-mq.xml:673 8.17061 msgid "" 8.17062 "While applying a hunk at an offset, or with a fuzz factor, will often be " 8.17063 "completely successful, these inexact techniques naturally leave open the " 8.17064 @@ -14150,7 +16181,7 @@ 8.17065 msgstr "" 8.17066 8.17067 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17068 -#: ../en/ch11-mq.xml:679 8.17069 +#: ../en/ch12-mq.xml:683 8.17070 msgid "" 8.17071 "It's often a good idea to refresh a patch that has applied with an offset or " 8.17072 "fuzz factor; refreshing the patch generates new context information that will " 8.17073 @@ -14163,12 +16194,12 @@ 8.17074 msgstr "" 8.17075 8.17076 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17077 -#: ../en/ch11-mq.xml:692 8.17078 +#: ../en/ch12-mq.xml:696 8.17079 msgid "Handling rejection" 8.17080 msgstr "处理拒绝" 8.17081 8.17082 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17083 -#: ../en/ch11-mq.xml:694 8.17084 +#: ../en/ch12-mq.xml:698 8.17085 msgid "" 8.17086 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it " 8.17087 "will print an error message and exit. If it has left <filename role=\"special" 8.17088 @@ -14177,7 +16208,7 @@ 8.17089 msgstr "" 8.17090 8.17091 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17092 -#: ../en/ch11-mq.xml:700 8.17093 +#: ../en/ch12-mq.xml:704 8.17094 msgid "" 8.17095 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does " 8.17096 "because you've changed the underlying code that your patches are based on, " 8.17097 @@ -14185,7 +16216,7 @@ 8.17098 msgstr "" 8.17099 8.17100 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17101 -#: ../en/ch11-mq.xml:705 8.17102 +#: ../en/ch12-mq.xml:709 8.17103 msgid "" 8.17104 "Unfortunately, there aren't any great techniques for dealing with rejected " 8.17105 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</" 8.17106 @@ -14193,76 +16224,135 @@ 8.17107 msgstr "" 8.17108 8.17109 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17110 -#: ../en/ch11-mq.xml:710 8.17111 -msgid "" 8.17112 -"If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a " 8.17113 -"tool called <command>wiggle</command> <citation>web:wiggle</citation>, which " 8.17114 -"is more vigorous than <command>patch</command> in its attempts to make a " 8.17115 -"patch apply." 8.17116 -msgstr "" 8.17117 - 8.17118 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.17119 -#: ../en/ch11-mq.xml:716 8.17120 -msgid "" 8.17121 -"Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), " 8.17122 -"wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</" 8.17123 -"citation>, which takes a simple approach to automating the application of " 8.17124 -"hunks rejected by <command>patch</command>. The <command>mpatch</command> " 8.17125 -"command can help with four common reasons that a hunk may be rejected:" 8.17126 +#: ../en/ch12-mq.xml:714 8.17127 +msgid "" 8.17128 +"A Linux kernel hacker, Chris Mason (the author of Mercurial Queues), wrote a " 8.17129 +"tool called <command>mpatch</command> (<ulink url=\"http://oss.oracle.com/" 8.17130 +"~mason/mpatch/\">http://oss.oracle.com/~mason/mpatch/</ulink>), which takes a " 8.17131 +"simple approach to automating the application of hunks rejected by " 8.17132 +"<command>patch</command>. The <command>mpatch</command> command can help " 8.17133 +"with four common reasons that a hunk may be rejected:" 8.17134 msgstr "" 8.17135 8.17136 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17137 -#: ../en/ch11-mq.xml:725 8.17138 +#: ../en/ch12-mq.xml:724 8.17139 msgid "The context in the middle of a hunk has changed." 8.17140 msgstr "" 8.17141 8.17142 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17143 -#: ../en/ch11-mq.xml:728 8.17144 +#: ../en/ch12-mq.xml:727 8.17145 msgid "A hunk is missing some context at the beginning or end." 8.17146 msgstr "" 8.17147 8.17148 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17149 -#: ../en/ch11-mq.xml:731 8.17150 +#: ../en/ch12-mq.xml:730 8.17151 msgid "" 8.17152 "A large hunk might apply better&emdash;either entirely or in part&emdash;if " 8.17153 "it was broken up into smaller hunks." 8.17154 msgstr "" 8.17155 8.17156 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17157 -#: ../en/ch11-mq.xml:735 8.17158 +#: ../en/ch12-mq.xml:734 8.17159 msgid "" 8.17160 "A hunk removes lines with slightly different content than those currently " 8.17161 "present in the file." 8.17162 msgstr "" 8.17163 8.17164 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17165 -#: ../en/ch11-mq.xml:739 8.17166 -msgid "" 8.17167 -"If you use <command>wiggle</command> or <command>mpatch</command>, you should " 8.17168 -"be doubly careful to check your results when you're done. In fact, " 8.17169 -"<command>mpatch</command> enforces this method of double-checking the tool's " 8.17170 -"output, by automatically dropping you into a merge program when it has done " 8.17171 -"its job, so that you can verify its work and finish off any remaining merges." 8.17172 +#: ../en/ch12-mq.xml:738 8.17173 +msgid "" 8.17174 +"If you use <command>mpatch</command>, you should be doubly careful to check " 8.17175 +"your results when you're done. In fact, <command>mpatch</command> enforces " 8.17176 +"this method of double-checking the tool's output, by automatically dropping " 8.17177 +"you into a merge program when it has done its job, so that you can verify its " 8.17178 +"work and finish off any remaining merges." 8.17179 msgstr "" 8.17180 8.17181 #. type: Content of: <book><chapter><sect1><title> 8.17182 -#: ../en/ch11-mq.xml:751 8.17183 +#: ../en/ch12-mq.xml:749 8.17184 +msgid "More on patch management" 8.17185 +msgstr "补丁管理进阶" 8.17186 + 8.17187 +#. type: Content of: <book><chapter><sect1><para> 8.17188 +#: ../en/ch12-mq.xml:751 8.17189 +msgid "" 8.17190 +"As you grow familiar with MQ, you will find yourself wanting to perform other " 8.17191 +"kinds of patch management operations." 8.17192 +msgstr "" 8.17193 + 8.17194 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.17195 +#: ../en/ch12-mq.xml:755 8.17196 +msgid "Deleting unwanted patches" 8.17197 +msgstr "删除不需要的补丁" 8.17198 + 8.17199 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.17200 +#: ../en/ch12-mq.xml:757 8.17201 +msgid "" 8.17202 +"If you want to get rid of a patch, use the <command role=\"hg-ext-mq\">hg " 8.17203 +"qdelete</command> command to delete the patch file and remove its entry from " 8.17204 +"the patch series. If you try to delete a patch that is still applied, " 8.17205 +"<command role=\"hg-ext-mq\">hg qdelete</command> will refuse." 8.17206 +msgstr "" 8.17207 + 8.17208 +#. type: Content of: <book><chapter><sect1><sect2><title> 8.17209 +#: ../en/ch12-mq.xml:767 8.17210 +msgid "Converting to and from permanent revisions" 8.17211 +msgstr "与持久版本的相互转换" 8.17212 + 8.17213 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.17214 +#: ../en/ch12-mq.xml:769 8.17215 +msgid "" 8.17216 +"Once you're done working on a patch and want to turn it into a permanent " 8.17217 +"changeset, use the <command role=\"hg-ext-mq\">hg qfinish</command> command. " 8.17218 +"Pass a revision to the command to identify the patch that you want to turn " 8.17219 +"into a regular changeset; this patch must already be applied." 8.17220 +msgstr "" 8.17221 + 8.17222 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.17223 +#: ../en/ch12-mq.xml:777 8.17224 +msgid "" 8.17225 +"The <command role=\"hg-ext-mq\">hg qfinish</command> command accepts an " 8.17226 +"<option>--all</option> or <option>-a</option> option, which turns all applied " 8.17227 +"patches into regular changesets." 8.17228 +msgstr "" 8.17229 + 8.17230 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.17231 +#: ../en/ch12-mq.xml:782 8.17232 +msgid "" 8.17233 +"It is also possible to turn an existing changeset into a patch, by passing " 8.17234 +"the <option>-r</option> option to <command role=\"hg-ext-mq\">hg qimport</" 8.17235 +"command>." 8.17236 +msgstr "" 8.17237 + 8.17238 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.17239 +#: ../en/ch12-mq.xml:788 8.17240 +msgid "" 8.17241 +"Note that it only makes sense to convert a changeset into a patch if you have " 8.17242 +"not propagated that changeset into any other repositories. The imported " 8.17243 +"changeset's ID will change every time you refresh the patch, which will make " 8.17244 +"Mercurial treat it as unrelated to the original changeset if you have pushed " 8.17245 +"it somewhere else." 8.17246 +msgstr "" 8.17247 + 8.17248 +#. type: Content of: <book><chapter><sect1><title> 8.17249 +#: ../en/ch12-mq.xml:798 8.17250 msgid "Getting the best performance out of MQ" 8.17251 msgstr "MQ 的性能" 8.17252 8.17253 #. type: Content of: <book><chapter><sect1><para> 8.17254 -#: ../en/ch11-mq.xml:753 8.17255 -msgid "" 8.17256 -"MQ is very efficient at handling a large number of patches. I ran some " 8.17257 +#: ../en/ch12-mq.xml:800 8.17258 +msgid "" 8.17259 +"MQ is very efficient at handling a large number of patches. I ran some " 8.17260 "performance experiments in mid-2006 for a talk that I gave at the 2006 " 8.17261 -"EuroPython conference <citation>web:europython</citation>. I used as my data " 8.17262 -"set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I " 8.17263 -"applied these on top of a Linux kernel repository containing all 27,472 " 8.17264 -"revisions between Linux 2.6.12-rc2 and Linux 2.6.17." 8.17265 -msgstr "" 8.17266 - 8.17267 -#. type: Content of: <book><chapter><sect1><para> 8.17268 -#: ../en/ch11-mq.xml:762 8.17269 +"EuroPython conference (on modern hardware, you should expect better " 8.17270 +"performance than you'll see below). I used as my data set the Linux 2.6.17-" 8.17271 +"mm1 patch series, which consists of 1,738 patches. I applied these on top of " 8.17272 +"a Linux kernel repository containing all 27,472 revisions between Linux " 8.17273 +"2.6.12-rc2 and Linux 2.6.17." 8.17274 +msgstr "" 8.17275 + 8.17276 +#. type: Content of: <book><chapter><sect1><para> 8.17277 +#: ../en/ch12-mq.xml:809 8.17278 msgid "" 8.17279 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " 8.17280 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " 8.17281 @@ -14274,14 +16364,14 @@ 8.17282 msgstr "" 8.17283 8.17284 #. type: Content of: <book><chapter><sect1><para> 8.17285 -#: ../en/ch11-mq.xml:773 8.17286 +#: ../en/ch12-mq.xml:820 8.17287 msgid "" 8.17288 "Clearly, MQ is well suited to working in large trees, but there are a few " 8.17289 "tricks you can use to get the best performance of it." 8.17290 msgstr "" 8.17291 8.17292 #. type: Content of: <book><chapter><sect1><para> 8.17293 -#: ../en/ch11-mq.xml:777 8.17294 +#: ../en/ch12-mq.xml:824 8.17295 msgid "" 8.17296 "First of all, try to <quote>batch</quote> operations together. Every time " 8.17297 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-" 8.17298 @@ -14293,7 +16383,7 @@ 8.17299 msgstr "" 8.17300 8.17301 #. type: Content of: <book><chapter><sect1><para> 8.17302 -#: ../en/ch11-mq.xml:788 8.17303 +#: ../en/ch12-mq.xml:835 8.17304 msgid "" 8.17305 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq" 8.17306 "\">qpop</command> commands allow you to push and pop multiple patches at a " 8.17307 @@ -14305,7 +16395,7 @@ 8.17308 msgstr "" 8.17309 8.17310 #. type: Content of: <book><chapter><sect1><para> 8.17311 -#: ../en/ch11-mq.xml:798 8.17312 +#: ../en/ch12-mq.xml:845 8.17313 msgid "" 8.17314 "You can identify a destination patch using either the name of the patch, or " 8.17315 "by number. If you use numeric addressing, patches are counted from zero; " 8.17316 @@ -14313,12 +16403,12 @@ 8.17317 msgstr "" 8.17318 8.17319 #. type: Content of: <book><chapter><sect1><title> 8.17320 -#: ../en/ch11-mq.xml:805 8.17321 +#: ../en/ch12-mq.xml:852 8.17322 msgid "Updating your patches when the underlying code changes" 8.17323 msgstr "当基础代码改变时,更新补丁的方法" 8.17324 8.17325 #. type: Content of: <book><chapter><sect1><para> 8.17326 -#: ../en/ch11-mq.xml:808 8.17327 +#: ../en/ch12-mq.xml:855 8.17328 msgid "" 8.17329 "It's common to have a stack of patches on top of an underlying repository " 8.17330 "that you don't modify directly. If you're working on changes to third-party " 8.17331 @@ -14329,7 +16419,7 @@ 8.17332 msgstr "" 8.17333 8.17334 #. type: Content of: <book><chapter><sect1><para> 8.17335 -#: ../en/ch11-mq.xml:817 8.17336 +#: ../en/ch12-mq.xml:864 8.17337 msgid "" 8.17338 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option " 8.17339 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " 8.17340 @@ -14343,7 +16433,7 @@ 8.17341 msgstr "" 8.17342 8.17343 #. type: Content of: <book><chapter><sect1><para> 8.17344 -#: ../en/ch11-mq.xml:829 8.17345 +#: ../en/ch12-mq.xml:876 8.17346 msgid "" 8.17347 "This approach is easy to use and works well if you don't expect changes to " 8.17348 "the underlying code to affect how well your patches apply. If your patch " 8.17349 @@ -14353,7 +16443,7 @@ 8.17350 msgstr "" 8.17351 8.17352 #. type: Content of: <book><chapter><sect1><para> 8.17353 -#: ../en/ch11-mq.xml:836 8.17354 +#: ../en/ch12-mq.xml:883 8.17355 msgid "" 8.17356 "It's possible to partially automate the rebasing process. If your patches " 8.17357 "apply cleanly against some revision of the underlying repo, MQ can use this " 8.17358 @@ -14362,19 +16452,19 @@ 8.17359 msgstr "" 8.17360 8.17361 #. type: Content of: <book><chapter><sect1><para> 8.17362 -#: ../en/ch11-mq.xml:842 8.17363 +#: ../en/ch12-mq.xml:889 8.17364 msgid "The process is a little involved." 8.17365 msgstr "" 8.17366 8.17367 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.17368 -#: ../en/ch11-mq.xml:844 8.17369 +#: ../en/ch12-mq.xml:891 8.17370 msgid "" 8.17371 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches " 8.17372 "on top of the revision where you know that they apply cleanly." 8.17373 msgstr "" 8.17374 8.17375 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.17376 -#: ../en/ch11-mq.xml:848 8.17377 +#: ../en/ch12-mq.xml:895 8.17378 msgid "" 8.17379 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg " 8.17380 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role=" 8.17381 @@ -14389,7 +16479,7 @@ 8.17382 msgstr "" 8.17383 8.17384 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.17385 -#: ../en/ch11-mq.xml:862 8.17386 +#: ../en/ch12-mq.xml:909 8.17387 msgid "" 8.17388 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the " 8.17389 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</" 8.17390 @@ -14397,7 +16487,7 @@ 8.17391 msgstr "" 8.17392 8.17393 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.17394 -#: ../en/ch11-mq.xml:867 8.17395 +#: ../en/ch12-mq.xml:914 8.17396 msgid "" 8.17397 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update " 8.17398 "<option role=\"hg-opt-update\">-C</option></command> to override the patches " 8.17399 @@ -14405,7 +16495,7 @@ 8.17400 msgstr "" 8.17401 8.17402 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.17403 -#: ../en/ch11-mq.xml:872 8.17404 +#: ../en/ch12-mq.xml:919 8.17405 msgid "" 8.17406 "Merge all patches using <command>hg qpush -m -a</command>. The <option role=" 8.17407 "\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq" 8.17408 @@ -14414,7 +16504,7 @@ 8.17409 msgstr "" 8.17410 8.17411 #. type: Content of: <book><chapter><sect1><para> 8.17412 -#: ../en/ch11-mq.xml:880 8.17413 +#: ../en/ch12-mq.xml:927 8.17414 msgid "" 8.17415 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-" 8.17416 "qpush-opt\">hg -m</option></command>, each patch in the <filename role=" 8.17417 @@ -14426,14 +16516,14 @@ 8.17418 msgstr "" 8.17419 8.17420 #. type: Content of: <book><chapter><sect1><para> 8.17421 -#: ../en/ch11-mq.xml:890 8.17422 +#: ../en/ch12-mq.xml:937 8.17423 msgid "" 8.17424 "When you finish resolving the effects of a patch, MQ refreshes your patch " 8.17425 "based on the result of the merge." 8.17426 msgstr "" 8.17427 8.17428 #. type: Content of: <book><chapter><sect1><para> 8.17429 -#: ../en/ch11-mq.xml:893 8.17430 +#: ../en/ch12-mq.xml:940 8.17431 msgid "" 8.17432 "At the end of this process, your repository will have one extra head from the " 8.17433 "old patch queue, and a copy of the old patch queue will be in <filename role=" 8.17434 @@ -14445,12 +16535,12 @@ 8.17435 msgstr "" 8.17436 8.17437 #. type: Content of: <book><chapter><sect1><title> 8.17438 -#: ../en/ch11-mq.xml:905 8.17439 +#: ../en/ch12-mq.xml:952 8.17440 msgid "Identifying patches" 8.17441 msgstr "标识补丁" 8.17442 8.17443 #. type: Content of: <book><chapter><sect1><para> 8.17444 -#: ../en/ch11-mq.xml:907 8.17445 +#: ../en/ch12-mq.xml:954 8.17446 msgid "" 8.17447 "MQ commands that work with patches let you refer to a patch either by using " 8.17448 "its name or by a number. By name is obvious enough; pass the name " 8.17449 @@ -14460,7 +16550,7 @@ 8.17450 msgstr "" 8.17451 8.17452 #. type: Content of: <book><chapter><sect1><para> 8.17453 -#: ../en/ch11-mq.xml:914 8.17454 +#: ../en/ch12-mq.xml:961 8.17455 msgid "" 8.17456 "As a shortcut, you can refer to a patch using both a name and a numeric " 8.17457 "offset; <literal>foo.patch-2</literal> means <quote>two patches before " 8.17458 @@ -14469,7 +16559,7 @@ 8.17459 msgstr "" 8.17460 8.17461 #. type: Content of: <book><chapter><sect1><para> 8.17462 -#: ../en/ch11-mq.xml:920 8.17463 +#: ../en/ch12-mq.xml:967 8.17464 msgid "" 8.17465 "Referring to a patch by index isn't much different. The first patch printed " 8.17466 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero " 8.17467 @@ -14478,7 +16568,7 @@ 8.17468 msgstr "" 8.17469 8.17470 #. type: Content of: <book><chapter><sect1><para> 8.17471 -#: ../en/ch11-mq.xml:926 8.17472 +#: ../en/ch12-mq.xml:973 8.17473 msgid "" 8.17474 "MQ also makes it easy to work with patches when you are using normal " 8.17475 "Mercurial commands. Every command that accepts a changeset ID will also " 8.17476 @@ -14490,33 +16580,33 @@ 8.17477 msgstr "" 8.17478 8.17479 #. type: Content of: <book><chapter><sect1><para> 8.17480 -#: ../en/ch11-mq.xml:936 8.17481 +#: ../en/ch12-mq.xml:983 8.17482 msgid "" 8.17483 "These additions to Mercurial's normal tagging capabilities make dealing with " 8.17484 "patches even more of a breeze." 8.17485 msgstr "" 8.17486 8.17487 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.17488 -#: ../en/ch11-mq.xml:939 8.17489 +#: ../en/ch12-mq.xml:986 8.17490 msgid "Want to patchbomb a mailing list with your latest series of changes?" 8.17491 msgstr "" 8.17492 8.17493 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.17494 -#: ../en/ch11-mq.xml:942 8.17495 +#: ../en/ch12-mq.xml:989 8.17496 msgid "" 8.17497 "(Don't know what <quote>patchbombing</quote> is? See <xref linkend=\"sec:" 8.17498 "hgext:patchbomb\"/>.)" 8.17499 msgstr "" 8.17500 8.17501 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.17502 -#: ../en/ch11-mq.xml:945 8.17503 +#: ../en/ch12-mq.xml:992 8.17504 msgid "" 8.17505 "Need to see all of the patches since <literal>foo.patch</literal> that have " 8.17506 "touched files in a subdirectory of your tree?" 8.17507 msgstr "" 8.17508 8.17509 #. type: Content of: <book><chapter><sect1><para> 8.17510 -#: ../en/ch11-mq.xml:952 8.17511 +#: ../en/ch12-mq.xml:999 8.17512 msgid "" 8.17513 "Because MQ makes the names of patches available to the rest of Mercurial " 8.17514 "through its normal internal tag machinery, you don't need to type in the " 8.17515 @@ -14524,7 +16614,7 @@ 8.17516 msgstr "" 8.17517 8.17518 #. type: Content of: <book><chapter><sect1><para> 8.17519 -#: ../en/ch11-mq.xml:957 8.17520 +#: ../en/ch12-mq.xml:1004 8.17521 msgid "" 8.17522 "Another nice consequence of representing patch names as tags is that when you " 8.17523 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a " 8.17524 @@ -14535,19 +16625,19 @@ 8.17525 msgstr "" 8.17526 8.17527 #. type: Content of: <book><chapter><sect1><title> 8.17528 -#: ../en/ch11-mq.xml:970 8.17529 +#: ../en/ch12-mq.xml:1017 8.17530 msgid "Useful things to know about" 8.17531 msgstr "其它需要了解的东西" 8.17532 8.17533 #. type: Content of: <book><chapter><sect1><para> 8.17534 -#: ../en/ch11-mq.xml:972 8.17535 +#: ../en/ch12-mq.xml:1019 8.17536 msgid "" 8.17537 "There are a number of aspects of MQ usage that don't fit tidily into sections " 8.17538 "of their own, but that are good to know. Here they are, in one place." 8.17539 msgstr "" 8.17540 8.17541 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.17542 -#: ../en/ch11-mq.xml:977 8.17543 +#: ../en/ch12-mq.xml:1024 8.17544 msgid "" 8.17545 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and " 8.17546 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that " 8.17547 @@ -14557,7 +16647,7 @@ 8.17548 msgstr "" 8.17549 8.17550 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.17551 -#: ../en/ch11-mq.xml:986 8.17552 +#: ../en/ch12-mq.xml:1033 8.17553 msgid "" 8.17554 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes " 8.17555 "from another branch with a patch changeset, at least if you want to maintain " 8.17556 @@ -14567,12 +16657,12 @@ 8.17557 msgstr "" 8.17558 8.17559 #. type: Content of: <book><chapter><sect1><title> 8.17560 -#: ../en/ch11-mq.xml:997 8.17561 +#: ../en/ch12-mq.xml:1044 8.17562 msgid "Managing patches in a repository" 8.17563 msgstr "在版本库管理补丁" 8.17564 8.17565 #. type: Content of: <book><chapter><sect1><para> 8.17566 -#: ../en/ch11-mq.xml:999 8.17567 +#: ../en/ch12-mq.xml:1046 8.17568 msgid "" 8.17569 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</" 8.17570 "filename> directory resides outside a Mercurial repository's working " 8.17571 @@ -14581,7 +16671,7 @@ 8.17572 msgstr "" 8.17573 8.17574 #. type: Content of: <book><chapter><sect1><para> 8.17575 -#: ../en/ch11-mq.xml:1005 8.17576 +#: ../en/ch12-mq.xml:1052 8.17577 msgid "" 8.17578 "This presents the interesting possibility of managing the contents of the " 8.17579 "patch directory as a Mercurial repository in its own right. This can be a " 8.17580 @@ -14592,7 +16682,7 @@ 8.17581 msgstr "" 8.17582 8.17583 #. type: Content of: <book><chapter><sect1><para> 8.17584 -#: ../en/ch11-mq.xml:1014 8.17585 +#: ../en/ch12-mq.xml:1061 8.17586 msgid "" 8.17587 "You can then share different versions of the same patch stack among multiple " 8.17588 "underlying repositories. I use this when I am developing a Linux kernel " 8.17589 @@ -14604,7 +16694,7 @@ 8.17590 msgstr "" 8.17591 8.17592 #. type: Content of: <book><chapter><sect1><para> 8.17593 -#: ../en/ch11-mq.xml:1024 8.17594 +#: ../en/ch12-mq.xml:1071 8.17595 msgid "" 8.17596 "Managing patches in a repository makes it possible for multiple developers to " 8.17597 "work on the same patch series without colliding with each other, all on top " 8.17598 @@ -14612,12 +16702,12 @@ 8.17599 msgstr "" 8.17600 8.17601 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17602 -#: ../en/ch11-mq.xml:1030 8.17603 +#: ../en/ch12-mq.xml:1077 8.17604 msgid "MQ support for patch repositories" 8.17605 msgstr "MQ 支持补丁版本库" 8.17606 8.17607 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17608 -#: ../en/ch11-mq.xml:1032 8.17609 +#: ../en/ch12-mq.xml:1079 8.17610 msgid "" 8.17611 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">." 8.17612 "hg/patches</filename> directory as a repository; when you prepare a " 8.17613 @@ -14628,7 +16718,7 @@ 8.17614 msgstr "" 8.17615 8.17616 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.17617 -#: ../en/ch11-mq.xml:1042 8.17618 +#: ../en/ch12-mq.xml:1089 8.17619 msgid "" 8.17620 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 8.17621 "option> option, you can simply go into the <filename role=\"special\" class=" 8.17622 @@ -14639,7 +16729,7 @@ 8.17623 msgstr "" 8.17624 8.17625 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.17626 -#: ../en/ch11-mq.xml:1051 8.17627 +#: ../en/ch12-mq.xml:1098 8.17628 msgid "" 8.17629 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt" 8.17630 "\">hg -c</option></command> does this for you automatically); you " 8.17631 @@ -14648,7 +16738,7 @@ 8.17632 msgstr "" 8.17633 8.17634 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17635 -#: ../en/ch11-mq.xml:1058 8.17636 +#: ../en/ch12-mq.xml:1105 8.17637 msgid "" 8.17638 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/" 8.17639 "patches</filename> directory is a repository, it will automatically <command " 8.17640 @@ -14656,7 +16746,7 @@ 8.17641 msgstr "" 8.17642 8.17643 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17644 -#: ../en/ch11-mq.xml:1063 8.17645 +#: ../en/ch12-mq.xml:1110 8.17646 msgid "" 8.17647 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</" 8.17648 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the " 8.17649 @@ -14665,7 +16755,7 @@ 8.17650 msgstr "" 8.17651 8.17652 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17653 -#: ../en/ch11-mq.xml:1069 8.17654 +#: ../en/ch12-mq.xml:1116 8.17655 msgid "" 8.17656 "Finally, as a convenience to manage the patch directory, you can define the " 8.17657 "alias <command>mq</command> on Unix systems. For example, on Linux systems " 8.17658 @@ -14674,26 +16764,26 @@ 8.17659 msgstr "" 8.17660 8.17661 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17662 -#: ../en/ch11-mq.xml:1078 8.17663 +#: ../en/ch12-mq.xml:1125 8.17664 msgid "" 8.17665 "You can then issue commands of the form <command>mq pull</command> from the " 8.17666 "main repository." 8.17667 msgstr "" 8.17668 8.17669 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17670 -#: ../en/ch11-mq.xml:1083 8.17671 +#: ../en/ch12-mq.xml:1130 8.17672 msgid "A few things to watch out for" 8.17673 msgstr "需要注意的事情" 8.17674 8.17675 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17676 -#: ../en/ch11-mq.xml:1085 8.17677 +#: ../en/ch12-mq.xml:1132 8.17678 msgid "" 8.17679 "MQ's support for working with a repository full of patches is limited in a " 8.17680 "few small respects." 8.17681 msgstr "" 8.17682 8.17683 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17684 -#: ../en/ch11-mq.xml:1088 8.17685 +#: ../en/ch12-mq.xml:1135 8.17686 msgid "" 8.17687 "MQ cannot automatically detect changes that you make to the patch directory. " 8.17688 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " 8.17689 @@ -14707,12 +16797,12 @@ 8.17690 msgstr "" 8.17691 8.17692 #. type: Content of: <book><chapter><sect1><title> 8.17693 -#: ../en/ch11-mq.xml:1104 8.17694 +#: ../en/ch12-mq.xml:1151 8.17695 msgid "Third party tools for working with patches" 8.17696 msgstr "操作补丁的第三方工具" 8.17697 8.17698 #. type: Content of: <book><chapter><sect1><para> 8.17699 -#: ../en/ch11-mq.xml:1106 8.17700 +#: ../en/ch12-mq.xml:1153 8.17701 msgid "" 8.17702 "Once you've been working with patches for a while, you'll find yourself " 8.17703 "hungry for tools that will help you to understand and manipulate the patches " 8.17704 @@ -14720,7 +16810,7 @@ 8.17705 msgstr "" 8.17706 8.17707 #. type: Content of: <book><chapter><sect1><para> 8.17708 -#: ../en/ch11-mq.xml:1110 8.17709 +#: ../en/ch12-mq.xml:1157 8.17710 msgid "" 8.17711 "The <command>diffstat</command> command <citation>web:diffstat</citation> " 8.17712 "generates a histogram of the modifications made to each file in a patch. It " 8.17713 @@ -14733,7 +16823,7 @@ 8.17714 msgstr "" 8.17715 8.17716 #. type: Content of: <book><chapter><sect1><para> 8.17717 -#: ../en/ch11-mq.xml:1124 8.17718 +#: ../en/ch12-mq.xml:1171 8.17719 msgid "" 8.17720 "The <literal role=\"package\">patchutils</literal> package <citation>web:" 8.17721 "patchutils</citation> is invaluable. It provides a set of small utilities " 8.17722 @@ -14748,21 +16838,21 @@ 8.17723 msgstr "" 8.17724 8.17725 #. type: Content of: <book><chapter><sect1><title> 8.17726 -#: ../en/ch11-mq.xml:1140 8.17727 +#: ../en/ch12-mq.xml:1187 8.17728 msgid "Good ways to work with patches" 8.17729 msgstr "操作补丁的好习惯" 8.17730 8.17731 #. type: Content of: <book><chapter><sect1><para> 8.17732 -#: ../en/ch11-mq.xml:1142 8.17733 +#: ../en/ch12-mq.xml:1189 8.17734 msgid "" 8.17735 "Whether you are working on a patch series to submit to a free software or " 8.17736 "open source project, or a series that you intend to treat as a sequence of " 8.17737 "regular changesets when you're done, you can use some simple techniques to " 8.17738 -"keep your work well organised." 8.17739 -msgstr "" 8.17740 - 8.17741 -#. type: Content of: <book><chapter><sect1><para> 8.17742 -#: ../en/ch11-mq.xml:1148 8.17743 +"keep your work well organized." 8.17744 +msgstr "" 8.17745 + 8.17746 +#. type: Content of: <book><chapter><sect1><para> 8.17747 +#: ../en/ch12-mq.xml:1195 8.17748 msgid "" 8.17749 "Give your patches descriptive names. A good name for a patch might be " 8.17750 "<filename>rework-device-alloc.patch</filename>, because it will immediately " 8.17751 @@ -14776,7 +16866,7 @@ 8.17752 msgstr "" 8.17753 8.17754 #. type: Content of: <book><chapter><sect1><para> 8.17755 -#: ../en/ch11-mq.xml:1160 8.17756 +#: ../en/ch12-mq.xml:1207 8.17757 msgid "" 8.17758 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq" 8.17759 "\">qtop</command> command and skim over the text of your patches " 8.17760 @@ -14789,7 +16879,7 @@ 8.17761 msgstr "" 8.17762 8.17763 #. type: Content of: <book><chapter><sect1><para> 8.17764 -#: ../en/ch11-mq.xml:1170 8.17765 +#: ../en/ch12-mq.xml:1217 8.17766 msgid "" 8.17767 "For this reason, it is very much worth investing a little time to learn how " 8.17768 "to use some of the third-party tools I described in <xref linkend=\"sec:mq:" 8.17769 @@ -14800,17 +16890,17 @@ 8.17770 msgstr "" 8.17771 8.17772 #. type: Content of: <book><chapter><sect1><title> 8.17773 -#: ../en/ch11-mq.xml:1181 8.17774 +#: ../en/ch12-mq.xml:1228 8.17775 msgid "MQ cookbook" 8.17776 msgstr "MQ 手册" 8.17777 8.17778 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17779 -#: ../en/ch11-mq.xml:1184 8.17780 +#: ../en/ch12-mq.xml:1231 8.17781 msgid "Manage <quote>trivial</quote> patches" 8.17782 msgstr "管理<quote>琐碎的</quote>补丁" 8.17783 8.17784 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17785 -#: ../en/ch11-mq.xml:1186 8.17786 +#: ../en/ch12-mq.xml:1233 8.17787 msgid "" 8.17788 "Because the overhead of dropping files into a new Mercurial repository is so " 8.17789 "low, it makes a lot of sense to manage patches this way even if you simply " 8.17790 @@ -14819,26 +16909,26 @@ 8.17791 8.17792 # 8.17793 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17794 -#: ../en/ch11-mq.xml:1191 8.17795 +#: ../en/ch12-mq.xml:1238 8.17796 msgid "" 8.17797 "Begin by downloading and unpacking the source tarball, and turning it into a " 8.17798 "Mercurial repository." 8.17799 msgstr "" 8.17800 8.17801 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17802 -#: ../en/ch11-mq.xml:1196 8.17803 +#: ../en/ch12-mq.xml:1243 8.17804 msgid "Continue by creating a patch stack and making your changes." 8.17805 msgstr "" 8.17806 8.17807 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17808 -#: ../en/ch11-mq.xml:1201 8.17809 +#: ../en/ch12-mq.xml:1248 8.17810 msgid "" 8.17811 "Let's say a few weeks or months pass, and your package author releases a new " 8.17812 "version. First, bring their changes into the repository." 8.17813 msgstr "" 8.17814 8.17815 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17816 -#: ../en/ch11-mq.xml:1207 8.17817 +#: ../en/ch12-mq.xml:1254 8.17818 msgid "" 8.17819 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above " 8.17820 "deletes all files in the working directory, so that <command role=\"hg-cmd" 8.17821 @@ -14848,17 +16938,17 @@ 8.17822 msgstr "" 8.17823 8.17824 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17825 -#: ../en/ch11-mq.xml:1215 8.17826 +#: ../en/ch12-mq.xml:1262 8.17827 msgid "Finally, you can apply your patches on top of the new tree." 8.17828 msgstr "" 8.17829 8.17830 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17831 -#: ../en/ch11-mq.xml:1222 8.17832 +#: ../en/ch12-mq.xml:1269 8.17833 msgid "Combining entire patches" 8.17834 msgstr "组合全部的补丁" 8.17835 8.17836 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17837 -#: ../en/ch11-mq.xml:1224 8.17838 +#: ../en/ch12-mq.xml:1271 8.17839 msgid "" 8.17840 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets " 8.17841 "you combine entire patches. This <quote>folds</quote> the patches you name, " 8.17842 @@ -14868,7 +16958,7 @@ 8.17843 msgstr "" 8.17844 8.17845 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17846 -#: ../en/ch11-mq.xml:1232 8.17847 +#: ../en/ch12-mq.xml:1279 8.17848 msgid "" 8.17849 "The order in which you fold patches matters. If your topmost applied patch " 8.17850 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</" 8.17851 @@ -14879,19 +16969,19 @@ 8.17852 msgstr "" 8.17853 8.17854 #. type: Content of: <book><chapter><sect1><sect2><title> 8.17855 -#: ../en/ch11-mq.xml:1243 8.17856 +#: ../en/ch12-mq.xml:1290 8.17857 msgid "Merging part of one patch into another" 8.17858 msgstr "合并补丁的部分内容到其它补丁" 8.17859 8.17860 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17861 -#: ../en/ch11-mq.xml:1245 8.17862 +#: ../en/ch12-mq.xml:1292 8.17863 msgid "" 8.17864 "Merging <emphasis>part</emphasis> of one patch into another is more difficult " 8.17865 "than combining entire patches." 8.17866 msgstr "" 8.17867 8.17868 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17869 -#: ../en/ch11-mq.xml:1249 8.17870 +#: ../en/ch12-mq.xml:1296 8.17871 msgid "" 8.17872 "If you want to move changes to entire files, you can use <command>filterdiff</" 8.17873 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role=" 8.17874 @@ -14905,7 +16995,7 @@ 8.17875 msgstr "" 8.17876 8.17877 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17878 -#: ../en/ch11-mq.xml:1262 8.17879 +#: ../en/ch12-mq.xml:1309 8.17880 msgid "" 8.17881 "If you have a patch that has multiple hunks modifying a file, and you only " 8.17882 "want to move a few of those hunks, the job becomes more messy, but you can " 8.17883 @@ -14914,32 +17004,32 @@ 8.17884 msgstr "" 8.17885 8.17886 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17887 -#: ../en/ch11-mq.xml:1270 8.17888 +#: ../en/ch12-mq.xml:1317 8.17889 msgid "This command prints three different kinds of number:" 8.17890 msgstr "" 8.17891 8.17892 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17893 -#: ../en/ch11-mq.xml:1273 8.17894 +#: ../en/ch12-mq.xml:1320 8.17895 msgid "" 8.17896 "(in the first column) a <emphasis>file number</emphasis> to identify each " 8.17897 "file modified in the patch;" 8.17898 msgstr "" 8.17899 8.17900 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17901 -#: ../en/ch11-mq.xml:1277 8.17902 +#: ../en/ch12-mq.xml:1324 8.17903 msgid "" 8.17904 "(on the next line, indented) the line number within a modified file where a " 8.17905 "hunk starts; and" 8.17906 msgstr "" 8.17907 8.17908 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.17909 -#: ../en/ch11-mq.xml:1280 8.17910 +#: ../en/ch12-mq.xml:1327 8.17911 msgid "" 8.17912 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk." 8.17913 msgstr "" 8.17914 8.17915 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17916 -#: ../en/ch11-mq.xml:1284 8.17917 +#: ../en/ch12-mq.xml:1331 8.17918 msgid "" 8.17919 "You'll have to use some visual inspection, and reading of the patch, to " 8.17920 "identify the file and hunk numbers you'll want, but you can then pass them to " 8.17921 @@ -14949,7 +17039,7 @@ 8.17922 msgstr "" 8.17923 8.17924 #. type: Content of: <book><chapter><sect1><sect2><para> 8.17925 -#: ../en/ch11-mq.xml:1292 8.17926 +#: ../en/ch12-mq.xml:1339 8.17927 msgid "" 8.17928 "Once you have this hunk, you can concatenate it onto the end of your " 8.17929 "destination patch and continue with the remainder of <xref linkend=\"sec:mq:" 8.17930 @@ -14957,19 +17047,19 @@ 8.17931 msgstr "" 8.17932 8.17933 #. type: Content of: <book><chapter><sect1><title> 8.17934 -#: ../en/ch11-mq.xml:1299 8.17935 +#: ../en/ch12-mq.xml:1346 8.17936 msgid "Differences between quilt and MQ" 8.17937 msgstr "MQ 与 quilt 的区别" 8.17938 8.17939 #. type: Content of: <book><chapter><sect1><para> 8.17940 -#: ../en/ch11-mq.xml:1301 8.17941 +#: ../en/ch12-mq.xml:1348 8.17942 msgid "" 8.17943 "If you are already familiar with quilt, MQ provides a similar command set. " 8.17944 "There are a few differences in the way that it works." 8.17945 msgstr "" 8.17946 8.17947 #. type: Content of: <book><chapter><sect1><para> 8.17948 -#: ../en/ch11-mq.xml:1305 8.17949 +#: ../en/ch12-mq.xml:1352 8.17950 msgid "" 8.17951 "You will already have noticed that most quilt commands have MQ counterparts " 8.17952 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions " 8.17953 @@ -14981,12 +17071,12 @@ 8.17954 msgstr "" 8.17955 8.17956 #. type: Content of: <book><chapter><title> 8.17957 -#: ../en/ch12-mq-collab.xml:5 8.17958 +#: ../en/ch13-mq-collab.xml:5 8.17959 msgid "Advanced uses of Mercurial Queues" 8.17960 msgstr "MQ 的高级用法" 8.17961 8.17962 #. type: Content of: <book><chapter><para> 8.17963 -#: ../en/ch12-mq-collab.xml:7 8.17964 +#: ../en/ch13-mq-collab.xml:7 8.17965 msgid "" 8.17966 "While it's easy to pick up straightforward uses of Mercurial Queues, use of a " 8.17967 "little discipline and some of MQ's less frequently used capabilities makes it " 8.17968 @@ -14994,7 +17084,7 @@ 8.17969 msgstr "" 8.17970 8.17971 #. type: Content of: <book><chapter><para> 8.17972 -#: ../en/ch12-mq-collab.xml:12 8.17973 +#: ../en/ch13-mq-collab.xml:12 8.17974 msgid "" 8.17975 "In this chapter, I will use as an example a technique I have used to manage " 8.17976 "the development of an Infiniband device driver for the Linux kernel. The " 8.17977 @@ -15004,7 +17094,7 @@ 8.17978 msgstr "" 8.17979 8.17980 #. type: Content of: <book><chapter><para> 8.17981 -#: ../en/ch12-mq-collab.xml:18 8.17982 +#: ../en/ch13-mq-collab.xml:18 8.17983 msgid "" 8.17984 "While much of the material in this chapter is specific to Linux, the same " 8.17985 "principles apply to any code base for which you're not the primary owner, and " 8.17986 @@ -15012,12 +17102,12 @@ 8.17987 msgstr "" 8.17988 8.17989 #. type: Content of: <book><chapter><sect1><title> 8.17990 -#: ../en/ch12-mq-collab.xml:24 8.17991 +#: ../en/ch13-mq-collab.xml:24 8.17992 msgid "The problem of many targets" 8.17993 msgstr "多个目标的问题" 8.17994 8.17995 #. type: Content of: <book><chapter><sect1><para> 8.17996 -#: ../en/ch12-mq-collab.xml:26 8.17997 +#: ../en/ch13-mq-collab.xml:26 8.17998 msgid "" 8.17999 "The Linux kernel changes rapidly, and has never been internally stable; " 8.18000 "developers frequently make drastic changes between releases. This means that " 8.18001 @@ -15027,14 +17117,14 @@ 8.18002 msgstr "" 8.18003 8.18004 #. type: Content of: <book><chapter><sect1><para> 8.18005 -#: ../en/ch12-mq-collab.xml:33 8.18006 +#: ../en/ch13-mq-collab.xml:33 8.18007 msgid "" 8.18008 "To maintain a driver, we have to keep a number of distinct versions of Linux " 8.18009 "in mind." 8.18010 msgstr "" 8.18011 8.18012 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18013 -#: ../en/ch12-mq-collab.xml:36 8.18014 +#: ../en/ch13-mq-collab.xml:36 8.18015 msgid "" 8.18016 "One target is the main Linux kernel development tree. Maintenance of the code " 8.18017 "is in this case partly shared by other developers in the kernel community, " 8.18018 @@ -15043,7 +17133,7 @@ 8.18019 msgstr "" 8.18020 8.18021 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18022 -#: ../en/ch12-mq-collab.xml:42 8.18023 +#: ../en/ch13-mq-collab.xml:42 8.18024 msgid "" 8.18025 "We also maintain a number of <quote>backports</quote> to older versions of " 8.18026 "the Linux kernel, to support the needs of customers who are running older " 8.18027 @@ -15054,7 +17144,7 @@ 8.18028 msgstr "" 8.18029 8.18030 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18031 -#: ../en/ch12-mq-collab.xml:50 8.18032 +#: ../en/ch13-mq-collab.xml:50 8.18033 msgid "" 8.18034 "Finally, we make software releases on a schedule that is necessarily not " 8.18035 "aligned with those used by Linux distributors and kernel developers, so that " 8.18036 @@ -15063,19 +17153,19 @@ 8.18037 msgstr "" 8.18038 8.18039 #. type: Content of: <book><chapter><sect1><sect2><title> 8.18040 -#: ../en/ch12-mq-collab.xml:58 8.18041 +#: ../en/ch13-mq-collab.xml:58 8.18042 msgid "Tempting approaches that don't work well" 8.18043 msgstr "工作不好的诱人方法" 8.18044 8.18045 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18046 -#: ../en/ch12-mq-collab.xml:60 8.18047 +#: ../en/ch13-mq-collab.xml:60 8.18048 msgid "" 8.18049 "There are two <quote>standard</quote> ways to maintain a piece of software " 8.18050 "that has to target many different environments." 8.18051 msgstr "" 8.18052 8.18053 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18054 -#: ../en/ch12-mq-collab.xml:64 8.18055 +#: ../en/ch13-mq-collab.xml:64 8.18056 msgid "" 8.18057 "The first is to maintain a number of branches, each intended for a single " 8.18058 "target. The trouble with this approach is that you must maintain iron " 8.18059 @@ -15087,7 +17177,7 @@ 8.18060 msgstr "" 8.18061 8.18062 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18063 -#: ../en/ch12-mq-collab.xml:74 8.18064 +#: ../en/ch13-mq-collab.xml:74 8.18065 msgid "" 8.18066 "The second is to maintain a single source tree filled with conditional " 8.18067 "statements that turn chunks of code on or off depending on the intended " 8.18068 @@ -15099,7 +17189,7 @@ 8.18069 msgstr "" 8.18070 8.18071 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18072 -#: ../en/ch12-mq-collab.xml:83 8.18073 +#: ../en/ch13-mq-collab.xml:83 8.18074 msgid "" 8.18075 "Neither of these approaches is well suited to a situation where you don't " 8.18076 "<quote>own</quote> the canonical copy of a source tree. In the case of a " 8.18077 @@ -15111,14 +17201,14 @@ 8.18078 msgstr "" 8.18079 8.18080 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18081 -#: ../en/ch12-mq-collab.xml:93 8.18082 +#: ../en/ch13-mq-collab.xml:93 8.18083 msgid "" 8.18084 "These approaches have the added weakness of making it difficult to generate " 8.18085 "well-formed patches to submit upstream." 8.18086 msgstr "" 8.18087 8.18088 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18089 -#: ../en/ch12-mq-collab.xml:97 8.18090 +#: ../en/ch13-mq-collab.xml:97 8.18091 msgid "" 8.18092 "In principle, Mercurial Queues seems like a good candidate to manage a " 8.18093 "development scenario such as the above. While this is indeed the case, MQ " 8.18094 @@ -15126,12 +17216,12 @@ 8.18095 msgstr "" 8.18096 8.18097 #. type: Content of: <book><chapter><sect1><title> 8.18098 -#: ../en/ch12-mq-collab.xml:105 8.18099 +#: ../en/ch13-mq-collab.xml:105 8.18100 msgid "Conditionally applying patches with guards" 8.18101 msgstr "有条件的应用补丁" 8.18102 8.18103 #. type: Content of: <book><chapter><sect1><para> 8.18104 -#: ../en/ch12-mq-collab.xml:107 8.18105 +#: ../en/ch13-mq-collab.xml:107 8.18106 msgid "" 8.18107 "Perhaps the best way to maintain sanity with so many targets is to be able to " 8.18108 "choose specific patches to apply for a given situation. MQ provides a " 8.18109 @@ -15141,14 +17231,14 @@ 8.18110 msgstr "" 8.18111 8.18112 #. type: Content of: <book><chapter><sect1><para> 8.18113 -#: ../en/ch12-mq-collab.xml:116 8.18114 +#: ../en/ch13-mq-collab.xml:116 8.18115 msgid "" 8.18116 "This gives us a tiny repository that contains two patches that don't have any " 8.18117 "dependencies on each other, because they touch different files." 8.18118 msgstr "" 8.18119 8.18120 #. type: Content of: <book><chapter><sect1><para> 8.18121 -#: ../en/ch12-mq-collab.xml:120 8.18122 +#: ../en/ch13-mq-collab.xml:120 8.18123 msgid "" 8.18124 "The idea behind conditional application is that you can <quote>tag</quote> a " 8.18125 "patch with a <emphasis>guard</emphasis>, which is simply a text string of " 8.18126 @@ -15158,7 +17248,7 @@ 8.18127 msgstr "" 8.18128 8.18129 #. type: Content of: <book><chapter><sect1><para> 8.18130 -#: ../en/ch12-mq-collab.xml:127 8.18131 +#: ../en/ch13-mq-collab.xml:127 8.18132 msgid "" 8.18133 "A patch can have an arbitrary number of guards; each one is " 8.18134 "<emphasis>positive</emphasis> (<quote>apply this patch if this guard is " 8.18135 @@ -15167,12 +17257,12 @@ 8.18136 msgstr "" 8.18137 8.18138 #. type: Content of: <book><chapter><sect1><title> 8.18139 -#: ../en/ch12-mq-collab.xml:135 8.18140 +#: ../en/ch13-mq-collab.xml:135 8.18141 msgid "Controlling the guards on a patch" 8.18142 msgstr "控制补丁的应用条件" 8.18143 8.18144 #. type: Content of: <book><chapter><sect1><para> 8.18145 -#: ../en/ch12-mq-collab.xml:137 8.18146 +#: ../en/ch13-mq-collab.xml:137 8.18147 msgid "" 8.18148 "The <command role=\"hg-ext-mq\">qguard</command> command lets you determine " 8.18149 "which guards should apply to a patch, or display the guards that are already " 8.18150 @@ -15181,21 +17271,34 @@ 8.18151 msgstr "" 8.18152 8.18153 #. type: Content of: <book><chapter><sect1><para> 8.18154 -#: ../en/ch12-mq-collab.xml:144 8.18155 +#: ../en/ch13-mq-collab.xml:144 8.18156 msgid "" 8.18157 "To set a positive guard on a patch, prefix the name of the guard with a " 8.18158 "<quote><literal>+</literal></quote>." 8.18159 msgstr "" 8.18160 8.18161 #. type: Content of: <book><chapter><sect1><para> 8.18162 -#: ../en/ch12-mq-collab.xml:149 8.18163 +#: ../en/ch13-mq-collab.xml:149 8.18164 msgid "" 8.18165 "To set a negative guard on a patch, prefix the name of the guard with a " 8.18166 "<quote><literal>-</literal></quote>." 8.18167 msgstr "" 8.18168 8.18169 +#. type: Content of: <book><chapter><sect1><para> 8.18170 +#: ../en/ch13-mq-collab.xml:155 8.18171 +msgid "" 8.18172 +"Notice that we prefixed the arguments to the <command>hg qguard</command> " 8.18173 +"command with a <literal>--</literal> here, so that Mercurial would not " 8.18174 +"interpret the text <literal>-quux</literal> as an option." 8.18175 +msgstr "" 8.18176 + 8.18177 +#. type: Content of: <book><chapter><sect1><note><title> 8.18178 +#: ../en/ch13-mq-collab.xml:161 8.18179 +msgid "Setting vs. modifying" 8.18180 +msgstr "" 8.18181 + 8.18182 #. type: Content of: <book><chapter><sect1><note><para> 8.18183 -#: ../en/ch12-mq-collab.xml:156 8.18184 +#: ../en/ch13-mq-collab.xml:163 8.18185 msgid "" 8.18186 "The <command role=\"hg-ext-mq\">qguard</command> command <emphasis>sets</" 8.18187 "emphasis> the guards on a patch; it doesn't <emphasis>modify</emphasis> " 8.18188 @@ -15207,7 +17310,7 @@ 8.18189 8.18190 # 8.18191 #. type: Content of: <book><chapter><sect1><para> 8.18192 -#: ../en/ch12-mq-collab.xml:165 8.18193 +#: ../en/ch13-mq-collab.xml:172 8.18194 msgid "" 8.18195 "Mercurial stores guards in the <filename role=\"special\">series</filename> " 8.18196 "file; the form in which they are stored is easy both to understand and to " 8.18197 @@ -15217,12 +17320,12 @@ 8.18198 msgstr "" 8.18199 8.18200 #. type: Content of: <book><chapter><sect1><title> 8.18201 -#: ../en/ch12-mq-collab.xml:177 8.18202 +#: ../en/ch13-mq-collab.xml:184 8.18203 msgid "Selecting the guards to use" 8.18204 msgstr "选择使用的条件" 8.18205 8.18206 #. type: Content of: <book><chapter><sect1><para> 8.18207 -#: ../en/ch12-mq-collab.xml:179 8.18208 +#: ../en/ch13-mq-collab.xml:186 8.18209 msgid "" 8.18210 "The <command role=\"hg-ext-mq\">qselect</command> command determines which " 8.18211 "guards are active at a given time. The effect of this is to determine which " 8.18212 @@ -15232,7 +17335,7 @@ 8.18213 msgstr "" 8.18214 8.18215 #. type: Content of: <book><chapter><sect1><para> 8.18216 -#: ../en/ch12-mq-collab.xml:186 8.18217 +#: ../en/ch13-mq-collab.xml:193 8.18218 msgid "" 8.18219 "With no arguments, the <command role=\"hg-ext-mq\">qselect</command> command " 8.18220 "lists the guards currently in effect, one per line of output. Each argument " 8.18221 @@ -15240,21 +17343,21 @@ 8.18222 msgstr "" 8.18223 8.18224 #. type: Content of: <book><chapter><sect1><para> 8.18225 -#: ../en/ch12-mq-collab.xml:193 8.18226 +#: ../en/ch13-mq-collab.xml:200 8.18227 msgid "" 8.18228 "In case you're interested, the currently selected guards are stored in the " 8.18229 "<filename role=\"special\">guards</filename> file." 8.18230 msgstr "" 8.18231 8.18232 #. type: Content of: <book><chapter><sect1><para> 8.18233 -#: ../en/ch12-mq-collab.xml:198 8.18234 +#: ../en/ch13-mq-collab.xml:205 8.18235 msgid "" 8.18236 "We can see the effect the selected guards have when we run <command role=\"hg-" 8.18237 "ext-mq\">qpush</command>." 8.18238 msgstr "" 8.18239 8.18240 #. type: Content of: <book><chapter><sect1><para> 8.18241 -#: ../en/ch12-mq-collab.xml:203 8.18242 +#: ../en/ch13-mq-collab.xml:210 8.18243 msgid "" 8.18244 "A guard cannot start with a <quote><literal>+</literal></quote> or " 8.18245 "<quote><literal>-</literal></quote> character. The name of a guard must not " 8.18246 @@ -15263,61 +17366,61 @@ 8.18247 msgstr "" 8.18248 8.18249 #. type: Content of: <book><chapter><sect1><para> 8.18250 -#: ../en/ch12-mq-collab.xml:212 8.18251 +#: ../en/ch13-mq-collab.xml:219 8.18252 msgid "Changing the selected guards changes the patches that are applied." 8.18253 msgstr "" 8.18254 8.18255 #. type: Content of: <book><chapter><sect1><para> 8.18256 -#: ../en/ch12-mq-collab.xml:217 8.18257 +#: ../en/ch13-mq-collab.xml:224 8.18258 msgid "" 8.18259 "You can see in the example below that negative guards take precedence over " 8.18260 "positive guards." 8.18261 msgstr "" 8.18262 8.18263 #. type: Content of: <book><chapter><sect1><title> 8.18264 -#: ../en/ch12-mq-collab.xml:224 8.18265 +#: ../en/ch13-mq-collab.xml:231 8.18266 msgid "MQ's rules for applying patches" 8.18267 msgstr "MQ 应用补丁的规则" 8.18268 8.18269 #. type: Content of: <book><chapter><sect1><para> 8.18270 -#: ../en/ch12-mq-collab.xml:226 8.18271 +#: ../en/ch13-mq-collab.xml:233 8.18272 msgid "" 8.18273 "The rules that MQ uses when deciding whether to apply a patch are as follows." 8.18274 msgstr "" 8.18275 8.18276 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18277 -#: ../en/ch12-mq-collab.xml:229 8.18278 +#: ../en/ch13-mq-collab.xml:236 8.18279 msgid "A patch that has no guards is always applied." 8.18280 msgstr "" 8.18281 8.18282 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18283 -#: ../en/ch12-mq-collab.xml:232 8.18284 +#: ../en/ch13-mq-collab.xml:239 8.18285 msgid "" 8.18286 "If the patch has any negative guard that matches any currently selected " 8.18287 "guard, the patch is skipped." 8.18288 msgstr "" 8.18289 8.18290 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18291 -#: ../en/ch12-mq-collab.xml:235 8.18292 +#: ../en/ch13-mq-collab.xml:242 8.18293 msgid "" 8.18294 "If the patch has any positive guard that matches any currently selected " 8.18295 "guard, the patch is applied." 8.18296 msgstr "" 8.18297 8.18298 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18299 -#: ../en/ch12-mq-collab.xml:238 8.18300 +#: ../en/ch13-mq-collab.xml:245 8.18301 msgid "" 8.18302 "If the patch has positive or negative guards, but none matches any currently " 8.18303 "selected guard, the patch is skipped." 8.18304 msgstr "" 8.18305 8.18306 #. type: Content of: <book><chapter><sect1><title> 8.18307 -#: ../en/ch12-mq-collab.xml:245 8.18308 +#: ../en/ch13-mq-collab.xml:252 8.18309 msgid "Trimming the work environment" 8.18310 msgstr "修剪工作环境" 8.18311 8.18312 #. type: Content of: <book><chapter><sect1><para> 8.18313 -#: ../en/ch12-mq-collab.xml:247 8.18314 +#: ../en/ch13-mq-collab.xml:254 8.18315 msgid "" 8.18316 "In working on the device driver I mentioned earlier, I don't apply the " 8.18317 "patches to a normal Linux kernel tree. Instead, I use a repository that " 8.18318 @@ -15327,7 +17430,7 @@ 8.18319 msgstr "" 8.18320 8.18321 #. type: Content of: <book><chapter><sect1><para> 8.18322 -#: ../en/ch12-mq-collab.xml:254 8.18323 +#: ../en/ch13-mq-collab.xml:261 8.18324 msgid "" 8.18325 "I then choose a <quote>base</quote> version on top of which the patches are " 8.18326 "applied. This is a snapshot of the Linux kernel tree as of a revision of my " 8.18327 @@ -15339,7 +17442,7 @@ 8.18328 msgstr "" 8.18329 8.18330 #. type: Content of: <book><chapter><sect1><para> 8.18331 -#: ../en/ch12-mq-collab.xml:263 8.18332 +#: ../en/ch13-mq-collab.xml:270 8.18333 msgid "" 8.18334 "Normally, the base tree atop which the patches apply should be a snapshot of " 8.18335 "a very recent upstream tree. This best facilitates the development of " 8.18336 @@ -15347,12 +17450,12 @@ 8.18337 msgstr "" 8.18338 8.18339 #. type: Content of: <book><chapter><sect1><title> 8.18340 -#: ../en/ch12-mq-collab.xml:270 8.18341 +#: ../en/ch13-mq-collab.xml:277 8.18342 msgid "Dividing up the <filename role=\"special\">series</filename> file" 8.18343 msgstr "分类补丁<filename role=\"special\">系列</filename>" 8.18344 8.18345 #. type: Content of: <book><chapter><sect1><para> 8.18346 -#: ../en/ch12-mq-collab.xml:273 8.18347 +#: ../en/ch13-mq-collab.xml:280 8.18348 msgid "" 8.18349 "I categorise the patches in the <filename role=\"special\">series</filename> " 8.18350 "file into a number of logical groups. Each section of like patches begins " 8.18351 @@ -15361,14 +17464,14 @@ 8.18352 msgstr "" 8.18353 8.18354 #. type: Content of: <book><chapter><sect1><para> 8.18355 -#: ../en/ch12-mq-collab.xml:279 8.18356 +#: ../en/ch13-mq-collab.xml:286 8.18357 msgid "" 8.18358 "The sequence of patch groups that I maintain follows. The ordering of these " 8.18359 "groups is important; I'll describe why after I introduce the groups." 8.18360 msgstr "" 8.18361 8.18362 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18363 -#: ../en/ch12-mq-collab.xml:283 8.18364 +#: ../en/ch13-mq-collab.xml:290 8.18365 msgid "" 8.18366 "The <quote>accepted</quote> group. Patches that the development team has " 8.18367 "submitted to the maintainer of the Infiniband subsystem, and which he has " 8.18368 @@ -15379,14 +17482,14 @@ 8.18369 msgstr "" 8.18370 8.18371 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18372 -#: ../en/ch12-mq-collab.xml:291 8.18373 +#: ../en/ch13-mq-collab.xml:298 8.18374 msgid "" 8.18375 "The <quote>rework</quote> group. Patches that I have submitted, but that the " 8.18376 "upstream maintainer has requested modifications to before he will accept them." 8.18377 msgstr "" 8.18378 8.18379 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18380 -#: ../en/ch12-mq-collab.xml:296 8.18381 +#: ../en/ch13-mq-collab.xml:303 8.18382 msgid "" 8.18383 "The <quote>pending</quote> group. Patches that I have not yet submitted to " 8.18384 "the upstream maintainer, but which we have finished working on. These will be " 8.18385 @@ -15397,21 +17500,21 @@ 8.18386 msgstr "" 8.18387 8.18388 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18389 -#: ../en/ch12-mq-collab.xml:305 8.18390 +#: ../en/ch13-mq-collab.xml:312 8.18391 msgid "" 8.18392 "The <quote>in progress</quote> group. Patches that are actively being " 8.18393 "developed, and should not be submitted anywhere yet." 8.18394 msgstr "" 8.18395 8.18396 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18397 -#: ../en/ch12-mq-collab.xml:309 8.18398 +#: ../en/ch13-mq-collab.xml:316 8.18399 msgid "" 8.18400 "The <quote>backport</quote> group. Patches that adapt the source tree to " 8.18401 "older versions of the kernel tree." 8.18402 msgstr "" 8.18403 8.18404 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18405 -#: ../en/ch12-mq-collab.xml:313 8.18406 +#: ../en/ch13-mq-collab.xml:320 8.18407 msgid "" 8.18408 "The <quote>do not ship</quote> group. Patches that for some reason should " 8.18409 "never be submitted upstream. For example, one such patch might change " 8.18410 @@ -15421,7 +17524,7 @@ 8.18411 msgstr "" 8.18412 8.18413 #. type: Content of: <book><chapter><sect1><para> 8.18414 -#: ../en/ch12-mq-collab.xml:321 8.18415 +#: ../en/ch13-mq-collab.xml:328 8.18416 msgid "" 8.18417 "Now to return to the reasons for ordering groups of patches in this way. We " 8.18418 "would like the lowest patches in the stack to be as stable as possible, so " 8.18419 @@ -15431,7 +17534,7 @@ 8.18420 msgstr "" 8.18421 8.18422 #. type: Content of: <book><chapter><sect1><para> 8.18423 -#: ../en/ch12-mq-collab.xml:329 8.18424 +#: ../en/ch13-mq-collab.xml:336 8.18425 msgid "" 8.18426 "We would also like the patches that we know we'll need to modify to be " 8.18427 "applied on top of a source tree that resembles the upstream tree as closely " 8.18428 @@ -15439,7 +17542,7 @@ 8.18429 msgstr "" 8.18430 8.18431 #. type: Content of: <book><chapter><sect1><para> 8.18432 -#: ../en/ch12-mq-collab.xml:334 8.18433 +#: ../en/ch13-mq-collab.xml:341 8.18434 msgid "" 8.18435 "The <quote>backport</quote> and <quote>do not ship</quote> patches float at " 8.18436 "the end of the <filename role=\"special\">series</filename> file. The " 8.18437 @@ -15448,19 +17551,19 @@ 8.18438 msgstr "" 8.18439 8.18440 #. type: Content of: <book><chapter><sect1><title> 8.18441 -#: ../en/ch12-mq-collab.xml:343 8.18442 +#: ../en/ch13-mq-collab.xml:350 8.18443 msgid "Maintaining the patch series" 8.18444 msgstr "维护补丁系列" 8.18445 8.18446 #. type: Content of: <book><chapter><sect1><para> 8.18447 -#: ../en/ch12-mq-collab.xml:345 8.18448 +#: ../en/ch13-mq-collab.xml:352 8.18449 msgid "" 8.18450 "In my work, I use a number of guards to control which patches are to be " 8.18451 "applied." 8.18452 msgstr "" 8.18453 8.18454 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18455 -#: ../en/ch12-mq-collab.xml:349 8.18456 +#: ../en/ch13-mq-collab.xml:356 8.18457 msgid "" 8.18458 "<quote>Accepted</quote> patches are guarded with <literal>accepted</" 8.18459 "literal>. I enable this guard most of the time. When I'm applying the " 8.18460 @@ -15469,7 +17572,7 @@ 8.18461 msgstr "" 8.18462 8.18463 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18464 -#: ../en/ch12-mq-collab.xml:356 8.18465 +#: ../en/ch13-mq-collab.xml:363 8.18466 msgid "" 8.18467 "Patches that are <quote>finished</quote>, but not yet submitted, have no " 8.18468 "guards. If I'm applying the patch stack to a copy of the upstream tree, I " 8.18469 @@ -15477,21 +17580,21 @@ 8.18470 msgstr "" 8.18471 8.18472 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18473 -#: ../en/ch12-mq-collab.xml:362 8.18474 +#: ../en/ch13-mq-collab.xml:369 8.18475 msgid "" 8.18476 "Those patches that need reworking before being resubmitted are guarded with " 8.18477 "<literal>rework</literal>." 8.18478 msgstr "" 8.18479 8.18480 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18481 -#: ../en/ch12-mq-collab.xml:366 8.18482 +#: ../en/ch13-mq-collab.xml:373 8.18483 msgid "" 8.18484 "For those patches that are still under development, I use <literal>devel</" 8.18485 "literal>." 8.18486 msgstr "" 8.18487 8.18488 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18489 -#: ../en/ch12-mq-collab.xml:369 8.18490 +#: ../en/ch13-mq-collab.xml:376 8.18491 msgid "" 8.18492 "A backport patch may have several guards, one for each version of the kernel " 8.18493 "to which it applies. For example, a patch that backports a piece of code to " 8.18494 @@ -15499,7 +17602,7 @@ 8.18495 msgstr "" 8.18496 8.18497 #. type: Content of: <book><chapter><sect1><para> 8.18498 -#: ../en/ch12-mq-collab.xml:374 8.18499 +#: ../en/ch13-mq-collab.xml:381 8.18500 msgid "" 8.18501 "This variety of guards gives me considerable flexibility in determining what " 8.18502 "kind of source tree I want to end up with. For most situations, the " 8.18503 @@ -15508,12 +17611,12 @@ 8.18504 msgstr "" 8.18505 8.18506 #. type: Content of: <book><chapter><sect1><sect2><title> 8.18507 -#: ../en/ch12-mq-collab.xml:381 8.18508 +#: ../en/ch13-mq-collab.xml:388 8.18509 msgid "The art of writing backport patches" 8.18510 msgstr "编写向后移植补丁的艺术" 8.18511 8.18512 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18513 -#: ../en/ch12-mq-collab.xml:383 8.18514 +#: ../en/ch13-mq-collab.xml:390 8.18515 msgid "" 8.18516 "Using MQ, writing a backport patch is a simple process. All such a patch has " 8.18517 "to do is modify a piece of code that uses a kernel feature not present in the " 8.18518 @@ -15522,7 +17625,7 @@ 8.18519 msgstr "" 8.18520 8.18521 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18522 -#: ../en/ch12-mq-collab.xml:389 8.18523 +#: ../en/ch13-mq-collab.xml:396 8.18524 msgid "" 8.18525 "A useful goal when writing a good backport patch is to make your code look as " 8.18526 "if it was written for the older version of the kernel you're targeting. The " 8.18527 @@ -15536,7 +17639,7 @@ 8.18528 msgstr "" 8.18529 8.18530 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18531 -#: ../en/ch12-mq-collab.xml:402 8.18532 +#: ../en/ch13-mq-collab.xml:409 8.18533 msgid "" 8.18534 "There are two reasons to divide backport patches into a distinct group, away " 8.18535 "from the <quote>regular</quote> patches whose effects they modify. The first " 8.18536 @@ -15549,17 +17652,17 @@ 8.18537 msgstr "" 8.18538 8.18539 #. type: Content of: <book><chapter><sect1><title> 8.18540 -#: ../en/ch12-mq-collab.xml:417 8.18541 +#: ../en/ch13-mq-collab.xml:424 8.18542 msgid "Useful tips for developing with MQ" 8.18543 msgstr "使用 MQ 开发的技巧" 8.18544 8.18545 #. type: Content of: <book><chapter><sect1><sect2><title> 8.18546 -#: ../en/ch12-mq-collab.xml:420 8.18547 +#: ../en/ch13-mq-collab.xml:427 8.18548 msgid "Organising patches in directories" 8.18549 msgstr "将补丁放到几个目录中" 8.18550 8.18551 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18552 -#: ../en/ch12-mq-collab.xml:422 8.18553 +#: ../en/ch13-mq-collab.xml:429 8.18554 msgid "" 8.18555 "If you're working on a substantial project with MQ, it's not difficult to " 8.18556 "accumulate a large number of patches. For example, I have one patch " 8.18557 @@ -15567,7 +17670,7 @@ 8.18558 msgstr "" 8.18559 8.18560 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18561 -#: ../en/ch12-mq-collab.xml:427 8.18562 +#: ../en/ch13-mq-collab.xml:434 8.18563 msgid "" 8.18564 "If you can group these patches into separate logical categories, you can if " 8.18565 "you like store them in different directories; MQ has no problems with patch " 8.18566 @@ -15575,12 +17678,12 @@ 8.18567 msgstr "" 8.18568 8.18569 #. type: Content of: <book><chapter><sect1><sect2><title> 8.18570 -#: ../en/ch12-mq-collab.xml:434 8.18571 +#: ../en/ch13-mq-collab.xml:441 8.18572 msgid "Viewing the history of a patch" 8.18573 msgstr "察看补丁的历史" 8.18574 8.18575 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18576 -#: ../en/ch12-mq-collab.xml:436 8.18577 +#: ../en/ch13-mq-collab.xml:443 8.18578 msgid "" 8.18579 "If you're developing a set of patches over a long time, it's a good idea to " 8.18580 "maintain them in a repository, as discussed in <xref linkend=\"sec:mq:repo\"/" 8.18581 @@ -15593,7 +17696,7 @@ 8.18582 msgstr "" 8.18583 8.18584 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18585 -#: ../en/ch12-mq-collab.xml:448 8.18586 +#: ../en/ch13-mq-collab.xml:455 8.18587 msgid "" 8.18588 "However, you can use the <literal role=\"hg-ext\">extdiff</literal> " 8.18589 "extension, which is bundled with Mercurial, to turn a diff of two versions of " 8.18590 @@ -15606,7 +17709,7 @@ 8.18591 msgstr "" 8.18592 8.18593 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18594 -#: ../en/ch12-mq-collab.xml:459 8.18595 +#: ../en/ch13-mq-collab.xml:466 8.18596 msgid "" 8.18597 "You can enable the <literal role=\"hg-ext\">extdiff</literal> extension in " 8.18598 "the usual way, by adding a line to the <literal role=\"rc-extensions" 8.18599 @@ -15615,9 +17718,9 @@ 8.18600 msgstr "" 8.18601 8.18602 # 8.18603 -#. &example.hg-interdiff; 8.18604 -#. type: Content of: <book><chapter><sect1><sect2><para> 8.18605 -#: ../en/ch12-mq-collab.xml:466 8.18606 +#. &example.hg-interdiff; 8.18607 +#. type: Content of: <book><chapter><sect1><sect2><para> 8.18608 +#: ../en/ch13-mq-collab.xml:473 8.18609 msgid "" 8.18610 "The <command>interdiff</command> command expects to be passed the names of " 8.18611 "two files, but the <literal role=\"hg-ext\">extdiff</literal> extension " 8.18612 @@ -15630,7 +17733,7 @@ 8.18613 msgstr "" 8.18614 8.18615 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18616 -#: ../en/ch12-mq-collab.xml:478 8.18617 +#: ../en/ch13-mq-collab.xml:485 8.18618 msgid "" 8.18619 "With the <filename role=\"special\">hg-interdiff</filename> program in your " 8.18620 "shell's search path, you can run it as follows, from inside an MQ patch " 8.18621 @@ -15638,7 +17741,7 @@ 8.18622 msgstr "" 8.18623 8.18624 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18625 -#: ../en/ch12-mq-collab.xml:482 8.18626 +#: ../en/ch13-mq-collab.xml:489 8.18627 msgid "" 8.18628 "Since you'll probably want to use this long-winded command a lot, you can get " 8.18629 "<literal role=\"hg-ext\">hgext</literal> to make it available as a normal " 8.18630 @@ -15647,7 +17750,7 @@ 8.18631 msgstr "" 8.18632 8.18633 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18634 -#: ../en/ch12-mq-collab.xml:489 8.18635 +#: ../en/ch13-mq-collab.xml:496 8.18636 msgid "" 8.18637 "This directs <literal role=\"hg-ext\">hgext</literal> to make an " 8.18638 "<literal>interdiff</literal> command available, so you can now shorten the " 8.18639 @@ -15656,7 +17759,7 @@ 8.18640 msgstr "" 8.18641 8.18642 #. type: Content of: <book><chapter><sect1><sect2><note><para> 8.18643 -#: ../en/ch12-mq-collab.xml:497 8.18644 +#: ../en/ch13-mq-collab.xml:504 8.18645 msgid "" 8.18646 "The <command>interdiff</command> command works well only if the underlying " 8.18647 "files against which versions of a patch are generated remain the same. If " 8.18648 @@ -15665,7 +17768,7 @@ 8.18649 msgstr "" 8.18650 8.18651 #. type: Content of: <book><chapter><sect1><sect2><para> 8.18652 -#: ../en/ch12-mq-collab.xml:505 8.18653 +#: ../en/ch13-mq-collab.xml:512 8.18654 msgid "" 8.18655 "The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more " 8.18656 "than merely improving the presentation of MQ patches. To read more about it, " 8.18657 @@ -15673,12 +17776,12 @@ 8.18658 msgstr "" 8.18659 8.18660 #. type: Content of: <book><chapter><title> 8.18661 -#: ../en/ch13-hgext.xml:5 8.18662 +#: ../en/ch14-hgext.xml:5 8.18663 msgid "Adding functionality with extensions" 8.18664 msgstr "使用扩展增加功能" 8.18665 8.18666 #. type: Content of: <book><chapter><para> 8.18667 -#: ../en/ch13-hgext.xml:7 8.18668 +#: ../en/ch14-hgext.xml:7 8.18669 msgid "" 8.18670 "While the core of Mercurial is quite complete from a functionality " 8.18671 "standpoint, it's deliberately shorn of fancy features. This approach of " 8.18672 @@ -15687,7 +17790,7 @@ 8.18673 msgstr "" 8.18674 8.18675 #. type: Content of: <book><chapter><para> 8.18676 -#: ../en/ch13-hgext.xml:12 8.18677 +#: ../en/ch14-hgext.xml:12 8.18678 msgid "" 8.18679 "However, Mercurial doesn't box you in with an inflexible command set: you can " 8.18680 "add features to it as <emphasis>extensions</emphasis> (sometimes known as " 8.18681 @@ -15696,7 +17799,7 @@ 8.18682 msgstr "" 8.18683 8.18684 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 8.18685 -#: ../en/ch13-hgext.xml:18 8.18686 +#: ../en/ch14-hgext.xml:18 8.18687 msgid "" 8.18688 "<xref linkend=\"sec:tour-merge:fetch\"/> covers the <literal role=\"hg-ext" 8.18689 "\">fetch</literal> extension; this combines pulling new changes and merging " 8.18690 @@ -15705,7 +17808,7 @@ 8.18691 msgstr "" 8.18692 8.18693 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 8.18694 -#: ../en/ch13-hgext.xml:24 8.18695 +#: ../en/ch14-hgext.xml:24 8.18696 msgid "" 8.18697 "In <xref linkend=\"chap:hook\"/>, we covered several extensions that are " 8.18698 "useful for hook-related functionality: <literal role=\"hg-ext\">acl</literal> " 8.18699 @@ -15715,7 +17818,7 @@ 8.18700 msgstr "" 8.18701 8.18702 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 8.18703 -#: ../en/ch13-hgext.xml:33 8.18704 +#: ../en/ch14-hgext.xml:33 8.18705 msgid "" 8.18706 "The Mercurial Queues patch management extension is so invaluable that it " 8.18707 "merits two chapters and an appendix all to itself. <xref linkend=\"chap:mq\"/" 8.18708 @@ -15724,7 +17827,7 @@ 8.18709 msgstr "" 8.18710 8.18711 #. type: Content of: <book><chapter><para> 8.18712 -#: ../en/ch13-hgext.xml:43 8.18713 +#: ../en/ch14-hgext.xml:43 8.18714 msgid "" 8.18715 "In this chapter, we'll cover some of the other extensions that are available " 8.18716 "for Mercurial, and briefly touch on some of the machinery you'll need to know " 8.18717 @@ -15732,7 +17835,7 @@ 8.18718 msgstr "" 8.18719 8.18720 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 8.18721 -#: ../en/ch13-hgext.xml:48 8.18722 +#: ../en/ch14-hgext.xml:48 8.18723 msgid "" 8.18724 "In <xref linkend=\"sec:hgext:inotify\"/>, we'll discuss the possibility of " 8.18725 "<emphasis>huge</emphasis> performance improvements using the <literal role=" 8.18726 @@ -15740,21 +17843,21 @@ 8.18727 msgstr "" 8.18728 8.18729 #. type: Content of: <book><chapter><sect1><title> 8.18730 -#: ../en/ch13-hgext.xml:55 8.18731 +#: ../en/ch14-hgext.xml:55 8.18732 msgid "" 8.18733 "Improve performance with the <literal role=\"hg-ext\">inotify</literal> " 8.18734 "extension" 8.18735 msgstr "使用扩展 <literal role=\"hg-ext\">inotify</literal> 以提高性能" 8.18736 8.18737 #. type: Content of: <book><chapter><sect1><para> 8.18738 -#: ../en/ch13-hgext.xml:58 8.18739 +#: ../en/ch14-hgext.xml:58 8.18740 msgid "" 8.18741 "Are you interested in having some of the most common Mercurial operations run " 8.18742 "as much as a hundred times faster? Read on!" 8.18743 msgstr "" 8.18744 8.18745 #. type: Content of: <book><chapter><sect1><para> 8.18746 -#: ../en/ch13-hgext.xml:62 8.18747 +#: ../en/ch14-hgext.xml:62 8.18748 msgid "" 8.18749 "Mercurial has great performance under normal circumstances. For example, " 8.18750 "when you run the <command role=\"hg-cmd\">hg status</command> command, " 8.18751 @@ -15766,7 +17869,7 @@ 8.18752 msgstr "" 8.18753 8.18754 #. type: Content of: <book><chapter><sect1><para> 8.18755 -#: ../en/ch13-hgext.xml:72 8.18756 +#: ../en/ch14-hgext.xml:72 8.18757 msgid "" 8.18758 "Because obtaining file status is crucial to good performance, the authors of " 8.18759 "Mercurial have optimised this code to within an inch of its life. However, " 8.18760 @@ -15778,7 +17881,7 @@ 8.18761 msgstr "" 8.18762 8.18763 #. type: Content of: <book><chapter><sect1><para> 8.18764 -#: ../en/ch13-hgext.xml:82 8.18765 +#: ../en/ch14-hgext.xml:82 8.18766 msgid "" 8.18767 "To put a number on the magnitude of this effect, I created a repository " 8.18768 "containing 150,000 managed files. I timed <command role=\"hg-cmd\">hg " 8.18769 @@ -15787,7 +17890,7 @@ 8.18770 msgstr "" 8.18771 8.18772 #. type: Content of: <book><chapter><sect1><para> 8.18773 -#: ../en/ch13-hgext.xml:88 8.18774 +#: ../en/ch14-hgext.xml:88 8.18775 msgid "" 8.18776 "Many modern operating systems contain a file notification facility. If a " 8.18777 "program signs up to an appropriate service, the operating system will notify " 8.18778 @@ -15797,14 +17900,14 @@ 8.18779 msgstr "" 8.18780 8.18781 #. type: Content of: <book><chapter><sect1><para> 8.18782 -#: ../en/ch13-hgext.xml:95 8.18783 +#: ../en/ch14-hgext.xml:95 8.18784 msgid "" 8.18785 "Mercurial's <literal role=\"hg-ext\">inotify</literal> extension talks to the " 8.18786 "kernel's <literal>inotify</literal> component to optimise <command role=\"hg-" 8.18787 "cmd\">hg status</command> commands. The extension has two components. A " 8.18788 "daemon sits in the background and receives notifications from the " 8.18789 "<literal>inotify</literal> subsystem. It also listens for connections from a " 8.18790 -"regular Mercurial command. The extension modifies Mercurial's behaviour so " 8.18791 +"regular Mercurial command. The extension modifies Mercurial's behavior so " 8.18792 "that instead of scanning the filesystem, it queries the daemon. Since the " 8.18793 "daemon has perfect information about the state of the repository, it can " 8.18794 "respond with a result instantaneously, avoiding the need to scan every " 8.18795 @@ -15812,7 +17915,7 @@ 8.18796 msgstr "" 8.18797 8.18798 #. type: Content of: <book><chapter><sect1><para> 8.18799 -#: ../en/ch13-hgext.xml:108 8.18800 +#: ../en/ch14-hgext.xml:108 8.18801 msgid "" 8.18802 "Recall the ten seconds that I measured plain Mercurial as taking to run " 8.18803 "<command role=\"hg-cmd\">hg status</command> on a 150,000 file repository. " 8.18804 @@ -15822,12 +17925,12 @@ 8.18805 msgstr "" 8.18806 8.18807 #. type: Content of: <book><chapter><sect1><para> 8.18808 -#: ../en/ch13-hgext.xml:115 8.18809 +#: ../en/ch14-hgext.xml:115 8.18810 msgid "Before we continue, please pay attention to some caveats." 8.18811 msgstr "" 8.18812 8.18813 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18814 -#: ../en/ch13-hgext.xml:118 8.18815 +#: ../en/ch14-hgext.xml:118 8.18816 msgid "" 8.18817 "The <literal role=\"hg-ext\">inotify</literal> extension is Linux-specific. " 8.18818 "Because it interfaces directly to the Linux kernel's <literal>inotify</" 8.18819 @@ -15835,7 +17938,7 @@ 8.18820 msgstr "" 8.18821 8.18822 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18823 -#: ../en/ch13-hgext.xml:123 8.18824 +#: ../en/ch14-hgext.xml:123 8.18825 msgid "" 8.18826 "It should work on any Linux distribution that was released after early 2005. " 8.18827 "Older distributions are likely to have a kernel that lacks <literal>inotify</" 8.18828 @@ -15844,7 +17947,7 @@ 8.18829 msgstr "" 8.18830 8.18831 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 8.18832 -#: ../en/ch13-hgext.xml:130 8.18833 +#: ../en/ch14-hgext.xml:130 8.18834 msgid "" 8.18835 "Not all filesystems are suitable for use with the <literal role=\"hg-ext" 8.18836 "\">inotify</literal> extension. Network filesystems such as NFS are a non-" 8.18837 @@ -15856,7 +17959,7 @@ 8.18838 msgstr "" 8.18839 8.18840 #. type: Content of: <book><chapter><sect1><para> 8.18841 -#: ../en/ch13-hgext.xml:141 8.18842 +#: ../en/ch14-hgext.xml:141 8.18843 msgid "" 8.18844 "The <literal role=\"hg-ext\">inotify</literal> extension is not yet shipped " 8.18845 "with Mercurial as of May 2007, so it's a little more involved to set up than " 8.18846 @@ -15864,7 +17967,7 @@ 8.18847 msgstr "" 8.18848 8.18849 #. type: Content of: <book><chapter><sect1><para> 8.18850 -#: ../en/ch13-hgext.xml:146 8.18851 +#: ../en/ch14-hgext.xml:146 8.18852 msgid "" 8.18853 "The extension currently comes in two parts: a set of patches to the Mercurial " 8.18854 "source code, and a library of Python bindings to the <literal>inotify</" 8.18855 @@ -15872,7 +17975,7 @@ 8.18856 msgstr "" 8.18857 8.18858 #. type: Content of: <book><chapter><sect1><note><para> 8.18859 -#: ../en/ch13-hgext.xml:150 8.18860 +#: ../en/ch14-hgext.xml:150 8.18861 msgid "" 8.18862 "There are <emphasis>two</emphasis> Python <literal>inotify</literal> binding " 8.18863 "libraries. One of them is called <literal>pyinotify</literal>, and is " 8.18864 @@ -15882,14 +17985,14 @@ 8.18865 msgstr "" 8.18866 8.18867 #. type: Content of: <book><chapter><sect1><para> 8.18868 -#: ../en/ch13-hgext.xml:157 8.18869 +#: ../en/ch14-hgext.xml:157 8.18870 msgid "" 8.18871 "To get going, it's best to already have a functioning copy of Mercurial " 8.18872 "installed." 8.18873 msgstr "" 8.18874 8.18875 #. type: Content of: <book><chapter><sect1><note><para> 8.18876 -#: ../en/ch13-hgext.xml:160 8.18877 +#: ../en/ch14-hgext.xml:160 8.18878 msgid "" 8.18879 "If you follow the instructions below, you'll be <emphasis>replacing</" 8.18880 "emphasis> and overwriting any existing installation of Mercurial that you " 8.18881 @@ -15898,14 +18001,14 @@ 8.18882 msgstr "" 8.18883 8.18884 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18885 -#: ../en/ch13-hgext.xml:167 8.18886 +#: ../en/ch14-hgext.xml:167 8.18887 msgid "" 8.18888 "Clone the Python <literal>inotify</literal> binding repository. Build and " 8.18889 "install it." 8.18890 msgstr "" 8.18891 8.18892 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18893 -#: ../en/ch13-hgext.xml:174 8.18894 +#: ../en/ch14-hgext.xml:174 8.18895 msgid "" 8.18896 "Clone the <filename class=\"directory\">crew</filename> Mercurial " 8.18897 "repository. Clone the <literal role=\"hg-ext\">inotify</literal> patch " 8.18898 @@ -15914,7 +18017,7 @@ 8.18899 msgstr "" 8.18900 8.18901 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18902 -#: ../en/ch13-hgext.xml:184 8.18903 +#: ../en/ch14-hgext.xml:184 8.18904 msgid "" 8.18905 "Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext" 8.18906 "\">mq</literal>, enabled. If you've never used MQ, read <xref linkend=\"sec:" 8.18907 @@ -15922,7 +18025,7 @@ 8.18908 msgstr "" 8.18909 8.18910 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18911 -#: ../en/ch13-hgext.xml:190 8.18912 +#: ../en/ch14-hgext.xml:190 8.18913 msgid "" 8.18914 "Go into the <filename class=\"directory\">inotify</filename> repo, and apply " 8.18915 "all of the <literal role=\"hg-ext\">inotify</literal> patches using the " 8.18916 @@ -15931,19 +18034,19 @@ 8.18917 msgstr "" 8.18918 8.18919 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18920 -#: ../en/ch13-hgext.xml:199 8.18921 +#: ../en/ch14-hgext.xml:199 8.18922 msgid "" 8.18923 "If you get an error message from <command role=\"hg-ext-mq\">qpush</command>, " 8.18924 "you should not continue. Instead, ask for help." 8.18925 msgstr "" 8.18926 8.18927 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 8.18928 -#: ../en/ch13-hgext.xml:203 8.18929 +#: ../en/ch14-hgext.xml:203 8.18930 msgid "Build and install the patched version of Mercurial." 8.18931 msgstr "" 8.18932 8.18933 #. type: Content of: <book><chapter><sect1><para> 8.18934 -#: ../en/ch13-hgext.xml:209 8.18935 +#: ../en/ch14-hgext.xml:209 8.18936 msgid "" 8.18937 "Once you've build a suitably patched version of Mercurial, all you need to do " 8.18938 "to enable the <literal role=\"hg-ext\">inotify</literal> extension is add an " 8.18939 @@ -15951,7 +18054,7 @@ 8.18940 msgstr "" 8.18941 8.18942 #. type: Content of: <book><chapter><sect1><para> 8.18943 -#: ../en/ch13-hgext.xml:214 8.18944 +#: ../en/ch14-hgext.xml:214 8.18945 msgid "" 8.18946 "When the <literal role=\"hg-ext\">inotify</literal> extension is enabled, " 8.18947 "Mercurial will automatically and transparently start the status daemon the " 8.18948 @@ -15960,7 +18063,7 @@ 8.18949 msgstr "" 8.18950 8.18951 #. type: Content of: <book><chapter><sect1><para> 8.18952 -#: ../en/ch13-hgext.xml:220 8.18953 +#: ../en/ch14-hgext.xml:220 8.18954 msgid "" 8.18955 "The status daemon is started silently, and runs in the background. If you " 8.18956 "look at a list of running processes after you've enabled the <literal role=" 8.18957 @@ -15970,7 +18073,7 @@ 8.18958 msgstr "" 8.18959 8.18960 #. type: Content of: <book><chapter><sect1><para> 8.18961 -#: ../en/ch13-hgext.xml:228 8.18962 +#: ../en/ch14-hgext.xml:228 8.18963 msgid "" 8.18964 "The first time you run a Mercurial command in a repository when you have the " 8.18965 "<literal role=\"hg-ext\">inotify</literal> extension enabled, it will run " 8.18966 @@ -15986,7 +18089,7 @@ 8.18967 msgstr "" 8.18968 8.18969 #. type: Content of: <book><chapter><sect1><para> 8.18970 -#: ../en/ch13-hgext.xml:242 8.18971 +#: ../en/ch14-hgext.xml:242 8.18972 msgid "" 8.18973 "If you like, you can manually start a status daemon using the <command role=" 8.18974 "\"hg-ext-inotify\">inserve</command> command. This gives you slightly finer " 8.18975 @@ -15996,25 +18099,25 @@ 8.18976 msgstr "" 8.18977 8.18978 #. type: Content of: <book><chapter><sect1><para> 8.18979 -#: ../en/ch13-hgext.xml:249 8.18980 +#: ../en/ch14-hgext.xml:249 8.18981 msgid "" 8.18982 "When you're using the <literal role=\"hg-ext\">inotify</literal> extension, " 8.18983 "you should notice <emphasis>no difference at all</emphasis> in Mercurial's " 8.18984 -"behaviour, with the sole exception of status-related commands running a whole " 8.18985 +"behavior, with the sole exception of status-related commands running a whole " 8.18986 "lot faster than they used to. You should specifically expect that commands " 8.18987 "will not print different output; neither should they give different results. " 8.18988 "If either of these situations occurs, please report a bug." 8.18989 msgstr "" 8.18990 8.18991 #. type: Content of: <book><chapter><sect1><title> 8.18992 -#: ../en/ch13-hgext.xml:260 8.18993 +#: ../en/ch14-hgext.xml:260 8.18994 msgid "" 8.18995 "Flexible diff support with the <literal role=\"hg-ext\">extdiff</literal> " 8.18996 "extension" 8.18997 msgstr "使用扩展 <literal role=\"hg-ext\">extdiff</literal> 以扩展差异支持" 8.18998 8.18999 #. type: Content of: <book><chapter><sect1><para> 8.19000 -#: ../en/ch13-hgext.xml:263 8.19001 +#: ../en/ch14-hgext.xml:263 8.19002 msgid "" 8.19003 "Mercurial's built-in <command role=\"hg-cmd\">hg diff</command> command " 8.19004 "outputs plaintext unified diffs." 8.19005 @@ -16023,7 +18126,7 @@ 8.19006 "不同。" 8.19007 8.19008 #. type: Content of: <book><chapter><sect1><para> 8.19009 -#: ../en/ch13-hgext.xml:268 8.19010 +#: ../en/ch14-hgext.xml:268 8.19011 msgid "" 8.19012 "If you would like to use an external tool to display modifications, you'll " 8.19013 "want to use the <literal role=\"hg-ext\">extdiff</literal> extension. This " 8.19014 @@ -16031,7 +18134,7 @@ 8.19015 msgstr "" 8.19016 8.19017 #. type: Content of: <book><chapter><sect1><para> 8.19018 -#: ../en/ch13-hgext.xml:273 8.19019 +#: ../en/ch14-hgext.xml:273 8.19020 msgid "" 8.19021 "The <literal role=\"hg-ext\">extdiff</literal> extension is bundled with " 8.19022 "Mercurial, so it's easy to set up. In the <literal role=\"rc-extensions" 8.19023 @@ -16040,7 +18143,7 @@ 8.19024 msgstr "" 8.19025 8.19026 #. type: Content of: <book><chapter><sect1><para> 8.19027 -#: ../en/ch13-hgext.xml:280 8.19028 +#: ../en/ch14-hgext.xml:280 8.19029 msgid "" 8.19030 "This introduces a command named <command role=\"hg-ext-extdiff\">extdiff</" 8.19031 "command>, which by default uses your system's <command>diff</command> command " 8.19032 @@ -16049,7 +18152,7 @@ 8.19033 msgstr "" 8.19034 8.19035 #. type: Content of: <book><chapter><sect1><para> 8.19036 -#: ../en/ch13-hgext.xml:288 8.19037 +#: ../en/ch14-hgext.xml:288 8.19038 msgid "" 8.19039 "The result won't be exactly the same as with the built-in <command role=\"hg-" 8.19040 "cmd\">hg diff</command> variations, because the output of <command>diff</" 8.19041 @@ -16057,7 +18160,7 @@ 8.19042 msgstr "" 8.19043 8.19044 #. type: Content of: <book><chapter><sect1><para> 8.19045 -#: ../en/ch13-hgext.xml:293 8.19046 +#: ../en/ch14-hgext.xml:293 8.19047 msgid "" 8.19048 "As the <quote><literal>making snapshot</literal></quote> lines of output " 8.19049 "above imply, the <command role=\"hg-ext-extdiff\">extdiff</command> command " 8.19050 @@ -16071,7 +18174,7 @@ 8.19051 msgstr "" 8.19052 8.19053 #. type: Content of: <book><chapter><sect1><para> 8.19054 -#: ../en/ch13-hgext.xml:306 8.19055 +#: ../en/ch14-hgext.xml:306 8.19056 msgid "" 8.19057 "Snapshot directory names have the same base name as your repository. If your " 8.19058 "repository path is <filename class=\"directory\">/quux/bar/foo</filename>, " 8.19059 @@ -16088,7 +18191,7 @@ 8.19060 msgstr "" 8.19061 8.19062 #. type: Content of: <book><chapter><sect1><para> 8.19063 -#: ../en/ch13-hgext.xml:322 8.19064 +#: ../en/ch14-hgext.xml:322 8.19065 msgid "" 8.19066 "The <command role=\"hg-ext-extdiff\">extdiff</command> command accepts two " 8.19067 "important options. The <option role=\"hg-ext-extdiff-cmd-extdiff-opt\">hg -p</" 8.19068 @@ -16106,7 +18209,7 @@ 8.19069 8.19070 # 8.19071 #. type: Content of: <book><chapter><sect1><para> 8.19072 -#: ../en/ch13-hgext.xml:339 8.19073 +#: ../en/ch14-hgext.xml:339 8.19074 msgid "" 8.19075 "As an example, here's how to run the normal system <command>diff</command> " 8.19076 "command, getting it to generate context diffs (using the <option role=\"cmd-" 8.19077 @@ -16116,14 +18219,14 @@ 8.19078 msgstr "" 8.19079 8.19080 #. type: Content of: <book><chapter><sect1><para> 8.19081 -#: ../en/ch13-hgext.xml:348 8.19082 +#: ../en/ch14-hgext.xml:348 8.19083 msgid "" 8.19084 "Launching a visual diff tool is just as easy. Here's how to launch the " 8.19085 "<command>kdiff3</command> viewer." 8.19086 msgstr "" 8.19087 8.19088 #. type: Content of: <book><chapter><sect1><para> 8.19089 -#: ../en/ch13-hgext.xml:352 8.19090 +#: ../en/ch14-hgext.xml:352 8.19091 msgid "" 8.19092 "If your diff viewing command can't deal with directories, you can easily work " 8.19093 "around this with a little scripting. For an example of such scripting in " 8.19094 @@ -16133,12 +18236,12 @@ 8.19095 msgstr "" 8.19096 8.19097 #. type: Content of: <book><chapter><sect1><sect2><title> 8.19098 -#: ../en/ch13-hgext.xml:360 8.19099 +#: ../en/ch14-hgext.xml:360 8.19100 msgid "Defining command aliases" 8.19101 msgstr "定义命令的别名" 8.19102 8.19103 #. type: Content of: <book><chapter><sect1><sect2><para> 8.19104 -#: ../en/ch13-hgext.xml:362 8.19105 +#: ../en/ch14-hgext.xml:362 8.19106 msgid "" 8.19107 "It can be cumbersome to remember the options to both the <command role=\"hg-" 8.19108 "ext-extdiff\">extdiff</command> command and the diff viewer you want to use, " 8.19109 @@ -16148,7 +18251,7 @@ 8.19110 msgstr "" 8.19111 8.19112 #. type: Content of: <book><chapter><sect1><sect2><para> 8.19113 -#: ../en/ch13-hgext.xml:369 8.19114 +#: ../en/ch14-hgext.xml:369 8.19115 msgid "" 8.19116 "All you need to do is edit your <filename role=\"special\">~/.hgrc</" 8.19117 "filename>, and add a section named <literal role=\"rc-extdiff\">extdiff</" 8.19118 @@ -16160,7 +18263,7 @@ 8.19119 msgstr "" 8.19120 8.19121 #. type: Content of: <book><chapter><sect1><sect2><para> 8.19122 -#: ../en/ch13-hgext.xml:379 8.19123 +#: ../en/ch14-hgext.xml:379 8.19124 msgid "" 8.19125 "If you leave the right hand side of the definition empty, as above, the " 8.19126 "<literal role=\"hg-ext\">extdiff</literal> extension uses the name of the " 8.19127 @@ -16171,7 +18274,7 @@ 8.19128 msgstr "" 8.19129 8.19130 #. type: Content of: <book><chapter><sect1><sect2><para> 8.19131 -#: ../en/ch13-hgext.xml:389 8.19132 +#: ../en/ch14-hgext.xml:389 8.19133 msgid "" 8.19134 "You can also specify the default options that you want to invoke your diff " 8.19135 "viewing program with. The prefix to use is <quote><literal>opts.</literal></" 8.19136 @@ -16181,19 +18284,19 @@ 8.19137 msgstr "" 8.19138 8.19139 #. type: Content of: <book><chapter><sect1><title> 8.19140 -#: ../en/ch13-hgext.xml:403 8.19141 +#: ../en/ch14-hgext.xml:403 8.19142 msgid "" 8.19143 "Cherrypicking changes with the <literal role=\"hg-ext\">transplant</literal> " 8.19144 "extension" 8.19145 msgstr "使用扩展 <literal role=\"hg-ext\">transplant</literal> 以挑选修改" 8.19146 8.19147 #. type: Content of: <book><chapter><sect1><para> 8.19148 -#: ../en/ch13-hgext.xml:406 8.19149 +#: ../en/ch14-hgext.xml:406 8.19150 msgid "Need to have a long chat with Brendan about this." 8.19151 msgstr "" 8.19152 8.19153 #. type: Content of: <book><chapter><sect1><title> 8.19154 -#: ../en/ch13-hgext.xml:410 8.19155 +#: ../en/ch14-hgext.xml:410 8.19156 msgid "" 8.19157 "Send changes via email with the <literal role=\"hg-ext\">patchbomb</literal> " 8.19158 "extension" 8.19159 @@ -16201,7 +18304,7 @@ 8.19160 "使用扩展 <literal role=\"hg-ext\">patchbomb</literal> 通过 email 发送修改" 8.19161 8.19162 #. type: Content of: <book><chapter><sect1><para> 8.19163 -#: ../en/ch13-hgext.xml:413 8.19164 +#: ../en/ch14-hgext.xml:413 8.19165 msgid "" 8.19166 "Many projects have a culture of <quote>change review</quote>, in which people " 8.19167 "send their modifications to a mailing list for others to read and comment on " 8.19168 @@ -16211,7 +18314,7 @@ 8.19169 msgstr "" 8.19170 8.19171 #. type: Content of: <book><chapter><sect1><para> 8.19172 -#: ../en/ch13-hgext.xml:421 8.19173 +#: ../en/ch14-hgext.xml:421 8.19174 msgid "" 8.19175 "Mercurial makes it easy to send changes over email for review or application, " 8.19176 "via its <literal role=\"hg-ext\">patchbomb</literal> extension. The " 8.19177 @@ -16222,7 +18325,7 @@ 8.19178 msgstr "" 8.19179 8.19180 #. type: Content of: <book><chapter><sect1><para> 8.19181 -#: ../en/ch13-hgext.xml:429 8.19182 +#: ../en/ch14-hgext.xml:429 8.19183 msgid "" 8.19184 "As usual, the basic configuration of the <literal role=\"hg-ext\">patchbomb</" 8.19185 "literal> extension takes just one or two lines in your <filename role=" 8.19186 @@ -16230,14 +18333,14 @@ 8.19187 msgstr "" 8.19188 8.19189 #. type: Content of: <book><chapter><sect1><para> 8.19190 -#: ../en/ch13-hgext.xml:435 8.19191 +#: ../en/ch14-hgext.xml:435 8.19192 msgid "" 8.19193 "Once you've enabled the extension, you will have a new command available, " 8.19194 "named <command role=\"hg-ext-patchbomb\">email</command>." 8.19195 msgstr "" 8.19196 8.19197 #. type: Content of: <book><chapter><sect1><para> 8.19198 -#: ../en/ch13-hgext.xml:439 8.19199 +#: ../en/ch14-hgext.xml:439 8.19200 msgid "" 8.19201 "The safest and best way to invoke the <command role=\"hg-ext-patchbomb" 8.19202 "\">email</command> command is to <emphasis>always</emphasis> run it first " 8.19203 @@ -16250,7 +18353,7 @@ 8.19204 msgstr "" 8.19205 8.19206 #. type: Content of: <book><chapter><sect1><para> 8.19207 -#: ../en/ch13-hgext.xml:450 8.19208 +#: ../en/ch14-hgext.xml:450 8.19209 msgid "" 8.19210 "The <command role=\"hg-ext-patchbomb\">email</command> command accepts the " 8.19211 "same kind of revision syntax as every other Mercurial command. For example, " 8.19212 @@ -16259,7 +18362,7 @@ 8.19213 msgstr "" 8.19214 8.19215 #. type: Content of: <book><chapter><sect1><para> 8.19216 -#: ../en/ch13-hgext.xml:455 8.19217 +#: ../en/ch14-hgext.xml:455 8.19218 msgid "" 8.19219 "You can also specify a <emphasis>repository</emphasis> to compare with. If " 8.19220 "you provide a repository but no revisions, the <command role=\"hg-ext-" 8.19221 @@ -16271,7 +18374,7 @@ 8.19222 msgstr "" 8.19223 8.19224 #. type: Content of: <book><chapter><sect1><para> 8.19225 -#: ../en/ch13-hgext.xml:464 8.19226 +#: ../en/ch14-hgext.xml:464 8.19227 msgid "" 8.19228 "It's perfectly safe to run the <command role=\"hg-ext-patchbomb\">email</" 8.19229 "command> command without the names of the people you want to send to: if you " 8.19230 @@ -16282,7 +18385,7 @@ 8.19231 msgstr "" 8.19232 8.19233 #. type: Content of: <book><chapter><sect1><para> 8.19234 -#: ../en/ch13-hgext.xml:472 8.19235 +#: ../en/ch14-hgext.xml:472 8.19236 msgid "" 8.19237 "When you are sending just one revision, the <command role=\"hg-ext-patchbomb" 8.19238 "\">email</command> command will by default use the first line of the " 8.19239 @@ -16290,7 +18393,7 @@ 8.19240 msgstr "" 8.19241 8.19242 #. type: Content of: <book><chapter><sect1><para> 8.19243 -#: ../en/ch13-hgext.xml:477 8.19244 +#: ../en/ch14-hgext.xml:477 8.19245 msgid "" 8.19246 "If you send multiple revisions, the <command role=\"hg-ext-patchbomb\">email</" 8.19247 "command> command will usually send one message per changeset. It will " 8.19248 @@ -16299,12 +18402,12 @@ 8.19249 msgstr "" 8.19250 8.19251 #. type: Content of: <book><chapter><sect1><sect2><title> 8.19252 -#: ../en/ch13-hgext.xml:484 8.19253 -msgid "Changing the behaviour of patchbombs" 8.19254 +#: ../en/ch14-hgext.xml:484 8.19255 +msgid "Changing the behavior of patchbombs" 8.19256 msgstr "修改 patchbomb 的行为" 8.19257 8.19258 #. type: Content of: <book><chapter><sect1><sect2><para> 8.19259 -#: ../en/ch13-hgext.xml:486 8.19260 +#: ../en/ch14-hgext.xml:486 8.19261 msgid "" 8.19262 "Not every project has exactly the same conventions for sending changes in " 8.19263 "email; the <literal role=\"hg-ext\">patchbomb</literal> extension tries to " 8.19264 @@ -16312,7 +18415,7 @@ 8.19265 msgstr "" 8.19266 8.19267 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19268 -#: ../en/ch13-hgext.xml:492 8.19269 +#: ../en/ch14-hgext.xml:492 8.19270 msgid "" 8.19271 "You can write a subject for the introductory message on the command line " 8.19272 "using the <option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -s</option> " 8.19273 @@ -16320,7 +18423,7 @@ 8.19274 msgstr "" 8.19275 8.19276 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19277 -#: ../en/ch13-hgext.xml:498 8.19278 +#: ../en/ch14-hgext.xml:498 8.19279 msgid "" 8.19280 "To change the email address from which the messages originate, use the " 8.19281 "<option role=\"hg-ext-patchbomb-cmd-email-opt\">hg -f</option> option. This " 8.19282 @@ -16328,16 +18431,16 @@ 8.19283 msgstr "" 8.19284 8.19285 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19286 -#: ../en/ch13-hgext.xml:504 8.19287 -msgid "" 8.19288 -"The default behaviour is to send unified diffs (see <xref linkend=\"sec:mq:" 8.19289 +#: ../en/ch14-hgext.xml:504 8.19290 +msgid "" 8.19291 +"The default behavior is to send unified diffs (see <xref linkend=\"sec:mq:" 8.19292 "patch\"/> for a description of the format), one per message. You can send a " 8.19293 "binary bundle instead with the <option role=\"hg-ext-patchbomb-cmd-email-opt" 8.19294 "\">hg -b</option> option." 8.19295 msgstr "" 8.19296 8.19297 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19298 -#: ../en/ch13-hgext.xml:512 8.19299 +#: ../en/ch14-hgext.xml:512 8.19300 msgid "" 8.19301 "Unified diffs are normally prefaced with a metadata header. You can omit " 8.19302 "this, and send unadorned diffs, with the <option role=\"hg-ext-patchbomb-cmd-" 8.19303 @@ -16345,7 +18448,7 @@ 8.19304 msgstr "" 8.19305 8.19306 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19307 -#: ../en/ch13-hgext.xml:518 8.19308 +#: ../en/ch14-hgext.xml:518 8.19309 msgid "" 8.19310 "Diffs are normally sent <quote>inline</quote>, in the same body part as the " 8.19311 "description of a patch. This makes it easiest for the largest number of " 8.19312 @@ -16356,7 +18459,7 @@ 8.19313 msgstr "" 8.19314 8.19315 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19316 -#: ../en/ch13-hgext.xml:528 8.19317 +#: ../en/ch14-hgext.xml:528 8.19318 msgid "" 8.19319 "Instead of sending mail messages, you can write them to an <literal>mbox</" 8.19320 "literal>-format mail folder using the <option role=\"hg-ext-patchbomb-cmd-" 8.19321 @@ -16365,7 +18468,7 @@ 8.19322 msgstr "" 8.19323 8.19324 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 8.19325 -#: ../en/ch13-hgext.xml:535 8.19326 +#: ../en/ch14-hgext.xml:535 8.19327 msgid "" 8.19328 "If you would like to add a <command>diffstat</command>-format summary to each " 8.19329 "patch, and one to the introductory message, use the <option role=\"hg-ext-"