# HG changeset patch # User Dongsheng Song <songdongsheng@live.cn> # Date 1240020551 -28800 # Node ID 8613844dd2cf69af66760608e9ebf6259d11ffc7 # Parent 29f0f79cf6146b747b2cbc9afe658f6b23ee6810 Update po files with source xml files diff -r 29f0f79cf614 -r 8613844dd2cf po/zh.po --- a/po/zh.po Thu Apr 16 23:46:45 2009 -0700 +++ b/po/zh.po Sat Apr 18 10:09:11 2009 +0800 @@ -41,7 +41,7 @@ msgid "" msgstr "" "Project-Id-Version: hgbook 1.2\n" -"POT-Creation-Date: 2009-04-05 11:48+0800\n" +"POT-Creation-Date: 2009-04-18 10:05+0800\n" "PO-Revision-Date: 2009-04-05 12:10+0800\n" "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" @@ -349,7 +349,7 @@ "If <command role=\"hg-ext-mq\">qnew</command> finds modified files in the " "working directory, it will refuse to create a new patch unless the <option " "role=\"hg-ext-mq-cmd-qnew-opt\">-f</option> option is used (see below). This " -"behaviour allows you to <command role=\"hg-ext-mq\">qrefresh</command> your " +"behavior allows you to <command role=\"hg-ext-mq\">qrefresh</command> your " "topmost applied patch before you apply a new patch on top of it." msgstr "" @@ -436,7 +436,7 @@ msgid "" "By default, the <command role=\"hg-ext-mq\">qpop</command> command will not " "pop any patches if the working directory has been modified. You can override " -"this behaviour using the <option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option> " +"this behavior using the <option role=\"hg-ext-mq-cmd-qpop-opt\">-f</option> " "option, which reverts all modifications in the working directory." msgstr "" @@ -1420,7 +1420,7 @@ #: ../en/ch00-preface.xml:153 msgid "" "The advantage of this approach is that the examples are always accurate; they " -"describe <emphasis>exactly</emphasis> the behaviour of the version of " +"describe <emphasis>exactly</emphasis> the behavior of the version of " "Mercurial that's mentioned at the front of the book. If I update the version " "of Mercurial that I'm documenting, and the output of some command changes, " "the build fails." @@ -1451,7 +1451,7 @@ msgid "" "So when you're reading examples, don't place too much weight on the dates or " "times you see in the output of commands. But <emphasis>do</emphasis> be " -"confident that the behaviour you're seeing is consistent and reproducible." +"confident that the behavior you're seeing is consistent and reproducible." msgstr "" #. type: Content of: <book><preface><sect1><title> @@ -2579,7 +2579,7 @@ #. type: Content of: <book><chapter><sect1><figure> #: ../en/ch01-tour-basic.xml:259 ../en/ch02-tour-merge.xml:50 -#: ../en/ch02-tour-merge.xml:181 ../en/ch03-concepts.xml:293 +#: ../en/ch02-tour-merge.xml:188 ../en/ch03-concepts.xml:295 msgid "<placeholder type=\"mediaobject\" id=\"0\"/>" msgstr "" @@ -2591,13 +2591,13 @@ #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase> #: ../en/ch01-tour-basic.xml:261 ../en/ch02-tour-merge.xml:52 -#: ../en/ch02-tour-merge.xml:82 ../en/ch02-tour-merge.xml:129 -#: ../en/ch02-tour-merge.xml:183 ../en/ch02-tour-merge.xml:254 -#: ../en/ch03-concepts.xml:57 ../en/ch03-concepts.xml:106 -#: ../en/ch03-concepts.xml:191 ../en/ch03-concepts.xml:295 -#: ../en/ch03-concepts.xml:346 ../en/ch03-concepts.xml:361 -#: ../en/ch03-concepts.xml:402 ../en/ch03-concepts.xml:422 -#: ../en/ch03-concepts.xml:465 ../en/ch05-collab.xml:276 +#: ../en/ch02-tour-merge.xml:82 ../en/ch02-tour-merge.xml:163 +#: ../en/ch02-tour-merge.xml:190 ../en/ch02-tour-merge.xml:260 +#: ../en/ch03-concepts.xml:59 ../en/ch03-concepts.xml:108 +#: ../en/ch03-concepts.xml:193 ../en/ch03-concepts.xml:297 +#: ../en/ch03-concepts.xml:348 ../en/ch03-concepts.xml:363 +#: ../en/ch03-concepts.xml:404 ../en/ch03-concepts.xml:424 +#: ../en/ch03-concepts.xml:467 ../en/ch05-collab.xml:322 #: ../en/ch08-undo.xml:365 ../en/ch08-undo.xml:412 ../en/ch08-undo.xml:477 #: ../en/ch08-undo.xml:515 ../en/ch11-mq.xml:412 msgid "XXX add text" @@ -3040,7 +3040,7 @@ #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch01-tour-basic.xml:592 msgid "" -"To set a user name, use your favourite editor to create a file called " +"To set a user name, use your favorite editor to create a file called " "<filename role=\"special\">.hgrc</filename> in your home directory. " "Mercurial will use this file to look up your personalised configuration " "settings. The initial contents of your <filename role=\"special\">.hgrc</" @@ -3540,12 +3540,12 @@ "\"directory\">my-new-hello</filename> 之后版本库的内容" #. type: Content of: <book><chapter><sect1><sect2><figure> -#: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:125 -#: ../en/ch02-tour-merge.xml:250 ../en/ch03-concepts.xml:55 -#: ../en/ch03-concepts.xml:104 ../en/ch03-concepts.xml:189 -#: ../en/ch03-concepts.xml:344 ../en/ch03-concepts.xml:359 -#: ../en/ch03-concepts.xml:400 ../en/ch03-concepts.xml:420 -#: ../en/ch03-concepts.xml:461 ../en/ch05-collab.xml:274 +#: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:159 +#: ../en/ch02-tour-merge.xml:256 ../en/ch03-concepts.xml:57 +#: ../en/ch03-concepts.xml:106 ../en/ch03-concepts.xml:191 +#: ../en/ch03-concepts.xml:346 ../en/ch03-concepts.xml:361 +#: ../en/ch03-concepts.xml:402 ../en/ch03-concepts.xml:422 +#: ../en/ch03-concepts.xml:463 ../en/ch05-collab.xml:320 #: ../en/ch08-undo.xml:363 ../en/ch08-undo.xml:410 ../en/ch08-undo.xml:475 #: ../en/ch08-undo.xml:513 ../en/ch11-mq.xml:410 msgid " <placeholder type=\"mediaobject\" id=\"0\"/>" @@ -3590,25 +3590,13 @@ msgid "" "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> " "command won't do a merge; it won't update the working directory when it " -"thinks we might be wanting to do a merge, unless we force it to do so. " -"Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to " -"merge the two heads." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch02-tour-merge.xml:123 -msgid "Working directory and repository during merge, and following commit" -msgstr "在合并期间,以及提交之后的工作目录与版本库" - -#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch02-tour-merge.xml:126 -msgid "" -"<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:133 +"thinks we might want to do a merge, unless we force it to do so. Instead, we " +"use the <command role=\"hg-cmd\">hg merge</command> command to merge the two " +"heads." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:122 msgid "" "This updates the working directory so that it contains changes from " "<emphasis>both</emphasis> heads, which is reflected in both the output of " @@ -3617,12 +3605,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:143 +#: ../en/ch02-tour-merge.xml:132 msgid "Committing the results of the merge" msgstr "提交合并结果" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:145 +#: ../en/ch02-tour-merge.xml:134 msgid "" "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> " "will display two parents until we <command role=\"hg-cmd\">hg commit</" @@ -3630,7 +3618,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:152 +#: ../en/ch02-tour-merge.xml:141 msgid "" "We now have a new tip revision; notice that it has <emphasis>both</emphasis> " "of our former heads as its parents. These are the same revisions that were " @@ -3638,7 +3626,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:159 +#: ../en/ch02-tour-merge.xml:148 msgid "" "In <xref linkend=\"fig:tour-merge:merge\"/>, you can see a representation of " "what happens to the working directory during the merge, and how this affects " @@ -3647,35 +3635,57 @@ "changeset." msgstr "" +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch02-tour-merge.xml:157 +msgid "Working directory and repository during merge, and following commit" +msgstr "在合并期间,以及提交之后的工作目录与版本库" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch02-tour-merge.xml:160 +msgid "" +"<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </" +"imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:167 +msgid "" +"We sometimes talk about a merge having <emphasis>sides</emphasis>: the left " +"side is the first parent in the output of <command role=\"hg-cmd\">hg " +"parents</command>, and the right side is the second. If the working " +"directory was at e.g. revision 5 before we began a merge, that revision will " +"become the left side of the merge." +msgstr "" + #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch02-tour-merge.xml:170 +#: ../en/ch02-tour-merge.xml:177 msgid "Merging conflicting changes" msgstr "合并有冲突的改变" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:172 +#: ../en/ch02-tour-merge.xml:179 msgid "" "Most merges are simple affairs, but sometimes you'll find yourself merging " -"changes where each modifies the same portions of the same files. Unless both " -"modifications are identical, this results in a <emphasis>conflict</emphasis>, " -"where you have to decide how to reconcile the different changes into " -"something coherent." +"changes where each side modifies the same portions of the same files. Unless " +"both modifications are identical, this results in a <emphasis>conflict</" +"emphasis>, where you have to decide how to reconcile the different changes " +"into something coherent." msgstr "" #. type: Content of: <book><chapter><sect1><figure><title> -#: ../en/ch02-tour-merge.xml:180 +#: ../en/ch02-tour-merge.xml:187 msgid "Conflicting changes to a document" msgstr "冲突的修改" #. type: Content of: <book><chapter><sect1><figure><mediaobject> -#: ../en/ch02-tour-merge.xml:182 +#: ../en/ch02-tour-merge.xml:189 msgid "" "<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></" "imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:187 +#: ../en/ch02-tour-merge.xml:194 msgid "" "<xref linkend=\"fig:tour-merge:conflict\"/> illustrates an instance of two " "conflicting changes to a document. We started with a single version of the " @@ -3685,20 +3695,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:194 +#: ../en/ch02-tour-merge.xml:201 msgid "" "Mercurial doesn't have a built-in facility for handling conflicts. Instead, " -"it runs an external program called <command>hgmerge</command>. This is a " -"shell script that is bundled with Mercurial; you can change it to behave " -"however you please. What it does by default is try to find one of several " -"different merging tools that are likely to be installed on your system. It " -"first tries a few fully automatic merging tools; if these don't succeed " -"(because the resolution process requires human guidance) or aren't present, " -"the script tries a few different graphical merging tools." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:205 +"it runs an external program, usually one that displays some kind of graphical " +"conflict resolution interface. By default, Mercurial tries to find one of " +"several different merging tools that are likely to be installed on your " +"system. It first tries a few fully automatic merging tools; if these don't " +"succeed (because the resolution process requires human guidance) or aren't " +"present, it tries a few different graphical merging tools." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch02-tour-merge.xml:211 msgid "" "It's also possible to get Mercurial to run another program or script instead " "of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> " @@ -3706,12 +3715,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:211 +#: ../en/ch02-tour-merge.xml:217 msgid "Using a graphical merge tool" msgstr "使用图形合并工具" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:213 +#: ../en/ch02-tour-merge.xml:219 msgid "" "My preferred graphical merge tool is <command>kdiff3</command>, which I'll " "use to describe the features that are common to graphical file merging " @@ -3723,7 +3732,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch02-tour-merge.xml:223 +#: ../en/ch02-tour-merge.xml:229 msgid "" "At the left is the <emphasis>base</emphasis> version of the file, i.e. the " "most recent version from which the two versions we're trying to merge are " @@ -3731,21 +3740,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch02-tour-merge.xml:228 +#: ../en/ch02-tour-merge.xml:234 msgid "" "In the middle is <quote>our</quote> version of the file, with the contents " "that we modified." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch02-tour-merge.xml:231 +#: ../en/ch02-tour-merge.xml:237 msgid "" "On the right is <quote>their</quote> version of the file, the one that from " "the changeset that we're trying to merge with." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:235 +#: ../en/ch02-tour-merge.xml:241 msgid "" "In the pane below these is the current <emphasis>result</emphasis> of the " "merge. Our task is to replace all of the red text, which indicates unresolved " @@ -3754,7 +3763,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:242 +#: ../en/ch02-tour-merge.xml:248 msgid "" "All four of these panes are <emphasis>locked together</emphasis>; if we " "scroll vertically or horizontally in any of them, the others are updated to " @@ -3762,19 +3771,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch02-tour-merge.xml:248 +#: ../en/ch02-tour-merge.xml:254 msgid "Using <command>kdiff3</command> to merge versions of a file" msgstr "使用 <command>kdiff3</command> 合并文件的不同版本" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch02-tour-merge.xml:251 +#: ../en/ch02-tour-merge.xml:257 msgid "" "<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></" "imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:259 +#: ../en/ch02-tour-merge.xml:265 msgid "" "For each conflicting portion of the file, we can choose to resolve the " "conflict using some combination of text from the base version, ours, or " @@ -3783,7 +3792,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:265 +#: ../en/ch02-tour-merge.xml:271 msgid "" "There are <emphasis>many</emphasis> file merging tools available, too many to " "cover here. They vary in which platforms they are available for, and in " @@ -3793,12 +3802,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:274 +#: ../en/ch02-tour-merge.xml:280 msgid "A worked example" msgstr "合并实例" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:276 +#: ../en/ch02-tour-merge.xml:282 msgid "" "In this example, we will reproduce the file modification history of <xref " "linkend=\"fig:tour-merge:conflict\"/> above. Let's begin by creating a " @@ -3806,12 +3815,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:283 +#: ../en/ch02-tour-merge.xml:289 msgid "We'll clone the repository and make a change to the file." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:288 +#: ../en/ch02-tour-merge.xml:294 msgid "" "And another clone, to simulate someone else making a change to the file. " "(This hints at the idea that it's not all that unusual to merge with yourself " @@ -3820,27 +3829,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:296 +#: ../en/ch02-tour-merge.xml:302 msgid "" "Having created two different versions of the file, we'll set up an " "environment suitable for running our merge." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:302 -msgid "" -"In this example, I won't use Mercurial's normal <command>hgmerge</command> " -"program to do the merge, because it would drop my nice automated example-" -"running tool into a graphical user interface. Instead, I'll set " -"<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive " -"<command>merge</command> command. This is bundled with many Unix-like " -"systems. If you're following this example on your computer, don't bother " -"setting <envar>HGMERGE</envar>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:312 -msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>" +#: ../en/ch02-tour-merge.xml:308 +msgid "" +"In this example, I'll set <envar>HGMERGE</envar> to tell Mercurial to use the " +"non-interactive <command>merge</command> command. This is bundled with many " +"Unix-like systems. (If you're following this example on your computer, don't " +"bother setting <envar>HGMERGE</envar>.)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -3913,30 +3914,32 @@ msgid "" "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " -"extension acts as a combination of <command role=\"hg-cmd\">hg pull</" -"command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-" -"cmd\">hg merge</command>. It begins by pulling changes from another " +"extension acts as a combination of <command role=\"hg-cmd\">hg pull -u</" +"command>, <command role=\"hg-cmd\">hg merge</command> and <command role=\"hg-" +"cmd\">hg commit</command>. It begins by pulling changes from another " "repository into the current repository. If it finds that the changes added a " -"new head to the repository, it begins a merge, then commits the result of the " -"merge with an automatically-generated commit message. If no new heads were " -"added, it updates the working directory to the new tip changeset." +"new head to the repository, it begins a merge, then (if the merge succeeded) " +"commits the result of the merge with an automatically-generated commit " +"message. If no new heads were added, it updates the working directory to the " +"new tip changeset." msgstr "" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch02-tour-merge.xml:376 msgid "" "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. " -"Edit your <filename role=\"special\">.hgrc</filename>, and either go to the " -"<literal role=\"rc-extensions\">extensions</literal> section or create an " -"<literal role=\"rc-extensions\">extensions</literal> section. Then add a line " -"that simply reads <quote><literal>fetch </literal></quote>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:385 -msgid "" -"(Normally, on the right-hand side of the <quote><literal>=</literal></quote> " -"would appear the location of the extension, but since the <literal role=\"hg-" +"Edit the <filename role=\"special\">.hgrc</filename> file in your home " +"directory, and either go to the <literal role=\"rc-extensions\">extensions</" +"literal> section or create an <literal role=\"rc-extensions\">extensions</" +"literal> section. Then add a line that simply reads <quote><literal>fetch=</" +"literal></quote>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch02-tour-merge.xml:388 +msgid "" +"(Normally, the right-hand side of the <quote><literal>=</literal></quote> " +"would indicate where to find the extension, but since the <literal role=\"hg-" "ext\">fetch</literal> extension is in the standard distribution, Mercurial " "knows where to search for it.)" msgstr "" @@ -3951,22 +3954,24 @@ msgid "" "Unlike many revision control systems, the concepts upon which Mercurial is " "built are simple enough that it's easy to understand how the software really " -"works. Knowing this certainly isn't necessary, but I find it useful to have " -"a <quote>mental model</quote> of what's going on." +"works. Knowing these details certainly isn't necessary, so it is certainly " +"safe to skip this chapter. However, I think you will get more out of the " +"software with a <quote>mental model</quote> of what's going on." msgstr "" #. type: Content of: <book><chapter><para> -#: ../en/ch03-concepts.xml:13 -msgid "" -"This understanding gives me confidence that Mercurial has been carefully " -"designed to be both <emphasis>safe</emphasis> and <emphasis>efficient</" -"emphasis>. And just as importantly, if it's easy for me to retain a good " -"idea of what the software is doing when I perform a revision control task, " -"I'm less likely to be surprised by its behaviour." +#: ../en/ch03-concepts.xml:14 +msgid "" +"Being able to understand what's going on behind the scenes gives me " +"confidence that Mercurial has been carefully designed to be both " +"<emphasis>safe</emphasis> and <emphasis>efficient</emphasis>. And just as " +"importantly, if it's easy for me to retain a good idea of what the software " +"is doing when I perform a revision control task, I'm less likely to be " +"surprised by its behavior." msgstr "" #. type: Content of: <book><chapter><para> -#: ../en/ch03-concepts.xml:20 +#: ../en/ch03-concepts.xml:22 msgid "" "In this chapter, we'll initially cover the core concepts behind Mercurial's " "design, then continue to discuss some of the interesting details of its " @@ -3974,17 +3979,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:25 +#: ../en/ch03-concepts.xml:27 msgid "Mercurial's historical record" msgstr "Mercurial 的历史记录" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:28 +#: ../en/ch03-concepts.xml:30 msgid "Tracking the history of a single file" msgstr "跟踪单一文件的历史" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:30 +#: ../en/ch03-concepts.xml:32 msgid "" "When Mercurial tracks modifications to a file, it stores the history of that " "file in a metadata object called a <emphasis>filelog</emphasis>. Each entry " @@ -3996,7 +4001,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:41 +#: ../en/ch03-concepts.xml:43 msgid "" "A file that is large, or has a lot of history, has its filelog stored in " "separate data (<quote><literal>.d</literal></quote> suffix) and index " @@ -4008,23 +4013,23 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:53 +#: ../en/ch03-concepts.xml:55 msgid "" "Relationships between files in working directory and filelogs in repository" msgstr "工作目录中的文件与版本库中的文件日志之间的关系" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:56 +#: ../en/ch03-concepts.xml:58 msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:63 +#: ../en/ch03-concepts.xml:65 msgid "Managing tracked files" msgstr "管理跟踪的文件" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:65 +#: ../en/ch03-concepts.xml:67 msgid "" "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " "together information about the files that it tracks. Each entry in the " @@ -4034,12 +4039,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:75 +#: ../en/ch03-concepts.xml:77 msgid "Recording changeset information" msgstr "记录修改集信息" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:77 +#: ../en/ch03-concepts.xml:79 msgid "" "The <emphasis>changelog</emphasis> contains information about each " "changeset. Each revision records who committed a change, the changeset " @@ -4048,12 +4053,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:85 +#: ../en/ch03-concepts.xml:87 msgid "Relationships between revisions" msgstr "版本之间的关系" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:87 +#: ../en/ch03-concepts.xml:89 msgid "" "Within a changelog, a manifest, or a filelog, each revision stores a pointer " "to its immediate parent (or to its two parents, if it's a merge revision). " @@ -4063,7 +4068,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:94 +#: ../en/ch03-concepts.xml:96 msgid "" "For every changeset in a repository, there is exactly one revision stored in " "the changelog. Each revision of the changelog contains a pointer to a single " @@ -4074,17 +4079,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:103 +#: ../en/ch03-concepts.xml:105 msgid "Metadata relationships" msgstr "元数据之间的关系" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:105 +#: ../en/ch03-concepts.xml:107 msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:110 +#: ../en/ch03-concepts.xml:112 msgid "" "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " "one</quote> relationship between revisions in the changelog, manifest, or " @@ -4096,24 +4101,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:123 +#: ../en/ch03-concepts.xml:125 msgid "Safe, efficient storage" msgstr "安全,高效的存储" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:125 +#: ../en/ch03-concepts.xml:127 msgid "" "The underpinnings of changelogs, manifests, and filelogs are provided by a " "single structure called the <emphasis>revlog</emphasis>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:130 +#: ../en/ch03-concepts.xml:132 msgid "Efficient storage" msgstr "高效存储" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:132 +#: ../en/ch03-concepts.xml:134 msgid "" "The revlog provides efficient storage of revisions using a <emphasis>delta</" "emphasis> mechanism. Instead of storing a complete copy of a file for each " @@ -4123,7 +4128,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:140 +#: ../en/ch03-concepts.xml:142 msgid "" "Some obsolete revision control systems can only work with deltas of text " "files. They must either store binary files as complete snapshots or encoded " @@ -4133,12 +4138,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:149 +#: ../en/ch03-concepts.xml:151 msgid "Safe operation" msgstr "安全操作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:151 +#: ../en/ch03-concepts.xml:153 msgid "" "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog " "file. It never modifies a section of a file after it has written it. This is " @@ -4147,7 +4152,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:157 +#: ../en/ch03-concepts.xml:159 msgid "" "In addition, Mercurial treats every write as part of a <emphasis>transaction</" "emphasis> that can span a number of files. A transaction is " @@ -4159,7 +4164,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:167 +#: ../en/ch03-concepts.xml:169 msgid "" "The fact that Mercurial only appends to files makes it easier to provide this " "transactional guarantee. The easier it is to do stuff like this, the more " @@ -4167,12 +4172,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:174 +#: ../en/ch03-concepts.xml:176 msgid "Fast retrieval" msgstr "快速检索" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:176 +#: ../en/ch03-concepts.xml:178 msgid "" "Mercurial cleverly avoids a pitfall common to all earlier revision control " "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " @@ -4185,17 +4190,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:188 +#: ../en/ch03-concepts.xml:190 msgid "Snapshot of a revlog, with incremental deltas" msgstr "版本日志的快照,以及增量差异" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:190 +#: ../en/ch03-concepts.xml:192 msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:195 +#: ../en/ch03-concepts.xml:197 msgid "" "The innovation that Mercurial applies to this problem is simple but " "effective. Once the cumulative amount of delta information stored since the " @@ -4207,7 +4212,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:204 +#: ../en/ch03-concepts.xml:206 msgid "" "<xref linkend=\"fig:concepts:snapshot\"/> illustrates the idea. In an entry " "in a revlog's index file, Mercurial stores the range of entries from the data " @@ -4215,12 +4220,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:210 +#: ../en/ch03-concepts.xml:212 msgid "Aside: the influence of video compression" msgstr "旁白: 视频压缩的影响" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:212 +#: ../en/ch03-concepts.xml:214 msgid "" "If you're familiar with video compression or have ever watched a TV feed " "through a digital cable or satellite service, you may know that most video " @@ -4231,7 +4236,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:221 +#: ../en/ch03-concepts.xml:223 msgid "" "Because it's possible for a video stream to <quote>drop out</quote> " "occasionally due to signal glitches, and to limit the accumulation of " @@ -4244,12 +4249,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:235 +#: ../en/ch03-concepts.xml:237 msgid "Identification and strong integrity" msgstr "鉴别和强完整性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:237 +#: ../en/ch03-concepts.xml:239 msgid "" "Along with delta or snapshot information, a revlog entry contains a " "cryptographic hash of the data that it represents. This makes it difficult " @@ -4257,7 +4262,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:242 +#: ../en/ch03-concepts.xml:244 msgid "" "Hashes provide more than a mere check against corruption; they are used as " "the identifiers for revisions. The changeset identification hashes that you " @@ -4266,7 +4271,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:249 +#: ../en/ch03-concepts.xml:251 msgid "" "Mercurial verifies that hashes are correct when it retrieves file revisions " "and when it pulls changes from another repository. If it encounters an " @@ -4274,7 +4279,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:254 +#: ../en/ch03-concepts.xml:256 msgid "" "In addition to the effect it has on retrieval efficiency, Mercurial's use of " "periodic snapshots makes it more robust against partial data corruption. If " @@ -4285,12 +4290,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:266 +#: ../en/ch03-concepts.xml:268 msgid "Revision history, branching, and merging" msgstr "修订历史,分支与合并" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:268 +#: ../en/ch03-concepts.xml:270 msgid "" "Every entry in a Mercurial revlog knows the identity of its immediate " "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " @@ -4301,7 +4306,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:276 +#: ../en/ch03-concepts.xml:278 msgid "" "In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the " "conceptual structure of a revlog. Filelogs, manifests, and changelogs all " @@ -4310,7 +4315,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:282 +#: ../en/ch03-concepts.xml:284 msgid "" "The first revision in a revlog (at the bottom of the image) has the null ID " "in both of its parent slots. For a <quote>normal</quote> revision, its first " @@ -4322,29 +4327,29 @@ msgstr "" #. type: Content of: <book><chapter><sect1><figure><title> -#: ../en/ch03-concepts.xml:292 +#: ../en/ch03-concepts.xml:294 msgid "The conceptual structure of a revlog" msgstr "版本日志的设计结构" #. type: Content of: <book><chapter><sect1><figure><mediaobject> -#: ../en/ch03-concepts.xml:294 +#: ../en/ch03-concepts.xml:296 msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:301 +#: ../en/ch03-concepts.xml:303 msgid "The working directory" msgstr "工作目录" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:303 +#: ../en/ch03-concepts.xml:305 msgid "" "In the working directory, Mercurial stores a snapshot of the files from the " "repository as of a particular changeset." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:306 +#: ../en/ch03-concepts.xml:308 msgid "" "The working directory <quote>knows</quote> which changeset it contains. When " "you update the working directory to contain a particular changeset, Mercurial " @@ -4355,7 +4360,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:315 +#: ../en/ch03-concepts.xml:317 msgid "" "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " "working directory. This details which changeset the working directory is " @@ -4364,7 +4369,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:321 +#: ../en/ch03-concepts.xml:323 msgid "" "Just as a revision of a revlog has room for two parents, so that it can " "represent either a normal revision (with one parent) or a merge of two " @@ -4379,12 +4384,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:335 +#: ../en/ch03-concepts.xml:337 msgid "What happens when you commit" msgstr "当你提交时发生的事情" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:337 +#: ../en/ch03-concepts.xml:339 msgid "" "The dirstate stores parent information for more than just book-keeping " "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " @@ -4392,17 +4397,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:343 +#: ../en/ch03-concepts.xml:345 msgid "The working directory can have two parents" msgstr "工作目录可以有两个父亲" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:345 +#: ../en/ch03-concepts.xml:347 msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:350 +#: ../en/ch03-concepts.xml:352 msgid "" "<xref linkend=\"fig:concepts:wdir\"/> shows the normal state of the working " "directory, where it has a single changeset as parent. That changeset is the " @@ -4411,18 +4416,18 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:357 +#: ../en/ch03-concepts.xml:359 msgid "The working directory gains new parents after a commit" msgstr "提交之后,工作目录的父亲就改变了" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:360 +#: ../en/ch03-concepts.xml:362 msgid "" "<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:365 +#: ../en/ch03-concepts.xml:367 msgid "" "It's useful to think of the working directory as <quote>the changeset I'm " "about to commit</quote>. Any files that you tell Mercurial that you've " @@ -4432,7 +4437,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:373 +#: ../en/ch03-concepts.xml:375 msgid "" "After a commit, Mercurial will update the parents of the working directory, " "so that the first parent is the ID of the new changeset, and the second is " @@ -4442,12 +4447,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:384 +#: ../en/ch03-concepts.xml:386 msgid "Creating a new head" msgstr "创建新顶点" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:386 +#: ../en/ch03-concepts.xml:388 msgid "" "It's perfectly normal to update the working directory to a changeset other " "than the current tip. For example, you might want to know what your project " @@ -4460,18 +4465,18 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:398 +#: ../en/ch03-concepts.xml:400 msgid "The working directory, updated to an older changeset" msgstr "同步到旧修改集的工作目录" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:401 +#: ../en/ch03-concepts.xml:403 msgid "" "<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:406 +#: ../en/ch03-concepts.xml:408 msgid "" "Having updated the working directory to an older changeset, what happens if " "you make some changes, and then commit? Mercurial behaves in the same way as " @@ -4483,17 +4488,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:418 +#: ../en/ch03-concepts.xml:420 msgid "After a commit made while synced to an older changeset" msgstr "对同步到旧修改集的工作目录提交之后" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:421 +#: ../en/ch03-concepts.xml:423 msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch03-concepts.xml:427 +#: ../en/ch03-concepts.xml:429 msgid "" "If you're new to Mercurial, you should keep in mind a common <quote>error</" "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> " @@ -4507,23 +4512,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch03-concepts.xml:439 +#: ../en/ch03-concepts.xml:441 msgid "" "I put the word <quote>error</quote> in quotes because all that you need to do " "to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, " "then <command role=\"hg-cmd\">hg commit</command>. In other words, this " -"almost never has negative consequences; it just surprises people. I'll " -"discuss other ways to avoid this behaviour, and why Mercurial behaves in this " -"initially surprising way, later on." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:451 -msgid "Merging heads" -msgstr "合并顶点" - -#. type: Content of: <book><chapter><sect1><sect2><para> +"almost never has negative consequences; it's just something of a surprise for " +"newcomers. I'll discuss other ways to avoid this behavior, and why Mercurial " +"behaves in this initially surprising way, later on." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch03-concepts.xml:453 +#, fuzzy +msgid "Merging changes" +msgstr "共享修改" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:455 msgid "" "When you run the <command role=\"hg-cmd\">hg merge</command> command, " "Mercurial leaves the first parent of the working directory unchanged, and " @@ -4532,18 +4538,18 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch03-concepts.xml:460 +#: ../en/ch03-concepts.xml:462 msgid "Merging two heads" msgstr "合并两个顶点" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch03-concepts.xml:462 +#: ../en/ch03-concepts.xml:464 msgid "" "<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:469 +#: ../en/ch03-concepts.xml:471 msgid "" "Mercurial also has to modify the working directory, to merge the files " "managed in the two changesets. Simplified a little, the merging process goes " @@ -4551,33 +4557,33 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:474 +#: ../en/ch03-concepts.xml:476 msgid "If neither changeset has modified a file, do nothing with that file." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:477 +#: ../en/ch03-concepts.xml:479 msgid "" "If one changeset has modified a file, and the other hasn't, create the " "modified copy of the file in the working directory." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:481 +#: ../en/ch03-concepts.xml:483 msgid "" "If one changeset has removed a file, and the other hasn't (or has also " "deleted it), delete the file from the working directory." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:485 +#: ../en/ch03-concepts.xml:487 msgid "" "If one changeset has removed a file, but the other has modified the file, ask " "the user what to do: keep the modified file, or remove it?" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:489 +#: ../en/ch03-concepts.xml:491 msgid "" "If both changesets have modified a file, invoke an external merge program to " "choose the new contents for the merged file. This may require input from the " @@ -4585,14 +4591,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:494 +#: ../en/ch03-concepts.xml:496 msgid "" "If one changeset has modified a file, and the other has renamed or copied the " "file, make sure that the changes follow the new name of the file." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:498 +#: ../en/ch03-concepts.xml:500 msgid "" "There are more details&emdash;merging has plenty of corner cases&emdash;but " "these are the most common choices that are involved in a merge. As you can " @@ -4601,7 +4607,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:505 +#: ../en/ch03-concepts.xml:507 msgid "" "When you're thinking about what happens when you commit after a merge, once " "again the working directory is <quote>the changeset I'm about to commit</" @@ -4611,7 +4617,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:512 +#: ../en/ch03-concepts.xml:514 msgid "" "Mercurial lets you perform multiple merges, but you must commit the results " "of each individual merge as you go. This is necessary because Mercurial only " @@ -4621,13 +4627,38 @@ "becomes overwhelming." msgstr "" +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch03-concepts.xml:525 +#, fuzzy +msgid "Merging and renames" +msgstr "合并顶点" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:527 +msgid "" +"A surprising number of revision control systems pay little or no attention to " +"a file's <emphasis>name</emphasis> over time. For instance, it used to be " +"common that if a file got renamed on one side of a merge, the changes from " +"the other side would be silently dropped." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:533 +msgid "" +"Mercurial records metadata when you tell it to perform a rename or copy. It " +"uses this metadata during a merge to do the right thing in the case of a " +"merge. For instance, if I rename a file, and you edit it without renaming " +"it, when we merge our work the file will be renamed and have your edits " +"applied." +msgstr "" + #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:523 +#: ../en/ch03-concepts.xml:543 msgid "Other interesting design features" msgstr "其它有趣的设计特性" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:525 +#: ../en/ch03-concepts.xml:545 msgid "" "In the sections above, I've tried to highlight some of the most important " "aspects of Mercurial's design, to illustrate that it pays careful attention " @@ -4640,12 +4671,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:536 +#: ../en/ch03-concepts.xml:556 msgid "Clever compression" msgstr "智能压缩" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:538 +#: ../en/ch03-concepts.xml:558 msgid "" "When appropriate, Mercurial will store both snapshots and deltas in " "compressed form. It does this by always <emphasis>trying to</emphasis> " @@ -4654,7 +4685,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:544 +#: ../en/ch03-concepts.xml:564 msgid "" "This means that Mercurial does <quote>the right thing</quote> when storing a " "file whose native form is compressed, such as a <literal>zip</literal> " @@ -4664,7 +4695,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:552 +#: ../en/ch03-concepts.xml:572 msgid "" "Deltas between revisions of a compressed file are usually larger than " "snapshots of the file, and Mercurial again does <quote>the right thing</" @@ -4674,12 +4705,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:561 +#: ../en/ch03-concepts.xml:581 msgid "Network recompression" msgstr "网络重新压缩" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:563 +#: ../en/ch03-concepts.xml:583 msgid "" "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " "compression algorithm (the same one used by the popular <literal>zip</" @@ -4689,7 +4720,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:571 +#: ../en/ch03-concepts.xml:591 msgid "" "If the connection is over HTTP, Mercurial recompresses the entire stream of " "data using a compression algorithm that gives a better compression ratio (the " @@ -4697,11 +4728,11 @@ "compression package). This combination of algorithm and compression of the " "entire stream (instead of a revision at a time) substantially reduces the " "number of bytes to be transferred, yielding better network performance over " -"almost all kinds of network." +"most kinds of network." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:581 +#: ../en/ch03-concepts.xml:601 msgid "" "(If the connection is over <command>ssh</command>, Mercurial " "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" @@ -4709,12 +4740,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:589 +#: ../en/ch03-concepts.xml:609 msgid "Read/write ordering and atomicity" msgstr "读写顺序与原子性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:591 +#: ../en/ch03-concepts.xml:611 msgid "" "Appending to files isn't the whole story when it comes to guaranteeing that a " "reader won't see a partial write. If you recall <xref linkend=\"fig:concepts:" @@ -4724,7 +4755,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:599 +#: ../en/ch03-concepts.xml:619 msgid "" "A writer starts a transaction by writing filelog and manifest data, and " "doesn't write any changelog data until those are finished. A reader starts " @@ -4732,7 +4763,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:604 +#: ../en/ch03-concepts.xml:624 msgid "" "Since the writer has always finished writing filelog and manifest data before " "it writes to the changelog, a reader will never read a pointer to a partially " @@ -4741,12 +4772,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:612 +#: ../en/ch03-concepts.xml:632 msgid "Concurrent access" msgstr "并发访问" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:614 +#: ../en/ch03-concepts.xml:634 msgid "" "The read/write ordering and atomicity guarantees mean that Mercurial never " "needs to <emphasis>lock</emphasis> a repository when it's reading data, even " @@ -4757,7 +4788,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:623 +#: ../en/ch03-concepts.xml:643 msgid "" "The lockless nature of reading means that if you're sharing a repository on a " "multi-user system, you don't need to grant other local users permission to " @@ -4771,7 +4802,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:636 +#: ../en/ch03-concepts.xml:656 msgid "" "Mercurial uses locks to ensure that only one process can write to a " "repository at a time (the locking mechanism is safe even over filesystems " @@ -4785,12 +4816,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:648 +#: ../en/ch03-concepts.xml:668 msgid "Safe dirstate access" msgstr "安全的目录状态访问" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:650 +#: ../en/ch03-concepts.xml:670 msgid "" "As with revision data, Mercurial doesn't take a lock to read the dirstate " "file; it does acquire a lock to write it. To avoid the possibility of " @@ -4802,12 +4833,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:663 +#: ../en/ch03-concepts.xml:683 msgid "Avoiding seeks" msgstr "避免查找" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:665 +#: ../en/ch03-concepts.xml:685 msgid "" "Critical to Mercurial's performance is the avoidance of seeks of the disk " "head, since any seek is far more expensive than even a comparatively large " @@ -4815,7 +4846,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:669 +#: ../en/ch03-concepts.xml:689 msgid "" "This is why, for example, the dirstate is stored in a single file. If there " "were a dirstate file per directory that Mercurial tracked, the disk would " @@ -4824,7 +4855,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:675 +#: ../en/ch03-concepts.xml:695 msgid "" "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a " "repository on local storage. Instead of copying every revlog file from the " @@ -4837,7 +4868,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:686 +#: ../en/ch03-concepts.xml:706 msgid "" "A few revision control developers have pointed out that this idea of making a " "complete private copy of a file is not very efficient in its use of storage. " @@ -4849,12 +4880,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:698 +#: ../en/ch03-concepts.xml:718 msgid "Other contents of the dirstate" msgstr "目录状态的其它内容" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:700 +#: ../en/ch03-concepts.xml:720 msgid "" "Because Mercurial doesn't force you to tell it when you're modifying a file, " "it uses the dirstate to store some extra information so it can determine " @@ -4864,7 +4895,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:707 +#: ../en/ch03-concepts.xml:727 msgid "" "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role=" "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> " @@ -4873,7 +4904,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:714 +#: ../en/ch03-concepts.xml:734 msgid "" "When Mercurial is checking the states of files in the working directory, it " "first checks a file's modification time. If that has not changed, the file " @@ -4920,13 +4951,13 @@ msgid "" "After you run a <command role=\"hg-cmd\">hg commit</command>, the files that " "you added before the commit will no longer be listed in the output of " -"<command role=\"hg-cmd\">hg status</command>. The reason for this is that " -"<command role=\"hg-cmd\">hg status</command> only tells you about " -"<quote>interesting</quote> files&emdash;those that you have modified or told " -"Mercurial to do something with&emdash;by default. If you have a repository " -"that contains thousands of files, you will rarely want to know about files " -"that Mercurial is tracking, but that have not changed. (You can still get " -"this information; we'll return to this later.)" +"<command role=\"hg-cmd\">hg status</command>. The reason for this is that by " +"default, <command role=\"hg-cmd\">hg status</command> only tells you about " +"<quote>interesting</quote> files&emdash;those that you have (for example) " +"modified, removed, or renamed. If you have a repository that contains " +"thousands of files, you will rarely want to know about files that Mercurial " +"is tracking, but that have not changed. (You can still get this information; " +"we'll return to this later.)" msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -4946,7 +4977,7 @@ #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch04-daily.xml:47 msgid "" -"A useful behaviour that Mercurial has is that if you pass the name of a " +"A useful behavior that Mercurial has is that if you pass the name of a " "directory to a command, every Mercurial command will treat this as <quote>I " "want to operate on every file in this directory and its subdirectories</" "quote>." @@ -4956,16 +4987,16 @@ #: ../en/ch04-daily.xml:54 msgid "" "Notice in this example that Mercurial printed the names of the files it " -"added, whereas it didn't do so when we added the file named <filename>a</" -"filename> in the earlier example." +"added, whereas it didn't do so when we added the file named <filename>myfile." +"txt</filename> in the earlier example." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch04-daily.xml:59 msgid "" "What's going on is that in the former case, we explicitly named the file to " -"add on the command line, so the assumption that Mercurial makes in such cases " -"is that you know what you were doing, and it doesn't print any output." +"add on the command line. The assumption that Mercurial makes in such cases " +"is that we know what we are doing, and it doesn't print any output." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -4975,12 +5006,13 @@ "name of a directory, Mercurial takes the extra step of printing the name of " "each file that it does something with. This makes it more clear what is " "happening, and reduces the likelihood of a silent and nasty surprise. This " -"behaviour is common to most Mercurial commands." +"behavior is common to most Mercurial commands." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch04-daily.xml:73 -msgid "Aside: Mercurial tracks files, not directories" +#, fuzzy +msgid "Mercurial tracks files, not directories" msgstr "旁白: Mercurial 只跟踪文件,不跟踪目录" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -5026,12 +5058,11 @@ msgid "How to stop tracking a file" msgstr "如何停止跟踪文件" -# #. type: Content of: <book><chapter><sect1><para> #: ../en/ch04-daily.xml:111 msgid "" "Once you decide that a file no longer belongs in your repository, use the " -"<command role=\"hg-cmd\">hg remove</command> command; this deletes the file, " +"<command role=\"hg-cmd\">hg remove</command> command. This deletes the file, " "and tells Mercurial to stop tracking it. A removed file is represented in " "the output of <command role=\"hg-cmd\">hg status</command> with a " "<quote><literal>R</literal></quote>." @@ -5080,20 +5111,21 @@ #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch04-daily.xml:143 msgid "" -"If you update the working directory to a changeset in which a file that you " -"have removed was still tracked, it will reappear in the working directory, " -"with the contents it had when you committed that changeset. If you then " -"update the working directory to a later changeset, in which the file had been " -"removed, Mercurial will once again remove the file from the working directory." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:153 +"If you update the working directory to a changeset that was committed when it " +"was still tracking a file that you later removed, the file will reappear in " +"the working directory, with the contents it had when you committed that " +"changeset. If you then update the working directory to a later changeset, in " +"which the file had been removed, Mercurial will once again remove the file " +"from the working directory." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:154 msgid "Missing files" msgstr "丢失的文件" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:155 +#: ../en/ch04-daily.xml:156 msgid "" "Mercurial considers a file that you have deleted, but not used <command role=" "\"hg-cmd\">hg remove</command> to delete, to be <emphasis>missing</" @@ -5103,7 +5135,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:165 +#: ../en/ch04-daily.xml:166 msgid "" "If your repository contains a file that <command role=\"hg-cmd\">hg status</" "command> reports as missing, and you want the file to stay gone, you can run " @@ -5113,7 +5145,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:175 +#: ../en/ch04-daily.xml:176 msgid "" "On the other hand, if you deleted the missing file by accident, give <command " "role=\"hg-cmd\">hg revert</command> the name of the file to recover. It will " @@ -5121,12 +5153,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:184 +#: ../en/ch04-daily.xml:185 msgid "Aside: why tell Mercurial explicitly to remove a file?" msgstr "旁白: 为什么要明确告诉 Mercurial 删除文件?" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:187 +#: ../en/ch04-daily.xml:188 msgid "" "You might wonder why Mercurial requires you to explicitly tell it that you " "are deleting a file. Early during the development of Mercurial, it let you " @@ -5137,12 +5169,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:198 +#: ../en/ch04-daily.xml:199 msgid "Useful shorthand&emdash;adding and removing files in one step" msgstr "有用的速记—一个步骤添加和删除文件" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:201 +#: ../en/ch04-daily.xml:202 msgid "" "Mercurial offers a combination command, <command role=\"hg-cmd\">hg " "addremove</command>, that adds untracked files and marks missing files as " @@ -5150,7 +5182,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:207 +#: ../en/ch04-daily.xml:208 msgid "" "The <command role=\"hg-cmd\">hg commit</command> command also provides a " "<option role=\"hg-opt-commit\">-A</option> option that performs this same add-" @@ -5158,12 +5190,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch04-daily.xml:217 +#: ../en/ch04-daily.xml:218 msgid "Copying files" msgstr "复制文件" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:219 +#: ../en/ch04-daily.xml:220 msgid "" "Mercurial provides a <command role=\"hg-cmd\">hg copy</command> command that " "lets you make a new copy of a file. When you copy a file using this command, " @@ -5173,12 +5205,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:227 +#: ../en/ch04-daily.xml:228 msgid "The results of copying during a merge" msgstr "合并期间的复制结果" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:229 +#: ../en/ch04-daily.xml:230 msgid "" "What happens during a merge is that changes <quote>follow</quote> a copy. To " "best illustrate what this means, let's create an example. We'll start with " @@ -5186,28 +5218,28 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:236 +#: ../en/ch04-daily.xml:237 msgid "" "We need to do some work in parallel, so that we'll have something to merge. " "So let's clone our repository." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:242 +#: ../en/ch04-daily.xml:243 msgid "" "Back in our initial repository, let's use the <command role=\"hg-cmd\">hg " "copy</command> command to make a copy of the first file we created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:248 +#: ../en/ch04-daily.xml:249 msgid "" "If we look at the output of the <command role=\"hg-cmd\">hg status</command> " "command afterwards, the copied file looks just like a normal added file." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:254 +#: ../en/ch04-daily.xml:255 msgid "" "But if we pass the <option role=\"hg-opt-status\">-C</option> option to " "<command role=\"hg-cmd\">hg status</command>, it prints another line of " @@ -5216,14 +5248,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:262 +#: ../en/ch04-daily.xml:263 msgid "" "Now, back in the repository we cloned, let's make a change in parallel. " "We'll add a line of content to the original file that we created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:268 +#: ../en/ch04-daily.xml:269 msgid "" "Now we have a modified <filename>file</filename> in this repository. When we " "pull the changes from the first repository, and merge the two heads, " @@ -5232,19 +5264,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:278 +#: ../en/ch04-daily.xml:279 msgid "Why should changes follow copies?" msgstr "为什么复制后需要后续修改?" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:280 -msgid "" -"This behaviour, of changes to a file propagating out to copies of the file, " -"might seem esoteric, but in most cases it's highly desirable." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:284 +#: ../en/ch04-daily.xml:281 +msgid "" +"This behavior&emdash;of changes to a file propagating out to copies of the " +"file&emdash;might seem esoteric, but in most cases it's highly desirable." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:285 msgid "" "First of all, remember that this propagation <emphasis>only</emphasis> " "happens when you merge. So if you <command role=\"hg-cmd\">hg copy</command> " @@ -5253,15 +5285,15 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:290 +#: ../en/ch04-daily.xml:291 msgid "" "The second thing to know is that modifications will only propagate across a " -"copy as long as the repository that you're pulling changes from " -"<emphasis>doesn't know</emphasis> about the copy." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:295 +"copy as long as the changeset that you're merging changes from " +"<emphasis>hasn't yet seen</emphasis> the copy." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:296 msgid "" "The reason that Mercurial does this is as follows. Let's say I make an " "important bug fix in a source file, and commit my changes. Meanwhile, you've " @@ -5271,16 +5303,16 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:302 +#: ../en/ch04-daily.xml:303 msgid "" "If you pulled and merged my changes, and Mercurial <emphasis>didn't</" -"emphasis> propagate changes across copies, your source file would now contain " -"the bug, and unless you remembered to propagate the bug fix by hand, the bug " -"would <emphasis>remain</emphasis> in your copy of the file." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:308 +"emphasis> propagate changes across copies, your new source file would now " +"contain the bug, and unless you knew to propagate the bug fix by hand, the " +"bug would <emphasis>remain</emphasis> in your copy of the file." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:309 msgid "" "By automatically propagating the change that fixed the bug from the original " "file to the copy, Mercurial prevents this class of problem. To my knowledge, " @@ -5289,97 +5321,104 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:314 +#: ../en/ch04-daily.xml:315 msgid "" "Once your change history has a record that the copy and subsequent merge " "occurred, there's usually no further need to propagate changes from the " "original file to the copied file, and that's why Mercurial only propagates " -"changes across copies until this point, and no further." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:322 +"changes across copies at the first merge, and not afterwards." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:323 msgid "How to make changes <emphasis>not</emphasis> follow a copy" msgstr "如何让复制后<emphasis>不</emphasis>修改?" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:325 +#: ../en/ch04-daily.xml:326 msgid "" "If, for some reason, you decide that this business of automatically " "propagating changes across copies is not for you, simply use your system's " "normal file copy command (on Unix-like systems, that's <command>cp</command>) " "to make a copy of a file, then <command role=\"hg-cmd\">hg add</command> the " "new copy by hand. Before you do so, though, please do reread <xref linkend=" -"\"sec:daily:why-copy\"/>, and make an informed decision that this behaviour " -"is not appropriate to your specific case." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:338 -msgid "Behaviour of the <command role=\"hg-cmd\">hg copy</command> command" +"\"sec:daily:why-copy\"/>, and make an informed decision that this behavior is " +"not appropriate to your specific case." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:339 +#, fuzzy +msgid "Behavior of the <command role=\"hg-cmd\">hg copy</command> command" msgstr "命令 <command role=\"hg-cmd\">hg copy</command> 的特性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:341 +#: ../en/ch04-daily.xml:342 msgid "" "When you use the <command role=\"hg-cmd\">hg copy</command> command, " "Mercurial makes a copy of each source file as it currently stands in the " "working directory. This means that if you make some modifications to a file, " "then <command role=\"hg-cmd\">hg copy</command> it without first having " "committed those changes, the new copy will also contain the modifications you " -"have made up until that point. (I find this behaviour a little " +"have made up until that point. (I find this behavior a little " "counterintuitive, which is why I mention it here.)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:351 +#: ../en/ch04-daily.xml:352 msgid "" "The <command role=\"hg-cmd\">hg copy</command> command acts similarly to the " "Unix <command>cp</command> command (you can use the <command role=\"hg-cmd" -"\">hg cp</command> alias if you prefer). The last argument is the " -"<emphasis>destination</emphasis>, and all prior arguments are " -"<emphasis>sources</emphasis>. If you pass it a single file as the source, " -"and the destination does not exist, it creates a new file with that name." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:362 +"\">hg cp</command> alias if you prefer). We must supply two or more " +"arguments, of which the last is treated as the <emphasis>destination</" +"emphasis>, and all others are <emphasis>sources</emphasis>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:360 +msgid "" +"If you pass <command role=\"hg-cmd\">hg copy</command> a single file as the " +"source, and the destination does not exist, it creates a new file with that " +"name." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:366 msgid "" "If the destination is a directory, Mercurial copies its sources into that " "directory." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:367 +#: ../en/ch04-daily.xml:371 msgid "" "Copying a directory is recursive, and preserves the directory structure of " "the source." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:373 +#: ../en/ch04-daily.xml:377 msgid "" "If the source and destination are both directories, the source tree is " "recreated in the destination directory." msgstr "" -# -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:378 -msgid "" -"As with the <command role=\"hg-cmd\">hg rename</command> command, if you copy " +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:382 +msgid "" +"As with the <command role=\"hg-cmd\">hg remove</command> command, if you copy " "a file manually and then want Mercurial to know that you've copied the file, " "simply use the <option role=\"hg-opt-copy\">--after</option> option to " "<command role=\"hg-cmd\">hg copy</command>." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch04-daily.xml:389 +#: ../en/ch04-daily.xml:393 msgid "Renaming files" msgstr "改名文件" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:391 +#: ../en/ch04-daily.xml:395 msgid "" "It's rather more common to need to rename a file than to make a copy of it. " "The reason I discussed the <command role=\"hg-cmd\">hg copy</command> command " @@ -5389,7 +5428,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:399 +#: ../en/ch04-daily.xml:403 msgid "" "When you use the <command role=\"hg-cmd\">hg rename</command> command, " "Mercurial makes a copy of each source file, then deletes it and marks the " @@ -5397,14 +5436,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:405 +#: ../en/ch04-daily.xml:409 msgid "" "The <command role=\"hg-cmd\">hg status</command> command shows the newly " "copied file as added, and the copied-from file as removed." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:411 +#: ../en/ch04-daily.xml:415 msgid "" "As with the results of a <command role=\"hg-cmd\">hg copy</command>, we must " "use the <option role=\"hg-opt-status\">-C</option> option to <command role=" @@ -5413,30 +5452,38 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:420 +#: ../en/ch04-daily.xml:424 msgid "" "As with <command role=\"hg-cmd\">hg remove</command> and <command role=\"hg-" "cmd\">hg copy</command>, you can tell Mercurial about a rename after the fact " "using the <option role=\"hg-opt-rename\">--after</option> option. In most " -"other respects, the behaviour of the <command role=\"hg-cmd\">hg rename</" +"other respects, the behavior of the <command role=\"hg-cmd\">hg rename</" "command> command, and the options it accepts, are similar to the <command " "role=\"hg-cmd\">hg copy</command> command." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:430 +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:433 +msgid "" +"If you're familiar with the Unix command line, you'll be glad to know that " +"<command role=\"hg-cmd\">hg rename</command> command can be invoked as " +"<command role=\"hg-cmd\">hg mv</command>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:439 msgid "Renaming files and merging changes" msgstr "改名文件与合并修改" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:432 +#: ../en/ch04-daily.xml:441 msgid "" "Since Mercurial's rename is implemented as copy-and-remove, the same " "propagation of changes happens when you merge after a rename as after a copy." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:436 +#: ../en/ch04-daily.xml:445 msgid "" "If I modify a file, and you rename it to a new name, and then we merge our " "respective changes, my modifications to the file under its original name will " @@ -5446,7 +5493,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:443 +#: ../en/ch04-daily.xml:452 msgid "" "Whereas having changes follow a copy is a feature where you can perhaps nod " "and say <quote>yes, that might be useful,</quote> it should be clear that " @@ -5456,12 +5503,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:452 +#: ../en/ch04-daily.xml:461 msgid "Divergent renames and merging" msgstr "改名与合并的分歧" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:454 +#: ../en/ch04-daily.xml:463 msgid "" "The case of diverging names occurs when two developers start with a " "file&emdash;let's call it <filename>foo</filename>&emdash;in their respective " @@ -5469,45 +5516,47 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:461 +#: ../en/ch04-daily.xml:470 msgid "Anne renames the file to <filename>bar</filename>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:465 -msgid "Meanwhile, Bob renames it to <filename>quux</filename>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:470 +#: ../en/ch04-daily.xml:474 +msgid "" +"Meanwhile, Bob renames it to <filename>quux</filename>. (Remember that " +"<command role=\"hg-cmd\">hg mv</command> is an alias for <command role=\"hg-" +"cmd\">hg rename</command>.)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:481 msgid "" "I like to think of this as a conflict because each developer has expressed " "different intentions about what the file ought to be named." msgstr "" -# -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:474 +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:485 msgid "" "What do you think should happen when they merge their work? Mercurial's " -"actual behaviour is that it always preserves <emphasis>both</emphasis> names " +"actual behavior is that it always preserves <emphasis>both</emphasis> names " "when it merges changesets that contain divergent renames." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:481 -msgid "" -"Notice that Mercurial does warn about the divergent renames, but it leaves it " +#: ../en/ch04-daily.xml:492 +msgid "" +"Notice that while Mercurial warns about the divergent renames, it leaves it " "up to you to do something about the divergence after the merge." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:487 +#: ../en/ch04-daily.xml:498 msgid "Convergent renames and merging" msgstr "收敛改名与合并" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:489 +#: ../en/ch04-daily.xml:500 msgid "" "Another kind of rename conflict occurs when two people choose to rename " "different <emphasis>source</emphasis> files to the same " @@ -5516,12 +5565,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch04-daily.xml:497 +#: ../en/ch04-daily.xml:508 msgid "Other name-related corner cases" msgstr "其它名称相关的角落" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch04-daily.xml:499 +#: ../en/ch04-daily.xml:510 msgid "" "Mercurial has a longstanding bug in which it fails to handle a merge where " "one side has a file with a given name, while another has a directory with the " @@ -5530,19 +5579,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch04-daily.xml:511 +#: ../en/ch04-daily.xml:523 msgid "Recovering from mistakes" msgstr "从错误恢复" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:513 +#: ../en/ch04-daily.xml:525 msgid "" "Mercurial has some useful commands that will help you to recover from some " "common mistakes." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:516 +#: ../en/ch04-daily.xml:528 msgid "" "The <command role=\"hg-cmd\">hg revert</command> command lets you undo " "changes that you have made to your working directory. For example, if you " @@ -5554,22 +5603,187 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:526 -msgid "" -"It's useful to remember that the <command role=\"hg-cmd\">hg revert</command> " +#: ../en/ch04-daily.xml:538 +msgid "" +"It's good to remember that the <command role=\"hg-cmd\">hg revert</command> " "command is useful for changes that you have not yet committed. Once you've " "committed a change, if you decide it was a mistake, you can still do " "something about it, though your options may be more limited." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch04-daily.xml:532 +#: ../en/ch04-daily.xml:544 msgid "" "For more information about the <command role=\"hg-cmd\">hg revert</command> " "command, and details about how to deal with changes you have already " "committed, see <xref linkend=\"chap:undo\"/>." msgstr "" +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch04-daily.xml:551 +#, fuzzy +msgid "Dealing with tricky merges" +msgstr "处理已经提交的修改" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:553 +msgid "" +"In a complicated or large project, it's not unusual for a merge of two " +"changesets to result in some headaches. Suppose there's a big source file " +"that's been extensively edited by each side of a merge: this is almost " +"inevitably going to result in conflicts, some of which can take a few tries " +"to sort out." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:560 +msgid "" +"Let's develop a simple case of this and see how to deal with it. We'll start " +"off with a repository containing one file, and clone it twice." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:566 +msgid "In one clone, we'll modify the file in one way." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:570 +msgid "In another, we'll modify the file differently." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:574 +msgid "Next, we'll pull each set of changes into our original repo." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:579 +msgid "We expect our repository to now contain two heads." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:583 +msgid "" +"Normally, if we run <command role=\"hg-cmd\">hg merge</command> at this " +"point, it will drop us into a GUI that will let us manually resolve the " +"conflicting edits to <filename>myfile.txt</filename>. However, to simplify " +"things for presentation here, we'd like the merge to fail immediately " +"instead. Here's one way we can do so." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:592 +msgid "" +"We've told Mercurial's merge machinery to run the command <command>false</" +"command> (which, as we desire, fails immediately) if it detects a merge that " +"it can't sort out automatically." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:597 +msgid "" +"If we now fire up <command role=\"hg-cmd\">hg merge</command>, it should " +"grind to a halt and report a failure." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:603 +msgid "" +"Even if we don't notice that the merge failed, Mercurial will prevent us from " +"accidentally committing the result of a failed merge." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch04-daily.xml:609 +msgid "" +"When <command role=\"hg-cmd\">hg commit</command> fails in this case, it " +"suggests that we use the unfamiliar <command role=\"hg-cmd\">hg resolve</" +"command> command. As usual, <command role=\"hg-cmd\">hg help resolve</" +"command> will print a helpful synopsis." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:616 +msgid "File resolution states" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:618 +msgid "" +"When a merge occurs, most files will usually remain unmodified. For each " +"file where Mercurial has to do something, it tracks the state of the file." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch04-daily.xml:624 +msgid "" +"A <emphasis>resolved</emphasis> file has been successfully merged, either " +"automatically by Mercurial or manually with human intervention." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch04-daily.xml:629 +msgid "" +"An <emphasis>unresolved</emphasis> file was not merged successfully, and " +"needs more attention." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:634 +msgid "" +"If Mercurial sees <emphasis>any</emphasis> file in the unresolved state after " +"a merge, it considers the merge to have failed. Fortunately, we do not need " +"to restart the entire merge from scratch." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:639 +msgid "" +"The <option role=\"hg-opt-resolve\">--list</option> or <option role=\"hg-opt-" +"resolve\">-l</option> option to <command role=\"hg-cmd\">hg resolve</command> " +"prints out the state of each merged file." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:646 +msgid "" +"In the output from <command role=\"hg-cmd\">hg resolve</command>, a resolved " +"file is marked with <literal>R</literal>, while an unresolved file is marked " +"with <literal>U</literal>. If any files are listed with <literal>U</" +"literal>, we know that an attempt to commit the results of the merge will " +"fail." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch04-daily.xml:655 +#, fuzzy +msgid "Resolving a file merge" +msgstr "执行合并" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:657 +msgid "" +"We have several options to move a file from the unresolved into the resolved " +"state. By far the most common is to rerun <command role=\"hg-cmd\">hg " +"resolve</command>. If we pass the names of individual files or directories, " +"it will retry the merges of any unresolved files present in those locations. " +"We can also pass the <option role=\"hg-opt-resolve\">--all</option> or " +"<option role=\"hg-opt-resolve\">-a</option> option, which will retry the " +"merges of <emphasis>all</emphasis> unresolved files." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch04-daily.xml:667 +msgid "" +"Mercurial also lets us modify the resolution state of a file directly. We " +"can manually mark a file as resolved using the <option role=\"hg-opt-resolve" +"\">--mark</option> option, or as unresolved using the <option role=\"hg-opt-" +"resolve\">--unmark</option> option. This allows us to clean up a " +"particularly messy merge by hand, and to keep track of our progress with each " +"file as we go." +msgstr "" + #. type: Content of: <book><chapter><title> #: ../en/ch05-collab.xml:5 msgid "Collaborating with other people" @@ -5602,15 +5816,16 @@ "For interactive use, the web interface lets you browse a single repository or " "a collection of repositories. You can view the history of a repository, " "examine each change (comments and diffs), and view the contents of each " -"directory and file." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:24 -msgid "" -"Also for human consumption, the web interface provides an RSS feed of the " -"changes in a repository. This lets you <quote>subscribe</quote> to a " -"repository using your favourite feed reader, and be automatically notified of " +"directory and file. You can even get a view of history that gives a " +"graphical view of the relationships between individual changes and merges." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:26 +msgid "" +"Also for human consumption, the web interface provides Atom and RSS feeds of " +"the changes in a repository. This lets you <quote>subscribe</quote> to a " +"repository using your favorite feed reader, and be automatically notified of " "activity in that repository as soon as it happens. I find this capability " "much more convenient than the model of subscribing to a mailing list to which " "notifications are sent, as it requires no additional configuration on the " @@ -5618,7 +5833,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:34 +#: ../en/ch05-collab.xml:36 msgid "" "The web interface also lets remote users clone a repository, pull changes " "from it, and (when the server is configured to permit it) push changes back " @@ -5627,35 +5842,61 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:40 +#: ../en/ch05-collab.xml:42 msgid "" "The easiest way to get started with the web interface is to use your web " "browser to visit an existing repository, such as the master Mercurial " -"repository at <ulink url=\"http://www.selenic.com/repo/hg?style=gitweb" -"\">http://www.selenic.com/repo/hg?style=gitweb</ulink>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:45 +"repository at <ulink url=\"http://www.selenic.com/repo/hg\">http://www." +"selenic.com/repo/hg</ulink>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:47 msgid "" "If you're interested in providing a web interface to your own repositories, " -"Mercurial provides two ways to do this. The first is using the <command role=" -"\"hg-cmd\">hg serve</command> command, which is best suited to short-term " -"<quote>lightweight</quote> serving. See <xref linkend=\"sec:collab:serve\"/> " -"below for details of how to use this command. If you have a long-lived " -"repository that you'd like to make permanently available, Mercurial has built-" -"in support for the CGI (Common Gateway Interface) standard, which all common " -"web servers support. See <xref linkend=\"sec:collab:cgi\"/> for details of " -"CGI configuration." +"there are several good ways to do this." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:51 +msgid "" +"The easiest and fastest way to get started in an informal environment is to " +"use the <command role=\"hg-cmd\">hg serve</command> command, which is best " +"suited to short-term <quote>lightweight</quote> serving. See <xref linkend=" +"\"sec:collab:serve\"/> below for details of how to use this command." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:58 +msgid "" +"For longer-lived repositories that you'd like to have permanently available, " +"there are several public hosting services available." +msgstr "" + +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:64 +msgid "" +"Bitbucket, at <ulink url=\"http://bitbucket.org/\">http://bitbucket.org/</" +"ulink>, provides free hosting for open source projects, and paid hosting for " +"commercial projects." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:71 +msgid "" +"If you would prefer to host your own repositories, Mercurial has built-in " +"support for several popular hosting technologies, most notably CGI (Common " +"Gateway Interface), and WSGI (Web Services Gateway Interface). See <xref " +"linkend=\"sec:collab:cgi\"/> for details of CGI and WSGI configuration." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:60 +#: ../en/ch05-collab.xml:80 msgid "Collaboration models" msgstr "协作模型" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:62 +#: ../en/ch05-collab.xml:82 msgid "" "With a suitably flexible tool, making decisions about workflow is much more " "of a social engineering challenge than a technical one. Mercurial imposes few " @@ -5665,12 +5906,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:70 +#: ../en/ch05-collab.xml:90 msgid "Factors to keep in mind" msgstr "要牢记的因素" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:72 +#: ../en/ch05-collab.xml:92 msgid "" "The most important aspect of any model that you must keep in mind is how well " "it matches the needs and capabilities of the people who will be using it. " @@ -5679,7 +5920,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:78 +#: ../en/ch05-collab.xml:98 msgid "" "I once put together a workflow model that seemed to make perfect sense to me, " "but that caused a considerable amount of consternation and strife within my " @@ -5692,7 +5933,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:88 +#: ../en/ch05-collab.xml:108 msgid "" "Don't sweep foreseeable social or technical problems under the rug. Whatever " "scheme you put into effect, you should plan for mistakes and problem " @@ -5706,12 +5947,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:102 +#: ../en/ch05-collab.xml:122 msgid "Informal anarchy" msgstr "无政府状态" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:104 +#: ../en/ch05-collab.xml:124 msgid "" "I wouldn't suggest an <quote>anything goes</quote> approach as something " "sustainable, but it's a model that's easy to grasp, and it works perfectly " @@ -5719,11 +5960,11 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:109 +#: ../en/ch05-collab.xml:129 msgid "" "As one example, many projects have a loose-knit group of collaborators who " "rarely physically meet each other. Some groups like to overcome the " -"isolation of working at a distance by organising occasional <quote>sprints</" +"isolation of working at a distance by organizing occasional <quote>sprints</" "quote>. In a sprint, a number of people get together in a single location (a " "company's conference room, a hotel meeting room, that kind of place) and " "spend several days more or less locked in there, hacking intensely on a " @@ -5731,37 +5972,38 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:118 -msgid "" -"A sprint is the perfect place to use the <command role=\"hg-cmd\">hg serve</" -"command> command, since <command role=\"hg-cmd\">hg serve</command> does not " -"require any fancy server infrastructure. You can get started with <command " -"role=\"hg-cmd\">hg serve</command> in moments, by reading <xref linkend=\"sec:" -"collab:serve\"/> below. Then simply tell the person next to you that you're " -"running a server, send the URL to them in an instant message, and you " -"immediately have a quick-turnaround way to work together. They can type your " -"URL into their web browser and quickly review your changes; or they can pull " -"a bugfix from you and verify it; or they can clone a branch containing a new " -"feature and try it out." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:132 +#: ../en/ch05-collab.xml:138 +msgid "" +"A sprint or a hacking session in a coffee shop are the perfect places to use " +"the <command role=\"hg-cmd\">hg serve</command> command, since <command role=" +"\"hg-cmd\">hg serve</command> does not require any fancy server " +"infrastructure. You can get started with <command role=\"hg-cmd\">hg serve</" +"command> in moments, by reading <xref linkend=\"sec:collab:serve\"/> below. " +"Then simply tell the person next to you that you're running a server, send " +"the URL to them in an instant message, and you immediately have a quick-" +"turnaround way to work together. They can type your URL into their web " +"browser and quickly review your changes; or they can pull a bugfix from you " +"and verify it; or they can clone a branch containing a new feature and try it " +"out." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:152 msgid "" "The charm, and the problem, with doing things in an ad hoc fashion like this " "is that only people who know about your changes, and where they are, can see " "them. Such an informal approach simply doesn't scale beyond a handful " -"people, because each individual needs to know about $n$ different " -"repositories to pull from." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:141 +"people, because each individual needs to know about <emphasis>n</emphasis> " +"different repositories to pull from." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:162 msgid "A single central repository" msgstr "单一中央版本库" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:143 +#: ../en/ch05-collab.xml:164 msgid "" "For smaller projects migrating from a centralised revision control tool, " "perhaps the easiest way to get started is to have changes flow through a " @@ -5770,7 +6012,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:149 +#: ../en/ch05-collab.xml:170 msgid "" "Contributors start by cloning a copy of this repository. They can pull " "changes from it whenever they need to, and some (perhaps all) developers have " @@ -5779,7 +6021,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:154 +#: ../en/ch05-collab.xml:175 msgid "" "Under this model, it can still often make sense for people to pull changes " "directly from each other, without going through the central repository. " @@ -5792,24 +6034,56 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:165 -msgid "" -"In this kind of scenario, people usually use the <command>ssh</command> " -"protocol to securely push changes to the central repository, as documented in " -"<xref linkend=\"sec:collab:ssh\"/>. It's also usual to publish a read-only " -"copy of the repository over HTTP using CGI, as in <xref linkend=\"sec:collab:" -"cgi\"/>. Publishing over HTTP satisfies the needs of people who don't have " -"push access, and those who want to use web browsers to browse the " -"repository's history." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:177 +#: ../en/ch05-collab.xml:186 +msgid "" +"If a team is hosting its own repository in this kind of scenario, people will " +"usually use the <command>ssh</command> protocol to securely push changes to " +"the central repository, as documented in <xref linkend=\"sec:collab:ssh\"/>. " +"It's also usual to publish a read-only copy of the repository over HTTP, as " +"in <xref linkend=\"sec:collab:cgi\"/>. Publishing over HTTP satisfies the " +"needs of people who don't have push access, and those who want to use web " +"browsers to browse the repository's history." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:199 +#, fuzzy +msgid "A hosted central repository" +msgstr "单一中央版本库" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:201 +msgid "" +"A wonderful thing about public hosting services like <ulink url=\"http://" +"bitbucket.org/\">Bitbucket</ulink> is that not only do they handle the fiddly " +"server configuration details, such as user accounts, authentication, and " +"secure wire protocols, they provide additional infrastructure to make this " +"model work well." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:208 +msgid "" +"For instance, a well-engineered hosting service will let people clone their " +"own copies of a repository with a single click. This lets people work in " +"separate spaces and share their changes when they're ready." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:213 +msgid "" +"In addition, a good hosting service will let people communicate with each " +"other, for instance to say <quote>there are changes ready for you to review " +"in this tree</quote>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:220 msgid "Working with multiple branches" msgstr "使用多个分支工作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:179 +#: ../en/ch05-collab.xml:222 msgid "" "Projects of any significant size naturally tend to make progress on several " "fronts simultaneously. In the case of software, it's common for a project to " @@ -5823,30 +6097,30 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:192 +#: ../en/ch05-collab.xml:235 msgid "" "Mercurial is particularly well suited to managing a number of simultaneous, " "but not identical, branches. Each <quote>development direction</quote> can " "live in its own central repository, and you can merge changes from one to " "another as the need arises. Because repositories are independent of each " "other, unstable changes in a development branch will never affect a stable " -"branch unless someone explicitly merges those changes in." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:201 +"branch unless someone explicitly merges those changes into the stable branch." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:244 msgid "" "Here's an example of how this can work in practice. Let's say you have one " "<quote>main branch</quote> on a central server." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:207 +#: ../en/ch05-collab.xml:250 msgid "People clone it, make changes locally, test them, and push them back." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:210 +#: ../en/ch05-collab.xml:253 msgid "" "Once the main branch reaches a release milestone, you can use the <command " "role=\"hg-cmd\">hg tag</command> command to give a permanent name to the " @@ -5854,12 +6128,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:216 +#: ../en/ch05-collab.xml:259 msgid "Let's say some ongoing development occurs on the main branch." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:221 +#: ../en/ch05-collab.xml:264 msgid "" "Using the tag that was recorded at the milestone, people who clone that " "repository at any time in the future can use <command role=\"hg-cmd\">hg " @@ -5867,57 +6141,57 @@ "when that tagged revision was committed." msgstr "" -# -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:229 -msgid "" -"In addition, immediately after the main branch is tagged, someone can then " -"clone the main branch on the server to a new <quote>stable</quote> branch, " -"also on the server." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:235 -msgid "" -"Someone who needs to make a change to the stable branch can then clone " -"<emphasis>that</emphasis> repository, make their changes, commit, and push " -"their changes back there." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:241 +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:272 +msgid "" +"In addition, immediately after the main branch is tagged, we can then clone " +"the main branch on the server to a new <quote>stable</quote> branch, also on " +"the server." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:278 +msgid "" +"If we need to make a change to the stable branch, we can then clone " +"<emphasis>that</emphasis> repository, make our changes, commit, and push our " +"changes back there." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:285 msgid "" "Because Mercurial repositories are independent, and Mercurial doesn't move " "changes around automatically, the stable and main branches are " -"<emphasis>isolated</emphasis> from each other. The changes that you made on " +"<emphasis>isolated</emphasis> from each other. The changes that we made on " "the main branch don't <quote>leak</quote> to the stable branch, and vice " "versa." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:248 -msgid "" -"You'll often want all of your bugfixes on the stable branch to show up on the " -"main branch, too. Rather than rewrite a bugfix on the main branch, you can " +#: ../en/ch05-collab.xml:292 +msgid "" +"We'll often want all of our bugfixes on the stable branch to show up on the " +"main branch, too. Rather than rewrite a bugfix on the main branch, we can " "simply pull and merge changes from the stable to the main branch, and " -"Mercurial will bring those bugfixes in for you." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:256 +"Mercurial will bring those bugfixes in for us." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:300 msgid "" "The main branch will still contain changes that are not on the stable branch, " "but it will also contain all of the bugfixes from the stable branch. The " -"stable branch remains unaffected by these changes." +"stable branch remains unaffected by these changes, since changes are only " +"flowing from the stable to the main branch, and not the other way." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><title> -#: ../en/ch05-collab.xml:263 ../en/ch05-collab.xml:273 +#: ../en/ch05-collab.xml:309 ../en/ch05-collab.xml:319 msgid "Feature branches" msgstr "特性分支" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:265 +#: ../en/ch05-collab.xml:311 msgid "" "For larger projects, an effective way to manage change is to break up a team " "into smaller groups. Each group has a shared branch of its own, cloned from " @@ -5927,14 +6201,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> -#: ../en/ch05-collab.xml:275 +#: ../en/ch05-collab.xml:321 msgid "" "<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/" "></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:280 +#: ../en/ch05-collab.xml:326 msgid "" "When a particular feature is deemed to be in suitable shape, someone on that " "feature team pulls and merges from the master branch into the feature branch, " @@ -5942,20 +6216,20 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:287 +#: ../en/ch05-collab.xml:333 msgid "The release train" msgstr "发布列车" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:289 -msgid "" -"Some projects are organised on a <quote>train</quote> basis: a release is " +#: ../en/ch05-collab.xml:335 +msgid "" +"Some projects are organized on a <quote>train</quote> basis: a release is " "scheduled to happen every few months, and whatever features are ready when " "the <quote>train</quote> is ready to leave are allowed in." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:294 +#: ../en/ch05-collab.xml:340 msgid "" "This model resembles working with feature branches. The difference is that " "when a feature branch misses a train, someone on the feature team pulls and " @@ -5965,12 +6239,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:303 +#: ../en/ch05-collab.xml:349 msgid "The Linux kernel model" msgstr "Linux 内核模型" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:305 +#: ../en/ch05-collab.xml:351 msgid "" "The development of the Linux kernel has a shallow hierarchical structure, " "surrounded by a cloud of apparent chaos. Because most Linux developers use " @@ -5980,7 +6254,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:313 +#: ../en/ch05-collab.xml:359 msgid "" "At the center of the community sits Linus Torvalds, the creator of Linux. He " "publishes a single source repository that is considered the " @@ -5990,7 +6264,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:320 +#: ../en/ch05-collab.xml:366 msgid "" "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, " "he pulls whatever changes they publish, in most cases without even reviewing " @@ -6004,7 +6278,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:332 +#: ../en/ch05-collab.xml:378 msgid "" "Individual lieutenants have their own approaches to reviewing, accepting, and " "publishing changes; and for deciding when to feed them to Linus. In " @@ -6017,7 +6291,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:343 +#: ../en/ch05-collab.xml:389 msgid "" "This model has two notable features. The first is that it's <quote>pull " "only</quote>. You have to ask, convince, or beg another developer to take a " @@ -6027,7 +6301,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:350 +#: ../en/ch05-collab.xml:396 msgid "" "The second is that it's based on reputation and acclaim. If you're an " "unknown, Linus will probably ignore changes from you without even " @@ -6041,7 +6315,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:361 +#: ../en/ch05-collab.xml:407 msgid "" "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" "quote> boundaries. If you're a respected but specialised storage hacker, and " @@ -6050,7 +6324,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:368 +#: ../en/ch05-collab.xml:414 msgid "" "To people who come from more orderly project backgrounds, the comparatively " "chaotic Linux kernel development process often seems completely insane. It's " @@ -6060,12 +6334,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:378 +#: ../en/ch05-collab.xml:424 msgid "Pull-only versus shared-push collaboration" msgstr "只读与共享写协作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:380 +#: ../en/ch05-collab.xml:426 msgid "" "A perpetual source of heat in the open source community is whether a " "development model in which people only ever pull changes from others is " @@ -6074,7 +6348,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:386 +#: ../en/ch05-collab.xml:432 msgid "" "Typically, the backers of the shared-push model use tools that actively " "enforce this approach. If you're using a centralised revision control tool " @@ -6085,21 +6359,20 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:394 -msgid "" -"A good distributed revision control tool, such as Mercurial, will support " -"both models. You and your collaborators can then structure how you work " -"together based on your own needs and preferences, not on what contortions " -"your tools force you into." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:402 +#: ../en/ch05-collab.xml:440 +msgid "" +"A good distributed revision control tool will support both models. You and " +"your collaborators can then structure how you work together based on your own " +"needs and preferences, not on what contortions your tools force you into." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:447 msgid "Where collaboration meets branch management" msgstr "协作与分支管理" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:404 +#: ../en/ch05-collab.xml:449 msgid "" "Once you and your team set up some shared repositories and start propagating " "changes back and forth between local and shared repos, you begin to face a " @@ -6110,24 +6383,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:416 +#: ../en/ch05-collab.xml:461 msgid "The technical side of sharing" msgstr "共享的技术因素" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:418 -msgid "" -"The remainder of this chapter is devoted to the question of serving data to " -"your collaborators." +#: ../en/ch05-collab.xml:463 +msgid "" +"The remainder of this chapter is devoted to the question of sharing changes " +"with your collaborators." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:423 +#: ../en/ch05-collab.xml:468 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>" msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:426 +#: ../en/ch05-collab.xml:471 msgid "" "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " "wonderfully suited to small, tight-knit, and fast-paced group environments. " @@ -6136,7 +6409,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:431 +#: ../en/ch05-collab.xml:476 msgid "" "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in " "under a second it will bring up a specialised HTTP server; this will accept " @@ -6149,21 +6422,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:442 +#: ../en/ch05-collab.xml:487 msgid "" "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</" "emphasis> a general-purpose web server. It can do only two things:" msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:446 +#: ../en/ch05-collab.xml:491 msgid "" "Allow people to browse the history of the repository it's serving, from their " "normal web browsers." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:450 +#: ../en/ch05-collab.xml:495 msgid "" "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd" "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes " @@ -6171,7 +6444,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:455 +#: ../en/ch05-collab.xml:500 msgid "" "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote " "users to <emphasis>modify</emphasis> your repository. It's intended for read-" @@ -6179,7 +6452,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:459 +#: ../en/ch05-collab.xml:504 msgid "" "If you're getting started with Mercurial, there's nothing to prevent you from " "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on " @@ -6190,12 +6463,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:469 +#: ../en/ch05-collab.xml:514 msgid "A few things to keep in mind" msgstr "要牢记的几件事" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:471 +#: ../en/ch05-collab.xml:516 msgid "" "Because it provides unauthenticated read access to all clients, you should " "only use <command role=\"hg-cmd\">hg serve</command> in an environment where " @@ -6204,7 +6477,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:477 +#: ../en/ch05-collab.xml:522 msgid "" "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about " "any firewall software you might have installed on your system or network. It " @@ -6215,7 +6488,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:486 +#: ../en/ch05-collab.xml:531 msgid "" "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming " "connections on port 8000. If another process is already listening on the " @@ -6224,7 +6497,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:492 +#: ../en/ch05-collab.xml:537 msgid "" "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints " "no output, which can be a bit unnerving. If you'd like to confirm that it is " @@ -6234,12 +6507,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:502 +#: ../en/ch05-collab.xml:547 msgid "Using the Secure Shell (ssh) protocol" msgstr "使用 ssh 协议" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:504 +#: ../en/ch05-collab.xml:549 msgid "" "You can pull and push changes securely over a network connection using the " "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " @@ -6248,40 +6521,40 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:509 -msgid "" -"If you're not familiar with ssh, it's a network protocol that lets you " -"securely communicate with another computer. To use it with Mercurial, you'll " -"be setting up one or more user accounts on a server so that remote users can " -"log in and execute commands." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:515 +#: ../en/ch05-collab.xml:554 +msgid "" +"If you're not familiar with ssh, it's the name of both a command and a " +"network protocol that let you securely communicate with another computer. To " +"use it with Mercurial, you'll be setting up one or more user accounts on a " +"server so that remote users can log in and execute commands." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:560 msgid "" "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some " "of the material that follows to be elementary in nature.)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:520 +#: ../en/ch05-collab.xml:565 msgid "How to read and write ssh URLs" msgstr "如何读写 ssh 路径" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:522 +#: ../en/ch05-collab.xml:567 msgid "An ssh URL tends to look like this:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:525 +#: ../en/ch05-collab.xml:570 msgid "" "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the " "ssh protocol." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:528 +#: ../en/ch05-collab.xml:573 msgid "" "The <quote><literal>bos@</literal></quote> component indicates what username " "to log into the server as. You can leave this out if the remote username is " @@ -6289,14 +6562,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:533 +#: ../en/ch05-collab.xml:578 msgid "" "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of " "the server to log into." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:537 +#: ../en/ch05-collab.xml:582 msgid "" "The <quote>:22</quote> identifies the port number to connect to the server " "on. The default port is 22, so you only need to specify a colon and port " @@ -6304,13 +6577,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:542 +#: ../en/ch05-collab.xml:587 msgid "" "The remainder of the URL is the local path to the repository on the server." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:546 +#: ../en/ch05-collab.xml:591 msgid "" "There's plenty of scope for confusion with the path component of ssh URLs, as " "there is no standard way for tools to interpret it. Some programs behave " @@ -6320,7 +6593,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:553 +#: ../en/ch05-collab.xml:598 msgid "" "Mercurial treats the path to a repository on the server as relative to the " "remote user's home directory. For example, if user <literal>foo</literal> on " @@ -6331,7 +6604,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:562 +#: ../en/ch05-collab.xml:607 msgid "" "If you want to specify a path relative to another user's home directory, you " "can use a path that starts with a tilde character followed by the user's name " @@ -6339,19 +6612,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:568 +#: ../en/ch05-collab.xml:613 msgid "" "And if you really want to specify an <emphasis>absolute</emphasis> path on " "the server, begin the path component with two slashes, as in this example." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:575 +#: ../en/ch05-collab.xml:620 msgid "Finding an ssh client for your system" msgstr "为你的系统寻找 ssh 客户端" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:577 +#: ../en/ch05-collab.xml:622 msgid "" "Almost every Unix-like system comes with OpenSSH preinstalled. If you're " "using such a system, run <literal>which ssh</literal> to find out if the " @@ -6362,60 +6635,58 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:585 -msgid "" -"On Windows, you'll first need to download a suitable ssh client. There are " -"two alternatives." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:588 -msgid "" -"Simon Tatham's excellent PuTTY package <citation>web:putty</citation> " -"provides a complete suite of ssh client commands." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:592 -msgid "" -"If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:595 -msgid "" -"In either case, you'll need to edit your <filename role=\"special\">hg.ini</" -"filename> file to tell Mercurial where to find the actual client command. " -"For example, if you're using PuTTY, you'll need to use the <command>plink</" -"command> command as a command-line ssh client." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch05-collab.xml:605 -msgid "" -"The path to <command>plink</command> shouldn't contain any whitespace " -"characters, or Mercurial may not be able to run it correctly (so putting it " -"in <filename class=\"directory\">C:\\Program Files</filename> is probably not " -"a good idea)." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:614 +#: ../en/ch05-collab.xml:630 +msgid "" +"On Windows, the TortoiseHg package is bundled with a version of Simon " +"Tatham's excellent <command>plink</command> command, and you should not need " +"to do any further configuration." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:637 msgid "Generating a key pair" msgstr "产生密钥对" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:616 +#: ../en/ch05-collab.xml:639 msgid "" "To avoid the need to repetitively type a password every time you need to use " -"your ssh client, I recommend generating a key pair. On a Unix-like system, " -"the <command>ssh-keygen</command> command will do the trick. On Windows, if " -"you're using PuTTY, the <command>puttygen</command> command is what you'll " -"need." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:624 +"your ssh client, I recommend generating a key pair." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><tip><title> +#: ../en/ch05-collab.xml:644 +msgid "Key pairs are not mandatory" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><tip><para> +#: ../en/ch05-collab.xml:646 +msgid "" +"Mercurial knows nothing about ssh authentication or key pairs. You can, if " +"you like, safely ignore this section and the one that follows until you grow " +"tired of repeatedly typing ssh passwords." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:654 +msgid "" +"On a Unix-like system, the <command>ssh-keygen</command> command will do the " +"trick." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:657 +msgid "" +"On Windows, if you're using TortoiseHg, you may need to download a command " +"named <command>puttygen</command> from <ulink url=\"http://www.chiark." +"greenend.org.uk/~sgtatham/putty\">the PuTTY web site</ulink> to generate a " +"key pair. See <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/" +"Chapter8.html#pubkey-puttygen\">the <command>puttygen</command> " +"documentation</ulink> for details of how use the command." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:669 msgid "" "When you generate a key pair, it's usually <emphasis>highly</emphasis> " "advisable to protect it with a passphrase. (The only time that you might not " @@ -6424,7 +6695,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:630 +#: ../en/ch05-collab.xml:675 msgid "" "Simply generating a key pair isn't enough, however. You'll need to add the " "public key to the set of authorised keys for whatever user you're logging in " @@ -6435,7 +6706,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:639 +#: ../en/ch05-collab.xml:684 msgid "" "On a Unix-like system, your public key will have a <filename>.pub</filename> " "extension. If you're using <command>puttygen</command> on Windows, you can " @@ -6445,12 +6716,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:648 +#: ../en/ch05-collab.xml:692 msgid "Using an authentication agent" msgstr "使用认证代理" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:650 +#: ../en/ch05-collab.xml:694 msgid "" "An authentication agent is a daemon that stores passphrases in memory (so it " "will forget passphrases if you log out and log back in again). An ssh client " @@ -6462,7 +6733,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:659 +#: ../en/ch05-collab.xml:703 msgid "" "The downside of storing passphrases in an agent is that it's possible for a " "well-prepared attacker to recover the plain text of your passphrases, in some " @@ -6471,34 +6742,44 @@ "of repeated typing." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:666 +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:712 msgid "" "On Unix-like systems, the agent is called <command>ssh-agent</command>, and " "it's often run automatically for you when you log in. You'll need to use the " -"<command>ssh-add</command> command to add passphrases to the agent's store. " -"On Windows, if you're using PuTTY, the <command>pageant</command> command " -"acts as the agent. It adds an icon to your system tray that will let you " -"manage stored passphrases." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:677 +"<command>ssh-add</command> command to add passphrases to the agent's store." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:719 +msgid "" +"On Windows, if you're using TortoiseHg, the <command>pageant</command> " +"command acts as the agent. As with <command>puttygen</command>, you'll need " +"to <ulink url=\"http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download." +"html\">download <command>pageant</command></ulink> from the PuTTY web site " +"and read <ulink url=\"http://the.earth.li/~sgtatham/putty/0.60/htmldoc/" +"Chapter9.html#pageant\">its documentation</ulink>. The <command>pageant</" +"command> command adds an icon to your system tray that will let you manage " +"stored passphrases." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:734 msgid "Configuring the server side properly" msgstr "正确配置服务器端" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:679 -msgid "" -"Because ssh can be fiddly to set up if you're new to it, there's a variety of " -"things that can go wrong. Add Mercurial on top, and there's plenty more " -"scope for head-scratching. Most of these potential problems occur on the " -"server side, not the client side. The good news is that once you've gotten a " -"configuration working, it will usually continue to work indefinitely." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:687 +#: ../en/ch05-collab.xml:736 +msgid "" +"Because ssh can be fiddly to set up if you're new to it, a variety of things " +"can go wrong. Add Mercurial on top, and there's plenty more scope for head-" +"scratching. Most of these potential problems occur on the server side, not " +"the client side. The good news is that once you've gotten a configuration " +"working, it will usually continue to work indefinitely." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:744 msgid "" "Before you try using Mercurial to talk to an ssh server, it's best to make " "sure that you can use the normal <command>ssh</command> or <command>putty</" @@ -6511,7 +6792,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:698 +#: ../en/ch05-collab.xml:755 msgid "" "The first thing to be sure of on the server side is that you can actually log " "in from another machine at all. If you can't use <command>ssh</command> or " @@ -6520,7 +6801,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:705 +#: ../en/ch05-collab.xml:762 msgid "" "If you get a <quote>connection refused</quote> error, either there isn't an " "SSH daemon running on the server at all, or it's inaccessible due to firewall " @@ -6528,7 +6809,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:710 +#: ../en/ch05-collab.xml:767 msgid "" "If you get a <quote>no route to host</quote> error, you either have an " "incorrect address for the server or a seriously locked down firewall that " @@ -6536,7 +6817,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:715 +#: ../en/ch05-collab.xml:772 msgid "" "If you get a <quote>permission denied</quote> error, you may have mistyped " "the username on the server, or you could have mistyped your key's passphrase " @@ -6544,7 +6825,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:720 +#: ../en/ch05-collab.xml:777 msgid "" "In summary, if you're having trouble talking to the server's ssh daemon, " "first make sure that one is running at all. On many systems it will be " @@ -6556,7 +6837,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:730 +#: ../en/ch05-collab.xml:787 msgid "" "If you're using an authentication agent on the client side to store " "passphrases for your keys, you ought to be able to log into the server " @@ -6565,26 +6846,26 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:736 +#: ../en/ch05-collab.xml:793 msgid "" "You might have forgotten to use <command>ssh-add</command> or " "<command>pageant</command> to store the passphrase." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:740 +#: ../en/ch05-collab.xml:797 msgid "You might have stored the passphrase for the wrong key." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:743 +#: ../en/ch05-collab.xml:800 msgid "" "If you're being prompted for the remote user's password, there are another " "few possible problems to check." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:746 +#: ../en/ch05-collab.xml:803 msgid "" "Either the user's home directory or their <filename role=\"special\" class=" "\"directory\">.ssh</filename> directory might have excessively liberal " @@ -6595,7 +6876,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:755 +#: ../en/ch05-collab.xml:812 msgid "" "The user's <filename role=\"special\">authorized_keys</filename> file may " "have a problem. If anyone other than the user owns or can write to that file, " @@ -6603,7 +6884,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:762 +#: ../en/ch05-collab.xml:819 msgid "" "In the ideal world, you should be able to run the following command " "successfully, and it should print exactly one line of output, the current " @@ -6611,7 +6892,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:767 +#: ../en/ch05-collab.xml:824 msgid "" "If, on your server, you have login scripts that print banners or other junk " "even when running non-interactive commands like this, you should fix them " @@ -6626,7 +6907,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:781 +#: ../en/ch05-collab.xml:838 msgid "" "Once you've verified that plain old ssh is working with your server, the next " "step is to ensure that Mercurial runs on the server. The following command " @@ -6634,7 +6915,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:788 +#: ../en/ch05-collab.xml:845 msgid "" "If you see an error message instead of normal <command role=\"hg-cmd\">hg " "version</command> output, this is usually because you haven't installed " @@ -6644,21 +6925,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:795 +#: ../en/ch05-collab.xml:852 msgid "" "Is Mercurial really installed on the server at all? I know this sounds " "trivial, but it's worth checking!" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:799 +#: ../en/ch05-collab.xml:856 msgid "" "Maybe your shell's search path (usually set via the <envar>PATH</envar> " "environment variable) is simply misconfigured." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:803 +#: ../en/ch05-collab.xml:860 msgid "" "Perhaps your <envar>PATH</envar> environment variable is only being set to " "point to the location of the <command>hg</command> executable if the login " @@ -6667,7 +6948,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:810 +#: ../en/ch05-collab.xml:867 msgid "" "The <envar>PYTHONPATH</envar> environment variable may need to contain the " "path to the Mercurial Python modules. It might not be set at all; it could " @@ -6675,7 +6956,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:817 +#: ../en/ch05-collab.xml:874 msgid "" "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh " "connection, well done! You've got the server and client sorted out. You " @@ -6686,20 +6967,20 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:827 +#: ../en/ch05-collab.xml:883 msgid "Using compression with ssh" msgstr "通过 ssh 使用压缩" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:829 +#: ../en/ch05-collab.xml:885 msgid "" "Mercurial does not compress data when it uses the ssh protocol, because the " -"ssh protocol can transparently compress data. However, the default behaviour " +"ssh protocol can transparently compress data. However, the default behavior " "of ssh clients is <emphasis>not</emphasis> to request compression." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:834 +#: ../en/ch05-collab.xml:890 msgid "" "Over any network other than a fast LAN (even a wireless network), using " "compression is likely to significantly speed up Mercurial's network " @@ -6709,55 +6990,69 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:841 +#: ../en/ch05-collab.xml:897 msgid "" "Both <command>ssh</command> and <command>plink</command> accept a <option " "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can " "easily edit your <filename role=\"special\">~/.hgrc</filename> to enable " -"compression for all of Mercurial's uses of the ssh protocol." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:849 -msgid "" -"If you use <command>ssh</command>, you can configure it to always use " -"compression when talking to your server. To do this, edit your <filename " -"role=\"special\">.ssh/config</filename> file (which may not yet exist), as " -"follows." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:857 -msgid "" -"This defines an alias, <literal>hg</literal>. When you use it on the " -"<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-" -"protocol URL, it will cause <command>ssh</command> to connect to <literal>hg." -"example.com</literal> and use compression. This gives you both a shorter " -"name to type and compression, each of which is a good thing in its own right." +"compression for all of Mercurial's uses of the ssh protocol. Here is how to " +"do so for regular <command>ssh</command> on Unix-like systems, for example." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:907 +msgid "" +"If you use <command>ssh</command> on a Unix-like system, you can configure it " +"to always use compression when talking to your server. To do this, edit your " +"<filename role=\"special\">.ssh/config</filename> file (which may not yet " +"exist), as follows." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:917 +msgid "" +"This defines a hostname alias, <literal>hg</literal>. When you use that " +"hostname on the <command>ssh</command> command line or in a Mercurial " +"<literal>ssh</literal>-protocol URL, it will cause <command>ssh</command> to " +"connect to <literal>hg.example.com</literal> and use compression. This gives " +"you both a shorter name to type and compression, each of which is a good " +"thing in its own right." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:868 +#: ../en/ch05-collab.xml:929 msgid "Serving over HTTP using CGI" msgstr "使用 CGI 通过 HTTP 提供服务" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:870 +#: ../en/ch05-collab.xml:931 +msgid "" +"The simplest way to host one or more repositories in a permanent way is to " +"use a web server and Mercurial's CGI support." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:935 msgid "" "Depending on how ambitious you are, configuring Mercurial's CGI interface can " "take anything from a few moments to several hours." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:874 +#: ../en/ch05-collab.xml:939 msgid "" "We'll begin with the simplest of examples, and work our way towards a more " "complex configuration. Even for the most basic case, you're almost certainly " "going to need to read and modify your web server's configuration." msgstr "" +#. type: Content of: <book><chapter><sect1><note><title> +#: ../en/ch05-collab.xml:945 +msgid "High pain tolerance required" +msgstr "" + #. type: Content of: <book><chapter><sect1><note><para> -#: ../en/ch05-collab.xml:880 +#: ../en/ch05-collab.xml:947 msgid "" "Configuring a web server is a complex, fiddly, and highly system-dependent " "activity. I can't possibly give you instructions that will cover anything " @@ -6766,34 +7061,43 @@ "mistakes, and to spend a lot of time reading your server's error logs." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:890 +#. type: Content of: <book><chapter><sect1><note><para> +#: ../en/ch05-collab.xml:955 +msgid "" +"If you don't have a strong stomach for tweaking configurations over and over, " +"or a compelling need to host your own services, you might want to try one of " +"the public hosting services that I mentioned earlier." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:962 msgid "Web server configuration checklist" msgstr "Web 服务器配置检查表" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:892 +#: ../en/ch05-collab.xml:964 msgid "" "Before you continue, do take a few moments to check a few aspects of your " "system's setup." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:896 -msgid "" -"Do you have a web server installed at all? Mac OS X ships with Apache, but " -"many other systems may not have a web server installed." +#: ../en/ch05-collab.xml:968 +msgid "" +"Do you have a web server installed at all? Mac OS X and some Linux " +"distributions ship with Apache, but many other systems may not have a web " +"server installed." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:900 +#: ../en/ch05-collab.xml:973 msgid "" "If you have a web server installed, is it actually running? On most systems, " "even if one is present, it will be disabled by default." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:904 +#: ../en/ch05-collab.xml:977 msgid "" "Is your server configured to allow you to run CGI programs in the directory " "where you plan to do so? Most servers default to explicitly disabling the " @@ -6801,7 +7105,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:910 +#: ../en/ch05-collab.xml:983 msgid "" "If you don't have a web server installed, and don't have substantial " "experience configuring Apache, you should consider using the " @@ -6814,12 +7118,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:923 +#: ../en/ch05-collab.xml:996 msgid "Basic CGI configuration" msgstr "基本 CGI 配置" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:925 +#: ../en/ch05-collab.xml:998 msgid "" "On Unix-like systems, it's common for users to have a subdirectory named " "something like <filename class=\"directory\">public_html</filename> in their " @@ -6829,7 +7133,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:933 +#: ../en/ch05-collab.xml:1006 msgid "" "To get started, find the <filename role=\"special\">hgweb.cgi</filename> " "script that should be present in your Mercurial installation. If you can't " @@ -6839,14 +7143,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:940 ../en/ch05-collab.xml:1109 +#: ../en/ch05-collab.xml:1013 ../en/ch05-collab.xml:1182 msgid "" "You'll need to copy this script into your <filename class=\"directory" "\">public_html</filename> directory, and ensure that it's executable." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:945 +#: ../en/ch05-collab.xml:1018 msgid "" "The <literal>755</literal> argument to <command>chmod</command> is a little " "more general than just making the script executable: it ensures that the " @@ -6859,12 +7163,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:959 +#: ../en/ch05-collab.xml:1032 msgid "What could <emphasis>possibly</emphasis> go wrong?" msgstr "什么<emphasis>可能</emphasis>会出错?" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:962 +#: ../en/ch05-collab.xml:1035 msgid "" "Once you've copied the CGI script into place, go into a web browser, and try " "to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://" @@ -6878,7 +7182,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:976 +#: ../en/ch05-collab.xml:1049 msgid "" "Your web server may have per-user directories disabled. If you're using " "Apache, search your config file for a <literal>UserDir</literal> directive. " @@ -6891,7 +7195,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:987 +#: ../en/ch05-collab.xml:1060 msgid "" "Your file access permissions may be too restrictive. The web server must be " "able to traverse your home directory and directories under your <filename " @@ -6901,7 +7205,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:997 +#: ../en/ch05-collab.xml:1070 msgid "" "The other possibility with permissions is that you might get a completely " "empty window when you try to load the script. In this case, it's likely that " @@ -6911,7 +7215,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1004 +#: ../en/ch05-collab.xml:1077 msgid "" "Your web server may be configured to disallow execution of CGI programs in " "your per-user web directory. Here's Apache's default per-user configuration " @@ -6919,7 +7223,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1011 +#: ../en/ch05-collab.xml:1084 msgid "" "If you find a similar-looking <literal>Directory</literal> group in your " "Apache configuration, the directive to look at inside it is <literal>Options</" @@ -6928,7 +7232,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1018 +#: ../en/ch05-collab.xml:1091 msgid "" "If you find that Apache serves you the text of the CGI script instead of " "executing it, you may need to either uncomment (if already present) or add a " @@ -6936,7 +7240,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1024 +#: ../en/ch05-collab.xml:1097 msgid "" "The next possibility is that you might be served with a colourful Python " "backtrace claiming that it can't import a <literal>mercurial</literal>-" @@ -6951,7 +7255,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1038 +#: ../en/ch05-collab.xml:1111 msgid "" "Finally, you are <emphasis>certain</emphasis> to by served with another " "colourful Python backtrace: this one will complain that it can't find " @@ -6962,19 +7266,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1048 +#: ../en/ch05-collab.xml:1121 msgid "" "At this point, when you try to reload the page, you should be presented with " "a nice HTML view of your repository's history. Whew!" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1054 +#: ../en/ch05-collab.xml:1127 msgid "Configuring lighttpd" msgstr "配置 lighttpd" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1056 +#: ../en/ch05-collab.xml:1129 msgid "" "To be exhaustive in my experiments, I tried configuring the increasingly " "popular <literal>lighttpd</literal> web server to serve the same repository " @@ -6985,7 +7289,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1066 +#: ../en/ch05-collab.xml:1139 msgid "" "Once I had Apache running, getting <literal>lighttpd</literal> to serve the " "repository was a snap (in other words, even if you're trying to use " @@ -6997,7 +7301,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1078 +#: ../en/ch05-collab.xml:1151 msgid "" "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " @@ -7008,12 +7312,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1091 +#: ../en/ch05-collab.xml:1164 msgid "Sharing multiple repositories with one CGI script" msgstr "使用一个 CGI 脚本共享多个版本库" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1093 +#: ../en/ch05-collab.xml:1166 msgid "" "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " "publish a single repository, which is an annoying restriction. If you want " @@ -7023,7 +7327,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1101 +#: ../en/ch05-collab.xml:1174 msgid "" "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" @@ -7034,7 +7338,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1116 +#: ../en/ch05-collab.xml:1189 msgid "" "With basic configuration out of the way, try to visit <ulink url=\"http://" "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" @@ -7044,7 +7348,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1125 +#: ../en/ch05-collab.xml:1198 msgid "" "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " "external configuration file. By default, it searches for a file named " @@ -7056,7 +7360,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1135 +#: ../en/ch05-collab.xml:1208 msgid "" "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" "filename> is with a section named <literal>collections</literal>. This will " @@ -7065,7 +7369,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1143 +#: ../en/ch05-collab.xml:1216 msgid "" "Mercurial interprets this by looking at the directory name on the " "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" @@ -7077,7 +7381,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1152 +#: ../en/ch05-collab.xml:1225 msgid "" "Given the example above, if we have a repository whose local path is " "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script " @@ -7091,7 +7395,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1166 +#: ../en/ch05-collab.xml:1239 msgid "" "If we replace <filename class=\"directory\">/my/root</filename> on the left " "hand side of this example with <filename class=\"directory\">/my</filename>, " @@ -7102,7 +7406,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1176 +#: ../en/ch05-collab.xml:1249 msgid "" "The <filename role=\"special\">hgwebdir.cgi</filename> script will " "recursively search each directory listed in the <literal>collections</" @@ -7111,7 +7415,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1182 +#: ../en/ch05-collab.xml:1255 msgid "" "The <literal>collections</literal> mechanism makes it easy to publish many " "repositories in a <quote>fire and forget</quote> manner. You only need to " @@ -7122,12 +7426,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1192 +#: ../en/ch05-collab.xml:1265 msgid "Explicitly specifying which repositories to publish" msgstr "明确指出要发布的版本库" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1195 +#: ../en/ch05-collab.xml:1268 msgid "" "In addition to the <literal>collections</literal> mechanism, the <filename " "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " @@ -7136,7 +7440,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1204 +#: ../en/ch05-collab.xml:1277 msgid "" "In this case, the virtual path (the component that will appear in a URL) is " "on the left hand side of each definition, while the path to the repository is " @@ -7146,28 +7450,33 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1211 +#: ../en/ch05-collab.xml:1284 msgid "" "If you wish, you can use both the <literal>collections</literal> and " "<literal>paths</literal> mechanisms simultaneously in a single configuration " "file." msgstr "" +#. type: Content of: <book><chapter><sect1><sect2><sect3><note><title> +#: ../en/ch05-collab.xml:1290 +msgid "Beware duplicate virtual paths" +msgstr "" + #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> -#: ../en/ch05-collab.xml:1217 -msgid "" -"If multiple repositories have the same virtual path, <filename role=\"special" +#: ../en/ch05-collab.xml:1292 +msgid "" +"If several repositories have the same virtual path, <filename role=\"special" "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " "unpredictably." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1226 +#: ../en/ch05-collab.xml:1301 msgid "Downloading source archives" msgstr "下载源代码档案包" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1228 +#: ../en/ch05-collab.xml:1303 msgid "" "Mercurial's web interface lets users download an archive of any revision. " "This archive will contain a snapshot of the working directory as of that " @@ -7175,21 +7484,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1233 +#: ../en/ch05-collab.xml:1308 msgid "" "By default, this feature is not enabled. To enable it, you'll need to add an " "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role=" "\"rc-web\">web</literal> section of your <filename role=\"special\">~/.hgrc</" -"filename>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1241 +"filename>; see below for details." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:1315 msgid "Web configuration options" msgstr "Web 配置选项" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1243 +#: ../en/ch05-collab.xml:1317 msgid "" "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " "command, and the <filename role=\"special\">hgweb.cgi</filename> and " @@ -7199,7 +7508,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1251 +#: ../en/ch05-collab.xml:1325 msgid "" "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " "archive download mechanisms Mercurial supports. If you enable this feature, " @@ -7209,7 +7518,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1260 +#: ../en/ch05-collab.xml:1334 msgid "" "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " "<literal>bzip2</literal> compression. This has the best compression ratio, " @@ -7217,14 +7526,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1266 +#: ../en/ch05-collab.xml:1340 msgid "" "<literal>gz</literal>: A <command>tar</command> archive, compressed using " "<literal>gzip</literal> compression." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1270 +#: ../en/ch05-collab.xml:1344 msgid "" "<literal>zip</literal>: A <command>zip</command> archive, compressed using " "LZW compression. This format has the worst compression ratio, but is widely " @@ -7232,7 +7541,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1276 +#: ../en/ch05-collab.xml:1350 msgid "" "If you provide an empty list, or don't have an <envar role=\"rc-item-web" "\">allow_archive</envar> entry at all, this feature will be disabled. Here " @@ -7240,7 +7549,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1283 +#: ../en/ch05-collab.xml:1357 msgid "" "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" @@ -7250,7 +7559,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1292 +#: ../en/ch05-collab.xml:1366 msgid "" "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but " "preferably brief) string identifying the person or group in charge of the " @@ -7262,21 +7571,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1303 +#: ../en/ch05-collab.xml:1377 msgid "" "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum " "number of changesets to display in a single page of output." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1307 +#: ../en/ch05-collab.xml:1381 msgid "" "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum " "number of modified files to display in a single page of output." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1311 +#: ../en/ch05-collab.xml:1385 msgid "" "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " "displays alternating <quote>stripes</quote> to make it easier to visually " @@ -7285,18 +7594,49 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1317 +#: ../en/ch05-collab.xml:1391 msgid "" "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial " -"uses to display the web interface. Mercurial ships with two web templates, " -"named <literal>default</literal> and <literal>gitweb</literal> (the latter is " -"much more visually attractive). You can also specify a custom template of " -"your own; see <xref linkend=\"chap:template\"/> for details. Here, you can " -"see how to enable the <literal>gitweb</literal> style." +"uses to display the web interface. Mercurial ships with several web " +"templates." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1397 +msgid "<literal>coal</literal> is monochromatic." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1400 +msgid "" +"<literal>gitweb</literal> emulates the visual style of git's web interface." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1404 +msgid "<literal>monoblue</literal> uses solid blues and greys." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1408 +msgid "<literal>paper</literal> is the default." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1411 +msgid "<literal>spartan</literal> was the default for a long time." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1330 +#: ../en/ch05-collab.xml:1415 +msgid "" +"You can also specify a custom template of your own; see <xref linkend=\"chap:" +"template\"/> for details. Here, you can see how to enable the " +"<literal>gitweb</literal> style." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch05-collab.xml:1423 msgid "" "<envar role=\"rc-item-web\">templates</envar>: Path. The directory in which " "to search for template files. By default, Mercurial searches in the " @@ -7304,7 +7644,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1335 +#: ../en/ch05-collab.xml:1428 msgid "" "If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can " "place a few configuration items in a <literal role=\"rc-web\">web</literal> " @@ -7315,12 +7655,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1346 +#: ../en/ch05-collab.xml:1439 msgid "Options specific to an individual repository" msgstr "针对单个版本库的选项" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1348 +#: ../en/ch05-collab.xml:1441 msgid "" "A few <literal role=\"rc-web\">web</literal> configuration items ought to be " "placed in a repository's local <filename role=\"special\">.hg/hgrc</" @@ -7329,7 +7669,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1353 +#: ../en/ch05-collab.xml:1446 msgid "" "<envar role=\"rc-item-web\">description</envar>: String. A free-form (but " "preferably brief) string that describes the contents or purpose of the " @@ -7337,7 +7677,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1358 +#: ../en/ch05-collab.xml:1451 msgid "" "<envar role=\"rc-item-web\">name</envar>: String. The name to use for the " "repository in the web interface. This overrides the default name, which is " @@ -7345,13 +7685,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1366 +#: ../en/ch05-collab.xml:1459 msgid "" "Options specific to the <command role=\"hg-cmd\">hg serve</command> command" msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1369 +#: ../en/ch05-collab.xml:1462 msgid "" "Some of the items in the <literal role=\"rc-web\">web</literal> section of a " "<filename role=\"special\">~/.hgrc</filename> file are only for use with the " @@ -7359,7 +7699,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1375 +#: ../en/ch05-collab.xml:1468 msgid "" "<envar role=\"rc-item-web\">accesslog</envar>: Path. The name of a file into " "which to write an access log. By default, the <command role=\"hg-cmd\">hg " @@ -7369,7 +7709,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1383 +#: ../en/ch05-collab.xml:1476 msgid "" "<envar role=\"rc-item-web\">address</envar>: String. The local address on " "which the server should listen for incoming connections. By default, the " @@ -7377,7 +7717,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1388 +#: ../en/ch05-collab.xml:1481 msgid "" "<envar role=\"rc-item-web\">errorlog</envar>: Path. The name of a file into " "which to write an error log. By default, the <command role=\"hg-cmd\">hg " @@ -7386,21 +7726,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1394 +#: ../en/ch05-collab.xml:1487 msgid "" "<envar role=\"rc-item-web\">ipv6</envar>: Boolean. Whether to use the IPv6 " "protocol. By default, IPv6 is not used." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1398 +#: ../en/ch05-collab.xml:1491 msgid "" "<envar role=\"rc-item-web\">port</envar>: Integer. The TCP port number on " "which the server should listen. The default port number used is 8000." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1405 +#: ../en/ch05-collab.xml:1498 msgid "" "Choosing the right <filename role=\"special\">~/.hgrc</filename> file to add " "<literal role=\"rc-web\">web</literal> items to" @@ -7409,7 +7749,7 @@ "role=\"rc-web\">web</literal> 条目" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1409 +#: ../en/ch05-collab.xml:1502 msgid "" "It is important to remember that a web server like Apache or " "<literal>lighttpd</literal> will run under a user ID that is different to " @@ -7418,16 +7758,67 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1416 +#: ../en/ch05-collab.xml:1509 msgid "" "If you add <literal role=\"rc-web\">web</literal> items to your own personal " "<filename role=\"special\">~/.hgrc</filename> file, CGI scripts won't read " "that <filename role=\"special\">~/.hgrc</filename> file. Those settings will " -"thus only affect the behaviour of the <command role=\"hg-cmd\">hg serve</" +"thus only affect the behavior of the <command role=\"hg-cmd\">hg serve</" "command> command when you run it. To cause CGI scripts to see your settings, " "either create a <filename role=\"special\">~/.hgrc</filename> file in the " "home directory of the user ID that runs your web server, or add those " -"settings to a system-wide <filename role=\"special\">~/.hgrc</filename> file." +"settings to a system-wide <filename role=\"special\">hgrc</filename> file." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch05-collab.xml:1524 +#, fuzzy +msgid "System-wide configuration" +msgstr "基本 CGI 配置" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:1526 +msgid "" +"On Unix-like systems shared by multiple users (such as a server to which " +"people publish changes), it often makes sense to set up some global default " +"behaviors, such as what theme to use in web interfaces." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch05-collab.xml:1531 +msgid "" +"If a file named <filename>/etc/mercurial/hgrc</filename> exists, Mercurial " +"will read it at startup time and apply any configuration settings it finds in " +"that file. It will also look for files ending in a <literal>.rc</literal> " +"extension in a directory named <filename>/etc/mercurial/hgrc.d</filename>, " +"and apply any configuration settings it finds in each of those files." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch05-collab.xml:1540 +#, fuzzy +msgid "Making Mercurial more trusting" +msgstr "安装 Mercurial" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:1542 +msgid "" +"One situation in which a global <filename>hgrc</filename> can be useful is if " +"users are pulling changes owned by other users. By default, Mercurial will " +"not trust most of the configuration items in a <filename>.hg/hgrc</filename> " +"file inside a repository that is owned by a different user. If we clone or " +"pull changes from such a repository, Mercurial will print a warning stating " +"that it does not trust their <filename>.hg/hgrc</filename>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:1551 +msgid "" +"If everyone in a particular Unix group is on the same team and " +"<emphasis>should</emphasis> trust each other's configuration settings, or we " +"want to trust particular users, we can override Mercurial's skeptical " +"defaults by creating a system-wide <filename>hgrc</filename> file such as the " +"following:" msgstr "" #. type: Content of: <book><chapter><title> @@ -7481,9 +7872,9 @@ #. type: Content of: <book><chapter><sect1><para> #: ../en/ch06-filenames.xml:35 msgid "" -"Mercurial's commands that work with file names have useful default behaviours " +"Mercurial's commands that work with file names have useful default behaviors " "when you invoke them without providing any file names or patterns. What kind " -"of behaviour you should expect depends on what the command does. Here are a " +"of behavior you should expect depends on what the command does. Here are a " "few rules of thumb you can use to predict what a command is likely to do if " "you don't give it any names to work with." msgstr "" @@ -7504,11 +7895,10 @@ "<command role=\"hg-cmd\">hg remove</command> with no arguments, for example." msgstr "" -# #. type: Content of: <book><chapter><sect1><para> #: ../en/ch06-filenames.xml:54 msgid "" -"It's easy to work around these default behaviours if they don't suit you. If " +"It's easy to work around these default behaviors if they don't suit you. If " "a command normally operates on the whole working directory, you can invoke it " "on just the current directory and its subdirectories by giving it the name " "<quote><filename class=\"directory\">.</filename></quote>." @@ -7549,8 +7939,8 @@ "The principle here is of <emphasis>least surprise</emphasis>. If you've " "exactly named a file on the command line, there's no point in repeating it " "back at you. If Mercurial is acting on a file <emphasis>implicitly</" -"emphasis>, because you provided no names, or a directory, or a pattern (see " -"below), it's safest to tell you what it's doing." +"emphasis>, e.g. because you provided no names, or a directory, or a pattern " +"(see below), it is safest to tell you what files it's operating on." msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -7810,21 +8200,63 @@ #. type: Content of: <book><chapter><sect1><title> #: ../en/ch06-filenames.xml:272 -msgid "Ignoring unwanted files and directories" +#, fuzzy +msgid "Permanently ignoring unwanted files and directories" msgstr "忽略不需要的文件和目录" #. type: Content of: <book><chapter><sect1><para> #: ../en/ch06-filenames.xml:274 -msgid "XXX." +msgid "" +"When you create a new repository, the chances are that over time it will grow " +"to contain files that ought to <emphasis>not</emphasis> be managed by " +"Mercurial, but which you don't want to see listed every time you run " +"<command>hg status</command>. For instance, <quote>build products</quote> " +"are files that are created as part of a build but which should not be managed " +"by a revision control system. The most common build products are output " +"files produced by software tools such as compilers. As another example, many " +"text editors litter a directory with lock files, temporary working files, and " +"backup files, which it also makes no sense to manage." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch06-filenames.xml:286 +msgid "" +"To have Mercurial permanently ignore such files, create a file named " +"<filename>.hgignore</filename> in the root of your repository. You " +"<emphasis>should</emphasis> <command>hg add</command> this file so that it " +"gets tracked with the rest of your repository contents, since your " +"collaborators will probably find it useful too." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch06-filenames.xml:293 +msgid "" +"By default, the <filename>.hgignore</filename> file should contain a list of " +"regular expressions, one per line. Empty lines are skipped. Most people " +"prefer to describe the files they want to ignore using the <quote>glob</" +"quote> syntax that we described above, so a typical <filename>.hgignore</" +"filename> file will start with this directive:" +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch06-filenames.xml:302 +msgid "" +"This tells Mercurial to interpret the lines that follow as glob patterns, not " +"regular expressions." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch06-filenames.xml:305 +msgid "Here is a typical-looking <filename>.hgignore</filename> file." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch06-filenames.xml:278 +#: ../en/ch06-filenames.xml:329 msgid "Case sensitivity" msgstr "大小写敏感性" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch06-filenames.xml:280 +#: ../en/ch06-filenames.xml:331 msgid "" "If you're working in a mixed development environment that contains both Linux " "(or other Unix) systems and Macs or Windows systems, you should keep in the " @@ -7835,7 +8267,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch06-filenames.xml:289 +#: ../en/ch06-filenames.xml:340 msgid "" "Operating systems and filesystems differ in the way they handle the " "<emphasis>case</emphasis> of characters in file and directory names. There " @@ -7843,7 +8275,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch06-filenames.xml:294 +#: ../en/ch06-filenames.xml:345 msgid "" "Completely case insensitive. Uppercase and lowercase versions of a letter " "are treated as identical, both when creating a file and during subsequent " @@ -7851,7 +8283,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch06-filenames.xml:299 +#: ../en/ch06-filenames.xml:350 msgid "" "Case preserving, but insensitive. When a file or directory is created, the " "case of its name is stored, and can be retrieved and displayed by the " @@ -7863,7 +8295,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch06-filenames.xml:310 +#: ../en/ch06-filenames.xml:361 msgid "" "Case sensitive. The case of a name is significant at all times. The names " "<filename>foo</filename> and {FoO} identify different files. This is the way " @@ -7871,7 +8303,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch06-filenames.xml:316 +#: ../en/ch06-filenames.xml:367 msgid "" "On Unix-like systems, it is possible to have any or all of the above ways of " "handling case in action at once. For example, if you use a USB thumb drive " @@ -7880,12 +8312,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch06-filenames.xml:323 +#: ../en/ch06-filenames.xml:374 msgid "Safe, portable repository storage" msgstr "安全,可移植的版本库存储" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:325 +#: ../en/ch06-filenames.xml:376 msgid "" "Mercurial's repository storage mechanism is <emphasis>case safe</emphasis>. " "It translates file names so that they can be safely stored on both case " @@ -7896,12 +8328,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch06-filenames.xml:336 +#: ../en/ch06-filenames.xml:387 msgid "Detecting case conflicts" msgstr "检测大小写冲突" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:338 +#: ../en/ch06-filenames.xml:389 msgid "" "When operating in the working directory, Mercurial honours the naming policy " "of the filesystem where the working directory is located. If the filesystem " @@ -7910,7 +8342,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:344 +#: ../en/ch06-filenames.xml:395 msgid "" "An important aspect of this approach is that it is possible to commit a " "changeset on a case sensitive (typically Linux or Unix) filesystem that will " @@ -7923,7 +8355,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:355 +#: ../en/ch06-filenames.xml:406 msgid "" "If a Windows or Mac user pulls this change, they will not initially have a " "problem, because Mercurial's repository storage mechanism is case safe. " @@ -7935,12 +8367,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch06-filenames.xml:367 +#: ../en/ch06-filenames.xml:418 msgid "Fixing a case conflict" msgstr "修正大小写冲突" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:369 +#: ../en/ch06-filenames.xml:420 msgid "" "If you are using Windows or a Mac in a mixed environment where some of your " "collaborators are using Linux or Unix, and Mercurial reports a case folding " @@ -7950,7 +8382,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:376 +#: ../en/ch06-filenames.xml:427 msgid "" "Just find a nearby Linux or Unix box, clone the problem repository onto it, " "and use Mercurial's <command role=\"hg-cmd\">hg rename</command> command to " @@ -7962,7 +8394,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch06-filenames.xml:386 +#: ../en/ch06-filenames.xml:437 msgid "" "The changeset with case-conflicting names will remain in your project's " "history, and you still won't be able to <command role=\"hg-cmd\">hg update</" @@ -7970,15 +8402,6 @@ "system, but you can continue development unimpeded." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch06-filenames.xml:393 -msgid "" -"Prior to version 0.9.3, Mercurial did not use a case safe repository storage " -"mechanism, and did not detect case folding conflicts. If you are using an " -"older version of Mercurial on Windows or MacOS, I strongly recommend that you " -"upgrade." -msgstr "" - #. type: Content of: <book><chapter><title> #: ../en/ch07-branch.xml:5 msgid "Managing releases and branchy development" @@ -8152,17 +8575,17 @@ "revision once you discover your error." msgstr "" -# #. type: Content of: <book><chapter><sect1><para> #: ../en/ch07-branch.xml:129 msgid "" "Mercurial stores tags in a normal revision-controlled file in your " -"repository. If you've created any tags, you'll find them in a file named " -"<filename role=\"special\">.hgtags</filename>. When you run the <command " -"role=\"hg-cmd\">hg tag</command> command, Mercurial modifies this file, then " -"automatically commits the change to it. This means that every time you run " -"<command role=\"hg-cmd\">hg tag</command>, you'll see a corresponding " -"changeset in the output of <command role=\"hg-cmd\">hg log</command>." +"repository. If you've created any tags, you'll find them in a file in the " +"root of your repository named <filename role=\"special\">.hgtags</filename>. " +"When you run the <command role=\"hg-cmd\">hg tag</command> command, Mercurial " +"modifies this file, then automatically commits the change to it. This means " +"that every time you run <command role=\"hg-cmd\">hg tag</command>, you'll see " +"a corresponding changeset in the output of <command role=\"hg-cmd\">hg log</" +"command>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -8532,7 +8955,7 @@ #. type: Content of: <book><chapter><sect1><para> #: ../en/ch07-branch.xml:427 msgid "" -"This behaviour is a little subtle, so let's see it in action. First, let's " +"This behavior is a little subtle, so let's see it in action. First, let's " "remind ourselves what branch we're currently on, and what branches are in our " "repository." msgstr "" @@ -8847,7 +9270,7 @@ "Mercurial stores exactly one transaction in its transaction log; that " "transaction is the most recent one that occurred in the repository. This " "means that you can only roll back one transaction. If you expect to be able " -"to roll back one transaction, then its predecessor, this is not the behaviour " +"to roll back one transaction, then its predecessor, this is not the behavior " "you will get." msgstr "" @@ -9547,12 +9970,11 @@ #: ../en/ch08-undo.xml:689 msgid "" "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is " -"that a changeset has introduced some change of behaviour that you can " -"identify with a simple binary test. You don't know which piece of code " -"introduced the change, but you know how to test for the presence of the bug. " -"The <command role=\"hg-cmd\">hg bisect</command> command uses your test to " -"direct its search for the changeset that introduced the code that caused the " -"bug." +"that a changeset has introduced some change of behavior that you can identify " +"with a simple binary test. You don't know which piece of code introduced the " +"change, but you know how to test for the presence of the bug. The <command " +"role=\"hg-cmd\">hg bisect</command> command uses your test to direct its " +"search for the changeset that introduced the code that caused the bug." msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -10049,7 +10471,7 @@ "Even if you end up <quote>early</quote> by thousands of changesets or months " "of history, you will only add a handful of tests to the total number that " "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its " -"logarithmic behaviour." +"logarithmic behavior." msgstr "" #. type: Content of: <book><chapter><title> @@ -10303,7 +10725,7 @@ msgid "" "Mercurial allows you to override a hook definition by redefining the hook. " "You can disable it by setting its value to the empty string, or change its " -"behaviour as you wish." +"behavior as you wish." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -11296,7 +11718,7 @@ "You can configure the text that this hook adds as a comment; you specify it " "in the form of a Mercurial template. Several <filename role=\"special\">~/." "hgrc</filename> entries (still in the <literal role=\"rc-bugzilla\">bugzilla</" -"literal> section) control this behaviour." +"literal> section) control this behavior." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> @@ -13385,7 +13807,7 @@ #: ../en/ch11-mq.xml:67 msgid "" "During the late 1990s, several Linux kernel developers started to maintain " -"<quote>patch series</quote> that modified the behaviour of the Linux kernel. " +"<quote>patch series</quote> that modified the behavior of the Linux kernel. " "Some of these series were focused on stability, some on feature coverage, and " "others were more speculative." msgstr "" @@ -13465,8 +13887,7 @@ #: ../en/ch11-mq.xml:126 msgid "" "In mid-2005, Chris Mason took the features of quilt and wrote an extension " -"that he called Mercurial Queues, which added quilt-like behaviour to " -"Mercurial." +"that he called Mercurial Queues, which added quilt-like behavior to Mercurial." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -14758,7 +15179,7 @@ "Whether you are working on a patch series to submit to a free software or " "open source project, or a series that you intend to treat as a sequence of " "regular changesets when you're done, you can use some simple techniques to " -"keep your work well organised." +"keep your work well organized." msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -15615,7 +16036,7 @@ msgstr "" # -#. &example.hg-interdiff; +#. &example.hg-interdiff; #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch12-mq-collab.xml:466 msgid "" @@ -15804,7 +16225,7 @@ "cmd\">hg status</command> commands. The extension has two components. A " "daemon sits in the background and receives notifications from the " "<literal>inotify</literal> subsystem. It also listens for connections from a " -"regular Mercurial command. The extension modifies Mercurial's behaviour so " +"regular Mercurial command. The extension modifies Mercurial's behavior so " "that instead of scanning the filesystem, it queries the daemon. Since the " "daemon has perfect information about the state of the repository, it can " "respond with a result instantaneously, avoiding the need to scan every " @@ -16000,7 +16421,7 @@ msgid "" "When you're using the <literal role=\"hg-ext\">inotify</literal> extension, " "you should notice <emphasis>no difference at all</emphasis> in Mercurial's " -"behaviour, with the sole exception of status-related commands running a whole " +"behavior, with the sole exception of status-related commands running a whole " "lot faster than they used to. You should specifically expect that commands " "will not print different output; neither should they give different results. " "If either of these situations occurs, please report a bug." @@ -16300,7 +16721,8 @@ #. type: Content of: <book><chapter><sect1><sect2><title> #: ../en/ch13-hgext.xml:484 -msgid "Changing the behaviour of patchbombs" +#, fuzzy +msgid "Changing the behavior of patchbombs" msgstr "修改 patchbomb 的行为" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -16330,7 +16752,7 @@ #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch13-hgext.xml:504 msgid "" -"The default behaviour is to send unified diffs (see <xref linkend=\"sec:mq:" +"The default behavior is to send unified diffs (see <xref linkend=\"sec:mq:" "patch\"/> for a description of the format), one per message. You can send a " "binary bundle instead with the <option role=\"hg-ext-patchbomb-cmd-email-opt" "\">hg -b</option> option."