# HG changeset patch # User Dongsheng Song # Date 1238420272 -28800 # Node ID 433040113eaf379ae5d510c943b00ff8e2989abc # Parent 1e020cb7d417dfbb8e0a1b21072ca9fd70f3d086 Update file location in po files diff -r 1e020cb7d417 -r 433040113eaf po/zh.po --- a/po/zh.po Mon Mar 30 21:36:31 2009 +0800 +++ b/po/zh.po Mon Mar 30 21:37:52 2009 +0800 @@ -41,7 +41,7 @@ msgid "" msgstr "" "Project-Id-Version: hgbook 1.2\n" -"POT-Creation-Date: 2009-03-20 17:12+0800\n" +"POT-Creation-Date: 2009-03-30 21:36+0800\n" "PO-Revision-Date: 2009-03-20 17:12+0800\n" "Last-Translator: \n" "Language-Team: Simplified Chinese \n" @@ -84,32 +84,32 @@ "year> Bryan O'Sullivan " #. type: Content of: -#: ../en/appA-cmdref.xml:4 +#: ../en/appA-cmdref.xml:5 msgid "Command reference" msgstr "命令参考" #. type: Content of: <book><appendix><para> -#: ../en/appA-cmdref.xml:6 +#: ../en/appA-cmdref.xml:7 msgid "" "\\cmdref{add}{add files at the next commit} \\optref{add}{I}{include} \\optref" "{add}{X}{exclude} \\optref{add}{n}{dry-run}" msgstr "" #. type: Content of: <book><appendix><para> -#: ../en/appA-cmdref.xml:11 +#: ../en/appA-cmdref.xml:12 msgid "\\cmdref{diff}{print changes in history or working directory}" msgstr "" #. type: Content of: <book><appendix><para> -#: ../en/appA-cmdref.xml:13 +#: ../en/appA-cmdref.xml:14 msgid "" "Show differences between revisions for the specified files or directories, " "using the unified diff format. For a description of the unified diff format, " -"see section <xref linkend=\"sec.mq.patch\"/>." +"see <xref linkend=\"sec:mq:patch\"/>." msgstr "" #. type: Content of: <book><appendix><para> -#: ../en/appA-cmdref.xml:17 +#: ../en/appA-cmdref.xml:18 msgid "" "By default, this command does not print diffs for files that Mercurial " "considers to contain binary data. To control this behaviour, see the <option " @@ -118,59 +118,59 @@ msgstr "" #. type: Content of: <book><appendix><sect2><title> -#: ../en/appA-cmdref.xml:22 +#: ../en/appA-cmdref.xml:23 msgid "Options" msgstr "选项" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:24 +#: ../en/appA-cmdref.xml:25 msgid "\\loptref{diff}{nodates}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:26 +#: ../en/appA-cmdref.xml:27 msgid "Omit date and time information when printing diff headers." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:28 +#: ../en/appA-cmdref.xml:29 msgid "\\optref{diff}{B}{ignore-blank-lines}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:30 +#: ../en/appA-cmdref.xml:31 msgid "" "Do not print changes that only insert or delete blank lines. A line that " "contains only whitespace is not considered blank." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:34 +#: ../en/appA-cmdref.xml:35 msgid "\\optref{diff}{I}{include}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:37 +#: ../en/appA-cmdref.xml:38 msgid "Include files and directories whose names match the given patterns." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:40 +#: ../en/appA-cmdref.xml:41 msgid "\\optref{diff}{X}{exclude}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:43 +#: ../en/appA-cmdref.xml:44 msgid "Exclude files and directories whose names match the given patterns." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:46 +#: ../en/appA-cmdref.xml:47 msgid "\\optref{diff}{a}{text}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:49 +#: ../en/appA-cmdref.xml:50 msgid "" "If this option is not specified, <command role=\"hg-cmd\">hg diff</command> " "will refuse to print diffs for files that it detects as binary. Specifying " @@ -179,7 +179,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:55 +#: ../en/appA-cmdref.xml:56 msgid "" "This option is useful for files that are <quote>mostly text</quote> but have " "a few embedded NUL characters. If you use it on files that contain a lot of " @@ -187,36 +187,36 @@ msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:60 +#: ../en/appA-cmdref.xml:61 msgid "\\optref{diff}{b}{ignore-space-change}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:63 +#: ../en/appA-cmdref.xml:64 msgid "" "Do not print a line if the only change to that line is in the amount of white " "space it contains." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:67 +#: ../en/appA-cmdref.xml:68 msgid "\\optref{diff}{g}{git}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:70 +#: ../en/appA-cmdref.xml:71 msgid "" "Print <command>git</command>-compatible diffs. XXX reference a format " "description." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:74 +#: ../en/appA-cmdref.xml:75 msgid "\\optref{diff}{p}{show-function}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:77 +#: ../en/appA-cmdref.xml:78 msgid "" "Display the name of the enclosing function in a hunk header, using a simple " "heuristic. This functionality is enabled by default, so the <option role=" @@ -226,12 +226,12 @@ msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:84 +#: ../en/appA-cmdref.xml:85 msgid "\\optref{diff}{r}{rev}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:87 +#: ../en/appA-cmdref.xml:88 msgid "" "Specify one or more revisions to compare. The <command role=\"hg-cmd\">hg " "diff</command> command accepts up to two <option role=\"hg-opt-diff\">-r</" @@ -239,26 +239,26 @@ msgstr "" #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> -#: ../en/appA-cmdref.xml:93 +#: ../en/appA-cmdref.xml:94 msgid "" "Display the differences between the parent revision of the working directory " "and the working directory." msgstr "" #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> -#: ../en/appA-cmdref.xml:97 +#: ../en/appA-cmdref.xml:98 msgid "" "Display the differences between the specified changeset and the working " "directory." msgstr "" #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> -#: ../en/appA-cmdref.xml:101 +#: ../en/appA-cmdref.xml:102 msgid "Display the differences between the two specified changesets." msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:105 +#: ../en/appA-cmdref.xml:106 msgid "" "You can specify two revisions using either two <option role=\"hg-opt-diff\">-" "r</option> options or revision range notation. For example, the two revision " @@ -266,7 +266,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:112 +#: ../en/appA-cmdref.xml:113 msgid "" "When you provide two revisions, Mercurial treats the order of those revisions " "as significant. Thus, <command role=\"hg-cmd\">hg diff -r10:20</command> " @@ -279,24 +279,24 @@ msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:122 +#: ../en/appA-cmdref.xml:123 msgid "\\optref{diff}{w}{ignore-all-space}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:125 +#: ../en/appA-cmdref.xml:126 msgid "\\cmdref{version}{print version and copyright information}" msgstr "" #. type: Content of: <book><appendix><sect2><para> -#: ../en/appA-cmdref.xml:128 +#: ../en/appA-cmdref.xml:129 msgid "" "This command displays the version of Mercurial you are running, and its " "copyright license. There are four kinds of version string that you may see." msgstr "" #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> -#: ../en/appA-cmdref.xml:133 +#: ../en/appA-cmdref.xml:134 msgid "" "The string <quote><literal>unknown</literal></quote>. This version of " "Mercurial was not built in a Mercurial repository, and cannot determine its " @@ -304,7 +304,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> -#: ../en/appA-cmdref.xml:138 +#: ../en/appA-cmdref.xml:139 msgid "" "A short numeric string, such as <quote><literal>1.1</literal></quote>. This " "is a build of a revision of Mercurial that was identified by a specific tag " @@ -314,14 +314,14 @@ msgstr "" #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> -#: ../en/appA-cmdref.xml:146 +#: ../en/appA-cmdref.xml:147 msgid "" "A hexadecimal string, such as <quote><literal>875489e31abe</literal></" "quote>. This is a build of the given revision of Mercurial." msgstr "" #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> -#: ../en/appA-cmdref.xml:150 +#: ../en/appA-cmdref.xml:151 msgid "" "A hexadecimal string followed by a date, such as <quote><literal>875489e31abe" "+20070205</literal></quote>. This is a build of the given revision of " @@ -330,12 +330,12 @@ msgstr "" #. type: Content of: <book><appendix><sect2><title> -#: ../en/appA-cmdref.xml:159 +#: ../en/appA-cmdref.xml:160 msgid "Tips and tricks" msgstr "" #. type: Content of: <book><appendix><sect2><sect3><title> -#: ../en/appA-cmdref.xml:162 +#: ../en/appA-cmdref.xml:163 msgid "" "Why do the results of <command role=\"hg-cmd\">hg diff</command> and <command " "role=\"hg-cmd\">hg status</command> differ?" @@ -344,7 +344,7 @@ "\">hg status</command> 的结果不同 ?" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:164 +#: ../en/appA-cmdref.xml:165 msgid "" "When you run the <command role=\"hg-cmd\">hg status</command> command, you'll " "see a list of files that Mercurial will record changes for the next time you " @@ -355,7 +355,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:171 +#: ../en/appA-cmdref.xml:172 msgid "" "The first is that <command role=\"hg-cmd\">hg status</command> prints some " "kinds of modifications that <command role=\"hg-cmd\">hg diff</command> " @@ -367,7 +367,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:179 +#: ../en/appA-cmdref.xml:180 msgid "" "If you use the <option role=\"hg-opt-diff\">--git</option> option to <command " "role=\"hg-cmd\">hg diff</command>, it will display <command>git</command>-" @@ -375,7 +375,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:184 +#: ../en/appA-cmdref.xml:185 msgid "" "The second possible reason that <command role=\"hg-cmd\">hg diff</command> " "might be printing diffs for a subset of the files displayed by <command role=" @@ -394,12 +394,12 @@ msgstr "" #. type: Content of: <book><appendix><sect2><sect3><title> -#: ../en/appA-cmdref.xml:200 +#: ../en/appA-cmdref.xml:201 msgid "Generating safe binary diffs" msgstr "生成安全的二进制差异" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:202 +#: ../en/appA-cmdref.xml:203 msgid "" "If you use the <option role=\"hg-opt-diff\">-a</option> option to force " "Mercurial to print diffs of files that are either <quote>mostly text</quote> " @@ -409,7 +409,7 @@ msgstr "" #. type: Content of: <book><appendix><sect2><sect3><para> -#: ../en/appA-cmdref.xml:209 +#: ../en/appA-cmdref.xml:210 msgid "" "If you want to generate a diff of a binary file that is safe to use as input " "for <command role=\"hg-cmd\">hg import</command>, use the <command role=\"hg-" @@ -1318,8 +1318,8 @@ #: ../en/appD-license.xml:33 msgid "" "The reference must be immediately followed with any options elected by the " -"author(s) and/or publisher of the document (see section <xref linkend=\"sec." -"opl.options\"/>)." +"author(s) and/or publisher of the document (see <xref linkend=\"sec:opl:" +"options\"/>)." msgstr "" #. type: Content of: <book><appendix><sect1><para> @@ -1607,7 +1607,7 @@ "turns out to be in error, you can revert to an earlier version of one or more " "files. In fact, a <emphasis>really</emphasis> good revision control tool " "will even help you to efficiently figure out exactly when a problem was " -"introduced (see section <xref linkend=\"sec.undo.bisect\"/> for details)." +"introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)." msgstr "" #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> @@ -1773,8 +1773,8 @@ msgid "" "As an instance of this, several consecutive commits in an example can show up " "as having occurred during the same second. You can see this occur in the " -"<literal role=\"hg-ext\">bisect</literal> example in section <xref linkend=" -"\"sec.undo.bisect\"/>, for instance." +"<literal role=\"hg-ext\">bisect</literal> example in <xref linkend=\"sec:undo:" +"bisect\"/>, for instance." msgstr "" #. type: Content of: <book><preface><sect1><para> @@ -2907,48 +2907,53 @@ #. type: Content of: <book><chapter><sect1><para> #: ../en/ch01-tour-basic.xml:249 msgid "" -"Figure <xref endterm=\"fig.tour-basic.history.caption\" linkend=\"fig.tour-" -"basic.history\"/> provides a graphical representation of the history of the " -"<filename class=\"directory\">hello</filename> repository, to make it a " -"little easier to see which direction history is <quote>flowing</quote> in. " -"We'll be returning to this figure several times in this chapter and the " -"chapter that follows." -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> -#: ../en/ch01-tour-basic.xml:260 -msgid "" -"<imageobject><imagedata fileref=\"images/tour-history.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><textobject><phrase> -#: ../en/ch01-tour-basic.xml:261 ../en/ch02-tour-merge.xml:48 -#: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:126 -#: ../en/ch02-tour-merge.xml:182 ../en/ch02-tour-merge.xml:254 -#: ../en/ch03-concepts.xml:56 ../en/ch03-concepts.xml:108 -#: ../en/ch03-concepts.xml:194 ../en/ch03-concepts.xml:301 -#: ../en/ch03-concepts.xml:353 ../en/ch03-concepts.xml:370 -#: ../en/ch03-concepts.xml:414 ../en/ch03-concepts.xml:436 -#: ../en/ch03-concepts.xml:480 ../en/ch05-collab.xml:277 -#: ../en/ch08-undo.xml:366 ../en/ch08-undo.xml:417 ../en/ch08-undo.xml:485 -#: ../en/ch08-undo.xml:527 ../en/ch11-mq.xml:410 -msgid "XXX add text" -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> -#: ../en/ch01-tour-basic.xml:262 +"<xref linkend=\"fig:tour-basic:history\"/> provides a graphical " +"representation of the history of the <filename class=\"directory\">hello</" +"filename> repository, to make it a little easier to see which direction " +"history is <quote>flowing</quote> in. We'll be returning to this figure " +"several times in this chapter and the chapter that follows." +msgstr "" + +#. type: Content of: <book><chapter><sect1><figure><title> +#: ../en/ch01-tour-basic.xml:258 msgid "" "Graphical history of the <filename class=\"directory\">hello</filename> " "repository" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:269 +#. type: Content of: <book><chapter><sect1><figure> +#: ../en/ch01-tour-basic.xml:260 ../en/ch02-tour-merge.xml:50 +#: ../en/ch02-tour-merge.xml:181 ../en/ch03-concepts.xml:293 +msgid "<placeholder type=\"mediaobject\" id=\"0\"/>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><figure><mediaobject> +#: ../en/ch01-tour-basic.xml:261 +msgid "" +"<imageobject><imagedata fileref=\"figs/tour-history.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase> +#: ../en/ch01-tour-basic.xml:262 ../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/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" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch01-tour-basic.xml:267 msgid "Changesets, revisions, and talking to other people" msgstr "改变集,版本,与其它用户交互" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:272 +#: ../en/ch01-tour-basic.xml:270 msgid "" "As English is a notoriously sloppy language, and computer science has a " "hallowed history of terminological confusion (why use one term when four will " @@ -2960,7 +2965,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:282 +#: ../en/ch01-tour-basic.xml:280 msgid "" "While it doesn't matter what <emphasis>word</emphasis> you use to refer to " "the concept of <quote>a changeset</quote>, the <emphasis>identifier</" @@ -2971,13 +2976,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:291 +#: ../en/ch01-tour-basic.xml:289 msgid "" "The revision number is <emphasis>only valid in that repository</emphasis>," msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:293 +#: ../en/ch01-tour-basic.xml:291 msgid "" "while the hex string is the <emphasis>permanent, unchanging identifier</" "emphasis> that will always identify that exact changeset in <emphasis>every</" @@ -2985,7 +2990,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:298 +#: ../en/ch01-tour-basic.xml:296 msgid "" "This distinction is important. If you send someone an email talking about " "<quote>revision 33</quote>, there's a high likelihood that their revision 33 " @@ -2997,7 +3002,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:308 +#: ../en/ch01-tour-basic.xml:306 msgid "" "Mercurial uses revision numbers purely as a convenient shorthand. If you " "need to discuss a changeset with someone, or make a record of a changeset for " @@ -3006,12 +3011,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:316 +#: ../en/ch01-tour-basic.xml:314 msgid "Viewing specific revisions" msgstr "察看指定版本" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:318 +#: ../en/ch01-tour-basic.xml:316 msgid "" "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a " "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option " @@ -3021,7 +3026,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:327 +#: ../en/ch01-tour-basic.xml:325 msgid "" "If you want to see the history of several revisions without having to list " "each one, you can use <emphasis>range notation</emphasis>; this lets you " @@ -3030,7 +3035,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:335 +#: ../en/ch01-tour-basic.xml:333 msgid "" "Mercurial also honours the order in which you specify revisions, so <command " "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " @@ -3038,12 +3043,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:342 +#: ../en/ch01-tour-basic.xml:340 msgid "More detailed information" msgstr "更详细的信息" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:344 +#: ../en/ch01-tour-basic.xml:342 msgid "" "While the summary information printed by <command role=\"hg-cmd\">hg log</" "command> is useful if you already know what you're looking for, you may need " @@ -3055,22 +3060,22 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:356 +#: ../en/ch01-tour-basic.xml:354 msgid "" "If you want to see both the description and content of a change, add the " "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--" "patch</option>) option. This displays the content of a change as a " "<emphasis>unified diff</emphasis> (if you've never seen a unified diff " -"before, see section <xref linkend=\"sec.mq.patch\"/> for an overview)." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch01-tour-basic.xml:369 +"before, see <xref linkend=\"sec:mq:patch\"/> for an overview)." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch01-tour-basic.xml:367 msgid "All about command options" msgstr "命令选项" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:371 +#: ../en/ch01-tour-basic.xml:369 msgid "" "Let's take a brief break from exploring Mercurial commands to discuss a " "pattern in the way that they work; you may find this useful to keep in mind " @@ -3078,7 +3083,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:375 +#: ../en/ch01-tour-basic.xml:373 msgid "" "Mercurial has a consistent and straightforward approach to dealing with the " "options that you can pass to commands. It follows the conventions for " @@ -3086,7 +3091,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:380 +#: ../en/ch01-tour-basic.xml:378 msgid "" "Every option has a long name. For example, as we've already seen, the " "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" @@ -3094,7 +3099,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:384 +#: ../en/ch01-tour-basic.xml:382 msgid "" "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--" "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The " @@ -3103,7 +3108,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:389 +#: ../en/ch01-tour-basic.xml:387 msgid "" "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</" "option>), while short options start with one (e.g. <option role=\"hg-opt-log" @@ -3111,7 +3116,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:393 +#: ../en/ch01-tour-basic.xml:391 msgid "" "Option naming and usage is consistent across commands. For example, every " "command that lets you specify a changeset ID or revision number accepts both " @@ -3120,7 +3125,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:399 +#: ../en/ch01-tour-basic.xml:397 msgid "" "In the examples throughout this book, I use short options instead of long. " "This just reflects my own preference, so don't read anything significant into " @@ -3128,7 +3133,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:403 +#: ../en/ch01-tour-basic.xml:401 msgid "" "Most commands that print output of some kind will print more output when " "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-" @@ -3137,19 +3142,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch01-tour-basic.xml:411 +#: ../en/ch01-tour-basic.xml:409 msgid "Making and reviewing changes" msgstr "创建和复审修改" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:413 +#: ../en/ch01-tour-basic.xml:411 msgid "" "Now that we have a grasp of viewing history in Mercurial, let's take a look " "at making some changes and examining them." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:417 +#: ../en/ch01-tour-basic.xml:415 msgid "" "The first thing we'll do is isolate our experiment in a repository of its " "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we " @@ -3160,7 +3165,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:427 +#: ../en/ch01-tour-basic.xml:425 msgid "" "As an aside, it's often good practice to keep a <quote>pristine</quote> copy " "of a remote repository around, which you can then make temporary clones of to " @@ -3172,7 +3177,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:436 +#: ../en/ch01-tour-basic.xml:434 msgid "" "In our <filename class=\"directory\">my-hello</filename> repository, we have " "a file <filename>hello.c</filename> that contains the classic <quote>hello, " @@ -3185,14 +3190,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:449 +#: ../en/ch01-tour-basic.xml:447 msgid "" "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " "what Mercurial knows about the files in the repository." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:455 +#: ../en/ch01-tour-basic.xml:453 msgid "" "The <command role=\"hg-cmd\">hg status</command> command prints no output for " "some files, but a line starting with <quote><literal>M</literal></quote> for " @@ -3202,7 +3207,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:462 +#: ../en/ch01-tour-basic.xml:460 msgid "" "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed " "that we modified <filename>hello.c</filename>. We didn't need to " @@ -3212,7 +3217,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:470 +#: ../en/ch01-tour-basic.xml:468 msgid "" "It's a little bit helpful to know that we've modified <filename>hello.c</" "filename>, but we might prefer to know exactly <emphasis>what</emphasis> " @@ -3221,12 +3226,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch01-tour-basic.xml:480 +#: ../en/ch01-tour-basic.xml:478 msgid "Recording changes in a new changeset" msgstr "在新修改集中记录修改" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:482 +#: ../en/ch01-tour-basic.xml:480 msgid "" "We can modify files, build and test our changes, and use <command role=\"hg-" "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to " @@ -3235,7 +3240,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:489 +#: ../en/ch01-tour-basic.xml:487 msgid "" "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new " "changeset; we'll usually refer to this as <quote>making a commit</quote> or " @@ -3243,12 +3248,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:495 +#: ../en/ch01-tour-basic.xml:493 msgid "Setting up a username" msgstr "配置用户名称" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:497 +#: ../en/ch01-tour-basic.xml:495 msgid "" "When you try to run <command role=\"hg-cmd\">hg commit</command> for the " "first time, it is not guaranteed to succeed. Mercurial records your name and " @@ -3259,7 +3264,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:506 +#: ../en/ch01-tour-basic.xml:504 msgid "" "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the " "<command role=\"hg-cmd\">hg commit</command> command on the command line, " @@ -3267,30 +3272,30 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:511 +#: ../en/ch01-tour-basic.xml:509 msgid "" "If you have set the <envar>HGUSER</envar> environment variable, this is " "checked next." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:514 +#: ../en/ch01-tour-basic.xml:512 msgid "" "If you create a file in your home directory called <filename role=\"special" "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> " "entry, that will be used next. To see what the contents of this file should " -"look like, refer to section <xref linkend=\"sec.tour-basic.username\"/> below." +"look like, refer to <xref linkend=\"sec:tour-basic:username\"/> below." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:521 +#: ../en/ch01-tour-basic.xml:520 msgid "" "If you have set the <envar>EMAIL</envar> environment variable, this will be " "used next." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch01-tour-basic.xml:524 +#: ../en/ch01-tour-basic.xml:523 msgid "" "Mercurial will query your system to find out your local user name and host " "name, and construct a username from these components. Since this often " @@ -3299,7 +3304,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:531 +#: ../en/ch01-tour-basic.xml:530 msgid "" "If all of these mechanisms fail, Mercurial will fail, printing an error " "message. In this case, it will not let you commit until you set up a " @@ -3307,7 +3312,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:535 +#: ../en/ch01-tour-basic.xml:534 msgid "" "You should think of the <envar>HGUSER</envar> environment variable and the " "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-" @@ -3318,12 +3323,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch01-tour-basic.xml:544 +#: ../en/ch01-tour-basic.xml:543 msgid "Creating a Mercurial configuration file" msgstr "创建 Mercurial 的配置文件" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch01-tour-basic.xml:546 +#: ../en/ch01-tour-basic.xml:545 msgid "" "To set a user name, use your favourite editor to create a file called " "<filename role=\"special\">.hgrc</filename> in your home directory. " @@ -3333,7 +3338,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch01-tour-basic.xml:558 +#: ../en/ch01-tour-basic.xml:557 msgid "" "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</" "emphasis> of the config file, so you can read the <quote><literal>username " @@ -3345,12 +3350,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch01-tour-basic.xml:571 +#: ../en/ch01-tour-basic.xml:570 msgid "Choosing a user name" msgstr "选择用户名称" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch01-tour-basic.xml:573 +#: ../en/ch01-tour-basic.xml:572 msgid "" "You can use any text you like as the value of the <literal>username</literal> " "config item, since this information is for reading by other people, but for " @@ -3359,7 +3364,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> -#: ../en/ch01-tour-basic.xml:580 +#: ../en/ch01-tour-basic.xml:579 msgid "" "Mercurial's built-in web server obfuscates email addresses, to make it more " "difficult for the email harvesting tools that spammers use. This reduces the " @@ -3368,12 +3373,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:590 +#: ../en/ch01-tour-basic.xml:589 msgid "Writing a commit message" msgstr "写提交日志" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:592 +#: ../en/ch01-tour-basic.xml:591 msgid "" "When we commit a change, Mercurial drops us into a text editor, to enter a " "message that will describe the modifications we've made in this changeset. " @@ -3383,7 +3388,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:602 +#: ../en/ch01-tour-basic.xml:601 msgid "" "The editor that the <command role=\"hg-cmd\">hg commit</command> command " "drops us into will contain an empty line, followed by a number of lines " @@ -3391,7 +3396,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:609 +#: ../en/ch01-tour-basic.xml:608 msgid "" "Mercurial ignores the lines that start with <quote><literal>HG:</literal></" "quote>; it uses them only to tell us which files it's recording changes to. " @@ -3399,12 +3404,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:615 +#: ../en/ch01-tour-basic.xml:614 msgid "Writing a good commit message" msgstr "写好提交日志" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:617 +#: ../en/ch01-tour-basic.xml:616 msgid "" "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of " "a commit message by default, it's best to write a commit message whose first " @@ -3414,7 +3419,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:631 +#: ../en/ch01-tour-basic.xml:630 msgid "" "As far as the remainder of the contents of the commit message are concerned, " "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care " @@ -3423,7 +3428,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:637 +#: ../en/ch01-tour-basic.xml:636 msgid "" "My personal preference is for short, but informative, commit messages that " "tell me something that I can't figure out with a quick glance at the output " @@ -3431,12 +3436,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:644 +#: ../en/ch01-tour-basic.xml:643 msgid "Aborting a commit" msgstr "终止提交" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:646 +#: ../en/ch01-tour-basic.xml:645 msgid "" "If you decide that you don't want to commit while in the middle of editing a " "commit message, simply exit from your editor without saving the file that " @@ -3445,7 +3450,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:651 +#: ../en/ch01-tour-basic.xml:650 msgid "" "If we run the <command role=\"hg-cmd\">hg commit</command> command without " "any arguments, it records all of the changes we've made, as reported by " @@ -3454,12 +3459,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:658 +#: ../en/ch01-tour-basic.xml:657 msgid "Admiring our new handiwork" msgstr "欣赏我们的新手艺" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:660 +#: ../en/ch01-tour-basic.xml:659 msgid "" "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg " "tip</command> command to display the changeset we just created. This command " @@ -3468,19 +3473,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:669 +#: ../en/ch01-tour-basic.xml:668 msgid "" "We refer to the newest revision in the repository as the tip revision, or " "simply the tip." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch01-tour-basic.xml:676 +#: ../en/ch01-tour-basic.xml:675 msgid "Sharing changes" msgstr "共享修改" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch01-tour-basic.xml:678 +#: ../en/ch01-tour-basic.xml:677 msgid "" "We mentioned earlier that repositories in Mercurial are self-contained. This " "means that the changeset we just created exists only in our <filename class=" @@ -3489,12 +3494,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:686 +#: ../en/ch01-tour-basic.xml:685 msgid "Pulling changes from another repository" msgstr "从其它版本库取得修改" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:687 +#: ../en/ch01-tour-basic.xml:686 msgid "" "To get started, let's clone our original <filename class=\"directory\">hello</" "filename> repository, which does not contain the change we just committed. " @@ -3503,7 +3508,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:695 +#: ../en/ch01-tour-basic.xml:694 msgid "" "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring " "changes from <filename class=\"directory\">my-hello</filename> into <filename " @@ -3516,7 +3521,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:708 +#: ../en/ch01-tour-basic.xml:707 msgid "" "(Of course, someone could cause more changesets to appear in the repository " "that we ran <command role=\"hg-cmd\">hg incoming</command> in, before we get " @@ -3525,7 +3530,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:715 +#: ../en/ch01-tour-basic.xml:714 msgid "" "Bringing changes into a repository is a simple matter of running the <command " "role=\"hg-cmd\">hg pull</command> command, and telling it which repository to " @@ -3533,7 +3538,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:722 +#: ../en/ch01-tour-basic.xml:721 msgid "" "As you can see from the before-and-after output of <command role=\"hg-cmd" "\">hg tip</command>, we have successfully pulled changes into our " @@ -3542,24 +3547,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:730 +#: ../en/ch01-tour-basic.xml:729 msgid "Updating the working directory" msgstr "更新工作目录" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:732 +#: ../en/ch01-tour-basic.xml:731 msgid "" "We have so far glossed over the relationship between a repository and its " "working directory. The <command role=\"hg-cmd\">hg pull</command> command " -"that we ran in section <xref linkend=\"sec.tour.pull\"/> brought changes into " -"the repository, but if we check, there's no sign of those changes in the " -"working directory. This is because <command role=\"hg-cmd\">hg pull</" -"command> does not (by default) touch the working directory. Instead, we use " -"the <command role=\"hg-cmd\">hg update</command> command to do this." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:744 +"that we ran in <xref linkend=\"sec:tour:pull\"/> brought changes into the " +"repository, but if we check, there's no sign of those changes in the working " +"directory. This is because <command role=\"hg-cmd\">hg pull</command> does " +"not (by default) touch the working directory. Instead, we use the <command " +"role=\"hg-cmd\">hg update</command> command to do this." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch01-tour-basic.xml:743 msgid "" "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> " "doesn't update the working directory automatically. There's actually a good " @@ -3573,7 +3578,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:755 +#: ../en/ch01-tour-basic.xml:754 msgid "" "However, since pull-then-update is such a common thing to do, Mercurial lets " "you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> " @@ -3581,35 +3586,34 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:760 +#: ../en/ch01-tour-basic.xml:759 msgid "" "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> " -"in section <xref linkend=\"sec.tour.pull\"/> when we ran it without <option " -"role=\"hg-opt-pull\">-u</option>, you can see that it printed a helpful " -"reminder that we'd have to take an explicit step to update the working " -"directory:" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:769 +"in <xref linkend=\"sec:tour:pull\"/> when we ran it without <option role=\"hg-" +"opt-pull\">-u</option>, you can see that it printed a helpful reminder that " +"we'd have to take an explicit step to update the working directory:" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch01-tour-basic.xml:768 msgid "" "To find out what revision the working directory is at, use the <command role=" "\"hg-cmd\">hg parents</command> command." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:775 -msgid "" -"If you look back at figure <xref endterm=\"fig.tour-basic.history.caption\" " -"linkend=\"fig.tour-basic.history\"/>, you'll see arrows connecting each " -"changeset. The node that the arrow leads <emphasis>from</emphasis> in each " -"case is a parent, and the node that the arrow leads <emphasis>to</emphasis> " -"is its child. The working directory has a parent in just the same way; this " -"is the changeset that the working directory currently contains." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:785 +#: ../en/ch01-tour-basic.xml:774 +msgid "" +"If you look back at <xref linkend=\"fig:tour-basic:history\"/>, you'll see " +"arrows connecting each changeset. The node that the arrow leads " +"<emphasis>from</emphasis> in each case is a parent, and the node that the " +"arrow leads <emphasis>to</emphasis> is its child. The working directory has " +"a parent in just the same way; this is the changeset that the working " +"directory currently contains." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch01-tour-basic.xml:783 msgid "" "To update the working directory to a particular revision, give a revision " "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " @@ -3617,7 +3621,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:792 +#: ../en/ch01-tour-basic.xml:790 msgid "" "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</" "command> will update to the tip revision, as shown by the second call to " @@ -3625,12 +3629,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:800 +#: ../en/ch01-tour-basic.xml:798 msgid "Pushing changes to another repository" msgstr "发布修改到其它版本库" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:802 +#: ../en/ch01-tour-basic.xml:800 msgid "" "Mercurial lets us push changes to another repository, from the repository " "we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " @@ -3639,21 +3643,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:810 +#: ../en/ch01-tour-basic.xml:808 msgid "" "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " "changes would be pushed into another repository." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:816 +#: ../en/ch01-tour-basic.xml:814 msgid "" "And the <command role=\"hg-cmd\">hg push</command> command does the actual " "push." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:822 +#: ../en/ch01-tour-basic.xml:820 msgid "" "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd" "\">hg push</command> command does not update the working directory in the " @@ -3664,19 +3668,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:831 +#: ../en/ch01-tour-basic.xml:829 msgid "" "What happens if we try to pull or push changes and the receiving repository " "already has those changes? Nothing too exciting." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch01-tour-basic.xml:838 +#: ../en/ch01-tour-basic.xml:836 msgid "Sharing changes over a network" msgstr "通过网络共享修改" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:840 +#: ../en/ch01-tour-basic.xml:838 msgid "" "The commands we have covered in the previous few sections are not limited to " "working with local repositories. Each works in exactly the same fashion over " @@ -3684,7 +3688,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch01-tour-basic.xml:848 +#: ../en/ch01-tour-basic.xml:846 msgid "" "In this example, we can see what changes we could push to the remote " "repository, but the repository is understandably not set up to let anonymous " @@ -3746,27 +3750,26 @@ msgid "" "We should now have two copies of <filename>hello.c</filename> with different " "contents. The histories of the two repositories have also diverged, as " -"illustrated in figure <xref endterm=\"fig.tour-merge.sep-repos.caption\" " -"linkend=\"fig.tour-merge.sep-repos\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> -#: ../en/ch02-tour-merge.xml:47 -msgid "" -"<imageobject><imagedata fileref=\"images/tour-merge-sep-repos.png\"/></" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> -#: ../en/ch02-tour-merge.xml:49 +"illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><figure><title> +#: ../en/ch02-tour-merge.xml:46 msgid "" "Divergent recent histories of the <filename class=\"directory\">my-hello</" "filename> and <filename class=\"directory\">my-new-hello</filename> " "repositories" msgstr "" -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:57 +#. type: Content of: <book><chapter><sect1><figure><mediaobject> +#: ../en/ch02-tour-merge.xml:51 +msgid "" +"<imageobject><imagedata fileref=\"figs/tour-merge-sep-repos.png\"/></" +"imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch02-tour-merge.xml:56 msgid "" "We already know that pulling changes from our <filename class=\"directory" "\">my-hello</filename> repository will have no effect on the working " @@ -3774,19 +3777,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:63 +#: ../en/ch02-tour-merge.xml:62 msgid "" "However, the <command role=\"hg-cmd\">hg pull</command> command says " "something about <quote>heads</quote>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:67 +#: ../en/ch02-tour-merge.xml:66 msgid "Head changesets" msgstr "顶点改变集" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:69 +#: ../en/ch02-tour-merge.xml:68 msgid "" "A head is a change that has no descendants, or children, as they're also " "known. The tip revision is thus a head, because the newest revision in a " @@ -3794,50 +3797,61 @@ "one head." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch02-tour-merge.xml:77 -msgid "" -"<imageobject><imagedata fileref=\"images/tour-merge-pull.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch02-tour-merge.xml:79 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch02-tour-merge.xml:75 msgid "" "Repository contents after pulling from <filename class=\"directory\">my-" "hello</filename> into <filename class=\"directory\">my-new-hello</filename>" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:85 -msgid "" -"In figure <xref endterm=\"fig.tour-merge.pull.caption\" linkend=\"fig.tour-" -"merge.pull\"/>, you can see the effect of the pull from <filename class=" -"\"directory\">my-hello</filename> into <filename class=\"directory\">my-new-" -"hello</filename>. The history that was already present in <filename class=" -"\"directory\">my-new-hello</filename> is untouched, but a new revision has " -"been added. By referring to figure <xref endterm=\"fig.tour-merge.sep-repos." -"caption\" linkend=\"fig.tour-merge.sep-repos\"/>, we can see that the " -"<emphasis>changeset ID</emphasis> remains the same in the new repository, but " -"the <emphasis>revision number</emphasis> has changed. (This, incidentally, " -"is a fine example of why it's not safe to use revision numbers when " -"discussing changesets.) We can view the heads in a repository using the " -"<command role=\"hg-cmd\">hg heads</command> command." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:106 +#. 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/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\"/>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch02-tour-merge.xml:79 +msgid "" +"<imageobject> <imagedata fileref=\"figs/tour-merge-pull.png\"/> </imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:86 +msgid "" +"In <xref linkend=\"fig:tour-merge:pull\"/>, you can see the effect of the " +"pull from <filename class=\"directory\">my-hello</filename> into <filename " +"class=\"directory\">my-new-hello</filename>. The history that was already " +"present in <filename class=\"directory\">my-new-hello</filename> is " +"untouched, but a new revision has been added. By referring to <xref linkend=" +"\"fig:tour-merge:sep-repos\"/>, we can see that the <emphasis>changeset ID</" +"emphasis> remains the same in the new repository, but the <emphasis>revision " +"number</emphasis> has changed. (This, incidentally, is a fine example of why " +"it's not safe to use revision numbers when discussing changesets.) We can " +"view the heads in a repository using the <command role=\"hg-cmd\">hg heads</" +"command> command." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch02-tour-merge.xml:105 msgid "Performing the merge" msgstr "执行合并" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:108 +#: ../en/ch02-tour-merge.xml:107 msgid "" "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</" "command> command to update to the new tip?" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:114 +#: ../en/ch02-tour-merge.xml:113 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 " @@ -3846,20 +3860,20 @@ "merge the two heads." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch02-tour-merge.xml:125 -msgid "" -"<imageobject><imagedata fileref=\"images/tour-merge-merge.png\"/></" +#. 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><informalfigure><mediaobject><caption><para> -#: ../en/ch02-tour-merge.xml:127 -msgid "Working directory and repository during merge, and following commit" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:132 +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:133 msgid "" "This updates the working directory so that it contains changes from " "<emphasis>both</emphasis> heads, which is reflected in both the output of " @@ -3868,12 +3882,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:142 +#: ../en/ch02-tour-merge.xml:143 msgid "Committing the results of the merge" msgstr "提交合并结果" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:144 +#: ../en/ch02-tour-merge.xml:145 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</" @@ -3881,7 +3895,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:151 +#: ../en/ch02-tour-merge.xml:152 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 " @@ -3889,22 +3903,22 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:158 -msgid "" -"In figure <xref endterm=\"fig.tour-merge.merge.caption\" linkend=\"fig.tour-" -"merge.merge\"/>, you can see a representation of what happens to the working " -"directory during the merge, and how this affects the repository when the " -"commit happens. During the merge, the working directory has two parent " -"changesets, and these become the parents of the new changeset." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch02-tour-merge.xml:169 +#: ../en/ch02-tour-merge.xml:159 +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 " +"the repository when the commit happens. During the merge, the working " +"directory has two parent changesets, and these become the parents of the new " +"changeset." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch02-tour-merge.xml:170 msgid "Merging conflicting changes" msgstr "合并有冲突的改变" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:171 +#: ../en/ch02-tour-merge.xml:172 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 " @@ -3913,31 +3927,30 @@ "something coherent." msgstr "" -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> +#. type: Content of: <book><chapter><sect1><figure><title> #: ../en/ch02-tour-merge.xml:180 -msgid "" -"<imageobject><imagedata fileref=\"images/tour-merge-conflict.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> -#: ../en/ch02-tour-merge.xml:183 msgid "Conflicting changes to a document" msgstr "" -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:188 -msgid "" -"Figure <xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-" -"merge.conflict\"/> illustrates an instance of two conflicting changes to a " -"document. We started with a single version of the file; then we made some " -"changes; while someone else made different changes to the same text. Our " -"task in resolving the conflicting changes is to decide what the file should " -"look like." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:196 +#. type: Content of: <book><chapter><sect1><figure><mediaobject> +#: ../en/ch02-tour-merge.xml:182 +msgid "" +"<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></" +"imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch02-tour-merge.xml:187 +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 " +"file; then we made some changes; while someone else made different changes to " +"the same text. Our task in resolving the conflicting changes is to decide " +"what the file should look like." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch02-tour-merge.xml:194 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 " @@ -3950,7 +3963,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:207 +#: ../en/ch02-tour-merge.xml:205 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> " @@ -3958,25 +3971,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:213 +#: ../en/ch02-tour-merge.xml:211 msgid "Using a graphical merge tool" msgstr "使用图形合并工具" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:215 +#: ../en/ch02-tour-merge.xml:213 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 " "tools. You can see a screenshot of <command>kdiff3</command> in action in " -"figure <xref endterm=\"fig.tour-merge.kdiff3.caption\" linkend=\"fig.tour-" -"merge.kdiff3\"/>. The kind of merge it is performing is called a " -"<emphasis>three-way merge</emphasis>, because there are three different " -"versions of the file of interest to us. The tool thus splits the upper " -"portion of the window into three panes:" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch02-tour-merge.xml:226 +"<xref linkend=\"fig:tour-merge:kdiff3\"/>. The kind of merge it is " +"performing is called a <emphasis>three-way merge</emphasis>, because there " +"are three different versions of the file of interest to us. The tool thus " +"splits the upper portion of the window into three panes:" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch02-tour-merge.xml:223 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 " @@ -3984,21 +3996,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch02-tour-merge.xml:231 +#: ../en/ch02-tour-merge.xml:228 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:234 +#: ../en/ch02-tour-merge.xml:231 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:238 +#: ../en/ch02-tour-merge.xml:235 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 " @@ -4007,27 +4019,27 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:245 +#: ../en/ch02-tour-merge.xml:242 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 " "display the corresponding sections of their respective files." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch02-tour-merge.xml:252 -msgid "" -"<imageobject><imagedata width=\"100%\" fileref=\"images/kdiff3.png\"/> </" +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch02-tour-merge.xml:248 +msgid "Using <command>kdiff3</command> to merge versions of a file" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch02-tour-merge.xml:251 +msgid "" +"<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></" "imageobject>" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch02-tour-merge.xml:255 -msgid "Using <command>kdiff3</command> to merge versions of a file" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:261 +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:259 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 " @@ -4036,7 +4048,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:267 +#: ../en/ch02-tour-merge.xml:265 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 " @@ -4046,26 +4058,25 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch02-tour-merge.xml:276 +#: ../en/ch02-tour-merge.xml:274 msgid "A worked example" msgstr "合并实例" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:278 -msgid "" -"In this example, we will reproduce the file modification history of figure " -"<xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-merge." -"conflict\"/> above. Let's begin by creating a repository with a base version " -"of our document." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:286 +#: ../en/ch02-tour-merge.xml:276 +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 " +"repository with a base version of our document." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch02-tour-merge.xml:283 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:291 +#: ../en/ch02-tour-merge.xml:288 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 " @@ -4074,14 +4085,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:299 +#: ../en/ch02-tour-merge.xml:296 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:305 +#: ../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-" @@ -4093,12 +4104,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:315 +#: ../en/ch02-tour-merge.xml:312 msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:320 +#: ../en/ch02-tour-merge.xml:317 msgid "" "Because <command>merge</command> can't resolve the conflicting changes, it " "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, " @@ -4107,7 +4118,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:326 +#: ../en/ch02-tour-merge.xml:323 msgid "" "Mercurial can tell from the way <command>merge</command> exits that it wasn't " "able to merge successfully, so it tells us what commands we'll need to run if " @@ -4117,7 +4128,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch02-tour-merge.xml:333 +#: ../en/ch02-tour-merge.xml:330 msgid "" "If automatic or manual merges fail, there's nothing to prevent us from " "<quote>fixing up</quote> the affected files ourselves, and committing the " @@ -4125,19 +4136,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch02-tour-merge.xml:342 +#: ../en/ch02-tour-merge.xml:339 msgid "Simplifying the pull-merge-commit sequence" msgstr "简化拉-合并-提交程序" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:344 +#: ../en/ch02-tour-merge.xml:341 msgid "" "The process of merging changes as outlined above is straightforward, but " "requires running three commands in sequence." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:350 +#: ../en/ch02-tour-merge.xml:347 msgid "" "In the case of the final commit, you also need to enter a commit message, " "which is almost always going to be a piece of uninteresting " @@ -4145,7 +4156,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:354 +#: ../en/ch02-tour-merge.xml:351 msgid "" "It would be nice to reduce the number of steps needed, if this were " "possible. Indeed, Mercurial is distributed with an extension called <literal " @@ -4153,7 +4164,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:359 +#: ../en/ch02-tour-merge.xml:356 msgid "" "Mercurial provides a flexible extension mechanism that lets people extend its " "functionality, while keeping the core of Mercurial small and easy to deal " @@ -4163,7 +4174,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:366 +#: ../en/ch02-tour-merge.xml:363 msgid "" "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " @@ -4177,7 +4188,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:379 +#: ../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 " @@ -4187,7 +4198,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch02-tour-merge.xml:388 +#: ../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-" @@ -4258,28 +4269,27 @@ "much history, the revision data and index are combined in a single " "<quote><literal>.i</literal></quote> file. The correspondence between a file " "in the working directory and the filelog that tracks its history in the " -"repository is illustrated in figure <xref endterm=\"fig.concepts.filelog." -"caption\" linkend=\"fig.concepts.filelog\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:55 -msgid "<imageobject><imagedata fileref=\"images/filelog.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:57 +"repository is illustrated in <xref linkend=\"fig:concepts:filelog\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:53 msgid "" "Relationships between files in working directory and filelogs in repository" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:65 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:56 +msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch03-concepts.xml:63 msgid "Managing tracked files" msgstr "管理跟踪的文件" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:67 +#: ../en/ch03-concepts.xml:65 msgid "" "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " "together information about the files that it tracks. Each entry in the " @@ -4289,12 +4299,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:77 +#: ../en/ch03-concepts.xml:75 msgid "Recording changeset information" msgstr "记录修改集信息" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:79 +#: ../en/ch03-concepts.xml:77 msgid "" "The <emphasis>changelog</emphasis> contains information about each " "changeset. Each revision records who committed a change, the changeset " @@ -4303,12 +4313,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:87 +#: ../en/ch03-concepts.xml:85 msgid "Relationships between revisions" msgstr "版本之间的关系" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:89 +#: ../en/ch03-concepts.xml:87 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). " @@ -4318,28 +4328,28 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:96 +#: ../en/ch03-concepts.xml:94 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 " "revision of the manifest. A revision of the manifest stores a pointer to a " "single revision of each filelog tracked when that changeset was created. " -"These relationships are illustrated in figure <xref endterm=\"fig.concepts." -"metadata.caption\" linkend=\"fig.concepts.metadata\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:107 -msgid "<imageobject><imagedata fileref=\"images/metadata.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:109 +"These relationships are illustrated in <xref linkend=\"fig:concepts:metadata" +"\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:103 msgid "Metadata relationships" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:114 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:105 +msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:110 msgid "" "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " "one</quote> relationship between revisions in the changelog, manifest, or " @@ -4351,24 +4361,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:127 +#: ../en/ch03-concepts.xml:123 msgid "Safe, efficient storage" msgstr "安全,高效的存储" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:129 +#: ../en/ch03-concepts.xml:125 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:134 +#: ../en/ch03-concepts.xml:130 msgid "Efficient storage" msgstr "高效存储" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:136 +#: ../en/ch03-concepts.xml:132 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 " @@ -4378,7 +4388,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:144 +#: ../en/ch03-concepts.xml:140 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 " @@ -4388,12 +4398,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:153 +#: ../en/ch03-concepts.xml:149 msgid "Safe operation" msgstr "安全操作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:155 +#: ../en/ch03-concepts.xml:151 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 " @@ -4402,7 +4412,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:161 +#: ../en/ch03-concepts.xml:157 msgid "" "In addition, Mercurial treats every write as part of a <emphasis>transaction</" "emphasis> that can span a number of files. A transaction is " @@ -4414,7 +4424,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:171 +#: ../en/ch03-concepts.xml:167 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 " @@ -4422,12 +4432,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:178 +#: ../en/ch03-concepts.xml:174 msgid "Fast retrieval" msgstr "快速检索" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:180 +#: ../en/ch03-concepts.xml:176 msgid "" "Mercurial cleverly avoids a pitfall common to all earlier revision control " "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " @@ -4439,18 +4449,18 @@ "longer it takes to reconstruct a particular revision." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:193 -msgid "<imageobject><imagedata fileref=\"images/snapshot.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:188 +msgid "Snapshot of a revlog, with incremental deltas" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:190 +msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch03-concepts.xml:195 -msgid "Snapshot of a revlog, with incremental deltas" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:200 msgid "" "The innovation that Mercurial applies to this problem is simple but " "effective. Once the cumulative amount of delta information stored since the " @@ -4462,21 +4472,20 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:209 -msgid "" -"Figure <xref endterm=\"fig.concepts.snapshot.caption\" 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 file that it must read to " -"reconstruct a particular revision." +#: ../en/ch03-concepts.xml:204 +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 " +"file that it must read to reconstruct a particular revision." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:216 +#: ../en/ch03-concepts.xml:210 msgid "Aside: the influence of video compression" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:218 +#: ../en/ch03-concepts.xml:212 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 " @@ -4487,7 +4496,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:227 +#: ../en/ch03-concepts.xml:221 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 " @@ -4500,12 +4509,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:241 +#: ../en/ch03-concepts.xml:235 msgid "Identification and strong integrity" msgstr "鉴别和强完整性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:243 +#: ../en/ch03-concepts.xml:237 msgid "" "Along with delta or snapshot information, a revlog entry contains a " "cryptographic hash of the data that it represents. This makes it difficult " @@ -4513,7 +4522,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:248 +#: ../en/ch03-concepts.xml:242 msgid "" "Hashes provide more than a mere check against corruption; they are used as " "the identifiers for revisions. The changeset identification hashes that you " @@ -4522,7 +4531,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:255 +#: ../en/ch03-concepts.xml:249 msgid "" "Mercurial verifies that hashes are correct when it retrieves file revisions " "and when it pulls changes from another repository. If it encounters an " @@ -4530,7 +4539,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:260 +#: ../en/ch03-concepts.xml:254 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 " @@ -4541,12 +4550,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:272 +#: ../en/ch03-concepts.xml:266 msgid "Revision history, branching, and merging" msgstr "修订历史,分支与合并" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:274 +#: ../en/ch03-concepts.xml:268 msgid "" "Every entry in a Mercurial revlog knows the identity of its immediate " "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " @@ -4557,17 +4566,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> +#: ../en/ch03-concepts.xml:276 +msgid "" +"In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the " +"conceptual structure of a revlog. Filelogs, manifests, and changelogs all " +"have this same structure; they differ only in the kind of data stored in each " +"delta or snapshot." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> #: ../en/ch03-concepts.xml:282 msgid "" -"In figure <xref endterm=\"fig.concepts.revlog.caption\" linkend=\"fig." -"concepts.revlog\"/>, you can see an example of the conceptual structure of a " -"revlog. Filelogs, manifests, and changelogs all have this same structure; " -"they differ only in the kind of data stored in each delta or snapshot." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:289 -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 " "parent slot contains the ID of its parent revision, and its second contains " @@ -4577,30 +4586,30 @@ "slots." msgstr "" -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:300 -msgid "<imageobject><imagedata fileref=\"images/revlog.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:302 -msgid "Revision in revlog" -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:309 +#. type: Content of: <book><chapter><sect1><figure><title> +#: ../en/ch03-concepts.xml:292 +msgid "The conceptual structure of a revlog" +msgstr "" + +#. type: Content of: <book><chapter><sect1><figure><mediaobject> +#: ../en/ch03-concepts.xml:294 +msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch03-concepts.xml:301 msgid "The working directory" msgstr "工作目录" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:311 +#: ../en/ch03-concepts.xml:303 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:314 +#: ../en/ch03-concepts.xml:306 msgid "" "The working directory <quote>knows</quote> which changeset it contains. When " "you update the working directory to contain a particular changeset, Mercurial " @@ -4611,7 +4620,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:323 +#: ../en/ch03-concepts.xml:315 msgid "" "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " "working directory. This details which changeset the working directory is " @@ -4620,7 +4629,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:329 +#: ../en/ch03-concepts.xml:321 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 " @@ -4635,51 +4644,50 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:343 +#: ../en/ch03-concepts.xml:335 msgid "What happens when you commit" msgstr "当你提交时发生的事情" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:345 +#: ../en/ch03-concepts.xml:337 msgid "" "The dirstate stores parent information for more than just book-keeping " "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " "parents of a new changeset</emphasis> when you perform a commit." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:352 -msgid "<imageobject><imagedata fileref=\"images/wdir.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:354 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:343 msgid "The working directory can have two parents" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:359 -msgid "" -"Figure <xref endterm=\"fig.concepts.wdir.caption\" linkend=\"fig.concepts.wdir" -"\"/> shows the normal state of the working directory, where it has a single " -"changeset as parent. That changeset is the <emphasis>tip</emphasis>, the " -"newest changeset in the repository that has no children." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:368 -msgid "" -"<imageobject><imagedata fileref=\"images/wdir-after-commit.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:371 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:345 +msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:350 +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 " +"<emphasis>tip</emphasis>, the newest changeset in the repository that has no " +"children." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:357 msgid "The working directory gains new parents after a commit" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:376 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:360 +msgid "" +"<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:365 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 " @@ -4689,23 +4697,22 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:384 +#: ../en/ch03-concepts.xml:373 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 " -"the null ID. This is shown in figure <xref endterm=\"fig.concepts.wdir-after-" -"commit.caption\" linkend=\"fig.concepts.wdir-after-commit\"/>. Mercurial " -"doesn't touch any of the files in the working directory when you commit; it " -"just modifies the dirstate to note its new parents." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:396 +"the null ID. This is shown in <xref linkend=\"fig:concepts:wdir-after-commit" +"\"/>. Mercurial doesn't touch any of the files in the working directory when " +"you commit; it just modifies the dirstate to note its new parents." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch03-concepts.xml:384 msgid "Creating a new head" msgstr "创建新顶点" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:398 +#: ../en/ch03-concepts.xml:386 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 " @@ -4714,24 +4721,22 @@ "update the working directory to the changeset you're interested in, and then " "examine the files in the working directory directly to see their contents as " "they were when you committed that changeset. The effect of this is shown in " -"figure <xref endterm=\"fig.concepts.wdir-pre-branch.caption\" linkend=\"fig." -"concepts.wdir-pre-branch\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:412 -msgid "" -"<imageobject><imagedata fileref=\"images/wdir-pre-branch.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:415 +"<xref linkend=\"fig:concepts:wdir-pre-branch\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:398 msgid "The working directory, updated to an older changeset" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:420 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:401 +msgid "" +"<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:406 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 " @@ -4739,23 +4744,21 @@ "the new changeset. This new changeset has no children, so it becomes the new " "tip. And the repository now contains two changesets that have no children; " "we call these <emphasis>heads</emphasis>. You can see the structure that " -"this creates in figure <xref endterm=\"fig.concepts.wdir-branch.caption\" " -"linkend=\"fig.concepts.wdir-branch\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:434 -msgid "" -"<imageobject><imagedata fileref=\"images/wdir-branch.png\"/> </imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:437 +"this creates in <xref linkend=\"fig:concepts:wdir-branch\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:418 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 +msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>" +msgstr "" + #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch03-concepts.xml:443 +#: ../en/ch03-concepts.xml:427 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> " @@ -4769,7 +4772,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch03-concepts.xml:455 +#: ../en/ch03-concepts.xml:439 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>, " @@ -4780,33 +4783,32 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:467 +#: ../en/ch03-concepts.xml:451 msgid "Merging heads" msgstr "合并顶点" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:469 +#: ../en/ch03-concepts.xml:453 msgid "" "When you run the <command role=\"hg-cmd\">hg merge</command> command, " "Mercurial leaves the first parent of the working directory unchanged, and " "sets the second parent to the changeset you're merging with, as shown in " -"figure <xref endterm=\"fig.concepts.wdir-merge.caption\" linkend=\"fig." -"concepts.wdir-merge\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch03-concepts.xml:478 -msgid "" -"<imageobject><imagedata fileref=\"images/wdir-merge.png\"/> </imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch03-concepts.xml:481 +"<xref linkend=\"fig:concepts:wdir-merge\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch03-concepts.xml:460 msgid "Merging two heads" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:486 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch03-concepts.xml:462 +msgid "" +"<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:469 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 " @@ -4814,48 +4816,48 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:491 +#: ../en/ch03-concepts.xml:474 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 +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 +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 +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 +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 " +"user." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch03-concepts.xml:494 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:498 -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:502 -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:506 -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 " -"user." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch03-concepts.xml:511 -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:515 +#: ../en/ch03-concepts.xml:498 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 " @@ -4864,7 +4866,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:522 +#: ../en/ch03-concepts.xml:505 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</" @@ -4874,7 +4876,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:529 +#: ../en/ch03-concepts.xml:512 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 " @@ -4885,12 +4887,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch03-concepts.xml:540 +#: ../en/ch03-concepts.xml:523 msgid "Other interesting design features" msgstr "其它有趣的设计特性" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch03-concepts.xml:542 +#: ../en/ch03-concepts.xml:525 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 " @@ -4903,12 +4905,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:553 +#: ../en/ch03-concepts.xml:536 msgid "Clever compression" msgstr "智能压缩" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:555 +#: ../en/ch03-concepts.xml:538 msgid "" "When appropriate, Mercurial will store both snapshots and deltas in " "compressed form. It does this by always <emphasis>trying to</emphasis> " @@ -4917,7 +4919,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:561 +#: ../en/ch03-concepts.xml:544 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> " @@ -4927,7 +4929,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:569 +#: ../en/ch03-concepts.xml:552 msgid "" "Deltas between revisions of a compressed file are usually larger than " "snapshots of the file, and Mercurial again does <quote>the right thing</" @@ -4937,12 +4939,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:578 +#: ../en/ch03-concepts.xml:561 msgid "Network recompression" msgstr "网络重新压缩" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:580 +#: ../en/ch03-concepts.xml:563 msgid "" "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " "compression algorithm (the same one used by the popular <literal>zip</" @@ -4952,7 +4954,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:588 +#: ../en/ch03-concepts.xml:571 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 " @@ -4964,7 +4966,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:598 +#: ../en/ch03-concepts.xml:581 msgid "" "(If the connection is over <command>ssh</command>, Mercurial " "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" @@ -4972,22 +4974,22 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:606 +#: ../en/ch03-concepts.xml:589 msgid "Read/write ordering and atomicity" msgstr "读写顺序与原子性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:608 +#: ../en/ch03-concepts.xml:591 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 figure <xref endterm=\"fig." -"concepts.metadata.caption\" linkend=\"fig.concepts.metadata\"/>, revisions in " -"the changelog point to revisions in the manifest, and revisions in the " -"manifest point to revisions in filelogs. This hierarchy is deliberate." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:616 +"reader won't see a partial write. If you recall <xref linkend=\"fig:concepts:" +"metadata\"/>, revisions in the changelog point to revisions in the manifest, " +"and revisions in the manifest point to revisions in filelogs. This hierarchy " +"is deliberate." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch03-concepts.xml:599 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 " @@ -4995,7 +4997,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:621 +#: ../en/ch03-concepts.xml:604 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 " @@ -5004,12 +5006,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:629 +#: ../en/ch03-concepts.xml:612 msgid "Concurrent access" msgstr "并发访问" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:631 +#: ../en/ch03-concepts.xml:614 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 " @@ -5020,7 +5022,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:640 +#: ../en/ch03-concepts.xml:623 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 " @@ -5034,7 +5036,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:653 +#: ../en/ch03-concepts.xml:636 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 " @@ -5048,12 +5050,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch03-concepts.xml:665 +#: ../en/ch03-concepts.xml:648 msgid "Safe dirstate access" msgstr "安全的目录状态访问" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch03-concepts.xml:667 +#: ../en/ch03-concepts.xml:650 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 " @@ -5065,12 +5067,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:680 +#: ../en/ch03-concepts.xml:663 msgid "Avoiding seeks" msgstr "避免查找" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:682 +#: ../en/ch03-concepts.xml:665 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 " @@ -5078,7 +5080,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:686 +#: ../en/ch03-concepts.xml:669 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 " @@ -5087,7 +5089,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:692 +#: ../en/ch03-concepts.xml:675 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 " @@ -5100,7 +5102,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:703 +#: ../en/ch03-concepts.xml:686 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. " @@ -5112,12 +5114,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch03-concepts.xml:715 +#: ../en/ch03-concepts.xml:698 msgid "Other contents of the dirstate" msgstr "目录状态的其它内容" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:717 +#: ../en/ch03-concepts.xml:700 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 " @@ -5127,7 +5129,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:724 +#: ../en/ch03-concepts.xml:707 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> " @@ -5136,7 +5138,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch03-concepts.xml:731 +#: ../en/ch03-concepts.xml:714 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 " @@ -5572,9 +5574,9 @@ "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 section <xref " -"linkend=\"sec.daily.why-copy\"/>, and make an informed decision that this " -"behaviour is not appropriate to your specific case." +"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> @@ -5830,7 +5832,7 @@ 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 chapter <xref linkend=\"chap.undo\"/>." +"committed, see <xref linkend=\"chap:undo\"/>." msgstr "" #. type: Content of: <book><chapter><title> @@ -5904,12 +5906,12 @@ "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 section <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 section <xref linkend=\"sec.collab.cgi\"/> " -"for details of CGI configuration." +"<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." msgstr "" #. type: Content of: <book><chapter><sect1><title> @@ -5999,13 +6001,13 @@ "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 section <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." +"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> @@ -6059,20 +6061,20 @@ 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 " -"section <xref linkend=\"sec.collab.ssh\"/>. It's also usual to publish a " -"read-only copy of the repository over HTTP using CGI, as in section <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:178 +"<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 msgid "Working with multiple branches" msgstr "使用多个分支工作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:180 +#: ../en/ch05-collab.xml:179 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 " @@ -6086,7 +6088,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:193 +#: ../en/ch05-collab.xml:192 msgid "" "Mercurial is particularly well suited to managing a number of simultaneous, " "but not identical, branches. Each <quote>development direction</quote> can " @@ -6097,19 +6099,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:202 +#: ../en/ch05-collab.xml:201 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:208 +#: ../en/ch05-collab.xml:207 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:211 +#: ../en/ch05-collab.xml:210 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 " @@ -6117,12 +6119,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:217 +#: ../en/ch05-collab.xml:216 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:222 +#: ../en/ch05-collab.xml:221 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 " @@ -6132,7 +6134,7 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:230 +#: ../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, " @@ -6140,7 +6142,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:236 +#: ../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 " @@ -6148,7 +6150,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:242 +#: ../en/ch05-collab.xml:241 msgid "" "Because Mercurial repositories are independent, and Mercurial doesn't move " "changes around automatically, the stable and main branches are " @@ -6158,7 +6160,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:249 +#: ../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 " @@ -6167,20 +6169,20 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:257 +#: ../en/ch05-collab.xml:256 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." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch05-collab.xml:264 ../en/ch05-collab.xml:278 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch05-collab.xml:263 ../en/ch05-collab.xml:273 msgid "Feature branches" msgstr "特性分支" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:266 +#: ../en/ch05-collab.xml:265 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 " @@ -6189,15 +6191,15 @@ "developments on other branches." msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> #: ../en/ch05-collab.xml:275 msgid "" -"<imageobject><imagedata fileref=\"images/feature-branches.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:283 +"<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/" +"></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:280 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, " @@ -6205,12 +6207,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:290 +#: ../en/ch05-collab.xml:287 msgid "The release train" msgstr "发布列车" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:292 +#: ../en/ch05-collab.xml:289 msgid "" "Some projects are organised on a <quote>train</quote> basis: a release is " "scheduled to happen every few months, and whatever features are ready when " @@ -6218,7 +6220,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:297 +#: ../en/ch05-collab.xml:294 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 " @@ -6228,12 +6230,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:306 +#: ../en/ch05-collab.xml:303 msgid "The Linux kernel model" msgstr "Linux 内核模型" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:308 +#: ../en/ch05-collab.xml:305 msgid "" "The development of the Linux kernel has a shallow hierarchical structure, " "surrounded by a cloud of apparent chaos. Because most Linux developers use " @@ -6243,7 +6245,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:316 +#: ../en/ch05-collab.xml:313 msgid "" "At the center of the community sits Linus Torvalds, the creator of Linux. He " "publishes a single source repository that is considered the " @@ -6253,7 +6255,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:323 +#: ../en/ch05-collab.xml:320 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 " @@ -6267,7 +6269,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:335 +#: ../en/ch05-collab.xml:332 msgid "" "Individual lieutenants have their own approaches to reviewing, accepting, and " "publishing changes; and for deciding when to feed them to Linus. In " @@ -6280,7 +6282,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:346 +#: ../en/ch05-collab.xml:343 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 " @@ -6290,7 +6292,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:353 +#: ../en/ch05-collab.xml:350 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 " @@ -6304,7 +6306,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:364 +#: ../en/ch05-collab.xml:361 msgid "" "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" "quote> boundaries. If you're a respected but specialised storage hacker, and " @@ -6313,7 +6315,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:371 +#: ../en/ch05-collab.xml:368 msgid "" "To people who come from more orderly project backgrounds, the comparatively " "chaotic Linux kernel development process often seems completely insane. It's " @@ -6323,12 +6325,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:381 +#: ../en/ch05-collab.xml:378 msgid "Pull-only versus shared-push collaboration" msgstr "只读与共享写协作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:383 +#: ../en/ch05-collab.xml:380 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 " @@ -6337,7 +6339,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:389 +#: ../en/ch05-collab.xml:386 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 " @@ -6348,7 +6350,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:397 +#: ../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 " @@ -6357,41 +6359,40 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:405 +#: ../en/ch05-collab.xml:402 msgid "Where collaboration meets branch management" msgstr "协作与分支管理" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:407 +#: ../en/ch05-collab.xml:404 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 " "related, but slightly different challenge: that of managing the multiple " "directions in which your team may be moving at once. Even though this " "subject is intimately related to how your team collaborates, it's dense " -"enough to merit treatment of its own, in chapter <xref linkend=\"chap.branch" -"\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:419 +"enough to merit treatment of its own, in <xref linkend=\"chap:branch\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch05-collab.xml:416 msgid "The technical side of sharing" msgstr "共享的技术因素" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:421 +#: ../en/ch05-collab.xml:418 msgid "" "The remainder of this chapter is devoted to the question of serving data to " "your collaborators." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:426 +#: ../en/ch05-collab.xml:423 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:429 +#: ../en/ch05-collab.xml:426 msgid "" "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " "wonderfully suited to small, tight-knit, and fast-paced group environments. " @@ -6400,7 +6401,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:434 +#: ../en/ch05-collab.xml:431 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 " @@ -6413,21 +6414,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:445 +#: ../en/ch05-collab.xml:442 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:449 +#: ../en/ch05-collab.xml:446 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:453 +#: ../en/ch05-collab.xml:450 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 " @@ -6435,7 +6436,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:458 +#: ../en/ch05-collab.xml:455 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-" @@ -6443,7 +6444,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:462 +#: ../en/ch05-collab.xml:459 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 " @@ -6454,12 +6455,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:472 +#: ../en/ch05-collab.xml:469 msgid "A few things to keep in mind" msgstr "要牢记的几件事" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:474 +#: ../en/ch05-collab.xml:471 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 " @@ -6468,7 +6469,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:480 +#: ../en/ch05-collab.xml:477 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 " @@ -6479,7 +6480,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:489 +#: ../en/ch05-collab.xml:486 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 " @@ -6488,7 +6489,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:495 +#: ../en/ch05-collab.xml:492 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 " @@ -6498,12 +6499,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:505 +#: ../en/ch05-collab.xml:502 msgid "Using the Secure Shell (ssh) protocol" msgstr "使用 ssh 协议" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:507 +#: ../en/ch05-collab.xml:504 msgid "" "You can pull and push changes securely over a network connection using the " "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " @@ -6512,7 +6513,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:512 +#: ../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 " @@ -6521,31 +6522,31 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:518 +#: ../en/ch05-collab.xml:515 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:523 +#: ../en/ch05-collab.xml:520 msgid "How to read and write ssh URLs" msgstr "如何读写 ssh 路径" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:525 +#: ../en/ch05-collab.xml:522 msgid "An ssh URL tends to look like this:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:528 +#: ../en/ch05-collab.xml:525 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:531 +#: ../en/ch05-collab.xml:528 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 " @@ -6553,14 +6554,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:536 +#: ../en/ch05-collab.xml:533 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:540 +#: ../en/ch05-collab.xml:537 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 " @@ -6568,13 +6569,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:545 +#: ../en/ch05-collab.xml:542 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:549 +#: ../en/ch05-collab.xml:546 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 " @@ -6584,7 +6585,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:556 +#: ../en/ch05-collab.xml:553 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 " @@ -6595,7 +6596,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:565 +#: ../en/ch05-collab.xml:562 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 " @@ -6603,19 +6604,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:571 +#: ../en/ch05-collab.xml:568 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:578 +#: ../en/ch05-collab.xml:575 msgid "Finding an ssh client for your system" msgstr "为你的系统寻找 ssh 客户端" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:580 +#: ../en/ch05-collab.xml:577 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 " @@ -6626,27 +6627,27 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:588 +#: ../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:591 +#: ../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:595 +#: ../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:598 +#: ../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. " @@ -6655,7 +6656,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch05-collab.xml:608 +#: ../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 " @@ -6664,12 +6665,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:617 +#: ../en/ch05-collab.xml:614 msgid "Generating a key pair" msgstr "产生密钥对" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:619 +#: ../en/ch05-collab.xml:616 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, " @@ -6679,7 +6680,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:627 +#: ../en/ch05-collab.xml:624 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 " @@ -6688,7 +6689,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:633 +#: ../en/ch05-collab.xml:630 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 " @@ -6699,7 +6700,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:642 +#: ../en/ch05-collab.xml:639 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 " @@ -6709,12 +6710,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:651 +#: ../en/ch05-collab.xml:648 msgid "Using an authentication agent" msgstr "使用认证代理" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:653 +#: ../en/ch05-collab.xml:650 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 " @@ -6726,7 +6727,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:662 +#: ../en/ch05-collab.xml:659 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 " @@ -6736,7 +6737,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:669 +#: ../en/ch05-collab.xml:666 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 " @@ -6747,12 +6748,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:680 +#: ../en/ch05-collab.xml:677 msgid "Configuring the server side properly" msgstr "正确配置服务器端" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:682 +#: ../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 " @@ -6762,7 +6763,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:690 +#: ../en/ch05-collab.xml:687 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</" @@ -6775,7 +6776,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:701 +#: ../en/ch05-collab.xml:698 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 " @@ -6784,7 +6785,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:708 +#: ../en/ch05-collab.xml:705 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 " @@ -6792,7 +6793,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:713 +#: ../en/ch05-collab.xml:710 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 " @@ -6800,7 +6801,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:718 +#: ../en/ch05-collab.xml:715 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 " @@ -6808,7 +6809,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:723 +#: ../en/ch05-collab.xml:720 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 " @@ -6820,7 +6821,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:733 +#: ../en/ch05-collab.xml:730 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 " @@ -6829,26 +6830,26 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:739 +#: ../en/ch05-collab.xml:736 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:743 +#: ../en/ch05-collab.xml:740 msgid "You might have stored the passphrase for the wrong key." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:746 +#: ../en/ch05-collab.xml:743 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:749 +#: ../en/ch05-collab.xml:746 msgid "" "Either the user's home directory or their <filename role=\"special\" class=" "\"directory\">.ssh</filename> directory might have excessively liberal " @@ -6859,7 +6860,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:758 +#: ../en/ch05-collab.xml:755 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, " @@ -6867,7 +6868,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:765 +#: ../en/ch05-collab.xml:762 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 " @@ -6875,7 +6876,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:770 +#: ../en/ch05-collab.xml:767 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 " @@ -6890,7 +6891,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:784 +#: ../en/ch05-collab.xml:781 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 " @@ -6898,7 +6899,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:791 +#: ../en/ch05-collab.xml:788 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 " @@ -6908,21 +6909,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:798 +#: ../en/ch05-collab.xml:795 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:802 +#: ../en/ch05-collab.xml:799 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:806 +#: ../en/ch05-collab.xml:803 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 " @@ -6931,7 +6932,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:813 +#: ../en/ch05-collab.xml:810 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 " @@ -6939,7 +6940,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:820 +#: ../en/ch05-collab.xml:817 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 " @@ -6950,12 +6951,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:830 +#: ../en/ch05-collab.xml:827 msgid "Using compression with ssh" msgstr "通过 ssh 使用压缩" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:832 +#: ../en/ch05-collab.xml:829 msgid "" "Mercurial does not compress data when it uses the ssh protocol, because the " "ssh protocol can transparently compress data. However, the default behaviour " @@ -6963,7 +6964,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:837 +#: ../en/ch05-collab.xml:834 msgid "" "Over any network other than a fast LAN (even a wireless network), using " "compression is likely to significantly speed up Mercurial's network " @@ -6973,7 +6974,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:844 +#: ../en/ch05-collab.xml:841 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 " @@ -6982,7 +6983,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:852 +#: ../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 " @@ -6991,7 +6992,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:860 +#: ../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>-" @@ -7001,19 +7002,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch05-collab.xml:871 +#: ../en/ch05-collab.xml:868 msgid "Serving over HTTP using CGI" msgstr "使用 CGI 通过 HTTP 提供服务" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch05-collab.xml:873 +#: ../en/ch05-collab.xml:870 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:877 +#: ../en/ch05-collab.xml:874 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 " @@ -7021,7 +7022,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><note><para> -#: ../en/ch05-collab.xml:883 +#: ../en/ch05-collab.xml:880 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 " @@ -7031,33 +7032,33 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:893 +#: ../en/ch05-collab.xml:890 msgid "Web server configuration checklist" msgstr "Web 服务器配置检查表" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:895 +#: ../en/ch05-collab.xml:892 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:899 +#: ../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." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch05-collab.xml:903 +#: ../en/ch05-collab.xml:900 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:907 +#: ../en/ch05-collab.xml:904 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 " @@ -7065,7 +7066,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:913 +#: ../en/ch05-collab.xml:910 msgid "" "If you don't have a web server installed, and don't have substantial " "experience configuring Apache, you should consider using the " @@ -7078,12 +7079,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:926 +#: ../en/ch05-collab.xml:923 msgid "Basic CGI configuration" msgstr "基本 CGI 配置" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:928 +#: ../en/ch05-collab.xml:925 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 " @@ -7093,7 +7094,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:936 +#: ../en/ch05-collab.xml:933 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 " @@ -7103,14 +7104,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:943 ../en/ch05-collab.xml:1112 +#: ../en/ch05-collab.xml:940 ../en/ch05-collab.xml:1109 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:948 +#: ../en/ch05-collab.xml:945 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 " @@ -7123,12 +7124,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:962 +#: ../en/ch05-collab.xml:959 msgid "What could <emphasis>possibly</emphasis> go wrong?" msgstr "什么<emphasis>可能</emphasis>会出错?" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:965 +#: ../en/ch05-collab.xml:962 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://" @@ -7142,7 +7143,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:979 +#: ../en/ch05-collab.xml:976 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. " @@ -7155,7 +7156,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:990 +#: ../en/ch05-collab.xml:987 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 " @@ -7165,7 +7166,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1000 +#: ../en/ch05-collab.xml:997 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 " @@ -7175,21 +7176,15 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1007 +#: ../en/ch05-collab.xml:1004 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 " "from my Fedora system." msgstr "" -#. type: CDATA -#: ../en/ch05-collab.xml:1012 -#, no-wrap -msgid "&ch06-apache-config.lst;]]" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1014 +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> +#: ../en/ch05-collab.xml:1011 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</" @@ -7198,7 +7193,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1021 +#: ../en/ch05-collab.xml:1018 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 " @@ -7206,7 +7201,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1027 +#: ../en/ch05-collab.xml:1024 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>-" @@ -7221,7 +7216,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1041 +#: ../en/ch05-collab.xml:1038 msgid "" "Finally, you are <emphasis>certain</emphasis> to by served with another " "colourful Python backtrace: this one will complain that it can't find " @@ -7232,19 +7227,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1051 +#: ../en/ch05-collab.xml:1048 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:1057 +#: ../en/ch05-collab.xml:1054 msgid "Configuring lighttpd" msgstr "配置 lighttpd" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1059 +#: ../en/ch05-collab.xml:1056 msgid "" "To be exhaustive in my experiments, I tried configuring the increasingly " "popular <literal>lighttpd</literal> web server to serve the same repository " @@ -7255,7 +7250,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1069 +#: ../en/ch05-collab.xml:1066 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 " @@ -7267,7 +7262,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1081 +#: ../en/ch05-collab.xml:1078 msgid "" "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " @@ -7278,12 +7273,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1094 +#: ../en/ch05-collab.xml:1091 msgid "Sharing multiple repositories with one CGI script" msgstr "使用一个 CGI 脚本共享多个版本库" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1096 +#: ../en/ch05-collab.xml:1093 msgid "" "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " "publish a single repository, which is an annoying restriction. If you want " @@ -7293,7 +7288,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1104 +#: ../en/ch05-collab.xml:1101 msgid "" "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" @@ -7304,17 +7299,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1117 +#: ../en/ch05-collab.xml:1116 msgid "" "With basic configuration out of the way, try to visit <ulink url=\"http://" "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" "ulink> in your browser. It should display an empty list of repositories. If " "you get a blank window or error message, try walking through the list of " -"potential problems in section <xref linkend=\"sec.collab.wtf\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1126 +"potential problems in <xref linkend=\"sec:collab:wtf\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch05-collab.xml:1125 msgid "" "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " "external configuration file. By default, it searches for a file named " @@ -7326,7 +7321,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1136 +#: ../en/ch05-collab.xml:1135 msgid "" "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" "filename> is with a section named <literal>collections</literal>. This will " @@ -7335,7 +7330,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1144 +#: ../en/ch05-collab.xml:1143 msgid "" "Mercurial interprets this by looking at the directory name on the " "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" @@ -7347,7 +7342,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1153 +#: ../en/ch05-collab.xml:1152 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 " @@ -7361,7 +7356,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1167 +#: ../en/ch05-collab.xml:1166 msgid "" "If we replace <filename class=\"directory\">/my/root</filename> on the left " "hand side of this example with <filename class=\"directory\">/my</filename>, " @@ -7372,7 +7367,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1177 +#: ../en/ch05-collab.xml:1176 msgid "" "The <filename role=\"special\">hgwebdir.cgi</filename> script will " "recursively search each directory listed in the <literal>collections</" @@ -7381,7 +7376,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1183 +#: ../en/ch05-collab.xml:1182 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 " @@ -7392,12 +7387,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch05-collab.xml:1193 +#: ../en/ch05-collab.xml:1192 msgid "Explicitly specifying which repositories to publish" msgstr "明确指出要发布的版本库" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1196 +#: ../en/ch05-collab.xml:1195 msgid "" "In addition to the <literal>collections</literal> mechanism, the <filename " "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " @@ -7406,7 +7401,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1205 +#: ../en/ch05-collab.xml:1204 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 " @@ -7416,7 +7411,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch05-collab.xml:1212 +#: ../en/ch05-collab.xml:1211 msgid "" "If you wish, you can use both the <literal>collections</literal> and " "<literal>paths</literal> mechanisms simultaneously in a single configuration " @@ -7424,7 +7419,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> -#: ../en/ch05-collab.xml:1218 +#: ../en/ch05-collab.xml:1217 msgid "" "If multiple repositories have the same virtual path, <filename role=\"special" "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " @@ -7432,12 +7427,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1227 +#: ../en/ch05-collab.xml:1226 msgid "Downloading source archives" msgstr "下载源代码档案包" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1229 +#: ../en/ch05-collab.xml:1228 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 " @@ -7445,7 +7440,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1234 +#: ../en/ch05-collab.xml:1233 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=" @@ -7454,12 +7449,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch05-collab.xml:1242 +#: ../en/ch05-collab.xml:1241 msgid "Web configuration options" msgstr "Web 配置选项" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch05-collab.xml:1244 +#: ../en/ch05-collab.xml:1243 msgid "" "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " "command, and the <filename role=\"special\">hgweb.cgi</filename> and " @@ -7469,7 +7464,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1252 +#: ../en/ch05-collab.xml:1251 msgid "" "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " "archive download mechanisms Mercurial supports. If you enable this feature, " @@ -7479,7 +7474,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1261 +#: ../en/ch05-collab.xml:1260 msgid "" "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " "<literal>bzip2</literal> compression. This has the best compression ratio, " @@ -7487,14 +7482,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1267 +#: ../en/ch05-collab.xml:1266 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:1271 +#: ../en/ch05-collab.xml:1270 msgid "" "<literal>zip</literal>: A <command>zip</command> archive, compressed using " "LZW compression. This format has the worst compression ratio, but is widely " @@ -7502,7 +7497,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1277 +#: ../en/ch05-collab.xml:1276 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 " @@ -7510,7 +7505,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1284 +#: ../en/ch05-collab.xml:1283 msgid "" "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" @@ -7520,7 +7515,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1293 +#: ../en/ch05-collab.xml:1292 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 " @@ -7532,21 +7527,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1304 +#: ../en/ch05-collab.xml:1303 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:1308 +#: ../en/ch05-collab.xml:1307 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:1312 +#: ../en/ch05-collab.xml:1311 msgid "" "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " "displays alternating <quote>stripes</quote> to make it easier to visually " @@ -7555,14 +7550,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch05-collab.xml:1318 +#: ../en/ch05-collab.xml:1317 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 chapter <xref linkend=\"chap.template\"/> for details. Here, " -"you can see how to enable the <literal>gitweb</literal> style." +"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> @@ -8976,14 +8971,13 @@ #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch08-undo.xml:33 msgid "" -"In section <xref linkend=\"sec.concepts.txn\"/>, I mentioned that Mercurial " -"treats each modification of a repository as a <emphasis>transaction</" -"emphasis>. Every time you commit a changeset or pull changes from another " -"repository, Mercurial remembers what you did. You can undo, or " -"<emphasis>roll back</emphasis>, exactly one of these actions using the " -"<command role=\"hg-cmd\">hg rollback</command> command. (See section <xref " -"linkend=\"sec.undo.rollback-after-push\"/> for an important caveat about the " -"use of this command.)" +"In <xref linkend=\"sec:concepts:txn\"/>, I mentioned that Mercurial treats " +"each modification of a repository as a <emphasis>transaction</emphasis>. " +"Every time you commit a changeset or pull changes from another repository, " +"Mercurial remembers what you did. You can undo, or <emphasis>roll back</" +"emphasis>, exactly one of these actions using the <command role=\"hg-cmd\">hg " +"rollback</command> command. (See <xref linkend=\"sec:undo:rollback-after-push" +"\"/> for an important caveat about the use of this command.)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -9323,7 +9317,7 @@ "<emphasis>adding</emphasis> history, not by modifying or erasing it. It's " "the right tool to use if you're fixing bugs, but not if you're trying to undo " "some change that has catastrophic consequences. To deal with those, see " -"section <xref linkend=\"sec.undo.aaaiiieee\"/>." +"<xref linkend=\"sec:undo:aaaiiieee\"/>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -9381,31 +9375,29 @@ "backout</command> command has done. &interaction.backout.simple.log; Notice " "that the new changeset that <command role=\"hg-cmd\">hg backout</command> has " "created is a child of the changeset we backed out. It's easier to see this " -"in figure <xref endterm=\"fig.undo.backout.caption\" linkend=\"fig.undo." -"backout\"/>, which presents a graphical view of the change history. As you " -"can see, the history is nice and linear." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch08-undo.xml:364 -msgid "" -"<imageobject><imagedata fileref=\"images/undo-simple.png\"/> </imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch08-undo.xml:367 ../en/ch08-undo.xml:486 +"in <xref linkend=\"fig:undo:backout\"/>, which presents a graphical view of " +"the change history. As you can see, the history is nice and linear." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch08-undo.xml:361 ../en/ch08-undo.xml:473 msgid "" "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> " "command" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:376 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch08-undo.xml:364 +msgid "<imageobject><imagedata fileref=\"figs/undo-simple.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch08-undo.xml:371 msgid "Backing out a non-tip change" msgstr "恢复非顶点的修改" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:378 +#: ../en/ch08-undo.xml:373 msgid "" "If you want to back out a change other than the last one you committed, pass " "the <option role=\"hg-opt-backout\">--merge</option> option to the <command " @@ -9413,14 +9405,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:385 +#: ../en/ch08-undo.xml:380 msgid "" "This makes backing out any changeset a <quote>one-shot</quote> operation " "that's usually simple and fast." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:391 +#: ../en/ch08-undo.xml:386 msgid "" "If you take a look at the contents of <filename>myfile</filename> after the " "backout finishes, you'll see that the first and third changes are present, " @@ -9428,40 +9420,40 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:398 -msgid "" -"As the graphical history in figure <xref endterm=\"fig.undo.backout-non-tip." -"caption\" linkend=\"fig.undo.backout-non-tip\"/> illustrates, Mercurial " -"actually commits <emphasis>two</emphasis> changes in this kind of situation " -"(the box-shaped nodes are the ones that Mercurial commits automatically). " -"Before Mercurial begins the backout process, it first remembers what the " -"current parent of the working directory is. It then backs out the target " -"changeset, and commits that as a changeset. Finally, it merges back to the " -"previous parent of the working directory, and commits the result of the merge." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:410 +#: ../en/ch08-undo.xml:393 +msgid "" +"As the graphical history in <xref linkend=\"fig:undo:backout-non-tip\"/> " +"illustrates, Mercurial actually commits <emphasis>two</emphasis> changes in " +"this kind of situation (the box-shaped nodes are the ones that Mercurial " +"commits automatically). Before Mercurial begins the backout process, it " +"first remembers what the current parent of the working directory is. It then " +"backs out the target changeset, and commits that as a changeset. Finally, it " +"merges back to the previous parent of the working directory, and commits the " +"result of the merge." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch08-undo.xml:404 msgid "" "% TODO: to me it looks like mercurial doesn't commit the second merge " "automatically!" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch08-undo.xml:415 -msgid "" -"<imageobject><imagedata fileref=\"images/undo-non-tip.png\"/> </imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch08-undo.xml:418 +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch08-undo.xml:408 msgid "" "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg " "backout</command> command" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:424 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch08-undo.xml:411 +msgid "" +"<imageobject><imagedata fileref=\"figs/undo-non-tip.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch08-undo.xml:416 msgid "" "The result is that you end up <quote>back where you were</quote>, only with " "some extra history that undoes the effect of the changeset you wanted to back " @@ -9469,12 +9461,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch08-undo.xml:429 +#: ../en/ch08-undo.xml:421 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option" msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch08-undo.xml:432 +#: ../en/ch08-undo.xml:424 msgid "" "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option " "will do the <quote>right thing</quote> whether or not the changeset you're " @@ -9484,12 +9476,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:443 +#: ../en/ch08-undo.xml:435 msgid "Gaining more control of the backout process" msgstr "在恢复处理中获得更多控制" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:445 +#: ../en/ch08-undo.xml:437 msgid "" "While I've recommended that you always use the <option role=\"hg-opt-backout" "\">--merge</option> option when backing out a change, the <command role=\"hg-" @@ -9502,14 +9494,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:458 +#: ../en/ch08-undo.xml:450 msgid "" "As with our earlier example, We'll commit a third changeset, then back out " "its parent, and see what happens." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:464 +#: ../en/ch08-undo.xml:456 msgid "" "Our new changeset is again a descendant of the changeset we backout out; it's " "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that " @@ -9518,38 +9510,36 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:472 +#: ../en/ch08-undo.xml:464 msgid "" "Again, it's easier to see what has happened by looking at a graph of the " -"revision history, in figure <xref endterm=\"fig.undo.backout-manual.caption\" " -"linkend=\"fig.undo.backout-manual\"/>. This makes it clear that when we use " -"<command role=\"hg-cmd\">hg backout</command> to back out a change other than " -"the tip, Mercurial adds a new head to the repository (the change it committed " -"is box-shaped)." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch08-undo.xml:483 -msgid "" -"<imageobject><imagedata fileref=\"images/undo-manual.png\"/> </imageobject>" +"revision history, in <xref linkend=\"fig:undo:backout-manual\"/>. This makes " +"it clear that when we use <command role=\"hg-cmd\">hg backout</command> to " +"back out a change other than the tip, Mercurial adds a new head to the " +"repository (the change it committed is box-shaped)." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch08-undo.xml:476 +msgid "<imageobject><imagedata fileref=\"figs/undo-manual.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch08-undo.xml:481 +msgid "" +"After the <command role=\"hg-cmd\">hg backout</command> command has " +"completed, it leaves the new <quote>backout</quote> changeset as the parent " +"of the working directory." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch08-undo.xml:488 +msgid "Now we have two isolated sets of changes." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch08-undo.xml:492 msgid "" -"After the <command role=\"hg-cmd\">hg backout</command> command has " -"completed, it leaves the new <quote>backout</quote> changeset as the parent " -"of the working directory." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:499 -msgid "Now we have two isolated sets of changes." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:503 -msgid "" "Let's think about what we expect to see as the contents of <filename>myfile</" "filename> now. The first change should be present, because we've never " "backed it out. The second change should be missing, as that's the change we " @@ -9559,60 +9549,58 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:513 +#: ../en/ch08-undo.xml:502 msgid "" "To get the third change back into the file, we just do a normal merge of our " "two heads." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:518 -msgid "" -"Afterwards, the graphical history of our repository looks like figure <xref " -"endterm=\"fig.undo.backout-manual-merge.caption\" linkend=\"fig.undo.backout-" -"manual-merge\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch08-undo.xml:525 -msgid "" -"<imageobject><imagedata fileref=\"images/undo-manual-merge.png\"/> </" -"imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> -#: ../en/ch08-undo.xml:528 +#: ../en/ch08-undo.xml:507 +msgid "" +"Afterwards, the graphical history of our repository looks like <xref linkend=" +"\"fig:undo:backout-manual-merge\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch08-undo.xml:512 msgid "Manually merging a backout change" msgstr "" -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:535 +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> +#: ../en/ch08-undo.xml:514 +msgid "" +"<imageobject><imagedata fileref=\"figs/undo-manual-merge.png\"/></imageobject>" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch08-undo.xml:521 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does" msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:538 +#: ../en/ch08-undo.xml:524 msgid "" "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</" "command> command works." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:541 +#: ../en/ch08-undo.xml:527 msgid "" "It ensures that the working directory is <quote>clean</quote>, i.e. that the " "output of <command role=\"hg-cmd\">hg status</command> would be empty." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:545 +#: ../en/ch08-undo.xml:531 msgid "" "It remembers the current parent of the working directory. Let's call this " "changeset <literal>orig</literal>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:549 +#: ../en/ch08-undo.xml:535 msgid "" "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to " "sync the working directory to the changeset you want to back out. Let's call " @@ -9620,14 +9608,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:554 +#: ../en/ch08-undo.xml:540 msgid "" "It finds the parent of that changeset. Let's call that changeset " "<literal>parent</literal>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:557 +#: ../en/ch08-undo.xml:543 msgid "" "For each file that the <literal>backout</literal> changeset affected, it does " "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on " @@ -9636,14 +9624,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:564 +#: ../en/ch08-undo.xml:550 msgid "" "It commits the result as a new changeset. This changeset has " "<literal>backout</literal> as its parent." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:568 +#: ../en/ch08-undo.xml:554 msgid "" "If you specify <option role=\"hg-opt-backout\">--merge</option> on the " "command line, it merges with <literal>orig</literal>, and commits the result " @@ -9651,7 +9639,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:574 +#: ../en/ch08-undo.xml:560 msgid "" "An alternative way to implement the <command role=\"hg-cmd\">hg backout</" "command> command would be to <command role=\"hg-cmd\">hg export</command> the " @@ -9662,7 +9650,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:584 +#: ../en/ch08-undo.xml:570 msgid "" "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, " "a commit, a merge, and another commit is to give the merge machinery the best " @@ -9671,14 +9659,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:591 +#: ../en/ch08-undo.xml:577 msgid "" "If you're backing out a changeset that's 100 revisions back in your project's " "history, the chances that the <command>patch</command> command will be able " "to apply a reverse diff cleanly are not good, because intervening changes are " "likely to have <quote>broken the context</quote> that <command>patch</" "command> uses to determine whether it can apply a patch (if this sounds like " -"gibberish, see <xref linkend=\"sec.mq.patch\"/> for a discussion of the " +"gibberish, see <xref linkend=\"sec:mq:patch\"/> for a discussion of the " "<command>patch</command> command). Also, Mercurial's merge machinery will " "handle files and directories being renamed, permission changes, and " "modifications to binary files, none of which <command>patch</command> can " @@ -9686,12 +9674,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch08-undo.xml:608 +#: ../en/ch08-undo.xml:594 msgid "Changes that should never have been" msgstr "不该发生的修改" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:610 +#: ../en/ch08-undo.xml:596 msgid "" "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command " "is exactly what you need if you want to undo the effects of a change. It " @@ -9700,7 +9688,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:616 +#: ../en/ch08-undo.xml:602 msgid "" "On rare occasions, though, you may find that you've committed a change that " "really should not be present in the repository at all. For example, it would " @@ -9712,7 +9700,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:625 +#: ../en/ch08-undo.xml:611 msgid "" "Before I discuss the options that you have if you commit a <quote>brown paper " "bag</quote> change (the kind that's so bad that you want to pull a brown " @@ -9721,19 +9709,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:630 +#: ../en/ch08-undo.xml:616 msgid "" "Since Mercurial treats history as accumulative&emdash;every change builds on " "top of all changes that preceded it&emdash;you generally can't just make " "disastrous changes disappear. The one exception is when you've just " "committed a change, and it hasn't been pushed or pulled into another " "repository. That's when you can safely use the <command role=\"hg-cmd\">hg " -"rollback</command> command, as I detailed in section <xref linkend=\"sec.undo." -"rollback\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:639 +"rollback</command> command, as I detailed in <xref linkend=\"sec:undo:rollback" +"\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><para> +#: ../en/ch08-undo.xml:625 msgid "" "After you've pushed a bad change to another repository, you <emphasis>could</" "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make " @@ -9743,7 +9731,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:647 +#: ../en/ch08-undo.xml:633 msgid "" "If a situation like this arises, and you know which repositories your bad " "change has propagated into, you can <emphasis>try</emphasis> to get rid of " @@ -9754,7 +9742,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:655 +#: ../en/ch08-undo.xml:641 msgid "" "If you've committed one or more changes <emphasis>after</emphasis> the change " "that you'd like to see disappear, your options are further reduced. Mercurial " @@ -9763,7 +9751,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:661 +#: ../en/ch08-undo.xml:647 msgid "" "XXX This needs filling out. The <literal>hg-replay</literal> script in the " "<literal>examples</literal> directory works, but doesn't handle merge " @@ -9771,12 +9759,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:667 +#: ../en/ch08-undo.xml:653 msgid "Protect yourself from <quote>escaped</quote> changes" msgstr "使用<quote>校验</quote>修改来保护你自己" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:670 +#: ../en/ch08-undo.xml:656 msgid "" "If you've committed some changes to your local repository and they've been " "pushed or pulled somewhere else, this isn't necessarily a disaster. You can " @@ -9786,10 +9774,10 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:677 +#: ../en/ch08-undo.xml:663 msgid "" "By configuring some hooks on that repository to validate incoming changesets " -"(see chapter <xref linkend=\"chap.hook\"/>), you can automatically prevent " +"(see chapter <xref linkend=\"chap:hook\"/>), you can automatically prevent " "some kinds of bad changeset from being pushed to the central repository at " "all. With such a configuration in place, some kinds of bad changeset will " "naturally tend to <quote>die out</quote> because they can't propagate into " @@ -9798,7 +9786,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:687 +#: ../en/ch08-undo.xml:673 msgid "" "For instance, an incoming change hook that verifies that a changeset will " "actually compile can prevent people from inadvertantly <quote>breaking the " @@ -9806,12 +9794,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch08-undo.xml:694 +#: ../en/ch08-undo.xml:680 msgid "Finding the source of a bug" msgstr "查找问题的根源" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:696 +#: ../en/ch08-undo.xml:682 msgid "" "While it's all very well to be able to back out a changeset that introduced a " "bug, this requires that you know which changeset to back out. Mercurial " @@ -9821,7 +9809,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:703 +#: ../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 " @@ -9833,14 +9821,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:712 +#: ../en/ch08-undo.xml:698 msgid "" "Here are a few scenarios to help you understand how you might apply this " "command." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:715 +#: ../en/ch08-undo.xml:701 msgid "" "The most recent version of your software has a bug that you remember wasn't " "present a few weeks ago, but you don't know when it was introduced. Here, " @@ -9848,7 +9836,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:720 +#: ../en/ch08-undo.xml:706 msgid "" "You fixed a bug in a rush, and now it's time to close the entry in your " "team's bug database. The bug database requires a changeset ID when you close " @@ -9857,7 +9845,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:727 +#: ../en/ch08-undo.xml:713 msgid "" "Your software works correctly, but runs 15% slower than the last time you " "measured it. You want to know which changeset introduced the performance " @@ -9866,14 +9854,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:734 +#: ../en/ch08-undo.xml:720 msgid "" "The sizes of the components of your project that you ship exploded recently, " "and you suspect that something changed in the way you build your project." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:739 +#: ../en/ch08-undo.xml:725 msgid "" "From these examples, it should be clear that the <command role=\"hg-cmd\">hg " "bisect</command> command is not useful only for finding the sources of bugs. " @@ -9883,7 +9871,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:746 +#: ../en/ch08-undo.xml:732 msgid "" "We'll introduce a little bit of terminology here, just to make it clear which " "parts of the search process are your responsibility, and which are " @@ -9897,7 +9885,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:759 +#: ../en/ch08-undo.xml:745 msgid "" "One simple way to automate the searching process would be simply to probe " "every changeset. However, this scales poorly. If it took ten minutes to " @@ -9910,7 +9898,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:769 +#: ../en/ch08-undo.xml:755 msgid "" "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its " "knowledge of the <quote>shape</quote> of your project's revision history to " @@ -9923,7 +9911,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch08-undo.xml:780 +#: ../en/ch08-undo.xml:766 msgid "" "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the " "<quote>branchy</quote> nature of a Mercurial project's revision history, so " @@ -9933,18 +9921,18 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:788 +#: ../en/ch08-undo.xml:774 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command" msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:791 +#: ../en/ch08-undo.xml:777 msgid "" "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch08-undo.xml:795 +#: ../en/ch08-undo.xml:781 msgid "" "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg " "bisect</command> was not a core command: it was distributed with Mercurial as " @@ -9953,14 +9941,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:802 +#: ../en/ch08-undo.xml:788 msgid "" "Now let's create a repository, so that we can try out the <command role=\"hg-" "cmd\">hg bisect</command> command in isolation." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:808 +#: ../en/ch08-undo.xml:794 msgid "" "We'll simulate a project that has a bug in it in a simple-minded way: create " "trivial changes in a loop, and nominate one specific change that will have " @@ -9970,7 +9958,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:818 +#: ../en/ch08-undo.xml:804 msgid "" "The next thing that we'd like to do is figure out how to use the <command " "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal " @@ -9978,46 +9966,46 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:825 +#: ../en/ch08-undo.xml:811 msgid "" "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. " "Each step proceeds as follows." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:828 +#: ../en/ch08-undo.xml:814 msgid "You run your binary test." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:830 +#: ../en/ch08-undo.xml:816 msgid "" "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> " "by running the <command role=\"hg-cmd\">hg bisect good</command> command." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:835 +#: ../en/ch08-undo.xml:821 msgid "" "If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> " "command." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:839 +#: ../en/ch08-undo.xml:825 msgid "" "The command uses your information to decide which changeset to test next." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> -#: ../en/ch08-undo.xml:842 +#: ../en/ch08-undo.xml:828 msgid "" "It updates the working directory to that changeset, and the process begins " "again." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:845 +#: ../en/ch08-undo.xml:831 msgid "" "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies " "a unique changeset that marks the point where your test transitioned from " @@ -10026,14 +10014,14 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:850 +#: ../en/ch08-undo.xml:836 msgid "" "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --" "reset</command> command." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:855 +#: ../en/ch08-undo.xml:841 msgid "" "In our case, the binary test we use is simple: we check to see if any file in " "the repository contains the string <quote>i have a gub</quote>. If it does, " @@ -10043,7 +10031,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:863 +#: ../en/ch08-undo.xml:849 msgid "" "Most of the time, the revision to which the working directory is synced " "(usually the tip) already exhibits the problem introduced by the buggy " @@ -10052,7 +10040,7 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:870 +#: ../en/ch08-undo.xml:856 msgid "" "Our next task is to nominate a changeset that we know <emphasis>doesn't</" "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> " @@ -10063,26 +10051,26 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:880 +#: ../en/ch08-undo.xml:866 msgid "Notice that this command printed some output." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:882 +#: ../en/ch08-undo.xml:868 msgid "" "It told us how many changesets it must consider before it can identify the " "one that introduced the bug, and how many tests that will require." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:886 +#: ../en/ch08-undo.xml:872 msgid "" "It updated the working directory to the next changeset to test, and told us " "which changeset it's testing." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:891 +#: ../en/ch08-undo.xml:877 msgid "" "We now run our test in the working directory. We use the <command>grep</" "command> command to see if our <quote>bad</quote> file is present in the " @@ -10091,26 +10079,26 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:897 +#: ../en/ch08-undo.xml:883 msgid "" "This test looks like a perfect candidate for automation, so let's turn it " "into a shell function." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:901 +#: ../en/ch08-undo.xml:887 msgid "" "We can now run an entire test step with a single command, <literal>mytest</" "literal>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:906 +#: ../en/ch08-undo.xml:892 msgid "A few more invocations of our canned test step command, and we're done." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:911 +#: ../en/ch08-undo.xml:897 msgid "" "Even though we had 40 changesets to search through, the <command role=\"hg-cmd" "\">hg bisect</command> command let us find the changeset that introduced our " @@ -10122,13 +10110,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:922 +#: ../en/ch08-undo.xml:908 msgid "Cleaning up after your search" msgstr "搜索后的清理" # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:924 +#: ../en/ch08-undo.xml:910 msgid "" "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> " "command in a repository, you can use the <command role=\"hg-cmd\">hg bisect " @@ -10140,17 +10128,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch08-undo.xml:939 +#: ../en/ch08-undo.xml:925 msgid "Tips for finding bugs effectively" msgstr "有效查找问题的技巧" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:942 +#: ../en/ch08-undo.xml:928 msgid "Give consistent input" msgstr "给出一致的输入" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:944 +#: ../en/ch08-undo.xml:930 msgid "" "The <command role=\"hg-cmd\">hg bisect</command> command requires that you " "correctly report the result of every test you perform. If you tell it that a " @@ -10162,12 +10150,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:956 +#: ../en/ch08-undo.xml:942 msgid "Automate as much as possible" msgstr "尽量自动" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:958 +#: ../en/ch08-undo.xml:944 msgid "" "When I started using the <command role=\"hg-cmd\">hg bisect</command> " "command, I tried a few times to run my tests by hand, on the command line. " @@ -10177,7 +10165,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:966 +#: ../en/ch08-undo.xml:952 msgid "" "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</" "command> command by hand occurred even with simple searches on small " @@ -10188,24 +10176,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:975 +#: ../en/ch08-undo.xml:961 msgid "The key to automated testing is twofold:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:977 +#: ../en/ch08-undo.xml:963 msgid "always test for the same symptom, and" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:979 +#: ../en/ch08-undo.xml:965 msgid "" "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</" "command> command." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:982 +#: ../en/ch08-undo.xml:968 msgid "" "In my tutorial example above, the <command>grep</command> command tests for " "the symptom, and the <literal>if</literal> statement takes the result of this " @@ -10216,12 +10204,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:992 +#: ../en/ch08-undo.xml:978 msgid "Check your results" msgstr "检查你的结果" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:994 +#: ../en/ch08-undo.xml:980 msgid "" "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search " "is only as good as the input you give it, don't take the changeset it reports " @@ -10230,32 +10218,32 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:1000 +#: ../en/ch08-undo.xml:986 msgid "" "The changeset that it reports as the first bad revision. Your test should " "still report this as bad." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:1004 +#: ../en/ch08-undo.xml:990 msgid "" "The parent of that changeset (either parent, if it's a merge). Your test " "should report this changeset as good." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch08-undo.xml:1008 +#: ../en/ch08-undo.xml:994 msgid "" "A child of that changeset. Your test should report this changeset as bad." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:1014 +#: ../en/ch08-undo.xml:1000 msgid "Beware interference between bugs" msgstr "谨防问题之间的冲突" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1016 +#: ../en/ch08-undo.xml:1002 msgid "" "It's possible that your search for one bug could be disrupted by the presence " "of another. For example, let's say your software crashes at revision 100, " @@ -10265,7 +10253,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1024 +#: ../en/ch08-undo.xml:1010 msgid "" "It is possible that this other bug completely <quote>masks</quote> yours, " "which is to say that it occurs before your bug has a chance to manifest " @@ -10277,7 +10265,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1034 +#: ../en/ch08-undo.xml:1020 msgid "" "A different problem could arise if your test for a bug's presence is not " "specific enough. If you check for <quote>my program crashes</quote>, then " @@ -10286,7 +10274,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1041 +#: ../en/ch08-undo.xml:1027 msgid "" "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --" "skip</command> is if you can't test a revision because your project was in a " @@ -10295,12 +10283,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch08-undo.xml:1050 +#: ../en/ch08-undo.xml:1036 msgid "Bracket your search lazily" msgstr "减少你的查找工作" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1052 +#: ../en/ch08-undo.xml:1038 msgid "" "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that " "will mark the end points of your search is often easy, but it bears a little " @@ -10310,7 +10298,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1060 +#: ../en/ch08-undo.xml:1046 msgid "" "If you're having trouble remembering when a suitable <quote>good</quote> " "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</" @@ -10321,7 +10309,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch08-undo.xml:1069 +#: ../en/ch08-undo.xml:1055 msgid "" "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 " @@ -10358,9 +10346,8 @@ #. type: Content of: <book><chapter><sect1><para> #: ../en/ch09-hook.xml:20 msgid "" -"Here is a brief list of the hooks that Mercurial supports. We will revisit " -"each of these hooks in more detail later, in section <xref linkend=\"sec.hook." -"ref\"/>." +"Here is a brief list of the hooks that Mercurial supports. We will revisit " +"each of these hooks in more detail later, in <xref linkend=\"sec:hook:ref\"/>." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> @@ -10838,8 +10825,7 @@ "new hook. This will help you to remember what the hook was for. If the hook " "fails, you'll get an error message that contains the hook name and extension, " "so using a descriptive extension could give you an immediate hint as to why " -"the hook failed (see section <xref linkend=\"sec.hook.perm\"/> for an " -"example)." +"the hook failed (see <xref linkend=\"sec:hook:perm\"/> for an example)." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -11335,7 +11321,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1280 +#: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1279 msgid "Testing and troubleshooting" msgstr "测试与问题处理" @@ -11632,12 +11618,12 @@ #. type: Content of: <book><chapter><sect1><sect2><sect3><para> #: ../en/ch09-hook.xml:1097 msgid "" -"Recall from section <xref linkend=\"sec.hook.bugzilla.config\"/> above that " -"the user that runs the Mercurial process on the server is also the one that " -"will run the <filename>processmail</filename> script. The " -"<filename>processmail</filename> script sometimes causes Bugzilla to write to " -"files in its configuration directory, and Bugzilla's configuration files are " -"usually owned by the user that your web server runs under." +"Recall from <xref linkend=\"sec:hook:bugzilla:config\"/> above that the user " +"that runs the Mercurial process on the server is also the one that will run " +"the <filename>processmail</filename> script. The <filename>processmail</" +"filename> script sometimes causes Bugzilla to write to files in its " +"configuration directory, and Bugzilla's configuration files are usually owned " +"by the user that your web server runs under." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> @@ -11805,12 +11791,12 @@ "<envar role=\"rc-item-notify\">sources</envar>: A list of sources of " "changesets to consider. This lets you limit <literal role=\"hg-ext\">notify</" "literal> to only sending out email about changes that remote users pushed " -"into this repository via a server, for example. See section <xref linkend=" -"\"sec.hook.sources\"/> for the sources you can specify here." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1260 +"into this repository via a server, for example. See <xref linkend=\"sec:hook:" +"sources\"/> for the sources you can specify here." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><sect3><para> +#: ../en/ch09-hook.xml:1259 msgid "" "If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the " "<literal role=\"rc-web\">web</literal> section, you can use it in a template; " @@ -11818,19 +11804,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1266 +#: ../en/ch09-hook.xml:1265 msgid "" "Here is an example set of <literal role=\"hg-ext\">notify</literal> " "configuration information." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1272 +#: ../en/ch09-hook.xml:1271 msgid "This will produce a message that looks like the following:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1282 +#: ../en/ch09-hook.xml:1281 msgid "" "Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> " "extension <emphasis>will not send any mail</emphasis> until you explicitly " @@ -11840,22 +11826,22 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch09-hook.xml:1294 +#: ../en/ch09-hook.xml:1293 msgid "Information for writers of hooks" msgstr "编写钩子的信息" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1297 +#: ../en/ch09-hook.xml:1296 msgid "In-process hook execution" msgstr "进程内钩子的执行" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1299 +#: ../en/ch09-hook.xml:1298 msgid "An in-process hook is called with arguments of the following form:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1303 +#: ../en/ch09-hook.xml:1302 msgid "" "The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui" "\">ui</literal> object. The <literal>repo</literal> parameter is a <literal " @@ -11865,7 +11851,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1312 +#: ../en/ch09-hook.xml:1311 msgid "" "If a parameter is named <literal>node</literal> or <literal>parentN</" "literal>, it will contain a hexadecimal changeset ID. The empty string is " @@ -11874,21 +11860,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1319 +#: ../en/ch09-hook.xml:1318 msgid "" "If a parameter is named <literal>url</literal>, it will contain the URL of a " "remote repository, if that can be determined." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1324 +#: ../en/ch09-hook.xml:1323 msgid "" "Boolean-valued parameters are represented as Python <literal>bool</literal> " "objects." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1329 +#: ../en/ch09-hook.xml:1328 msgid "" "An in-process hook is called without a change to the process's working " "directory (unlike external hooks, which are run in the root of the " @@ -11897,7 +11883,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1336 +#: ../en/ch09-hook.xml:1335 msgid "" "If a hook returns a boolean <quote>false</quote> value, it is considered to " "have succeeded. If it returns a boolean <quote>true</quote> value or raises " @@ -11906,7 +11892,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1343 +#: ../en/ch09-hook.xml:1342 msgid "" "Note that changeset IDs are passed into Python hooks as hexadecimal strings, " "not the binary hashes that Mercurial's APIs normally use. To convert a hash " @@ -11914,12 +11900,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1351 +#: ../en/ch09-hook.xml:1350 msgid "External hook execution" msgstr "外部钩子的执行" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1353 +#: ../en/ch09-hook.xml:1352 msgid "" "An external hook is passed to the shell of the user running Mercurial. " "Features of that shell, such as variable substitution and command " @@ -11929,7 +11915,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1361 +#: ../en/ch09-hook.xml:1360 msgid "" "Hook parameters are passed to the hook as environment variables. Each " "environment variable's name is converted in upper case and prefixed with the " @@ -11940,7 +11926,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1370 +#: ../en/ch09-hook.xml:1369 msgid "" "A boolean parameter is represented as the string <quote><literal>1</literal></" "quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for " @@ -11953,19 +11939,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1382 +#: ../en/ch09-hook.xml:1381 msgid "" "If a hook exits with a status of zero, it is considered to have succeeded. " "If it exits with a non-zero status, it is considered to have failed." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1389 +#: ../en/ch09-hook.xml:1388 msgid "Finding out where changesets come from" msgstr "检查修改集来自何处" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1391 +#: ../en/ch09-hook.xml:1390 msgid "" "A hook that involves the transfer of changesets between a local repository " "and another may be able to find out information about the <quote>far side</" @@ -11975,12 +11961,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch09-hook.xml:1400 +#: ../en/ch09-hook.xml:1399 msgid "Sources of changesets" msgstr "修改集的来源" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1402 +#: ../en/ch09-hook.xml:1401 msgid "" "Mercurial will tell a hook what means are, or were, used to transfer " "changesets between repositories. This is provided by Mercurial in a Python " @@ -11989,40 +11975,40 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1410 +#: ../en/ch09-hook.xml:1409 msgid "" "<literal>serve</literal>: Changesets are transferred to or from a remote " "repository over http or ssh." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1415 +#: ../en/ch09-hook.xml:1414 msgid "" "<literal>pull</literal>: Changesets are being transferred via a pull from one " "repository into another." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1420 +#: ../en/ch09-hook.xml:1419 msgid "" "<literal>push</literal>: Changesets are being transferred via a push from one " "repository into another." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1425 +#: ../en/ch09-hook.xml:1424 msgid "" "<literal>bundle</literal>: Changesets are being transferred to or from a " "bundle." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><title> -#: ../en/ch09-hook.xml:1432 +#: ../en/ch09-hook.xml:1431 msgid "Where changes are going&emdash;remote repository URLs" msgstr "修改集要到哪里&emdash;远程版本库的地址" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1435 +#: ../en/ch09-hook.xml:1434 msgid "" "When possible, Mercurial will tell a hook the location of the <quote>far " "side</quote> of an activity that transfers changeset data between " @@ -12032,7 +12018,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><para> -#: ../en/ch09-hook.xml:1443 +#: ../en/ch09-hook.xml:1442 msgid "" "This information is not always known. If a hook is invoked in a repository " "that is being served via http or ssh, Mercurial cannot tell where the remote " @@ -12041,14 +12027,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1450 +#: ../en/ch09-hook.xml:1449 msgid "" "<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP " "address <literal>1.2.3.4</literal>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1455 +#: ../en/ch09-hook.xml:1454 msgid "" "<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP " "address <literal>1.2.3.4</literal>. If the client is using SSL, this will be " @@ -12056,24 +12042,24 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1462 +#: ../en/ch09-hook.xml:1461 msgid "Empty&emdash;no information could be discovered about the remote client." msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch09-hook.xml:1471 +#: ../en/ch09-hook.xml:1470 msgid "Hook reference" msgstr "钩子参考" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1474 +#: ../en/ch09-hook.xml:1473 msgid "" "<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets " "added" msgstr "<literal role=\"hook\">changegroup</literal>&emdash;增加远程修改集之后" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1477 +#: ../en/ch09-hook.xml:1476 msgid "" "This hook is run after a group of pre-existing changesets has been added to " "the repository, for example via a <command role=\"hg-cmd\">hg pull</command> " @@ -12084,7 +12070,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1487 +#: ../en/ch09-hook.xml:1486 msgid "" "Some possible uses for this hook include kicking off an automated build or " "test of the added changesets, updating a bug database, or notifying " @@ -12092,15 +12078,15 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1493 ../en/ch09-hook.xml:1533 ../en/ch09-hook.xml:1576 +#: ../en/ch09-hook.xml:1492 ../en/ch09-hook.xml:1532 ../en/ch09-hook.xml:1576 #: ../en/ch09-hook.xml:1618 ../en/ch09-hook.xml:1673 ../en/ch09-hook.xml:1713 -#: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1784 ../en/ch09-hook.xml:1846 -#: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1938 ../en/ch09-hook.xml:1966 +#: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1783 ../en/ch09-hook.xml:1846 +#: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1940 ../en/ch09-hook.xml:1967 msgid "Parameters to this hook:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1496 ../en/ch09-hook.xml:1849 +#: ../en/ch09-hook.xml:1495 ../en/ch09-hook.xml:1849 msgid "" "<literal>node</literal>: A changeset ID. The changeset ID of the first " "changeset in the group that was added. All changesets between this and " @@ -12110,70 +12096,69 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1505 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676 +#: ../en/ch09-hook.xml:1504 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676 #: ../en/ch09-hook.xml:1859 msgid "" -"<literal>source</literal>: A string. The source of these changes. See " -"section <xref linkend=\"sec.hook.sources\"/> for details." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1510 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639 -#: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1763 ../en/ch09-hook.xml:1864 +"<literal>source</literal>: A string. The source of these changes. See <xref " +"linkend=\"sec:hook:sources\"/> for details." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch09-hook.xml:1509 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639 +#: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1762 ../en/ch09-hook.xml:1864 msgid "" "<literal>url</literal>: A URL. The location of the remote repository, if " -"known. See section <xref linkend=\"sec.hook.url\"/> for more information." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1517 -msgid "" -"See also: <literal role=\"hook\">incoming</literal> (section <xref linkend=" -"\"sec.hook.incoming\"/>), <literal role=\"hook\">prechangegroup</literal> " -"(section <xref linkend=\"sec.hook.prechangegroup\"/>), <literal role=\"hook" -"\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." -"pretxnchangegroup\"/>)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1527 +"known. See <xref linkend=\"sec:hook:url\"/> for more information." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch09-hook.xml:1515 +msgid "" +"See also: <literal role=\"hook\">incoming</literal> (<xref linkend=\"sec:hook:" +"incoming\"/>), <literal role=\"hook\">prechangegroup</literal> (<xref linkend=" +"\"sec:hook:prechangegroup\"/>), <literal role=\"hook\">pretxnchangegroup</" +"literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch09-hook.xml:1526 msgid "" "<literal role=\"hook\">commit</literal>&emdash;after a new changeset is " "created" msgstr "<literal role=\"hook\">commit</literal>&emdash;创建新修改集之后" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1530 +#: ../en/ch09-hook.xml:1529 msgid "This hook is run after a new changeset has been created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1536 ../en/ch09-hook.xml:1907 +#: ../en/ch09-hook.xml:1535 ../en/ch09-hook.xml:1907 msgid "" "<literal>node</literal>: A changeset ID. The changeset ID of the newly " "committed changeset." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1540 ../en/ch09-hook.xml:1911 +#: ../en/ch09-hook.xml:1539 ../en/ch09-hook.xml:1911 msgid "" "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " "parent of the newly committed changeset." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1545 ../en/ch09-hook.xml:1916 +#: ../en/ch09-hook.xml:1544 ../en/ch09-hook.xml:1916 msgid "" "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " "parent of the newly committed changeset." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1551 -msgid "" -"See also: <literal role=\"hook\">precommit</literal> (section <xref linkend=" -"\"sec.hook.precommit\"/>), <literal role=\"hook\">pretxncommit</literal> " -"(section <xref linkend=\"sec.hook.pretxncommit\"/>)" +#: ../en/ch09-hook.xml:1550 +msgid "" +"See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" +"hook:precommit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref " +"linkend=\"sec:hook:pretxncommit\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12196,8 +12181,8 @@ #: ../en/ch09-hook.xml:1569 msgid "" "You can use this hook for the same purposes as the <literal role=\"hook" -"\">changegroup</literal> hook (section <xref linkend=\"sec.hook.changegroup\"/" -">); it's simply more convenient sometimes to run a hook once per group of " +"\">changegroup</literal> hook (<xref linkend=\"sec:hook:changegroup\"/>); " +"it's simply more convenient sometimes to run a hook once per group of " "changesets, while other times it's handier once per changeset." msgstr "" @@ -12208,13 +12193,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1595 -msgid "" -"See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" -"\"sec.hook.changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> " -"(section <xref linkend=\"sec.hook.prechangegroup\"/>), <literal role=\"hook" -"\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." -"pretxnchangegroup\"/>)" +#: ../en/ch09-hook.xml:1594 +msgid "" +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" +"hook:changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> (<xref " +"linkend=\"sec:hook:prechangegroup\"/>), <literal role=\"hook" +"\">pretxnchangegroup</literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/" +">)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12250,19 +12235,19 @@ #: ../en/ch09-hook.xml:1626 msgid "" "<literal>source</literal>: A string. The source of the of the operation (see " -"section <xref linkend=\"sec.hook.sources\"/>). If a remote client pulled " -"changes from this repository, <literal>source</literal> will be " -"<literal>serve</literal>. If the client that obtained changes from this " -"repository was local, <literal>source</literal> will be <literal>bundle</" -"literal>, <literal>pull</literal>, or <literal>push</literal>, depending on " -"the operation the client performed." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1646 -msgid "" -"See also: <literal role=\"hook\">preoutgoing</literal> (section <xref linkend=" -"\"sec.hook.preoutgoing\"/>)" +"<xref linkend=\"sec:hook:sources\"/>). If a remote client pulled changes " +"from this repository, <literal>source</literal> will be <literal>serve</" +"literal>. If the client that obtained changes from this repository was " +"local, <literal>source</literal> will be <literal>bundle</literal>, " +"<literal>pull</literal>, or <literal>push</literal>, depending on the " +"operation the client performed." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch09-hook.xml:1645 +msgid "" +"See also: <literal role=\"hook\">preoutgoing</literal> (<xref linkend=\"sec:" +"hook:preoutgoing\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12298,13 +12283,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1688 -msgid "" -"See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" -"\"sec.hook.changegroup\"/>), <literal role=\"hook\">incoming</literal> " -"(section <xref linkend=\"sec.hook.incoming\"/>), , <literal role=\"hook" -"\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." -"pretxnchangegroup\"/>)" +#: ../en/ch09-hook.xml:1687 +msgid "" +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" +"hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " +"linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">pretxnchangegroup</" +"literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12354,9 +12338,9 @@ #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch09-hook.xml:1730 msgid "" -"See also: <literal role=\"hook\">commit</literal> (section <xref linkend=" -"\"sec.hook.commit\"/>), <literal role=\"hook\">pretxncommit</literal> " -"(section <xref linkend=\"sec.hook.pretxncommit\"/>)" +"See also: <literal role=\"hook\">commit</literal> (<xref linkend=\"sec:hook:" +"commit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref linkend=" +"\"sec:hook:pretxncommit\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12384,35 +12368,34 @@ #: ../en/ch09-hook.xml:1752 msgid "" "<literal>source</literal>: A string. The source of the operation that is " -"attempting to obtain changes from this repository (see section <xref linkend=" -"\"sec.hook.sources\"/>). See the documentation for the <literal>source</" -"literal> parameter to the <literal role=\"hook\">outgoing</literal> hook, in " -"section <xref linkend=\"sec.hook.outgoing\"/>, for possible values of this " -"parameter." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1770 -msgid "" -"See also: <literal role=\"hook\">outgoing</literal> (section <xref linkend=" -"\"sec.hook.outgoing\"/>)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1776 +"attempting to obtain changes from this repository (see <xref linkend=\"sec:" +"hook:sources\"/>). See the documentation for the <literal>source</literal> " +"parameter to the <literal role=\"hook\">outgoing</literal> hook, in <xref " +"linkend=\"sec:hook:outgoing\"/>, for possible values of this parameter." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch09-hook.xml:1768 +msgid "" +"See also: <literal role=\"hook\">outgoing</literal> (<xref linkend=\"sec:hook:" +"outgoing\"/>)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch09-hook.xml:1775 msgid "" "<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset" msgstr "<literal role=\"hook\">pretag</literal>&emdash;创建标签之前" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1779 +#: ../en/ch09-hook.xml:1778 msgid "" "This controlling hook is run before a tag is created. If the hook succeeds, " "creation of the tag proceeds. If the hook fails, the tag is not created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1787 +#: ../en/ch09-hook.xml:1786 msgid "" "<literal>local</literal>: A boolean. Whether the tag is local to this " "repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</" @@ -12421,31 +12404,31 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1794 +#: ../en/ch09-hook.xml:1793 msgid "" "<literal>node</literal>: A changeset ID. The ID of the changeset to be " "tagged." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1798 +#: ../en/ch09-hook.xml:1797 msgid "<literal>tag</literal>: A string. The name of the tag to be created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1803 +#: ../en/ch09-hook.xml:1802 msgid "" "If the tag to be created is revision-controlled, the <literal role=\"hook" "\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> " -"hooks (sections <xref linkend=\"sec.hook.commit\"/> and <xref linkend=\"sec." -"hook.pretxncommit\"/>) will also be run." +"hooks (<xref linkend=\"sec:hook:commit\"/> and <xref linkend=\"sec:hook:" +"pretxncommit\"/>) will also be run." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch09-hook.xml:1810 msgid "" -"See also: <literal role=\"hook\">tag</literal> (section <xref linkend=\"sec." -"hook.tag\"/>)" +"See also: <literal role=\"hook\">tag</literal> (<xref linkend=\"sec:hook:tag" +"\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12493,13 +12476,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1871 -msgid "" -"See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" -"\"sec.hook.changegroup\"/>), <literal role=\"hook\">incoming</literal> " -"(section <xref linkend=\"sec.hook.incoming\"/>), <literal role=\"hook" -"\">prechangegroup</literal> (section <xref linkend=\"sec.hook.prechangegroup" -"\"/>)" +#: ../en/ch09-hook.xml:1870 +msgid "" +"See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:" +"hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref " +"linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">prechangegroup</" +"literal> (<xref linkend=\"sec:hook:prechangegroup\"/>)" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -12537,13 +12519,14 @@ #. type: Content of: <book><chapter><sect1><sect2><para> #: ../en/ch09-hook.xml:1922 -msgid "" -"See also: <literal role=\"hook\">precommit</literal> (section <xref linkend=" -"\"sec.hook.precommit\"/>)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1928 +#, fuzzy +msgid "" +"See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:" +"hook:precommit\"/>)" +msgstr "<literal role=\"hook\">precommit</literal>&emdash;提交修改集之前" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch09-hook.xml:1929 msgid "" "<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging " "working directory" @@ -12551,7 +12534,7 @@ "<literal role=\"hook\">preupdate</literal>&emdash;更新或合并工作目录之前" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1931 +#: ../en/ch09-hook.xml:1932 msgid "" "This controlling hook is run before an update or merge of the working " "directory begins. It is run only if Mercurial's normal pre-update checks " @@ -12560,40 +12543,40 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1941 -msgid "" -"<literal>parent1</literal>: A changeset ID. The ID of the parent that the " +#: ../en/ch09-hook.xml:1943 +msgid "" +"<literal>parent1</literal>: A changeset ID. The ID of the parent that the " "working directory is to be updated to. If the working directory is being " "merged, it will not change this parent." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1947 -msgid "" -"<literal>parent2</literal>: A changeset ID. Only set if the working " -"directory is being merged. The ID of the revision that the working directory " -"is being merged with." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1954 -msgid "" -"See also: <literal role=\"hook\">update</literal> (section <xref linkend=" -"\"sec.hook.update\"/>)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1960 +#: ../en/ch09-hook.xml:1949 +msgid "" +"<literal>parent2</literal>: A changeset ID. Only set if the working directory " +"is being merged. The ID of the revision that the working directory is being " +"merged with." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch09-hook.xml:1956 +msgid "" +"See also: <literal role=\"hook\">update</literal> (<xref linkend=\"sec:hook:" +"update\"/>)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch09-hook.xml:1961 msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset" msgstr "<literal role=\"hook\">tag</literal>&emdash;创建标签之后" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1963 +#: ../en/ch09-hook.xml:1964 msgid "This hook is run after a tag has been created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1969 +#: ../en/ch09-hook.xml:1970 msgid "" "<literal>local</literal>: A boolean. Whether the new tag is local to this " "repository instance (i.e. stored in <filename role=\"special\">.hg/" @@ -12602,41 +12585,42 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1977 +#: ../en/ch09-hook.xml:1978 msgid "" "<literal>node</literal>: A changeset ID. The ID of the changeset that was " "tagged." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:1981 +#: ../en/ch09-hook.xml:1982 msgid "<literal>tag</literal>: A string. The name of the tag that was created." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1986 +#: ../en/ch09-hook.xml:1987 msgid "" "If the created tag is revision-controlled, the <literal role=\"hook\">commit</" -"literal> hook (section <xref linkend=\"sec.hook.commit\"/>) is run before " +"literal> hook (section <xref linkend=\"sec:hook:commit\"/>) is run before " "this hook." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:1991 -msgid "" -"See also: <literal role=\"hook\">pretag</literal> (section <xref linkend=" -"\"sec.hook.pretag\"/>)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch09-hook.xml:1997 +#: ../en/ch09-hook.xml:1992 +#, fuzzy +msgid "" +"See also: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:" +"pretag\"/>)" +msgstr "<literal role=\"hook\">pretag</literal>&emdash;创建标签之前" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch09-hook.xml:1998 msgid "" "<literal role=\"hook\">update</literal>&emdash;after updating or merging " "working directory" msgstr "<literal role=\"hook\">update</literal>&emdash;更新或合并工作目录之后" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:2000 +#: ../en/ch09-hook.xml:2001 msgid "" "This hook is run after an update or merge of the working directory " "completes. Since a merge can fail (if the external <command>hgmerge</" @@ -12645,14 +12629,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:2008 +#: ../en/ch09-hook.xml:2009 msgid "" "<literal>error</literal>: A boolean. Indicates whether the update or merge " "completed successfully." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:2013 +#: ../en/ch09-hook.xml:2014 msgid "" "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " "working directory was updated to. If the working directory was merged, it " @@ -12660,7 +12644,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch09-hook.xml:2019 +#: ../en/ch09-hook.xml:2020 msgid "" "<literal>parent2</literal>: A changeset ID. Only set if the working " "directory was merged. The ID of the revision that the working directory was " @@ -12668,10 +12652,10 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch09-hook.xml:2025 -msgid "" -"See also: <literal role=\"hook\">preupdate</literal> (section <xref linkend=" -"\"sec.hook.preupdate\"/>)" +#: ../en/ch09-hook.xml:2026 +msgid "" +"See also: <literal role=\"hook\">preupdate</literal> (<xref linkend=\"sec:" +"hook:preupdate\"/>)" msgstr "" #. type: Content of: <book><chapter><title> @@ -12818,8 +12802,8 @@ "Notice that the template string above ends with the text <quote><literal>\\n</" "literal></quote>. This is an <emphasis>escape sequence</emphasis>, telling " "Mercurial to print a newline at the end of each template item. If you omit " -"this newline, Mercurial will run each piece of output together. See section " -"<xref linkend=\"sec.template.escape\"/> for more details of escape sequences." +"this newline, Mercurial will run each piece of output together. See <xref " +"linkend=\"sec:template:escape\"/> for more details of escape sequences." msgstr "" #. type: Content of: <book><chapter><sect1><para> @@ -12838,29 +12822,29 @@ "(<quote><literal>{</literal></quote> and <quote><literal>}</literal></" "quote>), it will try to replace the braces and text with the expansion of " "whatever is inside. To print a literal curly brace, you must escape it, as " -"described in section <xref linkend=\"sec.template.escape\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch10-template.xml:132 +"described in <xref linkend=\"sec:template:escape\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch10-template.xml:131 msgid "Common template keywords" msgstr "模版关键字" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:134 +#: ../en/ch10-template.xml:133 msgid "" "You can start writing simple templates immediately using the keywords below." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:138 +#: ../en/ch10-template.xml:137 msgid "" "<literal role=\"template-keyword\">author</literal>: String. The unmodified " "author of the changeset." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:142 +#: ../en/ch10-template.xml:141 msgid "" "<literal role=\"template-keyword\">branches</literal>: String. The name of " "the branch on which the changeset was committed. Will be empty if the branch " @@ -12868,96 +12852,95 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:148 +#: ../en/ch10-template.xml:147 msgid "" "<literal role=\"template-keyword\">date</literal>: Date information. The " "date when the changeset was committed. This is <emphasis>not</emphasis> " "human-readable; you must pass it through a filter that will render it " -"appropriately. See section <xref linkend=\"sec.template.filter\"/> for more " +"appropriately. See <xref linkend=\"sec:template:filter\"/> for more " "information on filters. The date is expressed as a pair of numbers. The " "first number is a Unix UTC timestamp (seconds since January 1, 1970); the " "second is the offset of the committer's timezone from UTC, in seconds." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:159 +#: ../en/ch10-template.xml:158 msgid "" "<literal role=\"template-keyword\">desc</literal>: String. The text of the " "changeset description." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:162 +#: ../en/ch10-template.xml:161 msgid "" "<literal role=\"template-keyword\">files</literal>: List of strings. All " "files modified, added, or removed by this changeset." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:167 +#: ../en/ch10-template.xml:166 msgid "" "<literal role=\"template-keyword\">file_adds</literal>: List of strings. " "Files added by this changeset." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:171 +#: ../en/ch10-template.xml:170 msgid "" "<literal role=\"template-keyword\">file_dels</literal>: List of strings. " "Files removed by this changeset." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:175 +#: ../en/ch10-template.xml:174 msgid "" "<literal role=\"template-keyword\">node</literal>: String. The changeset " "identification hash, as a 40-character hexadecimal string." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:179 +#: ../en/ch10-template.xml:178 msgid "" "<literal role=\"template-keyword\">parents</literal>: List of strings. The " "parents of the changeset." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:183 +#: ../en/ch10-template.xml:182 msgid "" "<literal role=\"template-keyword\">rev</literal>: Integer. The repository-" "local changeset revision number." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:187 +#: ../en/ch10-template.xml:186 msgid "" "<literal role=\"template-keyword\">tags</literal>: List of strings. Any tags " "associated with the changeset." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:192 +#: ../en/ch10-template.xml:191 msgid "" "A few simple experiments will show us what to expect when we use these " "keywords; you can see the results below." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:197 +#: ../en/ch10-template.xml:196 msgid "" "As we noted above, the date keyword does not produce human-readable output, " "so we must treat it specially. This involves using a <emphasis>filter</" -"emphasis>, about which more in section <xref linkend=\"sec.template.filter\"/" -">." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch10-template.xml:207 +"emphasis>, about which more in <xref linkend=\"sec:template:filter\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch10-template.xml:205 msgid "Escape sequences" msgstr "转义序列" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:209 +#: ../en/ch10-template.xml:207 msgid "" "Mercurial's templating engine recognises the most commonly used escape " "sequences in strings. When it sees a backslash (<quote><literal>\\</" @@ -12966,48 +12949,48 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:216 +#: ../en/ch10-template.xml:214 msgid "" "<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII " "134." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:220 +#: ../en/ch10-template.xml:218 msgid "<literal>\\n</literal>: Newline, ASCII 12." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:223 +#: ../en/ch10-template.xml:221 msgid "<literal>\\r</literal>: Carriage return, ASCII 15." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:226 +#: ../en/ch10-template.xml:224 msgid "<literal>\\t</literal>: Tab, ASCII 11." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:229 +#: ../en/ch10-template.xml:227 msgid "<literal>\\v</literal>: Vertical tab, ASCII 13." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:232 +#: ../en/ch10-template.xml:230 msgid "" "<literal>{</literal>: Open curly brace, <quote><literal>{</literal></quote>, " "ASCII 173." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:236 +#: ../en/ch10-template.xml:234 msgid "" "<literal>}</literal>: Close curly brace, <quote><literal>}</literal></quote>, " "ASCII 175." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:241 +#: ../en/ch10-template.xml:239 msgid "" "As indicated above, if you want the expansion of a template to contain a " "literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></" @@ -13015,12 +12998,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch10-template.xml:249 +#: ../en/ch10-template.xml:247 msgid "Filtering keywords to change their results" msgstr "通过过滤关键字来修改输出结果" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:251 +#: ../en/ch10-template.xml:249 msgid "" "Some of the results of template expansion are not immediately easy to use. " "Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> " @@ -13030,7 +13013,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:258 +#: ../en/ch10-template.xml:256 msgid "" "Below is a list of the most commonly used filters that Mercurial supports. " "While some filters can be applied to any text, others can only be used in " @@ -13039,7 +13022,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:265 +#: ../en/ch10-template.xml:263 msgid "" "<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML " "<quote><literal><br/></literal></quote> tag before the end of every " @@ -13048,7 +13031,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:272 +#: ../en/ch10-template.xml:270 msgid "" "<literal role=\"template-kw-filt-date\">age</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render the age of the date, " @@ -13057,7 +13040,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:279 +#: ../en/ch10-template.xml:277 msgid "" "<literal role=\"template-filter\">basename</literal>: Any text, but most " "useful for the <literal role=\"template-keyword\">files</literal> keyword and " @@ -13067,7 +13050,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:288 +#: ../en/ch10-template.xml:286 msgid "" "<literal role=\"template-kw-filt-date\">date</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render a date in a similar " @@ -13077,7 +13060,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:296 +#: ../en/ch10-template.xml:294 msgid "" "<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but " "most useful for the <literal role=\"template-keyword\">author</literal> " @@ -13088,7 +13071,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:306 +#: ../en/ch10-template.xml:304 msgid "" "<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most " "useful for the <literal role=\"template-keyword\">author</literal> keyword. " @@ -13098,7 +13081,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:315 +#: ../en/ch10-template.xml:313 msgid "" "<literal role=\"template-filter\">escape</literal>: Any text. Replace the " "special XML/XHTML characters <quote><literal>&</literal></quote>, " @@ -13107,7 +13090,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:323 +#: ../en/ch10-template.xml:321 msgid "" "<literal role=\"template-filter\">fill68</literal>: Any text. Wrap the text " "to fit in 68 columns. This is useful before you pass text through the " @@ -13116,21 +13099,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:331 +#: ../en/ch10-template.xml:329 msgid "" "<literal role=\"template-filter\">fill76</literal>: Any text. Wrap the text " "to fit in 76 columns." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:335 +#: ../en/ch10-template.xml:333 msgid "" "<literal role=\"template-filter\">firstline</literal>: Any text. Yield the " "first line of text, without any trailing newlines." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:340 +#: ../en/ch10-template.xml:338 msgid "" "<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render the date as a pair of " @@ -13139,7 +13122,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:347 +#: ../en/ch10-template.xml:345 msgid "" "<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render the date as a text " @@ -13148,7 +13131,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:354 +#: ../en/ch10-template.xml:352 msgid "" "<literal role=\"template-filter\">obfuscate</literal>: Any text, but most " "useful for the <literal role=\"template-keyword\">author</literal> keyword. " @@ -13157,7 +13140,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:362 +#: ../en/ch10-template.xml:360 msgid "" "<literal role=\"template-kw-filt-author\">person</literal>: Any text, but " "most useful for the <literal role=\"template-keyword\">author</literal> " @@ -13167,7 +13150,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:371 +#: ../en/ch10-template.xml:369 msgid "" "<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render a date using the same " @@ -13176,7 +13159,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:378 +#: ../en/ch10-template.xml:376 msgid "" "<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash. " "Yield the short form of a changeset hash, i.e. a 12-character hexadecimal " @@ -13184,7 +13167,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:383 +#: ../en/ch10-template.xml:381 msgid "" "<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role=" "\"template-keyword\">date</literal> keyword. Render the year, month, and day " @@ -13193,21 +13176,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:389 +#: ../en/ch10-template.xml:387 msgid "" "<literal role=\"template-filter\">strip</literal>: Any text. Strip all " "leading and trailing whitespace from the string." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:393 +#: ../en/ch10-template.xml:391 msgid "" "<literal role=\"template-filter\">tabindent</literal>: Any text. Yield the " "text, with every line except the first starting with a tab character." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:398 +#: ../en/ch10-template.xml:396 msgid "" "<literal role=\"template-filter\">urlescape</literal>: Any text. Escape all " "characters that are considered <quote>special</quote> by URL parsers. For " @@ -13215,7 +13198,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:405 +#: ../en/ch10-template.xml:403 msgid "" "<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most " "useful for the <literal role=\"template-keyword\">author</literal> keyword. " @@ -13225,7 +13208,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><note><para> -#: ../en/ch10-template.xml:418 +#: ../en/ch10-template.xml:416 msgid "" "If you try to apply a filter to a piece of data that it cannot process, " "Mercurial will fail and print a Python exception. For example, trying to run " @@ -13235,12 +13218,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:427 +#: ../en/ch10-template.xml:425 msgid "Combining filters" msgstr "组合过滤器" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:429 +#: ../en/ch10-template.xml:427 msgid "" "It is easy to combine filters to yield output in the form you would like. " "The following chain of filters tidies up a description, then makes sure that " @@ -13250,7 +13233,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:438 +#: ../en/ch10-template.xml:436 msgid "" "Note the use of <quote><literal>\\t</literal></quote> (a tab character) in " "the template to force the first line to be indented; this is necessary since " @@ -13259,7 +13242,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:444 +#: ../en/ch10-template.xml:442 msgid "" "Keep in mind that the order of filters in a chain is significant. The first " "filter is applied to the result of the keyword; the second to the result of " @@ -13269,12 +13252,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch10-template.xml:455 +#: ../en/ch10-template.xml:453 msgid "From templates to styles" msgstr "从模版到样式" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:457 +#: ../en/ch10-template.xml:455 msgid "" "A command line template provides a quick and simple way to format some " "output. Templates can become verbose, though, and it's useful to be able to " @@ -13283,7 +13266,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:462 +#: ../en/ch10-template.xml:460 msgid "" "More than that, using a style file unlocks the power of Mercurial's " "templating engine in ways that are not possible using the command line " @@ -13291,49 +13274,49 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:468 +#: ../en/ch10-template.xml:466 msgid "The simplest of style files" msgstr "最简单的样式文件" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:470 +#: ../en/ch10-template.xml:468 msgid "Our simple style file contains just one line:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:474 +#: ../en/ch10-template.xml:472 msgid "" "This tells Mercurial, <quote>if you're printing a changeset, use the text on " "the right as the template</quote>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:480 +#: ../en/ch10-template.xml:478 msgid "Style file syntax" msgstr "样式文件语法" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:482 +#: ../en/ch10-template.xml:480 msgid "The syntax rules for a style file are simple." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:485 +#: ../en/ch10-template.xml:483 msgid "The file is processed one line at a time." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:488 +#: ../en/ch10-template.xml:486 msgid "Leading and trailing white space are ignored." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> +#: ../en/ch10-template.xml:489 +msgid "Empty lines are skipped." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> #: ../en/ch10-template.xml:491 -msgid "Empty lines are skipped." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:493 msgid "" "If a line starts with either of the characters <quote><literal>#</literal></" "quote> or <quote><literal>;</literal></quote>, the entire line is treated as " @@ -13341,7 +13324,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:498 +#: ../en/ch10-template.xml:496 msgid "" "A line starts with a keyword. This must start with an alphabetic character " "or underscore, and can subsequently contain any alphanumeric character or " @@ -13350,21 +13333,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:504 +#: ../en/ch10-template.xml:502 msgid "" "The next element must be an <quote><literal>=</literal></quote> character, " "which can be preceded or followed by an arbitrary amount of white space." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:509 +#: ../en/ch10-template.xml:507 msgid "" "If the rest of the line starts and ends with matching quote characters " "(either single or double quote), it is treated as a template body." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:513 +#: ../en/ch10-template.xml:511 msgid "" "If the rest of the line <emphasis>does not</emphasis> start with a quote " "character, it is treated as the name of a file; the contents of this file " @@ -13372,12 +13355,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch10-template.xml:522 +#: ../en/ch10-template.xml:520 msgid "Style files by example" msgstr "样式文件例子" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch10-template.xml:524 +#: ../en/ch10-template.xml:522 msgid "" "To illustrate how to write a style file, we will construct a few by example. " "Rather than provide a complete style file and walk through it, we'll mirror " @@ -13386,12 +13369,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:531 +#: ../en/ch10-template.xml:529 msgid "Identifying mistakes in style files" msgstr "在样式文件中定位错误" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:533 +#: ../en/ch10-template.xml:531 msgid "" "If Mercurial encounters a problem in a style file you are working on, it " "prints a terse error message that, once you figure out what it means, is " @@ -13399,7 +13382,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:539 +#: ../en/ch10-template.xml:537 msgid "" "Notice that <filename>broken.style</filename> attempts to define a " "<literal>changeset</literal> keyword, but forgets to give any content for it. " @@ -13407,35 +13390,35 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:546 +#: ../en/ch10-template.xml:544 msgid "This error message looks intimidating, but it is not too hard to follow." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:550 +#: ../en/ch10-template.xml:548 msgid "" "The first component is simply Mercurial's way of saying <quote>I am giving " "up</quote>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:554 +#: ../en/ch10-template.xml:552 msgid "Next comes the name of the style file that contains the error." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:558 +#: ../en/ch10-template.xml:556 msgid "" "Following the file name is the line number where the error was encountered." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:562 +#: ../en/ch10-template.xml:560 msgid "Finally, a description of what went wrong." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:566 +#: ../en/ch10-template.xml:564 msgid "" "The description of the problem is not always clear (as in this case), but " "even when it is cryptic, it is almost always trivial to visually inspect the " @@ -13443,12 +13426,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:574 +#: ../en/ch10-template.xml:572 msgid "Uniquely identifying a repository" msgstr "版本库的唯一标识" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:576 +#: ../en/ch10-template.xml:574 msgid "" "If you would like to be able to identify a Mercurial repository <quote>fairly " "uniquely</quote> using a short string as an identifier, you can use the first " @@ -13456,21 +13439,21 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:583 +#: ../en/ch10-template.xml:581 msgid "" "This is not guaranteed to be unique, but it is nevertheless useful in many " "cases." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:586 +#: ../en/ch10-template.xml:584 msgid "" "It will not work in a completely empty repository, because such a repository " "does not have a revision zero." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:590 +#: ../en/ch10-template.xml:588 msgid "" "Neither will it work in the (extremely rare) case where a repository is a " "merge of two or more formerly independent repositories, and you still have " @@ -13478,18 +13461,18 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:595 +#: ../en/ch10-template.xml:593 msgid "Here are some uses to which you could put this identifier:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:598 +#: ../en/ch10-template.xml:596 msgid "" "As a key into a table for a database that manages repositories on a server." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:601 +#: ../en/ch10-template.xml:599 msgid "" "As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</" "emphasis>} tuple. Save this information away when you run an automated build " @@ -13498,13 +13481,13 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch10-template.xml:610 +#: ../en/ch10-template.xml:608 msgid "Mimicking Subversion's output" msgstr "模仿 Subversion 的输出" # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:612 +#: ../en/ch10-template.xml:610 msgid "" "Let's try to emulate the default output format used by another revision " "control tool, Subversion." @@ -13512,7 +13495,7 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:617 +#: ../en/ch10-template.xml:615 msgid "" "Since Subversion's output style is fairly simple, it is easy to copy-and-" "paste a hunk of its output into a file, and replace the text produced above " @@ -13520,14 +13503,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:624 +#: ../en/ch10-template.xml:622 msgid "" "There are a few small ways in which this template deviates from the output " "produced by Subversion." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:627 +#: ../en/ch10-template.xml:625 msgid "" "Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 " "Sep 2006</literal></quote> in the example output above) in parentheses. " @@ -13536,7 +13519,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:634 +#: ../en/ch10-template.xml:632 msgid "" "We emulate Subversion's printing of <quote>separator</quote> lines full of " "<quote><literal>-</literal></quote> characters by ending the template with " @@ -13546,7 +13529,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch10-template.xml:643 +#: ../en/ch10-template.xml:641 msgid "" "Subversion's output includes a count in the header of the number of lines in " "the commit message. We cannot replicate this in Mercurial; the templating " @@ -13556,7 +13539,7 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:649 +#: ../en/ch10-template.xml:647 msgid "" "It took me no more than a minute or two of work to replace literal text from " "an example of Subversion's output with some keywords and filters to give the " @@ -13564,7 +13547,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch10-template.xml:656 +#: ../en/ch10-template.xml:654 msgid "" "We could have included the text of the template file directly in the style " "file by enclosing it in quotes and replacing the newlines with " @@ -13629,13 +13612,13 @@ msgid "" "When you have few changes to maintain, it is easy to manage a single patch " "using the standard <command>diff</command> and <command>patch</command> " -"programs (see section <xref linkend=\"sec.mq.patch\"/> for a discussion of " -"these tools). Once the number of changes grows, it starts to make sense to " -"maintain patches as discrete <quote>chunks of work,</quote> so that for " -"example a single patch will contain only one bug fix (the patch might modify " -"several files, but it's doing <quote>only one thing</quote>), and you may " -"have a number of such patches for different bugs you need fixed and local " -"changes you require. In this situation, if you submit a bug fix patch to the " +"programs (see <xref linkend=\"sec:mq:patch\"/> for a discussion of these " +"tools). Once the number of changes grows, it starts to make sense to maintain " +"patches as discrete <quote>chunks of work,</quote> so that for example a " +"single patch will contain only one bug fix (the patch might modify several " +"files, but it's doing <quote>only one thing</quote>), and you may have a " +"number of such patches for different bugs you need fixed and local changes " +"you require. In this situation, if you submit a bug fix patch to the " "upstream maintainers of a package and they include your fix in a subsequent " "release, you can simply drop that single patch when you're updating to the " "newer release." @@ -13905,9 +13888,9 @@ #. type: Content of: <book><chapter><sect1><para> #: ../en/ch11-mq.xml:243 msgid "" -"We will return to some of the more subtle aspects of patches later (in " -"section <xref linkend=\"sec.mq.adv-patch\"/>), but you should have enough " -"information now to use MQ." +"We will return to some of the more subtle aspects of patches later (in <xref " +"linkend=\"sec:mq:adv-patch\"/>), but you should have enough information now " +"to use MQ." msgstr "" #. type: Content of: <book><chapter><sect1><title> @@ -14101,19 +14084,18 @@ "<command role=\"hg-ext-mq\">qpop</command> command. MQ still <emphasis>knows " "about</emphasis>, or manages, a popped patch, but the patch no longer has a " "corresponding changeset in the repository, and the working directory does not " -"contain the changes made by the patch. Figure <xref endterm=\"fig.mq.stack." -"caption\" linkend=\"fig.mq.stack\"/> illustrates the difference between " -"applied and tracked patches." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> -#: ../en/ch11-mq.xml:409 -msgid "<imageobject><imagedata fileref=\"images/mq-stack.png\"/></imageobject>" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> +"contain the changes made by the patch. <xref linkend=\"fig:mq:stack\"/> " +"illustrates the difference between applied and tracked patches." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><title> +#: ../en/ch11-mq.xml:408 +msgid "Applied and unapplied patches in the MQ patch stack" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject> #: ../en/ch11-mq.xml:411 -msgid "Applied and unapplied patches in the MQ patch stack" +msgid "<imageobject><imagedata fileref=\"figs/mq-stack.png\"/></imageobject>" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> @@ -14149,16 +14131,16 @@ "command> causes it to push all unapplied patches, while the <option role=\"hg-" "ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" "command> causes it to pop all applied patches. (For some more ways to push " -"and pop many patches, see section <xref linkend=\"sec.mq.perf\"/> below.)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:452 +"and pop many patches, see <xref linkend=\"sec:mq:perf\"/> below.)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><title> +#: ../en/ch11-mq.xml:451 msgid "Safety checks, and overriding them" msgstr "安全的检查,然后覆盖它们" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:454 +#: ../en/ch11-mq.xml:453 msgid "" "Several MQ commands check the working directory before they do anything, and " "fail if they find any modifications. They do this to ensure that you won't " @@ -14170,7 +14152,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:466 +#: ../en/ch11-mq.xml:465 msgid "" "Commands that check the working directory all take an <quote>I know what I'm " "doing</quote> option, which is always named <option>-f</option>. The exact " @@ -14184,12 +14166,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:481 +#: ../en/ch11-mq.xml:480 msgid "Working on several patches at once" msgstr "同时处理多个补丁" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:483 +#: ../en/ch11-mq.xml:482 msgid "" "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes " "the <emphasis>topmost</emphasis> applied patch. This means that you can " @@ -14198,7 +14180,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:490 +#: ../en/ch11-mq.xml:489 msgid "" "Here's an example that illustrates how you can use this ability. Let's say " "you're developing a new feature as two patches. The first is a change to the " @@ -14214,12 +14196,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:507 +#: ../en/ch11-mq.xml:506 msgid "More about patches" msgstr "关于补丁的更多信息" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:509 +#: ../en/ch11-mq.xml:508 msgid "" "MQ uses the GNU <command>patch</command> command to apply patches, so it's " "helpful to know a few more detailed aspects of how <command>patch</command> " @@ -14227,12 +14209,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:515 +#: ../en/ch11-mq.xml:514 msgid "The strip count" msgstr "修剪计数" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:517 +#: ../en/ch11-mq.xml:516 msgid "" "If you look at the file headers in a patch, you will notice that the " "pathnames usually have an extra component on the front that isn't present in " @@ -14242,7 +14224,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:524 +#: ../en/ch11-mq.xml:523 msgid "" "Alice would unpack a tarball, edit her files, then decide that she wanted to " "create a patch. So she'd rename her working directory, unpack the tarball " @@ -14256,7 +14238,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:537 +#: ../en/ch11-mq.xml:536 msgid "" "Since someone receiving a patch from the Alices of the net would be unlikely " "to have unmodified and modified directories with exactly the same names, the " @@ -14267,7 +14249,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:545 +#: ../en/ch11-mq.xml:544 msgid "" "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip " "count of one</quote>. If <command>patch</command> sees a file name " @@ -14281,7 +14263,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:558 +#: ../en/ch11-mq.xml:557 msgid "" "The <quote>standard</quote> strip count for patches is one; almost all " "patches contain one leading path name component that needs to be stripped. " @@ -14291,7 +14273,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:566 +#: ../en/ch11-mq.xml:565 msgid "" "If you receive a patch from someone that you want to add to your patch queue, " "and the patch needs a strip count other than one, you cannot just <command " @@ -14308,12 +14290,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:585 +#: ../en/ch11-mq.xml:584 msgid "Strategies for applying a patch" msgstr "应用补丁的策略" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:587 +#: ../en/ch11-mq.xml:586 msgid "" "When <command>patch</command> applies a hunk, it tries a handful of " "successively less accurate strategies to try to make the hunk apply. This " @@ -14323,7 +14305,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:594 +#: ../en/ch11-mq.xml:593 msgid "" "First, <command>patch</command> tries an exact match, where the line numbers, " "the context, and the text to be modified must apply exactly. If it cannot " @@ -14334,7 +14316,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:603 +#: ../en/ch11-mq.xml:602 msgid "" "If a context-only match fails, <command>patch</command> removes the first and " "last lines of the context, and tries a <emphasis>reduced</emphasis> context-" @@ -14345,7 +14327,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:612 +#: ../en/ch11-mq.xml:611 msgid "" "When neither of these techniques works, <command>patch</command> prints a " "message saying that the hunk in question was rejected. It saves rejected " @@ -14362,33 +14344,33 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:630 +#: ../en/ch11-mq.xml:629 msgid "Some quirks of patch representation" msgstr "补丁的一些特性" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:632 +#: ../en/ch11-mq.xml:631 msgid "" "There are a few useful things to know about how <command>patch</command> " "works with files." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:635 +#: ../en/ch11-mq.xml:634 msgid "" "This should already be obvious, but <command>patch</command> cannot handle " "binary files." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:639 +#: ../en/ch11-mq.xml:638 msgid "" "Neither does it care about the executable bit; it creates new files as " "readable, but not executable." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:643 +#: ../en/ch11-mq.xml:642 msgid "" "<command>patch</command> treats the removal of a file as a diff between the " "file to be removed and the empty file. So your idea of <quote>I deleted this " @@ -14397,7 +14379,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:649 +#: ../en/ch11-mq.xml:648 msgid "" "It treats the addition of a file as a diff between the empty file and the " "file to be added. So in a patch, your idea of <quote>I added this file</" @@ -14405,7 +14387,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:655 +#: ../en/ch11-mq.xml:654 msgid "" "It treats a renamed file as the removal of the old name, and the addition of " "the new name. This means that renamed files have a big footprint in " @@ -14414,7 +14396,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:661 +#: ../en/ch11-mq.xml:660 msgid "" "<command>patch</command> cannot represent empty files, so you cannot use a " "patch to represent the notion <quote>I added this empty file to the tree</" @@ -14422,12 +14404,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:668 +#: ../en/ch11-mq.xml:667 msgid "Beware the fuzz" msgstr "当心毛刺" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:670 +#: ../en/ch11-mq.xml:669 msgid "" "While applying a hunk at an offset, or with a fuzz factor, will often be " "completely successful, these inexact techniques naturally leave open the " @@ -14439,7 +14421,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:680 +#: ../en/ch11-mq.xml:679 msgid "" "It's often a good idea to refresh a patch that has applied with an offset or " "fuzz factor; refreshing the patch generates new context information that will " @@ -14452,12 +14434,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:693 +#: ../en/ch11-mq.xml:692 msgid "Handling rejection" msgstr "处理拒绝" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:695 +#: ../en/ch11-mq.xml:694 msgid "" "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it " "will print an error message and exit. If it has left <filename role=\"special" @@ -14466,16 +14448,15 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:701 +#: ../en/ch11-mq.xml:700 msgid "" "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does " "because you've changed the underlying code that your patches are based on, " -"Mercurial Queues can help; see section <xref linkend=\"sec.mq.merge\"/> for " -"details." -msgstr "" - -#. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:707 +"Mercurial Queues can help; see <xref linkend=\"sec:mq:merge\"/> for details." +msgstr "" + +#. type: Content of: <book><chapter><sect1><sect2><para> +#: ../en/ch11-mq.xml:705 msgid "" "Unfortunately, there aren't any great techniques for dealing with rejected " "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</" @@ -14483,7 +14464,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:712 +#: ../en/ch11-mq.xml:710 msgid "" "If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a " "tool called <command>wiggle</command> <citation>web:wiggle</citation>, which " @@ -14492,7 +14473,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:718 +#: ../en/ch11-mq.xml:716 msgid "" "Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), " "wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</" @@ -14502,31 +14483,31 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:727 +#: ../en/ch11-mq.xml:725 msgid "The context in the middle of a hunk has changed." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:730 +#: ../en/ch11-mq.xml:728 msgid "A hunk is missing some context at the beginning or end." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:733 +#: ../en/ch11-mq.xml:731 msgid "" "A large hunk might apply better&emdash;either entirely or in part&emdash;if " "it was broken up into smaller hunks." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:737 +#: ../en/ch11-mq.xml:735 msgid "" "A hunk removes lines with slightly different content than those currently " "present in the file." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:741 +#: ../en/ch11-mq.xml:739 msgid "" "If you use <command>wiggle</command> or <command>mpatch</command>, you should " "be doubly careful to check your results when you're done. In fact, " @@ -14536,12 +14517,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:753 +#: ../en/ch11-mq.xml:751 msgid "Getting the best performance out of MQ" msgstr "MQ 的性能" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:755 +#: ../en/ch11-mq.xml:753 msgid "" "MQ is very efficient at handling a large number of patches. I ran some " "performance experiments in mid-2006 for a talk that I gave at the 2006 " @@ -14552,7 +14533,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:764 +#: ../en/ch11-mq.xml:762 msgid "" "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " @@ -14564,14 +14545,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:775 +#: ../en/ch11-mq.xml:773 msgid "" "Clearly, MQ is well suited to working in large trees, but there are a few " "tricks you can use to get the best performance of it." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:779 +#: ../en/ch11-mq.xml:777 msgid "" "First of all, try to <quote>batch</quote> operations together. Every time " "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-" @@ -14583,7 +14564,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:790 +#: ../en/ch11-mq.xml:788 msgid "" "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq" "\">qpop</command> commands allow you to push and pop multiple patches at a " @@ -14595,7 +14576,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:800 +#: ../en/ch11-mq.xml:798 msgid "" "You can identify a destination patch using either the name of the patch, or " "by number. If you use numeric addressing, patches are counted from zero; " @@ -14603,12 +14584,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:807 +#: ../en/ch11-mq.xml:805 msgid "Updating your patches when the underlying code changes" msgstr "当基础代码改变时,更新补丁的方法" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:810 +#: ../en/ch11-mq.xml:808 msgid "" "It's common to have a stack of patches on top of an underlying repository " "that you don't modify directly. If you're working on changes to third-party " @@ -14619,7 +14600,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:819 +#: ../en/ch11-mq.xml:817 msgid "" "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option " "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " @@ -14633,7 +14614,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:831 +#: ../en/ch11-mq.xml:829 msgid "" "This approach is easy to use and works well if you don't expect changes to " "the underlying code to affect how well your patches apply. If your patch " @@ -14643,7 +14624,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:838 +#: ../en/ch11-mq.xml:836 msgid "" "It's possible to partially automate the rebasing process. If your patches " "apply cleanly against some revision of the underlying repo, MQ can use this " @@ -14652,19 +14633,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:844 +#: ../en/ch11-mq.xml:842 msgid "The process is a little involved." msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> -#: ../en/ch11-mq.xml:846 +#: ../en/ch11-mq.xml:844 msgid "" "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches " "on top of the revision where you know that they apply cleanly." msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> -#: ../en/ch11-mq.xml:850 +#: ../en/ch11-mq.xml:848 msgid "" "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg " "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role=" @@ -14679,7 +14660,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> -#: ../en/ch11-mq.xml:864 +#: ../en/ch11-mq.xml:862 msgid "" "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the " "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</" @@ -14687,7 +14668,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> -#: ../en/ch11-mq.xml:869 +#: ../en/ch11-mq.xml:867 msgid "" "Update to the new tip revision, using <command role=\"hg-cmd\">hg update " "<option role=\"hg-opt-update\">-C</option></command> to override the patches " @@ -14695,7 +14676,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> -#: ../en/ch11-mq.xml:874 +#: ../en/ch11-mq.xml:872 msgid "" "Merge all patches using <command>hg qpush -m -a</command>. The <option role=" "\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq" @@ -14704,7 +14685,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:882 +#: ../en/ch11-mq.xml:880 msgid "" "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-" "qpush-opt\">hg -m</option></command>, each patch in the <filename role=" @@ -14716,14 +14697,14 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:892 +#: ../en/ch11-mq.xml:890 msgid "" "When you finish resolving the effects of a patch, MQ refreshes your patch " "based on the result of the merge." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:895 +#: ../en/ch11-mq.xml:893 msgid "" "At the end of this process, your repository will have one extra head from the " "old patch queue, and a copy of the old patch queue will be in <filename role=" @@ -14735,12 +14716,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:907 +#: ../en/ch11-mq.xml:905 msgid "Identifying patches" msgstr "标识补丁" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:909 +#: ../en/ch11-mq.xml:907 msgid "" "MQ commands that work with patches let you refer to a patch either by using " "its name or by a number. By name is obvious enough; pass the name " @@ -14750,7 +14731,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:916 +#: ../en/ch11-mq.xml:914 msgid "" "As a shortcut, you can refer to a patch using both a name and a numeric " "offset; <literal>foo.patch-2</literal> means <quote>two patches before " @@ -14759,7 +14740,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:922 +#: ../en/ch11-mq.xml:920 msgid "" "Referring to a patch by index isn't much different. The first patch printed " "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero " @@ -14768,7 +14749,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:928 +#: ../en/ch11-mq.xml:926 msgid "" "MQ also makes it easy to work with patches when you are using normal " "Mercurial commands. Every command that accepts a changeset ID will also " @@ -14780,33 +14761,33 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:938 +#: ../en/ch11-mq.xml:936 msgid "" "These additions to Mercurial's normal tagging capabilities make dealing with " "patches even more of a breeze." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:941 +#: ../en/ch11-mq.xml:939 msgid "Want to patchbomb a mailing list with your latest series of changes?" msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:944 -msgid "" -"(Don't know what <quote>patchbombing</quote> is? See section <xref linkend=" -"\"sec.hgext.patchbomb\"/>.)" -msgstr "" - -#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:947 +#: ../en/ch11-mq.xml:942 +msgid "" +"(Don't know what <quote>patchbombing</quote> is? See <xref linkend=\"sec:" +"hgext:patchbomb\"/>.)" +msgstr "" + +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> +#: ../en/ch11-mq.xml:945 msgid "" "Need to see all of the patches since <literal>foo.patch</literal> that have " "touched files in a subdirectory of your tree?" msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:954 +#: ../en/ch11-mq.xml:952 msgid "" "Because MQ makes the names of patches available to the rest of Mercurial " "through its normal internal tag machinery, you don't need to type in the " @@ -14814,7 +14795,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:959 +#: ../en/ch11-mq.xml:957 msgid "" "Another nice consequence of representing patch names as tags is that when you " "run the <command role=\"hg-cmd\">hg log</command> command, it will display a " @@ -14825,30 +14806,29 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:972 +#: ../en/ch11-mq.xml:970 msgid "Useful things to know about" msgstr "其它需要了解的东西" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:974 +#: ../en/ch11-mq.xml:972 msgid "" "There are a number of aspects of MQ usage that don't fit tidily into sections " "of their own, but that are good to know. Here they are, in one place." msgstr "" #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:979 +#: ../en/ch11-mq.xml:977 msgid "" "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and " "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that " "represents the patch after the pop/push will have a <emphasis>different " "identity</emphasis> than the changeset that represented the hash beforehand. " -"See section <xref linkend=\"sec.mqref.cmd.qpush\"/> for information as to why " -"this is." -msgstr "" - -#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:988 +"See <xref linkend=\"sec:mqref:cmd:qpush\"/> for information as to why this is." +msgstr "" + +#. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> +#: ../en/ch11-mq.xml:986 msgid "" "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes " "from another branch with a patch changeset, at least if you want to maintain " @@ -14858,12 +14838,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:999 +#: ../en/ch11-mq.xml:997 msgid "Managing patches in a repository" msgstr "在版本库管理补丁" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1001 +#: ../en/ch11-mq.xml:999 msgid "" "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</" "filename> directory resides outside a Mercurial repository's working " @@ -14872,7 +14852,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1007 +#: ../en/ch11-mq.xml:1005 msgid "" "This presents the interesting possibility of managing the contents of the " "patch directory as a Mercurial repository in its own right. This can be a " @@ -14883,7 +14863,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1016 +#: ../en/ch11-mq.xml:1014 msgid "" "You can then share different versions of the same patch stack among multiple " "underlying repositories. I use this when I am developing a Linux kernel " @@ -14895,7 +14875,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1026 +#: ../en/ch11-mq.xml:1024 msgid "" "Managing patches in a repository makes it possible for multiple developers to " "work on the same patch series without colliding with each other, all on top " @@ -14903,12 +14883,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:1032 +#: ../en/ch11-mq.xml:1030 msgid "MQ support for patch repositories" msgstr "MQ 支持补丁版本库" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1034 +#: ../en/ch11-mq.xml:1032 msgid "" "MQ helps you to work with the <filename role=\"special\" class=\"directory\">." "hg/patches</filename> directory as a repository; when you prepare a " @@ -14919,7 +14899,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch11-mq.xml:1044 +#: ../en/ch11-mq.xml:1042 msgid "" "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" "option> option, you can simply go into the <filename role=\"special\" class=" @@ -14930,7 +14910,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><note><para> -#: ../en/ch11-mq.xml:1053 +#: ../en/ch11-mq.xml:1051 msgid "" "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt" "\">hg -c</option></command> does this for you automatically); you " @@ -14939,7 +14919,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1060 +#: ../en/ch11-mq.xml:1058 msgid "" "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/" "patches</filename> directory is a repository, it will automatically <command " @@ -14947,7 +14927,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1065 +#: ../en/ch11-mq.xml:1063 msgid "" "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</" "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the " @@ -14956,7 +14936,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1071 +#: ../en/ch11-mq.xml:1069 msgid "" "Finally, as a convenience to manage the patch directory, you can define the " "alias <command>mq</command> on Unix systems. For example, on Linux systems " @@ -14965,26 +14945,26 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1080 +#: ../en/ch11-mq.xml:1078 msgid "" "You can then issue commands of the form <command>mq pull</command> from the " "main repository." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:1085 +#: ../en/ch11-mq.xml:1083 msgid "A few things to watch out for" msgstr "需要注意的事情" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1087 +#: ../en/ch11-mq.xml:1085 msgid "" "MQ's support for working with a repository full of patches is limited in a " "few small respects." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1090 +#: ../en/ch11-mq.xml:1088 msgid "" "MQ cannot automatically detect changes that you make to the patch directory. " "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " @@ -14998,12 +14978,12 @@ msgstr "" #. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:1106 +#: ../en/ch11-mq.xml:1104 msgid "Third party tools for working with patches" msgstr "操作补丁的第三方工具" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1108 +#: ../en/ch11-mq.xml:1106 msgid "" "Once you've been working with patches for a while, you'll find yourself " "hungry for tools that will help you to understand and manipulate the patches " @@ -15011,7 +14991,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1112 +#: ../en/ch11-mq.xml:1110 msgid "" "The <command>diffstat</command> command <citation>web:diffstat</citation> " "generates a histogram of the modifications made to each file in a patch. It " @@ -15024,7 +15004,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1126 +#: ../en/ch11-mq.xml:1124 msgid "" "The <literal role=\"package\">patchutils</literal> package <citation>web:" "patchutils</citation> is invaluable. It provides a set of small utilities " @@ -15034,17 +15014,17 @@ "patch file. For example, given a patch that modifies hundreds of files " "across dozens of directories, a single invocation of <command>filterdiff</" "command> can generate a smaller patch that only touches files whose names " -"match a particular glob pattern. See section <xref linkend=\"mq-collab.tips." -"interdiff\"/> for another example." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:1142 +"match a particular glob pattern. See <xref linkend=\"mq-collab:tips:interdiff" +"\"/> for another example." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch11-mq.xml:1140 msgid "Good ways to work with patches" msgstr "操作补丁的好习惯" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1144 +#: ../en/ch11-mq.xml:1142 msgid "" "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 " @@ -15053,7 +15033,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1150 +#: ../en/ch11-mq.xml:1148 msgid "" "Give your patches descriptive names. A good name for a patch might be " "<filename>rework-device-alloc.patch</filename>, because it will immediately " @@ -15067,7 +15047,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1162 +#: ../en/ch11-mq.xml:1160 msgid "" "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq" "\">qtop</command> command and skim over the text of your patches " @@ -15080,28 +15060,28 @@ msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1172 +#: ../en/ch11-mq.xml:1170 msgid "" "For this reason, it is very much worth investing a little time to learn how " -"to use some of the third-party tools I described in section <xref linkend=" -"\"sec.mq.tools\"/>, particularly <command>diffstat</command> and " -"<command>filterdiff</command>. The former will give you a quick idea of what " -"changes your patch is making, while the latter makes it easy to splice hunks " -"selectively out of one patch and into another." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:1183 +"to use some of the third-party tools I described in <xref linkend=\"sec:mq:" +"tools\"/>, particularly <command>diffstat</command> and <command>filterdiff</" +"command>. The former will give you a quick idea of what changes your patch " +"is making, while the latter makes it easy to splice hunks selectively out of " +"one patch and into another." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch11-mq.xml:1181 msgid "MQ cookbook" msgstr "MQ 手册" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:1186 +#: ../en/ch11-mq.xml:1184 msgid "Manage <quote>trivial</quote> patches" msgstr "管理<quote>琐碎的</quote>补丁" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1188 +#: ../en/ch11-mq.xml:1186 msgid "" "Because the overhead of dropping files into a new Mercurial repository is so " "low, it makes a lot of sense to manage patches this way even if you simply " @@ -15110,26 +15090,26 @@ # #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1193 +#: ../en/ch11-mq.xml:1191 msgid "" "Begin by downloading and unpacking the source tarball, and turning it into a " "Mercurial repository." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1198 +#: ../en/ch11-mq.xml:1196 msgid "Continue by creating a patch stack and making your changes." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1203 +#: ../en/ch11-mq.xml:1201 msgid "" "Let's say a few weeks or months pass, and your package author releases a new " "version. First, bring their changes into the repository." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1209 +#: ../en/ch11-mq.xml:1207 msgid "" "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above " "deletes all files in the working directory, so that <command role=\"hg-cmd" @@ -15139,17 +15119,17 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1217 +#: ../en/ch11-mq.xml:1215 msgid "Finally, you can apply your patches on top of the new tree." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:1224 +#: ../en/ch11-mq.xml:1222 msgid "Combining entire patches" msgstr "组合全部的补丁" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1226 +#: ../en/ch11-mq.xml:1224 msgid "" "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets " "you combine entire patches. This <quote>folds</quote> the patches you name, " @@ -15159,7 +15139,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1234 +#: ../en/ch11-mq.xml:1232 msgid "" "The order in which you fold patches matters. If your topmost applied patch " "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</" @@ -15170,19 +15150,19 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> -#: ../en/ch11-mq.xml:1245 +#: ../en/ch11-mq.xml:1243 msgid "Merging part of one patch into another" msgstr "合并补丁的部分内容到其它补丁" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1247 +#: ../en/ch11-mq.xml:1245 msgid "" "Merging <emphasis>part</emphasis> of one patch into another is more difficult " "than combining entire patches." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1251 +#: ../en/ch11-mq.xml:1249 msgid "" "If you want to move changes to entire files, you can use <command>filterdiff</" "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role=" @@ -15196,7 +15176,7 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1264 +#: ../en/ch11-mq.xml:1262 msgid "" "If you have a patch that has multiple hunks modifying a file, and you only " "want to move a few of those hunks, the job becomes more messy, but you can " @@ -15205,32 +15185,32 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1272 +#: ../en/ch11-mq.xml:1270 msgid "This command prints three different kinds of number:" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:1275 +#: ../en/ch11-mq.xml:1273 msgid "" "(in the first column) a <emphasis>file number</emphasis> to identify each " "file modified in the patch;" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:1279 +#: ../en/ch11-mq.xml:1277 msgid "" "(on the next line, indented) the line number within a modified file where a " "hunk starts; and" msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> -#: ../en/ch11-mq.xml:1282 +#: ../en/ch11-mq.xml:1280 msgid "" "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1286 +#: ../en/ch11-mq.xml:1284 msgid "" "You'll have to use some visual inspection, and reading of the patch, to " "identify the file and hunk numbers you'll want, but you can then pass them to " @@ -15240,27 +15220,27 @@ msgstr "" #. type: Content of: <book><chapter><sect1><sect2><para> -#: ../en/ch11-mq.xml:1294 +#: ../en/ch11-mq.xml:1292 msgid "" "Once you have this hunk, you can concatenate it onto the end of your " -"destination patch and continue with the remainder of section <xref linkend=" -"\"sec.mq.combine\"/>." -msgstr "" - -#. type: Content of: <book><chapter><sect1><title> -#: ../en/ch11-mq.xml:1301 +"destination patch and continue with the remainder of <xref linkend=\"sec:mq:" +"combine\"/>." +msgstr "" + +#. type: Content of: <book><chapter><sect1><title> +#: ../en/ch11-mq.xml:1299 msgid "Differences between quilt and MQ" msgstr "MQ 与 quilt 的区别" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1303 +#: ../en/ch11-mq.xml:1301 msgid "" "If you are already familiar with quilt, MQ provides a similar command set. " "There are a few differences in the way that it works." msgstr "" #. type: Content of: <book><chapter><sect1><para> -#: ../en/ch11-mq.xml:1307 +#: ../en/ch11-mq.xml:1305 msgid "" "You will already have noticed that most quilt commands have MQ counterparts " "that simply begin with a <quote><literal>q</literal></quote>. The exceptions " @@ -15874,10 +15854,10 @@ #: ../en/ch12-mq-collab.xml:436 msgid "" "If you're developing a set of patches over a long time, it's a good idea to " -"maintain them in a repository, as discussed in section <xref linkend=\"sec.mq." -"repo\"/>. If you do so, you'll quickly discover that using the <command role=" -"\"hg-cmd\">hg diff</command> command to look at the history of changes to a " -"patch is unworkable. This is in part because you're looking at the second " +"maintain them in a repository, as discussed in <xref linkend=\"sec:mq:repo\"/" +">. If you do so, you'll quickly discover that using the <command role=\"hg-" +"cmd\">hg diff</command> command to look at the history of changes to a patch " +"is unworkable. This is in part because you're looking at the second " "derivative of the real code (a diff of a diff), but also because MQ adds " "noise to the process by modifying time stamps and directory names when it " "updates a patch." @@ -15960,7 +15940,7 @@ msgid "" "The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more " "than merely improving the presentation of MQ patches. To read more about it, " -"go to section <xref linkend=\"sec.hgext.extdiff\"/>." +"go to <xref linkend=\"sec:hgext:extdiff\"/>." msgstr "" #. type: Content of: <book><chapter><title> @@ -15989,30 +15969,29 @@ #. type: Content of: <book><chapter><itemizedlist><listitem><para> #: ../en/ch13-hgext.xml:18 msgid "" -"Section <xref linkend=\"sec.tour-merge.fetch\"/> covers the <literal role=" -"\"hg-ext\">fetch</literal> extension; this combines pulling new changes and " -"merging them with local changes into a single command, <command role=\"hg-ext-" -"fetch\">fetch</command>." +"<xref linkend=\"sec:tour-merge:fetch\"/> covers the <literal role=\"hg-ext" +"\">fetch</literal> extension; this combines pulling new changes and merging " +"them with local changes into a single command, <command role=\"hg-ext-fetch" +"\">fetch</command>." msgstr "" #. type: Content of: <book><chapter><itemizedlist><listitem><para> #: ../en/ch13-hgext.xml:24 msgid "" -"In chapter <xref linkend=\"chap.hook\"/>, we covered several extensions that " -"are useful for hook-related functionality: <literal role=\"hg-ext\">acl</" -"literal> adds access control lists; <literal role=\"hg-ext\">bugzilla</" -"literal> adds integration with the Bugzilla bug tracking system; and <literal " -"role=\"hg-ext\">notify</literal> sends notification emails on new changes." +"In <xref linkend=\"chap:hook\"/>, we covered several extensions that are " +"useful for hook-related functionality: <literal role=\"hg-ext\">acl</literal> " +"adds access control lists; <literal role=\"hg-ext\">bugzilla</literal> adds " +"integration with the Bugzilla bug tracking system; and <literal role=\"hg-ext" +"\">notify</literal> sends notification emails on new changes." msgstr "" #. type: Content of: <book><chapter><itemizedlist><listitem><para> #: ../en/ch13-hgext.xml:33 msgid "" "The Mercurial Queues patch management extension is so invaluable that it " -"merits two chapters and an appendix all to itself. Chapter <xref linkend=" -"\"chap.mq\"/> covers the basics; chapter <xref linkend=\"chap.mq-collab\"/> " -"discusses advanced topics; and appendix <xref linkend=\"chap.mqref\"/> goes " -"into detail on each command." +"merits two chapters and an appendix all to itself. <xref linkend=\"chap:mq\"/" +"> covers the basics; <xref linkend=\"chap:mq-collab\"/> discusses advanced " +"topics; and <xref linkend=\"chap:mqref\"/> goes into detail on each command." msgstr "" #. type: Content of: <book><chapter><para> @@ -16026,9 +16005,9 @@ #. type: Content of: <book><chapter><itemizedlist><listitem><para> #: ../en/ch13-hgext.xml:48 msgid "" -"In section <xref linkend=\"sec.hgext.inotify\"/>, we'll discuss the " -"possibility of <emphasis>huge</emphasis> performance improvements using the " -"<literal role=\"hg-ext\">inotify</literal> extension." +"In <xref linkend=\"sec:hgext:inotify\"/>, we'll discuss the possibility of " +"<emphasis>huge</emphasis> performance improvements using the <literal role=" +"\"hg-ext\">inotify</literal> extension." msgstr "" #. type: Content of: <book><chapter><sect1><title> @@ -16209,8 +16188,8 @@ #: ../en/ch13-hgext.xml:184 msgid "" "Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext" -"\">mq</literal>, enabled. If you've never used MQ, read section <xref " -"linkend=\"sec.mq.start\"/> to get started quickly." +"\">mq</literal>, enabled. If you've never used MQ, read <xref linkend=\"sec:" +"mq:start\"/> to get started quickly." msgstr "" #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> @@ -16420,8 +16399,8 @@ "If your diff viewing command can't deal with directories, you can easily work " "around this with a little scripting. For an example of such scripting in " "action with the <literal role=\"hg-ext\">mq</literal> extension and the " -"<command>interdiff</command> command, see section <xref linkend=\"mq-collab." -"tips.interdiff\"/>." +"<command>interdiff</command> command, see <xref linkend=\"mq-collab:tips:" +"interdiff\"/>." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><title> @@ -16622,10 +16601,10 @@ #. 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 section <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." +"The default behaviour 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." msgstr "" #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>