comparison po/zh.po @ 757:433040113eaf

Update file location in po files
author Dongsheng Song <songdongsheng@live.cn>
date Mon, 30 Mar 2009 21:37:52 +0800
parents 6b1577ef5135
children f7add9f718a8
comparison
equal deleted inserted replaced
756:1e020cb7d417 757:433040113eaf
39 # ... 39 # ...
40 # 40 #
41 msgid "" 41 msgid ""
42 msgstr "" 42 msgstr ""
43 "Project-Id-Version: hgbook 1.2\n" 43 "Project-Id-Version: hgbook 1.2\n"
44 "POT-Creation-Date: 2009-03-20 17:12+0800\n" 44 "POT-Creation-Date: 2009-03-30 21:36+0800\n"
45 "PO-Revision-Date: 2009-03-20 17:12+0800\n" 45 "PO-Revision-Date: 2009-03-20 17:12+0800\n"
46 "Last-Translator: \n" 46 "Last-Translator: \n"
47 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 47 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
48 "MIME-Version: 1.0\n" 48 "MIME-Version: 1.0\n"
49 "Content-Type: text/plain; charset=UTF-8\n" 49 "Content-Type: text/plain; charset=UTF-8\n"
82 "<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> " 82 "<editor> <firstname>Mike</firstname> <surname>Loukides</surname> </editor> "
83 "<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</" 83 "<copyright> <year>2006</year> <year>2007</year> <year>2008</year> <year>2009</"
84 "year> <holder>Bryan O'Sullivan</holder> </copyright>" 84 "year> <holder>Bryan O'Sullivan</holder> </copyright>"
85 85
86 #. type: Content of: <book><appendix><title> 86 #. type: Content of: <book><appendix><title>
87 #: ../en/appA-cmdref.xml:4 87 #: ../en/appA-cmdref.xml:5
88 msgid "Command reference" 88 msgid "Command reference"
89 msgstr "命令参考" 89 msgstr "命令参考"
90 90
91 #. type: Content of: <book><appendix><para> 91 #. type: Content of: <book><appendix><para>
92 #: ../en/appA-cmdref.xml:6 92 #: ../en/appA-cmdref.xml:7
93 msgid "" 93 msgid ""
94 "\\cmdref{add}{add files at the next commit} \\optref{add}{I}{include} \\optref" 94 "\\cmdref{add}{add files at the next commit} \\optref{add}{I}{include} \\optref"
95 "{add}{X}{exclude} \\optref{add}{n}{dry-run}" 95 "{add}{X}{exclude} \\optref{add}{n}{dry-run}"
96 msgstr "" 96 msgstr ""
97 97
98 #. type: Content of: <book><appendix><para> 98 #. type: Content of: <book><appendix><para>
99 #: ../en/appA-cmdref.xml:11 99 #: ../en/appA-cmdref.xml:12
100 msgid "\\cmdref{diff}{print changes in history or working directory}" 100 msgid "\\cmdref{diff}{print changes in history or working directory}"
101 msgstr "" 101 msgstr ""
102 102
103 #. type: Content of: <book><appendix><para> 103 #. type: Content of: <book><appendix><para>
104 #: ../en/appA-cmdref.xml:13 104 #: ../en/appA-cmdref.xml:14
105 msgid "" 105 msgid ""
106 "Show differences between revisions for the specified files or directories, " 106 "Show differences between revisions for the specified files or directories, "
107 "using the unified diff format. For a description of the unified diff format, " 107 "using the unified diff format. For a description of the unified diff format, "
108 "see section <xref linkend=\"sec.mq.patch\"/>." 108 "see <xref linkend=\"sec:mq:patch\"/>."
109 msgstr "" 109 msgstr ""
110 110
111 #. type: Content of: <book><appendix><para> 111 #. type: Content of: <book><appendix><para>
112 #: ../en/appA-cmdref.xml:17 112 #: ../en/appA-cmdref.xml:18
113 msgid "" 113 msgid ""
114 "By default, this command does not print diffs for files that Mercurial " 114 "By default, this command does not print diffs for files that Mercurial "
115 "considers to contain binary data. To control this behaviour, see the <option " 115 "considers to contain binary data. To control this behaviour, see the <option "
116 "role=\"hg-opt-diff\">-a</option> and <option role=\"hg-opt-diff\">--git</" 116 "role=\"hg-opt-diff\">-a</option> and <option role=\"hg-opt-diff\">--git</"
117 "option> options." 117 "option> options."
118 msgstr "" 118 msgstr ""
119 119
120 #. type: Content of: <book><appendix><sect2><title> 120 #. type: Content of: <book><appendix><sect2><title>
121 #: ../en/appA-cmdref.xml:22 121 #: ../en/appA-cmdref.xml:23
122 msgid "Options" 122 msgid "Options"
123 msgstr "选项" 123 msgstr "选项"
124 124
125 #. type: Content of: <book><appendix><sect2><para> 125 #. type: Content of: <book><appendix><sect2><para>
126 #: ../en/appA-cmdref.xml:24 126 #: ../en/appA-cmdref.xml:25
127 msgid "\\loptref{diff}{nodates}" 127 msgid "\\loptref{diff}{nodates}"
128 msgstr "" 128 msgstr ""
129 129
130 #. type: Content of: <book><appendix><sect2><para> 130 #. type: Content of: <book><appendix><sect2><para>
131 #: ../en/appA-cmdref.xml:26 131 #: ../en/appA-cmdref.xml:27
132 msgid "Omit date and time information when printing diff headers." 132 msgid "Omit date and time information when printing diff headers."
133 msgstr "" 133 msgstr ""
134 134
135 #. type: Content of: <book><appendix><sect2><para> 135 #. type: Content of: <book><appendix><sect2><para>
136 #: ../en/appA-cmdref.xml:28 136 #: ../en/appA-cmdref.xml:29
137 msgid "\\optref{diff}{B}{ignore-blank-lines}" 137 msgid "\\optref{diff}{B}{ignore-blank-lines}"
138 msgstr "" 138 msgstr ""
139 139
140 #. type: Content of: <book><appendix><sect2><para> 140 #. type: Content of: <book><appendix><sect2><para>
141 #: ../en/appA-cmdref.xml:30 141 #: ../en/appA-cmdref.xml:31
142 msgid "" 142 msgid ""
143 "Do not print changes that only insert or delete blank lines. A line that " 143 "Do not print changes that only insert or delete blank lines. A line that "
144 "contains only whitespace is not considered blank." 144 "contains only whitespace is not considered blank."
145 msgstr "" 145 msgstr ""
146 146
147 #. type: Content of: <book><appendix><sect2><para> 147 #. type: Content of: <book><appendix><sect2><para>
148 #: ../en/appA-cmdref.xml:34 148 #: ../en/appA-cmdref.xml:35
149 msgid "\\optref{diff}{I}{include}" 149 msgid "\\optref{diff}{I}{include}"
150 msgstr "" 150 msgstr ""
151 151
152 #. type: Content of: <book><appendix><sect2><para> 152 #. type: Content of: <book><appendix><sect2><para>
153 #: ../en/appA-cmdref.xml:37 153 #: ../en/appA-cmdref.xml:38
154 msgid "Include files and directories whose names match the given patterns." 154 msgid "Include files and directories whose names match the given patterns."
155 msgstr "" 155 msgstr ""
156 156
157 #. type: Content of: <book><appendix><sect2><para> 157 #. type: Content of: <book><appendix><sect2><para>
158 #: ../en/appA-cmdref.xml:40 158 #: ../en/appA-cmdref.xml:41
159 msgid "\\optref{diff}{X}{exclude}" 159 msgid "\\optref{diff}{X}{exclude}"
160 msgstr "" 160 msgstr ""
161 161
162 #. type: Content of: <book><appendix><sect2><para> 162 #. type: Content of: <book><appendix><sect2><para>
163 #: ../en/appA-cmdref.xml:43 163 #: ../en/appA-cmdref.xml:44
164 msgid "Exclude files and directories whose names match the given patterns." 164 msgid "Exclude files and directories whose names match the given patterns."
165 msgstr "" 165 msgstr ""
166 166
167 #. type: Content of: <book><appendix><sect2><para> 167 #. type: Content of: <book><appendix><sect2><para>
168 #: ../en/appA-cmdref.xml:46 168 #: ../en/appA-cmdref.xml:47
169 msgid "\\optref{diff}{a}{text}" 169 msgid "\\optref{diff}{a}{text}"
170 msgstr "" 170 msgstr ""
171 171
172 #. type: Content of: <book><appendix><sect2><para> 172 #. type: Content of: <book><appendix><sect2><para>
173 #: ../en/appA-cmdref.xml:49 173 #: ../en/appA-cmdref.xml:50
174 msgid "" 174 msgid ""
175 "If this option is not specified, <command role=\"hg-cmd\">hg diff</command> " 175 "If this option is not specified, <command role=\"hg-cmd\">hg diff</command> "
176 "will refuse to print diffs for files that it detects as binary. Specifying " 176 "will refuse to print diffs for files that it detects as binary. Specifying "
177 "<option role=\"hg-opt-diff\">-a</option> forces <command role=\"hg-cmd\">hg " 177 "<option role=\"hg-opt-diff\">-a</option> forces <command role=\"hg-cmd\">hg "
178 "diff</command> to treat all files as text, and generate diffs for all of them." 178 "diff</command> to treat all files as text, and generate diffs for all of them."
179 msgstr "" 179 msgstr ""
180 180
181 #. type: Content of: <book><appendix><sect2><para> 181 #. type: Content of: <book><appendix><sect2><para>
182 #: ../en/appA-cmdref.xml:55 182 #: ../en/appA-cmdref.xml:56
183 msgid "" 183 msgid ""
184 "This option is useful for files that are <quote>mostly text</quote> but have " 184 "This option is useful for files that are <quote>mostly text</quote> but have "
185 "a few embedded NUL characters. If you use it on files that contain a lot of " 185 "a few embedded NUL characters. If you use it on files that contain a lot of "
186 "binary data, its output will be incomprehensible." 186 "binary data, its output will be incomprehensible."
187 msgstr "" 187 msgstr ""
188 188
189 #. type: Content of: <book><appendix><sect2><para> 189 #. type: Content of: <book><appendix><sect2><para>
190 #: ../en/appA-cmdref.xml:60 190 #: ../en/appA-cmdref.xml:61
191 msgid "\\optref{diff}{b}{ignore-space-change}" 191 msgid "\\optref{diff}{b}{ignore-space-change}"
192 msgstr "" 192 msgstr ""
193 193
194 #. type: Content of: <book><appendix><sect2><para> 194 #. type: Content of: <book><appendix><sect2><para>
195 #: ../en/appA-cmdref.xml:63 195 #: ../en/appA-cmdref.xml:64
196 msgid "" 196 msgid ""
197 "Do not print a line if the only change to that line is in the amount of white " 197 "Do not print a line if the only change to that line is in the amount of white "
198 "space it contains." 198 "space it contains."
199 msgstr "" 199 msgstr ""
200 200
201 #. type: Content of: <book><appendix><sect2><para> 201 #. type: Content of: <book><appendix><sect2><para>
202 #: ../en/appA-cmdref.xml:67 202 #: ../en/appA-cmdref.xml:68
203 msgid "\\optref{diff}{g}{git}" 203 msgid "\\optref{diff}{g}{git}"
204 msgstr "" 204 msgstr ""
205 205
206 #. type: Content of: <book><appendix><sect2><para> 206 #. type: Content of: <book><appendix><sect2><para>
207 #: ../en/appA-cmdref.xml:70 207 #: ../en/appA-cmdref.xml:71
208 msgid "" 208 msgid ""
209 "Print <command>git</command>-compatible diffs. XXX reference a format " 209 "Print <command>git</command>-compatible diffs. XXX reference a format "
210 "description." 210 "description."
211 msgstr "" 211 msgstr ""
212 212
213 #. type: Content of: <book><appendix><sect2><para> 213 #. type: Content of: <book><appendix><sect2><para>
214 #: ../en/appA-cmdref.xml:74 214 #: ../en/appA-cmdref.xml:75
215 msgid "\\optref{diff}{p}{show-function}" 215 msgid "\\optref{diff}{p}{show-function}"
216 msgstr "" 216 msgstr ""
217 217
218 #. type: Content of: <book><appendix><sect2><para> 218 #. type: Content of: <book><appendix><sect2><para>
219 #: ../en/appA-cmdref.xml:77 219 #: ../en/appA-cmdref.xml:78
220 msgid "" 220 msgid ""
221 "Display the name of the enclosing function in a hunk header, using a simple " 221 "Display the name of the enclosing function in a hunk header, using a simple "
222 "heuristic. This functionality is enabled by default, so the <option role=" 222 "heuristic. This functionality is enabled by default, so the <option role="
223 "\"hg-opt-diff\">-p</option> option has no effect unless you change the value " 223 "\"hg-opt-diff\">-p</option> option has no effect unless you change the value "
224 "of the <envar role=\"rc-item-diff\">showfunc</envar> config item, as in the " 224 "of the <envar role=\"rc-item-diff\">showfunc</envar> config item, as in the "
225 "following example." 225 "following example."
226 msgstr "" 226 msgstr ""
227 227
228 #. type: Content of: <book><appendix><sect2><para> 228 #. type: Content of: <book><appendix><sect2><para>
229 #: ../en/appA-cmdref.xml:84 229 #: ../en/appA-cmdref.xml:85
230 msgid "\\optref{diff}{r}{rev}" 230 msgid "\\optref{diff}{r}{rev}"
231 msgstr "" 231 msgstr ""
232 232
233 #. type: Content of: <book><appendix><sect2><para> 233 #. type: Content of: <book><appendix><sect2><para>
234 #: ../en/appA-cmdref.xml:87 234 #: ../en/appA-cmdref.xml:88
235 msgid "" 235 msgid ""
236 "Specify one or more revisions to compare. The <command role=\"hg-cmd\">hg " 236 "Specify one or more revisions to compare. The <command role=\"hg-cmd\">hg "
237 "diff</command> command accepts up to two <option role=\"hg-opt-diff\">-r</" 237 "diff</command> command accepts up to two <option role=\"hg-opt-diff\">-r</"
238 "option> options to specify the revisions to compare." 238 "option> options to specify the revisions to compare."
239 msgstr "" 239 msgstr ""
240 240
241 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> 241 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para>
242 #: ../en/appA-cmdref.xml:93 242 #: ../en/appA-cmdref.xml:94
243 msgid "" 243 msgid ""
244 "Display the differences between the parent revision of the working directory " 244 "Display the differences between the parent revision of the working directory "
245 "and the working directory." 245 "and the working directory."
246 msgstr "" 246 msgstr ""
247 247
248 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> 248 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para>
249 #: ../en/appA-cmdref.xml:97 249 #: ../en/appA-cmdref.xml:98
250 msgid "" 250 msgid ""
251 "Display the differences between the specified changeset and the working " 251 "Display the differences between the specified changeset and the working "
252 "directory." 252 "directory."
253 msgstr "" 253 msgstr ""
254 254
255 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para> 255 #. type: Content of: <book><appendix><sect2><orderedlist><listitem><para>
256 #: ../en/appA-cmdref.xml:101 256 #: ../en/appA-cmdref.xml:102
257 msgid "Display the differences between the two specified changesets." 257 msgid "Display the differences between the two specified changesets."
258 msgstr "" 258 msgstr ""
259 259
260 #. type: Content of: <book><appendix><sect2><para> 260 #. type: Content of: <book><appendix><sect2><para>
261 #: ../en/appA-cmdref.xml:105 261 #: ../en/appA-cmdref.xml:106
262 msgid "" 262 msgid ""
263 "You can specify two revisions using either two <option role=\"hg-opt-diff\">-" 263 "You can specify two revisions using either two <option role=\"hg-opt-diff\">-"
264 "r</option> options or revision range notation. For example, the two revision " 264 "r</option> options or revision range notation. For example, the two revision "
265 "specifications below are equivalent." 265 "specifications below are equivalent."
266 msgstr "" 266 msgstr ""
267 267
268 #. type: Content of: <book><appendix><sect2><para> 268 #. type: Content of: <book><appendix><sect2><para>
269 #: ../en/appA-cmdref.xml:112 269 #: ../en/appA-cmdref.xml:113
270 msgid "" 270 msgid ""
271 "When you provide two revisions, Mercurial treats the order of those revisions " 271 "When you provide two revisions, Mercurial treats the order of those revisions "
272 "as significant. Thus, <command role=\"hg-cmd\">hg diff -r10:20</command> " 272 "as significant. Thus, <command role=\"hg-cmd\">hg diff -r10:20</command> "
273 "will produce a diff that will transform files from their contents as of " 273 "will produce a diff that will transform files from their contents as of "
274 "revision 10 to their contents as of revision 20, while <command role=\"hg-cmd" 274 "revision 10 to their contents as of revision 20, while <command role=\"hg-cmd"
277 "cannot reverse the ordering in this way if you are diffing against the " 277 "cannot reverse the ordering in this way if you are diffing against the "
278 "working directory." 278 "working directory."
279 msgstr "" 279 msgstr ""
280 280
281 #. type: Content of: <book><appendix><sect2><para> 281 #. type: Content of: <book><appendix><sect2><para>
282 #: ../en/appA-cmdref.xml:122 282 #: ../en/appA-cmdref.xml:123
283 msgid "\\optref{diff}{w}{ignore-all-space}" 283 msgid "\\optref{diff}{w}{ignore-all-space}"
284 msgstr "" 284 msgstr ""
285 285
286 #. type: Content of: <book><appendix><sect2><para> 286 #. type: Content of: <book><appendix><sect2><para>
287 #: ../en/appA-cmdref.xml:125 287 #: ../en/appA-cmdref.xml:126
288 msgid "\\cmdref{version}{print version and copyright information}" 288 msgid "\\cmdref{version}{print version and copyright information}"
289 msgstr "" 289 msgstr ""
290 290
291 #. type: Content of: <book><appendix><sect2><para> 291 #. type: Content of: <book><appendix><sect2><para>
292 #: ../en/appA-cmdref.xml:128 292 #: ../en/appA-cmdref.xml:129
293 msgid "" 293 msgid ""
294 "This command displays the version of Mercurial you are running, and its " 294 "This command displays the version of Mercurial you are running, and its "
295 "copyright license. There are four kinds of version string that you may see." 295 "copyright license. There are four kinds of version string that you may see."
296 msgstr "" 296 msgstr ""
297 297
298 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> 298 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para>
299 #: ../en/appA-cmdref.xml:133 299 #: ../en/appA-cmdref.xml:134
300 msgid "" 300 msgid ""
301 "The string <quote><literal>unknown</literal></quote>. This version of " 301 "The string <quote><literal>unknown</literal></quote>. This version of "
302 "Mercurial was not built in a Mercurial repository, and cannot determine its " 302 "Mercurial was not built in a Mercurial repository, and cannot determine its "
303 "own version." 303 "own version."
304 msgstr "" 304 msgstr ""
305 305
306 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> 306 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para>
307 #: ../en/appA-cmdref.xml:138 307 #: ../en/appA-cmdref.xml:139
308 msgid "" 308 msgid ""
309 "A short numeric string, such as <quote><literal>1.1</literal></quote>. This " 309 "A short numeric string, such as <quote><literal>1.1</literal></quote>. This "
310 "is a build of a revision of Mercurial that was identified by a specific tag " 310 "is a build of a revision of Mercurial that was identified by a specific tag "
311 "in the repository where it was built. (This doesn't necessarily mean that " 311 "in the repository where it was built. (This doesn't necessarily mean that "
312 "you're running an official release; someone else could have added that tag to " 312 "you're running an official release; someone else could have added that tag to "
313 "any revision in the repository where they built Mercurial.)" 313 "any revision in the repository where they built Mercurial.)"
314 msgstr "" 314 msgstr ""
315 315
316 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> 316 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para>
317 #: ../en/appA-cmdref.xml:146 317 #: ../en/appA-cmdref.xml:147
318 msgid "" 318 msgid ""
319 "A hexadecimal string, such as <quote><literal>875489e31abe</literal></" 319 "A hexadecimal string, such as <quote><literal>875489e31abe</literal></"
320 "quote>. This is a build of the given revision of Mercurial." 320 "quote>. This is a build of the given revision of Mercurial."
321 msgstr "" 321 msgstr ""
322 322
323 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para> 323 #. type: Content of: <book><appendix><sect2><itemizedlist><listitem><para>
324 #: ../en/appA-cmdref.xml:150 324 #: ../en/appA-cmdref.xml:151
325 msgid "" 325 msgid ""
326 "A hexadecimal string followed by a date, such as <quote><literal>875489e31abe" 326 "A hexadecimal string followed by a date, such as <quote><literal>875489e31abe"
327 "+20070205</literal></quote>. This is a build of the given revision of " 327 "+20070205</literal></quote>. This is a build of the given revision of "
328 "Mercurial, where the build repository contained some local changes that had " 328 "Mercurial, where the build repository contained some local changes that had "
329 "not been committed." 329 "not been committed."
330 msgstr "" 330 msgstr ""
331 331
332 #. type: Content of: <book><appendix><sect2><title> 332 #. type: Content of: <book><appendix><sect2><title>
333 #: ../en/appA-cmdref.xml:159 333 #: ../en/appA-cmdref.xml:160
334 msgid "Tips and tricks" 334 msgid "Tips and tricks"
335 msgstr "" 335 msgstr ""
336 336
337 #. type: Content of: <book><appendix><sect2><sect3><title> 337 #. type: Content of: <book><appendix><sect2><sect3><title>
338 #: ../en/appA-cmdref.xml:162 338 #: ../en/appA-cmdref.xml:163
339 msgid "" 339 msgid ""
340 "Why do the results of <command role=\"hg-cmd\">hg diff</command> and <command " 340 "Why do the results of <command role=\"hg-cmd\">hg diff</command> and <command "
341 "role=\"hg-cmd\">hg status</command> differ?" 341 "role=\"hg-cmd\">hg status</command> differ?"
342 msgstr "" 342 msgstr ""
343 "为什么 <command role=\"hg-cmd\">hg diff</command> 与 <command role=\"hg-cmd" 343 "为什么 <command role=\"hg-cmd\">hg diff</command> 与 <command role=\"hg-cmd"
344 "\">hg status</command> 的结果不同 ?" 344 "\">hg status</command> 的结果不同 ?"
345 345
346 #. type: Content of: <book><appendix><sect2><sect3><para> 346 #. type: Content of: <book><appendix><sect2><sect3><para>
347 #: ../en/appA-cmdref.xml:164 347 #: ../en/appA-cmdref.xml:165
348 msgid "" 348 msgid ""
349 "When you run the <command role=\"hg-cmd\">hg status</command> command, you'll " 349 "When you run the <command role=\"hg-cmd\">hg status</command> command, you'll "
350 "see a list of files that Mercurial will record changes for the next time you " 350 "see a list of files that Mercurial will record changes for the next time you "
351 "perform a commit. If you run the <command role=\"hg-cmd\">hg diff</command> " 351 "perform a commit. If you run the <command role=\"hg-cmd\">hg diff</command> "
352 "command, you may notice that it prints diffs for only a <emphasis>subset</" 352 "command, you may notice that it prints diffs for only a <emphasis>subset</"
353 "emphasis> of the files that <command role=\"hg-cmd\">hg status</command> " 353 "emphasis> of the files that <command role=\"hg-cmd\">hg status</command> "
354 "listed. There are two possible reasons for this." 354 "listed. There are two possible reasons for this."
355 msgstr "" 355 msgstr ""
356 356
357 #. type: Content of: <book><appendix><sect2><sect3><para> 357 #. type: Content of: <book><appendix><sect2><sect3><para>
358 #: ../en/appA-cmdref.xml:171 358 #: ../en/appA-cmdref.xml:172
359 msgid "" 359 msgid ""
360 "The first is that <command role=\"hg-cmd\">hg status</command> prints some " 360 "The first is that <command role=\"hg-cmd\">hg status</command> prints some "
361 "kinds of modifications that <command role=\"hg-cmd\">hg diff</command> " 361 "kinds of modifications that <command role=\"hg-cmd\">hg diff</command> "
362 "doesn't normally display. The <command role=\"hg-cmd\">hg diff</command> " 362 "doesn't normally display. The <command role=\"hg-cmd\">hg diff</command> "
363 "command normally outputs unified diffs, which don't have the ability to " 363 "command normally outputs unified diffs, which don't have the ability to "
365 "diffs can't represent a change in whether or not a file is executable, but " 365 "diffs can't represent a change in whether or not a file is executable, but "
366 "Mercurial records this information." 366 "Mercurial records this information."
367 msgstr "" 367 msgstr ""
368 368
369 #. type: Content of: <book><appendix><sect2><sect3><para> 369 #. type: Content of: <book><appendix><sect2><sect3><para>
370 #: ../en/appA-cmdref.xml:179 370 #: ../en/appA-cmdref.xml:180
371 msgid "" 371 msgid ""
372 "If you use the <option role=\"hg-opt-diff\">--git</option> option to <command " 372 "If you use the <option role=\"hg-opt-diff\">--git</option> option to <command "
373 "role=\"hg-cmd\">hg diff</command>, it will display <command>git</command>-" 373 "role=\"hg-cmd\">hg diff</command>, it will display <command>git</command>-"
374 "compatible diffs that <emphasis>can</emphasis> display this extra information." 374 "compatible diffs that <emphasis>can</emphasis> display this extra information."
375 msgstr "" 375 msgstr ""
376 376
377 #. type: Content of: <book><appendix><sect2><sect3><para> 377 #. type: Content of: <book><appendix><sect2><sect3><para>
378 #: ../en/appA-cmdref.xml:184 378 #: ../en/appA-cmdref.xml:185
379 msgid "" 379 msgid ""
380 "The second possible reason that <command role=\"hg-cmd\">hg diff</command> " 380 "The second possible reason that <command role=\"hg-cmd\">hg diff</command> "
381 "might be printing diffs for a subset of the files displayed by <command role=" 381 "might be printing diffs for a subset of the files displayed by <command role="
382 "\"hg-cmd\">hg status</command> is that if you invoke it without any " 382 "\"hg-cmd\">hg status</command> is that if you invoke it without any "
383 "arguments, <command role=\"hg-cmd\">hg diff</command> prints diffs against " 383 "arguments, <command role=\"hg-cmd\">hg diff</command> prints diffs against "
392 "specifying that parent with the <option role=\"hg-opt-diff\">-r</option> " 392 "specifying that parent with the <option role=\"hg-opt-diff\">-r</option> "
393 "option. There is no way to print diffs relative to both parents." 393 "option. There is no way to print diffs relative to both parents."
394 msgstr "" 394 msgstr ""
395 395
396 #. type: Content of: <book><appendix><sect2><sect3><title> 396 #. type: Content of: <book><appendix><sect2><sect3><title>
397 #: ../en/appA-cmdref.xml:200 397 #: ../en/appA-cmdref.xml:201
398 msgid "Generating safe binary diffs" 398 msgid "Generating safe binary diffs"
399 msgstr "生成安全的二进制差异" 399 msgstr "生成安全的二进制差异"
400 400
401 #. type: Content of: <book><appendix><sect2><sect3><para> 401 #. type: Content of: <book><appendix><sect2><sect3><para>
402 #: ../en/appA-cmdref.xml:202 402 #: ../en/appA-cmdref.xml:203
403 msgid "" 403 msgid ""
404 "If you use the <option role=\"hg-opt-diff\">-a</option> option to force " 404 "If you use the <option role=\"hg-opt-diff\">-a</option> option to force "
405 "Mercurial to print diffs of files that are either <quote>mostly text</quote> " 405 "Mercurial to print diffs of files that are either <quote>mostly text</quote> "
406 "or contain lots of binary data, those diffs cannot subsequently be applied by " 406 "or contain lots of binary data, those diffs cannot subsequently be applied by "
407 "either Mercurial's <command role=\"hg-cmd\">hg import</command> command or " 407 "either Mercurial's <command role=\"hg-cmd\">hg import</command> command or "
408 "the system's <command>patch</command> command." 408 "the system's <command>patch</command> command."
409 msgstr "" 409 msgstr ""
410 410
411 #. type: Content of: <book><appendix><sect2><sect3><para> 411 #. type: Content of: <book><appendix><sect2><sect3><para>
412 #: ../en/appA-cmdref.xml:209 412 #: ../en/appA-cmdref.xml:210
413 msgid "" 413 msgid ""
414 "If you want to generate a diff of a binary file that is safe to use as input " 414 "If you want to generate a diff of a binary file that is safe to use as input "
415 "for <command role=\"hg-cmd\">hg import</command>, use the <command role=\"hg-" 415 "for <command role=\"hg-cmd\">hg import</command>, use the <command role=\"hg-"
416 "cmd\">hg diff</command>{--git} option when you generate the patch. The " 416 "cmd\">hg diff</command>{--git} option when you generate the patch. The "
417 "system <command>patch</command> command cannot handle binary patches at all." 417 "system <command>patch</command> command cannot handle binary patches at all."
1316 1316
1317 #. type: Content of: <book><appendix><sect1><para> 1317 #. type: Content of: <book><appendix><sect1><para>
1318 #: ../en/appD-license.xml:33 1318 #: ../en/appD-license.xml:33
1319 msgid "" 1319 msgid ""
1320 "The reference must be immediately followed with any options elected by the " 1320 "The reference must be immediately followed with any options elected by the "
1321 "author(s) and/or publisher of the document (see section <xref linkend=\"sec." 1321 "author(s) and/or publisher of the document (see <xref linkend=\"sec:opl:"
1322 "opl.options\"/>)." 1322 "options\"/>)."
1323 msgstr "" 1323 msgstr ""
1324 1324
1325 #. type: Content of: <book><appendix><sect1><para> 1325 #. type: Content of: <book><appendix><sect1><para>
1326 #: ../en/appD-license.xml:37 1326 #: ../en/appD-license.xml:37
1327 msgid "" 1327 msgid ""
1605 msgid "" 1605 msgid ""
1606 "It can help you to recover from mistakes. If you make a change that later " 1606 "It can help you to recover from mistakes. If you make a change that later "
1607 "turns out to be in error, you can revert to an earlier version of one or more " 1607 "turns out to be in error, you can revert to an earlier version of one or more "
1608 "files. In fact, a <emphasis>really</emphasis> good revision control tool " 1608 "files. In fact, a <emphasis>really</emphasis> good revision control tool "
1609 "will even help you to efficiently figure out exactly when a problem was " 1609 "will even help you to efficiently figure out exactly when a problem was "
1610 "introduced (see section <xref linkend=\"sec.undo.bisect\"/> for details)." 1610 "introduced (see <xref linkend=\"sec:undo:bisect\"/> for details)."
1611 msgstr "" 1611 msgstr ""
1612 1612
1613 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para> 1613 #. type: Content of: <book><preface><sect1><sect2><itemizedlist><listitem><para>
1614 #: ../en/ch00-preface.xml:66 1614 #: ../en/ch00-preface.xml:66
1615 msgid "" 1615 msgid ""
1771 #. type: Content of: <book><preface><sect1><para> 1771 #. type: Content of: <book><preface><sect1><para>
1772 #: ../en/ch00-preface.xml:167 1772 #: ../en/ch00-preface.xml:167
1773 msgid "" 1773 msgid ""
1774 "As an instance of this, several consecutive commits in an example can show up " 1774 "As an instance of this, several consecutive commits in an example can show up "
1775 "as having occurred during the same second. You can see this occur in the " 1775 "as having occurred during the same second. You can see this occur in the "
1776 "<literal role=\"hg-ext\">bisect</literal> example in section <xref linkend=" 1776 "<literal role=\"hg-ext\">bisect</literal> example in <xref linkend=\"sec:undo:"
1777 "\"sec.undo.bisect\"/>, for instance." 1777 "bisect\"/>, for instance."
1778 msgstr "" 1778 msgstr ""
1779 1779
1780 #. type: Content of: <book><preface><sect1><para> 1780 #. type: Content of: <book><preface><sect1><para>
1781 #: ../en/ch00-preface.xml:173 1781 #: ../en/ch00-preface.xml:173
1782 msgid "" 1782 msgid ""
2905 msgstr "" 2905 msgstr ""
2906 2906
2907 #. type: Content of: <book><chapter><sect1><para> 2907 #. type: Content of: <book><chapter><sect1><para>
2908 #: ../en/ch01-tour-basic.xml:249 2908 #: ../en/ch01-tour-basic.xml:249
2909 msgid "" 2909 msgid ""
2910 "Figure <xref endterm=\"fig.tour-basic.history.caption\" linkend=\"fig.tour-" 2910 "<xref linkend=\"fig:tour-basic:history\"/> provides a graphical "
2911 "basic.history\"/> provides a graphical representation of the history of the " 2911 "representation of the history of the <filename class=\"directory\">hello</"
2912 "<filename class=\"directory\">hello</filename> repository, to make it a " 2912 "filename> repository, to make it a little easier to see which direction "
2913 "little easier to see which direction history is <quote>flowing</quote> in. " 2913 "history is <quote>flowing</quote> in. We'll be returning to this figure "
2914 "We'll be returning to this figure several times in this chapter and the " 2914 "several times in this chapter and the chapter that follows."
2915 "chapter that follows." 2915 msgstr ""
2916 msgstr "" 2916
2917 2917 #. type: Content of: <book><chapter><sect1><figure><title>
2918 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 2918 #: ../en/ch01-tour-basic.xml:258
2919 #: ../en/ch01-tour-basic.xml:260
2920 msgid ""
2921 "<imageobject><imagedata fileref=\"images/tour-history.png\"/></imageobject>"
2922 msgstr ""
2923
2924 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><textobject><phrase>
2925 #: ../en/ch01-tour-basic.xml:261 ../en/ch02-tour-merge.xml:48
2926 #: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:126
2927 #: ../en/ch02-tour-merge.xml:182 ../en/ch02-tour-merge.xml:254
2928 #: ../en/ch03-concepts.xml:56 ../en/ch03-concepts.xml:108
2929 #: ../en/ch03-concepts.xml:194 ../en/ch03-concepts.xml:301
2930 #: ../en/ch03-concepts.xml:353 ../en/ch03-concepts.xml:370
2931 #: ../en/ch03-concepts.xml:414 ../en/ch03-concepts.xml:436
2932 #: ../en/ch03-concepts.xml:480 ../en/ch05-collab.xml:277
2933 #: ../en/ch08-undo.xml:366 ../en/ch08-undo.xml:417 ../en/ch08-undo.xml:485
2934 #: ../en/ch08-undo.xml:527 ../en/ch11-mq.xml:410
2935 msgid "XXX add text"
2936 msgstr ""
2937
2938 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para>
2939 #: ../en/ch01-tour-basic.xml:262
2940 msgid "" 2919 msgid ""
2941 "Graphical history of the <filename class=\"directory\">hello</filename> " 2920 "Graphical history of the <filename class=\"directory\">hello</filename> "
2942 "repository" 2921 "repository"
2943 msgstr "" 2922 msgstr ""
2944 2923
2924 #. type: Content of: <book><chapter><sect1><figure>
2925 #: ../en/ch01-tour-basic.xml:260 ../en/ch02-tour-merge.xml:50
2926 #: ../en/ch02-tour-merge.xml:181 ../en/ch03-concepts.xml:293
2927 msgid "<placeholder type=\"mediaobject\" id=\"0\"/>"
2928 msgstr ""
2929
2930 #. type: Content of: <book><chapter><sect1><figure><mediaobject>
2931 #: ../en/ch01-tour-basic.xml:261
2932 msgid ""
2933 "<imageobject><imagedata fileref=\"figs/tour-history.png\"/></imageobject>"
2934 msgstr ""
2935
2936 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject><textobject><phrase>
2937 #: ../en/ch01-tour-basic.xml:262 ../en/ch02-tour-merge.xml:52
2938 #: ../en/ch02-tour-merge.xml:82 ../en/ch02-tour-merge.xml:129
2939 #: ../en/ch02-tour-merge.xml:183 ../en/ch02-tour-merge.xml:254
2940 #: ../en/ch03-concepts.xml:57 ../en/ch03-concepts.xml:106
2941 #: ../en/ch03-concepts.xml:191 ../en/ch03-concepts.xml:295
2942 #: ../en/ch03-concepts.xml:346 ../en/ch03-concepts.xml:361
2943 #: ../en/ch03-concepts.xml:402 ../en/ch03-concepts.xml:422
2944 #: ../en/ch03-concepts.xml:465 ../en/ch05-collab.xml:276
2945 #: ../en/ch08-undo.xml:365 ../en/ch08-undo.xml:412 ../en/ch08-undo.xml:477
2946 #: ../en/ch08-undo.xml:515 ../en/ch11-mq.xml:412
2947 msgid "XXX add text"
2948 msgstr ""
2949
2945 #. type: Content of: <book><chapter><sect1><sect2><title> 2950 #. type: Content of: <book><chapter><sect1><sect2><title>
2946 #: ../en/ch01-tour-basic.xml:269 2951 #: ../en/ch01-tour-basic.xml:267
2947 msgid "Changesets, revisions, and talking to other people" 2952 msgid "Changesets, revisions, and talking to other people"
2948 msgstr "改变集,版本,与其它用户交互" 2953 msgstr "改变集,版本,与其它用户交互"
2949 2954
2950 #. type: Content of: <book><chapter><sect1><sect2><para> 2955 #. type: Content of: <book><chapter><sect1><sect2><para>
2951 #: ../en/ch01-tour-basic.xml:272 2956 #: ../en/ch01-tour-basic.xml:270
2952 msgid "" 2957 msgid ""
2953 "As English is a notoriously sloppy language, and computer science has a " 2958 "As English is a notoriously sloppy language, and computer science has a "
2954 "hallowed history of terminological confusion (why use one term when four will " 2959 "hallowed history of terminological confusion (why use one term when four will "
2955 "do?), revision control has a variety of words and phrases that mean the same " 2960 "do?), revision control has a variety of words and phrases that mean the same "
2956 "thing. If you are talking about Mercurial history with other people, you " 2961 "thing. If you are talking about Mercurial history with other people, you "
2958 "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a " 2963 "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a "
2959 "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>." 2964 "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>."
2960 msgstr "" 2965 msgstr ""
2961 2966
2962 #. type: Content of: <book><chapter><sect1><sect2><para> 2967 #. type: Content of: <book><chapter><sect1><sect2><para>
2963 #: ../en/ch01-tour-basic.xml:282 2968 #: ../en/ch01-tour-basic.xml:280
2964 msgid "" 2969 msgid ""
2965 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to " 2970 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to "
2966 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</" 2971 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</"
2967 "emphasis> that you use to refer to <quote>a <emphasis>specific</emphasis> " 2972 "emphasis> that you use to refer to <quote>a <emphasis>specific</emphasis> "
2968 "changeset</quote> is of great importance. Recall that the <literal>changeset</" 2973 "changeset</quote> is of great importance. Recall that the <literal>changeset</"
2969 "literal> field in the output from <command role=\"hg-cmd\">hg log</command> " 2974 "literal> field in the output from <command role=\"hg-cmd\">hg log</command> "
2970 "identifies a changeset using both a number and a hexadecimal string." 2975 "identifies a changeset using both a number and a hexadecimal string."
2971 msgstr "" 2976 msgstr ""
2972 2977
2973 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 2978 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
2979 #: ../en/ch01-tour-basic.xml:289
2980 msgid ""
2981 "The revision number is <emphasis>only valid in that repository</emphasis>,"
2982 msgstr ""
2983
2984 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
2974 #: ../en/ch01-tour-basic.xml:291 2985 #: ../en/ch01-tour-basic.xml:291
2975 msgid ""
2976 "The revision number is <emphasis>only valid in that repository</emphasis>,"
2977 msgstr ""
2978
2979 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
2980 #: ../en/ch01-tour-basic.xml:293
2981 msgid "" 2986 msgid ""
2982 "while the hex string is the <emphasis>permanent, unchanging identifier</" 2987 "while the hex string is the <emphasis>permanent, unchanging identifier</"
2983 "emphasis> that will always identify that exact changeset in <emphasis>every</" 2988 "emphasis> that will always identify that exact changeset in <emphasis>every</"
2984 "emphasis> copy of the repository." 2989 "emphasis> copy of the repository."
2985 msgstr "" 2990 msgstr ""
2986 2991
2987 #. type: Content of: <book><chapter><sect1><sect2><para> 2992 #. type: Content of: <book><chapter><sect1><sect2><para>
2988 #: ../en/ch01-tour-basic.xml:298 2993 #: ../en/ch01-tour-basic.xml:296
2989 msgid "" 2994 msgid ""
2990 "This distinction is important. If you send someone an email talking about " 2995 "This distinction is important. If you send someone an email talking about "
2991 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 " 2996 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 "
2992 "will <emphasis>not be the same</emphasis> as yours. The reason for this is " 2997 "will <emphasis>not be the same</emphasis> as yours. The reason for this is "
2993 "that a revision number depends on the order in which changes arrived in a " 2998 "that a revision number depends on the order in which changes arrived in a "
2995 "the same order in different repositories. Three changes $a,b,c$ can easily " 3000 "the same order in different repositories. Three changes $a,b,c$ can easily "
2996 "appear in one repository as $0,1,2$, while in another as $1,0,2$." 3001 "appear in one repository as $0,1,2$, while in another as $1,0,2$."
2997 msgstr "" 3002 msgstr ""
2998 3003
2999 #. type: Content of: <book><chapter><sect1><sect2><para> 3004 #. type: Content of: <book><chapter><sect1><sect2><para>
3000 #: ../en/ch01-tour-basic.xml:308 3005 #: ../en/ch01-tour-basic.xml:306
3001 msgid "" 3006 msgid ""
3002 "Mercurial uses revision numbers purely as a convenient shorthand. If you " 3007 "Mercurial uses revision numbers purely as a convenient shorthand. If you "
3003 "need to discuss a changeset with someone, or make a record of a changeset for " 3008 "need to discuss a changeset with someone, or make a record of a changeset for "
3004 "some other reason (for example, in a bug report), use the hexadecimal " 3009 "some other reason (for example, in a bug report), use the hexadecimal "
3005 "identifier." 3010 "identifier."
3006 msgstr "" 3011 msgstr ""
3007 3012
3008 #. type: Content of: <book><chapter><sect1><sect2><title> 3013 #. type: Content of: <book><chapter><sect1><sect2><title>
3009 #: ../en/ch01-tour-basic.xml:316 3014 #: ../en/ch01-tour-basic.xml:314
3010 msgid "Viewing specific revisions" 3015 msgid "Viewing specific revisions"
3011 msgstr "察看指定版本" 3016 msgstr "察看指定版本"
3012 3017
3013 #. type: Content of: <book><chapter><sect1><sect2><para> 3018 #. type: Content of: <book><chapter><sect1><sect2><para>
3014 #: ../en/ch01-tour-basic.xml:318 3019 #: ../en/ch01-tour-basic.xml:316
3015 msgid "" 3020 msgid ""
3016 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a " 3021 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a "
3017 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option " 3022 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option "
3018 "role=\"hg-opt-log\">--rev</option>) option. You can use either a revision " 3023 "role=\"hg-opt-log\">--rev</option>) option. You can use either a revision "
3019 "number or a long-form changeset identifier, and you can provide as many " 3024 "number or a long-form changeset identifier, and you can provide as many "
3020 "revisions as you want." 3025 "revisions as you want."
3021 msgstr "" 3026 msgstr ""
3022 3027
3023 #. type: Content of: <book><chapter><sect1><sect2><para> 3028 #. type: Content of: <book><chapter><sect1><sect2><para>
3024 #: ../en/ch01-tour-basic.xml:327 3029 #: ../en/ch01-tour-basic.xml:325
3025 msgid "" 3030 msgid ""
3026 "If you want to see the history of several revisions without having to list " 3031 "If you want to see the history of several revisions without having to list "
3027 "each one, you can use <emphasis>range notation</emphasis>; this lets you " 3032 "each one, you can use <emphasis>range notation</emphasis>; this lets you "
3028 "express the idea <quote>I want all revisions between <literal>abc</literal> " 3033 "express the idea <quote>I want all revisions between <literal>abc</literal> "
3029 "and <literal>def</literal>, inclusive</quote>." 3034 "and <literal>def</literal>, inclusive</quote>."
3030 msgstr "" 3035 msgstr ""
3031 3036
3032 #. type: Content of: <book><chapter><sect1><sect2><para> 3037 #. type: Content of: <book><chapter><sect1><sect2><para>
3033 #: ../en/ch01-tour-basic.xml:335 3038 #: ../en/ch01-tour-basic.xml:333
3034 msgid "" 3039 msgid ""
3035 "Mercurial also honours the order in which you specify revisions, so <command " 3040 "Mercurial also honours the order in which you specify revisions, so <command "
3036 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " 3041 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command "
3037 "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2." 3042 "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2."
3038 msgstr "" 3043 msgstr ""
3039 3044
3040 #. type: Content of: <book><chapter><sect1><sect2><title> 3045 #. type: Content of: <book><chapter><sect1><sect2><title>
3041 #: ../en/ch01-tour-basic.xml:342 3046 #: ../en/ch01-tour-basic.xml:340
3042 msgid "More detailed information" 3047 msgid "More detailed information"
3043 msgstr "更详细的信息" 3048 msgstr "更详细的信息"
3044 3049
3045 #. type: Content of: <book><chapter><sect1><sect2><para> 3050 #. type: Content of: <book><chapter><sect1><sect2><para>
3046 #: ../en/ch01-tour-basic.xml:344 3051 #: ../en/ch01-tour-basic.xml:342
3047 msgid "" 3052 msgid ""
3048 "While the summary information printed by <command role=\"hg-cmd\">hg log</" 3053 "While the summary information printed by <command role=\"hg-cmd\">hg log</"
3049 "command> is useful if you already know what you're looking for, you may need " 3054 "command> is useful if you already know what you're looking for, you may need "
3050 "to see a complete description of the change, or a list of the files changed, " 3055 "to see a complete description of the change, or a list of the files changed, "
3051 "if you're trying to decide whether a changeset is the one you're looking for. " 3056 "if you're trying to decide whether a changeset is the one you're looking for. "
3053 "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) " 3058 "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) "
3054 "option gives you this extra detail." 3059 "option gives you this extra detail."
3055 msgstr "" 3060 msgstr ""
3056 3061
3057 #. type: Content of: <book><chapter><sect1><sect2><para> 3062 #. type: Content of: <book><chapter><sect1><sect2><para>
3058 #: ../en/ch01-tour-basic.xml:356 3063 #: ../en/ch01-tour-basic.xml:354
3059 msgid "" 3064 msgid ""
3060 "If you want to see both the description and content of a change, add the " 3065 "If you want to see both the description and content of a change, add the "
3061 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--" 3066 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--"
3062 "patch</option>) option. This displays the content of a change as a " 3067 "patch</option>) option. This displays the content of a change as a "
3063 "<emphasis>unified diff</emphasis> (if you've never seen a unified diff " 3068 "<emphasis>unified diff</emphasis> (if you've never seen a unified diff "
3064 "before, see section <xref linkend=\"sec.mq.patch\"/> for an overview)." 3069 "before, see <xref linkend=\"sec:mq:patch\"/> for an overview)."
3065 msgstr "" 3070 msgstr ""
3066 3071
3067 #. type: Content of: <book><chapter><sect1><title> 3072 #. type: Content of: <book><chapter><sect1><title>
3068 #: ../en/ch01-tour-basic.xml:369 3073 #: ../en/ch01-tour-basic.xml:367
3069 msgid "All about command options" 3074 msgid "All about command options"
3070 msgstr "命令选项" 3075 msgstr "命令选项"
3071 3076
3072 #. type: Content of: <book><chapter><sect1><para> 3077 #. type: Content of: <book><chapter><sect1><para>
3073 #: ../en/ch01-tour-basic.xml:371 3078 #: ../en/ch01-tour-basic.xml:369
3074 msgid "" 3079 msgid ""
3075 "Let's take a brief break from exploring Mercurial commands to discuss a " 3080 "Let's take a brief break from exploring Mercurial commands to discuss a "
3076 "pattern in the way that they work; you may find this useful to keep in mind " 3081 "pattern in the way that they work; you may find this useful to keep in mind "
3077 "as we continue our tour." 3082 "as we continue our tour."
3078 msgstr "" 3083 msgstr ""
3079 3084
3080 #. type: Content of: <book><chapter><sect1><para> 3085 #. type: Content of: <book><chapter><sect1><para>
3081 #: ../en/ch01-tour-basic.xml:375 3086 #: ../en/ch01-tour-basic.xml:373
3082 msgid "" 3087 msgid ""
3083 "Mercurial has a consistent and straightforward approach to dealing with the " 3088 "Mercurial has a consistent and straightforward approach to dealing with the "
3084 "options that you can pass to commands. It follows the conventions for " 3089 "options that you can pass to commands. It follows the conventions for "
3085 "options that are common to modern Linux and Unix systems." 3090 "options that are common to modern Linux and Unix systems."
3086 msgstr "" 3091 msgstr ""
3087 3092
3088 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 3093 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
3089 #: ../en/ch01-tour-basic.xml:380 3094 #: ../en/ch01-tour-basic.xml:378
3090 msgid "" 3095 msgid ""
3091 "Every option has a long name. For example, as we've already seen, the " 3096 "Every option has a long name. For example, as we've already seen, the "
3092 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" 3097 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-"
3093 "opt-log\">--rev</option> option." 3098 "opt-log\">--rev</option> option."
3094 msgstr "" 3099 msgstr ""
3095 3100
3096 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 3101 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
3097 #: ../en/ch01-tour-basic.xml:384 3102 #: ../en/ch01-tour-basic.xml:382
3098 msgid "" 3103 msgid ""
3099 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--" 3104 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--"
3100 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The " 3105 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The "
3101 "reason that some options don't have short names is that the options in " 3106 "reason that some options don't have short names is that the options in "
3102 "question are rarely used.)" 3107 "question are rarely used.)"
3103 msgstr "" 3108 msgstr ""
3104 3109
3105 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 3110 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
3106 #: ../en/ch01-tour-basic.xml:389 3111 #: ../en/ch01-tour-basic.xml:387
3107 msgid "" 3112 msgid ""
3108 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</" 3113 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</"
3109 "option>), while short options start with one (e.g. <option role=\"hg-opt-log" 3114 "option>), while short options start with one (e.g. <option role=\"hg-opt-log"
3110 "\">-r</option>)." 3115 "\">-r</option>)."
3111 msgstr "" 3116 msgstr ""
3112 3117
3113 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 3118 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
3114 #: ../en/ch01-tour-basic.xml:393 3119 #: ../en/ch01-tour-basic.xml:391
3115 msgid "" 3120 msgid ""
3116 "Option naming and usage is consistent across commands. For example, every " 3121 "Option naming and usage is consistent across commands. For example, every "
3117 "command that lets you specify a changeset ID or revision number accepts both " 3122 "command that lets you specify a changeset ID or revision number accepts both "
3118 "<option role=\"hg-opt-log\">-r</option> and <option role=\"hg-opt-log\">--" 3123 "<option role=\"hg-opt-log\">-r</option> and <option role=\"hg-opt-log\">--"
3119 "rev</option> arguments." 3124 "rev</option> arguments."
3120 msgstr "" 3125 msgstr ""
3121 3126
3122 #. type: Content of: <book><chapter><sect1><para> 3127 #. type: Content of: <book><chapter><sect1><para>
3123 #: ../en/ch01-tour-basic.xml:399 3128 #: ../en/ch01-tour-basic.xml:397
3124 msgid "" 3129 msgid ""
3125 "In the examples throughout this book, I use short options instead of long. " 3130 "In the examples throughout this book, I use short options instead of long. "
3126 "This just reflects my own preference, so don't read anything significant into " 3131 "This just reflects my own preference, so don't read anything significant into "
3127 "it." 3132 "it."
3128 msgstr "" 3133 msgstr ""
3129 3134
3130 #. type: Content of: <book><chapter><sect1><para> 3135 #. type: Content of: <book><chapter><sect1><para>
3131 #: ../en/ch01-tour-basic.xml:403 3136 #: ../en/ch01-tour-basic.xml:401
3132 msgid "" 3137 msgid ""
3133 "Most commands that print output of some kind will print more output when " 3138 "Most commands that print output of some kind will print more output when "
3134 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-" 3139 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-"
3135 "global\">--verbose</option>) option, and less when passed <option role=\"hg-" 3140 "global\">--verbose</option>) option, and less when passed <option role=\"hg-"
3136 "opt-global\">-q</option> (or <option role=\"hg-opt-global\">--quiet</option>)." 3141 "opt-global\">-q</option> (or <option role=\"hg-opt-global\">--quiet</option>)."
3137 msgstr "" 3142 msgstr ""
3138 3143
3139 #. type: Content of: <book><chapter><sect1><title> 3144 #. type: Content of: <book><chapter><sect1><title>
3140 #: ../en/ch01-tour-basic.xml:411 3145 #: ../en/ch01-tour-basic.xml:409
3141 msgid "Making and reviewing changes" 3146 msgid "Making and reviewing changes"
3142 msgstr "创建和复审修改" 3147 msgstr "创建和复审修改"
3143 3148
3144 #. type: Content of: <book><chapter><sect1><para> 3149 #. type: Content of: <book><chapter><sect1><para>
3145 #: ../en/ch01-tour-basic.xml:413 3150 #: ../en/ch01-tour-basic.xml:411
3146 msgid "" 3151 msgid ""
3147 "Now that we have a grasp of viewing history in Mercurial, let's take a look " 3152 "Now that we have a grasp of viewing history in Mercurial, let's take a look "
3148 "at making some changes and examining them." 3153 "at making some changes and examining them."
3149 msgstr "" 3154 msgstr ""
3150 3155
3151 #. type: Content of: <book><chapter><sect1><para> 3156 #. type: Content of: <book><chapter><sect1><para>
3152 #: ../en/ch01-tour-basic.xml:417 3157 #: ../en/ch01-tour-basic.xml:415
3153 msgid "" 3158 msgid ""
3154 "The first thing we'll do is isolate our experiment in a repository of its " 3159 "The first thing we'll do is isolate our experiment in a repository of its "
3155 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we " 3160 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we "
3156 "don't need to clone a copy of the remote repository. Since we already have a " 3161 "don't need to clone a copy of the remote repository. Since we already have a "
3157 "copy of it locally, we can just clone that instead. This is much faster than " 3162 "copy of it locally, we can just clone that instead. This is much faster than "
3158 "cloning over the network, and cloning a local repository uses less disk space " 3163 "cloning over the network, and cloning a local repository uses less disk space "
3159 "in most cases, too." 3164 "in most cases, too."
3160 msgstr "" 3165 msgstr ""
3161 3166
3162 #. type: Content of: <book><chapter><sect1><para> 3167 #. type: Content of: <book><chapter><sect1><para>
3163 #: ../en/ch01-tour-basic.xml:427 3168 #: ../en/ch01-tour-basic.xml:425
3164 msgid "" 3169 msgid ""
3165 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy " 3170 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy "
3166 "of a remote repository around, which you can then make temporary clones of to " 3171 "of a remote repository around, which you can then make temporary clones of to "
3167 "create sandboxes for each task you want to work on. This lets you work on " 3172 "create sandboxes for each task you want to work on. This lets you work on "
3168 "multiple tasks in parallel, each isolated from the others until it's complete " 3173 "multiple tasks in parallel, each isolated from the others until it's complete "
3170 "there's almost no overhead to cloning and destroying repositories whenever " 3175 "there's almost no overhead to cloning and destroying repositories whenever "
3171 "you want." 3176 "you want."
3172 msgstr "" 3177 msgstr ""
3173 3178
3174 #. type: Content of: <book><chapter><sect1><para> 3179 #. type: Content of: <book><chapter><sect1><para>
3175 #: ../en/ch01-tour-basic.xml:436 3180 #: ../en/ch01-tour-basic.xml:434
3176 msgid "" 3181 msgid ""
3177 "In our <filename class=\"directory\">my-hello</filename> repository, we have " 3182 "In our <filename class=\"directory\">my-hello</filename> repository, we have "
3178 "a file <filename>hello.c</filename> that contains the classic <quote>hello, " 3183 "a file <filename>hello.c</filename> that contains the classic <quote>hello, "
3179 "world</quote> program. Let's use the ancient and venerable <command>sed</" 3184 "world</quote> program. Let's use the ancient and venerable <command>sed</"
3180 "command> command to edit this file so that it prints a second line of " 3185 "command> command to edit this file so that it prints a second line of "
3183 "constraint, you probably won't want to use <command>sed</command>; simply use " 3188 "constraint, you probably won't want to use <command>sed</command>; simply use "
3184 "your preferred text editor to do the same thing.)" 3189 "your preferred text editor to do the same thing.)"
3185 msgstr "" 3190 msgstr ""
3186 3191
3187 #. type: Content of: <book><chapter><sect1><para> 3192 #. type: Content of: <book><chapter><sect1><para>
3188 #: ../en/ch01-tour-basic.xml:449 3193 #: ../en/ch01-tour-basic.xml:447
3189 msgid "" 3194 msgid ""
3190 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " 3195 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us "
3191 "what Mercurial knows about the files in the repository." 3196 "what Mercurial knows about the files in the repository."
3192 msgstr "" 3197 msgstr ""
3193 3198
3194 #. type: Content of: <book><chapter><sect1><para> 3199 #. type: Content of: <book><chapter><sect1><para>
3195 #: ../en/ch01-tour-basic.xml:455 3200 #: ../en/ch01-tour-basic.xml:453
3196 msgid "" 3201 msgid ""
3197 "The <command role=\"hg-cmd\">hg status</command> command prints no output for " 3202 "The <command role=\"hg-cmd\">hg status</command> command prints no output for "
3198 "some files, but a line starting with <quote><literal>M</literal></quote> for " 3203 "some files, but a line starting with <quote><literal>M</literal></quote> for "
3199 "<filename>hello.c</filename>. Unless you tell it to, <command role=\"hg-cmd" 3204 "<filename>hello.c</filename>. Unless you tell it to, <command role=\"hg-cmd"
3200 "\">hg status</command> will not print any output for files that have not been " 3205 "\">hg status</command> will not print any output for files that have not been "
3201 "modified." 3206 "modified."
3202 msgstr "" 3207 msgstr ""
3203 3208
3204 #. type: Content of: <book><chapter><sect1><para> 3209 #. type: Content of: <book><chapter><sect1><para>
3205 #: ../en/ch01-tour-basic.xml:462 3210 #: ../en/ch01-tour-basic.xml:460
3206 msgid "" 3211 msgid ""
3207 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed " 3212 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed "
3208 "that we modified <filename>hello.c</filename>. We didn't need to " 3213 "that we modified <filename>hello.c</filename>. We didn't need to "
3209 "<emphasis>inform</emphasis> Mercurial that we were going to modify the file " 3214 "<emphasis>inform</emphasis> Mercurial that we were going to modify the file "
3210 "before we started, or that we had modified the file after we were done; it " 3215 "before we started, or that we had modified the file after we were done; it "
3211 "was able to figure this out itself." 3216 "was able to figure this out itself."
3212 msgstr "" 3217 msgstr ""
3213 3218
3214 #. type: Content of: <book><chapter><sect1><para> 3219 #. type: Content of: <book><chapter><sect1><para>
3215 #: ../en/ch01-tour-basic.xml:470 3220 #: ../en/ch01-tour-basic.xml:468
3216 msgid "" 3221 msgid ""
3217 "It's a little bit helpful to know that we've modified <filename>hello.c</" 3222 "It's a little bit helpful to know that we've modified <filename>hello.c</"
3218 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> " 3223 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> "
3219 "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg " 3224 "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg "
3220 "diff</command> command." 3225 "diff</command> command."
3221 msgstr "" 3226 msgstr ""
3222 3227
3223 #. type: Content of: <book><chapter><sect1><title> 3228 #. type: Content of: <book><chapter><sect1><title>
3224 #: ../en/ch01-tour-basic.xml:480 3229 #: ../en/ch01-tour-basic.xml:478
3225 msgid "Recording changes in a new changeset" 3230 msgid "Recording changes in a new changeset"
3226 msgstr "在新修改集中记录修改" 3231 msgstr "在新修改集中记录修改"
3227 3232
3228 #. type: Content of: <book><chapter><sect1><para> 3233 #. type: Content of: <book><chapter><sect1><para>
3229 #: ../en/ch01-tour-basic.xml:482 3234 #: ../en/ch01-tour-basic.xml:480
3230 msgid "" 3235 msgid ""
3231 "We can modify files, build and test our changes, and use <command role=\"hg-" 3236 "We can modify files, build and test our changes, and use <command role=\"hg-"
3232 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to " 3237 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to "
3233 "review our changes, until we're satisfied with what we've done and arrive at " 3238 "review our changes, until we're satisfied with what we've done and arrive at "
3234 "a natural stopping point where we want to record our work in a new changeset." 3239 "a natural stopping point where we want to record our work in a new changeset."
3235 msgstr "" 3240 msgstr ""
3236 3241
3237 #. type: Content of: <book><chapter><sect1><para> 3242 #. type: Content of: <book><chapter><sect1><para>
3238 #: ../en/ch01-tour-basic.xml:489 3243 #: ../en/ch01-tour-basic.xml:487
3239 msgid "" 3244 msgid ""
3240 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new " 3245 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new "
3241 "changeset; we'll usually refer to this as <quote>making a commit</quote> or " 3246 "changeset; we'll usually refer to this as <quote>making a commit</quote> or "
3242 "<quote>committing</quote>." 3247 "<quote>committing</quote>."
3243 msgstr "" 3248 msgstr ""
3244 3249
3245 #. type: Content of: <book><chapter><sect1><sect2><title> 3250 #. type: Content of: <book><chapter><sect1><sect2><title>
3246 #: ../en/ch01-tour-basic.xml:495 3251 #: ../en/ch01-tour-basic.xml:493
3247 msgid "Setting up a username" 3252 msgid "Setting up a username"
3248 msgstr "配置用户名称" 3253 msgstr "配置用户名称"
3249 3254
3250 #. type: Content of: <book><chapter><sect1><sect2><para> 3255 #. type: Content of: <book><chapter><sect1><sect2><para>
3251 #: ../en/ch01-tour-basic.xml:497 3256 #: ../en/ch01-tour-basic.xml:495
3252 msgid "" 3257 msgid ""
3253 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the " 3258 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the "
3254 "first time, it is not guaranteed to succeed. Mercurial records your name and " 3259 "first time, it is not guaranteed to succeed. Mercurial records your name and "
3255 "address with each change that you commit, so that you and others will later " 3260 "address with each change that you commit, so that you and others will later "
3256 "be able to tell who made each change. Mercurial tries to automatically " 3261 "be able to tell who made each change. Mercurial tries to automatically "
3257 "figure out a sensible username to commit the change with. It will attempt " 3262 "figure out a sensible username to commit the change with. It will attempt "
3258 "each of the following methods, in order:" 3263 "each of the following methods, in order:"
3259 msgstr "" 3264 msgstr ""
3260 3265
3261 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3266 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3262 #: ../en/ch01-tour-basic.xml:506 3267 #: ../en/ch01-tour-basic.xml:504
3263 msgid "" 3268 msgid ""
3264 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the " 3269 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the "
3265 "<command role=\"hg-cmd\">hg commit</command> command on the command line, " 3270 "<command role=\"hg-cmd\">hg commit</command> command on the command line, "
3266 "followed by a username, this is always given the highest precedence." 3271 "followed by a username, this is always given the highest precedence."
3267 msgstr "" 3272 msgstr ""
3268 3273
3269 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3274 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3270 #: ../en/ch01-tour-basic.xml:511 3275 #: ../en/ch01-tour-basic.xml:509
3271 msgid "" 3276 msgid ""
3272 "If you have set the <envar>HGUSER</envar> environment variable, this is " 3277 "If you have set the <envar>HGUSER</envar> environment variable, this is "
3273 "checked next." 3278 "checked next."
3274 msgstr "" 3279 msgstr ""
3275 3280
3276 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3281 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3277 #: ../en/ch01-tour-basic.xml:514 3282 #: ../en/ch01-tour-basic.xml:512
3278 msgid "" 3283 msgid ""
3279 "If you create a file in your home directory called <filename role=\"special" 3284 "If you create a file in your home directory called <filename role=\"special"
3280 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> " 3285 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> "
3281 "entry, that will be used next. To see what the contents of this file should " 3286 "entry, that will be used next. To see what the contents of this file should "
3282 "look like, refer to section <xref linkend=\"sec.tour-basic.username\"/> below." 3287 "look like, refer to <xref linkend=\"sec:tour-basic:username\"/> below."
3283 msgstr "" 3288 msgstr ""
3284 3289
3285 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3290 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3286 #: ../en/ch01-tour-basic.xml:521 3291 #: ../en/ch01-tour-basic.xml:520
3287 msgid "" 3292 msgid ""
3288 "If you have set the <envar>EMAIL</envar> environment variable, this will be " 3293 "If you have set the <envar>EMAIL</envar> environment variable, this will be "
3289 "used next." 3294 "used next."
3290 msgstr "" 3295 msgstr ""
3291 3296
3292 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3297 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3293 #: ../en/ch01-tour-basic.xml:524 3298 #: ../en/ch01-tour-basic.xml:523
3294 msgid "" 3299 msgid ""
3295 "Mercurial will query your system to find out your local user name and host " 3300 "Mercurial will query your system to find out your local user name and host "
3296 "name, and construct a username from these components. Since this often " 3301 "name, and construct a username from these components. Since this often "
3297 "results in a username that is not very useful, it will print a warning if it " 3302 "results in a username that is not very useful, it will print a warning if it "
3298 "has to do this." 3303 "has to do this."
3299 msgstr "" 3304 msgstr ""
3300 3305
3301 #. type: Content of: <book><chapter><sect1><sect2><para> 3306 #. type: Content of: <book><chapter><sect1><sect2><para>
3302 #: ../en/ch01-tour-basic.xml:531 3307 #: ../en/ch01-tour-basic.xml:530
3303 msgid "" 3308 msgid ""
3304 "If all of these mechanisms fail, Mercurial will fail, printing an error " 3309 "If all of these mechanisms fail, Mercurial will fail, printing an error "
3305 "message. In this case, it will not let you commit until you set up a " 3310 "message. In this case, it will not let you commit until you set up a "
3306 "username." 3311 "username."
3307 msgstr "" 3312 msgstr ""
3308 3313
3309 #. type: Content of: <book><chapter><sect1><sect2><para> 3314 #. type: Content of: <book><chapter><sect1><sect2><para>
3310 #: ../en/ch01-tour-basic.xml:535 3315 #: ../en/ch01-tour-basic.xml:534
3311 msgid "" 3316 msgid ""
3312 "You should think of the <envar>HGUSER</envar> environment variable and the " 3317 "You should think of the <envar>HGUSER</envar> environment variable and the "
3313 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-" 3318 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-"
3314 "cmd\">hg commit</command> command as ways to <emphasis>override</emphasis> " 3319 "cmd\">hg commit</command> command as ways to <emphasis>override</emphasis> "
3315 "Mercurial's default selection of username. For normal use, the simplest and " 3320 "Mercurial's default selection of username. For normal use, the simplest and "
3316 "most robust way to set a username for yourself is by creating a <filename " 3321 "most robust way to set a username for yourself is by creating a <filename "
3317 "role=\"special\">.hgrc</filename> file; see below for details." 3322 "role=\"special\">.hgrc</filename> file; see below for details."
3318 msgstr "" 3323 msgstr ""
3319 3324
3320 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 3325 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
3321 #: ../en/ch01-tour-basic.xml:544 3326 #: ../en/ch01-tour-basic.xml:543
3322 msgid "Creating a Mercurial configuration file" 3327 msgid "Creating a Mercurial configuration file"
3323 msgstr "创建 Mercurial 的配置文件" 3328 msgstr "创建 Mercurial 的配置文件"
3324 3329
3325 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3330 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3326 #: ../en/ch01-tour-basic.xml:546 3331 #: ../en/ch01-tour-basic.xml:545
3327 msgid "" 3332 msgid ""
3328 "To set a user name, use your favourite editor to create a file called " 3333 "To set a user name, use your favourite editor to create a file called "
3329 "<filename role=\"special\">.hgrc</filename> in your home directory. " 3334 "<filename role=\"special\">.hgrc</filename> in your home directory. "
3330 "Mercurial will use this file to look up your personalised configuration " 3335 "Mercurial will use this file to look up your personalised configuration "
3331 "settings. The initial contents of your <filename role=\"special\">.hgrc</" 3336 "settings. The initial contents of your <filename role=\"special\">.hgrc</"
3332 "filename> should look like this." 3337 "filename> should look like this."
3333 msgstr "" 3338 msgstr ""
3334 3339
3335 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3340 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3336 #: ../en/ch01-tour-basic.xml:558 3341 #: ../en/ch01-tour-basic.xml:557
3337 msgid "" 3342 msgid ""
3338 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</" 3343 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</"
3339 "emphasis> of the config file, so you can read the <quote><literal>username " 3344 "emphasis> of the config file, so you can read the <quote><literal>username "
3340 "= ...</literal></quote> line as meaning <quote>set the value of the " 3345 "= ...</literal></quote> line as meaning <quote>set the value of the "
3341 "<literal>username</literal> item in the <literal>ui</literal> section</" 3346 "<literal>username</literal> item in the <literal>ui</literal> section</"
3343 "file. Mercurial ignores empty lines and treats any text from " 3348 "file. Mercurial ignores empty lines and treats any text from "
3344 "<quote><literal>#</literal></quote> to the end of a line as a comment." 3349 "<quote><literal>#</literal></quote> to the end of a line as a comment."
3345 msgstr "" 3350 msgstr ""
3346 3351
3347 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 3352 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
3348 #: ../en/ch01-tour-basic.xml:571 3353 #: ../en/ch01-tour-basic.xml:570
3349 msgid "Choosing a user name" 3354 msgid "Choosing a user name"
3350 msgstr "选择用户名称" 3355 msgstr "选择用户名称"
3351 3356
3352 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3357 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3353 #: ../en/ch01-tour-basic.xml:573 3358 #: ../en/ch01-tour-basic.xml:572
3354 msgid "" 3359 msgid ""
3355 "You can use any text you like as the value of the <literal>username</literal> " 3360 "You can use any text you like as the value of the <literal>username</literal> "
3356 "config item, since this information is for reading by other people, but for " 3361 "config item, since this information is for reading by other people, but for "
3357 "interpreting by Mercurial. The convention that most people follow is to use " 3362 "interpreting by Mercurial. The convention that most people follow is to use "
3358 "their name and email address, as in the example above." 3363 "their name and email address, as in the example above."
3359 msgstr "" 3364 msgstr ""
3360 3365
3361 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 3366 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
3362 #: ../en/ch01-tour-basic.xml:580 3367 #: ../en/ch01-tour-basic.xml:579
3363 msgid "" 3368 msgid ""
3364 "Mercurial's built-in web server obfuscates email addresses, to make it more " 3369 "Mercurial's built-in web server obfuscates email addresses, to make it more "
3365 "difficult for the email harvesting tools that spammers use. This reduces the " 3370 "difficult for the email harvesting tools that spammers use. This reduces the "
3366 "likelihood that you'll start receiving more junk email if you publish a " 3371 "likelihood that you'll start receiving more junk email if you publish a "
3367 "Mercurial repository on the web." 3372 "Mercurial repository on the web."
3368 msgstr "" 3373 msgstr ""
3369 3374
3370 #. type: Content of: <book><chapter><sect1><sect2><title> 3375 #. type: Content of: <book><chapter><sect1><sect2><title>
3371 #: ../en/ch01-tour-basic.xml:590 3376 #: ../en/ch01-tour-basic.xml:589
3372 msgid "Writing a commit message" 3377 msgid "Writing a commit message"
3373 msgstr "写提交日志" 3378 msgstr "写提交日志"
3374 3379
3375 #. type: Content of: <book><chapter><sect1><sect2><para> 3380 #. type: Content of: <book><chapter><sect1><sect2><para>
3376 #: ../en/ch01-tour-basic.xml:592 3381 #: ../en/ch01-tour-basic.xml:591
3377 msgid "" 3382 msgid ""
3378 "When we commit a change, Mercurial drops us into a text editor, to enter a " 3383 "When we commit a change, Mercurial drops us into a text editor, to enter a "
3379 "message that will describe the modifications we've made in this changeset. " 3384 "message that will describe the modifications we've made in this changeset. "
3380 "This is called the <emphasis>commit message</emphasis>. It will be a record " 3385 "This is called the <emphasis>commit message</emphasis>. It will be a record "
3381 "for readers of what we did and why, and it will be printed by <command role=" 3386 "for readers of what we did and why, and it will be printed by <command role="
3382 "\"hg-cmd\">hg log</command> after we've finished committing." 3387 "\"hg-cmd\">hg log</command> after we've finished committing."
3383 msgstr "" 3388 msgstr ""
3384 3389
3385 #. type: Content of: <book><chapter><sect1><sect2><para> 3390 #. type: Content of: <book><chapter><sect1><sect2><para>
3386 #: ../en/ch01-tour-basic.xml:602 3391 #: ../en/ch01-tour-basic.xml:601
3387 msgid "" 3392 msgid ""
3388 "The editor that the <command role=\"hg-cmd\">hg commit</command> command " 3393 "The editor that the <command role=\"hg-cmd\">hg commit</command> command "
3389 "drops us into will contain an empty line, followed by a number of lines " 3394 "drops us into will contain an empty line, followed by a number of lines "
3390 "starting with <quote><literal>HG:</literal></quote>." 3395 "starting with <quote><literal>HG:</literal></quote>."
3391 msgstr "" 3396 msgstr ""
3392 3397
3393 #. type: Content of: <book><chapter><sect1><sect2><para> 3398 #. type: Content of: <book><chapter><sect1><sect2><para>
3394 #: ../en/ch01-tour-basic.xml:609 3399 #: ../en/ch01-tour-basic.xml:608
3395 msgid "" 3400 msgid ""
3396 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></" 3401 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></"
3397 "quote>; it uses them only to tell us which files it's recording changes to. " 3402 "quote>; it uses them only to tell us which files it's recording changes to. "
3398 "Modifying or deleting these lines has no effect." 3403 "Modifying or deleting these lines has no effect."
3399 msgstr "" 3404 msgstr ""
3400 3405
3401 #. type: Content of: <book><chapter><sect1><sect2><title> 3406 #. type: Content of: <book><chapter><sect1><sect2><title>
3402 #: ../en/ch01-tour-basic.xml:615 3407 #: ../en/ch01-tour-basic.xml:614
3403 msgid "Writing a good commit message" 3408 msgid "Writing a good commit message"
3404 msgstr "写好提交日志" 3409 msgstr "写好提交日志"
3405 3410
3406 #. type: Content of: <book><chapter><sect1><sect2><para> 3411 #. type: Content of: <book><chapter><sect1><sect2><para>
3407 #: ../en/ch01-tour-basic.xml:617 3412 #: ../en/ch01-tour-basic.xml:616
3408 msgid "" 3413 msgid ""
3409 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of " 3414 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of "
3410 "a commit message by default, it's best to write a commit message whose first " 3415 "a commit message by default, it's best to write a commit message whose first "
3411 "line stands alone. Here's a real example of a commit message that " 3416 "line stands alone. Here's a real example of a commit message that "
3412 "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary " 3417 "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary "
3413 "that is not readable." 3418 "that is not readable."
3414 msgstr "" 3419 msgstr ""
3415 3420
3416 #. type: Content of: <book><chapter><sect1><sect2><para> 3421 #. type: Content of: <book><chapter><sect1><sect2><para>
3417 #: ../en/ch01-tour-basic.xml:631 3422 #: ../en/ch01-tour-basic.xml:630
3418 msgid "" 3423 msgid ""
3419 "As far as the remainder of the contents of the commit message are concerned, " 3424 "As far as the remainder of the contents of the commit message are concerned, "
3420 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care " 3425 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care "
3421 "about the contents of the commit message, though your project may have " 3426 "about the contents of the commit message, though your project may have "
3422 "policies that dictate a certain kind of formatting." 3427 "policies that dictate a certain kind of formatting."
3423 msgstr "" 3428 msgstr ""
3424 3429
3425 #. type: Content of: <book><chapter><sect1><sect2><para> 3430 #. type: Content of: <book><chapter><sect1><sect2><para>
3426 #: ../en/ch01-tour-basic.xml:637 3431 #: ../en/ch01-tour-basic.xml:636
3427 msgid "" 3432 msgid ""
3428 "My personal preference is for short, but informative, commit messages that " 3433 "My personal preference is for short, but informative, commit messages that "
3429 "tell me something that I can't figure out with a quick glance at the output " 3434 "tell me something that I can't figure out with a quick glance at the output "
3430 "of <command role=\"hg-cmd\">hg log --patch</command>." 3435 "of <command role=\"hg-cmd\">hg log --patch</command>."
3431 msgstr "" 3436 msgstr ""
3432 3437
3433 #. type: Content of: <book><chapter><sect1><sect2><title> 3438 #. type: Content of: <book><chapter><sect1><sect2><title>
3434 #: ../en/ch01-tour-basic.xml:644 3439 #: ../en/ch01-tour-basic.xml:643
3435 msgid "Aborting a commit" 3440 msgid "Aborting a commit"
3436 msgstr "终止提交" 3441 msgstr "终止提交"
3437 3442
3438 #. type: Content of: <book><chapter><sect1><sect2><para> 3443 #. type: Content of: <book><chapter><sect1><sect2><para>
3439 #: ../en/ch01-tour-basic.xml:646 3444 #: ../en/ch01-tour-basic.xml:645
3440 msgid "" 3445 msgid ""
3441 "If you decide that you don't want to commit while in the middle of editing a " 3446 "If you decide that you don't want to commit while in the middle of editing a "
3442 "commit message, simply exit from your editor without saving the file that " 3447 "commit message, simply exit from your editor without saving the file that "
3443 "it's editing. This will cause nothing to happen to either the repository or " 3448 "it's editing. This will cause nothing to happen to either the repository or "
3444 "the working directory." 3449 "the working directory."
3445 msgstr "" 3450 msgstr ""
3446 3451
3447 #. type: Content of: <book><chapter><sect1><sect2><para> 3452 #. type: Content of: <book><chapter><sect1><sect2><para>
3448 #: ../en/ch01-tour-basic.xml:651 3453 #: ../en/ch01-tour-basic.xml:650
3449 msgid "" 3454 msgid ""
3450 "If we run the <command role=\"hg-cmd\">hg commit</command> command without " 3455 "If we run the <command role=\"hg-cmd\">hg commit</command> command without "
3451 "any arguments, it records all of the changes we've made, as reported by " 3456 "any arguments, it records all of the changes we've made, as reported by "
3452 "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 3457 "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg "
3453 "diff</command>." 3458 "diff</command>."
3454 msgstr "" 3459 msgstr ""
3455 3460
3456 #. type: Content of: <book><chapter><sect1><sect2><title> 3461 #. type: Content of: <book><chapter><sect1><sect2><title>
3457 #: ../en/ch01-tour-basic.xml:658 3462 #: ../en/ch01-tour-basic.xml:657
3458 msgid "Admiring our new handiwork" 3463 msgid "Admiring our new handiwork"
3459 msgstr "欣赏我们的新手艺" 3464 msgstr "欣赏我们的新手艺"
3460 3465
3461 #. type: Content of: <book><chapter><sect1><sect2><para> 3466 #. type: Content of: <book><chapter><sect1><sect2><para>
3462 #: ../en/ch01-tour-basic.xml:660 3467 #: ../en/ch01-tour-basic.xml:659
3463 msgid "" 3468 msgid ""
3464 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg " 3469 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg "
3465 "tip</command> command to display the changeset we just created. This command " 3470 "tip</command> command to display the changeset we just created. This command "
3466 "produces output that is identical to <command role=\"hg-cmd\">hg log</" 3471 "produces output that is identical to <command role=\"hg-cmd\">hg log</"
3467 "command>, but it only displays the newest revision in the repository." 3472 "command>, but it only displays the newest revision in the repository."
3468 msgstr "" 3473 msgstr ""
3469 3474
3470 #. type: Content of: <book><chapter><sect1><sect2><para> 3475 #. type: Content of: <book><chapter><sect1><sect2><para>
3471 #: ../en/ch01-tour-basic.xml:669 3476 #: ../en/ch01-tour-basic.xml:668
3472 msgid "" 3477 msgid ""
3473 "We refer to the newest revision in the repository as the tip revision, or " 3478 "We refer to the newest revision in the repository as the tip revision, or "
3474 "simply the tip." 3479 "simply the tip."
3475 msgstr "" 3480 msgstr ""
3476 3481
3477 #. type: Content of: <book><chapter><sect1><title> 3482 #. type: Content of: <book><chapter><sect1><title>
3478 #: ../en/ch01-tour-basic.xml:676 3483 #: ../en/ch01-tour-basic.xml:675
3479 msgid "Sharing changes" 3484 msgid "Sharing changes"
3480 msgstr "共享修改" 3485 msgstr "共享修改"
3481 3486
3482 #. type: Content of: <book><chapter><sect1><para> 3487 #. type: Content of: <book><chapter><sect1><para>
3483 #: ../en/ch01-tour-basic.xml:678 3488 #: ../en/ch01-tour-basic.xml:677
3484 msgid "" 3489 msgid ""
3485 "We mentioned earlier that repositories in Mercurial are self-contained. This " 3490 "We mentioned earlier that repositories in Mercurial are self-contained. This "
3486 "means that the changeset we just created exists only in our <filename class=" 3491 "means that the changeset we just created exists only in our <filename class="
3487 "\"directory\">my-hello</filename> repository. Let's look at a few ways that " 3492 "\"directory\">my-hello</filename> repository. Let's look at a few ways that "
3488 "we can propagate this change into other repositories." 3493 "we can propagate this change into other repositories."
3489 msgstr "" 3494 msgstr ""
3490 3495
3491 #. type: Content of: <book><chapter><sect1><sect2><title> 3496 #. type: Content of: <book><chapter><sect1><sect2><title>
3492 #: ../en/ch01-tour-basic.xml:686 3497 #: ../en/ch01-tour-basic.xml:685
3493 msgid "Pulling changes from another repository" 3498 msgid "Pulling changes from another repository"
3494 msgstr "从其它版本库取得修改" 3499 msgstr "从其它版本库取得修改"
3495 3500
3496 #. type: Content of: <book><chapter><sect1><sect2><para> 3501 #. type: Content of: <book><chapter><sect1><sect2><para>
3497 #: ../en/ch01-tour-basic.xml:687 3502 #: ../en/ch01-tour-basic.xml:686
3498 msgid "" 3503 msgid ""
3499 "To get started, let's clone our original <filename class=\"directory\">hello</" 3504 "To get started, let's clone our original <filename class=\"directory\">hello</"
3500 "filename> repository, which does not contain the change we just committed. " 3505 "filename> repository, which does not contain the change we just committed. "
3501 "We'll call our temporary repository <filename class=\"directory\">hello-pull</" 3506 "We'll call our temporary repository <filename class=\"directory\">hello-pull</"
3502 "filename>." 3507 "filename>."
3503 msgstr "" 3508 msgstr ""
3504 3509
3505 #. type: Content of: <book><chapter><sect1><sect2><para> 3510 #. type: Content of: <book><chapter><sect1><sect2><para>
3506 #: ../en/ch01-tour-basic.xml:695 3511 #: ../en/ch01-tour-basic.xml:694
3507 msgid "" 3512 msgid ""
3508 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring " 3513 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring "
3509 "changes from <filename class=\"directory\">my-hello</filename> into <filename " 3514 "changes from <filename class=\"directory\">my-hello</filename> into <filename "
3510 "class=\"directory\">hello-pull</filename>. However, blindly pulling unknown " 3515 "class=\"directory\">hello-pull</filename>. However, blindly pulling unknown "
3511 "changes into a repository is a somewhat scary prospect. Mercurial provides " 3516 "changes into a repository is a somewhat scary prospect. Mercurial provides "
3514 "<emphasis>would</emphasis> pull into the repository, without actually pulling " 3519 "<emphasis>would</emphasis> pull into the repository, without actually pulling "
3515 "the changes in." 3520 "the changes in."
3516 msgstr "" 3521 msgstr ""
3517 3522
3518 #. type: Content of: <book><chapter><sect1><sect2><para> 3523 #. type: Content of: <book><chapter><sect1><sect2><para>
3519 #: ../en/ch01-tour-basic.xml:708 3524 #: ../en/ch01-tour-basic.xml:707
3520 msgid "" 3525 msgid ""
3521 "(Of course, someone could cause more changesets to appear in the repository " 3526 "(Of course, someone could cause more changesets to appear in the repository "
3522 "that we ran <command role=\"hg-cmd\">hg incoming</command> in, before we get " 3527 "that we ran <command role=\"hg-cmd\">hg incoming</command> in, before we get "
3523 "a chance to <command role=\"hg-cmd\">hg pull</command> the changes, so that " 3528 "a chance to <command role=\"hg-cmd\">hg pull</command> the changes, so that "
3524 "we could end up pulling changes that we didn't expect.)" 3529 "we could end up pulling changes that we didn't expect.)"
3525 msgstr "" 3530 msgstr ""
3526 3531
3527 #. type: Content of: <book><chapter><sect1><sect2><para> 3532 #. type: Content of: <book><chapter><sect1><sect2><para>
3528 #: ../en/ch01-tour-basic.xml:715 3533 #: ../en/ch01-tour-basic.xml:714
3529 msgid "" 3534 msgid ""
3530 "Bringing changes into a repository is a simple matter of running the <command " 3535 "Bringing changes into a repository is a simple matter of running the <command "
3531 "role=\"hg-cmd\">hg pull</command> command, and telling it which repository to " 3536 "role=\"hg-cmd\">hg pull</command> command, and telling it which repository to "
3532 "pull from." 3537 "pull from."
3533 msgstr "" 3538 msgstr ""
3534 3539
3535 #. type: Content of: <book><chapter><sect1><sect2><para> 3540 #. type: Content of: <book><chapter><sect1><sect2><para>
3536 #: ../en/ch01-tour-basic.xml:722 3541 #: ../en/ch01-tour-basic.xml:721
3537 msgid "" 3542 msgid ""
3538 "As you can see from the before-and-after output of <command role=\"hg-cmd" 3543 "As you can see from the before-and-after output of <command role=\"hg-cmd"
3539 "\">hg tip</command>, we have successfully pulled changes into our " 3544 "\">hg tip</command>, we have successfully pulled changes into our "
3540 "repository. There remains one step before we can see these changes in the " 3545 "repository. There remains one step before we can see these changes in the "
3541 "working directory." 3546 "working directory."
3542 msgstr "" 3547 msgstr ""
3543 3548
3544 #. type: Content of: <book><chapter><sect1><sect2><title> 3549 #. type: Content of: <book><chapter><sect1><sect2><title>
3545 #: ../en/ch01-tour-basic.xml:730 3550 #: ../en/ch01-tour-basic.xml:729
3546 msgid "Updating the working directory" 3551 msgid "Updating the working directory"
3547 msgstr "更新工作目录" 3552 msgstr "更新工作目录"
3548 3553
3549 #. type: Content of: <book><chapter><sect1><sect2><para> 3554 #. type: Content of: <book><chapter><sect1><sect2><para>
3550 #: ../en/ch01-tour-basic.xml:732 3555 #: ../en/ch01-tour-basic.xml:731
3551 msgid "" 3556 msgid ""
3552 "We have so far glossed over the relationship between a repository and its " 3557 "We have so far glossed over the relationship between a repository and its "
3553 "working directory. The <command role=\"hg-cmd\">hg pull</command> command " 3558 "working directory. The <command role=\"hg-cmd\">hg pull</command> command "
3554 "that we ran in section <xref linkend=\"sec.tour.pull\"/> brought changes into " 3559 "that we ran in <xref linkend=\"sec:tour:pull\"/> brought changes into the "
3555 "the repository, but if we check, there's no sign of those changes in the " 3560 "repository, but if we check, there's no sign of those changes in the working "
3556 "working directory. This is because <command role=\"hg-cmd\">hg pull</" 3561 "directory. This is because <command role=\"hg-cmd\">hg pull</command> does "
3557 "command> does not (by default) touch the working directory. Instead, we use " 3562 "not (by default) touch the working directory. Instead, we use the <command "
3558 "the <command role=\"hg-cmd\">hg update</command> command to do this." 3563 "role=\"hg-cmd\">hg update</command> command to do this."
3559 msgstr "" 3564 msgstr ""
3560 3565
3561 #. type: Content of: <book><chapter><sect1><sect2><para> 3566 #. type: Content of: <book><chapter><sect1><sect2><para>
3562 #: ../en/ch01-tour-basic.xml:744 3567 #: ../en/ch01-tour-basic.xml:743
3563 msgid "" 3568 msgid ""
3564 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> " 3569 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> "
3565 "doesn't update the working directory automatically. There's actually a good " 3570 "doesn't update the working directory automatically. There's actually a good "
3566 "reason for this: you can use <command role=\"hg-cmd\">hg update</command> to " 3571 "reason for this: you can use <command role=\"hg-cmd\">hg update</command> to "
3567 "update the working directory to the state it was in at <emphasis>any " 3572 "update the working directory to the state it was in at <emphasis>any "
3571 "automatically updated the working directory to a new revision, you might not " 3576 "automatically updated the working directory to a new revision, you might not "
3572 "be terribly happy." 3577 "be terribly happy."
3573 msgstr "" 3578 msgstr ""
3574 3579
3575 #. type: Content of: <book><chapter><sect1><sect2><para> 3580 #. type: Content of: <book><chapter><sect1><sect2><para>
3576 #: ../en/ch01-tour-basic.xml:755 3581 #: ../en/ch01-tour-basic.xml:754
3577 msgid "" 3582 msgid ""
3578 "However, since pull-then-update is such a common thing to do, Mercurial lets " 3583 "However, since pull-then-update is such a common thing to do, Mercurial lets "
3579 "you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> " 3584 "you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> "
3580 "option to <command role=\"hg-cmd\">hg pull</command>." 3585 "option to <command role=\"hg-cmd\">hg pull</command>."
3581 msgstr "" 3586 msgstr ""
3582 3587
3583 #. type: Content of: <book><chapter><sect1><sect2><para> 3588 #. type: Content of: <book><chapter><sect1><sect2><para>
3584 #: ../en/ch01-tour-basic.xml:760 3589 #: ../en/ch01-tour-basic.xml:759
3585 msgid "" 3590 msgid ""
3586 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> " 3591 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> "
3587 "in section <xref linkend=\"sec.tour.pull\"/> when we ran it without <option " 3592 "in <xref linkend=\"sec:tour:pull\"/> when we ran it without <option role=\"hg-"
3588 "role=\"hg-opt-pull\">-u</option>, you can see that it printed a helpful " 3593 "opt-pull\">-u</option>, you can see that it printed a helpful reminder that "
3589 "reminder that we'd have to take an explicit step to update the working " 3594 "we'd have to take an explicit step to update the working directory:"
3590 "directory:" 3595 msgstr ""
3591 msgstr "" 3596
3592 3597 #. type: Content of: <book><chapter><sect1><sect2><para>
3593 #. type: Content of: <book><chapter><sect1><sect2><para> 3598 #: ../en/ch01-tour-basic.xml:768
3594 #: ../en/ch01-tour-basic.xml:769
3595 msgid "" 3599 msgid ""
3596 "To find out what revision the working directory is at, use the <command role=" 3600 "To find out what revision the working directory is at, use the <command role="
3597 "\"hg-cmd\">hg parents</command> command." 3601 "\"hg-cmd\">hg parents</command> command."
3598 msgstr "" 3602 msgstr ""
3599 3603
3600 #. type: Content of: <book><chapter><sect1><sect2><para> 3604 #. type: Content of: <book><chapter><sect1><sect2><para>
3601 #: ../en/ch01-tour-basic.xml:775 3605 #: ../en/ch01-tour-basic.xml:774
3602 msgid "" 3606 msgid ""
3603 "If you look back at figure <xref endterm=\"fig.tour-basic.history.caption\" " 3607 "If you look back at <xref linkend=\"fig:tour-basic:history\"/>, you'll see "
3604 "linkend=\"fig.tour-basic.history\"/>, you'll see arrows connecting each " 3608 "arrows connecting each changeset. The node that the arrow leads "
3605 "changeset. The node that the arrow leads <emphasis>from</emphasis> in each " 3609 "<emphasis>from</emphasis> in each case is a parent, and the node that the "
3606 "case is a parent, and the node that the arrow leads <emphasis>to</emphasis> " 3610 "arrow leads <emphasis>to</emphasis> is its child. The working directory has "
3607 "is its child. The working directory has a parent in just the same way; this " 3611 "a parent in just the same way; this is the changeset that the working "
3608 "is the changeset that the working directory currently contains." 3612 "directory currently contains."
3609 msgstr "" 3613 msgstr ""
3610 3614
3611 #. type: Content of: <book><chapter><sect1><sect2><para> 3615 #. type: Content of: <book><chapter><sect1><sect2><para>
3612 #: ../en/ch01-tour-basic.xml:785 3616 #: ../en/ch01-tour-basic.xml:783
3613 msgid "" 3617 msgid ""
3614 "To update the working directory to a particular revision, give a revision " 3618 "To update the working directory to a particular revision, give a revision "
3615 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " 3619 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> "
3616 "command." 3620 "command."
3617 msgstr "" 3621 msgstr ""
3618 3622
3619 #. type: Content of: <book><chapter><sect1><sect2><para> 3623 #. type: Content of: <book><chapter><sect1><sect2><para>
3620 #: ../en/ch01-tour-basic.xml:792 3624 #: ../en/ch01-tour-basic.xml:790
3621 msgid "" 3625 msgid ""
3622 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</" 3626 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</"
3623 "command> will update to the tip revision, as shown by the second call to " 3627 "command> will update to the tip revision, as shown by the second call to "
3624 "<command role=\"hg-cmd\">hg update</command> in the example above." 3628 "<command role=\"hg-cmd\">hg update</command> in the example above."
3625 msgstr "" 3629 msgstr ""
3626 3630
3627 #. type: Content of: <book><chapter><sect1><sect2><title> 3631 #. type: Content of: <book><chapter><sect1><sect2><title>
3628 #: ../en/ch01-tour-basic.xml:800 3632 #: ../en/ch01-tour-basic.xml:798
3629 msgid "Pushing changes to another repository" 3633 msgid "Pushing changes to another repository"
3630 msgstr "发布修改到其它版本库" 3634 msgstr "发布修改到其它版本库"
3631 3635
3632 #. type: Content of: <book><chapter><sect1><sect2><para> 3636 #. type: Content of: <book><chapter><sect1><sect2><para>
3633 #: ../en/ch01-tour-basic.xml:802 3637 #: ../en/ch01-tour-basic.xml:800
3634 msgid "" 3638 msgid ""
3635 "Mercurial lets us push changes to another repository, from the repository " 3639 "Mercurial lets us push changes to another repository, from the repository "
3636 "we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 3640 "we're currently visiting. As with the example of <command role=\"hg-cmd\">hg "
3637 "pull</command> above, we'll create a temporary repository to push our changes " 3641 "pull</command> above, we'll create a temporary repository to push our changes "
3638 "into." 3642 "into."
3639 msgstr "" 3643 msgstr ""
3640 3644
3641 #. type: Content of: <book><chapter><sect1><sect2><para> 3645 #. type: Content of: <book><chapter><sect1><sect2><para>
3642 #: ../en/ch01-tour-basic.xml:810 3646 #: ../en/ch01-tour-basic.xml:808
3643 msgid "" 3647 msgid ""
3644 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " 3648 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what "
3645 "changes would be pushed into another repository." 3649 "changes would be pushed into another repository."
3646 msgstr "" 3650 msgstr ""
3647 3651
3648 #. type: Content of: <book><chapter><sect1><sect2><para> 3652 #. type: Content of: <book><chapter><sect1><sect2><para>
3649 #: ../en/ch01-tour-basic.xml:816 3653 #: ../en/ch01-tour-basic.xml:814
3650 msgid "" 3654 msgid ""
3651 "And the <command role=\"hg-cmd\">hg push</command> command does the actual " 3655 "And the <command role=\"hg-cmd\">hg push</command> command does the actual "
3652 "push." 3656 "push."
3653 msgstr "" 3657 msgstr ""
3654 3658
3655 #. type: Content of: <book><chapter><sect1><sect2><para> 3659 #. type: Content of: <book><chapter><sect1><sect2><para>
3656 #: ../en/ch01-tour-basic.xml:822 3660 #: ../en/ch01-tour-basic.xml:820
3657 msgid "" 3661 msgid ""
3658 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd" 3662 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd"
3659 "\">hg push</command> command does not update the working directory in the " 3663 "\">hg push</command> command does not update the working directory in the "
3660 "repository that it's pushing changes into. (Unlike <command role=\"hg-cmd" 3664 "repository that it's pushing changes into. (Unlike <command role=\"hg-cmd"
3661 "\">hg pull</command>, <command role=\"hg-cmd\">hg push</command> does not " 3665 "\">hg pull</command>, <command role=\"hg-cmd\">hg push</command> does not "
3662 "provide a <literal>-u</literal> option that updates the other repository's " 3666 "provide a <literal>-u</literal> option that updates the other repository's "
3663 "working directory.)" 3667 "working directory.)"
3664 msgstr "" 3668 msgstr ""
3665 3669
3666 #. type: Content of: <book><chapter><sect1><sect2><para> 3670 #. type: Content of: <book><chapter><sect1><sect2><para>
3667 #: ../en/ch01-tour-basic.xml:831 3671 #: ../en/ch01-tour-basic.xml:829
3668 msgid "" 3672 msgid ""
3669 "What happens if we try to pull or push changes and the receiving repository " 3673 "What happens if we try to pull or push changes and the receiving repository "
3670 "already has those changes? Nothing too exciting." 3674 "already has those changes? Nothing too exciting."
3671 msgstr "" 3675 msgstr ""
3672 3676
3673 #. type: Content of: <book><chapter><sect1><sect2><title> 3677 #. type: Content of: <book><chapter><sect1><sect2><title>
3674 #: ../en/ch01-tour-basic.xml:838 3678 #: ../en/ch01-tour-basic.xml:836
3675 msgid "Sharing changes over a network" 3679 msgid "Sharing changes over a network"
3676 msgstr "通过网络共享修改" 3680 msgstr "通过网络共享修改"
3677 3681
3678 #. type: Content of: <book><chapter><sect1><sect2><para> 3682 #. type: Content of: <book><chapter><sect1><sect2><para>
3679 #: ../en/ch01-tour-basic.xml:840 3683 #: ../en/ch01-tour-basic.xml:838
3680 msgid "" 3684 msgid ""
3681 "The commands we have covered in the previous few sections are not limited to " 3685 "The commands we have covered in the previous few sections are not limited to "
3682 "working with local repositories. Each works in exactly the same fashion over " 3686 "working with local repositories. Each works in exactly the same fashion over "
3683 "a network connection; simply pass in a URL instead of a local path." 3687 "a network connection; simply pass in a URL instead of a local path."
3684 msgstr "" 3688 msgstr ""
3685 3689
3686 #. type: Content of: <book><chapter><sect1><sect2><para> 3690 #. type: Content of: <book><chapter><sect1><sect2><para>
3687 #: ../en/ch01-tour-basic.xml:848 3691 #: ../en/ch01-tour-basic.xml:846
3688 msgid "" 3692 msgid ""
3689 "In this example, we can see what changes we could push to the remote " 3693 "In this example, we can see what changes we could push to the remote "
3690 "repository, but the repository is understandably not set up to let anonymous " 3694 "repository, but the repository is understandably not set up to let anonymous "
3691 "users push to it." 3695 "users push to it."
3692 msgstr "" 3696 msgstr ""
3744 #. type: Content of: <book><chapter><sect1><para> 3748 #. type: Content of: <book><chapter><sect1><para>
3745 #: ../en/ch02-tour-merge.xml:37 3749 #: ../en/ch02-tour-merge.xml:37
3746 msgid "" 3750 msgid ""
3747 "We should now have two copies of <filename>hello.c</filename> with different " 3751 "We should now have two copies of <filename>hello.c</filename> with different "
3748 "contents. The histories of the two repositories have also diverged, as " 3752 "contents. The histories of the two repositories have also diverged, as "
3749 "illustrated in figure <xref endterm=\"fig.tour-merge.sep-repos.caption\" " 3753 "illustrated in <xref linkend=\"fig:tour-merge:sep-repos\"/>."
3750 "linkend=\"fig.tour-merge.sep-repos\"/>." 3754 msgstr ""
3751 msgstr "" 3755
3752 3756 #. type: Content of: <book><chapter><sect1><figure><title>
3753 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 3757 #: ../en/ch02-tour-merge.xml:46
3754 #: ../en/ch02-tour-merge.xml:47
3755 msgid ""
3756 "<imageobject><imagedata fileref=\"images/tour-merge-sep-repos.png\"/></"
3757 "imageobject>"
3758 msgstr ""
3759
3760 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para>
3761 #: ../en/ch02-tour-merge.xml:49
3762 msgid "" 3758 msgid ""
3763 "Divergent recent histories of the <filename class=\"directory\">my-hello</" 3759 "Divergent recent histories of the <filename class=\"directory\">my-hello</"
3764 "filename> and <filename class=\"directory\">my-new-hello</filename> " 3760 "filename> and <filename class=\"directory\">my-new-hello</filename> "
3765 "repositories" 3761 "repositories"
3766 msgstr "" 3762 msgstr ""
3767 3763
3768 #. type: Content of: <book><chapter><sect1><para> 3764 #. type: Content of: <book><chapter><sect1><figure><mediaobject>
3769 #: ../en/ch02-tour-merge.xml:57 3765 #: ../en/ch02-tour-merge.xml:51
3766 msgid ""
3767 "<imageobject><imagedata fileref=\"figs/tour-merge-sep-repos.png\"/></"
3768 "imageobject>"
3769 msgstr ""
3770
3771 #. type: Content of: <book><chapter><sect1><para>
3772 #: ../en/ch02-tour-merge.xml:56
3770 msgid "" 3773 msgid ""
3771 "We already know that pulling changes from our <filename class=\"directory" 3774 "We already know that pulling changes from our <filename class=\"directory"
3772 "\">my-hello</filename> repository will have no effect on the working " 3775 "\">my-hello</filename> repository will have no effect on the working "
3773 "directory." 3776 "directory."
3774 msgstr "" 3777 msgstr ""
3775 3778
3776 #. type: Content of: <book><chapter><sect1><para> 3779 #. type: Content of: <book><chapter><sect1><para>
3777 #: ../en/ch02-tour-merge.xml:63 3780 #: ../en/ch02-tour-merge.xml:62
3778 msgid "" 3781 msgid ""
3779 "However, the <command role=\"hg-cmd\">hg pull</command> command says " 3782 "However, the <command role=\"hg-cmd\">hg pull</command> command says "
3780 "something about <quote>heads</quote>." 3783 "something about <quote>heads</quote>."
3781 msgstr "" 3784 msgstr ""
3782 3785
3783 #. type: Content of: <book><chapter><sect1><sect2><title> 3786 #. type: Content of: <book><chapter><sect1><sect2><title>
3784 #: ../en/ch02-tour-merge.xml:67 3787 #: ../en/ch02-tour-merge.xml:66
3785 msgid "Head changesets" 3788 msgid "Head changesets"
3786 msgstr "顶点改变集" 3789 msgstr "顶点改变集"
3787 3790
3788 #. type: Content of: <book><chapter><sect1><sect2><para> 3791 #. type: Content of: <book><chapter><sect1><sect2><para>
3789 #: ../en/ch02-tour-merge.xml:69 3792 #: ../en/ch02-tour-merge.xml:68
3790 msgid "" 3793 msgid ""
3791 "A head is a change that has no descendants, or children, as they're also " 3794 "A head is a change that has no descendants, or children, as they're also "
3792 "known. The tip revision is thus a head, because the newest revision in a " 3795 "known. The tip revision is thus a head, because the newest revision in a "
3793 "repository doesn't have any children, but a repository can contain more than " 3796 "repository doesn't have any children, but a repository can contain more than "
3794 "one head." 3797 "one head."
3795 msgstr "" 3798 msgstr ""
3796 3799
3797 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 3800 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
3798 #: ../en/ch02-tour-merge.xml:77 3801 #: ../en/ch02-tour-merge.xml:75
3799 msgid ""
3800 "<imageobject><imagedata fileref=\"images/tour-merge-pull.png\"/></imageobject>"
3801 msgstr ""
3802
3803 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
3804 #: ../en/ch02-tour-merge.xml:79
3805 msgid "" 3802 msgid ""
3806 "Repository contents after pulling from <filename class=\"directory\">my-" 3803 "Repository contents after pulling from <filename class=\"directory\">my-"
3807 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>" 3804 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>"
3808 msgstr "" 3805 msgstr ""
3809 3806
3810 #. type: Content of: <book><chapter><sect1><sect2><para> 3807 #. type: Content of: <book><chapter><sect1><sect2><figure>
3811 #: ../en/ch02-tour-merge.xml:85 3808 #: ../en/ch02-tour-merge.xml:78 ../en/ch02-tour-merge.xml:125
3812 msgid "" 3809 #: ../en/ch02-tour-merge.xml:250 ../en/ch03-concepts.xml:55
3813 "In figure <xref endterm=\"fig.tour-merge.pull.caption\" linkend=\"fig.tour-" 3810 #: ../en/ch03-concepts.xml:104 ../en/ch03-concepts.xml:189
3814 "merge.pull\"/>, you can see the effect of the pull from <filename class=" 3811 #: ../en/ch03-concepts.xml:344 ../en/ch03-concepts.xml:359
3815 "\"directory\">my-hello</filename> into <filename class=\"directory\">my-new-" 3812 #: ../en/ch03-concepts.xml:400 ../en/ch03-concepts.xml:420
3816 "hello</filename>. The history that was already present in <filename class=" 3813 #: ../en/ch03-concepts.xml:461 ../en/ch05-collab.xml:274
3817 "\"directory\">my-new-hello</filename> is untouched, but a new revision has " 3814 #: ../en/ch08-undo.xml:363 ../en/ch08-undo.xml:410 ../en/ch08-undo.xml:475
3818 "been added. By referring to figure <xref endterm=\"fig.tour-merge.sep-repos." 3815 #: ../en/ch08-undo.xml:513 ../en/ch11-mq.xml:410
3819 "caption\" linkend=\"fig.tour-merge.sep-repos\"/>, we can see that the " 3816 msgid " <placeholder type=\"mediaobject\" id=\"0\"/>"
3820 "<emphasis>changeset ID</emphasis> remains the same in the new repository, but " 3817 msgstr ""
3821 "the <emphasis>revision number</emphasis> has changed. (This, incidentally, " 3818
3822 "is a fine example of why it's not safe to use revision numbers when " 3819 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
3823 "discussing changesets.) We can view the heads in a repository using the " 3820 #: ../en/ch02-tour-merge.xml:79
3824 "<command role=\"hg-cmd\">hg heads</command> command." 3821 msgid ""
3822 "<imageobject> <imagedata fileref=\"figs/tour-merge-pull.png\"/> </imageobject>"
3823 msgstr ""
3824
3825 #. type: Content of: <book><chapter><sect1><sect2><para>
3826 #: ../en/ch02-tour-merge.xml:86
3827 msgid ""
3828 "In <xref linkend=\"fig:tour-merge:pull\"/>, you can see the effect of the "
3829 "pull from <filename class=\"directory\">my-hello</filename> into <filename "
3830 "class=\"directory\">my-new-hello</filename>. The history that was already "
3831 "present in <filename class=\"directory\">my-new-hello</filename> is "
3832 "untouched, but a new revision has been added. By referring to <xref linkend="
3833 "\"fig:tour-merge:sep-repos\"/>, we can see that the <emphasis>changeset ID</"
3834 "emphasis> remains the same in the new repository, but the <emphasis>revision "
3835 "number</emphasis> has changed. (This, incidentally, is a fine example of why "
3836 "it's not safe to use revision numbers when discussing changesets.) We can "
3837 "view the heads in a repository using the <command role=\"hg-cmd\">hg heads</"
3838 "command> command."
3825 msgstr "" 3839 msgstr ""
3826 3840
3827 #. type: Content of: <book><chapter><sect1><sect2><title> 3841 #. type: Content of: <book><chapter><sect1><sect2><title>
3828 #: ../en/ch02-tour-merge.xml:106 3842 #: ../en/ch02-tour-merge.xml:105
3829 msgid "Performing the merge" 3843 msgid "Performing the merge"
3830 msgstr "执行合并" 3844 msgstr "执行合并"
3831 3845
3832 #. type: Content of: <book><chapter><sect1><sect2><para> 3846 #. type: Content of: <book><chapter><sect1><sect2><para>
3833 #: ../en/ch02-tour-merge.xml:108 3847 #: ../en/ch02-tour-merge.xml:107
3834 msgid "" 3848 msgid ""
3835 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</" 3849 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</"
3836 "command> command to update to the new tip?" 3850 "command> command to update to the new tip?"
3837 msgstr "" 3851 msgstr ""
3838 3852
3839 #. type: Content of: <book><chapter><sect1><sect2><para> 3853 #. type: Content of: <book><chapter><sect1><sect2><para>
3840 #: ../en/ch02-tour-merge.xml:114 3854 #: ../en/ch02-tour-merge.xml:113
3841 msgid "" 3855 msgid ""
3842 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> " 3856 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> "
3843 "command won't do a merge; it won't update the working directory when it " 3857 "command won't do a merge; it won't update the working directory when it "
3844 "thinks we might be wanting to do a merge, unless we force it to do so. " 3858 "thinks we might be wanting to do a merge, unless we force it to do so. "
3845 "Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to " 3859 "Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to "
3846 "merge the two heads." 3860 "merge the two heads."
3847 msgstr "" 3861 msgstr ""
3848 3862
3849 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 3863 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
3850 #: ../en/ch02-tour-merge.xml:125 3864 #: ../en/ch02-tour-merge.xml:123
3851 msgid "" 3865 msgid "Working directory and repository during merge, and following commit"
3852 "<imageobject><imagedata fileref=\"images/tour-merge-merge.png\"/></" 3866 msgstr ""
3867
3868 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
3869 #: ../en/ch02-tour-merge.xml:126
3870 msgid ""
3871 "<imageobject> <imagedata fileref=\"figs/tour-merge-merge.png\"/> </"
3853 "imageobject>" 3872 "imageobject>"
3854 msgstr "" 3873 msgstr ""
3855 3874
3856 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 3875 #. type: Content of: <book><chapter><sect1><sect2><para>
3857 #: ../en/ch02-tour-merge.xml:127 3876 #: ../en/ch02-tour-merge.xml:133
3858 msgid "Working directory and repository during merge, and following commit"
3859 msgstr ""
3860
3861 #. type: Content of: <book><chapter><sect1><sect2><para>
3862 #: ../en/ch02-tour-merge.xml:132
3863 msgid "" 3877 msgid ""
3864 "This updates the working directory so that it contains changes from " 3878 "This updates the working directory so that it contains changes from "
3865 "<emphasis>both</emphasis> heads, which is reflected in both the output of " 3879 "<emphasis>both</emphasis> heads, which is reflected in both the output of "
3866 "<command role=\"hg-cmd\">hg parents</command> and the contents of " 3880 "<command role=\"hg-cmd\">hg parents</command> and the contents of "
3867 "<filename>hello.c</filename>." 3881 "<filename>hello.c</filename>."
3868 msgstr "" 3882 msgstr ""
3869 3883
3870 #. type: Content of: <book><chapter><sect1><sect2><title> 3884 #. type: Content of: <book><chapter><sect1><sect2><title>
3871 #: ../en/ch02-tour-merge.xml:142 3885 #: ../en/ch02-tour-merge.xml:143
3872 msgid "Committing the results of the merge" 3886 msgid "Committing the results of the merge"
3873 msgstr "提交合并结果" 3887 msgstr "提交合并结果"
3874 3888
3875 #. type: Content of: <book><chapter><sect1><sect2><para> 3889 #. type: Content of: <book><chapter><sect1><sect2><para>
3876 #: ../en/ch02-tour-merge.xml:144 3890 #: ../en/ch02-tour-merge.xml:145
3877 msgid "" 3891 msgid ""
3878 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> " 3892 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> "
3879 "will display two parents until we <command role=\"hg-cmd\">hg commit</" 3893 "will display two parents until we <command role=\"hg-cmd\">hg commit</"
3880 "command> the results of the merge." 3894 "command> the results of the merge."
3881 msgstr "" 3895 msgstr ""
3882 3896
3883 #. type: Content of: <book><chapter><sect1><sect2><para> 3897 #. type: Content of: <book><chapter><sect1><sect2><para>
3884 #: ../en/ch02-tour-merge.xml:151 3898 #: ../en/ch02-tour-merge.xml:152
3885 msgid "" 3899 msgid ""
3886 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> " 3900 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> "
3887 "of our former heads as its parents. These are the same revisions that were " 3901 "of our former heads as its parents. These are the same revisions that were "
3888 "previously displayed by <command role=\"hg-cmd\">hg parents</command>." 3902 "previously displayed by <command role=\"hg-cmd\">hg parents</command>."
3889 msgstr "" 3903 msgstr ""
3890 3904
3891 #. type: Content of: <book><chapter><sect1><sect2><para> 3905 #. type: Content of: <book><chapter><sect1><sect2><para>
3892 #: ../en/ch02-tour-merge.xml:158 3906 #: ../en/ch02-tour-merge.xml:159
3893 msgid "" 3907 msgid ""
3894 "In figure <xref endterm=\"fig.tour-merge.merge.caption\" linkend=\"fig.tour-" 3908 "In <xref linkend=\"fig:tour-merge:merge\"/>, you can see a representation of "
3895 "merge.merge\"/>, you can see a representation of what happens to the working " 3909 "what happens to the working directory during the merge, and how this affects "
3896 "directory during the merge, and how this affects the repository when the " 3910 "the repository when the commit happens. During the merge, the working "
3897 "commit happens. During the merge, the working directory has two parent " 3911 "directory has two parent changesets, and these become the parents of the new "
3898 "changesets, and these become the parents of the new changeset." 3912 "changeset."
3899 msgstr "" 3913 msgstr ""
3900 3914
3901 #. type: Content of: <book><chapter><sect1><title> 3915 #. type: Content of: <book><chapter><sect1><title>
3902 #: ../en/ch02-tour-merge.xml:169 3916 #: ../en/ch02-tour-merge.xml:170
3903 msgid "Merging conflicting changes" 3917 msgid "Merging conflicting changes"
3904 msgstr "合并有冲突的改变" 3918 msgstr "合并有冲突的改变"
3905 3919
3906 #. type: Content of: <book><chapter><sect1><para> 3920 #. type: Content of: <book><chapter><sect1><para>
3907 #: ../en/ch02-tour-merge.xml:171 3921 #: ../en/ch02-tour-merge.xml:172
3908 msgid "" 3922 msgid ""
3909 "Most merges are simple affairs, but sometimes you'll find yourself merging " 3923 "Most merges are simple affairs, but sometimes you'll find yourself merging "
3910 "changes where each modifies the same portions of the same files. Unless both " 3924 "changes where each modifies the same portions of the same files. Unless both "
3911 "modifications are identical, this results in a <emphasis>conflict</emphasis>, " 3925 "modifications are identical, this results in a <emphasis>conflict</emphasis>, "
3912 "where you have to decide how to reconcile the different changes into " 3926 "where you have to decide how to reconcile the different changes into "
3913 "something coherent." 3927 "something coherent."
3914 msgstr "" 3928 msgstr ""
3915 3929
3916 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 3930 #. type: Content of: <book><chapter><sect1><figure><title>
3917 #: ../en/ch02-tour-merge.xml:180 3931 #: ../en/ch02-tour-merge.xml:180
3918 msgid "" 3932 msgid "Conflicting changes to a document"
3919 "<imageobject><imagedata fileref=\"images/tour-merge-conflict.png\"/> </" 3933 msgstr ""
3934
3935 #. type: Content of: <book><chapter><sect1><figure><mediaobject>
3936 #: ../en/ch02-tour-merge.xml:182
3937 msgid ""
3938 "<imageobject><imagedata fileref=\"figs/tour-merge-conflict.png\"/></"
3920 "imageobject>" 3939 "imageobject>"
3921 msgstr "" 3940 msgstr ""
3922 3941
3923 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> 3942 #. type: Content of: <book><chapter><sect1><para>
3924 #: ../en/ch02-tour-merge.xml:183 3943 #: ../en/ch02-tour-merge.xml:187
3925 msgid "Conflicting changes to a document" 3944 msgid ""
3926 msgstr "" 3945 "<xref linkend=\"fig:tour-merge:conflict\"/> illustrates an instance of two "
3927 3946 "conflicting changes to a document. We started with a single version of the "
3928 #. type: Content of: <book><chapter><sect1><para> 3947 "file; then we made some changes; while someone else made different changes to "
3929 #: ../en/ch02-tour-merge.xml:188 3948 "the same text. Our task in resolving the conflicting changes is to decide "
3930 msgid "" 3949 "what the file should look like."
3931 "Figure <xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-" 3950 msgstr ""
3932 "merge.conflict\"/> illustrates an instance of two conflicting changes to a " 3951
3933 "document. We started with a single version of the file; then we made some " 3952 #. type: Content of: <book><chapter><sect1><para>
3934 "changes; while someone else made different changes to the same text. Our " 3953 #: ../en/ch02-tour-merge.xml:194
3935 "task in resolving the conflicting changes is to decide what the file should "
3936 "look like."
3937 msgstr ""
3938
3939 #. type: Content of: <book><chapter><sect1><para>
3940 #: ../en/ch02-tour-merge.xml:196
3941 msgid "" 3954 msgid ""
3942 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, " 3955 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, "
3943 "it runs an external program called <command>hgmerge</command>. This is a " 3956 "it runs an external program called <command>hgmerge</command>. This is a "
3944 "shell script that is bundled with Mercurial; you can change it to behave " 3957 "shell script that is bundled with Mercurial; you can change it to behave "
3945 "however you please. What it does by default is try to find one of several " 3958 "however you please. What it does by default is try to find one of several "
3948 "(because the resolution process requires human guidance) or aren't present, " 3961 "(because the resolution process requires human guidance) or aren't present, "
3949 "the script tries a few different graphical merging tools." 3962 "the script tries a few different graphical merging tools."
3950 msgstr "" 3963 msgstr ""
3951 3964
3952 #. type: Content of: <book><chapter><sect1><para> 3965 #. type: Content of: <book><chapter><sect1><para>
3953 #: ../en/ch02-tour-merge.xml:207 3966 #: ../en/ch02-tour-merge.xml:205
3954 msgid "" 3967 msgid ""
3955 "It's also possible to get Mercurial to run another program or script instead " 3968 "It's also possible to get Mercurial to run another program or script instead "
3956 "of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> " 3969 "of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> "
3957 "environment variable to the name of your preferred program." 3970 "environment variable to the name of your preferred program."
3958 msgstr "" 3971 msgstr ""
3959 3972
3960 #. type: Content of: <book><chapter><sect1><sect2><title> 3973 #. type: Content of: <book><chapter><sect1><sect2><title>
3961 #: ../en/ch02-tour-merge.xml:213 3974 #: ../en/ch02-tour-merge.xml:211
3962 msgid "Using a graphical merge tool" 3975 msgid "Using a graphical merge tool"
3963 msgstr "使用图形合并工具" 3976 msgstr "使用图形合并工具"
3964 3977
3965 #. type: Content of: <book><chapter><sect1><sect2><para> 3978 #. type: Content of: <book><chapter><sect1><sect2><para>
3966 #: ../en/ch02-tour-merge.xml:215 3979 #: ../en/ch02-tour-merge.xml:213
3967 msgid "" 3980 msgid ""
3968 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll " 3981 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll "
3969 "use to describe the features that are common to graphical file merging " 3982 "use to describe the features that are common to graphical file merging "
3970 "tools. You can see a screenshot of <command>kdiff3</command> in action in " 3983 "tools. You can see a screenshot of <command>kdiff3</command> in action in "
3971 "figure <xref endterm=\"fig.tour-merge.kdiff3.caption\" linkend=\"fig.tour-" 3984 "<xref linkend=\"fig:tour-merge:kdiff3\"/>. The kind of merge it is "
3972 "merge.kdiff3\"/>. The kind of merge it is performing is called a " 3985 "performing is called a <emphasis>three-way merge</emphasis>, because there "
3973 "<emphasis>three-way merge</emphasis>, because there are three different " 3986 "are three different versions of the file of interest to us. The tool thus "
3974 "versions of the file of interest to us. The tool thus splits the upper " 3987 "splits the upper portion of the window into three panes:"
3975 "portion of the window into three panes:"
3976 msgstr "" 3988 msgstr ""
3977 3989
3978 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 3990 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3979 #: ../en/ch02-tour-merge.xml:226 3991 #: ../en/ch02-tour-merge.xml:223
3980 msgid "" 3992 msgid ""
3981 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the " 3993 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the "
3982 "most recent version from which the two versions we're trying to merge are " 3994 "most recent version from which the two versions we're trying to merge are "
3983 "descended." 3995 "descended."
3984 msgstr "" 3996 msgstr ""
3985 3997
3986 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 3998 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3987 #: ../en/ch02-tour-merge.xml:231 3999 #: ../en/ch02-tour-merge.xml:228
3988 msgid "" 4000 msgid ""
3989 "In the middle is <quote>our</quote> version of the file, with the contents " 4001 "In the middle is <quote>our</quote> version of the file, with the contents "
3990 "that we modified." 4002 "that we modified."
3991 msgstr "" 4003 msgstr ""
3992 4004
3993 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4005 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3994 #: ../en/ch02-tour-merge.xml:234 4006 #: ../en/ch02-tour-merge.xml:231
3995 msgid "" 4007 msgid ""
3996 "On the right is <quote>their</quote> version of the file, the one that from " 4008 "On the right is <quote>their</quote> version of the file, the one that from "
3997 "the changeset that we're trying to merge with." 4009 "the changeset that we're trying to merge with."
3998 msgstr "" 4010 msgstr ""
3999 4011
4000 #. type: Content of: <book><chapter><sect1><sect2><para> 4012 #. type: Content of: <book><chapter><sect1><sect2><para>
4001 #: ../en/ch02-tour-merge.xml:238 4013 #: ../en/ch02-tour-merge.xml:235
4002 msgid "" 4014 msgid ""
4003 "In the pane below these is the current <emphasis>result</emphasis> of the " 4015 "In the pane below these is the current <emphasis>result</emphasis> of the "
4004 "merge. Our task is to replace all of the red text, which indicates unresolved " 4016 "merge. Our task is to replace all of the red text, which indicates unresolved "
4005 "conflicts, with some sensible merger of the <quote>ours</quote> and " 4017 "conflicts, with some sensible merger of the <quote>ours</quote> and "
4006 "<quote>theirs</quote> versions of the file." 4018 "<quote>theirs</quote> versions of the file."
4007 msgstr "" 4019 msgstr ""
4008 4020
4009 #. type: Content of: <book><chapter><sect1><sect2><para> 4021 #. type: Content of: <book><chapter><sect1><sect2><para>
4010 #: ../en/ch02-tour-merge.xml:245 4022 #: ../en/ch02-tour-merge.xml:242
4011 msgid "" 4023 msgid ""
4012 "All four of these panes are <emphasis>locked together</emphasis>; if we " 4024 "All four of these panes are <emphasis>locked together</emphasis>; if we "
4013 "scroll vertically or horizontally in any of them, the others are updated to " 4025 "scroll vertically or horizontally in any of them, the others are updated to "
4014 "display the corresponding sections of their respective files." 4026 "display the corresponding sections of their respective files."
4015 msgstr "" 4027 msgstr ""
4016 4028
4017 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4029 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4018 #: ../en/ch02-tour-merge.xml:252 4030 #: ../en/ch02-tour-merge.xml:248
4019 msgid "" 4031 msgid "Using <command>kdiff3</command> to merge versions of a file"
4020 "<imageobject><imagedata width=\"100%\" fileref=\"images/kdiff3.png\"/> </" 4032 msgstr ""
4033
4034 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4035 #: ../en/ch02-tour-merge.xml:251
4036 msgid ""
4037 "<imageobject> <imagedata width=\"100%\" fileref=\"figs/kdiff3.png\"/></"
4021 "imageobject>" 4038 "imageobject>"
4022 msgstr "" 4039 msgstr ""
4023 4040
4024 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4041 #. type: Content of: <book><chapter><sect1><sect2><para>
4025 #: ../en/ch02-tour-merge.xml:255 4042 #: ../en/ch02-tour-merge.xml:259
4026 msgid "Using <command>kdiff3</command> to merge versions of a file"
4027 msgstr ""
4028
4029 #. type: Content of: <book><chapter><sect1><sect2><para>
4030 #: ../en/ch02-tour-merge.xml:261
4031 msgid "" 4043 msgid ""
4032 "For each conflicting portion of the file, we can choose to resolve the " 4044 "For each conflicting portion of the file, we can choose to resolve the "
4033 "conflict using some combination of text from the base version, ours, or " 4045 "conflict using some combination of text from the base version, ours, or "
4034 "theirs. We can also manually edit the merged file at any time, in case we " 4046 "theirs. We can also manually edit the merged file at any time, in case we "
4035 "need to make further modifications." 4047 "need to make further modifications."
4036 msgstr "" 4048 msgstr ""
4037 4049
4038 #. type: Content of: <book><chapter><sect1><sect2><para> 4050 #. type: Content of: <book><chapter><sect1><sect2><para>
4039 #: ../en/ch02-tour-merge.xml:267 4051 #: ../en/ch02-tour-merge.xml:265
4040 msgid "" 4052 msgid ""
4041 "There are <emphasis>many</emphasis> file merging tools available, too many to " 4053 "There are <emphasis>many</emphasis> file merging tools available, too many to "
4042 "cover here. They vary in which platforms they are available for, and in " 4054 "cover here. They vary in which platforms they are available for, and in "
4043 "their particular strengths and weaknesses. Most are tuned for merging files " 4055 "their particular strengths and weaknesses. Most are tuned for merging files "
4044 "containing plain text, while a few are aimed at specialised file formats " 4056 "containing plain text, while a few are aimed at specialised file formats "
4045 "(generally XML)." 4057 "(generally XML)."
4046 msgstr "" 4058 msgstr ""
4047 4059
4048 #. type: Content of: <book><chapter><sect1><sect2><title> 4060 #. type: Content of: <book><chapter><sect1><sect2><title>
4049 #: ../en/ch02-tour-merge.xml:276 4061 #: ../en/ch02-tour-merge.xml:274
4050 msgid "A worked example" 4062 msgid "A worked example"
4051 msgstr "合并实例" 4063 msgstr "合并实例"
4052 4064
4053 #. type: Content of: <book><chapter><sect1><sect2><para> 4065 #. type: Content of: <book><chapter><sect1><sect2><para>
4054 #: ../en/ch02-tour-merge.xml:278 4066 #: ../en/ch02-tour-merge.xml:276
4055 msgid "" 4067 msgid ""
4056 "In this example, we will reproduce the file modification history of figure " 4068 "In this example, we will reproduce the file modification history of <xref "
4057 "<xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-merge." 4069 "linkend=\"fig:tour-merge:conflict\"/> above. Let's begin by creating a "
4058 "conflict\"/> above. Let's begin by creating a repository with a base version " 4070 "repository with a base version of our document."
4059 "of our document." 4071 msgstr ""
4060 msgstr "" 4072
4061 4073 #. type: Content of: <book><chapter><sect1><sect2><para>
4062 #. type: Content of: <book><chapter><sect1><sect2><para> 4074 #: ../en/ch02-tour-merge.xml:283
4063 #: ../en/ch02-tour-merge.xml:286
4064 msgid "We'll clone the repository and make a change to the file." 4075 msgid "We'll clone the repository and make a change to the file."
4065 msgstr "" 4076 msgstr ""
4066 4077
4067 #. type: Content of: <book><chapter><sect1><sect2><para> 4078 #. type: Content of: <book><chapter><sect1><sect2><para>
4068 #: ../en/ch02-tour-merge.xml:291 4079 #: ../en/ch02-tour-merge.xml:288
4069 msgid "" 4080 msgid ""
4070 "And another clone, to simulate someone else making a change to the file. " 4081 "And another clone, to simulate someone else making a change to the file. "
4071 "(This hints at the idea that it's not all that unusual to merge with yourself " 4082 "(This hints at the idea that it's not all that unusual to merge with yourself "
4072 "when you isolate tasks in separate repositories, and indeed to find and " 4083 "when you isolate tasks in separate repositories, and indeed to find and "
4073 "resolve conflicts while doing so.)" 4084 "resolve conflicts while doing so.)"
4074 msgstr "" 4085 msgstr ""
4075 4086
4076 #. type: Content of: <book><chapter><sect1><sect2><para> 4087 #. type: Content of: <book><chapter><sect1><sect2><para>
4077 #: ../en/ch02-tour-merge.xml:299 4088 #: ../en/ch02-tour-merge.xml:296
4078 msgid "" 4089 msgid ""
4079 "Having created two different versions of the file, we'll set up an " 4090 "Having created two different versions of the file, we'll set up an "
4080 "environment suitable for running our merge." 4091 "environment suitable for running our merge."
4081 msgstr "" 4092 msgstr ""
4082 4093
4083 #. type: Content of: <book><chapter><sect1><sect2><para> 4094 #. type: Content of: <book><chapter><sect1><sect2><para>
4084 #: ../en/ch02-tour-merge.xml:305 4095 #: ../en/ch02-tour-merge.xml:302
4085 msgid "" 4096 msgid ""
4086 "In this example, I won't use Mercurial's normal <command>hgmerge</command> " 4097 "In this example, I won't use Mercurial's normal <command>hgmerge</command> "
4087 "program to do the merge, because it would drop my nice automated example-" 4098 "program to do the merge, because it would drop my nice automated example-"
4088 "running tool into a graphical user interface. Instead, I'll set " 4099 "running tool into a graphical user interface. Instead, I'll set "
4089 "<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive " 4100 "<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive "
4091 "systems. If you're following this example on your computer, don't bother " 4102 "systems. If you're following this example on your computer, don't bother "
4092 "setting <envar>HGMERGE</envar>." 4103 "setting <envar>HGMERGE</envar>."
4093 msgstr "" 4104 msgstr ""
4094 4105
4095 #. type: Content of: <book><chapter><sect1><sect2><para> 4106 #. type: Content of: <book><chapter><sect1><sect2><para>
4096 #: ../en/ch02-tour-merge.xml:315 4107 #: ../en/ch02-tour-merge.xml:312
4097 msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>" 4108 msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>"
4098 msgstr "" 4109 msgstr ""
4099 4110
4100 #. type: Content of: <book><chapter><sect1><sect2><para> 4111 #. type: Content of: <book><chapter><sect1><sect2><para>
4101 #: ../en/ch02-tour-merge.xml:320 4112 #: ../en/ch02-tour-merge.xml:317
4102 msgid "" 4113 msgid ""
4103 "Because <command>merge</command> can't resolve the conflicting changes, it " 4114 "Because <command>merge</command> can't resolve the conflicting changes, it "
4104 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, " 4115 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, "
4105 "indicating which lines have conflicts, and whether they came from our version " 4116 "indicating which lines have conflicts, and whether they came from our version "
4106 "of the file or theirs." 4117 "of the file or theirs."
4107 msgstr "" 4118 msgstr ""
4108 4119
4109 #. type: Content of: <book><chapter><sect1><sect2><para> 4120 #. type: Content of: <book><chapter><sect1><sect2><para>
4110 #: ../en/ch02-tour-merge.xml:326 4121 #: ../en/ch02-tour-merge.xml:323
4111 msgid "" 4122 msgid ""
4112 "Mercurial can tell from the way <command>merge</command> exits that it wasn't " 4123 "Mercurial can tell from the way <command>merge</command> exits that it wasn't "
4113 "able to merge successfully, so it tells us what commands we'll need to run if " 4124 "able to merge successfully, so it tells us what commands we'll need to run if "
4114 "we want to redo the merging operation. This could be useful if, for example, " 4125 "we want to redo the merging operation. This could be useful if, for example, "
4115 "we were running a graphical merge tool and quit because we were confused or " 4126 "we were running a graphical merge tool and quit because we were confused or "
4116 "realised we had made a mistake." 4127 "realised we had made a mistake."
4117 msgstr "" 4128 msgstr ""
4118 4129
4119 #. type: Content of: <book><chapter><sect1><sect2><para> 4130 #. type: Content of: <book><chapter><sect1><sect2><para>
4120 #: ../en/ch02-tour-merge.xml:333 4131 #: ../en/ch02-tour-merge.xml:330
4121 msgid "" 4132 msgid ""
4122 "If automatic or manual merges fail, there's nothing to prevent us from " 4133 "If automatic or manual merges fail, there's nothing to prevent us from "
4123 "<quote>fixing up</quote> the affected files ourselves, and committing the " 4134 "<quote>fixing up</quote> the affected files ourselves, and committing the "
4124 "results of our merge:" 4135 "results of our merge:"
4125 msgstr "" 4136 msgstr ""
4126 4137
4127 #. type: Content of: <book><chapter><sect1><title> 4138 #. type: Content of: <book><chapter><sect1><title>
4128 #: ../en/ch02-tour-merge.xml:342 4139 #: ../en/ch02-tour-merge.xml:339
4129 msgid "Simplifying the pull-merge-commit sequence" 4140 msgid "Simplifying the pull-merge-commit sequence"
4130 msgstr "简化拉-合并-提交程序" 4141 msgstr "简化拉-合并-提交程序"
4131 4142
4132 #. type: Content of: <book><chapter><sect1><para> 4143 #. type: Content of: <book><chapter><sect1><para>
4133 #: ../en/ch02-tour-merge.xml:344 4144 #: ../en/ch02-tour-merge.xml:341
4134 msgid "" 4145 msgid ""
4135 "The process of merging changes as outlined above is straightforward, but " 4146 "The process of merging changes as outlined above is straightforward, but "
4136 "requires running three commands in sequence." 4147 "requires running three commands in sequence."
4137 msgstr "" 4148 msgstr ""
4138 4149
4139 #. type: Content of: <book><chapter><sect1><para> 4150 #. type: Content of: <book><chapter><sect1><para>
4140 #: ../en/ch02-tour-merge.xml:350 4151 #: ../en/ch02-tour-merge.xml:347
4141 msgid "" 4152 msgid ""
4142 "In the case of the final commit, you also need to enter a commit message, " 4153 "In the case of the final commit, you also need to enter a commit message, "
4143 "which is almost always going to be a piece of uninteresting " 4154 "which is almost always going to be a piece of uninteresting "
4144 "<quote>boilerplate</quote> text." 4155 "<quote>boilerplate</quote> text."
4145 msgstr "" 4156 msgstr ""
4146 4157
4147 #. type: Content of: <book><chapter><sect1><para> 4158 #. type: Content of: <book><chapter><sect1><para>
4148 #: ../en/ch02-tour-merge.xml:354 4159 #: ../en/ch02-tour-merge.xml:351
4149 msgid "" 4160 msgid ""
4150 "It would be nice to reduce the number of steps needed, if this were " 4161 "It would be nice to reduce the number of steps needed, if this were "
4151 "possible. Indeed, Mercurial is distributed with an extension called <literal " 4162 "possible. Indeed, Mercurial is distributed with an extension called <literal "
4152 "role=\"hg-ext\">fetch</literal> that does just this." 4163 "role=\"hg-ext\">fetch</literal> that does just this."
4153 msgstr "" 4164 msgstr ""
4154 4165
4155 #. type: Content of: <book><chapter><sect1><para> 4166 #. type: Content of: <book><chapter><sect1><para>
4156 #: ../en/ch02-tour-merge.xml:359 4167 #: ../en/ch02-tour-merge.xml:356
4157 msgid "" 4168 msgid ""
4158 "Mercurial provides a flexible extension mechanism that lets people extend its " 4169 "Mercurial provides a flexible extension mechanism that lets people extend its "
4159 "functionality, while keeping the core of Mercurial small and easy to deal " 4170 "functionality, while keeping the core of Mercurial small and easy to deal "
4160 "with. Some extensions add new commands that you can use from the command " 4171 "with. Some extensions add new commands that you can use from the command "
4161 "line, while others work <quote>behind the scenes,</quote> for example adding " 4172 "line, while others work <quote>behind the scenes,</quote> for example adding "
4162 "capabilities to the server." 4173 "capabilities to the server."
4163 msgstr "" 4174 msgstr ""
4164 4175
4165 #. type: Content of: <book><chapter><sect1><para> 4176 #. type: Content of: <book><chapter><sect1><para>
4166 #: ../en/ch02-tour-merge.xml:366 4177 #: ../en/ch02-tour-merge.xml:363
4167 msgid "" 4178 msgid ""
4168 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " 4179 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command "
4169 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " 4180 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This "
4170 "extension acts as a combination of <command role=\"hg-cmd\">hg pull</" 4181 "extension acts as a combination of <command role=\"hg-cmd\">hg pull</"
4171 "command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-" 4182 "command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-"
4175 "merge with an automatically-generated commit message. If no new heads were " 4186 "merge with an automatically-generated commit message. If no new heads were "
4176 "added, it updates the working directory to the new tip changeset." 4187 "added, it updates the working directory to the new tip changeset."
4177 msgstr "" 4188 msgstr ""
4178 4189
4179 #. type: Content of: <book><chapter><sect1><para> 4190 #. type: Content of: <book><chapter><sect1><para>
4180 #: ../en/ch02-tour-merge.xml:379 4191 #: ../en/ch02-tour-merge.xml:376
4181 msgid "" 4192 msgid ""
4182 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. " 4193 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. "
4183 "Edit your <filename role=\"special\">.hgrc</filename>, and either go to the " 4194 "Edit your <filename role=\"special\">.hgrc</filename>, and either go to the "
4184 "<literal role=\"rc-extensions\">extensions</literal> section or create an " 4195 "<literal role=\"rc-extensions\">extensions</literal> section or create an "
4185 "<literal role=\"rc-extensions\">extensions</literal> section. Then add a line " 4196 "<literal role=\"rc-extensions\">extensions</literal> section. Then add a line "
4186 "that simply reads <quote><literal>fetch </literal></quote>." 4197 "that simply reads <quote><literal>fetch </literal></quote>."
4187 msgstr "" 4198 msgstr ""
4188 4199
4189 #. type: Content of: <book><chapter><sect1><para> 4200 #. type: Content of: <book><chapter><sect1><para>
4190 #: ../en/ch02-tour-merge.xml:388 4201 #: ../en/ch02-tour-merge.xml:385
4191 msgid "" 4202 msgid ""
4192 "(Normally, on the right-hand side of the <quote><literal>=</literal></quote> " 4203 "(Normally, on the right-hand side of the <quote><literal>=</literal></quote> "
4193 "would appear the location of the extension, but since the <literal role=\"hg-" 4204 "would appear the location of the extension, but since the <literal role=\"hg-"
4194 "ext\">fetch</literal> extension is in the standard distribution, Mercurial " 4205 "ext\">fetch</literal> extension is in the standard distribution, Mercurial "
4195 "knows where to search for it.)" 4206 "knows where to search for it.)"
4256 "separate data (<quote><literal>.d</literal></quote> suffix) and index " 4267 "separate data (<quote><literal>.d</literal></quote> suffix) and index "
4257 "(<quote><literal>.i</literal></quote> suffix) files. For small files without " 4268 "(<quote><literal>.i</literal></quote> suffix) files. For small files without "
4258 "much history, the revision data and index are combined in a single " 4269 "much history, the revision data and index are combined in a single "
4259 "<quote><literal>.i</literal></quote> file. The correspondence between a file " 4270 "<quote><literal>.i</literal></quote> file. The correspondence between a file "
4260 "in the working directory and the filelog that tracks its history in the " 4271 "in the working directory and the filelog that tracks its history in the "
4261 "repository is illustrated in figure <xref endterm=\"fig.concepts.filelog." 4272 "repository is illustrated in <xref linkend=\"fig:concepts:filelog\"/>."
4262 "caption\" linkend=\"fig.concepts.filelog\"/>." 4273 msgstr ""
4263 msgstr "" 4274
4264 4275 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4265 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4276 #: ../en/ch03-concepts.xml:53
4266 #: ../en/ch03-concepts.xml:55
4267 msgid "<imageobject><imagedata fileref=\"images/filelog.png\"/></imageobject>"
4268 msgstr ""
4269
4270 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4271 #: ../en/ch03-concepts.xml:57
4272 msgid "" 4277 msgid ""
4273 "Relationships between files in working directory and filelogs in repository" 4278 "Relationships between files in working directory and filelogs in repository"
4274 msgstr "" 4279 msgstr ""
4275 4280
4281 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4282 #: ../en/ch03-concepts.xml:56
4283 msgid "<imageobject><imagedata fileref=\"figs/filelog.png\"/></imageobject>"
4284 msgstr ""
4285
4276 #. type: Content of: <book><chapter><sect1><sect2><title> 4286 #. type: Content of: <book><chapter><sect1><sect2><title>
4277 #: ../en/ch03-concepts.xml:65 4287 #: ../en/ch03-concepts.xml:63
4278 msgid "Managing tracked files" 4288 msgid "Managing tracked files"
4279 msgstr "管理跟踪的文件" 4289 msgstr "管理跟踪的文件"
4280 4290
4281 #. type: Content of: <book><chapter><sect1><sect2><para> 4291 #. type: Content of: <book><chapter><sect1><sect2><para>
4282 #: ../en/ch03-concepts.xml:67 4292 #: ../en/ch03-concepts.xml:65
4283 msgid "" 4293 msgid ""
4284 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " 4294 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect "
4285 "together information about the files that it tracks. Each entry in the " 4295 "together information about the files that it tracks. Each entry in the "
4286 "manifest contains information about the files present in a single changeset. " 4296 "manifest contains information about the files present in a single changeset. "
4287 "An entry records which files are present in the changeset, the revision of " 4297 "An entry records which files are present in the changeset, the revision of "
4288 "each file, and a few other pieces of file metadata." 4298 "each file, and a few other pieces of file metadata."
4289 msgstr "" 4299 msgstr ""
4290 4300
4291 #. type: Content of: <book><chapter><sect1><sect2><title> 4301 #. type: Content of: <book><chapter><sect1><sect2><title>
4292 #: ../en/ch03-concepts.xml:77 4302 #: ../en/ch03-concepts.xml:75
4293 msgid "Recording changeset information" 4303 msgid "Recording changeset information"
4294 msgstr "记录修改集信息" 4304 msgstr "记录修改集信息"
4295 4305
4296 #. type: Content of: <book><chapter><sect1><sect2><para> 4306 #. type: Content of: <book><chapter><sect1><sect2><para>
4297 #: ../en/ch03-concepts.xml:79 4307 #: ../en/ch03-concepts.xml:77
4298 msgid "" 4308 msgid ""
4299 "The <emphasis>changelog</emphasis> contains information about each " 4309 "The <emphasis>changelog</emphasis> contains information about each "
4300 "changeset. Each revision records who committed a change, the changeset " 4310 "changeset. Each revision records who committed a change, the changeset "
4301 "comment, other pieces of changeset-related information, and the revision of " 4311 "comment, other pieces of changeset-related information, and the revision of "
4302 "the manifest to use." 4312 "the manifest to use."
4303 msgstr "" 4313 msgstr ""
4304 4314
4305 #. type: Content of: <book><chapter><sect1><sect2><title> 4315 #. type: Content of: <book><chapter><sect1><sect2><title>
4306 #: ../en/ch03-concepts.xml:87 4316 #: ../en/ch03-concepts.xml:85
4307 msgid "Relationships between revisions" 4317 msgid "Relationships between revisions"
4308 msgstr "版本之间的关系" 4318 msgstr "版本之间的关系"
4309 4319
4310 #. type: Content of: <book><chapter><sect1><sect2><para> 4320 #. type: Content of: <book><chapter><sect1><sect2><para>
4311 #: ../en/ch03-concepts.xml:89 4321 #: ../en/ch03-concepts.xml:87
4312 msgid "" 4322 msgid ""
4313 "Within a changelog, a manifest, or a filelog, each revision stores a pointer " 4323 "Within a changelog, a manifest, or a filelog, each revision stores a pointer "
4314 "to its immediate parent (or to its two parents, if it's a merge revision). " 4324 "to its immediate parent (or to its two parents, if it's a merge revision). "
4315 "As I mentioned above, there are also relationships between revisions " 4325 "As I mentioned above, there are also relationships between revisions "
4316 "<emphasis>across</emphasis> these structures, and they are hierarchical in " 4326 "<emphasis>across</emphasis> these structures, and they are hierarchical in "
4317 "nature." 4327 "nature."
4318 msgstr "" 4328 msgstr ""
4319 4329
4320 #. type: Content of: <book><chapter><sect1><sect2><para> 4330 #. type: Content of: <book><chapter><sect1><sect2><para>
4321 #: ../en/ch03-concepts.xml:96 4331 #: ../en/ch03-concepts.xml:94
4322 msgid "" 4332 msgid ""
4323 "For every changeset in a repository, there is exactly one revision stored in " 4333 "For every changeset in a repository, there is exactly one revision stored in "
4324 "the changelog. Each revision of the changelog contains a pointer to a single " 4334 "the changelog. Each revision of the changelog contains a pointer to a single "
4325 "revision of the manifest. A revision of the manifest stores a pointer to a " 4335 "revision of the manifest. A revision of the manifest stores a pointer to a "
4326 "single revision of each filelog tracked when that changeset was created. " 4336 "single revision of each filelog tracked when that changeset was created. "
4327 "These relationships are illustrated in figure <xref endterm=\"fig.concepts." 4337 "These relationships are illustrated in <xref linkend=\"fig:concepts:metadata"
4328 "metadata.caption\" linkend=\"fig.concepts.metadata\"/>." 4338 "\"/>."
4329 msgstr "" 4339 msgstr ""
4330 4340
4331 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4341 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4332 #: ../en/ch03-concepts.xml:107 4342 #: ../en/ch03-concepts.xml:103
4333 msgid "<imageobject><imagedata fileref=\"images/metadata.png\"/></imageobject>"
4334 msgstr ""
4335
4336 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4337 #: ../en/ch03-concepts.xml:109
4338 msgid "Metadata relationships" 4343 msgid "Metadata relationships"
4339 msgstr "" 4344 msgstr ""
4340 4345
4341 #. type: Content of: <book><chapter><sect1><sect2><para> 4346 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4342 #: ../en/ch03-concepts.xml:114 4347 #: ../en/ch03-concepts.xml:105
4348 msgid "<imageobject><imagedata fileref=\"figs/metadata.png\"/></imageobject>"
4349 msgstr ""
4350
4351 #. type: Content of: <book><chapter><sect1><sect2><para>
4352 #: ../en/ch03-concepts.xml:110
4343 msgid "" 4353 msgid ""
4344 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " 4354 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to "
4345 "one</quote> relationship between revisions in the changelog, manifest, or " 4355 "one</quote> relationship between revisions in the changelog, manifest, or "
4346 "filelog. If the manifest hasn't changed between two changesets, the changelog " 4356 "filelog. If the manifest hasn't changed between two changesets, the changelog "
4347 "entries for those changesets will point to the same revision of the " 4357 "entries for those changesets will point to the same revision of the "
4349 "changesets, the entry for that file in the two revisions of the manifest will " 4359 "changesets, the entry for that file in the two revisions of the manifest will "
4350 "point to the same revision of its filelog." 4360 "point to the same revision of its filelog."
4351 msgstr "" 4361 msgstr ""
4352 4362
4353 #. type: Content of: <book><chapter><sect1><title> 4363 #. type: Content of: <book><chapter><sect1><title>
4354 #: ../en/ch03-concepts.xml:127 4364 #: ../en/ch03-concepts.xml:123
4355 msgid "Safe, efficient storage" 4365 msgid "Safe, efficient storage"
4356 msgstr "安全,高效的存储" 4366 msgstr "安全,高效的存储"
4357 4367
4358 #. type: Content of: <book><chapter><sect1><para> 4368 #. type: Content of: <book><chapter><sect1><para>
4359 #: ../en/ch03-concepts.xml:129 4369 #: ../en/ch03-concepts.xml:125
4360 msgid "" 4370 msgid ""
4361 "The underpinnings of changelogs, manifests, and filelogs are provided by a " 4371 "The underpinnings of changelogs, manifests, and filelogs are provided by a "
4362 "single structure called the <emphasis>revlog</emphasis>." 4372 "single structure called the <emphasis>revlog</emphasis>."
4363 msgstr "" 4373 msgstr ""
4364 4374
4365 #. type: Content of: <book><chapter><sect1><sect2><title> 4375 #. type: Content of: <book><chapter><sect1><sect2><title>
4366 #: ../en/ch03-concepts.xml:134 4376 #: ../en/ch03-concepts.xml:130
4367 msgid "Efficient storage" 4377 msgid "Efficient storage"
4368 msgstr "高效存储" 4378 msgstr "高效存储"
4369 4379
4370 #. type: Content of: <book><chapter><sect1><sect2><para> 4380 #. type: Content of: <book><chapter><sect1><sect2><para>
4371 #: ../en/ch03-concepts.xml:136 4381 #: ../en/ch03-concepts.xml:132
4372 msgid "" 4382 msgid ""
4373 "The revlog provides efficient storage of revisions using a <emphasis>delta</" 4383 "The revlog provides efficient storage of revisions using a <emphasis>delta</"
4374 "emphasis> mechanism. Instead of storing a complete copy of a file for each " 4384 "emphasis> mechanism. Instead of storing a complete copy of a file for each "
4375 "revision, it stores the changes needed to transform an older revision into " 4385 "revision, it stores the changes needed to transform an older revision into "
4376 "the new revision. For many kinds of file data, these deltas are typically a " 4386 "the new revision. For many kinds of file data, these deltas are typically a "
4377 "fraction of a percent of the size of a full copy of a file." 4387 "fraction of a percent of the size of a full copy of a file."
4378 msgstr "" 4388 msgstr ""
4379 4389
4380 #. type: Content of: <book><chapter><sect1><sect2><para> 4390 #. type: Content of: <book><chapter><sect1><sect2><para>
4381 #: ../en/ch03-concepts.xml:144 4391 #: ../en/ch03-concepts.xml:140
4382 msgid "" 4392 msgid ""
4383 "Some obsolete revision control systems can only work with deltas of text " 4393 "Some obsolete revision control systems can only work with deltas of text "
4384 "files. They must either store binary files as complete snapshots or encoded " 4394 "files. They must either store binary files as complete snapshots or encoded "
4385 "into a text representation, both of which are wasteful approaches. Mercurial " 4395 "into a text representation, both of which are wasteful approaches. Mercurial "
4386 "can efficiently handle deltas of files with arbitrary binary contents; it " 4396 "can efficiently handle deltas of files with arbitrary binary contents; it "
4387 "doesn't need to treat text as special." 4397 "doesn't need to treat text as special."
4388 msgstr "" 4398 msgstr ""
4389 4399
4390 #. type: Content of: <book><chapter><sect1><sect2><title> 4400 #. type: Content of: <book><chapter><sect1><sect2><title>
4391 #: ../en/ch03-concepts.xml:153 4401 #: ../en/ch03-concepts.xml:149
4392 msgid "Safe operation" 4402 msgid "Safe operation"
4393 msgstr "安全操作" 4403 msgstr "安全操作"
4394 4404
4395 #. type: Content of: <book><chapter><sect1><sect2><para> 4405 #. type: Content of: <book><chapter><sect1><sect2><para>
4396 #: ../en/ch03-concepts.xml:155 4406 #: ../en/ch03-concepts.xml:151
4397 msgid "" 4407 msgid ""
4398 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog " 4408 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog "
4399 "file. It never modifies a section of a file after it has written it. This is " 4409 "file. It never modifies a section of a file after it has written it. This is "
4400 "both more robust and efficient than schemes that need to modify or rewrite " 4410 "both more robust and efficient than schemes that need to modify or rewrite "
4401 "data." 4411 "data."
4402 msgstr "" 4412 msgstr ""
4403 4413
4404 #. type: Content of: <book><chapter><sect1><sect2><para> 4414 #. type: Content of: <book><chapter><sect1><sect2><para>
4405 #: ../en/ch03-concepts.xml:161 4415 #: ../en/ch03-concepts.xml:157
4406 msgid "" 4416 msgid ""
4407 "In addition, Mercurial treats every write as part of a <emphasis>transaction</" 4417 "In addition, Mercurial treats every write as part of a <emphasis>transaction</"
4408 "emphasis> that can span a number of files. A transaction is " 4418 "emphasis> that can span a number of files. A transaction is "
4409 "<emphasis>atomic</emphasis>: either the entire transaction succeeds and its " 4419 "<emphasis>atomic</emphasis>: either the entire transaction succeeds and its "
4410 "effects are all visible to readers in one go, or the whole thing is undone. " 4420 "effects are all visible to readers in one go, or the whole thing is undone. "
4412 "Mercurial, where one is reading data and one is writing it, the reader will " 4422 "Mercurial, where one is reading data and one is writing it, the reader will "
4413 "never see a partially written result that might confuse it." 4423 "never see a partially written result that might confuse it."
4414 msgstr "" 4424 msgstr ""
4415 4425
4416 #. type: Content of: <book><chapter><sect1><sect2><para> 4426 #. type: Content of: <book><chapter><sect1><sect2><para>
4417 #: ../en/ch03-concepts.xml:171 4427 #: ../en/ch03-concepts.xml:167
4418 msgid "" 4428 msgid ""
4419 "The fact that Mercurial only appends to files makes it easier to provide this " 4429 "The fact that Mercurial only appends to files makes it easier to provide this "
4420 "transactional guarantee. The easier it is to do stuff like this, the more " 4430 "transactional guarantee. The easier it is to do stuff like this, the more "
4421 "confident you should be that it's done correctly." 4431 "confident you should be that it's done correctly."
4422 msgstr "" 4432 msgstr ""
4423 4433
4424 #. type: Content of: <book><chapter><sect1><sect2><title> 4434 #. type: Content of: <book><chapter><sect1><sect2><title>
4425 #: ../en/ch03-concepts.xml:178 4435 #: ../en/ch03-concepts.xml:174
4426 msgid "Fast retrieval" 4436 msgid "Fast retrieval"
4427 msgstr "快速检索" 4437 msgstr "快速检索"
4428 4438
4429 #. type: Content of: <book><chapter><sect1><sect2><para> 4439 #. type: Content of: <book><chapter><sect1><sect2><para>
4430 #: ../en/ch03-concepts.xml:180 4440 #: ../en/ch03-concepts.xml:176
4431 msgid "" 4441 msgid ""
4432 "Mercurial cleverly avoids a pitfall common to all earlier revision control " 4442 "Mercurial cleverly avoids a pitfall common to all earlier revision control "
4433 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " 4443 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most "
4434 "revision control systems store the contents of a revision as an incremental " 4444 "revision control systems store the contents of a revision as an incremental "
4435 "series of modifications against a <quote>snapshot</quote>. To reconstruct a " 4445 "series of modifications against a <quote>snapshot</quote>. To reconstruct a "
4437 "the revisions between the snapshot and your target revision. The more " 4447 "the revisions between the snapshot and your target revision. The more "
4438 "history that a file accumulates, the more revisions you must read, hence the " 4448 "history that a file accumulates, the more revisions you must read, hence the "
4439 "longer it takes to reconstruct a particular revision." 4449 "longer it takes to reconstruct a particular revision."
4440 msgstr "" 4450 msgstr ""
4441 4451
4442 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4452 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4443 #: ../en/ch03-concepts.xml:193 4453 #: ../en/ch03-concepts.xml:188
4444 msgid "<imageobject><imagedata fileref=\"images/snapshot.png\"/></imageobject>" 4454 msgid "Snapshot of a revlog, with incremental deltas"
4445 msgstr "" 4455 msgstr ""
4446 4456
4447 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4457 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4458 #: ../en/ch03-concepts.xml:190
4459 msgid "<imageobject><imagedata fileref=\"figs/snapshot.png\"/></imageobject>"
4460 msgstr ""
4461
4462 #. type: Content of: <book><chapter><sect1><sect2><para>
4448 #: ../en/ch03-concepts.xml:195 4463 #: ../en/ch03-concepts.xml:195
4449 msgid "Snapshot of a revlog, with incremental deltas"
4450 msgstr ""
4451
4452 #. type: Content of: <book><chapter><sect1><sect2><para>
4453 #: ../en/ch03-concepts.xml:200
4454 msgid "" 4464 msgid ""
4455 "The innovation that Mercurial applies to this problem is simple but " 4465 "The innovation that Mercurial applies to this problem is simple but "
4456 "effective. Once the cumulative amount of delta information stored since the " 4466 "effective. Once the cumulative amount of delta information stored since the "
4457 "last snapshot exceeds a fixed threshold, it stores a new snapshot " 4467 "last snapshot exceeds a fixed threshold, it stores a new snapshot "
4458 "(compressed, of course), instead of another delta. This makes it possible to " 4468 "(compressed, of course), instead of another delta. This makes it possible to "
4460 "approach works so well that it has since been copied by several other " 4470 "approach works so well that it has since been copied by several other "
4461 "revision control systems." 4471 "revision control systems."
4462 msgstr "" 4472 msgstr ""
4463 4473
4464 #. type: Content of: <book><chapter><sect1><sect2><para> 4474 #. type: Content of: <book><chapter><sect1><sect2><para>
4465 #: ../en/ch03-concepts.xml:209 4475 #: ../en/ch03-concepts.xml:204
4466 msgid "" 4476 msgid ""
4467 "Figure <xref endterm=\"fig.concepts.snapshot.caption\" linkend=\"fig.concepts." 4477 "<xref linkend=\"fig:concepts:snapshot\"/> illustrates the idea. In an entry "
4468 "snapshot\"/> illustrates the idea. In an entry in a revlog's index file, " 4478 "in a revlog's index file, Mercurial stores the range of entries from the data "
4469 "Mercurial stores the range of entries from the data file that it must read to " 4479 "file that it must read to reconstruct a particular revision."
4470 "reconstruct a particular revision."
4471 msgstr "" 4480 msgstr ""
4472 4481
4473 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 4482 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
4474 #: ../en/ch03-concepts.xml:216 4483 #: ../en/ch03-concepts.xml:210
4475 msgid "Aside: the influence of video compression" 4484 msgid "Aside: the influence of video compression"
4476 msgstr "" 4485 msgstr ""
4477 4486
4478 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4487 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4479 #: ../en/ch03-concepts.xml:218 4488 #: ../en/ch03-concepts.xml:212
4480 msgid "" 4489 msgid ""
4481 "If you're familiar with video compression or have ever watched a TV feed " 4490 "If you're familiar with video compression or have ever watched a TV feed "
4482 "through a digital cable or satellite service, you may know that most video " 4491 "through a digital cable or satellite service, you may know that most video "
4483 "compression schemes store each frame of video as a delta against its " 4492 "compression schemes store each frame of video as a delta against its "
4484 "predecessor frame. In addition, these schemes use <quote>lossy</quote> " 4493 "predecessor frame. In addition, these schemes use <quote>lossy</quote> "
4485 "compression techniques to increase the compression ratio, so visual errors " 4494 "compression techniques to increase the compression ratio, so visual errors "
4486 "accumulate over the course of a number of inter-frame deltas." 4495 "accumulate over the course of a number of inter-frame deltas."
4487 msgstr "" 4496 msgstr ""
4488 4497
4489 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4498 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4490 #: ../en/ch03-concepts.xml:227 4499 #: ../en/ch03-concepts.xml:221
4491 msgid "" 4500 msgid ""
4492 "Because it's possible for a video stream to <quote>drop out</quote> " 4501 "Because it's possible for a video stream to <quote>drop out</quote> "
4493 "occasionally due to signal glitches, and to limit the accumulation of " 4502 "occasionally due to signal glitches, and to limit the accumulation of "
4494 "artefacts introduced by the lossy compression process, video encoders " 4503 "artefacts introduced by the lossy compression process, video encoders "
4495 "periodically insert a complete frame (called a <quote>key frame</quote>) into " 4504 "periodically insert a complete frame (called a <quote>key frame</quote>) into "
4498 "frame is received. Also, the accumulation of encoding errors restarts anew " 4507 "frame is received. Also, the accumulation of encoding errors restarts anew "
4499 "with each key frame." 4508 "with each key frame."
4500 msgstr "" 4509 msgstr ""
4501 4510
4502 #. type: Content of: <book><chapter><sect1><sect2><title> 4511 #. type: Content of: <book><chapter><sect1><sect2><title>
4503 #: ../en/ch03-concepts.xml:241 4512 #: ../en/ch03-concepts.xml:235
4504 msgid "Identification and strong integrity" 4513 msgid "Identification and strong integrity"
4505 msgstr "鉴别和强完整性" 4514 msgstr "鉴别和强完整性"
4506 4515
4507 #. type: Content of: <book><chapter><sect1><sect2><para> 4516 #. type: Content of: <book><chapter><sect1><sect2><para>
4508 #: ../en/ch03-concepts.xml:243 4517 #: ../en/ch03-concepts.xml:237
4509 msgid "" 4518 msgid ""
4510 "Along with delta or snapshot information, a revlog entry contains a " 4519 "Along with delta or snapshot information, a revlog entry contains a "
4511 "cryptographic hash of the data that it represents. This makes it difficult " 4520 "cryptographic hash of the data that it represents. This makes it difficult "
4512 "to forge the contents of a revision, and easy to detect accidental corruption." 4521 "to forge the contents of a revision, and easy to detect accidental corruption."
4513 msgstr "" 4522 msgstr ""
4514 4523
4515 #. type: Content of: <book><chapter><sect1><sect2><para> 4524 #. type: Content of: <book><chapter><sect1><sect2><para>
4516 #: ../en/ch03-concepts.xml:248 4525 #: ../en/ch03-concepts.xml:242
4517 msgid "" 4526 msgid ""
4518 "Hashes provide more than a mere check against corruption; they are used as " 4527 "Hashes provide more than a mere check against corruption; they are used as "
4519 "the identifiers for revisions. The changeset identification hashes that you " 4528 "the identifiers for revisions. The changeset identification hashes that you "
4520 "see as an end user are from revisions of the changelog. Although filelogs " 4529 "see as an end user are from revisions of the changelog. Although filelogs "
4521 "and the manifest also use hashes, Mercurial only uses these behind the scenes." 4530 "and the manifest also use hashes, Mercurial only uses these behind the scenes."
4522 msgstr "" 4531 msgstr ""
4523 4532
4524 #. type: Content of: <book><chapter><sect1><sect2><para> 4533 #. type: Content of: <book><chapter><sect1><sect2><para>
4525 #: ../en/ch03-concepts.xml:255 4534 #: ../en/ch03-concepts.xml:249
4526 msgid "" 4535 msgid ""
4527 "Mercurial verifies that hashes are correct when it retrieves file revisions " 4536 "Mercurial verifies that hashes are correct when it retrieves file revisions "
4528 "and when it pulls changes from another repository. If it encounters an " 4537 "and when it pulls changes from another repository. If it encounters an "
4529 "integrity problem, it will complain and stop whatever it's doing." 4538 "integrity problem, it will complain and stop whatever it's doing."
4530 msgstr "" 4539 msgstr ""
4531 4540
4532 #. type: Content of: <book><chapter><sect1><sect2><para> 4541 #. type: Content of: <book><chapter><sect1><sect2><para>
4533 #: ../en/ch03-concepts.xml:260 4542 #: ../en/ch03-concepts.xml:254
4534 msgid "" 4543 msgid ""
4535 "In addition to the effect it has on retrieval efficiency, Mercurial's use of " 4544 "In addition to the effect it has on retrieval efficiency, Mercurial's use of "
4536 "periodic snapshots makes it more robust against partial data corruption. If " 4545 "periodic snapshots makes it more robust against partial data corruption. If "
4537 "a revlog becomes partly corrupted due to a hardware error or system bug, it's " 4546 "a revlog becomes partly corrupted due to a hardware error or system bug, it's "
4538 "often possible to reconstruct some or most revisions from the uncorrupted " 4547 "often possible to reconstruct some or most revisions from the uncorrupted "
4539 "sections of the revlog, both before and after the corrupted section. This " 4548 "sections of the revlog, both before and after the corrupted section. This "
4540 "would not be possible with a delta-only storage model." 4549 "would not be possible with a delta-only storage model."
4541 msgstr "" 4550 msgstr ""
4542 4551
4543 #. type: Content of: <book><chapter><sect1><title> 4552 #. type: Content of: <book><chapter><sect1><title>
4544 #: ../en/ch03-concepts.xml:272 4553 #: ../en/ch03-concepts.xml:266
4545 msgid "Revision history, branching, and merging" 4554 msgid "Revision history, branching, and merging"
4546 msgstr "修订历史,分支与合并" 4555 msgstr "修订历史,分支与合并"
4547 4556
4548 #. type: Content of: <book><chapter><sect1><para> 4557 #. type: Content of: <book><chapter><sect1><para>
4549 #: ../en/ch03-concepts.xml:274 4558 #: ../en/ch03-concepts.xml:268
4550 msgid "" 4559 msgid ""
4551 "Every entry in a Mercurial revlog knows the identity of its immediate " 4560 "Every entry in a Mercurial revlog knows the identity of its immediate "
4552 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " 4561 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. "
4553 "In fact, a revision contains room for not one parent, but two. Mercurial " 4562 "In fact, a revision contains room for not one parent, but two. Mercurial "
4554 "uses a special hash, called the <quote>null ID</quote>, to represent the idea " 4563 "uses a special hash, called the <quote>null ID</quote>, to represent the idea "
4555 "<quote>there is no parent here</quote>. This hash is simply a string of " 4564 "<quote>there is no parent here</quote>. This hash is simply a string of "
4556 "zeroes." 4565 "zeroes."
4557 msgstr "" 4566 msgstr ""
4558 4567
4559 #. type: Content of: <book><chapter><sect1><para> 4568 #. type: Content of: <book><chapter><sect1><para>
4569 #: ../en/ch03-concepts.xml:276
4570 msgid ""
4571 "In <xref linkend=\"fig:concepts:revlog\"/>, you can see an example of the "
4572 "conceptual structure of a revlog. Filelogs, manifests, and changelogs all "
4573 "have this same structure; they differ only in the kind of data stored in each "
4574 "delta or snapshot."
4575 msgstr ""
4576
4577 #. type: Content of: <book><chapter><sect1><para>
4560 #: ../en/ch03-concepts.xml:282 4578 #: ../en/ch03-concepts.xml:282
4561 msgid ""
4562 "In figure <xref endterm=\"fig.concepts.revlog.caption\" linkend=\"fig."
4563 "concepts.revlog\"/>, you can see an example of the conceptual structure of a "
4564 "revlog. Filelogs, manifests, and changelogs all have this same structure; "
4565 "they differ only in the kind of data stored in each delta or snapshot."
4566 msgstr ""
4567
4568 #. type: Content of: <book><chapter><sect1><para>
4569 #: ../en/ch03-concepts.xml:289
4570 msgid "" 4579 msgid ""
4571 "The first revision in a revlog (at the bottom of the image) has the null ID " 4580 "The first revision in a revlog (at the bottom of the image) has the null ID "
4572 "in both of its parent slots. For a <quote>normal</quote> revision, its first " 4581 "in both of its parent slots. For a <quote>normal</quote> revision, its first "
4573 "parent slot contains the ID of its parent revision, and its second contains " 4582 "parent slot contains the ID of its parent revision, and its second contains "
4574 "the null ID, indicating that the revision has only one real parent. Any two " 4583 "the null ID, indicating that the revision has only one real parent. Any two "
4575 "revisions that have the same parent ID are branches. A revision that " 4584 "revisions that have the same parent ID are branches. A revision that "
4576 "represents a merge between branches has two normal revision IDs in its parent " 4585 "represents a merge between branches has two normal revision IDs in its parent "
4577 "slots." 4586 "slots."
4578 msgstr "" 4587 msgstr ""
4579 4588
4580 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 4589 #. type: Content of: <book><chapter><sect1><figure><title>
4581 #: ../en/ch03-concepts.xml:300 4590 #: ../en/ch03-concepts.xml:292
4582 msgid "<imageobject><imagedata fileref=\"images/revlog.png\"/></imageobject>" 4591 msgid "The conceptual structure of a revlog"
4583 msgstr "" 4592 msgstr ""
4584 4593
4585 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> 4594 #. type: Content of: <book><chapter><sect1><figure><mediaobject>
4586 #: ../en/ch03-concepts.xml:302 4595 #: ../en/ch03-concepts.xml:294
4587 msgid "Revision in revlog" 4596 msgid "<imageobject><imagedata fileref=\"figs/revlog.png\"/></imageobject>"
4588 msgstr "" 4597 msgstr ""
4589 4598
4590 #. type: Content of: <book><chapter><sect1><title> 4599 #. type: Content of: <book><chapter><sect1><title>
4591 #: ../en/ch03-concepts.xml:309 4600 #: ../en/ch03-concepts.xml:301
4592 msgid "The working directory" 4601 msgid "The working directory"
4593 msgstr "工作目录" 4602 msgstr "工作目录"
4594 4603
4595 #. type: Content of: <book><chapter><sect1><para> 4604 #. type: Content of: <book><chapter><sect1><para>
4596 #: ../en/ch03-concepts.xml:311 4605 #: ../en/ch03-concepts.xml:303
4597 msgid "" 4606 msgid ""
4598 "In the working directory, Mercurial stores a snapshot of the files from the " 4607 "In the working directory, Mercurial stores a snapshot of the files from the "
4599 "repository as of a particular changeset." 4608 "repository as of a particular changeset."
4600 msgstr "" 4609 msgstr ""
4601 4610
4602 #. type: Content of: <book><chapter><sect1><para> 4611 #. type: Content of: <book><chapter><sect1><para>
4603 #: ../en/ch03-concepts.xml:314 4612 #: ../en/ch03-concepts.xml:306
4604 msgid "" 4613 msgid ""
4605 "The working directory <quote>knows</quote> which changeset it contains. When " 4614 "The working directory <quote>knows</quote> which changeset it contains. When "
4606 "you update the working directory to contain a particular changeset, Mercurial " 4615 "you update the working directory to contain a particular changeset, Mercurial "
4607 "looks up the appropriate revision of the manifest to find out which files it " 4616 "looks up the appropriate revision of the manifest to find out which files it "
4608 "was tracking at the time that changeset was committed, and which revision of " 4617 "was tracking at the time that changeset was committed, and which revision of "
4609 "each file was then current. It then recreates a copy of each of those files, " 4618 "each file was then current. It then recreates a copy of each of those files, "
4610 "with the same contents it had when the changeset was committed." 4619 "with the same contents it had when the changeset was committed."
4611 msgstr "" 4620 msgstr ""
4612 4621
4613 #. type: Content of: <book><chapter><sect1><para> 4622 #. type: Content of: <book><chapter><sect1><para>
4614 #: ../en/ch03-concepts.xml:323 4623 #: ../en/ch03-concepts.xml:315
4615 msgid "" 4624 msgid ""
4616 "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " 4625 "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the "
4617 "working directory. This details which changeset the working directory is " 4626 "working directory. This details which changeset the working directory is "
4618 "updated to, and all of the files that Mercurial is tracking in the working " 4627 "updated to, and all of the files that Mercurial is tracking in the working "
4619 "directory." 4628 "directory."
4620 msgstr "" 4629 msgstr ""
4621 4630
4622 #. type: Content of: <book><chapter><sect1><para> 4631 #. type: Content of: <book><chapter><sect1><para>
4623 #: ../en/ch03-concepts.xml:329 4632 #: ../en/ch03-concepts.xml:321
4624 msgid "" 4633 msgid ""
4625 "Just as a revision of a revlog has room for two parents, so that it can " 4634 "Just as a revision of a revlog has room for two parents, so that it can "
4626 "represent either a normal revision (with one parent) or a merge of two " 4635 "represent either a normal revision (with one parent) or a merge of two "
4627 "earlier revisions, the dirstate has slots for two parents. When you use the " 4636 "earlier revisions, the dirstate has slots for two parents. When you use the "
4628 "<command role=\"hg-cmd\">hg update</command> command, the changeset that you " 4637 "<command role=\"hg-cmd\">hg update</command> command, the changeset that you "
4633 "cmd\">hg parents</command> command tells you what the parents of the dirstate " 4642 "cmd\">hg parents</command> command tells you what the parents of the dirstate "
4634 "are." 4643 "are."
4635 msgstr "" 4644 msgstr ""
4636 4645
4637 #. type: Content of: <book><chapter><sect1><sect2><title> 4646 #. type: Content of: <book><chapter><sect1><sect2><title>
4638 #: ../en/ch03-concepts.xml:343 4647 #: ../en/ch03-concepts.xml:335
4639 msgid "What happens when you commit" 4648 msgid "What happens when you commit"
4640 msgstr "当你提交时发生的事情" 4649 msgstr "当你提交时发生的事情"
4641 4650
4642 #. type: Content of: <book><chapter><sect1><sect2><para> 4651 #. type: Content of: <book><chapter><sect1><sect2><para>
4643 #: ../en/ch03-concepts.xml:345 4652 #: ../en/ch03-concepts.xml:337
4644 msgid "" 4653 msgid ""
4645 "The dirstate stores parent information for more than just book-keeping " 4654 "The dirstate stores parent information for more than just book-keeping "
4646 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " 4655 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the "
4647 "parents of a new changeset</emphasis> when you perform a commit." 4656 "parents of a new changeset</emphasis> when you perform a commit."
4648 msgstr "" 4657 msgstr ""
4649 4658
4650 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4659 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4651 #: ../en/ch03-concepts.xml:352 4660 #: ../en/ch03-concepts.xml:343
4652 msgid "<imageobject><imagedata fileref=\"images/wdir.png\"/></imageobject>"
4653 msgstr ""
4654
4655 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4656 #: ../en/ch03-concepts.xml:354
4657 msgid "The working directory can have two parents" 4661 msgid "The working directory can have two parents"
4658 msgstr "" 4662 msgstr ""
4659 4663
4660 #. type: Content of: <book><chapter><sect1><sect2><para> 4664 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4661 #: ../en/ch03-concepts.xml:359 4665 #: ../en/ch03-concepts.xml:345
4662 msgid "" 4666 msgid "<imageobject><imagedata fileref=\"figs/wdir.png\"/></imageobject>"
4663 "Figure <xref endterm=\"fig.concepts.wdir.caption\" linkend=\"fig.concepts.wdir" 4667 msgstr ""
4664 "\"/> shows the normal state of the working directory, where it has a single " 4668
4665 "changeset as parent. That changeset is the <emphasis>tip</emphasis>, the " 4669 #. type: Content of: <book><chapter><sect1><sect2><para>
4666 "newest changeset in the repository that has no children." 4670 #: ../en/ch03-concepts.xml:350
4667 msgstr "" 4671 msgid ""
4668 4672 "<xref linkend=\"fig:concepts:wdir\"/> shows the normal state of the working "
4669 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4673 "directory, where it has a single changeset as parent. That changeset is the "
4670 #: ../en/ch03-concepts.xml:368 4674 "<emphasis>tip</emphasis>, the newest changeset in the repository that has no "
4671 msgid "" 4675 "children."
4672 "<imageobject><imagedata fileref=\"images/wdir-after-commit.png\"/> </" 4676 msgstr ""
4673 "imageobject>" 4677
4674 msgstr "" 4678 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4675 4679 #: ../en/ch03-concepts.xml:357
4676 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4677 #: ../en/ch03-concepts.xml:371
4678 msgid "The working directory gains new parents after a commit" 4680 msgid "The working directory gains new parents after a commit"
4679 msgstr "" 4681 msgstr ""
4680 4682
4681 #. type: Content of: <book><chapter><sect1><sect2><para> 4683 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4682 #: ../en/ch03-concepts.xml:376 4684 #: ../en/ch03-concepts.xml:360
4685 msgid ""
4686 "<imageobject><imagedata fileref=\"figs/wdir-after-commit.png\"/></imageobject>"
4687 msgstr ""
4688
4689 #. type: Content of: <book><chapter><sect1><sect2><para>
4690 #: ../en/ch03-concepts.xml:365
4683 msgid "" 4691 msgid ""
4684 "It's useful to think of the working directory as <quote>the changeset I'm " 4692 "It's useful to think of the working directory as <quote>the changeset I'm "
4685 "about to commit</quote>. Any files that you tell Mercurial that you've " 4693 "about to commit</quote>. Any files that you tell Mercurial that you've "
4686 "added, removed, renamed, or copied will be reflected in that changeset, as " 4694 "added, removed, renamed, or copied will be reflected in that changeset, as "
4687 "will modifications to any files that Mercurial is already tracking; the new " 4695 "will modifications to any files that Mercurial is already tracking; the new "
4688 "changeset will have the parents of the working directory as its parents." 4696 "changeset will have the parents of the working directory as its parents."
4689 msgstr "" 4697 msgstr ""
4690 4698
4691 #. type: Content of: <book><chapter><sect1><sect2><para> 4699 #. type: Content of: <book><chapter><sect1><sect2><para>
4692 #: ../en/ch03-concepts.xml:384 4700 #: ../en/ch03-concepts.xml:373
4693 msgid "" 4701 msgid ""
4694 "After a commit, Mercurial will update the parents of the working directory, " 4702 "After a commit, Mercurial will update the parents of the working directory, "
4695 "so that the first parent is the ID of the new changeset, and the second is " 4703 "so that the first parent is the ID of the new changeset, and the second is "
4696 "the null ID. This is shown in figure <xref endterm=\"fig.concepts.wdir-after-" 4704 "the null ID. This is shown in <xref linkend=\"fig:concepts:wdir-after-commit"
4697 "commit.caption\" linkend=\"fig.concepts.wdir-after-commit\"/>. Mercurial " 4705 "\"/>. Mercurial doesn't touch any of the files in the working directory when "
4698 "doesn't touch any of the files in the working directory when you commit; it " 4706 "you commit; it just modifies the dirstate to note its new parents."
4699 "just modifies the dirstate to note its new parents."
4700 msgstr "" 4707 msgstr ""
4701 4708
4702 #. type: Content of: <book><chapter><sect1><sect2><title> 4709 #. type: Content of: <book><chapter><sect1><sect2><title>
4703 #: ../en/ch03-concepts.xml:396 4710 #: ../en/ch03-concepts.xml:384
4704 msgid "Creating a new head" 4711 msgid "Creating a new head"
4705 msgstr "创建新顶点" 4712 msgstr "创建新顶点"
4706 4713
4707 #. type: Content of: <book><chapter><sect1><sect2><para> 4714 #. type: Content of: <book><chapter><sect1><sect2><para>
4708 #: ../en/ch03-concepts.xml:398 4715 #: ../en/ch03-concepts.xml:386
4709 msgid "" 4716 msgid ""
4710 "It's perfectly normal to update the working directory to a changeset other " 4717 "It's perfectly normal to update the working directory to a changeset other "
4711 "than the current tip. For example, you might want to know what your project " 4718 "than the current tip. For example, you might want to know what your project "
4712 "looked like last Tuesday, or you could be looking through changesets to see " 4719 "looked like last Tuesday, or you could be looking through changesets to see "
4713 "which one introduced a bug. In cases like this, the natural thing to do is " 4720 "which one introduced a bug. In cases like this, the natural thing to do is "
4714 "update the working directory to the changeset you're interested in, and then " 4721 "update the working directory to the changeset you're interested in, and then "
4715 "examine the files in the working directory directly to see their contents as " 4722 "examine the files in the working directory directly to see their contents as "
4716 "they were when you committed that changeset. The effect of this is shown in " 4723 "they were when you committed that changeset. The effect of this is shown in "
4717 "figure <xref endterm=\"fig.concepts.wdir-pre-branch.caption\" linkend=\"fig." 4724 "<xref linkend=\"fig:concepts:wdir-pre-branch\"/>."
4718 "concepts.wdir-pre-branch\"/>." 4725 msgstr ""
4719 msgstr "" 4726
4720 4727 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4721 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4728 #: ../en/ch03-concepts.xml:398
4722 #: ../en/ch03-concepts.xml:412
4723 msgid ""
4724 "<imageobject><imagedata fileref=\"images/wdir-pre-branch.png\"/> </"
4725 "imageobject>"
4726 msgstr ""
4727
4728 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4729 #: ../en/ch03-concepts.xml:415
4730 msgid "The working directory, updated to an older changeset" 4729 msgid "The working directory, updated to an older changeset"
4731 msgstr "" 4730 msgstr ""
4732 4731
4733 #. type: Content of: <book><chapter><sect1><sect2><para> 4732 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4734 #: ../en/ch03-concepts.xml:420 4733 #: ../en/ch03-concepts.xml:401
4734 msgid ""
4735 "<imageobject><imagedata fileref=\"figs/wdir-pre-branch.png\"/></imageobject>"
4736 msgstr ""
4737
4738 #. type: Content of: <book><chapter><sect1><sect2><para>
4739 #: ../en/ch03-concepts.xml:406
4735 msgid "" 4740 msgid ""
4736 "Having updated the working directory to an older changeset, what happens if " 4741 "Having updated the working directory to an older changeset, what happens if "
4737 "you make some changes, and then commit? Mercurial behaves in the same way as " 4742 "you make some changes, and then commit? Mercurial behaves in the same way as "
4738 "I outlined above. The parents of the working directory become the parents of " 4743 "I outlined above. The parents of the working directory become the parents of "
4739 "the new changeset. This new changeset has no children, so it becomes the new " 4744 "the new changeset. This new changeset has no children, so it becomes the new "
4740 "tip. And the repository now contains two changesets that have no children; " 4745 "tip. And the repository now contains two changesets that have no children; "
4741 "we call these <emphasis>heads</emphasis>. You can see the structure that " 4746 "we call these <emphasis>heads</emphasis>. You can see the structure that "
4742 "this creates in figure <xref endterm=\"fig.concepts.wdir-branch.caption\" " 4747 "this creates in <xref linkend=\"fig:concepts:wdir-branch\"/>."
4743 "linkend=\"fig.concepts.wdir-branch\"/>." 4748 msgstr ""
4744 msgstr "" 4749
4745 4750 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4746 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4751 #: ../en/ch03-concepts.xml:418
4747 #: ../en/ch03-concepts.xml:434
4748 msgid ""
4749 "<imageobject><imagedata fileref=\"images/wdir-branch.png\"/> </imageobject>"
4750 msgstr ""
4751
4752 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4753 #: ../en/ch03-concepts.xml:437
4754 msgid "After a commit made while synced to an older changeset" 4752 msgid "After a commit made while synced to an older changeset"
4755 msgstr "" 4753 msgstr ""
4756 4754
4755 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4756 #: ../en/ch03-concepts.xml:421
4757 msgid "<imageobject><imagedata fileref=\"figs/wdir-branch.png\"/></imageobject>"
4758 msgstr ""
4759
4757 #. type: Content of: <book><chapter><sect1><sect2><note><para> 4760 #. type: Content of: <book><chapter><sect1><sect2><note><para>
4758 #: ../en/ch03-concepts.xml:443 4761 #: ../en/ch03-concepts.xml:427
4759 msgid "" 4762 msgid ""
4760 "If you're new to Mercurial, you should keep in mind a common <quote>error</" 4763 "If you're new to Mercurial, you should keep in mind a common <quote>error</"
4761 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> " 4764 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> "
4762 "command without any options. By default, the <command role=\"hg-cmd\">hg " 4765 "command without any options. By default, the <command role=\"hg-cmd\">hg "
4763 "pull</command> command <emphasis>does not</emphasis> update the working " 4766 "pull</command> command <emphasis>does not</emphasis> update the working "
4767 "head, because your working directory isn't synced to whatever the current tip " 4770 "head, because your working directory isn't synced to whatever the current tip "
4768 "is." 4771 "is."
4769 msgstr "" 4772 msgstr ""
4770 4773
4771 #. type: Content of: <book><chapter><sect1><sect2><note><para> 4774 #. type: Content of: <book><chapter><sect1><sect2><note><para>
4772 #: ../en/ch03-concepts.xml:455 4775 #: ../en/ch03-concepts.xml:439
4773 msgid "" 4776 msgid ""
4774 "I put the word <quote>error</quote> in quotes because all that you need to do " 4777 "I put the word <quote>error</quote> in quotes because all that you need to do "
4775 "to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, " 4778 "to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, "
4776 "then <command role=\"hg-cmd\">hg commit</command>. In other words, this " 4779 "then <command role=\"hg-cmd\">hg commit</command>. In other words, this "
4777 "almost never has negative consequences; it just surprises people. I'll " 4780 "almost never has negative consequences; it just surprises people. I'll "
4778 "discuss other ways to avoid this behaviour, and why Mercurial behaves in this " 4781 "discuss other ways to avoid this behaviour, and why Mercurial behaves in this "
4779 "initially surprising way, later on." 4782 "initially surprising way, later on."
4780 msgstr "" 4783 msgstr ""
4781 4784
4782 #. type: Content of: <book><chapter><sect1><sect2><title> 4785 #. type: Content of: <book><chapter><sect1><sect2><title>
4783 #: ../en/ch03-concepts.xml:467 4786 #: ../en/ch03-concepts.xml:451
4784 msgid "Merging heads" 4787 msgid "Merging heads"
4785 msgstr "合并顶点" 4788 msgstr "合并顶点"
4786 4789
4787 #. type: Content of: <book><chapter><sect1><sect2><para> 4790 #. type: Content of: <book><chapter><sect1><sect2><para>
4788 #: ../en/ch03-concepts.xml:469 4791 #: ../en/ch03-concepts.xml:453
4789 msgid "" 4792 msgid ""
4790 "When you run the <command role=\"hg-cmd\">hg merge</command> command, " 4793 "When you run the <command role=\"hg-cmd\">hg merge</command> command, "
4791 "Mercurial leaves the first parent of the working directory unchanged, and " 4794 "Mercurial leaves the first parent of the working directory unchanged, and "
4792 "sets the second parent to the changeset you're merging with, as shown in " 4795 "sets the second parent to the changeset you're merging with, as shown in "
4793 "figure <xref endterm=\"fig.concepts.wdir-merge.caption\" linkend=\"fig." 4796 "<xref linkend=\"fig:concepts:wdir-merge\"/>."
4794 "concepts.wdir-merge\"/>." 4797 msgstr ""
4795 msgstr "" 4798
4796 4799 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
4797 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4800 #: ../en/ch03-concepts.xml:460
4798 #: ../en/ch03-concepts.xml:478
4799 msgid ""
4800 "<imageobject><imagedata fileref=\"images/wdir-merge.png\"/> </imageobject>"
4801 msgstr ""
4802
4803 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4804 #: ../en/ch03-concepts.xml:481
4805 msgid "Merging two heads" 4801 msgid "Merging two heads"
4806 msgstr "" 4802 msgstr ""
4807 4803
4808 #. type: Content of: <book><chapter><sect1><sect2><para> 4804 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
4809 #: ../en/ch03-concepts.xml:486 4805 #: ../en/ch03-concepts.xml:462
4806 msgid ""
4807 "<imageobject> <imagedata fileref=\"figs/wdir-merge.png\"/> </imageobject>"
4808 msgstr ""
4809
4810 #. type: Content of: <book><chapter><sect1><sect2><para>
4811 #: ../en/ch03-concepts.xml:469
4810 msgid "" 4812 msgid ""
4811 "Mercurial also has to modify the working directory, to merge the files " 4813 "Mercurial also has to modify the working directory, to merge the files "
4812 "managed in the two changesets. Simplified a little, the merging process goes " 4814 "managed in the two changesets. Simplified a little, the merging process goes "
4813 "like this, for every file in the manifests of both changesets." 4815 "like this, for every file in the manifests of both changesets."
4814 msgstr "" 4816 msgstr ""
4815 4817
4816 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4818 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4817 #: ../en/ch03-concepts.xml:491 4819 #: ../en/ch03-concepts.xml:474
4818 msgid "If neither changeset has modified a file, do nothing with that file." 4820 msgid "If neither changeset has modified a file, do nothing with that file."
4819 msgstr "" 4821 msgstr ""
4820 4822
4821 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4823 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4822 #: ../en/ch03-concepts.xml:494 4824 #: ../en/ch03-concepts.xml:477
4823 msgid "" 4825 msgid ""
4824 "If one changeset has modified a file, and the other hasn't, create the " 4826 "If one changeset has modified a file, and the other hasn't, create the "
4825 "modified copy of the file in the working directory." 4827 "modified copy of the file in the working directory."
4826 msgstr "" 4828 msgstr ""
4827 4829
4828 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4830 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4829 #: ../en/ch03-concepts.xml:498 4831 #: ../en/ch03-concepts.xml:481
4830 msgid "" 4832 msgid ""
4831 "If one changeset has removed a file, and the other hasn't (or has also " 4833 "If one changeset has removed a file, and the other hasn't (or has also "
4832 "deleted it), delete the file from the working directory." 4834 "deleted it), delete the file from the working directory."
4833 msgstr "" 4835 msgstr ""
4834 4836
4835 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4837 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4836 #: ../en/ch03-concepts.xml:502 4838 #: ../en/ch03-concepts.xml:485
4837 msgid "" 4839 msgid ""
4838 "If one changeset has removed a file, but the other has modified the file, ask " 4840 "If one changeset has removed a file, but the other has modified the file, ask "
4839 "the user what to do: keep the modified file, or remove it?" 4841 "the user what to do: keep the modified file, or remove it?"
4840 msgstr "" 4842 msgstr ""
4841 4843
4842 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4844 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4843 #: ../en/ch03-concepts.xml:506 4845 #: ../en/ch03-concepts.xml:489
4844 msgid "" 4846 msgid ""
4845 "If both changesets have modified a file, invoke an external merge program to " 4847 "If both changesets have modified a file, invoke an external merge program to "
4846 "choose the new contents for the merged file. This may require input from the " 4848 "choose the new contents for the merged file. This may require input from the "
4847 "user." 4849 "user."
4848 msgstr "" 4850 msgstr ""
4849 4851
4850 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4852 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4851 #: ../en/ch03-concepts.xml:511 4853 #: ../en/ch03-concepts.xml:494
4852 msgid "" 4854 msgid ""
4853 "If one changeset has modified a file, and the other has renamed or copied the " 4855 "If one changeset has modified a file, and the other has renamed or copied the "
4854 "file, make sure that the changes follow the new name of the file." 4856 "file, make sure that the changes follow the new name of the file."
4855 msgstr "" 4857 msgstr ""
4856 4858
4857 #. type: Content of: <book><chapter><sect1><sect2><para> 4859 #. type: Content of: <book><chapter><sect1><sect2><para>
4858 #: ../en/ch03-concepts.xml:515 4860 #: ../en/ch03-concepts.xml:498
4859 msgid "" 4861 msgid ""
4860 "There are more details&emdash;merging has plenty of corner cases&emdash;but " 4862 "There are more details&emdash;merging has plenty of corner cases&emdash;but "
4861 "these are the most common choices that are involved in a merge. As you can " 4863 "these are the most common choices that are involved in a merge. As you can "
4862 "see, most cases are completely automatic, and indeed most merges finish " 4864 "see, most cases are completely automatic, and indeed most merges finish "
4863 "automatically, without requiring your input to resolve any conflicts." 4865 "automatically, without requiring your input to resolve any conflicts."
4864 msgstr "" 4866 msgstr ""
4865 4867
4866 #. type: Content of: <book><chapter><sect1><sect2><para> 4868 #. type: Content of: <book><chapter><sect1><sect2><para>
4867 #: ../en/ch03-concepts.xml:522 4869 #: ../en/ch03-concepts.xml:505
4868 msgid "" 4870 msgid ""
4869 "When you're thinking about what happens when you commit after a merge, once " 4871 "When you're thinking about what happens when you commit after a merge, once "
4870 "again the working directory is <quote>the changeset I'm about to commit</" 4872 "again the working directory is <quote>the changeset I'm about to commit</"
4871 "quote>. After the <command role=\"hg-cmd\">hg merge</command> command " 4873 "quote>. After the <command role=\"hg-cmd\">hg merge</command> command "
4872 "completes, the working directory has two parents; these will become the " 4874 "completes, the working directory has two parents; these will become the "
4873 "parents of the new changeset." 4875 "parents of the new changeset."
4874 msgstr "" 4876 msgstr ""
4875 4877
4876 #. type: Content of: <book><chapter><sect1><sect2><para> 4878 #. type: Content of: <book><chapter><sect1><sect2><para>
4877 #: ../en/ch03-concepts.xml:529 4879 #: ../en/ch03-concepts.xml:512
4878 msgid "" 4880 msgid ""
4879 "Mercurial lets you perform multiple merges, but you must commit the results " 4881 "Mercurial lets you perform multiple merges, but you must commit the results "
4880 "of each individual merge as you go. This is necessary because Mercurial only " 4882 "of each individual merge as you go. This is necessary because Mercurial only "
4881 "tracks two parents for both revisions and the working directory. While it " 4883 "tracks two parents for both revisions and the working directory. While it "
4882 "would be technically possible to merge multiple changesets at once, the " 4884 "would be technically possible to merge multiple changesets at once, the "
4883 "prospect of user confusion and making a terrible mess of a merge immediately " 4885 "prospect of user confusion and making a terrible mess of a merge immediately "
4884 "becomes overwhelming." 4886 "becomes overwhelming."
4885 msgstr "" 4887 msgstr ""
4886 4888
4887 #. type: Content of: <book><chapter><sect1><title> 4889 #. type: Content of: <book><chapter><sect1><title>
4888 #: ../en/ch03-concepts.xml:540 4890 #: ../en/ch03-concepts.xml:523
4889 msgid "Other interesting design features" 4891 msgid "Other interesting design features"
4890 msgstr "其它有趣的设计特性" 4892 msgstr "其它有趣的设计特性"
4891 4893
4892 #. type: Content of: <book><chapter><sect1><para> 4894 #. type: Content of: <book><chapter><sect1><para>
4893 #: ../en/ch03-concepts.xml:542 4895 #: ../en/ch03-concepts.xml:525
4894 msgid "" 4896 msgid ""
4895 "In the sections above, I've tried to highlight some of the most important " 4897 "In the sections above, I've tried to highlight some of the most important "
4896 "aspects of Mercurial's design, to illustrate that it pays careful attention " 4898 "aspects of Mercurial's design, to illustrate that it pays careful attention "
4897 "to reliability and performance. However, the attention to detail doesn't " 4899 "to reliability and performance. However, the attention to detail doesn't "
4898 "stop there. There are a number of other aspects of Mercurial's construction " 4900 "stop there. There are a number of other aspects of Mercurial's construction "
4901 "you can gain a better idea of the amount of thinking that goes into a well-" 4903 "you can gain a better idea of the amount of thinking that goes into a well-"
4902 "designed system." 4904 "designed system."
4903 msgstr "" 4905 msgstr ""
4904 4906
4905 #. type: Content of: <book><chapter><sect1><sect2><title> 4907 #. type: Content of: <book><chapter><sect1><sect2><title>
4906 #: ../en/ch03-concepts.xml:553 4908 #: ../en/ch03-concepts.xml:536
4907 msgid "Clever compression" 4909 msgid "Clever compression"
4908 msgstr "智能压缩" 4910 msgstr "智能压缩"
4909 4911
4910 #. type: Content of: <book><chapter><sect1><sect2><para> 4912 #. type: Content of: <book><chapter><sect1><sect2><para>
4911 #: ../en/ch03-concepts.xml:555 4913 #: ../en/ch03-concepts.xml:538
4912 msgid "" 4914 msgid ""
4913 "When appropriate, Mercurial will store both snapshots and deltas in " 4915 "When appropriate, Mercurial will store both snapshots and deltas in "
4914 "compressed form. It does this by always <emphasis>trying to</emphasis> " 4916 "compressed form. It does this by always <emphasis>trying to</emphasis> "
4915 "compress a snapshot or delta, but only storing the compressed version if it's " 4917 "compress a snapshot or delta, but only storing the compressed version if it's "
4916 "smaller than the uncompressed version." 4918 "smaller than the uncompressed version."
4917 msgstr "" 4919 msgstr ""
4918 4920
4919 #. type: Content of: <book><chapter><sect1><sect2><para> 4921 #. type: Content of: <book><chapter><sect1><sect2><para>
4920 #: ../en/ch03-concepts.xml:561 4922 #: ../en/ch03-concepts.xml:544
4921 msgid "" 4923 msgid ""
4922 "This means that Mercurial does <quote>the right thing</quote> when storing a " 4924 "This means that Mercurial does <quote>the right thing</quote> when storing a "
4923 "file whose native form is compressed, such as a <literal>zip</literal> " 4925 "file whose native form is compressed, such as a <literal>zip</literal> "
4924 "archive or a JPEG image. When these types of files are compressed a second " 4926 "archive or a JPEG image. When these types of files are compressed a second "
4925 "time, the resulting file is usually bigger than the once-compressed form, and " 4927 "time, the resulting file is usually bigger than the once-compressed form, and "
4926 "so Mercurial will store the plain <literal>zip</literal> or JPEG." 4928 "so Mercurial will store the plain <literal>zip</literal> or JPEG."
4927 msgstr "" 4929 msgstr ""
4928 4930
4929 #. type: Content of: <book><chapter><sect1><sect2><para> 4931 #. type: Content of: <book><chapter><sect1><sect2><para>
4930 #: ../en/ch03-concepts.xml:569 4932 #: ../en/ch03-concepts.xml:552
4931 msgid "" 4933 msgid ""
4932 "Deltas between revisions of a compressed file are usually larger than " 4934 "Deltas between revisions of a compressed file are usually larger than "
4933 "snapshots of the file, and Mercurial again does <quote>the right thing</" 4935 "snapshots of the file, and Mercurial again does <quote>the right thing</"
4934 "quote> in these cases. It finds that such a delta exceeds the threshold at " 4936 "quote> in these cases. It finds that such a delta exceeds the threshold at "
4935 "which it should store a complete snapshot of the file, so it stores the " 4937 "which it should store a complete snapshot of the file, so it stores the "
4936 "snapshot, again saving space compared to a naive delta-only approach." 4938 "snapshot, again saving space compared to a naive delta-only approach."
4937 msgstr "" 4939 msgstr ""
4938 4940
4939 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 4941 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
4940 #: ../en/ch03-concepts.xml:578 4942 #: ../en/ch03-concepts.xml:561
4941 msgid "Network recompression" 4943 msgid "Network recompression"
4942 msgstr "网络重新压缩" 4944 msgstr "网络重新压缩"
4943 4945
4944 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4946 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4945 #: ../en/ch03-concepts.xml:580 4947 #: ../en/ch03-concepts.xml:563
4946 msgid "" 4948 msgid ""
4947 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " 4949 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> "
4948 "compression algorithm (the same one used by the popular <literal>zip</" 4950 "compression algorithm (the same one used by the popular <literal>zip</"
4949 "literal> archive format), which balances good speed with a respectable " 4951 "literal> archive format), which balances good speed with a respectable "
4950 "compression ratio. However, when transmitting revision data over a network " 4952 "compression ratio. However, when transmitting revision data over a network "
4951 "connection, Mercurial uncompresses the compressed revision data." 4953 "connection, Mercurial uncompresses the compressed revision data."
4952 msgstr "" 4954 msgstr ""
4953 4955
4954 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4956 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4955 #: ../en/ch03-concepts.xml:588 4957 #: ../en/ch03-concepts.xml:571
4956 msgid "" 4958 msgid ""
4957 "If the connection is over HTTP, Mercurial recompresses the entire stream of " 4959 "If the connection is over HTTP, Mercurial recompresses the entire stream of "
4958 "data using a compression algorithm that gives a better compression ratio (the " 4960 "data using a compression algorithm that gives a better compression ratio (the "
4959 "Burrows-Wheeler algorithm from the widely used <literal>bzip2</literal> " 4961 "Burrows-Wheeler algorithm from the widely used <literal>bzip2</literal> "
4960 "compression package). This combination of algorithm and compression of the " 4962 "compression package). This combination of algorithm and compression of the "
4962 "number of bytes to be transferred, yielding better network performance over " 4964 "number of bytes to be transferred, yielding better network performance over "
4963 "almost all kinds of network." 4965 "almost all kinds of network."
4964 msgstr "" 4966 msgstr ""
4965 4967
4966 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4968 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4967 #: ../en/ch03-concepts.xml:598 4969 #: ../en/ch03-concepts.xml:581
4968 msgid "" 4970 msgid ""
4969 "(If the connection is over <command>ssh</command>, Mercurial " 4971 "(If the connection is over <command>ssh</command>, Mercurial "
4970 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" 4972 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</"
4971 "command> can already do this itself.)" 4973 "command> can already do this itself.)"
4972 msgstr "" 4974 msgstr ""
4973 4975
4974 #. type: Content of: <book><chapter><sect1><sect2><title> 4976 #. type: Content of: <book><chapter><sect1><sect2><title>
4975 #: ../en/ch03-concepts.xml:606 4977 #: ../en/ch03-concepts.xml:589
4976 msgid "Read/write ordering and atomicity" 4978 msgid "Read/write ordering and atomicity"
4977 msgstr "读写顺序与原子性" 4979 msgstr "读写顺序与原子性"
4978 4980
4979 #. type: Content of: <book><chapter><sect1><sect2><para> 4981 #. type: Content of: <book><chapter><sect1><sect2><para>
4980 #: ../en/ch03-concepts.xml:608 4982 #: ../en/ch03-concepts.xml:591
4981 msgid "" 4983 msgid ""
4982 "Appending to files isn't the whole story when it comes to guaranteeing that a " 4984 "Appending to files isn't the whole story when it comes to guaranteeing that a "
4983 "reader won't see a partial write. If you recall figure <xref endterm=\"fig." 4985 "reader won't see a partial write. If you recall <xref linkend=\"fig:concepts:"
4984 "concepts.metadata.caption\" linkend=\"fig.concepts.metadata\"/>, revisions in " 4986 "metadata\"/>, revisions in the changelog point to revisions in the manifest, "
4985 "the changelog point to revisions in the manifest, and revisions in the " 4987 "and revisions in the manifest point to revisions in filelogs. This hierarchy "
4986 "manifest point to revisions in filelogs. This hierarchy is deliberate." 4988 "is deliberate."
4987 msgstr "" 4989 msgstr ""
4988 4990
4989 #. type: Content of: <book><chapter><sect1><sect2><para> 4991 #. type: Content of: <book><chapter><sect1><sect2><para>
4990 #: ../en/ch03-concepts.xml:616 4992 #: ../en/ch03-concepts.xml:599
4991 msgid "" 4993 msgid ""
4992 "A writer starts a transaction by writing filelog and manifest data, and " 4994 "A writer starts a transaction by writing filelog and manifest data, and "
4993 "doesn't write any changelog data until those are finished. A reader starts " 4995 "doesn't write any changelog data until those are finished. A reader starts "
4994 "by reading changelog data, then manifest data, followed by filelog data." 4996 "by reading changelog data, then manifest data, followed by filelog data."
4995 msgstr "" 4997 msgstr ""
4996 4998
4997 #. type: Content of: <book><chapter><sect1><sect2><para> 4999 #. type: Content of: <book><chapter><sect1><sect2><para>
4998 #: ../en/ch03-concepts.xml:621 5000 #: ../en/ch03-concepts.xml:604
4999 msgid "" 5001 msgid ""
5000 "Since the writer has always finished writing filelog and manifest data before " 5002 "Since the writer has always finished writing filelog and manifest data before "
5001 "it writes to the changelog, a reader will never read a pointer to a partially " 5003 "it writes to the changelog, a reader will never read a pointer to a partially "
5002 "written manifest revision from the changelog, and it will never read a " 5004 "written manifest revision from the changelog, and it will never read a "
5003 "pointer to a partially written filelog revision from the manifest." 5005 "pointer to a partially written filelog revision from the manifest."
5004 msgstr "" 5006 msgstr ""
5005 5007
5006 #. type: Content of: <book><chapter><sect1><sect2><title> 5008 #. type: Content of: <book><chapter><sect1><sect2><title>
5007 #: ../en/ch03-concepts.xml:629 5009 #: ../en/ch03-concepts.xml:612
5008 msgid "Concurrent access" 5010 msgid "Concurrent access"
5009 msgstr "并发访问" 5011 msgstr "并发访问"
5010 5012
5011 #. type: Content of: <book><chapter><sect1><sect2><para> 5013 #. type: Content of: <book><chapter><sect1><sect2><para>
5012 #: ../en/ch03-concepts.xml:631 5014 #: ../en/ch03-concepts.xml:614
5013 msgid "" 5015 msgid ""
5014 "The read/write ordering and atomicity guarantees mean that Mercurial never " 5016 "The read/write ordering and atomicity guarantees mean that Mercurial never "
5015 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even " 5017 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even "
5016 "if the repository is being written to while the read is occurring. This has a " 5018 "if the repository is being written to while the read is occurring. This has a "
5017 "big effect on scalability; you can have an arbitrary number of Mercurial " 5019 "big effect on scalability; you can have an arbitrary number of Mercurial "
5018 "processes safely reading data from a repository safely all at once, no matter " 5020 "processes safely reading data from a repository safely all at once, no matter "
5019 "whether it's being written to or not." 5021 "whether it's being written to or not."
5020 msgstr "" 5022 msgstr ""
5021 5023
5022 #. type: Content of: <book><chapter><sect1><sect2><para> 5024 #. type: Content of: <book><chapter><sect1><sect2><para>
5023 #: ../en/ch03-concepts.xml:640 5025 #: ../en/ch03-concepts.xml:623
5024 msgid "" 5026 msgid ""
5025 "The lockless nature of reading means that if you're sharing a repository on a " 5027 "The lockless nature of reading means that if you're sharing a repository on a "
5026 "multi-user system, you don't need to grant other local users permission to " 5028 "multi-user system, you don't need to grant other local users permission to "
5027 "<emphasis>write</emphasis> to your repository in order for them to be able to " 5029 "<emphasis>write</emphasis> to your repository in order for them to be able to "
5028 "clone it or pull changes from it; they only need <emphasis>read</emphasis> " 5030 "clone it or pull changes from it; they only need <emphasis>read</emphasis> "
5032 "permission on at least one directory, which of course makes for all kinds of " 5034 "permission on at least one directory, which of course makes for all kinds of "
5033 "nasty and annoying security and administrative problems.)" 5035 "nasty and annoying security and administrative problems.)"
5034 msgstr "" 5036 msgstr ""
5035 5037
5036 #. type: Content of: <book><chapter><sect1><sect2><para> 5038 #. type: Content of: <book><chapter><sect1><sect2><para>
5037 #: ../en/ch03-concepts.xml:653 5039 #: ../en/ch03-concepts.xml:636
5038 msgid "" 5040 msgid ""
5039 "Mercurial uses locks to ensure that only one process can write to a " 5041 "Mercurial uses locks to ensure that only one process can write to a "
5040 "repository at a time (the locking mechanism is safe even over filesystems " 5042 "repository at a time (the locking mechanism is safe even over filesystems "
5041 "that are notoriously hostile to locking, such as NFS). If a repository is " 5043 "that are notoriously hostile to locking, such as NFS). If a repository is "
5042 "locked, a writer will wait for a while to retry if the repository becomes " 5044 "locked, a writer will wait for a while to retry if the repository becomes "
5046 "unnoticed, for example. (Yes, the timeout is configurable, from zero to " 5048 "unnoticed, for example. (Yes, the timeout is configurable, from zero to "
5047 "infinity.)" 5049 "infinity.)"
5048 msgstr "" 5050 msgstr ""
5049 5051
5050 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 5052 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
5051 #: ../en/ch03-concepts.xml:665 5053 #: ../en/ch03-concepts.xml:648
5052 msgid "Safe dirstate access" 5054 msgid "Safe dirstate access"
5053 msgstr "安全的目录状态访问" 5055 msgstr "安全的目录状态访问"
5054 5056
5055 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 5057 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
5056 #: ../en/ch03-concepts.xml:667 5058 #: ../en/ch03-concepts.xml:650
5057 msgid "" 5059 msgid ""
5058 "As with revision data, Mercurial doesn't take a lock to read the dirstate " 5060 "As with revision data, Mercurial doesn't take a lock to read the dirstate "
5059 "file; it does acquire a lock to write it. To avoid the possibility of " 5061 "file; it does acquire a lock to write it. To avoid the possibility of "
5060 "reading a partially written copy of the dirstate file, Mercurial writes to a " 5062 "reading a partially written copy of the dirstate file, Mercurial writes to a "
5061 "file with a unique name in the same directory as the dirstate file, then " 5063 "file with a unique name in the same directory as the dirstate file, then "
5063 "file named <filename>dirstate</filename> is thus guaranteed to be complete, " 5065 "file named <filename>dirstate</filename> is thus guaranteed to be complete, "
5064 "not partially written." 5066 "not partially written."
5065 msgstr "" 5067 msgstr ""
5066 5068
5067 #. type: Content of: <book><chapter><sect1><sect2><title> 5069 #. type: Content of: <book><chapter><sect1><sect2><title>
5068 #: ../en/ch03-concepts.xml:680 5070 #: ../en/ch03-concepts.xml:663
5069 msgid "Avoiding seeks" 5071 msgid "Avoiding seeks"
5070 msgstr "避免查找" 5072 msgstr "避免查找"
5071 5073
5072 #. type: Content of: <book><chapter><sect1><sect2><para> 5074 #. type: Content of: <book><chapter><sect1><sect2><para>
5073 #: ../en/ch03-concepts.xml:682 5075 #: ../en/ch03-concepts.xml:665
5074 msgid "" 5076 msgid ""
5075 "Critical to Mercurial's performance is the avoidance of seeks of the disk " 5077 "Critical to Mercurial's performance is the avoidance of seeks of the disk "
5076 "head, since any seek is far more expensive than even a comparatively large " 5078 "head, since any seek is far more expensive than even a comparatively large "
5077 "read operation." 5079 "read operation."
5078 msgstr "" 5080 msgstr ""
5079 5081
5080 #. type: Content of: <book><chapter><sect1><sect2><para> 5082 #. type: Content of: <book><chapter><sect1><sect2><para>
5081 #: ../en/ch03-concepts.xml:686 5083 #: ../en/ch03-concepts.xml:669
5082 msgid "" 5084 msgid ""
5083 "This is why, for example, the dirstate is stored in a single file. If there " 5085 "This is why, for example, the dirstate is stored in a single file. If there "
5084 "were a dirstate file per directory that Mercurial tracked, the disk would " 5086 "were a dirstate file per directory that Mercurial tracked, the disk would "
5085 "seek once per directory. Instead, Mercurial reads the entire single dirstate " 5087 "seek once per directory. Instead, Mercurial reads the entire single dirstate "
5086 "file in one step." 5088 "file in one step."
5087 msgstr "" 5089 msgstr ""
5088 5090
5089 #. type: Content of: <book><chapter><sect1><sect2><para> 5091 #. type: Content of: <book><chapter><sect1><sect2><para>
5090 #: ../en/ch03-concepts.xml:692 5092 #: ../en/ch03-concepts.xml:675
5091 msgid "" 5093 msgid ""
5092 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a " 5094 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a "
5093 "repository on local storage. Instead of copying every revlog file from the " 5095 "repository on local storage. Instead of copying every revlog file from the "
5094 "old repository into the new repository, it makes a <quote>hard link</quote>, " 5096 "old repository into the new repository, it makes a <quote>hard link</quote>, "
5095 "which is a shorthand way to say <quote>these two names point to the same " 5097 "which is a shorthand way to say <quote>these two names point to the same "
5098 "one. If it is, more than one repository is using the file, so Mercurial " 5100 "one. If it is, more than one repository is using the file, so Mercurial "
5099 "makes a new copy of the file that is private to this repository." 5101 "makes a new copy of the file that is private to this repository."
5100 msgstr "" 5102 msgstr ""
5101 5103
5102 #. type: Content of: <book><chapter><sect1><sect2><para> 5104 #. type: Content of: <book><chapter><sect1><sect2><para>
5103 #: ../en/ch03-concepts.xml:703 5105 #: ../en/ch03-concepts.xml:686
5104 msgid "" 5106 msgid ""
5105 "A few revision control developers have pointed out that this idea of making a " 5107 "A few revision control developers have pointed out that this idea of making a "
5106 "complete private copy of a file is not very efficient in its use of storage. " 5108 "complete private copy of a file is not very efficient in its use of storage. "
5107 "While this is true, storage is cheap, and this method gives the highest " 5109 "While this is true, storage is cheap, and this method gives the highest "
5108 "performance while deferring most book-keeping to the operating system. An " 5110 "performance while deferring most book-keeping to the operating system. An "
5110 "complexity of the software, each of which is much more important to the " 5112 "complexity of the software, each of which is much more important to the "
5111 "<quote>feel</quote> of day-to-day use." 5113 "<quote>feel</quote> of day-to-day use."
5112 msgstr "" 5114 msgstr ""
5113 5115
5114 #. type: Content of: <book><chapter><sect1><sect2><title> 5116 #. type: Content of: <book><chapter><sect1><sect2><title>
5115 #: ../en/ch03-concepts.xml:715 5117 #: ../en/ch03-concepts.xml:698
5116 msgid "Other contents of the dirstate" 5118 msgid "Other contents of the dirstate"
5117 msgstr "目录状态的其它内容" 5119 msgstr "目录状态的其它内容"
5118 5120
5119 #. type: Content of: <book><chapter><sect1><sect2><para> 5121 #. type: Content of: <book><chapter><sect1><sect2><para>
5120 #: ../en/ch03-concepts.xml:717 5122 #: ../en/ch03-concepts.xml:700
5121 msgid "" 5123 msgid ""
5122 "Because Mercurial doesn't force you to tell it when you're modifying a file, " 5124 "Because Mercurial doesn't force you to tell it when you're modifying a file, "
5123 "it uses the dirstate to store some extra information so it can determine " 5125 "it uses the dirstate to store some extra information so it can determine "
5124 "efficiently whether you have modified a file. For each file in the working " 5126 "efficiently whether you have modified a file. For each file in the working "
5125 "directory, it stores the time that it last modified the file itself, and the " 5127 "directory, it stores the time that it last modified the file itself, and the "
5126 "size of the file at that time." 5128 "size of the file at that time."
5127 msgstr "" 5129 msgstr ""
5128 5130
5129 #. type: Content of: <book><chapter><sect1><sect2><para> 5131 #. type: Content of: <book><chapter><sect1><sect2><para>
5130 #: ../en/ch03-concepts.xml:724 5132 #: ../en/ch03-concepts.xml:707
5131 msgid "" 5133 msgid ""
5132 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role=" 5134 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role="
5133 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> " 5135 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> "
5134 "or <command role=\"hg-cmd\">hg copy</command> files, Mercurial updates the " 5136 "or <command role=\"hg-cmd\">hg copy</command> files, Mercurial updates the "
5135 "dirstate so that it knows what to do with those files when you commit." 5137 "dirstate so that it knows what to do with those files when you commit."
5136 msgstr "" 5138 msgstr ""
5137 5139
5138 #. type: Content of: <book><chapter><sect1><sect2><para> 5140 #. type: Content of: <book><chapter><sect1><sect2><para>
5139 #: ../en/ch03-concepts.xml:731 5141 #: ../en/ch03-concepts.xml:714
5140 msgid "" 5142 msgid ""
5141 "When Mercurial is checking the states of files in the working directory, it " 5143 "When Mercurial is checking the states of files in the working directory, it "
5142 "first checks a file's modification time. If that has not changed, the file " 5144 "first checks a file's modification time. If that has not changed, the file "
5143 "must not have been modified. If the file's size has changed, the file must " 5145 "must not have been modified. If the file's size has changed, the file must "
5144 "have been modified. If the modification time has changed, but the size has " 5146 "have been modified. If the modification time has changed, but the size has "
5570 msgid "" 5572 msgid ""
5571 "If, for some reason, you decide that this business of automatically " 5573 "If, for some reason, you decide that this business of automatically "
5572 "propagating changes across copies is not for you, simply use your system's " 5574 "propagating changes across copies is not for you, simply use your system's "
5573 "normal file copy command (on Unix-like systems, that's <command>cp</command>) " 5575 "normal file copy command (on Unix-like systems, that's <command>cp</command>) "
5574 "to make a copy of a file, then <command role=\"hg-cmd\">hg add</command> the " 5576 "to make a copy of a file, then <command role=\"hg-cmd\">hg add</command> the "
5575 "new copy by hand. Before you do so, though, please do reread section <xref " 5577 "new copy by hand. Before you do so, though, please do reread <xref linkend="
5576 "linkend=\"sec.daily.why-copy\"/>, and make an informed decision that this " 5578 "\"sec:daily:why-copy\"/>, and make an informed decision that this behaviour "
5577 "behaviour is not appropriate to your specific case." 5579 "is not appropriate to your specific case."
5578 msgstr "" 5580 msgstr ""
5579 5581
5580 #. type: Content of: <book><chapter><sect1><sect2><title> 5582 #. type: Content of: <book><chapter><sect1><sect2><title>
5581 #: ../en/ch04-daily.xml:338 5583 #: ../en/ch04-daily.xml:338
5582 msgid "Behaviour of the <command role=\"hg-cmd\">hg copy</command> command" 5584 msgid "Behaviour of the <command role=\"hg-cmd\">hg copy</command> command"
5828 #. type: Content of: <book><chapter><sect1><para> 5830 #. type: Content of: <book><chapter><sect1><para>
5829 #: ../en/ch04-daily.xml:532 5831 #: ../en/ch04-daily.xml:532
5830 msgid "" 5832 msgid ""
5831 "For more information about the <command role=\"hg-cmd\">hg revert</command> " 5833 "For more information about the <command role=\"hg-cmd\">hg revert</command> "
5832 "command, and details about how to deal with changes you have already " 5834 "command, and details about how to deal with changes you have already "
5833 "committed, see chapter <xref linkend=\"chap.undo\"/>." 5835 "committed, see <xref linkend=\"chap:undo\"/>."
5834 msgstr "" 5836 msgstr ""
5835 5837
5836 #. type: Content of: <book><chapter><title> 5838 #. type: Content of: <book><chapter><title>
5837 #: ../en/ch05-collab.xml:5 5839 #: ../en/ch05-collab.xml:5
5838 msgid "Collaborating with other people" 5840 msgid "Collaborating with other people"
5902 #: ../en/ch05-collab.xml:45 5904 #: ../en/ch05-collab.xml:45
5903 msgid "" 5905 msgid ""
5904 "If you're interested in providing a web interface to your own repositories, " 5906 "If you're interested in providing a web interface to your own repositories, "
5905 "Mercurial provides two ways to do this. The first is using the <command role=" 5907 "Mercurial provides two ways to do this. The first is using the <command role="
5906 "\"hg-cmd\">hg serve</command> command, which is best suited to short-term " 5908 "\"hg-cmd\">hg serve</command> command, which is best suited to short-term "
5907 "<quote>lightweight</quote> serving. See section <xref linkend=\"sec.collab." 5909 "<quote>lightweight</quote> serving. See <xref linkend=\"sec:collab:serve\"/> "
5908 "serve\"/> below for details of how to use this command. If you have a long-" 5910 "below for details of how to use this command. If you have a long-lived "
5909 "lived repository that you'd like to make permanently available, Mercurial has " 5911 "repository that you'd like to make permanently available, Mercurial has built-"
5910 "built-in support for the CGI (Common Gateway Interface) standard, which all " 5912 "in support for the CGI (Common Gateway Interface) standard, which all common "
5911 "common web servers support. See section <xref linkend=\"sec.collab.cgi\"/> " 5913 "web servers support. See <xref linkend=\"sec:collab:cgi\"/> for details of "
5912 "for details of CGI configuration." 5914 "CGI configuration."
5913 msgstr "" 5915 msgstr ""
5914 5916
5915 #. type: Content of: <book><chapter><sect1><title> 5917 #. type: Content of: <book><chapter><sect1><title>
5916 #: ../en/ch05-collab.xml:60 5918 #: ../en/ch05-collab.xml:60
5917 msgid "Collaboration models" 5919 msgid "Collaboration models"
5997 #: ../en/ch05-collab.xml:118 5999 #: ../en/ch05-collab.xml:118
5998 msgid "" 6000 msgid ""
5999 "A sprint is the perfect place to use the <command role=\"hg-cmd\">hg serve</" 6001 "A sprint is the perfect place to use the <command role=\"hg-cmd\">hg serve</"
6000 "command> command, since <command role=\"hg-cmd\">hg serve</command> does not " 6002 "command> command, since <command role=\"hg-cmd\">hg serve</command> does not "
6001 "require any fancy server infrastructure. You can get started with <command " 6003 "require any fancy server infrastructure. You can get started with <command "
6002 "role=\"hg-cmd\">hg serve</command> in moments, by reading section <xref " 6004 "role=\"hg-cmd\">hg serve</command> in moments, by reading <xref linkend=\"sec:"
6003 "linkend=\"sec.collab.serve\"/> below. Then simply tell the person next to " 6005 "collab:serve\"/> below. Then simply tell the person next to you that you're "
6004 "you that you're running a server, send the URL to them in an instant message, " 6006 "running a server, send the URL to them in an instant message, and you "
6005 "and you immediately have a quick-turnaround way to work together. They can " 6007 "immediately have a quick-turnaround way to work together. They can type your "
6006 "type your URL into their web browser and quickly review your changes; or they " 6008 "URL into their web browser and quickly review your changes; or they can pull "
6007 "can pull a bugfix from you and verify it; or they can clone a branch " 6009 "a bugfix from you and verify it; or they can clone a branch containing a new "
6008 "containing a new feature and try it out." 6010 "feature and try it out."
6009 msgstr "" 6011 msgstr ""
6010 6012
6011 #. type: Content of: <book><chapter><sect1><sect2><para> 6013 #. type: Content of: <book><chapter><sect1><sect2><para>
6012 #: ../en/ch05-collab.xml:132 6014 #: ../en/ch05-collab.xml:132
6013 msgid "" 6015 msgid ""
6057 #. type: Content of: <book><chapter><sect1><sect2><para> 6059 #. type: Content of: <book><chapter><sect1><sect2><para>
6058 #: ../en/ch05-collab.xml:165 6060 #: ../en/ch05-collab.xml:165
6059 msgid "" 6061 msgid ""
6060 "In this kind of scenario, people usually use the <command>ssh</command> " 6062 "In this kind of scenario, people usually use the <command>ssh</command> "
6061 "protocol to securely push changes to the central repository, as documented in " 6063 "protocol to securely push changes to the central repository, as documented in "
6062 "section <xref linkend=\"sec.collab.ssh\"/>. It's also usual to publish a " 6064 "<xref linkend=\"sec:collab:ssh\"/>. It's also usual to publish a read-only "
6063 "read-only copy of the repository over HTTP using CGI, as in section <xref " 6065 "copy of the repository over HTTP using CGI, as in <xref linkend=\"sec:collab:"
6064 "linkend=\"sec.collab.cgi\"/>. Publishing over HTTP satisfies the needs of " 6066 "cgi\"/>. Publishing over HTTP satisfies the needs of people who don't have "
6065 "people who don't have push access, and those who want to use web browsers to " 6067 "push access, and those who want to use web browsers to browse the "
6066 "browse the repository's history." 6068 "repository's history."
6067 msgstr "" 6069 msgstr ""
6068 6070
6069 #. type: Content of: <book><chapter><sect1><sect2><title> 6071 #. type: Content of: <book><chapter><sect1><sect2><title>
6070 #: ../en/ch05-collab.xml:178 6072 #: ../en/ch05-collab.xml:177
6071 msgid "Working with multiple branches" 6073 msgid "Working with multiple branches"
6072 msgstr "使用多个分支工作" 6074 msgstr "使用多个分支工作"
6073 6075
6074 #. type: Content of: <book><chapter><sect1><sect2><para> 6076 #. type: Content of: <book><chapter><sect1><sect2><para>
6075 #: ../en/ch05-collab.xml:180 6077 #: ../en/ch05-collab.xml:179
6076 msgid "" 6078 msgid ""
6077 "Projects of any significant size naturally tend to make progress on several " 6079 "Projects of any significant size naturally tend to make progress on several "
6078 "fronts simultaneously. In the case of software, it's common for a project to " 6080 "fronts simultaneously. In the case of software, it's common for a project to "
6079 "go through periodic official releases. A release might then go into " 6081 "go through periodic official releases. A release might then go into "
6080 "<quote>maintenance mode</quote> for a while after its first publication; " 6082 "<quote>maintenance mode</quote> for a while after its first publication; "
6084 "refer to one of these many slightly different directions in which development " 6086 "refer to one of these many slightly different directions in which development "
6085 "is proceeding." 6087 "is proceeding."
6086 msgstr "" 6088 msgstr ""
6087 6089
6088 #. type: Content of: <book><chapter><sect1><sect2><para> 6090 #. type: Content of: <book><chapter><sect1><sect2><para>
6089 #: ../en/ch05-collab.xml:193 6091 #: ../en/ch05-collab.xml:192
6090 msgid "" 6092 msgid ""
6091 "Mercurial is particularly well suited to managing a number of simultaneous, " 6093 "Mercurial is particularly well suited to managing a number of simultaneous, "
6092 "but not identical, branches. Each <quote>development direction</quote> can " 6094 "but not identical, branches. Each <quote>development direction</quote> can "
6093 "live in its own central repository, and you can merge changes from one to " 6095 "live in its own central repository, and you can merge changes from one to "
6094 "another as the need arises. Because repositories are independent of each " 6096 "another as the need arises. Because repositories are independent of each "
6095 "other, unstable changes in a development branch will never affect a stable " 6097 "other, unstable changes in a development branch will never affect a stable "
6096 "branch unless someone explicitly merges those changes in." 6098 "branch unless someone explicitly merges those changes in."
6097 msgstr "" 6099 msgstr ""
6098 6100
6099 #. type: Content of: <book><chapter><sect1><sect2><para> 6101 #. type: Content of: <book><chapter><sect1><sect2><para>
6100 #: ../en/ch05-collab.xml:202 6102 #: ../en/ch05-collab.xml:201
6101 msgid "" 6103 msgid ""
6102 "Here's an example of how this can work in practice. Let's say you have one " 6104 "Here's an example of how this can work in practice. Let's say you have one "
6103 "<quote>main branch</quote> on a central server." 6105 "<quote>main branch</quote> on a central server."
6104 msgstr "" 6106 msgstr ""
6105 6107
6106 #. type: Content of: <book><chapter><sect1><sect2><para> 6108 #. type: Content of: <book><chapter><sect1><sect2><para>
6107 #: ../en/ch05-collab.xml:208 6109 #: ../en/ch05-collab.xml:207
6108 msgid "People clone it, make changes locally, test them, and push them back." 6110 msgid "People clone it, make changes locally, test them, and push them back."
6109 msgstr "" 6111 msgstr ""
6110 6112
6111 #. type: Content of: <book><chapter><sect1><sect2><para> 6113 #. type: Content of: <book><chapter><sect1><sect2><para>
6112 #: ../en/ch05-collab.xml:211 6114 #: ../en/ch05-collab.xml:210
6113 msgid "" 6115 msgid ""
6114 "Once the main branch reaches a release milestone, you can use the <command " 6116 "Once the main branch reaches a release milestone, you can use the <command "
6115 "role=\"hg-cmd\">hg tag</command> command to give a permanent name to the " 6117 "role=\"hg-cmd\">hg tag</command> command to give a permanent name to the "
6116 "milestone revision." 6118 "milestone revision."
6117 msgstr "" 6119 msgstr ""
6118 6120
6119 #. type: Content of: <book><chapter><sect1><sect2><para> 6121 #. type: Content of: <book><chapter><sect1><sect2><para>
6120 #: ../en/ch05-collab.xml:217 6122 #: ../en/ch05-collab.xml:216
6121 msgid "Let's say some ongoing development occurs on the main branch." 6123 msgid "Let's say some ongoing development occurs on the main branch."
6122 msgstr "" 6124 msgstr ""
6123 6125
6124 #. type: Content of: <book><chapter><sect1><sect2><para> 6126 #. type: Content of: <book><chapter><sect1><sect2><para>
6125 #: ../en/ch05-collab.xml:222 6127 #: ../en/ch05-collab.xml:221
6126 msgid "" 6128 msgid ""
6127 "Using the tag that was recorded at the milestone, people who clone that " 6129 "Using the tag that was recorded at the milestone, people who clone that "
6128 "repository at any time in the future can use <command role=\"hg-cmd\">hg " 6130 "repository at any time in the future can use <command role=\"hg-cmd\">hg "
6129 "update</command> to get a copy of the working directory exactly as it was " 6131 "update</command> to get a copy of the working directory exactly as it was "
6130 "when that tagged revision was committed." 6132 "when that tagged revision was committed."
6131 msgstr "" 6133 msgstr ""
6132 6134
6133 # 6135 #
6134 #. type: Content of: <book><chapter><sect1><sect2><para> 6136 #. type: Content of: <book><chapter><sect1><sect2><para>
6135 #: ../en/ch05-collab.xml:230 6137 #: ../en/ch05-collab.xml:229
6136 msgid "" 6138 msgid ""
6137 "In addition, immediately after the main branch is tagged, someone can then " 6139 "In addition, immediately after the main branch is tagged, someone can then "
6138 "clone the main branch on the server to a new <quote>stable</quote> branch, " 6140 "clone the main branch on the server to a new <quote>stable</quote> branch, "
6139 "also on the server." 6141 "also on the server."
6140 msgstr "" 6142 msgstr ""
6141 6143
6142 #. type: Content of: <book><chapter><sect1><sect2><para> 6144 #. type: Content of: <book><chapter><sect1><sect2><para>
6143 #: ../en/ch05-collab.xml:236 6145 #: ../en/ch05-collab.xml:235
6144 msgid "" 6146 msgid ""
6145 "Someone who needs to make a change to the stable branch can then clone " 6147 "Someone who needs to make a change to the stable branch can then clone "
6146 "<emphasis>that</emphasis> repository, make their changes, commit, and push " 6148 "<emphasis>that</emphasis> repository, make their changes, commit, and push "
6147 "their changes back there." 6149 "their changes back there."
6148 msgstr "" 6150 msgstr ""
6149 6151
6150 #. type: Content of: <book><chapter><sect1><sect2><para> 6152 #. type: Content of: <book><chapter><sect1><sect2><para>
6151 #: ../en/ch05-collab.xml:242 6153 #: ../en/ch05-collab.xml:241
6152 msgid "" 6154 msgid ""
6153 "Because Mercurial repositories are independent, and Mercurial doesn't move " 6155 "Because Mercurial repositories are independent, and Mercurial doesn't move "
6154 "changes around automatically, the stable and main branches are " 6156 "changes around automatically, the stable and main branches are "
6155 "<emphasis>isolated</emphasis> from each other. The changes that you made on " 6157 "<emphasis>isolated</emphasis> from each other. The changes that you made on "
6156 "the main branch don't <quote>leak</quote> to the stable branch, and vice " 6158 "the main branch don't <quote>leak</quote> to the stable branch, and vice "
6157 "versa." 6159 "versa."
6158 msgstr "" 6160 msgstr ""
6159 6161
6160 #. type: Content of: <book><chapter><sect1><sect2><para> 6162 #. type: Content of: <book><chapter><sect1><sect2><para>
6161 #: ../en/ch05-collab.xml:249 6163 #: ../en/ch05-collab.xml:248
6162 msgid "" 6164 msgid ""
6163 "You'll often want all of your bugfixes on the stable branch to show up on the " 6165 "You'll often want all of your bugfixes on the stable branch to show up on the "
6164 "main branch, too. Rather than rewrite a bugfix on the main branch, you can " 6166 "main branch, too. Rather than rewrite a bugfix on the main branch, you can "
6165 "simply pull and merge changes from the stable to the main branch, and " 6167 "simply pull and merge changes from the stable to the main branch, and "
6166 "Mercurial will bring those bugfixes in for you." 6168 "Mercurial will bring those bugfixes in for you."
6167 msgstr "" 6169 msgstr ""
6168 6170
6169 #. type: Content of: <book><chapter><sect1><sect2><para> 6171 #. type: Content of: <book><chapter><sect1><sect2><para>
6170 #: ../en/ch05-collab.xml:257 6172 #: ../en/ch05-collab.xml:256
6171 msgid "" 6173 msgid ""
6172 "The main branch will still contain changes that are not on the stable branch, " 6174 "The main branch will still contain changes that are not on the stable branch, "
6173 "but it will also contain all of the bugfixes from the stable branch. The " 6175 "but it will also contain all of the bugfixes from the stable branch. The "
6174 "stable branch remains unaffected by these changes." 6176 "stable branch remains unaffected by these changes."
6175 msgstr "" 6177 msgstr ""
6176 6178
6177 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 6179 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
6178 #: ../en/ch05-collab.xml:264 ../en/ch05-collab.xml:278 6180 #: ../en/ch05-collab.xml:263 ../en/ch05-collab.xml:273
6179 msgid "Feature branches" 6181 msgid "Feature branches"
6180 msgstr "特性分支" 6182 msgstr "特性分支"
6181 6183
6182 #. type: Content of: <book><chapter><sect1><sect2><para> 6184 #. type: Content of: <book><chapter><sect1><sect2><para>
6183 #: ../en/ch05-collab.xml:266 6185 #: ../en/ch05-collab.xml:265
6184 msgid "" 6186 msgid ""
6185 "For larger projects, an effective way to manage change is to break up a team " 6187 "For larger projects, an effective way to manage change is to break up a team "
6186 "into smaller groups. Each group has a shared branch of its own, cloned from " 6188 "into smaller groups. Each group has a shared branch of its own, cloned from "
6187 "a single <quote>master</quote> branch used by the entire project. People " 6189 "a single <quote>master</quote> branch used by the entire project. People "
6188 "working on an individual branch are typically quite isolated from " 6190 "working on an individual branch are typically quite isolated from "
6189 "developments on other branches." 6191 "developments on other branches."
6190 msgstr "" 6192 msgstr ""
6191 6193
6192 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 6194 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
6193 #: ../en/ch05-collab.xml:275 6195 #: ../en/ch05-collab.xml:275
6194 msgid "" 6196 msgid ""
6195 "<imageobject><imagedata fileref=\"images/feature-branches.png\"/> </" 6197 "<imageobject><imagedata width=\"100%\" fileref=\"figs/feature-branches.png\"/"
6196 "imageobject>" 6198 "></imageobject>"
6197 msgstr "" 6199 msgstr ""
6198 6200
6199 #. type: Content of: <book><chapter><sect1><sect2><para> 6201 #. type: Content of: <book><chapter><sect1><sect2><para>
6200 #: ../en/ch05-collab.xml:283 6202 #: ../en/ch05-collab.xml:280
6201 msgid "" 6203 msgid ""
6202 "When a particular feature is deemed to be in suitable shape, someone on that " 6204 "When a particular feature is deemed to be in suitable shape, someone on that "
6203 "feature team pulls and merges from the master branch into the feature branch, " 6205 "feature team pulls and merges from the master branch into the feature branch, "
6204 "then pushes back up to the master branch." 6206 "then pushes back up to the master branch."
6205 msgstr "" 6207 msgstr ""
6206 6208
6207 #. type: Content of: <book><chapter><sect1><sect2><title> 6209 #. type: Content of: <book><chapter><sect1><sect2><title>
6208 #: ../en/ch05-collab.xml:290 6210 #: ../en/ch05-collab.xml:287
6209 msgid "The release train" 6211 msgid "The release train"
6210 msgstr "发布列车" 6212 msgstr "发布列车"
6211 6213
6212 #. type: Content of: <book><chapter><sect1><sect2><para> 6214 #. type: Content of: <book><chapter><sect1><sect2><para>
6213 #: ../en/ch05-collab.xml:292 6215 #: ../en/ch05-collab.xml:289
6214 msgid "" 6216 msgid ""
6215 "Some projects are organised on a <quote>train</quote> basis: a release is " 6217 "Some projects are organised on a <quote>train</quote> basis: a release is "
6216 "scheduled to happen every few months, and whatever features are ready when " 6218 "scheduled to happen every few months, and whatever features are ready when "
6217 "the <quote>train</quote> is ready to leave are allowed in." 6219 "the <quote>train</quote> is ready to leave are allowed in."
6218 msgstr "" 6220 msgstr ""
6219 6221
6220 #. type: Content of: <book><chapter><sect1><sect2><para> 6222 #. type: Content of: <book><chapter><sect1><sect2><para>
6221 #: ../en/ch05-collab.xml:297 6223 #: ../en/ch05-collab.xml:294
6222 msgid "" 6224 msgid ""
6223 "This model resembles working with feature branches. The difference is that " 6225 "This model resembles working with feature branches. The difference is that "
6224 "when a feature branch misses a train, someone on the feature team pulls and " 6226 "when a feature branch misses a train, someone on the feature team pulls and "
6225 "merges the changes that went out on that train release into the feature " 6227 "merges the changes that went out on that train release into the feature "
6226 "branch, and the team continues its work on top of that release so that their " 6228 "branch, and the team continues its work on top of that release so that their "
6227 "feature can make the next release." 6229 "feature can make the next release."
6228 msgstr "" 6230 msgstr ""
6229 6231
6230 #. type: Content of: <book><chapter><sect1><sect2><title> 6232 #. type: Content of: <book><chapter><sect1><sect2><title>
6231 #: ../en/ch05-collab.xml:306 6233 #: ../en/ch05-collab.xml:303
6232 msgid "The Linux kernel model" 6234 msgid "The Linux kernel model"
6233 msgstr "Linux 内核模型" 6235 msgstr "Linux 内核模型"
6234 6236
6235 #. type: Content of: <book><chapter><sect1><sect2><para> 6237 #. type: Content of: <book><chapter><sect1><sect2><para>
6236 #: ../en/ch05-collab.xml:308 6238 #: ../en/ch05-collab.xml:305
6237 msgid "" 6239 msgid ""
6238 "The development of the Linux kernel has a shallow hierarchical structure, " 6240 "The development of the Linux kernel has a shallow hierarchical structure, "
6239 "surrounded by a cloud of apparent chaos. Because most Linux developers use " 6241 "surrounded by a cloud of apparent chaos. Because most Linux developers use "
6240 "<command>git</command>, a distributed revision control tool with capabilities " 6242 "<command>git</command>, a distributed revision control tool with capabilities "
6241 "similar to Mercurial, it's useful to describe the way work flows in that " 6243 "similar to Mercurial, it's useful to describe the way work flows in that "
6242 "environment; if you like the ideas, the approach translates well across tools." 6244 "environment; if you like the ideas, the approach translates well across tools."
6243 msgstr "" 6245 msgstr ""
6244 6246
6245 #. type: Content of: <book><chapter><sect1><sect2><para> 6247 #. type: Content of: <book><chapter><sect1><sect2><para>
6246 #: ../en/ch05-collab.xml:316 6248 #: ../en/ch05-collab.xml:313
6247 msgid "" 6249 msgid ""
6248 "At the center of the community sits Linus Torvalds, the creator of Linux. He " 6250 "At the center of the community sits Linus Torvalds, the creator of Linux. He "
6249 "publishes a single source repository that is considered the " 6251 "publishes a single source repository that is considered the "
6250 "<quote>authoritative</quote> current tree by the entire developer community. " 6252 "<quote>authoritative</quote> current tree by the entire developer community. "
6251 "Anyone can clone Linus's tree, but he is very choosy about whose trees he " 6253 "Anyone can clone Linus's tree, but he is very choosy about whose trees he "
6252 "pulls from." 6254 "pulls from."
6253 msgstr "" 6255 msgstr ""
6254 6256
6255 #. type: Content of: <book><chapter><sect1><sect2><para> 6257 #. type: Content of: <book><chapter><sect1><sect2><para>
6256 #: ../en/ch05-collab.xml:323 6258 #: ../en/ch05-collab.xml:320
6257 msgid "" 6259 msgid ""
6258 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, " 6260 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, "
6259 "he pulls whatever changes they publish, in most cases without even reviewing " 6261 "he pulls whatever changes they publish, in most cases without even reviewing "
6260 "those changes. Some of those lieutenants are generally agreed to be " 6262 "those changes. Some of those lieutenants are generally agreed to be "
6261 "<quote>maintainers</quote>, responsible for specific subsystems within the " 6263 "<quote>maintainers</quote>, responsible for specific subsystems within the "
6265 "maintainer reviews their changes and agrees to take them, they'll pass them " 6267 "maintainer reviews their changes and agrees to take them, they'll pass them "
6266 "along to Linus in due course." 6268 "along to Linus in due course."
6267 msgstr "" 6269 msgstr ""
6268 6270
6269 #. type: Content of: <book><chapter><sect1><sect2><para> 6271 #. type: Content of: <book><chapter><sect1><sect2><para>
6270 #: ../en/ch05-collab.xml:335 6272 #: ../en/ch05-collab.xml:332
6271 msgid "" 6273 msgid ""
6272 "Individual lieutenants have their own approaches to reviewing, accepting, and " 6274 "Individual lieutenants have their own approaches to reviewing, accepting, and "
6273 "publishing changes; and for deciding when to feed them to Linus. In " 6275 "publishing changes; and for deciding when to feed them to Linus. In "
6274 "addition, there are several well known branches that people use for different " 6276 "addition, there are several well known branches that people use for different "
6275 "purposes. For example, a few people maintain <quote>stable</quote> " 6277 "purposes. For example, a few people maintain <quote>stable</quote> "
6278 "experimental changes; one for changes that they are about to feed upstream; " 6280 "experimental changes; one for changes that they are about to feed upstream; "
6279 "and so on. Others just publish a single tree." 6281 "and so on. Others just publish a single tree."
6280 msgstr "" 6282 msgstr ""
6281 6283
6282 #. type: Content of: <book><chapter><sect1><sect2><para> 6284 #. type: Content of: <book><chapter><sect1><sect2><para>
6283 #: ../en/ch05-collab.xml:346 6285 #: ../en/ch05-collab.xml:343
6284 msgid "" 6286 msgid ""
6285 "This model has two notable features. The first is that it's <quote>pull " 6287 "This model has two notable features. The first is that it's <quote>pull "
6286 "only</quote>. You have to ask, convince, or beg another developer to take a " 6288 "only</quote>. You have to ask, convince, or beg another developer to take a "
6287 "change from you, because there are almost no trees to which more than one " 6289 "change from you, because there are almost no trees to which more than one "
6288 "person can push, and there's no way to push changes into a tree that someone " 6290 "person can push, and there's no way to push changes into a tree that someone "
6289 "else controls." 6291 "else controls."
6290 msgstr "" 6292 msgstr ""
6291 6293
6292 #. type: Content of: <book><chapter><sect1><sect2><para> 6294 #. type: Content of: <book><chapter><sect1><sect2><para>
6293 #: ../en/ch05-collab.xml:353 6295 #: ../en/ch05-collab.xml:350
6294 msgid "" 6296 msgid ""
6295 "The second is that it's based on reputation and acclaim. If you're an " 6297 "The second is that it's based on reputation and acclaim. If you're an "
6296 "unknown, Linus will probably ignore changes from you without even " 6298 "unknown, Linus will probably ignore changes from you without even "
6297 "responding. But a subsystem maintainer will probably review them, and will " 6299 "responding. But a subsystem maintainer will probably review them, and will "
6298 "likely take them if they pass their criteria for suitability. The more " 6300 "likely take them if they pass their criteria for suitability. The more "
6302 "accepted, people with similar interests may pull your changes regularly to " 6304 "accepted, people with similar interests may pull your changes regularly to "
6303 "keep up with your work." 6305 "keep up with your work."
6304 msgstr "" 6306 msgstr ""
6305 6307
6306 #. type: Content of: <book><chapter><sect1><sect2><para> 6308 #. type: Content of: <book><chapter><sect1><sect2><para>
6307 #: ../en/ch05-collab.xml:364 6309 #: ../en/ch05-collab.xml:361
6308 msgid "" 6310 msgid ""
6309 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" 6311 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</"
6310 "quote> boundaries. If you're a respected but specialised storage hacker, and " 6312 "quote> boundaries. If you're a respected but specialised storage hacker, and "
6311 "you try to fix a networking bug, that change will receive a level of scrutiny " 6313 "you try to fix a networking bug, that change will receive a level of scrutiny "
6312 "from a network maintainer comparable to a change from a complete stranger." 6314 "from a network maintainer comparable to a change from a complete stranger."
6313 msgstr "" 6315 msgstr ""
6314 6316
6315 #. type: Content of: <book><chapter><sect1><sect2><para> 6317 #. type: Content of: <book><chapter><sect1><sect2><para>
6316 #: ../en/ch05-collab.xml:371 6318 #: ../en/ch05-collab.xml:368
6317 msgid "" 6319 msgid ""
6318 "To people who come from more orderly project backgrounds, the comparatively " 6320 "To people who come from more orderly project backgrounds, the comparatively "
6319 "chaotic Linux kernel development process often seems completely insane. It's " 6321 "chaotic Linux kernel development process often seems completely insane. It's "
6320 "subject to the whims of individuals; people make sweeping changes whenever " 6322 "subject to the whims of individuals; people make sweeping changes whenever "
6321 "they deem it appropriate; and the pace of development is astounding. And yet " 6323 "they deem it appropriate; and the pace of development is astounding. And yet "
6322 "Linux is a highly successful, well-regarded piece of software." 6324 "Linux is a highly successful, well-regarded piece of software."
6323 msgstr "" 6325 msgstr ""
6324 6326
6325 #. type: Content of: <book><chapter><sect1><sect2><title> 6327 #. type: Content of: <book><chapter><sect1><sect2><title>
6326 #: ../en/ch05-collab.xml:381 6328 #: ../en/ch05-collab.xml:378
6327 msgid "Pull-only versus shared-push collaboration" 6329 msgid "Pull-only versus shared-push collaboration"
6328 msgstr "只读与共享写协作" 6330 msgstr "只读与共享写协作"
6329 6331
6330 #. type: Content of: <book><chapter><sect1><sect2><para> 6332 #. type: Content of: <book><chapter><sect1><sect2><para>
6331 #: ../en/ch05-collab.xml:383 6333 #: ../en/ch05-collab.xml:380
6332 msgid "" 6334 msgid ""
6333 "A perpetual source of heat in the open source community is whether a " 6335 "A perpetual source of heat in the open source community is whether a "
6334 "development model in which people only ever pull changes from others is " 6336 "development model in which people only ever pull changes from others is "
6335 "<quote>better than</quote> one in which multiple people can push changes to a " 6337 "<quote>better than</quote> one in which multiple people can push changes to a "
6336 "shared repository." 6338 "shared repository."
6337 msgstr "" 6339 msgstr ""
6338 6340
6339 #. type: Content of: <book><chapter><sect1><sect2><para> 6341 #. type: Content of: <book><chapter><sect1><sect2><para>
6340 #: ../en/ch05-collab.xml:389 6342 #: ../en/ch05-collab.xml:386
6341 msgid "" 6343 msgid ""
6342 "Typically, the backers of the shared-push model use tools that actively " 6344 "Typically, the backers of the shared-push model use tools that actively "
6343 "enforce this approach. If you're using a centralised revision control tool " 6345 "enforce this approach. If you're using a centralised revision control tool "
6344 "such as Subversion, there's no way to make a choice over which model you'll " 6346 "such as Subversion, there's no way to make a choice over which model you'll "
6345 "use: the tool gives you shared-push, and if you want to do anything else, " 6347 "use: the tool gives you shared-push, and if you want to do anything else, "
6346 "you'll have to roll your own approach on top (such as applying a patch by " 6348 "you'll have to roll your own approach on top (such as applying a patch by "
6347 "hand)." 6349 "hand)."
6348 msgstr "" 6350 msgstr ""
6349 6351
6350 #. type: Content of: <book><chapter><sect1><sect2><para> 6352 #. type: Content of: <book><chapter><sect1><sect2><para>
6351 #: ../en/ch05-collab.xml:397 6353 #: ../en/ch05-collab.xml:394
6352 msgid "" 6354 msgid ""
6353 "A good distributed revision control tool, such as Mercurial, will support " 6355 "A good distributed revision control tool, such as Mercurial, will support "
6354 "both models. You and your collaborators can then structure how you work " 6356 "both models. You and your collaborators can then structure how you work "
6355 "together based on your own needs and preferences, not on what contortions " 6357 "together based on your own needs and preferences, not on what contortions "
6356 "your tools force you into." 6358 "your tools force you into."
6357 msgstr "" 6359 msgstr ""
6358 6360
6359 #. type: Content of: <book><chapter><sect1><sect2><title> 6361 #. type: Content of: <book><chapter><sect1><sect2><title>
6360 #: ../en/ch05-collab.xml:405 6362 #: ../en/ch05-collab.xml:402
6361 msgid "Where collaboration meets branch management" 6363 msgid "Where collaboration meets branch management"
6362 msgstr "协作与分支管理" 6364 msgstr "协作与分支管理"
6363 6365
6364 #. type: Content of: <book><chapter><sect1><sect2><para> 6366 #. type: Content of: <book><chapter><sect1><sect2><para>
6365 #: ../en/ch05-collab.xml:407 6367 #: ../en/ch05-collab.xml:404
6366 msgid "" 6368 msgid ""
6367 "Once you and your team set up some shared repositories and start propagating " 6369 "Once you and your team set up some shared repositories and start propagating "
6368 "changes back and forth between local and shared repos, you begin to face a " 6370 "changes back and forth between local and shared repos, you begin to face a "
6369 "related, but slightly different challenge: that of managing the multiple " 6371 "related, but slightly different challenge: that of managing the multiple "
6370 "directions in which your team may be moving at once. Even though this " 6372 "directions in which your team may be moving at once. Even though this "
6371 "subject is intimately related to how your team collaborates, it's dense " 6373 "subject is intimately related to how your team collaborates, it's dense "
6372 "enough to merit treatment of its own, in chapter <xref linkend=\"chap.branch" 6374 "enough to merit treatment of its own, in <xref linkend=\"chap:branch\"/>."
6373 "\"/>."
6374 msgstr "" 6375 msgstr ""
6375 6376
6376 #. type: Content of: <book><chapter><sect1><title> 6377 #. type: Content of: <book><chapter><sect1><title>
6377 #: ../en/ch05-collab.xml:419 6378 #: ../en/ch05-collab.xml:416
6378 msgid "The technical side of sharing" 6379 msgid "The technical side of sharing"
6379 msgstr "共享的技术因素" 6380 msgstr "共享的技术因素"
6380 6381
6381 #. type: Content of: <book><chapter><sect1><para> 6382 #. type: Content of: <book><chapter><sect1><para>
6382 #: ../en/ch05-collab.xml:421 6383 #: ../en/ch05-collab.xml:418
6383 msgid "" 6384 msgid ""
6384 "The remainder of this chapter is devoted to the question of serving data to " 6385 "The remainder of this chapter is devoted to the question of serving data to "
6385 "your collaborators." 6386 "your collaborators."
6386 msgstr "" 6387 msgstr ""
6387 6388
6388 #. type: Content of: <book><chapter><sect1><title> 6389 #. type: Content of: <book><chapter><sect1><title>
6389 #: ../en/ch05-collab.xml:426 6390 #: ../en/ch05-collab.xml:423
6390 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>" 6391 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>"
6391 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享" 6392 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享"
6392 6393
6393 #. type: Content of: <book><chapter><sect1><para> 6394 #. type: Content of: <book><chapter><sect1><para>
6394 #: ../en/ch05-collab.xml:429 6395 #: ../en/ch05-collab.xml:426
6395 msgid "" 6396 msgid ""
6396 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " 6397 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is "
6397 "wonderfully suited to small, tight-knit, and fast-paced group environments. " 6398 "wonderfully suited to small, tight-knit, and fast-paced group environments. "
6398 "It also provides a great way to get a feel for using Mercurial commands over " 6399 "It also provides a great way to get a feel for using Mercurial commands over "
6399 "a network." 6400 "a network."
6400 msgstr "" 6401 msgstr ""
6401 6402
6402 #. type: Content of: <book><chapter><sect1><para> 6403 #. type: Content of: <book><chapter><sect1><para>
6403 #: ../en/ch05-collab.xml:434 6404 #: ../en/ch05-collab.xml:431
6404 msgid "" 6405 msgid ""
6405 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in " 6406 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in "
6406 "under a second it will bring up a specialised HTTP server; this will accept " 6407 "under a second it will bring up a specialised HTTP server; this will accept "
6407 "connections from any client, and serve up data for that repository until you " 6408 "connections from any client, and serve up data for that repository until you "
6408 "terminate it. Anyone who knows the URL of the server you just started, and " 6409 "terminate it. Anyone who knows the URL of the server you just started, and "
6411 "cmd\">hg serve</command> instance running on a laptop is likely to look " 6412 "cmd\">hg serve</command> instance running on a laptop is likely to look "
6412 "something like <literal>http://my-laptop.local:8000/</literal>." 6413 "something like <literal>http://my-laptop.local:8000/</literal>."
6413 msgstr "" 6414 msgstr ""
6414 6415
6415 #. type: Content of: <book><chapter><sect1><para> 6416 #. type: Content of: <book><chapter><sect1><para>
6416 #: ../en/ch05-collab.xml:445 6417 #: ../en/ch05-collab.xml:442
6417 msgid "" 6418 msgid ""
6418 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</" 6419 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</"
6419 "emphasis> a general-purpose web server. It can do only two things:" 6420 "emphasis> a general-purpose web server. It can do only two things:"
6420 msgstr "" 6421 msgstr ""
6421 6422
6422 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 6423 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
6423 #: ../en/ch05-collab.xml:449 6424 #: ../en/ch05-collab.xml:446
6424 msgid "" 6425 msgid ""
6425 "Allow people to browse the history of the repository it's serving, from their " 6426 "Allow people to browse the history of the repository it's serving, from their "
6426 "normal web browsers." 6427 "normal web browsers."
6427 msgstr "" 6428 msgstr ""
6428 6429
6429 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 6430 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
6430 #: ../en/ch05-collab.xml:453 6431 #: ../en/ch05-collab.xml:450
6431 msgid "" 6432 msgid ""
6432 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd" 6433 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd"
6433 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes " 6434 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes "
6434 "from that repository." 6435 "from that repository."
6435 msgstr "" 6436 msgstr ""
6436 6437
6437 #. type: Content of: <book><chapter><sect1><para> 6438 #. type: Content of: <book><chapter><sect1><para>
6438 #: ../en/ch05-collab.xml:458 6439 #: ../en/ch05-collab.xml:455
6439 msgid "" 6440 msgid ""
6440 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote " 6441 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote "
6441 "users to <emphasis>modify</emphasis> your repository. It's intended for read-" 6442 "users to <emphasis>modify</emphasis> your repository. It's intended for read-"
6442 "only use." 6443 "only use."
6443 msgstr "" 6444 msgstr ""
6444 6445
6445 #. type: Content of: <book><chapter><sect1><para> 6446 #. type: Content of: <book><chapter><sect1><para>
6446 #: ../en/ch05-collab.xml:462 6447 #: ../en/ch05-collab.xml:459
6447 msgid "" 6448 msgid ""
6448 "If you're getting started with Mercurial, there's nothing to prevent you from " 6449 "If you're getting started with Mercurial, there's nothing to prevent you from "
6449 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on " 6450 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on "
6450 "your own computer, then use commands like <command role=\"hg-cmd\">hg clone</" 6451 "your own computer, then use commands like <command role=\"hg-cmd\">hg clone</"
6451 "command>, <command role=\"hg-cmd\">hg incoming</command>, and so on to talk " 6452 "command>, <command role=\"hg-cmd\">hg incoming</command>, and so on to talk "
6452 "to that server as if the repository was hosted remotely. This can help you to " 6453 "to that server as if the repository was hosted remotely. This can help you to "
6453 "quickly get acquainted with using commands on network-hosted repositories." 6454 "quickly get acquainted with using commands on network-hosted repositories."
6454 msgstr "" 6455 msgstr ""
6455 6456
6456 #. type: Content of: <book><chapter><sect1><sect2><title> 6457 #. type: Content of: <book><chapter><sect1><sect2><title>
6457 #: ../en/ch05-collab.xml:472 6458 #: ../en/ch05-collab.xml:469
6458 msgid "A few things to keep in mind" 6459 msgid "A few things to keep in mind"
6459 msgstr "要牢记的几件事" 6460 msgstr "要牢记的几件事"
6460 6461
6461 #. type: Content of: <book><chapter><sect1><sect2><para> 6462 #. type: Content of: <book><chapter><sect1><sect2><para>
6462 #: ../en/ch05-collab.xml:474 6463 #: ../en/ch05-collab.xml:471
6463 msgid "" 6464 msgid ""
6464 "Because it provides unauthenticated read access to all clients, you should " 6465 "Because it provides unauthenticated read access to all clients, you should "
6465 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where " 6466 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where "
6466 "you either don't care, or have complete control over, who can access your " 6467 "you either don't care, or have complete control over, who can access your "
6467 "network and pull data from your repository." 6468 "network and pull data from your repository."
6468 msgstr "" 6469 msgstr ""
6469 6470
6470 #. type: Content of: <book><chapter><sect1><sect2><para> 6471 #. type: Content of: <book><chapter><sect1><sect2><para>
6471 #: ../en/ch05-collab.xml:480 6472 #: ../en/ch05-collab.xml:477
6472 msgid "" 6473 msgid ""
6473 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about " 6474 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about "
6474 "any firewall software you might have installed on your system or network. It " 6475 "any firewall software you might have installed on your system or network. It "
6475 "cannot detect or control your firewall software. If other people are unable " 6476 "cannot detect or control your firewall software. If other people are unable "
6476 "to talk to a running <command role=\"hg-cmd\">hg serve</command> instance, " 6477 "to talk to a running <command role=\"hg-cmd\">hg serve</command> instance, "
6477 "the second thing you should do (<emphasis>after</emphasis> you make sure that " 6478 "the second thing you should do (<emphasis>after</emphasis> you make sure that "
6478 "they're using the correct URL) is check your firewall configuration." 6479 "they're using the correct URL) is check your firewall configuration."
6479 msgstr "" 6480 msgstr ""
6480 6481
6481 #. type: Content of: <book><chapter><sect1><sect2><para> 6482 #. type: Content of: <book><chapter><sect1><sect2><para>
6482 #: ../en/ch05-collab.xml:489 6483 #: ../en/ch05-collab.xml:486
6483 msgid "" 6484 msgid ""
6484 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming " 6485 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming "
6485 "connections on port 8000. If another process is already listening on the " 6486 "connections on port 8000. If another process is already listening on the "
6486 "port you want to use, you can specify a different port to listen on using the " 6487 "port you want to use, you can specify a different port to listen on using the "
6487 "<option role=\"hg-opt-serve\">-p</option> option." 6488 "<option role=\"hg-opt-serve\">-p</option> option."
6488 msgstr "" 6489 msgstr ""
6489 6490
6490 #. type: Content of: <book><chapter><sect1><sect2><para> 6491 #. type: Content of: <book><chapter><sect1><sect2><para>
6491 #: ../en/ch05-collab.xml:495 6492 #: ../en/ch05-collab.xml:492
6492 msgid "" 6493 msgid ""
6493 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints " 6494 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints "
6494 "no output, which can be a bit unnerving. If you'd like to confirm that it is " 6495 "no output, which can be a bit unnerving. If you'd like to confirm that it is "
6495 "indeed running correctly, and find out what URL you should send to your " 6496 "indeed running correctly, and find out what URL you should send to your "
6496 "collaborators, start it with the <option role=\"hg-opt-global\">-v</option> " 6497 "collaborators, start it with the <option role=\"hg-opt-global\">-v</option> "
6497 "option." 6498 "option."
6498 msgstr "" 6499 msgstr ""
6499 6500
6500 #. type: Content of: <book><chapter><sect1><title> 6501 #. type: Content of: <book><chapter><sect1><title>
6501 #: ../en/ch05-collab.xml:505 6502 #: ../en/ch05-collab.xml:502
6502 msgid "Using the Secure Shell (ssh) protocol" 6503 msgid "Using the Secure Shell (ssh) protocol"
6503 msgstr "使用 ssh 协议" 6504 msgstr "使用 ssh 协议"
6504 6505
6505 #. type: Content of: <book><chapter><sect1><para> 6506 #. type: Content of: <book><chapter><sect1><para>
6506 #: ../en/ch05-collab.xml:507 6507 #: ../en/ch05-collab.xml:504
6507 msgid "" 6508 msgid ""
6508 "You can pull and push changes securely over a network connection using the " 6509 "You can pull and push changes securely over a network connection using the "
6509 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " 6510 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, "
6510 "you may have to do a little bit of configuration on the client or server " 6511 "you may have to do a little bit of configuration on the client or server "
6511 "sides." 6512 "sides."
6512 msgstr "" 6513 msgstr ""
6513 6514
6514 #. type: Content of: <book><chapter><sect1><para> 6515 #. type: Content of: <book><chapter><sect1><para>
6515 #: ../en/ch05-collab.xml:512 6516 #: ../en/ch05-collab.xml:509
6516 msgid "" 6517 msgid ""
6517 "If you're not familiar with ssh, it's a network protocol that lets you " 6518 "If you're not familiar with ssh, it's a network protocol that lets you "
6518 "securely communicate with another computer. To use it with Mercurial, you'll " 6519 "securely communicate with another computer. To use it with Mercurial, you'll "
6519 "be setting up one or more user accounts on a server so that remote users can " 6520 "be setting up one or more user accounts on a server so that remote users can "
6520 "log in and execute commands." 6521 "log in and execute commands."
6521 msgstr "" 6522 msgstr ""
6522 6523
6523 #. type: Content of: <book><chapter><sect1><para> 6524 #. type: Content of: <book><chapter><sect1><para>
6524 #: ../en/ch05-collab.xml:518 6525 #: ../en/ch05-collab.xml:515
6525 msgid "" 6526 msgid ""
6526 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some " 6527 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some "
6527 "of the material that follows to be elementary in nature.)" 6528 "of the material that follows to be elementary in nature.)"
6528 msgstr "" 6529 msgstr ""
6529 6530
6530 #. type: Content of: <book><chapter><sect1><sect2><title> 6531 #. type: Content of: <book><chapter><sect1><sect2><title>
6531 #: ../en/ch05-collab.xml:523 6532 #: ../en/ch05-collab.xml:520
6532 msgid "How to read and write ssh URLs" 6533 msgid "How to read and write ssh URLs"
6533 msgstr "如何读写 ssh 路径" 6534 msgstr "如何读写 ssh 路径"
6534 6535
6535 #. type: Content of: <book><chapter><sect1><sect2><para> 6536 #. type: Content of: <book><chapter><sect1><sect2><para>
6537 #: ../en/ch05-collab.xml:522
6538 msgid "An ssh URL tends to look like this:"
6539 msgstr ""
6540
6541 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6536 #: ../en/ch05-collab.xml:525 6542 #: ../en/ch05-collab.xml:525
6537 msgid "An ssh URL tends to look like this:" 6543 msgid ""
6544 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the "
6545 "ssh protocol."
6538 msgstr "" 6546 msgstr ""
6539 6547
6540 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6548 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6541 #: ../en/ch05-collab.xml:528 6549 #: ../en/ch05-collab.xml:528
6542 msgid ""
6543 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the "
6544 "ssh protocol."
6545 msgstr ""
6546
6547 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6548 #: ../en/ch05-collab.xml:531
6549 msgid "" 6550 msgid ""
6550 "The <quote><literal>bos@</literal></quote> component indicates what username " 6551 "The <quote><literal>bos@</literal></quote> component indicates what username "
6551 "to log into the server as. You can leave this out if the remote username is " 6552 "to log into the server as. You can leave this out if the remote username is "
6552 "the same as your local username." 6553 "the same as your local username."
6553 msgstr "" 6554 msgstr ""
6554 6555
6555 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6556 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6556 #: ../en/ch05-collab.xml:536 6557 #: ../en/ch05-collab.xml:533
6557 msgid "" 6558 msgid ""
6558 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of " 6559 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of "
6559 "the server to log into." 6560 "the server to log into."
6560 msgstr "" 6561 msgstr ""
6561 6562
6562 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6563 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6563 #: ../en/ch05-collab.xml:540 6564 #: ../en/ch05-collab.xml:537
6564 msgid "" 6565 msgid ""
6565 "The <quote>:22</quote> identifies the port number to connect to the server " 6566 "The <quote>:22</quote> identifies the port number to connect to the server "
6566 "on. The default port is 22, so you only need to specify a colon and port " 6567 "on. The default port is 22, so you only need to specify a colon and port "
6567 "number if you're <emphasis>not</emphasis> using port 22." 6568 "number if you're <emphasis>not</emphasis> using port 22."
6568 msgstr "" 6569 msgstr ""
6569 6570
6570 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6571 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6571 #: ../en/ch05-collab.xml:545 6572 #: ../en/ch05-collab.xml:542
6572 msgid "" 6573 msgid ""
6573 "The remainder of the URL is the local path to the repository on the server." 6574 "The remainder of the URL is the local path to the repository on the server."
6574 msgstr "" 6575 msgstr ""
6575 6576
6576 #. type: Content of: <book><chapter><sect1><sect2><para> 6577 #. type: Content of: <book><chapter><sect1><sect2><para>
6577 #: ../en/ch05-collab.xml:549 6578 #: ../en/ch05-collab.xml:546
6578 msgid "" 6579 msgid ""
6579 "There's plenty of scope for confusion with the path component of ssh URLs, as " 6580 "There's plenty of scope for confusion with the path component of ssh URLs, as "
6580 "there is no standard way for tools to interpret it. Some programs behave " 6581 "there is no standard way for tools to interpret it. Some programs behave "
6581 "differently than others when dealing with these paths. This isn't an ideal " 6582 "differently than others when dealing with these paths. This isn't an ideal "
6582 "situation, but it's unlikely to change. Please read the following paragraphs " 6583 "situation, but it's unlikely to change. Please read the following paragraphs "
6583 "carefully." 6584 "carefully."
6584 msgstr "" 6585 msgstr ""
6585 6586
6586 #. type: Content of: <book><chapter><sect1><sect2><para> 6587 #. type: Content of: <book><chapter><sect1><sect2><para>
6587 #: ../en/ch05-collab.xml:556 6588 #: ../en/ch05-collab.xml:553
6588 msgid "" 6589 msgid ""
6589 "Mercurial treats the path to a repository on the server as relative to the " 6590 "Mercurial treats the path to a repository on the server as relative to the "
6590 "remote user's home directory. For example, if user <literal>foo</literal> on " 6591 "remote user's home directory. For example, if user <literal>foo</literal> on "
6591 "the server has a home directory of <filename class=\"directory\">/home/foo</" 6592 "the server has a home directory of <filename class=\"directory\">/home/foo</"
6592 "filename>, then an ssh URL that contains a path component of <filename class=" 6593 "filename>, then an ssh URL that contains a path component of <filename class="
6593 "\"directory\">bar</filename> <emphasis>really</emphasis> refers to the " 6594 "\"directory\">bar</filename> <emphasis>really</emphasis> refers to the "
6594 "directory <filename class=\"directory\">/home/foo/bar</filename>." 6595 "directory <filename class=\"directory\">/home/foo/bar</filename>."
6595 msgstr "" 6596 msgstr ""
6596 6597
6597 #. type: Content of: <book><chapter><sect1><sect2><para> 6598 #. type: Content of: <book><chapter><sect1><sect2><para>
6598 #: ../en/ch05-collab.xml:565 6599 #: ../en/ch05-collab.xml:562
6599 msgid "" 6600 msgid ""
6600 "If you want to specify a path relative to another user's home directory, you " 6601 "If you want to specify a path relative to another user's home directory, you "
6601 "can use a path that starts with a tilde character followed by the user's name " 6602 "can use a path that starts with a tilde character followed by the user's name "
6602 "(let's call them <literal>otheruser</literal>), like this." 6603 "(let's call them <literal>otheruser</literal>), like this."
6603 msgstr "" 6604 msgstr ""
6604 6605
6605 #. type: Content of: <book><chapter><sect1><sect2><para> 6606 #. type: Content of: <book><chapter><sect1><sect2><para>
6606 #: ../en/ch05-collab.xml:571 6607 #: ../en/ch05-collab.xml:568
6607 msgid "" 6608 msgid ""
6608 "And if you really want to specify an <emphasis>absolute</emphasis> path on " 6609 "And if you really want to specify an <emphasis>absolute</emphasis> path on "
6609 "the server, begin the path component with two slashes, as in this example." 6610 "the server, begin the path component with two slashes, as in this example."
6610 msgstr "" 6611 msgstr ""
6611 6612
6612 #. type: Content of: <book><chapter><sect1><sect2><title> 6613 #. type: Content of: <book><chapter><sect1><sect2><title>
6613 #: ../en/ch05-collab.xml:578 6614 #: ../en/ch05-collab.xml:575
6614 msgid "Finding an ssh client for your system" 6615 msgid "Finding an ssh client for your system"
6615 msgstr "为你的系统寻找 ssh 客户端" 6616 msgstr "为你的系统寻找 ssh 客户端"
6616 6617
6617 #. type: Content of: <book><chapter><sect1><sect2><para> 6618 #. type: Content of: <book><chapter><sect1><sect2><para>
6618 #: ../en/ch05-collab.xml:580 6619 #: ../en/ch05-collab.xml:577
6619 msgid "" 6620 msgid ""
6620 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're " 6621 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're "
6621 "using such a system, run <literal>which ssh</literal> to find out if the " 6622 "using such a system, run <literal>which ssh</literal> to find out if the "
6622 "<command>ssh</command> command is installed (it's usually in <filename class=" 6623 "<command>ssh</command> command is installed (it's usually in <filename class="
6623 "\"directory\">/usr/bin</filename>). In the unlikely event that it isn't " 6624 "\"directory\">/usr/bin</filename>). In the unlikely event that it isn't "
6624 "present, take a look at your system documentation to figure out how to " 6625 "present, take a look at your system documentation to figure out how to "
6625 "install it." 6626 "install it."
6626 msgstr "" 6627 msgstr ""
6627 6628
6628 #. type: Content of: <book><chapter><sect1><sect2><para> 6629 #. type: Content of: <book><chapter><sect1><sect2><para>
6629 #: ../en/ch05-collab.xml:588 6630 #: ../en/ch05-collab.xml:585
6630 msgid "" 6631 msgid ""
6631 "On Windows, you'll first need to download a suitable ssh client. There are " 6632 "On Windows, you'll first need to download a suitable ssh client. There are "
6632 "two alternatives." 6633 "two alternatives."
6633 msgstr "" 6634 msgstr ""
6634 6635
6635 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6636 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6636 #: ../en/ch05-collab.xml:591 6637 #: ../en/ch05-collab.xml:588
6637 msgid "" 6638 msgid ""
6638 "Simon Tatham's excellent PuTTY package <citation>web:putty</citation> " 6639 "Simon Tatham's excellent PuTTY package <citation>web:putty</citation> "
6639 "provides a complete suite of ssh client commands." 6640 "provides a complete suite of ssh client commands."
6640 msgstr "" 6641 msgstr ""
6641 6642
6642 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6643 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6644 #: ../en/ch05-collab.xml:592
6645 msgid ""
6646 "If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH."
6647 msgstr ""
6648
6649 #. type: Content of: <book><chapter><sect1><sect2><para>
6643 #: ../en/ch05-collab.xml:595 6650 #: ../en/ch05-collab.xml:595
6644 msgid ""
6645 "If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH."
6646 msgstr ""
6647
6648 #. type: Content of: <book><chapter><sect1><sect2><para>
6649 #: ../en/ch05-collab.xml:598
6650 msgid "" 6651 msgid ""
6651 "In either case, you'll need to edit your <filename role=\"special\">hg.ini</" 6652 "In either case, you'll need to edit your <filename role=\"special\">hg.ini</"
6652 "filename> file to tell Mercurial where to find the actual client command. " 6653 "filename> file to tell Mercurial where to find the actual client command. "
6653 "For example, if you're using PuTTY, you'll need to use the <command>plink</" 6654 "For example, if you're using PuTTY, you'll need to use the <command>plink</"
6654 "command> command as a command-line ssh client." 6655 "command> command as a command-line ssh client."
6655 msgstr "" 6656 msgstr ""
6656 6657
6657 #. type: Content of: <book><chapter><sect1><sect2><note><para> 6658 #. type: Content of: <book><chapter><sect1><sect2><note><para>
6658 #: ../en/ch05-collab.xml:608 6659 #: ../en/ch05-collab.xml:605
6659 msgid "" 6660 msgid ""
6660 "The path to <command>plink</command> shouldn't contain any whitespace " 6661 "The path to <command>plink</command> shouldn't contain any whitespace "
6661 "characters, or Mercurial may not be able to run it correctly (so putting it " 6662 "characters, or Mercurial may not be able to run it correctly (so putting it "
6662 "in <filename class=\"directory\">C:\\Program Files</filename> is probably not " 6663 "in <filename class=\"directory\">C:\\Program Files</filename> is probably not "
6663 "a good idea)." 6664 "a good idea)."
6664 msgstr "" 6665 msgstr ""
6665 6666
6666 #. type: Content of: <book><chapter><sect1><sect2><title> 6667 #. type: Content of: <book><chapter><sect1><sect2><title>
6667 #: ../en/ch05-collab.xml:617 6668 #: ../en/ch05-collab.xml:614
6668 msgid "Generating a key pair" 6669 msgid "Generating a key pair"
6669 msgstr "产生密钥对" 6670 msgstr "产生密钥对"
6670 6671
6671 #. type: Content of: <book><chapter><sect1><sect2><para> 6672 #. type: Content of: <book><chapter><sect1><sect2><para>
6672 #: ../en/ch05-collab.xml:619 6673 #: ../en/ch05-collab.xml:616
6673 msgid "" 6674 msgid ""
6674 "To avoid the need to repetitively type a password every time you need to use " 6675 "To avoid the need to repetitively type a password every time you need to use "
6675 "your ssh client, I recommend generating a key pair. On a Unix-like system, " 6676 "your ssh client, I recommend generating a key pair. On a Unix-like system, "
6676 "the <command>ssh-keygen</command> command will do the trick. On Windows, if " 6677 "the <command>ssh-keygen</command> command will do the trick. On Windows, if "
6677 "you're using PuTTY, the <command>puttygen</command> command is what you'll " 6678 "you're using PuTTY, the <command>puttygen</command> command is what you'll "
6678 "need." 6679 "need."
6679 msgstr "" 6680 msgstr ""
6680 6681
6681 #. type: Content of: <book><chapter><sect1><sect2><para> 6682 #. type: Content of: <book><chapter><sect1><sect2><para>
6682 #: ../en/ch05-collab.xml:627 6683 #: ../en/ch05-collab.xml:624
6683 msgid "" 6684 msgid ""
6684 "When you generate a key pair, it's usually <emphasis>highly</emphasis> " 6685 "When you generate a key pair, it's usually <emphasis>highly</emphasis> "
6685 "advisable to protect it with a passphrase. (The only time that you might not " 6686 "advisable to protect it with a passphrase. (The only time that you might not "
6686 "want to do this is when you're using the ssh protocol for automated tasks on " 6687 "want to do this is when you're using the ssh protocol for automated tasks on "
6687 "a secure network.)" 6688 "a secure network.)"
6688 msgstr "" 6689 msgstr ""
6689 6690
6690 #. type: Content of: <book><chapter><sect1><sect2><para> 6691 #. type: Content of: <book><chapter><sect1><sect2><para>
6691 #: ../en/ch05-collab.xml:633 6692 #: ../en/ch05-collab.xml:630
6692 msgid "" 6693 msgid ""
6693 "Simply generating a key pair isn't enough, however. You'll need to add the " 6694 "Simply generating a key pair isn't enough, however. You'll need to add the "
6694 "public key to the set of authorised keys for whatever user you're logging in " 6695 "public key to the set of authorised keys for whatever user you're logging in "
6695 "remotely as. For servers using OpenSSH (the vast majority), this will mean " 6696 "remotely as. For servers using OpenSSH (the vast majority), this will mean "
6696 "adding the public key to a list in a file called <filename role=\"special" 6697 "adding the public key to a list in a file called <filename role=\"special"
6697 "\">authorized_keys</filename> in their <filename role=\"special\" class=" 6698 "\">authorized_keys</filename> in their <filename role=\"special\" class="
6698 "\"directory\">.ssh</filename> directory." 6699 "\"directory\">.ssh</filename> directory."
6699 msgstr "" 6700 msgstr ""
6700 6701
6701 #. type: Content of: <book><chapter><sect1><sect2><para> 6702 #. type: Content of: <book><chapter><sect1><sect2><para>
6702 #: ../en/ch05-collab.xml:642 6703 #: ../en/ch05-collab.xml:639
6703 msgid "" 6704 msgid ""
6704 "On a Unix-like system, your public key will have a <filename>.pub</filename> " 6705 "On a Unix-like system, your public key will have a <filename>.pub</filename> "
6705 "extension. If you're using <command>puttygen</command> on Windows, you can " 6706 "extension. If you're using <command>puttygen</command> on Windows, you can "
6706 "save the public key to a file of your choosing, or paste it from the window " 6707 "save the public key to a file of your choosing, or paste it from the window "
6707 "it's displayed in straight into the <filename role=\"special" 6708 "it's displayed in straight into the <filename role=\"special"
6708 "\">authorized_keys</filename> file." 6709 "\">authorized_keys</filename> file."
6709 msgstr "" 6710 msgstr ""
6710 6711
6711 #. type: Content of: <book><chapter><sect1><sect2><title> 6712 #. type: Content of: <book><chapter><sect1><sect2><title>
6712 #: ../en/ch05-collab.xml:651 6713 #: ../en/ch05-collab.xml:648
6713 msgid "Using an authentication agent" 6714 msgid "Using an authentication agent"
6714 msgstr "使用认证代理" 6715 msgstr "使用认证代理"
6715 6716
6716 #. type: Content of: <book><chapter><sect1><sect2><para> 6717 #. type: Content of: <book><chapter><sect1><sect2><para>
6717 #: ../en/ch05-collab.xml:653 6718 #: ../en/ch05-collab.xml:650
6718 msgid "" 6719 msgid ""
6719 "An authentication agent is a daemon that stores passphrases in memory (so it " 6720 "An authentication agent is a daemon that stores passphrases in memory (so it "
6720 "will forget passphrases if you log out and log back in again). An ssh client " 6721 "will forget passphrases if you log out and log back in again). An ssh client "
6721 "will notice if it's running, and query it for a passphrase. If there's no " 6722 "will notice if it's running, and query it for a passphrase. If there's no "
6722 "authentication agent running, or the agent doesn't store the necessary " 6723 "authentication agent running, or the agent doesn't store the necessary "
6724 "communicate with a server on your behalf (e.g. whenever you pull or push " 6725 "communicate with a server on your behalf (e.g. whenever you pull or push "
6725 "changes)." 6726 "changes)."
6726 msgstr "" 6727 msgstr ""
6727 6728
6728 #. type: Content of: <book><chapter><sect1><sect2><para> 6729 #. type: Content of: <book><chapter><sect1><sect2><para>
6729 #: ../en/ch05-collab.xml:662 6730 #: ../en/ch05-collab.xml:659
6730 msgid "" 6731 msgid ""
6731 "The downside of storing passphrases in an agent is that it's possible for a " 6732 "The downside of storing passphrases in an agent is that it's possible for a "
6732 "well-prepared attacker to recover the plain text of your passphrases, in some " 6733 "well-prepared attacker to recover the plain text of your passphrases, in some "
6733 "cases even if your system has been power-cycled. You should make your own " 6734 "cases even if your system has been power-cycled. You should make your own "
6734 "judgment as to whether this is an acceptable risk. It certainly saves a lot " 6735 "judgment as to whether this is an acceptable risk. It certainly saves a lot "
6735 "of repeated typing." 6736 "of repeated typing."
6736 msgstr "" 6737 msgstr ""
6737 6738
6738 #. type: Content of: <book><chapter><sect1><sect2><para> 6739 #. type: Content of: <book><chapter><sect1><sect2><para>
6739 #: ../en/ch05-collab.xml:669 6740 #: ../en/ch05-collab.xml:666
6740 msgid "" 6741 msgid ""
6741 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and " 6742 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and "
6742 "it's often run automatically for you when you log in. You'll need to use the " 6743 "it's often run automatically for you when you log in. You'll need to use the "
6743 "<command>ssh-add</command> command to add passphrases to the agent's store. " 6744 "<command>ssh-add</command> command to add passphrases to the agent's store. "
6744 "On Windows, if you're using PuTTY, the <command>pageant</command> command " 6745 "On Windows, if you're using PuTTY, the <command>pageant</command> command "
6745 "acts as the agent. It adds an icon to your system tray that will let you " 6746 "acts as the agent. It adds an icon to your system tray that will let you "
6746 "manage stored passphrases." 6747 "manage stored passphrases."
6747 msgstr "" 6748 msgstr ""
6748 6749
6749 #. type: Content of: <book><chapter><sect1><sect2><title> 6750 #. type: Content of: <book><chapter><sect1><sect2><title>
6750 #: ../en/ch05-collab.xml:680 6751 #: ../en/ch05-collab.xml:677
6751 msgid "Configuring the server side properly" 6752 msgid "Configuring the server side properly"
6752 msgstr "正确配置服务器端" 6753 msgstr "正确配置服务器端"
6753 6754
6754 #. type: Content of: <book><chapter><sect1><sect2><para> 6755 #. type: Content of: <book><chapter><sect1><sect2><para>
6755 #: ../en/ch05-collab.xml:682 6756 #: ../en/ch05-collab.xml:679
6756 msgid "" 6757 msgid ""
6757 "Because ssh can be fiddly to set up if you're new to it, there's a variety of " 6758 "Because ssh can be fiddly to set up if you're new to it, there's a variety of "
6758 "things that can go wrong. Add Mercurial on top, and there's plenty more " 6759 "things that can go wrong. Add Mercurial on top, and there's plenty more "
6759 "scope for head-scratching. Most of these potential problems occur on the " 6760 "scope for head-scratching. Most of these potential problems occur on the "
6760 "server side, not the client side. The good news is that once you've gotten a " 6761 "server side, not the client side. The good news is that once you've gotten a "
6761 "configuration working, it will usually continue to work indefinitely." 6762 "configuration working, it will usually continue to work indefinitely."
6762 msgstr "" 6763 msgstr ""
6763 6764
6764 #. type: Content of: <book><chapter><sect1><sect2><para> 6765 #. type: Content of: <book><chapter><sect1><sect2><para>
6765 #: ../en/ch05-collab.xml:690 6766 #: ../en/ch05-collab.xml:687
6766 msgid "" 6767 msgid ""
6767 "Before you try using Mercurial to talk to an ssh server, it's best to make " 6768 "Before you try using Mercurial to talk to an ssh server, it's best to make "
6768 "sure that you can use the normal <command>ssh</command> or <command>putty</" 6769 "sure that you can use the normal <command>ssh</command> or <command>putty</"
6769 "command> command to talk to the server first. If you run into problems with " 6770 "command> command to talk to the server first. If you run into problems with "
6770 "using these commands directly, Mercurial surely won't work. Worse, it will " 6771 "using these commands directly, Mercurial surely won't work. Worse, it will "
6773 "commands work first, <emphasis>before</emphasis> you worry about whether " 6774 "commands work first, <emphasis>before</emphasis> you worry about whether "
6774 "there's a problem with Mercurial." 6775 "there's a problem with Mercurial."
6775 msgstr "" 6776 msgstr ""
6776 6777
6777 #. type: Content of: <book><chapter><sect1><sect2><para> 6778 #. type: Content of: <book><chapter><sect1><sect2><para>
6778 #: ../en/ch05-collab.xml:701 6779 #: ../en/ch05-collab.xml:698
6779 msgid "" 6780 msgid ""
6780 "The first thing to be sure of on the server side is that you can actually log " 6781 "The first thing to be sure of on the server side is that you can actually log "
6781 "in from another machine at all. If you can't use <command>ssh</command> or " 6782 "in from another machine at all. If you can't use <command>ssh</command> or "
6782 "<command>putty</command> to log in, the error message you get may give you a " 6783 "<command>putty</command> to log in, the error message you get may give you a "
6783 "few hints as to what's wrong. The most common problems are as follows." 6784 "few hints as to what's wrong. The most common problems are as follows."
6784 msgstr "" 6785 msgstr ""
6785 6786
6786 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6787 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6787 #: ../en/ch05-collab.xml:708 6788 #: ../en/ch05-collab.xml:705
6788 msgid "" 6789 msgid ""
6789 "If you get a <quote>connection refused</quote> error, either there isn't an " 6790 "If you get a <quote>connection refused</quote> error, either there isn't an "
6790 "SSH daemon running on the server at all, or it's inaccessible due to firewall " 6791 "SSH daemon running on the server at all, or it's inaccessible due to firewall "
6791 "configuration." 6792 "configuration."
6792 msgstr "" 6793 msgstr ""
6793 6794
6794 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6795 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6795 #: ../en/ch05-collab.xml:713 6796 #: ../en/ch05-collab.xml:710
6796 msgid "" 6797 msgid ""
6797 "If you get a <quote>no route to host</quote> error, you either have an " 6798 "If you get a <quote>no route to host</quote> error, you either have an "
6798 "incorrect address for the server or a seriously locked down firewall that " 6799 "incorrect address for the server or a seriously locked down firewall that "
6799 "won't admit its existence at all." 6800 "won't admit its existence at all."
6800 msgstr "" 6801 msgstr ""
6801 6802
6802 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6803 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6803 #: ../en/ch05-collab.xml:718 6804 #: ../en/ch05-collab.xml:715
6804 msgid "" 6805 msgid ""
6805 "If you get a <quote>permission denied</quote> error, you may have mistyped " 6806 "If you get a <quote>permission denied</quote> error, you may have mistyped "
6806 "the username on the server, or you could have mistyped your key's passphrase " 6807 "the username on the server, or you could have mistyped your key's passphrase "
6807 "or the remote user's password." 6808 "or the remote user's password."
6808 msgstr "" 6809 msgstr ""
6809 6810
6810 #. type: Content of: <book><chapter><sect1><sect2><para> 6811 #. type: Content of: <book><chapter><sect1><sect2><para>
6811 #: ../en/ch05-collab.xml:723 6812 #: ../en/ch05-collab.xml:720
6812 msgid "" 6813 msgid ""
6813 "In summary, if you're having trouble talking to the server's ssh daemon, " 6814 "In summary, if you're having trouble talking to the server's ssh daemon, "
6814 "first make sure that one is running at all. On many systems it will be " 6815 "first make sure that one is running at all. On many systems it will be "
6815 "installed, but disabled, by default. Once you're done with this step, you " 6816 "installed, but disabled, by default. Once you're done with this step, you "
6816 "should then check that the server's firewall is configured to allow incoming " 6817 "should then check that the server's firewall is configured to allow incoming "
6818 "worry about more exotic possibilities for misconfiguration until you've " 6819 "worry about more exotic possibilities for misconfiguration until you've "
6819 "checked these two first." 6820 "checked these two first."
6820 msgstr "" 6821 msgstr ""
6821 6822
6822 #. type: Content of: <book><chapter><sect1><sect2><para> 6823 #. type: Content of: <book><chapter><sect1><sect2><para>
6823 #: ../en/ch05-collab.xml:733 6824 #: ../en/ch05-collab.xml:730
6824 msgid "" 6825 msgid ""
6825 "If you're using an authentication agent on the client side to store " 6826 "If you're using an authentication agent on the client side to store "
6826 "passphrases for your keys, you ought to be able to log into the server " 6827 "passphrases for your keys, you ought to be able to log into the server "
6827 "without being prompted for a passphrase or a password. If you're prompted " 6828 "without being prompted for a passphrase or a password. If you're prompted "
6828 "for a passphrase, there are a few possible culprits." 6829 "for a passphrase, there are a few possible culprits."
6829 msgstr "" 6830 msgstr ""
6830 6831
6831 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6832 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6832 #: ../en/ch05-collab.xml:739 6833 #: ../en/ch05-collab.xml:736
6833 msgid "" 6834 msgid ""
6834 "You might have forgotten to use <command>ssh-add</command> or " 6835 "You might have forgotten to use <command>ssh-add</command> or "
6835 "<command>pageant</command> to store the passphrase." 6836 "<command>pageant</command> to store the passphrase."
6836 msgstr "" 6837 msgstr ""
6837 6838
6838 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6839 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6840 #: ../en/ch05-collab.xml:740
6841 msgid "You might have stored the passphrase for the wrong key."
6842 msgstr ""
6843
6844 #. type: Content of: <book><chapter><sect1><sect2><para>
6839 #: ../en/ch05-collab.xml:743 6845 #: ../en/ch05-collab.xml:743
6840 msgid "You might have stored the passphrase for the wrong key."
6841 msgstr ""
6842
6843 #. type: Content of: <book><chapter><sect1><sect2><para>
6844 #: ../en/ch05-collab.xml:746
6845 msgid "" 6846 msgid ""
6846 "If you're being prompted for the remote user's password, there are another " 6847 "If you're being prompted for the remote user's password, there are another "
6847 "few possible problems to check." 6848 "few possible problems to check."
6848 msgstr "" 6849 msgstr ""
6849 6850
6850 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6851 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6851 #: ../en/ch05-collab.xml:749 6852 #: ../en/ch05-collab.xml:746
6852 msgid "" 6853 msgid ""
6853 "Either the user's home directory or their <filename role=\"special\" class=" 6854 "Either the user's home directory or their <filename role=\"special\" class="
6854 "\"directory\">.ssh</filename> directory might have excessively liberal " 6855 "\"directory\">.ssh</filename> directory might have excessively liberal "
6855 "permissions. As a result, the ssh daemon will not trust or read their " 6856 "permissions. As a result, the ssh daemon will not trust or read their "
6856 "<filename role=\"special\">authorized_keys</filename> file. For example, a " 6857 "<filename role=\"special\">authorized_keys</filename> file. For example, a "
6857 "group-writable home or <filename role=\"special\" class=\"directory\">.ssh</" 6858 "group-writable home or <filename role=\"special\" class=\"directory\">.ssh</"
6858 "filename> directory will often cause this symptom." 6859 "filename> directory will often cause this symptom."
6859 msgstr "" 6860 msgstr ""
6860 6861
6861 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6862 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6862 #: ../en/ch05-collab.xml:758 6863 #: ../en/ch05-collab.xml:755
6863 msgid "" 6864 msgid ""
6864 "The user's <filename role=\"special\">authorized_keys</filename> file may " 6865 "The user's <filename role=\"special\">authorized_keys</filename> file may "
6865 "have a problem. If anyone other than the user owns or can write to that file, " 6866 "have a problem. If anyone other than the user owns or can write to that file, "
6866 "the ssh daemon will not trust or read it." 6867 "the ssh daemon will not trust or read it."
6867 msgstr "" 6868 msgstr ""
6868 6869
6869 #. type: Content of: <book><chapter><sect1><sect2><para> 6870 #. type: Content of: <book><chapter><sect1><sect2><para>
6870 #: ../en/ch05-collab.xml:765 6871 #: ../en/ch05-collab.xml:762
6871 msgid "" 6872 msgid ""
6872 "In the ideal world, you should be able to run the following command " 6873 "In the ideal world, you should be able to run the following command "
6873 "successfully, and it should print exactly one line of output, the current " 6874 "successfully, and it should print exactly one line of output, the current "
6874 "date and time." 6875 "date and time."
6875 msgstr "" 6876 msgstr ""
6876 6877
6877 #. type: Content of: <book><chapter><sect1><sect2><para> 6878 #. type: Content of: <book><chapter><sect1><sect2><para>
6878 #: ../en/ch05-collab.xml:770 6879 #: ../en/ch05-collab.xml:767
6879 msgid "" 6880 msgid ""
6880 "If, on your server, you have login scripts that print banners or other junk " 6881 "If, on your server, you have login scripts that print banners or other junk "
6881 "even when running non-interactive commands like this, you should fix them " 6882 "even when running non-interactive commands like this, you should fix them "
6882 "before you continue, so that they only print output if they're run " 6883 "before you continue, so that they only print output if they're run "
6883 "interactively. Otherwise these banners will at least clutter up Mercurial's " 6884 "interactively. Otherwise these banners will at least clutter up Mercurial's "
6888 "login script is running in an interactive shell is to check the return code " 6889 "login script is running in an interactive shell is to check the return code "
6889 "from the command <literal>tty -s</literal>.)" 6890 "from the command <literal>tty -s</literal>.)"
6890 msgstr "" 6891 msgstr ""
6891 6892
6892 #. type: Content of: <book><chapter><sect1><sect2><para> 6893 #. type: Content of: <book><chapter><sect1><sect2><para>
6893 #: ../en/ch05-collab.xml:784 6894 #: ../en/ch05-collab.xml:781
6894 msgid "" 6895 msgid ""
6895 "Once you've verified that plain old ssh is working with your server, the next " 6896 "Once you've verified that plain old ssh is working with your server, the next "
6896 "step is to ensure that Mercurial runs on the server. The following command " 6897 "step is to ensure that Mercurial runs on the server. The following command "
6897 "should run successfully:" 6898 "should run successfully:"
6898 msgstr "" 6899 msgstr ""
6899 6900
6900 #. type: Content of: <book><chapter><sect1><sect2><para> 6901 #. type: Content of: <book><chapter><sect1><sect2><para>
6901 #: ../en/ch05-collab.xml:791 6902 #: ../en/ch05-collab.xml:788
6902 msgid "" 6903 msgid ""
6903 "If you see an error message instead of normal <command role=\"hg-cmd\">hg " 6904 "If you see an error message instead of normal <command role=\"hg-cmd\">hg "
6904 "version</command> output, this is usually because you haven't installed " 6905 "version</command> output, this is usually because you haven't installed "
6905 "Mercurial to <filename class=\"directory\">/usr/bin</filename>. Don't worry " 6906 "Mercurial to <filename class=\"directory\">/usr/bin</filename>. Don't worry "
6906 "if this is the case; you don't need to do that. But you should check for a " 6907 "if this is the case; you don't need to do that. But you should check for a "
6907 "few possible problems." 6908 "few possible problems."
6908 msgstr "" 6909 msgstr ""
6909 6910
6910 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6911 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6911 #: ../en/ch05-collab.xml:798 6912 #: ../en/ch05-collab.xml:795
6912 msgid "" 6913 msgid ""
6913 "Is Mercurial really installed on the server at all? I know this sounds " 6914 "Is Mercurial really installed on the server at all? I know this sounds "
6914 "trivial, but it's worth checking!" 6915 "trivial, but it's worth checking!"
6915 msgstr "" 6916 msgstr ""
6916 6917
6917 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6918 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6918 #: ../en/ch05-collab.xml:802 6919 #: ../en/ch05-collab.xml:799
6919 msgid "" 6920 msgid ""
6920 "Maybe your shell's search path (usually set via the <envar>PATH</envar> " 6921 "Maybe your shell's search path (usually set via the <envar>PATH</envar> "
6921 "environment variable) is simply misconfigured." 6922 "environment variable) is simply misconfigured."
6922 msgstr "" 6923 msgstr ""
6923 6924
6924 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6925 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6925 #: ../en/ch05-collab.xml:806 6926 #: ../en/ch05-collab.xml:803
6926 msgid "" 6927 msgid ""
6927 "Perhaps your <envar>PATH</envar> environment variable is only being set to " 6928 "Perhaps your <envar>PATH</envar> environment variable is only being set to "
6928 "point to the location of the <command>hg</command> executable if the login " 6929 "point to the location of the <command>hg</command> executable if the login "
6929 "session is interactive. This can happen if you're setting the path in the " 6930 "session is interactive. This can happen if you're setting the path in the "
6930 "wrong shell login script. See your shell's documentation for details." 6931 "wrong shell login script. See your shell's documentation for details."
6931 msgstr "" 6932 msgstr ""
6932 6933
6933 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6934 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6934 #: ../en/ch05-collab.xml:813 6935 #: ../en/ch05-collab.xml:810
6935 msgid "" 6936 msgid ""
6936 "The <envar>PYTHONPATH</envar> environment variable may need to contain the " 6937 "The <envar>PYTHONPATH</envar> environment variable may need to contain the "
6937 "path to the Mercurial Python modules. It might not be set at all; it could " 6938 "path to the Mercurial Python modules. It might not be set at all; it could "
6938 "be incorrect; or it may be set only if the login is interactive." 6939 "be incorrect; or it may be set only if the login is interactive."
6939 msgstr "" 6940 msgstr ""
6940 6941
6941 #. type: Content of: <book><chapter><sect1><sect2><para> 6942 #. type: Content of: <book><chapter><sect1><sect2><para>
6942 #: ../en/ch05-collab.xml:820 6943 #: ../en/ch05-collab.xml:817
6943 msgid "" 6944 msgid ""
6944 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh " 6945 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh "
6945 "connection, well done! You've got the server and client sorted out. You " 6946 "connection, well done! You've got the server and client sorted out. You "
6946 "should now be able to use Mercurial to access repositories hosted by that " 6947 "should now be able to use Mercurial to access repositories hosted by that "
6947 "username on that server. If you run into problems with Mercurial and ssh at " 6948 "username on that server. If you run into problems with Mercurial and ssh at "
6948 "this point, try using the <option role=\"hg-opt-global\">--debug</option> " 6949 "this point, try using the <option role=\"hg-opt-global\">--debug</option> "
6949 "option to get a clearer picture of what's going on." 6950 "option to get a clearer picture of what's going on."
6950 msgstr "" 6951 msgstr ""
6951 6952
6952 #. type: Content of: <book><chapter><sect1><sect2><title> 6953 #. type: Content of: <book><chapter><sect1><sect2><title>
6953 #: ../en/ch05-collab.xml:830 6954 #: ../en/ch05-collab.xml:827
6954 msgid "Using compression with ssh" 6955 msgid "Using compression with ssh"
6955 msgstr "通过 ssh 使用压缩" 6956 msgstr "通过 ssh 使用压缩"
6956 6957
6957 #. type: Content of: <book><chapter><sect1><sect2><para> 6958 #. type: Content of: <book><chapter><sect1><sect2><para>
6958 #: ../en/ch05-collab.xml:832 6959 #: ../en/ch05-collab.xml:829
6959 msgid "" 6960 msgid ""
6960 "Mercurial does not compress data when it uses the ssh protocol, because the " 6961 "Mercurial does not compress data when it uses the ssh protocol, because the "
6961 "ssh protocol can transparently compress data. However, the default behaviour " 6962 "ssh protocol can transparently compress data. However, the default behaviour "
6962 "of ssh clients is <emphasis>not</emphasis> to request compression." 6963 "of ssh clients is <emphasis>not</emphasis> to request compression."
6963 msgstr "" 6964 msgstr ""
6964 6965
6965 #. type: Content of: <book><chapter><sect1><sect2><para> 6966 #. type: Content of: <book><chapter><sect1><sect2><para>
6966 #: ../en/ch05-collab.xml:837 6967 #: ../en/ch05-collab.xml:834
6967 msgid "" 6968 msgid ""
6968 "Over any network other than a fast LAN (even a wireless network), using " 6969 "Over any network other than a fast LAN (even a wireless network), using "
6969 "compression is likely to significantly speed up Mercurial's network " 6970 "compression is likely to significantly speed up Mercurial's network "
6970 "operations. For example, over a WAN, someone measured compression as " 6971 "operations. For example, over a WAN, someone measured compression as "
6971 "reducing the amount of time required to clone a particularly large repository " 6972 "reducing the amount of time required to clone a particularly large repository "
6972 "from 51 minutes to 17 minutes." 6973 "from 51 minutes to 17 minutes."
6973 msgstr "" 6974 msgstr ""
6974 6975
6975 #. type: Content of: <book><chapter><sect1><sect2><para> 6976 #. type: Content of: <book><chapter><sect1><sect2><para>
6976 #: ../en/ch05-collab.xml:844 6977 #: ../en/ch05-collab.xml:841
6977 msgid "" 6978 msgid ""
6978 "Both <command>ssh</command> and <command>plink</command> accept a <option " 6979 "Both <command>ssh</command> and <command>plink</command> accept a <option "
6979 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can " 6980 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can "
6980 "easily edit your <filename role=\"special\">~/.hgrc</filename> to enable " 6981 "easily edit your <filename role=\"special\">~/.hgrc</filename> to enable "
6981 "compression for all of Mercurial's uses of the ssh protocol." 6982 "compression for all of Mercurial's uses of the ssh protocol."
6982 msgstr "" 6983 msgstr ""
6983 6984
6984 #. type: Content of: <book><chapter><sect1><sect2><para> 6985 #. type: Content of: <book><chapter><sect1><sect2><para>
6985 #: ../en/ch05-collab.xml:852 6986 #: ../en/ch05-collab.xml:849
6986 msgid "" 6987 msgid ""
6987 "If you use <command>ssh</command>, you can configure it to always use " 6988 "If you use <command>ssh</command>, you can configure it to always use "
6988 "compression when talking to your server. To do this, edit your <filename " 6989 "compression when talking to your server. To do this, edit your <filename "
6989 "role=\"special\">.ssh/config</filename> file (which may not yet exist), as " 6990 "role=\"special\">.ssh/config</filename> file (which may not yet exist), as "
6990 "follows." 6991 "follows."
6991 msgstr "" 6992 msgstr ""
6992 6993
6993 #. type: Content of: <book><chapter><sect1><sect2><para> 6994 #. type: Content of: <book><chapter><sect1><sect2><para>
6994 #: ../en/ch05-collab.xml:860 6995 #: ../en/ch05-collab.xml:857
6995 msgid "" 6996 msgid ""
6996 "This defines an alias, <literal>hg</literal>. When you use it on the " 6997 "This defines an alias, <literal>hg</literal>. When you use it on the "
6997 "<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-" 6998 "<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-"
6998 "protocol URL, it will cause <command>ssh</command> to connect to <literal>hg." 6999 "protocol URL, it will cause <command>ssh</command> to connect to <literal>hg."
6999 "example.com</literal> and use compression. This gives you both a shorter " 7000 "example.com</literal> and use compression. This gives you both a shorter "
7000 "name to type and compression, each of which is a good thing in its own right." 7001 "name to type and compression, each of which is a good thing in its own right."
7001 msgstr "" 7002 msgstr ""
7002 7003
7003 #. type: Content of: <book><chapter><sect1><title> 7004 #. type: Content of: <book><chapter><sect1><title>
7004 #: ../en/ch05-collab.xml:871 7005 #: ../en/ch05-collab.xml:868
7005 msgid "Serving over HTTP using CGI" 7006 msgid "Serving over HTTP using CGI"
7006 msgstr "使用 CGI 通过 HTTP 提供服务" 7007 msgstr "使用 CGI 通过 HTTP 提供服务"
7007 7008
7008 #. type: Content of: <book><chapter><sect1><para> 7009 #. type: Content of: <book><chapter><sect1><para>
7009 #: ../en/ch05-collab.xml:873 7010 #: ../en/ch05-collab.xml:870
7010 msgid "" 7011 msgid ""
7011 "Depending on how ambitious you are, configuring Mercurial's CGI interface can " 7012 "Depending on how ambitious you are, configuring Mercurial's CGI interface can "
7012 "take anything from a few moments to several hours." 7013 "take anything from a few moments to several hours."
7013 msgstr "" 7014 msgstr ""
7014 7015
7015 #. type: Content of: <book><chapter><sect1><para> 7016 #. type: Content of: <book><chapter><sect1><para>
7016 #: ../en/ch05-collab.xml:877 7017 #: ../en/ch05-collab.xml:874
7017 msgid "" 7018 msgid ""
7018 "We'll begin with the simplest of examples, and work our way towards a more " 7019 "We'll begin with the simplest of examples, and work our way towards a more "
7019 "complex configuration. Even for the most basic case, you're almost certainly " 7020 "complex configuration. Even for the most basic case, you're almost certainly "
7020 "going to need to read and modify your web server's configuration." 7021 "going to need to read and modify your web server's configuration."
7021 msgstr "" 7022 msgstr ""
7022 7023
7023 #. type: Content of: <book><chapter><sect1><note><para> 7024 #. type: Content of: <book><chapter><sect1><note><para>
7024 #: ../en/ch05-collab.xml:883 7025 #: ../en/ch05-collab.xml:880
7025 msgid "" 7026 msgid ""
7026 "Configuring a web server is a complex, fiddly, and highly system-dependent " 7027 "Configuring a web server is a complex, fiddly, and highly system-dependent "
7027 "activity. I can't possibly give you instructions that will cover anything " 7028 "activity. I can't possibly give you instructions that will cover anything "
7028 "like all of the cases you will encounter. Please use your discretion and " 7029 "like all of the cases you will encounter. Please use your discretion and "
7029 "judgment in following the sections below. Be prepared to make plenty of " 7030 "judgment in following the sections below. Be prepared to make plenty of "
7030 "mistakes, and to spend a lot of time reading your server's error logs." 7031 "mistakes, and to spend a lot of time reading your server's error logs."
7031 msgstr "" 7032 msgstr ""
7032 7033
7033 #. type: Content of: <book><chapter><sect1><sect2><title> 7034 #. type: Content of: <book><chapter><sect1><sect2><title>
7034 #: ../en/ch05-collab.xml:893 7035 #: ../en/ch05-collab.xml:890
7035 msgid "Web server configuration checklist" 7036 msgid "Web server configuration checklist"
7036 msgstr "Web 服务器配置检查表" 7037 msgstr "Web 服务器配置检查表"
7037 7038
7038 #. type: Content of: <book><chapter><sect1><sect2><para> 7039 #. type: Content of: <book><chapter><sect1><sect2><para>
7039 #: ../en/ch05-collab.xml:895 7040 #: ../en/ch05-collab.xml:892
7040 msgid "" 7041 msgid ""
7041 "Before you continue, do take a few moments to check a few aspects of your " 7042 "Before you continue, do take a few moments to check a few aspects of your "
7042 "system's setup." 7043 "system's setup."
7043 msgstr "" 7044 msgstr ""
7044 7045
7045 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 7046 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
7046 #: ../en/ch05-collab.xml:899 7047 #: ../en/ch05-collab.xml:896
7047 msgid "" 7048 msgid ""
7048 "Do you have a web server installed at all? Mac OS X ships with Apache, but " 7049 "Do you have a web server installed at all? Mac OS X ships with Apache, but "
7049 "many other systems may not have a web server installed." 7050 "many other systems may not have a web server installed."
7050 msgstr "" 7051 msgstr ""
7051 7052
7052 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 7053 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
7053 #: ../en/ch05-collab.xml:903 7054 #: ../en/ch05-collab.xml:900
7054 msgid "" 7055 msgid ""
7055 "If you have a web server installed, is it actually running? On most systems, " 7056 "If you have a web server installed, is it actually running? On most systems, "
7056 "even if one is present, it will be disabled by default." 7057 "even if one is present, it will be disabled by default."
7057 msgstr "" 7058 msgstr ""
7058 7059
7059 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 7060 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
7060 #: ../en/ch05-collab.xml:907 7061 #: ../en/ch05-collab.xml:904
7061 msgid "" 7062 msgid ""
7062 "Is your server configured to allow you to run CGI programs in the directory " 7063 "Is your server configured to allow you to run CGI programs in the directory "
7063 "where you plan to do so? Most servers default to explicitly disabling the " 7064 "where you plan to do so? Most servers default to explicitly disabling the "
7064 "ability to run CGI programs." 7065 "ability to run CGI programs."
7065 msgstr "" 7066 msgstr ""
7066 7067
7067 #. type: Content of: <book><chapter><sect1><sect2><para> 7068 #. type: Content of: <book><chapter><sect1><sect2><para>
7068 #: ../en/ch05-collab.xml:913 7069 #: ../en/ch05-collab.xml:910
7069 msgid "" 7070 msgid ""
7070 "If you don't have a web server installed, and don't have substantial " 7071 "If you don't have a web server installed, and don't have substantial "
7071 "experience configuring Apache, you should consider using the " 7072 "experience configuring Apache, you should consider using the "
7072 "<literal>lighttpd</literal> web server instead of Apache. Apache has a well-" 7073 "<literal>lighttpd</literal> web server instead of Apache. Apache has a well-"
7073 "deserved reputation for baroque and confusing configuration. While " 7074 "deserved reputation for baroque and confusing configuration. While "
7076 "<literal>lighttpd</literal> is undeniably <emphasis>much</emphasis> easier to " 7077 "<literal>lighttpd</literal> is undeniably <emphasis>much</emphasis> easier to "
7077 "get started with than Apache." 7078 "get started with than Apache."
7078 msgstr "" 7079 msgstr ""
7079 7080
7080 #. type: Content of: <book><chapter><sect1><sect2><title> 7081 #. type: Content of: <book><chapter><sect1><sect2><title>
7081 #: ../en/ch05-collab.xml:926 7082 #: ../en/ch05-collab.xml:923
7082 msgid "Basic CGI configuration" 7083 msgid "Basic CGI configuration"
7083 msgstr "基本 CGI 配置" 7084 msgstr "基本 CGI 配置"
7084 7085
7085 #. type: Content of: <book><chapter><sect1><sect2><para> 7086 #. type: Content of: <book><chapter><sect1><sect2><para>
7086 #: ../en/ch05-collab.xml:928 7087 #: ../en/ch05-collab.xml:925
7087 msgid "" 7088 msgid ""
7088 "On Unix-like systems, it's common for users to have a subdirectory named " 7089 "On Unix-like systems, it's common for users to have a subdirectory named "
7089 "something like <filename class=\"directory\">public_html</filename> in their " 7090 "something like <filename class=\"directory\">public_html</filename> in their "
7090 "home directory, from which they can serve up web pages. A file named " 7091 "home directory, from which they can serve up web pages. A file named "
7091 "<filename>foo</filename> in this directory will be accessible at a URL of the " 7092 "<filename>foo</filename> in this directory will be accessible at a URL of the "
7092 "form <literal>http://www.example.com/username/foo</literal>." 7093 "form <literal>http://www.example.com/username/foo</literal>."
7093 msgstr "" 7094 msgstr ""
7094 7095
7095 #. type: Content of: <book><chapter><sect1><sect2><para> 7096 #. type: Content of: <book><chapter><sect1><sect2><para>
7096 #: ../en/ch05-collab.xml:936 7097 #: ../en/ch05-collab.xml:933
7097 msgid "" 7098 msgid ""
7098 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> " 7099 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> "
7099 "script that should be present in your Mercurial installation. If you can't " 7100 "script that should be present in your Mercurial installation. If you can't "
7100 "quickly find a local copy on your system, simply download one from the master " 7101 "quickly find a local copy on your system, simply download one from the master "
7101 "Mercurial repository at <ulink url=\"http://www.selenic.com/repo/hg/raw-file/" 7102 "Mercurial repository at <ulink url=\"http://www.selenic.com/repo/hg/raw-file/"
7102 "tip/hgweb.cgi\">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>." 7103 "tip/hgweb.cgi\">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>."
7103 msgstr "" 7104 msgstr ""
7104 7105
7105 #. type: Content of: <book><chapter><sect1><sect2><para> 7106 #. type: Content of: <book><chapter><sect1><sect2><para>
7106 #: ../en/ch05-collab.xml:943 ../en/ch05-collab.xml:1112 7107 #: ../en/ch05-collab.xml:940 ../en/ch05-collab.xml:1109
7107 msgid "" 7108 msgid ""
7108 "You'll need to copy this script into your <filename class=\"directory" 7109 "You'll need to copy this script into your <filename class=\"directory"
7109 "\">public_html</filename> directory, and ensure that it's executable." 7110 "\">public_html</filename> directory, and ensure that it's executable."
7110 msgstr "" 7111 msgstr ""
7111 7112
7112 #. type: Content of: <book><chapter><sect1><sect2><para> 7113 #. type: Content of: <book><chapter><sect1><sect2><para>
7113 #: ../en/ch05-collab.xml:948 7114 #: ../en/ch05-collab.xml:945
7114 msgid "" 7115 msgid ""
7115 "The <literal>755</literal> argument to <command>chmod</command> is a little " 7116 "The <literal>755</literal> argument to <command>chmod</command> is a little "
7116 "more general than just making the script executable: it ensures that the " 7117 "more general than just making the script executable: it ensures that the "
7117 "script is executable by anyone, and that <quote>group</quote> and " 7118 "script is executable by anyone, and that <quote>group</quote> and "
7118 "<quote>other</quote> write permissions are <emphasis>not</emphasis> set. If " 7119 "<quote>other</quote> write permissions are <emphasis>not</emphasis> set. If "
7121 "<literal>suexec</literal> also insists that the <emphasis>directory</" 7122 "<literal>suexec</literal> also insists that the <emphasis>directory</"
7122 "emphasis> in which the script resides must not be writable by others." 7123 "emphasis> in which the script resides must not be writable by others."
7123 msgstr "" 7124 msgstr ""
7124 7125
7125 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7126 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7126 #: ../en/ch05-collab.xml:962 7127 #: ../en/ch05-collab.xml:959
7127 msgid "What could <emphasis>possibly</emphasis> go wrong?" 7128 msgid "What could <emphasis>possibly</emphasis> go wrong?"
7128 msgstr "什么<emphasis>可能</emphasis>会出错?" 7129 msgstr "什么<emphasis>可能</emphasis>会出错?"
7129 7130
7130 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7131 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7131 #: ../en/ch05-collab.xml:965 7132 #: ../en/ch05-collab.xml:962
7132 msgid "" 7133 msgid ""
7133 "Once you've copied the CGI script into place, go into a web browser, and try " 7134 "Once you've copied the CGI script into place, go into a web browser, and try "
7134 "to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://" 7135 "to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://"
7135 "myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself " 7136 "myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself "
7136 "for instant failure. There's a high probability that trying to visit this " 7137 "for instant failure. There's a high probability that trying to visit this "
7140 "system running Fedora 7, with a fresh installation of Apache, and a user " 7141 "system running Fedora 7, with a fresh installation of Apache, and a user "
7141 "account that I created specially to perform this exercise." 7142 "account that I created specially to perform this exercise."
7142 msgstr "" 7143 msgstr ""
7143 7144
7144 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7145 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7145 #: ../en/ch05-collab.xml:979 7146 #: ../en/ch05-collab.xml:976
7146 msgid "" 7147 msgid ""
7147 "Your web server may have per-user directories disabled. If you're using " 7148 "Your web server may have per-user directories disabled. If you're using "
7148 "Apache, search your config file for a <literal>UserDir</literal> directive. " 7149 "Apache, search your config file for a <literal>UserDir</literal> directive. "
7149 "If there's none present, per-user directories will be disabled. If one " 7150 "If there's none present, per-user directories will be disabled. If one "
7150 "exists, but its value is <literal>disabled</literal>, then per-user " 7151 "exists, but its value is <literal>disabled</literal>, then per-user "
7153 "your home directory, for example <filename class=\"directory\">public_html</" 7154 "your home directory, for example <filename class=\"directory\">public_html</"
7154 "filename>." 7155 "filename>."
7155 msgstr "" 7156 msgstr ""
7156 7157
7157 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7158 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7158 #: ../en/ch05-collab.xml:990 7159 #: ../en/ch05-collab.xml:987
7159 msgid "" 7160 msgid ""
7160 "Your file access permissions may be too restrictive. The web server must be " 7161 "Your file access permissions may be too restrictive. The web server must be "
7161 "able to traverse your home directory and directories under your <filename " 7162 "able to traverse your home directory and directories under your <filename "
7162 "class=\"directory\">public_html</filename> directory, and read files under " 7163 "class=\"directory\">public_html</filename> directory, and read files under "
7163 "the latter too. Here's a quick recipe to help you to make your permissions " 7164 "the latter too. Here's a quick recipe to help you to make your permissions "
7164 "more appropriate." 7165 "more appropriate."
7165 msgstr "" 7166 msgstr ""
7166 7167
7167 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7168 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7168 #: ../en/ch05-collab.xml:1000 7169 #: ../en/ch05-collab.xml:997
7169 msgid "" 7170 msgid ""
7170 "The other possibility with permissions is that you might get a completely " 7171 "The other possibility with permissions is that you might get a completely "
7171 "empty window when you try to load the script. In this case, it's likely that " 7172 "empty window when you try to load the script. In this case, it's likely that "
7172 "your access permissions are <emphasis>too permissive</emphasis>. Apache's " 7173 "your access permissions are <emphasis>too permissive</emphasis>. Apache's "
7173 "<literal>suexec</literal> subsystem won't execute a script that's group- or " 7174 "<literal>suexec</literal> subsystem won't execute a script that's group- or "
7174 "world-writable, for example." 7175 "world-writable, for example."
7175 msgstr "" 7176 msgstr ""
7176 7177
7177 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7178 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7178 #: ../en/ch05-collab.xml:1007 7179 #: ../en/ch05-collab.xml:1004
7179 msgid "" 7180 msgid ""
7180 "Your web server may be configured to disallow execution of CGI programs in " 7181 "Your web server may be configured to disallow execution of CGI programs in "
7181 "your per-user web directory. Here's Apache's default per-user configuration " 7182 "your per-user web directory. Here's Apache's default per-user configuration "
7182 "from my Fedora system." 7183 "from my Fedora system."
7183 msgstr "" 7184 msgstr ""
7184 7185
7185 #. type: CDATA
7186 #: ../en/ch05-collab.xml:1012
7187 #, no-wrap
7188 msgid "&ch06-apache-config.lst;]]"
7189 msgstr ""
7190
7191 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7186 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7192 #: ../en/ch05-collab.xml:1014 7187 #: ../en/ch05-collab.xml:1011
7193 msgid "" 7188 msgid ""
7194 "If you find a similar-looking <literal>Directory</literal> group in your " 7189 "If you find a similar-looking <literal>Directory</literal> group in your "
7195 "Apache configuration, the directive to look at inside it is <literal>Options</" 7190 "Apache configuration, the directive to look at inside it is <literal>Options</"
7196 "literal>. Add <literal>ExecCGI</literal> to the end of this list if it's " 7191 "literal>. Add <literal>ExecCGI</literal> to the end of this list if it's "
7197 "missing, and restart the web server." 7192 "missing, and restart the web server."
7198 msgstr "" 7193 msgstr ""
7199 7194
7200 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7195 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7201 #: ../en/ch05-collab.xml:1021 7196 #: ../en/ch05-collab.xml:1018
7202 msgid "" 7197 msgid ""
7203 "If you find that Apache serves you the text of the CGI script instead of " 7198 "If you find that Apache serves you the text of the CGI script instead of "
7204 "executing it, you may need to either uncomment (if already present) or add a " 7199 "executing it, you may need to either uncomment (if already present) or add a "
7205 "directive like this." 7200 "directive like this."
7206 msgstr "" 7201 msgstr ""
7207 7202
7208 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7203 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7209 #: ../en/ch05-collab.xml:1027 7204 #: ../en/ch05-collab.xml:1024
7210 msgid "" 7205 msgid ""
7211 "The next possibility is that you might be served with a colourful Python " 7206 "The next possibility is that you might be served with a colourful Python "
7212 "backtrace claiming that it can't import a <literal>mercurial</literal>-" 7207 "backtrace claiming that it can't import a <literal>mercurial</literal>-"
7213 "related module. This is actually progress! The server is now capable of " 7208 "related module. This is actually progress! The server is now capable of "
7214 "executing your CGI script. This error is only likely to occur if you're " 7209 "executing your CGI script. This error is only likely to occur if you're "
7219 "\"special\">hgweb.cgi</filename> and follow the directions inside it to " 7214 "\"special\">hgweb.cgi</filename> and follow the directions inside it to "
7220 "correctly set your <envar>PYTHONPATH</envar> environment variable." 7215 "correctly set your <envar>PYTHONPATH</envar> environment variable."
7221 msgstr "" 7216 msgstr ""
7222 7217
7223 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7218 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7224 #: ../en/ch05-collab.xml:1041 7219 #: ../en/ch05-collab.xml:1038
7225 msgid "" 7220 msgid ""
7226 "Finally, you are <emphasis>certain</emphasis> to by served with another " 7221 "Finally, you are <emphasis>certain</emphasis> to by served with another "
7227 "colourful Python backtrace: this one will complain that it can't find " 7222 "colourful Python backtrace: this one will complain that it can't find "
7228 "<filename class=\"directory\">/path/to/repository</filename>. Edit your " 7223 "<filename class=\"directory\">/path/to/repository</filename>. Edit your "
7229 "<filename role=\"special\">hgweb.cgi</filename> script and replace the " 7224 "<filename role=\"special\">hgweb.cgi</filename> script and replace the "
7230 "<filename class=\"directory\">/path/to/repository</filename> string with the " 7225 "<filename class=\"directory\">/path/to/repository</filename> string with the "
7231 "complete path to the repository you want to serve up." 7226 "complete path to the repository you want to serve up."
7232 msgstr "" 7227 msgstr ""
7233 7228
7234 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7229 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7235 #: ../en/ch05-collab.xml:1051 7230 #: ../en/ch05-collab.xml:1048
7236 msgid "" 7231 msgid ""
7237 "At this point, when you try to reload the page, you should be presented with " 7232 "At this point, when you try to reload the page, you should be presented with "
7238 "a nice HTML view of your repository's history. Whew!" 7233 "a nice HTML view of your repository's history. Whew!"
7239 msgstr "" 7234 msgstr ""
7240 7235
7241 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7236 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7242 #: ../en/ch05-collab.xml:1057 7237 #: ../en/ch05-collab.xml:1054
7243 msgid "Configuring lighttpd" 7238 msgid "Configuring lighttpd"
7244 msgstr "配置 lighttpd" 7239 msgstr "配置 lighttpd"
7245 7240
7246 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7241 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7247 #: ../en/ch05-collab.xml:1059 7242 #: ../en/ch05-collab.xml:1056
7248 msgid "" 7243 msgid ""
7249 "To be exhaustive in my experiments, I tried configuring the increasingly " 7244 "To be exhaustive in my experiments, I tried configuring the increasingly "
7250 "popular <literal>lighttpd</literal> web server to serve the same repository " 7245 "popular <literal>lighttpd</literal> web server to serve the same repository "
7251 "as I described with Apache above. I had already overcome all of the problems " 7246 "as I described with Apache above. I had already overcome all of the problems "
7252 "I outlined with Apache, many of which are not server-specific. As a result, " 7247 "I outlined with Apache, many of which are not server-specific. As a result, "
7253 "I was fairly sure that my file and directory permissions were good, and that " 7248 "I was fairly sure that my file and directory permissions were good, and that "
7254 "my <filename role=\"special\">hgweb.cgi</filename> script was properly edited." 7249 "my <filename role=\"special\">hgweb.cgi</filename> script was properly edited."
7255 msgstr "" 7250 msgstr ""
7256 7251
7257 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7252 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7258 #: ../en/ch05-collab.xml:1069 7253 #: ../en/ch05-collab.xml:1066
7259 msgid "" 7254 msgid ""
7260 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the " 7255 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the "
7261 "repository was a snap (in other words, even if you're trying to use " 7256 "repository was a snap (in other words, even if you're trying to use "
7262 "<literal>lighttpd</literal>, you should read the Apache section). I first " 7257 "<literal>lighttpd</literal>, you should read the Apache section). I first "
7263 "had to edit the <literal>mod_access</literal> section of its config file to " 7258 "had to edit the <literal>mod_access</literal> section of its config file to "
7265 "which were disabled by default on my system. I then added a few lines to the " 7260 "which were disabled by default on my system. I then added a few lines to the "
7266 "end of the config file, to configure these modules." 7261 "end of the config file, to configure these modules."
7267 msgstr "" 7262 msgstr ""
7268 7263
7269 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7264 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7270 #: ../en/ch05-collab.xml:1081 7265 #: ../en/ch05-collab.xml:1078
7271 msgid "" 7266 msgid ""
7272 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " 7267 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had "
7273 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " 7268 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly "
7274 "have run into many of the same system-level configuration problems as I did " 7269 "have run into many of the same system-level configuration problems as I did "
7275 "with Apache. However, I found <literal>lighttpd</literal> to be noticeably " 7270 "with Apache. However, I found <literal>lighttpd</literal> to be noticeably "
7276 "easier to configure than Apache, even though I've used Apache for over a " 7271 "easier to configure than Apache, even though I've used Apache for over a "
7277 "decade, and this was my first exposure to <literal>lighttpd</literal>." 7272 "decade, and this was my first exposure to <literal>lighttpd</literal>."
7278 msgstr "" 7273 msgstr ""
7279 7274
7280 #. type: Content of: <book><chapter><sect1><sect2><title> 7275 #. type: Content of: <book><chapter><sect1><sect2><title>
7281 #: ../en/ch05-collab.xml:1094 7276 #: ../en/ch05-collab.xml:1091
7282 msgid "Sharing multiple repositories with one CGI script" 7277 msgid "Sharing multiple repositories with one CGI script"
7283 msgstr "使用一个 CGI 脚本共享多个版本库" 7278 msgstr "使用一个 CGI 脚本共享多个版本库"
7284 7279
7285 #. type: Content of: <book><chapter><sect1><sect2><para> 7280 #. type: Content of: <book><chapter><sect1><sect2><para>
7286 #: ../en/ch05-collab.xml:1096 7281 #: ../en/ch05-collab.xml:1093
7287 msgid "" 7282 msgid ""
7288 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " 7283 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you "
7289 "publish a single repository, which is an annoying restriction. If you want " 7284 "publish a single repository, which is an annoying restriction. If you want "
7290 "to publish more than one without wracking yourself with multiple copies of " 7285 "to publish more than one without wracking yourself with multiple copies of "
7291 "the same script, each with different names, a better choice is to use the " 7286 "the same script, each with different names, a better choice is to use the "
7292 "<filename role=\"special\">hgwebdir.cgi</filename> script." 7287 "<filename role=\"special\">hgwebdir.cgi</filename> script."
7293 msgstr "" 7288 msgstr ""
7294 7289
7295 #. type: Content of: <book><chapter><sect1><sect2><para> 7290 #. type: Content of: <book><chapter><sect1><sect2><para>
7296 #: ../en/ch05-collab.xml:1104 7291 #: ../en/ch05-collab.xml:1101
7297 msgid "" 7292 msgid ""
7298 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " 7293 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> "
7299 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" 7294 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</"
7300 "filename>. First, you must obtain a copy of the script. If you don't have " 7295 "filename>. First, you must obtain a copy of the script. If you don't have "
7301 "one handy, you can download a copy from the master Mercurial repository at " 7296 "one handy, you can download a copy from the master Mercurial repository at "
7302 "<ulink url=\"http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi" 7297 "<ulink url=\"http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi"
7303 "\">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>." 7298 "\">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>."
7304 msgstr "" 7299 msgstr ""
7305 7300
7306 #. type: Content of: <book><chapter><sect1><sect2><para> 7301 #. type: Content of: <book><chapter><sect1><sect2><para>
7307 #: ../en/ch05-collab.xml:1117 7302 #: ../en/ch05-collab.xml:1116
7308 msgid "" 7303 msgid ""
7309 "With basic configuration out of the way, try to visit <ulink url=\"http://" 7304 "With basic configuration out of the way, try to visit <ulink url=\"http://"
7310 "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" 7305 "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</"
7311 "ulink> in your browser. It should display an empty list of repositories. If " 7306 "ulink> in your browser. It should display an empty list of repositories. If "
7312 "you get a blank window or error message, try walking through the list of " 7307 "you get a blank window or error message, try walking through the list of "
7313 "potential problems in section <xref linkend=\"sec.collab.wtf\"/>." 7308 "potential problems in <xref linkend=\"sec:collab:wtf\"/>."
7314 msgstr "" 7309 msgstr ""
7315 7310
7316 #. type: Content of: <book><chapter><sect1><sect2><para> 7311 #. type: Content of: <book><chapter><sect1><sect2><para>
7317 #: ../en/ch05-collab.xml:1126 7312 #: ../en/ch05-collab.xml:1125
7318 msgid "" 7313 msgid ""
7319 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " 7314 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an "
7320 "external configuration file. By default, it searches for a file named " 7315 "external configuration file. By default, it searches for a file named "
7321 "<filename role=\"special\">hgweb.config</filename> in the same directory as " 7316 "<filename role=\"special\">hgweb.config</filename> in the same directory as "
7322 "itself. You'll need to create this file, and make it world-readable. The " 7317 "itself. You'll need to create this file, and make it world-readable. The "
7324 "understood by Python's <literal>ConfigParser</literal> <citation>web:" 7319 "understood by Python's <literal>ConfigParser</literal> <citation>web:"
7325 "configparser</citation> module." 7320 "configparser</citation> module."
7326 msgstr "" 7321 msgstr ""
7327 7322
7328 #. type: Content of: <book><chapter><sect1><sect2><para> 7323 #. type: Content of: <book><chapter><sect1><sect2><para>
7329 #: ../en/ch05-collab.xml:1136 7324 #: ../en/ch05-collab.xml:1135
7330 msgid "" 7325 msgid ""
7331 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" 7326 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</"
7332 "filename> is with a section named <literal>collections</literal>. This will " 7327 "filename> is with a section named <literal>collections</literal>. This will "
7333 "automatically publish <emphasis>every</emphasis> repository under the " 7328 "automatically publish <emphasis>every</emphasis> repository under the "
7334 "directories you name. The section should look like this:" 7329 "directories you name. The section should look like this:"
7335 msgstr "" 7330 msgstr ""
7336 7331
7337 #. type: Content of: <book><chapter><sect1><sect2><para> 7332 #. type: Content of: <book><chapter><sect1><sect2><para>
7338 #: ../en/ch05-collab.xml:1144 7333 #: ../en/ch05-collab.xml:1143
7339 msgid "" 7334 msgid ""
7340 "Mercurial interprets this by looking at the directory name on the " 7335 "Mercurial interprets this by looking at the directory name on the "
7341 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" 7336 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></"
7342 "quote> sign; finding repositories in that directory hierarchy; and using the " 7337 "quote> sign; finding repositories in that directory hierarchy; and using the "
7343 "text on the <emphasis>left</emphasis> to strip off matching text from the " 7338 "text on the <emphasis>left</emphasis> to strip off matching text from the "
7345 "a path after this stripping has occurred is called a <quote>virtual path</" 7340 "a path after this stripping has occurred is called a <quote>virtual path</"
7346 "quote>." 7341 "quote>."
7347 msgstr "" 7342 msgstr ""
7348 7343
7349 #. type: Content of: <book><chapter><sect1><sect2><para> 7344 #. type: Content of: <book><chapter><sect1><sect2><para>
7350 #: ../en/ch05-collab.xml:1153 7345 #: ../en/ch05-collab.xml:1152
7351 msgid "" 7346 msgid ""
7352 "Given the example above, if we have a repository whose local path is " 7347 "Given the example above, if we have a repository whose local path is "
7353 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script " 7348 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script "
7354 "will strip the leading <filename class=\"directory\">/my/root</filename> from " 7349 "will strip the leading <filename class=\"directory\">/my/root</filename> from "
7355 "the name, and publish the repository with a virtual path of <filename class=" 7350 "the name, and publish the repository with a virtual path of <filename class="
7359 "<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://" 7354 "<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://"
7360 "myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>." 7355 "myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>."
7361 msgstr "" 7356 msgstr ""
7362 7357
7363 #. type: Content of: <book><chapter><sect1><sect2><para> 7358 #. type: Content of: <book><chapter><sect1><sect2><para>
7364 #: ../en/ch05-collab.xml:1167 7359 #: ../en/ch05-collab.xml:1166
7365 msgid "" 7360 msgid ""
7366 "If we replace <filename class=\"directory\">/my/root</filename> on the left " 7361 "If we replace <filename class=\"directory\">/my/root</filename> on the left "
7367 "hand side of this example with <filename class=\"directory\">/my</filename>, " 7362 "hand side of this example with <filename class=\"directory\">/my</filename>, "
7368 "then <filename role=\"special\">hgwebdir.cgi</filename> will only strip off " 7363 "then <filename role=\"special\">hgwebdir.cgi</filename> will only strip off "
7369 "<filename class=\"directory\">/my</filename> from the repository name, and " 7364 "<filename class=\"directory\">/my</filename> from the repository name, and "
7370 "will give us a virtual path of <filename class=\"directory\">root/this/repo</" 7365 "will give us a virtual path of <filename class=\"directory\">root/this/repo</"
7371 "filename> instead of <filename class=\"directory\">this/repo</filename>." 7366 "filename> instead of <filename class=\"directory\">this/repo</filename>."
7372 msgstr "" 7367 msgstr ""
7373 7368
7374 #. type: Content of: <book><chapter><sect1><sect2><para> 7369 #. type: Content of: <book><chapter><sect1><sect2><para>
7375 #: ../en/ch05-collab.xml:1177 7370 #: ../en/ch05-collab.xml:1176
7376 msgid "" 7371 msgid ""
7377 "The <filename role=\"special\">hgwebdir.cgi</filename> script will " 7372 "The <filename role=\"special\">hgwebdir.cgi</filename> script will "
7378 "recursively search each directory listed in the <literal>collections</" 7373 "recursively search each directory listed in the <literal>collections</"
7379 "literal> section of its configuration file, but it will <literal>not</" 7374 "literal> section of its configuration file, but it will <literal>not</"
7380 "literal> recurse into the repositories it finds." 7375 "literal> recurse into the repositories it finds."
7381 msgstr "" 7376 msgstr ""
7382 7377
7383 #. type: Content of: <book><chapter><sect1><sect2><para> 7378 #. type: Content of: <book><chapter><sect1><sect2><para>
7384 #: ../en/ch05-collab.xml:1183 7379 #: ../en/ch05-collab.xml:1182
7385 msgid "" 7380 msgid ""
7386 "The <literal>collections</literal> mechanism makes it easy to publish many " 7381 "The <literal>collections</literal> mechanism makes it easy to publish many "
7387 "repositories in a <quote>fire and forget</quote> manner. You only need to " 7382 "repositories in a <quote>fire and forget</quote> manner. You only need to "
7388 "set up the CGI script and configuration file one time. Afterwards, you can " 7383 "set up the CGI script and configuration file one time. Afterwards, you can "
7389 "publish or unpublish a repository at any time by simply moving it into, or " 7384 "publish or unpublish a repository at any time by simply moving it into, or "
7390 "out of, the directory hierarchy in which you've configured <filename role=" 7385 "out of, the directory hierarchy in which you've configured <filename role="
7391 "\"special\">hgwebdir.cgi</filename> to look." 7386 "\"special\">hgwebdir.cgi</filename> to look."
7392 msgstr "" 7387 msgstr ""
7393 7388
7394 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7389 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7395 #: ../en/ch05-collab.xml:1193 7390 #: ../en/ch05-collab.xml:1192
7396 msgid "Explicitly specifying which repositories to publish" 7391 msgid "Explicitly specifying which repositories to publish"
7397 msgstr "明确指出要发布的版本库" 7392 msgstr "明确指出要发布的版本库"
7398 7393
7399 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7394 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7400 #: ../en/ch05-collab.xml:1196 7395 #: ../en/ch05-collab.xml:1195
7401 msgid "" 7396 msgid ""
7402 "In addition to the <literal>collections</literal> mechanism, the <filename " 7397 "In addition to the <literal>collections</literal> mechanism, the <filename "
7403 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " 7398 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a "
7404 "specific list of repositories. To do so, create a <literal>paths</literal> " 7399 "specific list of repositories. To do so, create a <literal>paths</literal> "
7405 "section, with contents of the following form." 7400 "section, with contents of the following form."
7406 msgstr "" 7401 msgstr ""
7407 7402
7408 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7403 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7409 #: ../en/ch05-collab.xml:1205 7404 #: ../en/ch05-collab.xml:1204
7410 msgid "" 7405 msgid ""
7411 "In this case, the virtual path (the component that will appear in a URL) is " 7406 "In this case, the virtual path (the component that will appear in a URL) is "
7412 "on the left hand side of each definition, while the path to the repository is " 7407 "on the left hand side of each definition, while the path to the repository is "
7413 "on the right. Notice that there does not need to be any relationship between " 7408 "on the right. Notice that there does not need to be any relationship between "
7414 "the virtual path you choose and the location of a repository in your " 7409 "the virtual path you choose and the location of a repository in your "
7415 "filesystem." 7410 "filesystem."
7416 msgstr "" 7411 msgstr ""
7417 7412
7418 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7413 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7419 #: ../en/ch05-collab.xml:1212 7414 #: ../en/ch05-collab.xml:1211
7420 msgid "" 7415 msgid ""
7421 "If you wish, you can use both the <literal>collections</literal> and " 7416 "If you wish, you can use both the <literal>collections</literal> and "
7422 "<literal>paths</literal> mechanisms simultaneously in a single configuration " 7417 "<literal>paths</literal> mechanisms simultaneously in a single configuration "
7423 "file." 7418 "file."
7424 msgstr "" 7419 msgstr ""
7425 7420
7426 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 7421 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
7427 #: ../en/ch05-collab.xml:1218 7422 #: ../en/ch05-collab.xml:1217
7428 msgid "" 7423 msgid ""
7429 "If multiple repositories have the same virtual path, <filename role=\"special" 7424 "If multiple repositories have the same virtual path, <filename role=\"special"
7430 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " 7425 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave "
7431 "unpredictably." 7426 "unpredictably."
7432 msgstr "" 7427 msgstr ""
7433 7428
7434 #. type: Content of: <book><chapter><sect1><sect2><title> 7429 #. type: Content of: <book><chapter><sect1><sect2><title>
7435 #: ../en/ch05-collab.xml:1227 7430 #: ../en/ch05-collab.xml:1226
7436 msgid "Downloading source archives" 7431 msgid "Downloading source archives"
7437 msgstr "下载源代码档案包" 7432 msgstr "下载源代码档案包"
7438 7433
7439 #. type: Content of: <book><chapter><sect1><sect2><para> 7434 #. type: Content of: <book><chapter><sect1><sect2><para>
7440 #: ../en/ch05-collab.xml:1229 7435 #: ../en/ch05-collab.xml:1228
7441 msgid "" 7436 msgid ""
7442 "Mercurial's web interface lets users download an archive of any revision. " 7437 "Mercurial's web interface lets users download an archive of any revision. "
7443 "This archive will contain a snapshot of the working directory as of that " 7438 "This archive will contain a snapshot of the working directory as of that "
7444 "revision, but it will not contain a copy of the repository data." 7439 "revision, but it will not contain a copy of the repository data."
7445 msgstr "" 7440 msgstr ""
7446 7441
7447 #. type: Content of: <book><chapter><sect1><sect2><para> 7442 #. type: Content of: <book><chapter><sect1><sect2><para>
7448 #: ../en/ch05-collab.xml:1234 7443 #: ../en/ch05-collab.xml:1233
7449 msgid "" 7444 msgid ""
7450 "By default, this feature is not enabled. To enable it, you'll need to add an " 7445 "By default, this feature is not enabled. To enable it, you'll need to add an "
7451 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role=" 7446 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role="
7452 "\"rc-web\">web</literal> section of your <filename role=\"special\">~/.hgrc</" 7447 "\"rc-web\">web</literal> section of your <filename role=\"special\">~/.hgrc</"
7453 "filename>." 7448 "filename>."
7454 msgstr "" 7449 msgstr ""
7455 7450
7456 #. type: Content of: <book><chapter><sect1><sect2><title> 7451 #. type: Content of: <book><chapter><sect1><sect2><title>
7457 #: ../en/ch05-collab.xml:1242 7452 #: ../en/ch05-collab.xml:1241
7458 msgid "Web configuration options" 7453 msgid "Web configuration options"
7459 msgstr "Web 配置选项" 7454 msgstr "Web 配置选项"
7460 7455
7461 #. type: Content of: <book><chapter><sect1><sect2><para> 7456 #. type: Content of: <book><chapter><sect1><sect2><para>
7462 #: ../en/ch05-collab.xml:1244 7457 #: ../en/ch05-collab.xml:1243
7463 msgid "" 7458 msgid ""
7464 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " 7459 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> "
7465 "command, and the <filename role=\"special\">hgweb.cgi</filename> and " 7460 "command, and the <filename role=\"special\">hgweb.cgi</filename> and "
7466 "<filename role=\"special\">hgwebdir.cgi</filename> scripts) have a number of " 7461 "<filename role=\"special\">hgwebdir.cgi</filename> scripts) have a number of "
7467 "configuration options that you can set. These belong in a section named " 7462 "configuration options that you can set. These belong in a section named "
7468 "<literal role=\"rc-web\">web</literal>." 7463 "<literal role=\"rc-web\">web</literal>."
7469 msgstr "" 7464 msgstr ""
7470 7465
7471 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7466 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7472 #: ../en/ch05-collab.xml:1252 7467 #: ../en/ch05-collab.xml:1251
7473 msgid "" 7468 msgid ""
7474 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " 7469 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) "
7475 "archive download mechanisms Mercurial supports. If you enable this feature, " 7470 "archive download mechanisms Mercurial supports. If you enable this feature, "
7476 "users of the web interface will be able to download an archive of whatever " 7471 "users of the web interface will be able to download an archive of whatever "
7477 "revision of a repository they are viewing. To enable the archive feature, " 7472 "revision of a repository they are viewing. To enable the archive feature, "
7478 "this item must take the form of a sequence of words drawn from the list below." 7473 "this item must take the form of a sequence of words drawn from the list below."
7479 msgstr "" 7474 msgstr ""
7480 7475
7481 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7476 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7482 #: ../en/ch05-collab.xml:1261 7477 #: ../en/ch05-collab.xml:1260
7483 msgid "" 7478 msgid ""
7484 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " 7479 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using "
7485 "<literal>bzip2</literal> compression. This has the best compression ratio, " 7480 "<literal>bzip2</literal> compression. This has the best compression ratio, "
7486 "but uses the most CPU time on the server." 7481 "but uses the most CPU time on the server."
7487 msgstr "" 7482 msgstr ""
7488 7483
7489 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7484 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7490 #: ../en/ch05-collab.xml:1267 7485 #: ../en/ch05-collab.xml:1266
7491 msgid "" 7486 msgid ""
7492 "<literal>gz</literal>: A <command>tar</command> archive, compressed using " 7487 "<literal>gz</literal>: A <command>tar</command> archive, compressed using "
7493 "<literal>gzip</literal> compression." 7488 "<literal>gzip</literal> compression."
7494 msgstr "" 7489 msgstr ""
7495 7490
7496 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7491 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7497 #: ../en/ch05-collab.xml:1271 7492 #: ../en/ch05-collab.xml:1270
7498 msgid "" 7493 msgid ""
7499 "<literal>zip</literal>: A <command>zip</command> archive, compressed using " 7494 "<literal>zip</literal>: A <command>zip</command> archive, compressed using "
7500 "LZW compression. This format has the worst compression ratio, but is widely " 7495 "LZW compression. This format has the worst compression ratio, but is widely "
7501 "used in the Windows world." 7496 "used in the Windows world."
7502 msgstr "" 7497 msgstr ""
7503 7498
7504 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7499 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7505 #: ../en/ch05-collab.xml:1277 7500 #: ../en/ch05-collab.xml:1276
7506 msgid "" 7501 msgid ""
7507 "If you provide an empty list, or don't have an <envar role=\"rc-item-web" 7502 "If you provide an empty list, or don't have an <envar role=\"rc-item-web"
7508 "\">allow_archive</envar> entry at all, this feature will be disabled. Here " 7503 "\">allow_archive</envar> entry at all, this feature will be disabled. Here "
7509 "is an example of how to enable all three supported formats." 7504 "is an example of how to enable all three supported formats."
7510 msgstr "" 7505 msgstr ""
7511 7506
7512 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7507 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7513 #: ../en/ch05-collab.xml:1284 7508 #: ../en/ch05-collab.xml:1283
7514 msgid "" 7509 msgid ""
7515 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " 7510 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether "
7516 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" 7511 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</"
7517 "command> and <command role=\"hg-cmd\">hg clone</command> this repository over " 7512 "command> and <command role=\"hg-cmd\">hg clone</command> this repository over "
7518 "HTTP. If set to <literal>no</literal> or <literal>false</literal>, only the " 7513 "HTTP. If set to <literal>no</literal> or <literal>false</literal>, only the "
7519 "<quote>human-oriented</quote> portion of the web interface is available." 7514 "<quote>human-oriented</quote> portion of the web interface is available."
7520 msgstr "" 7515 msgstr ""
7521 7516
7522 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7517 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7523 #: ../en/ch05-collab.xml:1293 7518 #: ../en/ch05-collab.xml:1292
7524 msgid "" 7519 msgid ""
7525 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but " 7520 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but "
7526 "preferably brief) string identifying the person or group in charge of the " 7521 "preferably brief) string identifying the person or group in charge of the "
7527 "repository. This often contains the name and email address of a person or " 7522 "repository. This often contains the name and email address of a person or "
7528 "mailing list. It often makes sense to place this entry in a repository's own " 7523 "mailing list. It often makes sense to place this entry in a repository's own "
7530 "use in a global <filename role=\"special\">~/.hgrc</filename> if every " 7525 "use in a global <filename role=\"special\">~/.hgrc</filename> if every "
7531 "repository has a single maintainer." 7526 "repository has a single maintainer."
7532 msgstr "" 7527 msgstr ""
7533 7528
7534 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7529 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7535 #: ../en/ch05-collab.xml:1304 7530 #: ../en/ch05-collab.xml:1303
7536 msgid "" 7531 msgid ""
7537 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum " 7532 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum "
7538 "number of changesets to display in a single page of output." 7533 "number of changesets to display in a single page of output."
7539 msgstr "" 7534 msgstr ""
7540 7535
7541 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7536 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7542 #: ../en/ch05-collab.xml:1308 7537 #: ../en/ch05-collab.xml:1307
7543 msgid "" 7538 msgid ""
7544 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum " 7539 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum "
7545 "number of modified files to display in a single page of output." 7540 "number of modified files to display in a single page of output."
7546 msgstr "" 7541 msgstr ""
7547 7542
7548 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7543 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7549 #: ../en/ch05-collab.xml:1312 7544 #: ../en/ch05-collab.xml:1311
7550 msgid "" 7545 msgid ""
7551 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " 7546 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface "
7552 "displays alternating <quote>stripes</quote> to make it easier to visually " 7547 "displays alternating <quote>stripes</quote> to make it easier to visually "
7553 "align rows when you are looking at a table, this number controls the number " 7548 "align rows when you are looking at a table, this number controls the number "
7554 "of rows in each stripe." 7549 "of rows in each stripe."
7555 msgstr "" 7550 msgstr ""
7556 7551
7557 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7552 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7558 #: ../en/ch05-collab.xml:1318 7553 #: ../en/ch05-collab.xml:1317
7559 msgid "" 7554 msgid ""
7560 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial " 7555 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial "
7561 "uses to display the web interface. Mercurial ships with two web templates, " 7556 "uses to display the web interface. Mercurial ships with two web templates, "
7562 "named <literal>default</literal> and <literal>gitweb</literal> (the latter is " 7557 "named <literal>default</literal> and <literal>gitweb</literal> (the latter is "
7563 "much more visually attractive). You can also specify a custom template of " 7558 "much more visually attractive). You can also specify a custom template of "
7564 "your own; see chapter <xref linkend=\"chap.template\"/> for details. Here, " 7559 "your own; see <xref linkend=\"chap:template\"/> for details. Here, you can "
7565 "you can see how to enable the <literal>gitweb</literal> style." 7560 "see how to enable the <literal>gitweb</literal> style."
7566 msgstr "" 7561 msgstr ""
7567 7562
7568 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7563 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7569 #: ../en/ch05-collab.xml:1330 7564 #: ../en/ch05-collab.xml:1330
7570 msgid "" 7565 msgid ""
8974 msgstr "回滚一个事务" 8969 msgstr "回滚一个事务"
8975 8970
8976 #. type: Content of: <book><chapter><sect1><sect2><para> 8971 #. type: Content of: <book><chapter><sect1><sect2><para>
8977 #: ../en/ch08-undo.xml:33 8972 #: ../en/ch08-undo.xml:33
8978 msgid "" 8973 msgid ""
8979 "In section <xref linkend=\"sec.concepts.txn\"/>, I mentioned that Mercurial " 8974 "In <xref linkend=\"sec:concepts:txn\"/>, I mentioned that Mercurial treats "
8980 "treats each modification of a repository as a <emphasis>transaction</" 8975 "each modification of a repository as a <emphasis>transaction</emphasis>. "
8981 "emphasis>. Every time you commit a changeset or pull changes from another " 8976 "Every time you commit a changeset or pull changes from another repository, "
8982 "repository, Mercurial remembers what you did. You can undo, or " 8977 "Mercurial remembers what you did. You can undo, or <emphasis>roll back</"
8983 "<emphasis>roll back</emphasis>, exactly one of these actions using the " 8978 "emphasis>, exactly one of these actions using the <command role=\"hg-cmd\">hg "
8984 "<command role=\"hg-cmd\">hg rollback</command> command. (See section <xref " 8979 "rollback</command> command. (See <xref linkend=\"sec:undo:rollback-after-push"
8985 "linkend=\"sec.undo.rollback-after-push\"/> for an important caveat about the " 8980 "\"/> for an important caveat about the use of this command.)"
8986 "use of this command.)"
8987 msgstr "" 8981 msgstr ""
8988 8982
8989 #. type: Content of: <book><chapter><sect1><sect2><para> 8983 #. type: Content of: <book><chapter><sect1><sect2><para>
8990 #: ../en/ch08-undo.xml:43 8984 #: ../en/ch08-undo.xml:43
8991 msgid "" 8985 msgid ""
9321 "Before you read this section, here's something to keep in mind: the <command " 9315 "Before you read this section, here's something to keep in mind: the <command "
9322 "role=\"hg-cmd\">hg backout</command> command undoes changes by " 9316 "role=\"hg-cmd\">hg backout</command> command undoes changes by "
9323 "<emphasis>adding</emphasis> history, not by modifying or erasing it. It's " 9317 "<emphasis>adding</emphasis> history, not by modifying or erasing it. It's "
9324 "the right tool to use if you're fixing bugs, but not if you're trying to undo " 9318 "the right tool to use if you're fixing bugs, but not if you're trying to undo "
9325 "some change that has catastrophic consequences. To deal with those, see " 9319 "some change that has catastrophic consequences. To deal with those, see "
9326 "section <xref linkend=\"sec.undo.aaaiiieee\"/>." 9320 "<xref linkend=\"sec:undo:aaaiiieee\"/>."
9327 msgstr "" 9321 msgstr ""
9328 9322
9329 #. type: Content of: <book><chapter><sect1><sect2><title> 9323 #. type: Content of: <book><chapter><sect1><sect2><title>
9330 #: ../en/ch08-undo.xml:312 9324 #: ../en/ch08-undo.xml:312
9331 msgid "Backing out a changeset" 9325 msgid "Backing out a changeset"
9379 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg " 9373 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg "
9380 "log</command> gives us an idea of what the <command role=\"hg-cmd\">hg " 9374 "log</command> gives us an idea of what the <command role=\"hg-cmd\">hg "
9381 "backout</command> command has done. &interaction.backout.simple.log; Notice " 9375 "backout</command> command has done. &interaction.backout.simple.log; Notice "
9382 "that the new changeset that <command role=\"hg-cmd\">hg backout</command> has " 9376 "that the new changeset that <command role=\"hg-cmd\">hg backout</command> has "
9383 "created is a child of the changeset we backed out. It's easier to see this " 9377 "created is a child of the changeset we backed out. It's easier to see this "
9384 "in figure <xref endterm=\"fig.undo.backout.caption\" linkend=\"fig.undo." 9378 "in <xref linkend=\"fig:undo:backout\"/>, which presents a graphical view of "
9385 "backout\"/>, which presents a graphical view of the change history. As you " 9379 "the change history. As you can see, the history is nice and linear."
9386 "can see, the history is nice and linear." 9380 msgstr ""
9387 msgstr "" 9381
9388 9382 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
9389 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9383 #: ../en/ch08-undo.xml:361 ../en/ch08-undo.xml:473
9390 #: ../en/ch08-undo.xml:364
9391 msgid ""
9392 "<imageobject><imagedata fileref=\"images/undo-simple.png\"/> </imageobject>"
9393 msgstr ""
9394
9395 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9396 #: ../en/ch08-undo.xml:367 ../en/ch08-undo.xml:486
9397 msgid "" 9384 msgid ""
9398 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> " 9385 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> "
9399 "command" 9386 "command"
9400 msgstr "" 9387 msgstr ""
9401 9388
9389 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
9390 #: ../en/ch08-undo.xml:364
9391 msgid "<imageobject><imagedata fileref=\"figs/undo-simple.png\"/></imageobject>"
9392 msgstr ""
9393
9402 #. type: Content of: <book><chapter><sect1><sect2><title> 9394 #. type: Content of: <book><chapter><sect1><sect2><title>
9403 #: ../en/ch08-undo.xml:376 9395 #: ../en/ch08-undo.xml:371
9404 msgid "Backing out a non-tip change" 9396 msgid "Backing out a non-tip change"
9405 msgstr "恢复非顶点的修改" 9397 msgstr "恢复非顶点的修改"
9406 9398
9407 #. type: Content of: <book><chapter><sect1><sect2><para> 9399 #. type: Content of: <book><chapter><sect1><sect2><para>
9408 #: ../en/ch08-undo.xml:378 9400 #: ../en/ch08-undo.xml:373
9409 msgid "" 9401 msgid ""
9410 "If you want to back out a change other than the last one you committed, pass " 9402 "If you want to back out a change other than the last one you committed, pass "
9411 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command " 9403 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command "
9412 "role=\"hg-cmd\">hg backout</command> command." 9404 "role=\"hg-cmd\">hg backout</command> command."
9413 msgstr "" 9405 msgstr ""
9414 9406
9415 #. type: Content of: <book><chapter><sect1><sect2><para> 9407 #. type: Content of: <book><chapter><sect1><sect2><para>
9416 #: ../en/ch08-undo.xml:385 9408 #: ../en/ch08-undo.xml:380
9417 msgid "" 9409 msgid ""
9418 "This makes backing out any changeset a <quote>one-shot</quote> operation " 9410 "This makes backing out any changeset a <quote>one-shot</quote> operation "
9419 "that's usually simple and fast." 9411 "that's usually simple and fast."
9420 msgstr "" 9412 msgstr ""
9421 9413
9422 #. type: Content of: <book><chapter><sect1><sect2><para> 9414 #. type: Content of: <book><chapter><sect1><sect2><para>
9423 #: ../en/ch08-undo.xml:391 9415 #: ../en/ch08-undo.xml:386
9424 msgid "" 9416 msgid ""
9425 "If you take a look at the contents of <filename>myfile</filename> after the " 9417 "If you take a look at the contents of <filename>myfile</filename> after the "
9426 "backout finishes, you'll see that the first and third changes are present, " 9418 "backout finishes, you'll see that the first and third changes are present, "
9427 "but not the second." 9419 "but not the second."
9428 msgstr "" 9420 msgstr ""
9429 9421
9430 #. type: Content of: <book><chapter><sect1><sect2><para> 9422 #. type: Content of: <book><chapter><sect1><sect2><para>
9431 #: ../en/ch08-undo.xml:398 9423 #: ../en/ch08-undo.xml:393
9432 msgid "" 9424 msgid ""
9433 "As the graphical history in figure <xref endterm=\"fig.undo.backout-non-tip." 9425 "As the graphical history in <xref linkend=\"fig:undo:backout-non-tip\"/> "
9434 "caption\" linkend=\"fig.undo.backout-non-tip\"/> illustrates, Mercurial " 9426 "illustrates, Mercurial actually commits <emphasis>two</emphasis> changes in "
9435 "actually commits <emphasis>two</emphasis> changes in this kind of situation " 9427 "this kind of situation (the box-shaped nodes are the ones that Mercurial "
9436 "(the box-shaped nodes are the ones that Mercurial commits automatically). " 9428 "commits automatically). Before Mercurial begins the backout process, it "
9437 "Before Mercurial begins the backout process, it first remembers what the " 9429 "first remembers what the current parent of the working directory is. It then "
9438 "current parent of the working directory is. It then backs out the target " 9430 "backs out the target changeset, and commits that as a changeset. Finally, it "
9439 "changeset, and commits that as a changeset. Finally, it merges back to the " 9431 "merges back to the previous parent of the working directory, and commits the "
9440 "previous parent of the working directory, and commits the result of the merge." 9432 "result of the merge."
9441 msgstr "" 9433 msgstr ""
9442 9434
9443 #. type: Content of: <book><chapter><sect1><sect2><para> 9435 #. type: Content of: <book><chapter><sect1><sect2><para>
9444 #: ../en/ch08-undo.xml:410 9436 #: ../en/ch08-undo.xml:404
9445 msgid "" 9437 msgid ""
9446 "% TODO: to me it looks like mercurial doesn't commit the second merge " 9438 "% TODO: to me it looks like mercurial doesn't commit the second merge "
9447 "automatically!" 9439 "automatically!"
9448 msgstr "" 9440 msgstr ""
9449 9441
9450 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9442 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
9451 #: ../en/ch08-undo.xml:415 9443 #: ../en/ch08-undo.xml:408
9452 msgid ""
9453 "<imageobject><imagedata fileref=\"images/undo-non-tip.png\"/> </imageobject>"
9454 msgstr ""
9455
9456 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9457 #: ../en/ch08-undo.xml:418
9458 msgid "" 9444 msgid ""
9459 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg " 9445 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg "
9460 "backout</command> command" 9446 "backout</command> command"
9461 msgstr "" 9447 msgstr ""
9462 9448
9463 #. type: Content of: <book><chapter><sect1><sect2><para> 9449 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
9464 #: ../en/ch08-undo.xml:424 9450 #: ../en/ch08-undo.xml:411
9451 msgid ""
9452 "<imageobject><imagedata fileref=\"figs/undo-non-tip.png\"/></imageobject>"
9453 msgstr ""
9454
9455 #. type: Content of: <book><chapter><sect1><sect2><para>
9456 #: ../en/ch08-undo.xml:416
9465 msgid "" 9457 msgid ""
9466 "The result is that you end up <quote>back where you were</quote>, only with " 9458 "The result is that you end up <quote>back where you were</quote>, only with "
9467 "some extra history that undoes the effect of the changeset you wanted to back " 9459 "some extra history that undoes the effect of the changeset you wanted to back "
9468 "out." 9460 "out."
9469 msgstr "" 9461 msgstr ""
9470 9462
9471 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 9463 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
9472 #: ../en/ch08-undo.xml:429 9464 #: ../en/ch08-undo.xml:421
9473 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option" 9465 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option"
9474 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>" 9466 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>"
9475 9467
9476 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 9468 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
9477 #: ../en/ch08-undo.xml:432 9469 #: ../en/ch08-undo.xml:424
9478 msgid "" 9470 msgid ""
9479 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option " 9471 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option "
9480 "will do the <quote>right thing</quote> whether or not the changeset you're " 9472 "will do the <quote>right thing</quote> whether or not the changeset you're "
9481 "backing out is the tip (i.e. it won't try to merge if it's backing out the " 9473 "backing out is the tip (i.e. it won't try to merge if it's backing out the "
9482 "tip, since there's no need), you should <emphasis>always</emphasis> use this " 9474 "tip, since there's no need), you should <emphasis>always</emphasis> use this "
9483 "option when you run the <command role=\"hg-cmd\">hg backout</command> command." 9475 "option when you run the <command role=\"hg-cmd\">hg backout</command> command."
9484 msgstr "" 9476 msgstr ""
9485 9477
9486 #. type: Content of: <book><chapter><sect1><sect2><title> 9478 #. type: Content of: <book><chapter><sect1><sect2><title>
9487 #: ../en/ch08-undo.xml:443 9479 #: ../en/ch08-undo.xml:435
9488 msgid "Gaining more control of the backout process" 9480 msgid "Gaining more control of the backout process"
9489 msgstr "在恢复处理中获得更多控制" 9481 msgstr "在恢复处理中获得更多控制"
9490 9482
9491 #. type: Content of: <book><chapter><sect1><sect2><para> 9483 #. type: Content of: <book><chapter><sect1><sect2><para>
9492 #: ../en/ch08-undo.xml:445 9484 #: ../en/ch08-undo.xml:437
9493 msgid "" 9485 msgid ""
9494 "While I've recommended that you always use the <option role=\"hg-opt-backout" 9486 "While I've recommended that you always use the <option role=\"hg-opt-backout"
9495 "\">--merge</option> option when backing out a change, the <command role=\"hg-" 9487 "\">--merge</option> option when backing out a change, the <command role=\"hg-"
9496 "cmd\">hg backout</command> command lets you decide how to merge a backout " 9488 "cmd\">hg backout</command> command lets you decide how to merge a backout "
9497 "changeset. Taking control of the backout process by hand is something you " 9489 "changeset. Taking control of the backout process by hand is something you "
9500 "To illustrate this, let's clone our first repository, but omit the backout " 9492 "To illustrate this, let's clone our first repository, but omit the backout "
9501 "change that it contains." 9493 "change that it contains."
9502 msgstr "" 9494 msgstr ""
9503 9495
9504 #. type: Content of: <book><chapter><sect1><sect2><para> 9496 #. type: Content of: <book><chapter><sect1><sect2><para>
9505 #: ../en/ch08-undo.xml:458 9497 #: ../en/ch08-undo.xml:450
9506 msgid "" 9498 msgid ""
9507 "As with our earlier example, We'll commit a third changeset, then back out " 9499 "As with our earlier example, We'll commit a third changeset, then back out "
9508 "its parent, and see what happens." 9500 "its parent, and see what happens."
9509 msgstr "" 9501 msgstr ""
9510 9502
9511 #. type: Content of: <book><chapter><sect1><sect2><para> 9503 #. type: Content of: <book><chapter><sect1><sect2><para>
9512 #: ../en/ch08-undo.xml:464 9504 #: ../en/ch08-undo.xml:456
9513 msgid "" 9505 msgid ""
9514 "Our new changeset is again a descendant of the changeset we backout out; it's " 9506 "Our new changeset is again a descendant of the changeset we backout out; it's "
9515 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that " 9507 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that "
9516 "was the tip. The <command role=\"hg-cmd\">hg backout</command> command was " 9508 "was the tip. The <command role=\"hg-cmd\">hg backout</command> command was "
9517 "quite explicit in telling us this." 9509 "quite explicit in telling us this."
9518 msgstr "" 9510 msgstr ""
9519 9511
9520 #. type: Content of: <book><chapter><sect1><sect2><para> 9512 #. type: Content of: <book><chapter><sect1><sect2><para>
9521 #: ../en/ch08-undo.xml:472 9513 #: ../en/ch08-undo.xml:464
9522 msgid "" 9514 msgid ""
9523 "Again, it's easier to see what has happened by looking at a graph of the " 9515 "Again, it's easier to see what has happened by looking at a graph of the "
9524 "revision history, in figure <xref endterm=\"fig.undo.backout-manual.caption\" " 9516 "revision history, in <xref linkend=\"fig:undo:backout-manual\"/>. This makes "
9525 "linkend=\"fig.undo.backout-manual\"/>. This makes it clear that when we use " 9517 "it clear that when we use <command role=\"hg-cmd\">hg backout</command> to "
9526 "<command role=\"hg-cmd\">hg backout</command> to back out a change other than " 9518 "back out a change other than the tip, Mercurial adds a new head to the "
9527 "the tip, Mercurial adds a new head to the repository (the change it committed " 9519 "repository (the change it committed is box-shaped)."
9528 "is box-shaped)." 9520 msgstr ""
9529 msgstr "" 9521
9530 9522 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
9531 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9523 #: ../en/ch08-undo.xml:476
9532 #: ../en/ch08-undo.xml:483 9524 msgid "<imageobject><imagedata fileref=\"figs/undo-manual.png\"/></imageobject>"
9533 msgid "" 9525 msgstr ""
9534 "<imageobject><imagedata fileref=\"images/undo-manual.png\"/> </imageobject>" 9526
9535 msgstr "" 9527 #. type: Content of: <book><chapter><sect1><sect2><para>
9536 9528 #: ../en/ch08-undo.xml:481
9537 #. type: Content of: <book><chapter><sect1><sect2><para>
9538 #: ../en/ch08-undo.xml:492
9539 msgid "" 9529 msgid ""
9540 "After the <command role=\"hg-cmd\">hg backout</command> command has " 9530 "After the <command role=\"hg-cmd\">hg backout</command> command has "
9541 "completed, it leaves the new <quote>backout</quote> changeset as the parent " 9531 "completed, it leaves the new <quote>backout</quote> changeset as the parent "
9542 "of the working directory." 9532 "of the working directory."
9543 msgstr "" 9533 msgstr ""
9544 9534
9545 #. type: Content of: <book><chapter><sect1><sect2><para> 9535 #. type: Content of: <book><chapter><sect1><sect2><para>
9546 #: ../en/ch08-undo.xml:499 9536 #: ../en/ch08-undo.xml:488
9547 msgid "Now we have two isolated sets of changes." 9537 msgid "Now we have two isolated sets of changes."
9548 msgstr "" 9538 msgstr ""
9549 9539
9550 #. type: Content of: <book><chapter><sect1><sect2><para> 9540 #. type: Content of: <book><chapter><sect1><sect2><para>
9551 #: ../en/ch08-undo.xml:503 9541 #: ../en/ch08-undo.xml:492
9552 msgid "" 9542 msgid ""
9553 "Let's think about what we expect to see as the contents of <filename>myfile</" 9543 "Let's think about what we expect to see as the contents of <filename>myfile</"
9554 "filename> now. The first change should be present, because we've never " 9544 "filename> now. The first change should be present, because we've never "
9555 "backed it out. The second change should be missing, as that's the change we " 9545 "backed it out. The second change should be missing, as that's the change we "
9556 "backed out. Since the history graph shows the third change as a separate " 9546 "backed out. Since the history graph shows the third change as a separate "
9557 "head, we <emphasis>don't</emphasis> expect to see the third change present in " 9547 "head, we <emphasis>don't</emphasis> expect to see the third change present in "
9558 "<filename>myfile</filename>." 9548 "<filename>myfile</filename>."
9559 msgstr "" 9549 msgstr ""
9560 9550
9561 #. type: Content of: <book><chapter><sect1><sect2><para> 9551 #. type: Content of: <book><chapter><sect1><sect2><para>
9562 #: ../en/ch08-undo.xml:513 9552 #: ../en/ch08-undo.xml:502
9563 msgid "" 9553 msgid ""
9564 "To get the third change back into the file, we just do a normal merge of our " 9554 "To get the third change back into the file, we just do a normal merge of our "
9565 "two heads." 9555 "two heads."
9566 msgstr "" 9556 msgstr ""
9567 9557
9568 #. type: Content of: <book><chapter><sect1><sect2><para> 9558 #. type: Content of: <book><chapter><sect1><sect2><para>
9569 #: ../en/ch08-undo.xml:518 9559 #: ../en/ch08-undo.xml:507
9570 msgid "" 9560 msgid ""
9571 "Afterwards, the graphical history of our repository looks like figure <xref " 9561 "Afterwards, the graphical history of our repository looks like <xref linkend="
9572 "endterm=\"fig.undo.backout-manual-merge.caption\" linkend=\"fig.undo.backout-" 9562 "\"fig:undo:backout-manual-merge\"/>."
9573 "manual-merge\"/>." 9563 msgstr ""
9574 msgstr "" 9564
9575 9565 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
9576 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9566 #: ../en/ch08-undo.xml:512
9577 #: ../en/ch08-undo.xml:525
9578 msgid ""
9579 "<imageobject><imagedata fileref=\"images/undo-manual-merge.png\"/> </"
9580 "imageobject>"
9581 msgstr ""
9582
9583 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9584 #: ../en/ch08-undo.xml:528
9585 msgid "Manually merging a backout change" 9567 msgid "Manually merging a backout change"
9586 msgstr "" 9568 msgstr ""
9587 9569
9570 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
9571 #: ../en/ch08-undo.xml:514
9572 msgid ""
9573 "<imageobject><imagedata fileref=\"figs/undo-manual-merge.png\"/></imageobject>"
9574 msgstr ""
9575
9588 #. type: Content of: <book><chapter><sect1><sect2><title> 9576 #. type: Content of: <book><chapter><sect1><sect2><title>
9589 #: ../en/ch08-undo.xml:535 9577 #: ../en/ch08-undo.xml:521
9590 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does" 9578 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does"
9591 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕" 9579 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕"
9592 9580
9593 #. type: Content of: <book><chapter><sect1><sect2><para> 9581 #. type: Content of: <book><chapter><sect1><sect2><para>
9594 #: ../en/ch08-undo.xml:538 9582 #: ../en/ch08-undo.xml:524
9595 msgid "" 9583 msgid ""
9596 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</" 9584 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</"
9597 "command> command works." 9585 "command> command works."
9598 msgstr "" 9586 msgstr ""
9599 9587
9600 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9588 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9601 #: ../en/ch08-undo.xml:541 9589 #: ../en/ch08-undo.xml:527
9602 msgid "" 9590 msgid ""
9603 "It ensures that the working directory is <quote>clean</quote>, i.e. that the " 9591 "It ensures that the working directory is <quote>clean</quote>, i.e. that the "
9604 "output of <command role=\"hg-cmd\">hg status</command> would be empty." 9592 "output of <command role=\"hg-cmd\">hg status</command> would be empty."
9605 msgstr "" 9593 msgstr ""
9606 9594
9607 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9595 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9608 #: ../en/ch08-undo.xml:545 9596 #: ../en/ch08-undo.xml:531
9609 msgid "" 9597 msgid ""
9610 "It remembers the current parent of the working directory. Let's call this " 9598 "It remembers the current parent of the working directory. Let's call this "
9611 "changeset <literal>orig</literal>" 9599 "changeset <literal>orig</literal>"
9612 msgstr "" 9600 msgstr ""
9613 9601
9614 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9602 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9615 #: ../en/ch08-undo.xml:549 9603 #: ../en/ch08-undo.xml:535
9616 msgid "" 9604 msgid ""
9617 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to " 9605 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to "
9618 "sync the working directory to the changeset you want to back out. Let's call " 9606 "sync the working directory to the changeset you want to back out. Let's call "
9619 "this changeset <literal>backout</literal>" 9607 "this changeset <literal>backout</literal>"
9620 msgstr "" 9608 msgstr ""
9621 9609
9622 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9610 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9623 #: ../en/ch08-undo.xml:554 9611 #: ../en/ch08-undo.xml:540
9624 msgid "" 9612 msgid ""
9625 "It finds the parent of that changeset. Let's call that changeset " 9613 "It finds the parent of that changeset. Let's call that changeset "
9626 "<literal>parent</literal>." 9614 "<literal>parent</literal>."
9627 msgstr "" 9615 msgstr ""
9628 9616
9629 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9617 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9630 #: ../en/ch08-undo.xml:557 9618 #: ../en/ch08-undo.xml:543
9631 msgid "" 9619 msgid ""
9632 "For each file that the <literal>backout</literal> changeset affected, it does " 9620 "For each file that the <literal>backout</literal> changeset affected, it does "
9633 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on " 9621 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on "
9634 "that file, to restore it to the contents it had before that changeset was " 9622 "that file, to restore it to the contents it had before that changeset was "
9635 "committed." 9623 "committed."
9636 msgstr "" 9624 msgstr ""
9637 9625
9638 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9626 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9639 #: ../en/ch08-undo.xml:564 9627 #: ../en/ch08-undo.xml:550
9640 msgid "" 9628 msgid ""
9641 "It commits the result as a new changeset. This changeset has " 9629 "It commits the result as a new changeset. This changeset has "
9642 "<literal>backout</literal> as its parent." 9630 "<literal>backout</literal> as its parent."
9643 msgstr "" 9631 msgstr ""
9644 9632
9645 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9633 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9646 #: ../en/ch08-undo.xml:568 9634 #: ../en/ch08-undo.xml:554
9647 msgid "" 9635 msgid ""
9648 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the " 9636 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the "
9649 "command line, it merges with <literal>orig</literal>, and commits the result " 9637 "command line, it merges with <literal>orig</literal>, and commits the result "
9650 "of the merge." 9638 "of the merge."
9651 msgstr "" 9639 msgstr ""
9652 9640
9653 #. type: Content of: <book><chapter><sect1><sect2><para> 9641 #. type: Content of: <book><chapter><sect1><sect2><para>
9654 #: ../en/ch08-undo.xml:574 9642 #: ../en/ch08-undo.xml:560
9655 msgid "" 9643 msgid ""
9656 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</" 9644 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</"
9657 "command> command would be to <command role=\"hg-cmd\">hg export</command> the " 9645 "command> command would be to <command role=\"hg-cmd\">hg export</command> the "
9658 "to-be-backed-out changeset as a diff, then use the <option role=\"cmd-opt-" 9646 "to-be-backed-out changeset as a diff, then use the <option role=\"cmd-opt-"
9659 "patch\">--reverse</option> option to the <command>patch</command> command to " 9647 "patch\">--reverse</option> option to the <command>patch</command> command to "
9660 "reverse the effect of the change without fiddling with the working " 9648 "reverse the effect of the change without fiddling with the working "
9661 "directory. This sounds much simpler, but it would not work nearly as well." 9649 "directory. This sounds much simpler, but it would not work nearly as well."
9662 msgstr "" 9650 msgstr ""
9663 9651
9664 #. type: Content of: <book><chapter><sect1><sect2><para> 9652 #. type: Content of: <book><chapter><sect1><sect2><para>
9665 #: ../en/ch08-undo.xml:584 9653 #: ../en/ch08-undo.xml:570
9666 msgid "" 9654 msgid ""
9667 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, " 9655 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, "
9668 "a commit, a merge, and another commit is to give the merge machinery the best " 9656 "a commit, a merge, and another commit is to give the merge machinery the best "
9669 "chance to do a good job when dealing with all the changes <emphasis>between</" 9657 "chance to do a good job when dealing with all the changes <emphasis>between</"
9670 "emphasis> the change you're backing out and the current tip." 9658 "emphasis> the change you're backing out and the current tip."
9671 msgstr "" 9659 msgstr ""
9672 9660
9673 #. type: Content of: <book><chapter><sect1><sect2><para> 9661 #. type: Content of: <book><chapter><sect1><sect2><para>
9674 #: ../en/ch08-undo.xml:591 9662 #: ../en/ch08-undo.xml:577
9675 msgid "" 9663 msgid ""
9676 "If you're backing out a changeset that's 100 revisions back in your project's " 9664 "If you're backing out a changeset that's 100 revisions back in your project's "
9677 "history, the chances that the <command>patch</command> command will be able " 9665 "history, the chances that the <command>patch</command> command will be able "
9678 "to apply a reverse diff cleanly are not good, because intervening changes are " 9666 "to apply a reverse diff cleanly are not good, because intervening changes are "
9679 "likely to have <quote>broken the context</quote> that <command>patch</" 9667 "likely to have <quote>broken the context</quote> that <command>patch</"
9680 "command> uses to determine whether it can apply a patch (if this sounds like " 9668 "command> uses to determine whether it can apply a patch (if this sounds like "
9681 "gibberish, see <xref linkend=\"sec.mq.patch\"/> for a discussion of the " 9669 "gibberish, see <xref linkend=\"sec:mq:patch\"/> for a discussion of the "
9682 "<command>patch</command> command). Also, Mercurial's merge machinery will " 9670 "<command>patch</command> command). Also, Mercurial's merge machinery will "
9683 "handle files and directories being renamed, permission changes, and " 9671 "handle files and directories being renamed, permission changes, and "
9684 "modifications to binary files, none of which <command>patch</command> can " 9672 "modifications to binary files, none of which <command>patch</command> can "
9685 "deal with." 9673 "deal with."
9686 msgstr "" 9674 msgstr ""
9687 9675
9688 #. type: Content of: <book><chapter><sect1><title> 9676 #. type: Content of: <book><chapter><sect1><title>
9689 #: ../en/ch08-undo.xml:608 9677 #: ../en/ch08-undo.xml:594
9690 msgid "Changes that should never have been" 9678 msgid "Changes that should never have been"
9691 msgstr "不该发生的修改" 9679 msgstr "不该发生的修改"
9692 9680
9693 #. type: Content of: <book><chapter><sect1><para> 9681 #. type: Content of: <book><chapter><sect1><para>
9694 #: ../en/ch08-undo.xml:610 9682 #: ../en/ch08-undo.xml:596
9695 msgid "" 9683 msgid ""
9696 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command " 9684 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command "
9697 "is exactly what you need if you want to undo the effects of a change. It " 9685 "is exactly what you need if you want to undo the effects of a change. It "
9698 "leaves a permanent record of exactly what you did, both when committing the " 9686 "leaves a permanent record of exactly what you did, both when committing the "
9699 "original changeset and when you cleaned up after it." 9687 "original changeset and when you cleaned up after it."
9700 msgstr "" 9688 msgstr ""
9701 9689
9702 #. type: Content of: <book><chapter><sect1><para> 9690 #. type: Content of: <book><chapter><sect1><para>
9703 #: ../en/ch08-undo.xml:616 9691 #: ../en/ch08-undo.xml:602
9704 msgid "" 9692 msgid ""
9705 "On rare occasions, though, you may find that you've committed a change that " 9693 "On rare occasions, though, you may find that you've committed a change that "
9706 "really should not be present in the repository at all. For example, it would " 9694 "really should not be present in the repository at all. For example, it would "
9707 "be very unusual, and usually considered a mistake, to commit a software " 9695 "be very unusual, and usually considered a mistake, to commit a software "
9708 "project's object files as well as its source files. Object files have almost " 9696 "project's object files as well as its source files. Object files have almost "
9710 "the size of the repository and the amount of time it takes to clone or pull " 9698 "the size of the repository and the amount of time it takes to clone or pull "
9711 "changes." 9699 "changes."
9712 msgstr "" 9700 msgstr ""
9713 9701
9714 #. type: Content of: <book><chapter><sect1><para> 9702 #. type: Content of: <book><chapter><sect1><para>
9715 #: ../en/ch08-undo.xml:625 9703 #: ../en/ch08-undo.xml:611
9716 msgid "" 9704 msgid ""
9717 "Before I discuss the options that you have if you commit a <quote>brown paper " 9705 "Before I discuss the options that you have if you commit a <quote>brown paper "
9718 "bag</quote> change (the kind that's so bad that you want to pull a brown " 9706 "bag</quote> change (the kind that's so bad that you want to pull a brown "
9719 "paper bag over your head), let me first discuss some approaches that probably " 9707 "paper bag over your head), let me first discuss some approaches that probably "
9720 "won't work." 9708 "won't work."
9721 msgstr "" 9709 msgstr ""
9722 9710
9723 #. type: Content of: <book><chapter><sect1><para> 9711 #. type: Content of: <book><chapter><sect1><para>
9724 #: ../en/ch08-undo.xml:630 9712 #: ../en/ch08-undo.xml:616
9725 msgid "" 9713 msgid ""
9726 "Since Mercurial treats history as accumulative&emdash;every change builds on " 9714 "Since Mercurial treats history as accumulative&emdash;every change builds on "
9727 "top of all changes that preceded it&emdash;you generally can't just make " 9715 "top of all changes that preceded it&emdash;you generally can't just make "
9728 "disastrous changes disappear. The one exception is when you've just " 9716 "disastrous changes disappear. The one exception is when you've just "
9729 "committed a change, and it hasn't been pushed or pulled into another " 9717 "committed a change, and it hasn't been pushed or pulled into another "
9730 "repository. That's when you can safely use the <command role=\"hg-cmd\">hg " 9718 "repository. That's when you can safely use the <command role=\"hg-cmd\">hg "
9731 "rollback</command> command, as I detailed in section <xref linkend=\"sec.undo." 9719 "rollback</command> command, as I detailed in <xref linkend=\"sec:undo:rollback"
9732 "rollback\"/>." 9720 "\"/>."
9733 msgstr "" 9721 msgstr ""
9734 9722
9735 #. type: Content of: <book><chapter><sect1><para> 9723 #. type: Content of: <book><chapter><sect1><para>
9736 #: ../en/ch08-undo.xml:639 9724 #: ../en/ch08-undo.xml:625
9737 msgid "" 9725 msgid ""
9738 "After you've pushed a bad change to another repository, you <emphasis>could</" 9726 "After you've pushed a bad change to another repository, you <emphasis>could</"
9739 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make " 9727 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make "
9740 "your local copy of the change disappear, but it won't have the consequences " 9728 "your local copy of the change disappear, but it won't have the consequences "
9741 "you want. The change will still be present in the remote repository, so it " 9729 "you want. The change will still be present in the remote repository, so it "
9742 "will reappear in your local repository the next time you pull." 9730 "will reappear in your local repository the next time you pull."
9743 msgstr "" 9731 msgstr ""
9744 9732
9745 #. type: Content of: <book><chapter><sect1><para> 9733 #. type: Content of: <book><chapter><sect1><para>
9746 #: ../en/ch08-undo.xml:647 9734 #: ../en/ch08-undo.xml:633
9747 msgid "" 9735 msgid ""
9748 "If a situation like this arises, and you know which repositories your bad " 9736 "If a situation like this arises, and you know which repositories your bad "
9749 "change has propagated into, you can <emphasis>try</emphasis> to get rid of " 9737 "change has propagated into, you can <emphasis>try</emphasis> to get rid of "
9750 "the changeefrom <emphasis>every</emphasis> one of those repositories. This " 9738 "the changeefrom <emphasis>every</emphasis> one of those repositories. This "
9751 "is, of course, not a satisfactory solution: if you miss even a single " 9739 "is, of course, not a satisfactory solution: if you miss even a single "
9752 "repository while you're expunging, the change is still <quote>in the wild</" 9740 "repository while you're expunging, the change is still <quote>in the wild</"
9753 "quote>, and could propagate further." 9741 "quote>, and could propagate further."
9754 msgstr "" 9742 msgstr ""
9755 9743
9756 #. type: Content of: <book><chapter><sect1><para> 9744 #. type: Content of: <book><chapter><sect1><para>
9757 #: ../en/ch08-undo.xml:655 9745 #: ../en/ch08-undo.xml:641
9758 msgid "" 9746 msgid ""
9759 "If you've committed one or more changes <emphasis>after</emphasis> the change " 9747 "If you've committed one or more changes <emphasis>after</emphasis> the change "
9760 "that you'd like to see disappear, your options are further reduced. Mercurial " 9748 "that you'd like to see disappear, your options are further reduced. Mercurial "
9761 "doesn't provide a way to <quote>punch a hole</quote> in history, leaving " 9749 "doesn't provide a way to <quote>punch a hole</quote> in history, leaving "
9762 "changesets intact." 9750 "changesets intact."
9763 msgstr "" 9751 msgstr ""
9764 9752
9765 #. type: Content of: <book><chapter><sect1><para> 9753 #. type: Content of: <book><chapter><sect1><para>
9766 #: ../en/ch08-undo.xml:661 9754 #: ../en/ch08-undo.xml:647
9767 msgid "" 9755 msgid ""
9768 "XXX This needs filling out. The <literal>hg-replay</literal> script in the " 9756 "XXX This needs filling out. The <literal>hg-replay</literal> script in the "
9769 "<literal>examples</literal> directory works, but doesn't handle merge " 9757 "<literal>examples</literal> directory works, but doesn't handle merge "
9770 "changesets. Kind of an important omission." 9758 "changesets. Kind of an important omission."
9771 msgstr "" 9759 msgstr ""
9772 9760
9773 #. type: Content of: <book><chapter><sect1><sect2><title> 9761 #. type: Content of: <book><chapter><sect1><sect2><title>
9774 #: ../en/ch08-undo.xml:667 9762 #: ../en/ch08-undo.xml:653
9775 msgid "Protect yourself from <quote>escaped</quote> changes" 9763 msgid "Protect yourself from <quote>escaped</quote> changes"
9776 msgstr "使用<quote>校验</quote>修改来保护你自己" 9764 msgstr "使用<quote>校验</quote>修改来保护你自己"
9777 9765
9778 #. type: Content of: <book><chapter><sect1><sect2><para> 9766 #. type: Content of: <book><chapter><sect1><sect2><para>
9779 #: ../en/ch08-undo.xml:670 9767 #: ../en/ch08-undo.xml:656
9780 msgid "" 9768 msgid ""
9781 "If you've committed some changes to your local repository and they've been " 9769 "If you've committed some changes to your local repository and they've been "
9782 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can " 9770 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can "
9783 "protect yourself ahead of time against some classes of bad changeset. This " 9771 "protect yourself ahead of time against some classes of bad changeset. This "
9784 "is particularly easy if your team usually pulls changes from a central " 9772 "is particularly easy if your team usually pulls changes from a central "
9785 "repository." 9773 "repository."
9786 msgstr "" 9774 msgstr ""
9787 9775
9788 #. type: Content of: <book><chapter><sect1><sect2><para> 9776 #. type: Content of: <book><chapter><sect1><sect2><para>
9789 #: ../en/ch08-undo.xml:677 9777 #: ../en/ch08-undo.xml:663
9790 msgid "" 9778 msgid ""
9791 "By configuring some hooks on that repository to validate incoming changesets " 9779 "By configuring some hooks on that repository to validate incoming changesets "
9792 "(see chapter <xref linkend=\"chap.hook\"/>), you can automatically prevent " 9780 "(see chapter <xref linkend=\"chap:hook\"/>), you can automatically prevent "
9793 "some kinds of bad changeset from being pushed to the central repository at " 9781 "some kinds of bad changeset from being pushed to the central repository at "
9794 "all. With such a configuration in place, some kinds of bad changeset will " 9782 "all. With such a configuration in place, some kinds of bad changeset will "
9795 "naturally tend to <quote>die out</quote> because they can't propagate into " 9783 "naturally tend to <quote>die out</quote> because they can't propagate into "
9796 "the central repository. Better yet, this happens without any need for " 9784 "the central repository. Better yet, this happens without any need for "
9797 "explicit intervention." 9785 "explicit intervention."
9798 msgstr "" 9786 msgstr ""
9799 9787
9800 #. type: Content of: <book><chapter><sect1><sect2><para> 9788 #. type: Content of: <book><chapter><sect1><sect2><para>
9801 #: ../en/ch08-undo.xml:687 9789 #: ../en/ch08-undo.xml:673
9802 msgid "" 9790 msgid ""
9803 "For instance, an incoming change hook that verifies that a changeset will " 9791 "For instance, an incoming change hook that verifies that a changeset will "
9804 "actually compile can prevent people from inadvertantly <quote>breaking the " 9792 "actually compile can prevent people from inadvertantly <quote>breaking the "
9805 "build</quote>." 9793 "build</quote>."
9806 msgstr "" 9794 msgstr ""
9807 9795
9808 #. type: Content of: <book><chapter><sect1><title> 9796 #. type: Content of: <book><chapter><sect1><title>
9809 #: ../en/ch08-undo.xml:694 9797 #: ../en/ch08-undo.xml:680
9810 msgid "Finding the source of a bug" 9798 msgid "Finding the source of a bug"
9811 msgstr "查找问题的根源" 9799 msgstr "查找问题的根源"
9812 9800
9813 #. type: Content of: <book><chapter><sect1><para> 9801 #. type: Content of: <book><chapter><sect1><para>
9814 #: ../en/ch08-undo.xml:696 9802 #: ../en/ch08-undo.xml:682
9815 msgid "" 9803 msgid ""
9816 "While it's all very well to be able to back out a changeset that introduced a " 9804 "While it's all very well to be able to back out a changeset that introduced a "
9817 "bug, this requires that you know which changeset to back out. Mercurial " 9805 "bug, this requires that you know which changeset to back out. Mercurial "
9818 "provides an invaluable command, called <command role=\"hg-cmd\">hg bisect</" 9806 "provides an invaluable command, called <command role=\"hg-cmd\">hg bisect</"
9819 "command>, that helps you to automate this process and accomplish it very " 9807 "command>, that helps you to automate this process and accomplish it very "
9820 "efficiently." 9808 "efficiently."
9821 msgstr "" 9809 msgstr ""
9822 9810
9823 #. type: Content of: <book><chapter><sect1><para> 9811 #. type: Content of: <book><chapter><sect1><para>
9824 #: ../en/ch08-undo.xml:703 9812 #: ../en/ch08-undo.xml:689
9825 msgid "" 9813 msgid ""
9826 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is " 9814 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is "
9827 "that a changeset has introduced some change of behaviour that you can " 9815 "that a changeset has introduced some change of behaviour that you can "
9828 "identify with a simple binary test. You don't know which piece of code " 9816 "identify with a simple binary test. You don't know which piece of code "
9829 "introduced the change, but you know how to test for the presence of the bug. " 9817 "introduced the change, but you know how to test for the presence of the bug. "
9831 "direct its search for the changeset that introduced the code that caused the " 9819 "direct its search for the changeset that introduced the code that caused the "
9832 "bug." 9820 "bug."
9833 msgstr "" 9821 msgstr ""
9834 9822
9835 #. type: Content of: <book><chapter><sect1><para> 9823 #. type: Content of: <book><chapter><sect1><para>
9836 #: ../en/ch08-undo.xml:712 9824 #: ../en/ch08-undo.xml:698
9837 msgid "" 9825 msgid ""
9838 "Here are a few scenarios to help you understand how you might apply this " 9826 "Here are a few scenarios to help you understand how you might apply this "
9839 "command." 9827 "command."
9840 msgstr "" 9828 msgstr ""
9841 9829
9842 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9830 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9843 #: ../en/ch08-undo.xml:715 9831 #: ../en/ch08-undo.xml:701
9844 msgid "" 9832 msgid ""
9845 "The most recent version of your software has a bug that you remember wasn't " 9833 "The most recent version of your software has a bug that you remember wasn't "
9846 "present a few weeks ago, but you don't know when it was introduced. Here, " 9834 "present a few weeks ago, but you don't know when it was introduced. Here, "
9847 "your binary test checks for the presence of that bug." 9835 "your binary test checks for the presence of that bug."
9848 msgstr "" 9836 msgstr ""
9849 9837
9850 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9838 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9851 #: ../en/ch08-undo.xml:720 9839 #: ../en/ch08-undo.xml:706
9852 msgid "" 9840 msgid ""
9853 "You fixed a bug in a rush, and now it's time to close the entry in your " 9841 "You fixed a bug in a rush, and now it's time to close the entry in your "
9854 "team's bug database. The bug database requires a changeset ID when you close " 9842 "team's bug database. The bug database requires a changeset ID when you close "
9855 "an entry, but you don't remember which changeset you fixed the bug in. Once " 9843 "an entry, but you don't remember which changeset you fixed the bug in. Once "
9856 "again, your binary test checks for the presence of the bug." 9844 "again, your binary test checks for the presence of the bug."
9857 msgstr "" 9845 msgstr ""
9858 9846
9859 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9847 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9860 #: ../en/ch08-undo.xml:727 9848 #: ../en/ch08-undo.xml:713
9861 msgid "" 9849 msgid ""
9862 "Your software works correctly, but runs 15% slower than the last time you " 9850 "Your software works correctly, but runs 15% slower than the last time you "
9863 "measured it. You want to know which changeset introduced the performance " 9851 "measured it. You want to know which changeset introduced the performance "
9864 "regression. In this case, your binary test measures the performance of your " 9852 "regression. In this case, your binary test measures the performance of your "
9865 "software, to see whether it's <quote>fast</quote> or <quote>slow</quote>." 9853 "software, to see whether it's <quote>fast</quote> or <quote>slow</quote>."
9866 msgstr "" 9854 msgstr ""
9867 9855
9868 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9856 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9869 #: ../en/ch08-undo.xml:734 9857 #: ../en/ch08-undo.xml:720
9870 msgid "" 9858 msgid ""
9871 "The sizes of the components of your project that you ship exploded recently, " 9859 "The sizes of the components of your project that you ship exploded recently, "
9872 "and you suspect that something changed in the way you build your project." 9860 "and you suspect that something changed in the way you build your project."
9873 msgstr "" 9861 msgstr ""
9874 9862
9875 #. type: Content of: <book><chapter><sect1><para> 9863 #. type: Content of: <book><chapter><sect1><para>
9876 #: ../en/ch08-undo.xml:739 9864 #: ../en/ch08-undo.xml:725
9877 msgid "" 9865 msgid ""
9878 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg " 9866 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg "
9879 "bisect</command> command is not useful only for finding the sources of bugs. " 9867 "bisect</command> command is not useful only for finding the sources of bugs. "
9880 "You can use it to find any <quote>emergent property</quote> of a repository " 9868 "You can use it to find any <quote>emergent property</quote> of a repository "
9881 "(anything that you can't find from a simple text search of the files in the " 9869 "(anything that you can't find from a simple text search of the files in the "
9882 "tree) for which you can write a binary test." 9870 "tree) for which you can write a binary test."
9883 msgstr "" 9871 msgstr ""
9884 9872
9885 #. type: Content of: <book><chapter><sect1><para> 9873 #. type: Content of: <book><chapter><sect1><para>
9886 #: ../en/ch08-undo.xml:746 9874 #: ../en/ch08-undo.xml:732
9887 msgid "" 9875 msgid ""
9888 "We'll introduce a little bit of terminology here, just to make it clear which " 9876 "We'll introduce a little bit of terminology here, just to make it clear which "
9889 "parts of the search process are your responsibility, and which are " 9877 "parts of the search process are your responsibility, and which are "
9890 "Mercurial's. A <emphasis>test</emphasis> is something that <emphasis>you</" 9878 "Mercurial's. A <emphasis>test</emphasis> is something that <emphasis>you</"
9891 "emphasis> run when <command role=\"hg-cmd\">hg bisect</command> chooses a " 9879 "emphasis> run when <command role=\"hg-cmd\">hg bisect</command> chooses a "
9895 "the phrase <quote>search using the <command role=\"hg-cmd\">hg bisect</" 9883 "the phrase <quote>search using the <command role=\"hg-cmd\">hg bisect</"
9896 "command> command</quote>." 9884 "command> command</quote>."
9897 msgstr "" 9885 msgstr ""
9898 9886
9899 #. type: Content of: <book><chapter><sect1><para> 9887 #. type: Content of: <book><chapter><sect1><para>
9900 #: ../en/ch08-undo.xml:759 9888 #: ../en/ch08-undo.xml:745
9901 msgid "" 9889 msgid ""
9902 "One simple way to automate the searching process would be simply to probe " 9890 "One simple way to automate the searching process would be simply to probe "
9903 "every changeset. However, this scales poorly. If it took ten minutes to " 9891 "every changeset. However, this scales poorly. If it took ten minutes to "
9904 "test a single changeset, and you had 10,000 changesets in your repository, " 9892 "test a single changeset, and you had 10,000 changesets in your repository, "
9905 "the exhaustive approach would take on average 35 <emphasis>days</emphasis> to " 9893 "the exhaustive approach would take on average 35 <emphasis>days</emphasis> to "
9908 "those, you'd still be looking at over 40 hours to find the changeset that " 9896 "those, you'd still be looking at over 40 hours to find the changeset that "
9909 "introduced your bug." 9897 "introduced your bug."
9910 msgstr "" 9898 msgstr ""
9911 9899
9912 #. type: Content of: <book><chapter><sect1><para> 9900 #. type: Content of: <book><chapter><sect1><para>
9913 #: ../en/ch08-undo.xml:769 9901 #: ../en/ch08-undo.xml:755
9914 msgid "" 9902 msgid ""
9915 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its " 9903 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its "
9916 "knowledge of the <quote>shape</quote> of your project's revision history to " 9904 "knowledge of the <quote>shape</quote> of your project's revision history to "
9917 "perform a search in time proportional to the <emphasis>logarithm</emphasis> " 9905 "perform a search in time proportional to the <emphasis>logarithm</emphasis> "
9918 "of the number of changesets to check (the kind of search it performs is " 9906 "of the number of changesets to check (the kind of search it performs is "
9921 "search will require about 14 tests). Limit your search to the last hundred " 9909 "search will require about 14 tests). Limit your search to the last hundred "
9922 "changesets, and it will take only about an hour (roughly seven tests)." 9910 "changesets, and it will take only about an hour (roughly seven tests)."
9923 msgstr "" 9911 msgstr ""
9924 9912
9925 #. type: Content of: <book><chapter><sect1><para> 9913 #. type: Content of: <book><chapter><sect1><para>
9926 #: ../en/ch08-undo.xml:780 9914 #: ../en/ch08-undo.xml:766
9927 msgid "" 9915 msgid ""
9928 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the " 9916 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the "
9929 "<quote>branchy</quote> nature of a Mercurial project's revision history, so " 9917 "<quote>branchy</quote> nature of a Mercurial project's revision history, so "
9930 "it has no problems dealing with branches, merges, or multiple heads in a " 9918 "it has no problems dealing with branches, merges, or multiple heads in a "
9931 "repository. It can prune entire branches of history with a single probe, " 9919 "repository. It can prune entire branches of history with a single probe, "
9932 "which is how it operates so efficiently." 9920 "which is how it operates so efficiently."
9933 msgstr "" 9921 msgstr ""
9934 9922
9935 #. type: Content of: <book><chapter><sect1><sect2><title> 9923 #. type: Content of: <book><chapter><sect1><sect2><title>
9936 #: ../en/ch08-undo.xml:788 9924 #: ../en/ch08-undo.xml:774
9937 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command" 9925 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command"
9938 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 9926 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>"
9939 9927
9940 #. type: Content of: <book><chapter><sect1><sect2><para> 9928 #. type: Content of: <book><chapter><sect1><sect2><para>
9941 #: ../en/ch08-undo.xml:791 9929 #: ../en/ch08-undo.xml:777
9942 msgid "" 9930 msgid ""
9943 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action." 9931 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action."
9944 msgstr "" 9932 msgstr ""
9945 9933
9946 #. type: Content of: <book><chapter><sect1><sect2><note><para> 9934 #. type: Content of: <book><chapter><sect1><sect2><note><para>
9947 #: ../en/ch08-undo.xml:795 9935 #: ../en/ch08-undo.xml:781
9948 msgid "" 9936 msgid ""
9949 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg " 9937 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg "
9950 "bisect</command> was not a core command: it was distributed with Mercurial as " 9938 "bisect</command> was not a core command: it was distributed with Mercurial as "
9951 "an extension. This section describes the built-in command, not the old " 9939 "an extension. This section describes the built-in command, not the old "
9952 "extension." 9940 "extension."
9953 msgstr "" 9941 msgstr ""
9954 9942
9955 #. type: Content of: <book><chapter><sect1><sect2><para> 9943 #. type: Content of: <book><chapter><sect1><sect2><para>
9956 #: ../en/ch08-undo.xml:802 9944 #: ../en/ch08-undo.xml:788
9957 msgid "" 9945 msgid ""
9958 "Now let's create a repository, so that we can try out the <command role=\"hg-" 9946 "Now let's create a repository, so that we can try out the <command role=\"hg-"
9959 "cmd\">hg bisect</command> command in isolation." 9947 "cmd\">hg bisect</command> command in isolation."
9960 msgstr "" 9948 msgstr ""
9961 9949
9962 #. type: Content of: <book><chapter><sect1><sect2><para> 9950 #. type: Content of: <book><chapter><sect1><sect2><para>
9963 #: ../en/ch08-undo.xml:808 9951 #: ../en/ch08-undo.xml:794
9964 msgid "" 9952 msgid ""
9965 "We'll simulate a project that has a bug in it in a simple-minded way: create " 9953 "We'll simulate a project that has a bug in it in a simple-minded way: create "
9966 "trivial changes in a loop, and nominate one specific change that will have " 9954 "trivial changes in a loop, and nominate one specific change that will have "
9967 "the <quote>bug</quote>. This loop creates 35 changesets, each adding a " 9955 "the <quote>bug</quote>. This loop creates 35 changesets, each adding a "
9968 "single file to the repository. We'll represent our <quote>bug</quote> with a " 9956 "single file to the repository. We'll represent our <quote>bug</quote> with a "
9969 "file that contains the text <quote>i have a gub</quote>." 9957 "file that contains the text <quote>i have a gub</quote>."
9970 msgstr "" 9958 msgstr ""
9971 9959
9972 #. type: Content of: <book><chapter><sect1><sect2><para> 9960 #. type: Content of: <book><chapter><sect1><sect2><para>
9973 #: ../en/ch08-undo.xml:818 9961 #: ../en/ch08-undo.xml:804
9974 msgid "" 9962 msgid ""
9975 "The next thing that we'd like to do is figure out how to use the <command " 9963 "The next thing that we'd like to do is figure out how to use the <command "
9976 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal " 9964 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal "
9977 "built-in help mechanism for this." 9965 "built-in help mechanism for this."
9978 msgstr "" 9966 msgstr ""
9979 9967
9980 #. type: Content of: <book><chapter><sect1><sect2><para> 9968 #. type: Content of: <book><chapter><sect1><sect2><para>
9981 #: ../en/ch08-undo.xml:825 9969 #: ../en/ch08-undo.xml:811
9982 msgid "" 9970 msgid ""
9983 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. " 9971 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. "
9984 "Each step proceeds as follows." 9972 "Each step proceeds as follows."
9985 msgstr "" 9973 msgstr ""
9986 9974
9987 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9975 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9988 #: ../en/ch08-undo.xml:828 9976 #: ../en/ch08-undo.xml:814
9989 msgid "You run your binary test." 9977 msgid "You run your binary test."
9990 msgstr "" 9978 msgstr ""
9991 9979
9992 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 9980 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
9993 #: ../en/ch08-undo.xml:830 9981 #: ../en/ch08-undo.xml:816
9994 msgid "" 9982 msgid ""
9995 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> " 9983 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> "
9996 "by running the <command role=\"hg-cmd\">hg bisect good</command> command." 9984 "by running the <command role=\"hg-cmd\">hg bisect good</command> command."
9997 msgstr "" 9985 msgstr ""
9998 9986
9999 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 9987 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
10000 #: ../en/ch08-undo.xml:835 9988 #: ../en/ch08-undo.xml:821
10001 msgid "" 9989 msgid ""
10002 "If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> " 9990 "If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> "
10003 "command." 9991 "command."
10004 msgstr "" 9992 msgstr ""
10005 9993
10006 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9994 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
10007 #: ../en/ch08-undo.xml:839 9995 #: ../en/ch08-undo.xml:825
10008 msgid "" 9996 msgid ""
10009 "The command uses your information to decide which changeset to test next." 9997 "The command uses your information to decide which changeset to test next."
10010 msgstr "" 9998 msgstr ""
10011 9999
10012 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 10000 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
10013 #: ../en/ch08-undo.xml:842 10001 #: ../en/ch08-undo.xml:828
10014 msgid "" 10002 msgid ""
10015 "It updates the working directory to that changeset, and the process begins " 10003 "It updates the working directory to that changeset, and the process begins "
10016 "again." 10004 "again."
10017 msgstr "" 10005 msgstr ""
10018 10006
10019 #. type: Content of: <book><chapter><sect1><sect2><para> 10007 #. type: Content of: <book><chapter><sect1><sect2><para>
10020 #: ../en/ch08-undo.xml:845 10008 #: ../en/ch08-undo.xml:831
10021 msgid "" 10009 msgid ""
10022 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies " 10010 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies "
10023 "a unique changeset that marks the point where your test transitioned from " 10011 "a unique changeset that marks the point where your test transitioned from "
10024 "<quote>succeeding</quote> to <quote>failing</quote>." 10012 "<quote>succeeding</quote> to <quote>failing</quote>."
10025 msgstr "" 10013 msgstr ""
10026 10014
10027 # 10015 #
10028 #. type: Content of: <book><chapter><sect1><sect2><para> 10016 #. type: Content of: <book><chapter><sect1><sect2><para>
10029 #: ../en/ch08-undo.xml:850 10017 #: ../en/ch08-undo.xml:836
10030 msgid "" 10018 msgid ""
10031 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --" 10019 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --"
10032 "reset</command> command." 10020 "reset</command> command."
10033 msgstr "" 10021 msgstr ""
10034 10022
10035 #. type: Content of: <book><chapter><sect1><sect2><para> 10023 #. type: Content of: <book><chapter><sect1><sect2><para>
10036 #: ../en/ch08-undo.xml:855 10024 #: ../en/ch08-undo.xml:841
10037 msgid "" 10025 msgid ""
10038 "In our case, the binary test we use is simple: we check to see if any file in " 10026 "In our case, the binary test we use is simple: we check to see if any file in "
10039 "the repository contains the string <quote>i have a gub</quote>. If it does, " 10027 "the repository contains the string <quote>i have a gub</quote>. If it does, "
10040 "this changeset contains the change that <quote>caused the bug</quote>. By " 10028 "this changeset contains the change that <quote>caused the bug</quote>. By "
10041 "convention, a changeset that has the property we're searching for is " 10029 "convention, a changeset that has the property we're searching for is "
10042 "<quote>bad</quote>, while one that doesn't is <quote>good</quote>." 10030 "<quote>bad</quote>, while one that doesn't is <quote>good</quote>."
10043 msgstr "" 10031 msgstr ""
10044 10032
10045 #. type: Content of: <book><chapter><sect1><sect2><para> 10033 #. type: Content of: <book><chapter><sect1><sect2><para>
10046 #: ../en/ch08-undo.xml:863 10034 #: ../en/ch08-undo.xml:849
10047 msgid "" 10035 msgid ""
10048 "Most of the time, the revision to which the working directory is synced " 10036 "Most of the time, the revision to which the working directory is synced "
10049 "(usually the tip) already exhibits the problem introduced by the buggy " 10037 "(usually the tip) already exhibits the problem introduced by the buggy "
10050 "change, so we'll mark it as <quote>bad</quote>." 10038 "change, so we'll mark it as <quote>bad</quote>."
10051 msgstr "" 10039 msgstr ""
10052 10040
10053 # 10041 #
10054 #. type: Content of: <book><chapter><sect1><sect2><para> 10042 #. type: Content of: <book><chapter><sect1><sect2><para>
10055 #: ../en/ch08-undo.xml:870 10043 #: ../en/ch08-undo.xml:856
10056 msgid "" 10044 msgid ""
10057 "Our next task is to nominate a changeset that we know <emphasis>doesn't</" 10045 "Our next task is to nominate a changeset that we know <emphasis>doesn't</"
10058 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> " 10046 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> "
10059 "command will <quote>bracket</quote> its search between the first pair of good " 10047 "command will <quote>bracket</quote> its search between the first pair of good "
10060 "and bad changesets. In our case, we know that revision 10 didn't have the " 10048 "and bad changesets. In our case, we know that revision 10 didn't have the "
10061 "bug. (I'll have more words about choosing the first <quote>good</quote> " 10049 "bug. (I'll have more words about choosing the first <quote>good</quote> "
10062 "changeset later.)" 10050 "changeset later.)"
10063 msgstr "" 10051 msgstr ""
10064 10052
10065 #. type: Content of: <book><chapter><sect1><sect2><para> 10053 #. type: Content of: <book><chapter><sect1><sect2><para>
10066 #: ../en/ch08-undo.xml:880 10054 #: ../en/ch08-undo.xml:866
10067 msgid "Notice that this command printed some output." 10055 msgid "Notice that this command printed some output."
10068 msgstr "" 10056 msgstr ""
10069 10057
10070 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10058 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10071 #: ../en/ch08-undo.xml:882 10059 #: ../en/ch08-undo.xml:868
10072 msgid "" 10060 msgid ""
10073 "It told us how many changesets it must consider before it can identify the " 10061 "It told us how many changesets it must consider before it can identify the "
10074 "one that introduced the bug, and how many tests that will require." 10062 "one that introduced the bug, and how many tests that will require."
10075 msgstr "" 10063 msgstr ""
10076 10064
10077 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10065 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10078 #: ../en/ch08-undo.xml:886 10066 #: ../en/ch08-undo.xml:872
10079 msgid "" 10067 msgid ""
10080 "It updated the working directory to the next changeset to test, and told us " 10068 "It updated the working directory to the next changeset to test, and told us "
10081 "which changeset it's testing." 10069 "which changeset it's testing."
10082 msgstr "" 10070 msgstr ""
10083 10071
10084 #. type: Content of: <book><chapter><sect1><sect2><para> 10072 #. type: Content of: <book><chapter><sect1><sect2><para>
10085 #: ../en/ch08-undo.xml:891 10073 #: ../en/ch08-undo.xml:877
10086 msgid "" 10074 msgid ""
10087 "We now run our test in the working directory. We use the <command>grep</" 10075 "We now run our test in the working directory. We use the <command>grep</"
10088 "command> command to see if our <quote>bad</quote> file is present in the " 10076 "command> command to see if our <quote>bad</quote> file is present in the "
10089 "working directory. If it is, this revision is bad; if not, this revision is " 10077 "working directory. If it is, this revision is bad; if not, this revision is "
10090 "good. &interaction.bisect.search.step1;" 10078 "good. &interaction.bisect.search.step1;"
10091 msgstr "" 10079 msgstr ""
10092 10080
10093 #. type: Content of: <book><chapter><sect1><sect2><para> 10081 #. type: Content of: <book><chapter><sect1><sect2><para>
10094 #: ../en/ch08-undo.xml:897 10082 #: ../en/ch08-undo.xml:883
10095 msgid "" 10083 msgid ""
10096 "This test looks like a perfect candidate for automation, so let's turn it " 10084 "This test looks like a perfect candidate for automation, so let's turn it "
10097 "into a shell function." 10085 "into a shell function."
10098 msgstr "" 10086 msgstr ""
10099 10087
10100 #. type: Content of: <book><chapter><sect1><sect2><para> 10088 #. type: Content of: <book><chapter><sect1><sect2><para>
10101 #: ../en/ch08-undo.xml:901 10089 #: ../en/ch08-undo.xml:887
10102 msgid "" 10090 msgid ""
10103 "We can now run an entire test step with a single command, <literal>mytest</" 10091 "We can now run an entire test step with a single command, <literal>mytest</"
10104 "literal>." 10092 "literal>."
10105 msgstr "" 10093 msgstr ""
10106 10094
10107 #. type: Content of: <book><chapter><sect1><sect2><para> 10095 #. type: Content of: <book><chapter><sect1><sect2><para>
10108 #: ../en/ch08-undo.xml:906 10096 #: ../en/ch08-undo.xml:892
10109 msgid "A few more invocations of our canned test step command, and we're done." 10097 msgid "A few more invocations of our canned test step command, and we're done."
10110 msgstr "" 10098 msgstr ""
10111 10099
10112 #. type: Content of: <book><chapter><sect1><sect2><para> 10100 #. type: Content of: <book><chapter><sect1><sect2><para>
10113 #: ../en/ch08-undo.xml:911 10101 #: ../en/ch08-undo.xml:897
10114 msgid "" 10102 msgid ""
10115 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd" 10103 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd"
10116 "\">hg bisect</command> command let us find the changeset that introduced our " 10104 "\">hg bisect</command> command let us find the changeset that introduced our "
10117 "<quote>bug</quote> with only five tests. Because the number of tests that " 10105 "<quote>bug</quote> with only five tests. Because the number of tests that "
10118 "the <command role=\"hg-cmd\">hg bisect</command> command performs grows " 10106 "the <command role=\"hg-cmd\">hg bisect</command> command performs grows "
10120 "it has over the <quote>brute force</quote> search approach increases with " 10108 "it has over the <quote>brute force</quote> search approach increases with "
10121 "every changeset you add." 10109 "every changeset you add."
10122 msgstr "" 10110 msgstr ""
10123 10111
10124 #. type: Content of: <book><chapter><sect1><sect2><title> 10112 #. type: Content of: <book><chapter><sect1><sect2><title>
10125 #: ../en/ch08-undo.xml:922 10113 #: ../en/ch08-undo.xml:908
10126 msgid "Cleaning up after your search" 10114 msgid "Cleaning up after your search"
10127 msgstr "搜索后的清理" 10115 msgstr "搜索后的清理"
10128 10116
10129 # 10117 #
10130 #. type: Content of: <book><chapter><sect1><sect2><para> 10118 #. type: Content of: <book><chapter><sect1><sect2><para>
10131 #: ../en/ch08-undo.xml:924 10119 #: ../en/ch08-undo.xml:910
10132 msgid "" 10120 msgid ""
10133 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> " 10121 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> "
10134 "command in a repository, you can use the <command role=\"hg-cmd\">hg bisect " 10122 "command in a repository, you can use the <command role=\"hg-cmd\">hg bisect "
10135 "reset</command> command to drop the information it was using to drive your " 10123 "reset</command> command to drop the information it was using to drive your "
10136 "search. The command doesn't use much space, so it doesn't matter if you " 10124 "search. The command doesn't use much space, so it doesn't matter if you "
10138 "command> won't let you start a new search in that repository until you do a " 10126 "command> won't let you start a new search in that repository until you do a "
10139 "<command role=\"hg-cmd\">hg bisect reset</command>." 10127 "<command role=\"hg-cmd\">hg bisect reset</command>."
10140 msgstr "" 10128 msgstr ""
10141 10129
10142 #. type: Content of: <book><chapter><sect1><title> 10130 #. type: Content of: <book><chapter><sect1><title>
10143 #: ../en/ch08-undo.xml:939 10131 #: ../en/ch08-undo.xml:925
10144 msgid "Tips for finding bugs effectively" 10132 msgid "Tips for finding bugs effectively"
10145 msgstr "有效查找问题的技巧" 10133 msgstr "有效查找问题的技巧"
10146 10134
10147 #. type: Content of: <book><chapter><sect1><sect2><title> 10135 #. type: Content of: <book><chapter><sect1><sect2><title>
10148 #: ../en/ch08-undo.xml:942 10136 #: ../en/ch08-undo.xml:928
10149 msgid "Give consistent input" 10137 msgid "Give consistent input"
10150 msgstr "给出一致的输入" 10138 msgstr "给出一致的输入"
10151 10139
10152 #. type: Content of: <book><chapter><sect1><sect2><para> 10140 #. type: Content of: <book><chapter><sect1><sect2><para>
10153 #: ../en/ch08-undo.xml:944 10141 #: ../en/ch08-undo.xml:930
10154 msgid "" 10142 msgid ""
10155 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you " 10143 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you "
10156 "correctly report the result of every test you perform. If you tell it that a " 10144 "correctly report the result of every test you perform. If you tell it that a "
10157 "test failed when it really succeeded, it <emphasis>might</emphasis> be able " 10145 "test failed when it really succeeded, it <emphasis>might</emphasis> be able "
10158 "to detect the inconsistency. If it can identify an inconsistency in your " 10146 "to detect the inconsistency. If it can identify an inconsistency in your "
10160 "However, it can't do this perfectly; it's about as likely to report the wrong " 10148 "However, it can't do this perfectly; it's about as likely to report the wrong "
10161 "changeset as the source of the bug." 10149 "changeset as the source of the bug."
10162 msgstr "" 10150 msgstr ""
10163 10151
10164 #. type: Content of: <book><chapter><sect1><sect2><title> 10152 #. type: Content of: <book><chapter><sect1><sect2><title>
10165 #: ../en/ch08-undo.xml:956 10153 #: ../en/ch08-undo.xml:942
10166 msgid "Automate as much as possible" 10154 msgid "Automate as much as possible"
10167 msgstr "尽量自动" 10155 msgstr "尽量自动"
10168 10156
10169 #. type: Content of: <book><chapter><sect1><sect2><para> 10157 #. type: Content of: <book><chapter><sect1><sect2><para>
10170 #: ../en/ch08-undo.xml:958 10158 #: ../en/ch08-undo.xml:944
10171 msgid "" 10159 msgid ""
10172 "When I started using the <command role=\"hg-cmd\">hg bisect</command> " 10160 "When I started using the <command role=\"hg-cmd\">hg bisect</command> "
10173 "command, I tried a few times to run my tests by hand, on the command line. " 10161 "command, I tried a few times to run my tests by hand, on the command line. "
10174 "This is an approach that I, at least, am not suited to. After a few tries, I " 10162 "This is an approach that I, at least, am not suited to. After a few tries, I "
10175 "found that I was making enough mistakes that I was having to restart my " 10163 "found that I was making enough mistakes that I was having to restart my "
10176 "searches several times before finally getting correct results." 10164 "searches several times before finally getting correct results."
10177 msgstr "" 10165 msgstr ""
10178 10166
10179 #. type: Content of: <book><chapter><sect1><sect2><para> 10167 #. type: Content of: <book><chapter><sect1><sect2><para>
10180 #: ../en/ch08-undo.xml:966 10168 #: ../en/ch08-undo.xml:952
10181 msgid "" 10169 msgid ""
10182 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</" 10170 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</"
10183 "command> command by hand occurred even with simple searches on small " 10171 "command> command by hand occurred even with simple searches on small "
10184 "repositories; if the problem you're looking for is more subtle, or the number " 10172 "repositories; if the problem you're looking for is more subtle, or the number "
10185 "of tests that <command role=\"hg-cmd\">hg bisect</command> must perform " 10173 "of tests that <command role=\"hg-cmd\">hg bisect</command> must perform "
10186 "increases, the likelihood of operator error ruining the search is much " 10174 "increases, the likelihood of operator error ruining the search is much "
10187 "higher. Once I started automating my tests, I had much better results." 10175 "higher. Once I started automating my tests, I had much better results."
10188 msgstr "" 10176 msgstr ""
10189 10177
10190 #. type: Content of: <book><chapter><sect1><sect2><para> 10178 #. type: Content of: <book><chapter><sect1><sect2><para>
10191 #: ../en/ch08-undo.xml:975 10179 #: ../en/ch08-undo.xml:961
10192 msgid "The key to automated testing is twofold:" 10180 msgid "The key to automated testing is twofold:"
10193 msgstr "" 10181 msgstr ""
10194 10182
10195 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10183 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10196 #: ../en/ch08-undo.xml:977 10184 #: ../en/ch08-undo.xml:963
10197 msgid "always test for the same symptom, and" 10185 msgid "always test for the same symptom, and"
10198 msgstr "" 10186 msgstr ""
10199 10187
10200 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10188 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10201 #: ../en/ch08-undo.xml:979 10189 #: ../en/ch08-undo.xml:965
10202 msgid "" 10190 msgid ""
10203 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</" 10191 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</"
10204 "command> command." 10192 "command> command."
10205 msgstr "" 10193 msgstr ""
10206 10194
10207 #. type: Content of: <book><chapter><sect1><sect2><para> 10195 #. type: Content of: <book><chapter><sect1><sect2><para>
10208 #: ../en/ch08-undo.xml:982 10196 #: ../en/ch08-undo.xml:968
10209 msgid "" 10197 msgid ""
10210 "In my tutorial example above, the <command>grep</command> command tests for " 10198 "In my tutorial example above, the <command>grep</command> command tests for "
10211 "the symptom, and the <literal>if</literal> statement takes the result of this " 10199 "the symptom, and the <literal>if</literal> statement takes the result of this "
10212 "check and ensures that we always feed the same input to the <command role=" 10200 "check and ensures that we always feed the same input to the <command role="
10213 "\"hg-cmd\">hg bisect</command> command. The <literal>mytest</literal> " 10201 "\"hg-cmd\">hg bisect</command> command. The <literal>mytest</literal> "
10214 "function marries these together in a reproducible way, so that every test is " 10202 "function marries these together in a reproducible way, so that every test is "
10215 "uniform and consistent." 10203 "uniform and consistent."
10216 msgstr "" 10204 msgstr ""
10217 10205
10218 #. type: Content of: <book><chapter><sect1><sect2><title> 10206 #. type: Content of: <book><chapter><sect1><sect2><title>
10219 #: ../en/ch08-undo.xml:992 10207 #: ../en/ch08-undo.xml:978
10220 msgid "Check your results" 10208 msgid "Check your results"
10221 msgstr "检查你的结果" 10209 msgstr "检查你的结果"
10222 10210
10223 #. type: Content of: <book><chapter><sect1><sect2><para> 10211 #. type: Content of: <book><chapter><sect1><sect2><para>
10224 #: ../en/ch08-undo.xml:994 10212 #: ../en/ch08-undo.xml:980
10225 msgid "" 10213 msgid ""
10226 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search " 10214 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search "
10227 "is only as good as the input you give it, don't take the changeset it reports " 10215 "is only as good as the input you give it, don't take the changeset it reports "
10228 "as the absolute truth. A simple way to cross-check its report is to manually " 10216 "as the absolute truth. A simple way to cross-check its report is to manually "
10229 "run your test at each of the following changesets:" 10217 "run your test at each of the following changesets:"
10230 msgstr "" 10218 msgstr ""
10231 10219
10232 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10220 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10233 #: ../en/ch08-undo.xml:1000 10221 #: ../en/ch08-undo.xml:986
10234 msgid "" 10222 msgid ""
10235 "The changeset that it reports as the first bad revision. Your test should " 10223 "The changeset that it reports as the first bad revision. Your test should "
10236 "still report this as bad." 10224 "still report this as bad."
10237 msgstr "" 10225 msgstr ""
10238 10226
10239 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10227 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10240 #: ../en/ch08-undo.xml:1004 10228 #: ../en/ch08-undo.xml:990
10241 msgid "" 10229 msgid ""
10242 "The parent of that changeset (either parent, if it's a merge). Your test " 10230 "The parent of that changeset (either parent, if it's a merge). Your test "
10243 "should report this changeset as good." 10231 "should report this changeset as good."
10244 msgstr "" 10232 msgstr ""
10245 10233
10246 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10234 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10247 #: ../en/ch08-undo.xml:1008 10235 #: ../en/ch08-undo.xml:994
10248 msgid "" 10236 msgid ""
10249 "A child of that changeset. Your test should report this changeset as bad." 10237 "A child of that changeset. Your test should report this changeset as bad."
10250 msgstr "" 10238 msgstr ""
10251 10239
10252 #. type: Content of: <book><chapter><sect1><sect2><title> 10240 #. type: Content of: <book><chapter><sect1><sect2><title>
10253 #: ../en/ch08-undo.xml:1014 10241 #: ../en/ch08-undo.xml:1000
10254 msgid "Beware interference between bugs" 10242 msgid "Beware interference between bugs"
10255 msgstr "谨防问题之间的冲突" 10243 msgstr "谨防问题之间的冲突"
10256 10244
10257 #. type: Content of: <book><chapter><sect1><sect2><para> 10245 #. type: Content of: <book><chapter><sect1><sect2><para>
10258 #: ../en/ch08-undo.xml:1016 10246 #: ../en/ch08-undo.xml:1002
10259 msgid "" 10247 msgid ""
10260 "It's possible that your search for one bug could be disrupted by the presence " 10248 "It's possible that your search for one bug could be disrupted by the presence "
10261 "of another. For example, let's say your software crashes at revision 100, " 10249 "of another. For example, let's say your software crashes at revision 100, "
10262 "and worked correctly at revision 50. Unknown to you, someone else introduced " 10250 "and worked correctly at revision 50. Unknown to you, someone else introduced "
10263 "a different crashing bug at revision 60, and fixed it at revision 80. This " 10251 "a different crashing bug at revision 60, and fixed it at revision 80. This "
10264 "could distort your results in one of several ways." 10252 "could distort your results in one of several ways."
10265 msgstr "" 10253 msgstr ""
10266 10254
10267 #. type: Content of: <book><chapter><sect1><sect2><para> 10255 #. type: Content of: <book><chapter><sect1><sect2><para>
10268 #: ../en/ch08-undo.xml:1024 10256 #: ../en/ch08-undo.xml:1010
10269 msgid "" 10257 msgid ""
10270 "It is possible that this other bug completely <quote>masks</quote> yours, " 10258 "It is possible that this other bug completely <quote>masks</quote> yours, "
10271 "which is to say that it occurs before your bug has a chance to manifest " 10259 "which is to say that it occurs before your bug has a chance to manifest "
10272 "itself. If you can't avoid that other bug (for example, it prevents your " 10260 "itself. If you can't avoid that other bug (for example, it prevents your "
10273 "project from building), and so can't tell whether your bug is present in a " 10261 "project from building), and so can't tell whether your bug is present in a "
10275 "command cannot help you directly. Instead, you can mark a changeset as " 10263 "command cannot help you directly. Instead, you can mark a changeset as "
10276 "untested by running <command role=\"hg-cmd\">hg bisect --skip</command>." 10264 "untested by running <command role=\"hg-cmd\">hg bisect --skip</command>."
10277 msgstr "" 10265 msgstr ""
10278 10266
10279 #. type: Content of: <book><chapter><sect1><sect2><para> 10267 #. type: Content of: <book><chapter><sect1><sect2><para>
10280 #: ../en/ch08-undo.xml:1034 10268 #: ../en/ch08-undo.xml:1020
10281 msgid "" 10269 msgid ""
10282 "A different problem could arise if your test for a bug's presence is not " 10270 "A different problem could arise if your test for a bug's presence is not "
10283 "specific enough. If you check for <quote>my program crashes</quote>, then " 10271 "specific enough. If you check for <quote>my program crashes</quote>, then "
10284 "both your crashing bug and an unrelated crashing bug that masks it will look " 10272 "both your crashing bug and an unrelated crashing bug that masks it will look "
10285 "like the same thing, and mislead <command role=\"hg-cmd\">hg bisect</command>." 10273 "like the same thing, and mislead <command role=\"hg-cmd\">hg bisect</command>."
10286 msgstr "" 10274 msgstr ""
10287 10275
10288 #. type: Content of: <book><chapter><sect1><sect2><para> 10276 #. type: Content of: <book><chapter><sect1><sect2><para>
10289 #: ../en/ch08-undo.xml:1041 10277 #: ../en/ch08-undo.xml:1027
10290 msgid "" 10278 msgid ""
10291 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --" 10279 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --"
10292 "skip</command> is if you can't test a revision because your project was in a " 10280 "skip</command> is if you can't test a revision because your project was in a "
10293 "broken and hence untestable state at that revision, perhaps because someone " 10281 "broken and hence untestable state at that revision, perhaps because someone "
10294 "checked in a change that prevented the project from building." 10282 "checked in a change that prevented the project from building."
10295 msgstr "" 10283 msgstr ""
10296 10284
10297 #. type: Content of: <book><chapter><sect1><sect2><title> 10285 #. type: Content of: <book><chapter><sect1><sect2><title>
10298 #: ../en/ch08-undo.xml:1050 10286 #: ../en/ch08-undo.xml:1036
10299 msgid "Bracket your search lazily" 10287 msgid "Bracket your search lazily"
10300 msgstr "减少你的查找工作" 10288 msgstr "减少你的查找工作"
10301 10289
10302 #. type: Content of: <book><chapter><sect1><sect2><para> 10290 #. type: Content of: <book><chapter><sect1><sect2><para>
10303 #: ../en/ch08-undo.xml:1052 10291 #: ../en/ch08-undo.xml:1038
10304 msgid "" 10292 msgid ""
10305 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that " 10293 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that "
10306 "will mark the end points of your search is often easy, but it bears a little " 10294 "will mark the end points of your search is often easy, but it bears a little "
10307 "discussion nevertheless. From the perspective of <command role=\"hg-cmd\">hg " 10295 "discussion nevertheless. From the perspective of <command role=\"hg-cmd\">hg "
10308 "bisect</command>, the <quote>newest</quote> changeset is conventionally " 10296 "bisect</command>, the <quote>newest</quote> changeset is conventionally "
10309 "<quote>bad</quote>, and the older changeset is <quote>good</quote>." 10297 "<quote>bad</quote>, and the older changeset is <quote>good</quote>."
10310 msgstr "" 10298 msgstr ""
10311 10299
10312 #. type: Content of: <book><chapter><sect1><sect2><para> 10300 #. type: Content of: <book><chapter><sect1><sect2><para>
10313 #: ../en/ch08-undo.xml:1060 10301 #: ../en/ch08-undo.xml:1046
10314 msgid "" 10302 msgid ""
10315 "If you're having trouble remembering when a suitable <quote>good</quote> " 10303 "If you're having trouble remembering when a suitable <quote>good</quote> "
10316 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</" 10304 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</"
10317 "command>, you could do worse than testing changesets at random. Just " 10305 "command>, you could do worse than testing changesets at random. Just "
10318 "remember to eliminate contenders that can't possibly exhibit the bug (perhaps " 10306 "remember to eliminate contenders that can't possibly exhibit the bug (perhaps "
10319 "because the feature with the bug isn't present yet) and those where another " 10307 "because the feature with the bug isn't present yet) and those where another "
10320 "problem masks the bug (as I discussed above)." 10308 "problem masks the bug (as I discussed above)."
10321 msgstr "" 10309 msgstr ""
10322 10310
10323 #. type: Content of: <book><chapter><sect1><sect2><para> 10311 #. type: Content of: <book><chapter><sect1><sect2><para>
10324 #: ../en/ch08-undo.xml:1069 10312 #: ../en/ch08-undo.xml:1055
10325 msgid "" 10313 msgid ""
10326 "Even if you end up <quote>early</quote> by thousands of changesets or months " 10314 "Even if you end up <quote>early</quote> by thousands of changesets or months "
10327 "of history, you will only add a handful of tests to the total number that " 10315 "of history, you will only add a handful of tests to the total number that "
10328 "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its " 10316 "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its "
10329 "logarithmic behaviour." 10317 "logarithmic behaviour."
10356 msgstr "Mercurial 钩子概述" 10344 msgstr "Mercurial 钩子概述"
10357 10345
10358 #. type: Content of: <book><chapter><sect1><para> 10346 #. type: Content of: <book><chapter><sect1><para>
10359 #: ../en/ch09-hook.xml:20 10347 #: ../en/ch09-hook.xml:20
10360 msgid "" 10348 msgid ""
10361 "Here is a brief list of the hooks that Mercurial supports. We will revisit " 10349 "Here is a brief list of the hooks that Mercurial supports. We will revisit "
10362 "each of these hooks in more detail later, in section <xref linkend=\"sec.hook." 10350 "each of these hooks in more detail later, in <xref linkend=\"sec:hook:ref\"/>."
10363 "ref\"/>."
10364 msgstr "" 10351 msgstr ""
10365 10352
10366 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 10353 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
10367 #: ../en/ch09-hook.xml:25 10354 #: ../en/ch09-hook.xml:25
10368 msgid "" 10355 msgid ""
10836 msgid "" 10823 msgid ""
10837 "It is a good idea to use a somewhat descriptive extension when you define a " 10824 "It is a good idea to use a somewhat descriptive extension when you define a "
10838 "new hook. This will help you to remember what the hook was for. If the hook " 10825 "new hook. This will help you to remember what the hook was for. If the hook "
10839 "fails, you'll get an error message that contains the hook name and extension, " 10826 "fails, you'll get an error message that contains the hook name and extension, "
10840 "so using a descriptive extension could give you an immediate hint as to why " 10827 "so using a descriptive extension could give you an immediate hint as to why "
10841 "the hook failed (see section <xref linkend=\"sec.hook.perm\"/> for an " 10828 "the hook failed (see <xref linkend=\"sec:hook:perm\"/> for an example)."
10842 "example)."
10843 msgstr "" 10829 msgstr ""
10844 10830
10845 #. type: Content of: <book><chapter><sect1><sect2><title> 10831 #. type: Content of: <book><chapter><sect1><sect2><title>
10846 #: ../en/ch09-hook.xml:407 10832 #: ../en/ch09-hook.xml:407
10847 msgid "Controlling whether an activity can proceed" 10833 msgid "Controlling whether an activity can proceed"
11333 "repository, while <literal>intern</literal> can push changes to any file or " 11319 "repository, while <literal>intern</literal> can push changes to any file or "
11334 "directory except <filename class=\"directory\">source/sensitive</filename>." 11320 "directory except <filename class=\"directory\">source/sensitive</filename>."
11335 msgstr "" 11321 msgstr ""
11336 11322
11337 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 11323 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
11338 #: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1280 11324 #: ../en/ch09-hook.xml:822 ../en/ch09-hook.xml:1089 ../en/ch09-hook.xml:1279
11339 msgid "Testing and troubleshooting" 11325 msgid "Testing and troubleshooting"
11340 msgstr "测试与问题处理" 11326 msgstr "测试与问题处理"
11341 11327
11342 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11328 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11343 #: ../en/ch09-hook.xml:824 11329 #: ../en/ch09-hook.xml:824
11630 msgstr "" 11616 msgstr ""
11631 11617
11632 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11618 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11633 #: ../en/ch09-hook.xml:1097 11619 #: ../en/ch09-hook.xml:1097
11634 msgid "" 11620 msgid ""
11635 "Recall from section <xref linkend=\"sec.hook.bugzilla.config\"/> above that " 11621 "Recall from <xref linkend=\"sec:hook:bugzilla:config\"/> above that the user "
11636 "the user that runs the Mercurial process on the server is also the one that " 11622 "that runs the Mercurial process on the server is also the one that will run "
11637 "will run the <filename>processmail</filename> script. The " 11623 "the <filename>processmail</filename> script. The <filename>processmail</"
11638 "<filename>processmail</filename> script sometimes causes Bugzilla to write to " 11624 "filename> script sometimes causes Bugzilla to write to files in its "
11639 "files in its configuration directory, and Bugzilla's configuration files are " 11625 "configuration directory, and Bugzilla's configuration files are usually owned "
11640 "usually owned by the user that your web server runs under." 11626 "by the user that your web server runs under."
11641 msgstr "" 11627 msgstr ""
11642 11628
11643 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11629 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11644 #: ../en/ch09-hook.xml:1108 11630 #: ../en/ch09-hook.xml:1108
11645 msgid "" 11631 msgid ""
11803 #: ../en/ch09-hook.xml:1248 11789 #: ../en/ch09-hook.xml:1248
11804 msgid "" 11790 msgid ""
11805 "<envar role=\"rc-item-notify\">sources</envar>: A list of sources of " 11791 "<envar role=\"rc-item-notify\">sources</envar>: A list of sources of "
11806 "changesets to consider. This lets you limit <literal role=\"hg-ext\">notify</" 11792 "changesets to consider. This lets you limit <literal role=\"hg-ext\">notify</"
11807 "literal> to only sending out email about changes that remote users pushed " 11793 "literal> to only sending out email about changes that remote users pushed "
11808 "into this repository via a server, for example. See section <xref linkend=" 11794 "into this repository via a server, for example. See <xref linkend=\"sec:hook:"
11809 "\"sec.hook.sources\"/> for the sources you can specify here." 11795 "sources\"/> for the sources you can specify here."
11810 msgstr "" 11796 msgstr ""
11811 11797
11812 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11798 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11813 #: ../en/ch09-hook.xml:1260 11799 #: ../en/ch09-hook.xml:1259
11814 msgid "" 11800 msgid ""
11815 "If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the " 11801 "If you set the <envar role=\"rc-item-web\">baseurl</envar> item in the "
11816 "<literal role=\"rc-web\">web</literal> section, you can use it in a template; " 11802 "<literal role=\"rc-web\">web</literal> section, you can use it in a template; "
11817 "it will be available as <literal>webroot</literal>." 11803 "it will be available as <literal>webroot</literal>."
11818 msgstr "" 11804 msgstr ""
11819 11805
11820 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11806 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11821 #: ../en/ch09-hook.xml:1266 11807 #: ../en/ch09-hook.xml:1265
11822 msgid "" 11808 msgid ""
11823 "Here is an example set of <literal role=\"hg-ext\">notify</literal> " 11809 "Here is an example set of <literal role=\"hg-ext\">notify</literal> "
11824 "configuration information." 11810 "configuration information."
11825 msgstr "" 11811 msgstr ""
11826 11812
11827 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11813 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11828 #: ../en/ch09-hook.xml:1272 11814 #: ../en/ch09-hook.xml:1271
11829 msgid "This will produce a message that looks like the following:" 11815 msgid "This will produce a message that looks like the following:"
11830 msgstr "" 11816 msgstr ""
11831 11817
11832 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11818 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11833 #: ../en/ch09-hook.xml:1282 11819 #: ../en/ch09-hook.xml:1281
11834 msgid "" 11820 msgid ""
11835 "Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> " 11821 "Do not forget that by default, the <literal role=\"hg-ext\">notify</literal> "
11836 "extension <emphasis>will not send any mail</emphasis> until you explicitly " 11822 "extension <emphasis>will not send any mail</emphasis> until you explicitly "
11837 "configure it to do so, by setting <envar role=\"rc-item-notify\">test</envar> " 11823 "configure it to do so, by setting <envar role=\"rc-item-notify\">test</envar> "
11838 "to <literal>false</literal>. Until you do that, it simply prints the message " 11824 "to <literal>false</literal>. Until you do that, it simply prints the message "
11839 "it <emphasis>would</emphasis> send." 11825 "it <emphasis>would</emphasis> send."
11840 msgstr "" 11826 msgstr ""
11841 11827
11842 #. type: Content of: <book><chapter><sect1><title> 11828 #. type: Content of: <book><chapter><sect1><title>
11843 #: ../en/ch09-hook.xml:1294 11829 #: ../en/ch09-hook.xml:1293
11844 msgid "Information for writers of hooks" 11830 msgid "Information for writers of hooks"
11845 msgstr "编写钩子的信息" 11831 msgstr "编写钩子的信息"
11846 11832
11847 #. type: Content of: <book><chapter><sect1><sect2><title> 11833 #. type: Content of: <book><chapter><sect1><sect2><title>
11848 #: ../en/ch09-hook.xml:1297 11834 #: ../en/ch09-hook.xml:1296
11849 msgid "In-process hook execution" 11835 msgid "In-process hook execution"
11850 msgstr "进程内钩子的执行" 11836 msgstr "进程内钩子的执行"
11851 11837
11852 #. type: Content of: <book><chapter><sect1><sect2><para> 11838 #. type: Content of: <book><chapter><sect1><sect2><para>
11853 #: ../en/ch09-hook.xml:1299 11839 #: ../en/ch09-hook.xml:1298
11854 msgid "An in-process hook is called with arguments of the following form:" 11840 msgid "An in-process hook is called with arguments of the following form:"
11855 msgstr "" 11841 msgstr ""
11856 11842
11857 #. type: Content of: <book><chapter><sect1><sect2><para> 11843 #. type: Content of: <book><chapter><sect1><sect2><para>
11858 #: ../en/ch09-hook.xml:1303 11844 #: ../en/ch09-hook.xml:1302
11859 msgid "" 11845 msgid ""
11860 "The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui" 11846 "The <literal>ui</literal> parameter is a <literal role=\"py-mod-mercurial.ui"
11861 "\">ui</literal> object. The <literal>repo</literal> parameter is a <literal " 11847 "\">ui</literal> object. The <literal>repo</literal> parameter is a <literal "
11862 "role=\"py-mod-mercurial.localrepo\">localrepository</literal> object. The " 11848 "role=\"py-mod-mercurial.localrepo\">localrepository</literal> object. The "
11863 "names and values of the <literal>**kwargs</literal> parameters depend on the " 11849 "names and values of the <literal>**kwargs</literal> parameters depend on the "
11864 "hook being invoked, with the following common features:" 11850 "hook being invoked, with the following common features:"
11865 msgstr "" 11851 msgstr ""
11866 11852
11867 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 11853 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
11868 #: ../en/ch09-hook.xml:1312 11854 #: ../en/ch09-hook.xml:1311
11869 msgid "" 11855 msgid ""
11870 "If a parameter is named <literal>node</literal> or <literal>parentN</" 11856 "If a parameter is named <literal>node</literal> or <literal>parentN</"
11871 "literal>, it will contain a hexadecimal changeset ID. The empty string is " 11857 "literal>, it will contain a hexadecimal changeset ID. The empty string is "
11872 "used to represent <quote>null changeset ID</quote> instead of a string of " 11858 "used to represent <quote>null changeset ID</quote> instead of a string of "
11873 "zeroes." 11859 "zeroes."
11874 msgstr "" 11860 msgstr ""
11875 11861
11876 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 11862 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
11877 #: ../en/ch09-hook.xml:1319 11863 #: ../en/ch09-hook.xml:1318
11878 msgid "" 11864 msgid ""
11879 "If a parameter is named <literal>url</literal>, it will contain the URL of a " 11865 "If a parameter is named <literal>url</literal>, it will contain the URL of a "
11880 "remote repository, if that can be determined." 11866 "remote repository, if that can be determined."
11881 msgstr "" 11867 msgstr ""
11882 11868
11883 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 11869 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
11884 #: ../en/ch09-hook.xml:1324 11870 #: ../en/ch09-hook.xml:1323
11885 msgid "" 11871 msgid ""
11886 "Boolean-valued parameters are represented as Python <literal>bool</literal> " 11872 "Boolean-valued parameters are represented as Python <literal>bool</literal> "
11887 "objects." 11873 "objects."
11888 msgstr "" 11874 msgstr ""
11889 11875
11890 #. type: Content of: <book><chapter><sect1><sect2><para> 11876 #. type: Content of: <book><chapter><sect1><sect2><para>
11891 #: ../en/ch09-hook.xml:1329 11877 #: ../en/ch09-hook.xml:1328
11892 msgid "" 11878 msgid ""
11893 "An in-process hook is called without a change to the process's working " 11879 "An in-process hook is called without a change to the process's working "
11894 "directory (unlike external hooks, which are run in the root of the " 11880 "directory (unlike external hooks, which are run in the root of the "
11895 "repository). It must not change the process's working directory, or it will " 11881 "repository). It must not change the process's working directory, or it will "
11896 "cause any calls it makes into the Mercurial API to fail." 11882 "cause any calls it makes into the Mercurial API to fail."
11897 msgstr "" 11883 msgstr ""
11898 11884
11899 #. type: Content of: <book><chapter><sect1><sect2><para> 11885 #. type: Content of: <book><chapter><sect1><sect2><para>
11900 #: ../en/ch09-hook.xml:1336 11886 #: ../en/ch09-hook.xml:1335
11901 msgid "" 11887 msgid ""
11902 "If a hook returns a boolean <quote>false</quote> value, it is considered to " 11888 "If a hook returns a boolean <quote>false</quote> value, it is considered to "
11903 "have succeeded. If it returns a boolean <quote>true</quote> value or raises " 11889 "have succeeded. If it returns a boolean <quote>true</quote> value or raises "
11904 "an exception, it is considered to have failed. A useful way to think of the " 11890 "an exception, it is considered to have failed. A useful way to think of the "
11905 "calling convention is <quote>tell me if you fail</quote>." 11891 "calling convention is <quote>tell me if you fail</quote>."
11906 msgstr "" 11892 msgstr ""
11907 11893
11908 #. type: Content of: <book><chapter><sect1><sect2><para> 11894 #. type: Content of: <book><chapter><sect1><sect2><para>
11909 #: ../en/ch09-hook.xml:1343 11895 #: ../en/ch09-hook.xml:1342
11910 msgid "" 11896 msgid ""
11911 "Note that changeset IDs are passed into Python hooks as hexadecimal strings, " 11897 "Note that changeset IDs are passed into Python hooks as hexadecimal strings, "
11912 "not the binary hashes that Mercurial's APIs normally use. To convert a hash " 11898 "not the binary hashes that Mercurial's APIs normally use. To convert a hash "
11913 "from hex to binary, use the <literal>bin</literal> function." 11899 "from hex to binary, use the <literal>bin</literal> function."
11914 msgstr "" 11900 msgstr ""
11915 11901
11916 #. type: Content of: <book><chapter><sect1><sect2><title> 11902 #. type: Content of: <book><chapter><sect1><sect2><title>
11917 #: ../en/ch09-hook.xml:1351 11903 #: ../en/ch09-hook.xml:1350
11918 msgid "External hook execution" 11904 msgid "External hook execution"
11919 msgstr "外部钩子的执行" 11905 msgstr "外部钩子的执行"
11920 11906
11921 #. type: Content of: <book><chapter><sect1><sect2><para> 11907 #. type: Content of: <book><chapter><sect1><sect2><para>
11922 #: ../en/ch09-hook.xml:1353 11908 #: ../en/ch09-hook.xml:1352
11923 msgid "" 11909 msgid ""
11924 "An external hook is passed to the shell of the user running Mercurial. " 11910 "An external hook is passed to the shell of the user running Mercurial. "
11925 "Features of that shell, such as variable substitution and command " 11911 "Features of that shell, such as variable substitution and command "
11926 "redirection, are available. The hook is run in the root directory of the " 11912 "redirection, are available. The hook is run in the root directory of the "
11927 "repository (unlike in-process hooks, which are run in the same directory that " 11913 "repository (unlike in-process hooks, which are run in the same directory that "
11928 "Mercurial was run in)." 11914 "Mercurial was run in)."
11929 msgstr "" 11915 msgstr ""
11930 11916
11931 #. type: Content of: <book><chapter><sect1><sect2><para> 11917 #. type: Content of: <book><chapter><sect1><sect2><para>
11932 #: ../en/ch09-hook.xml:1361 11918 #: ../en/ch09-hook.xml:1360
11933 msgid "" 11919 msgid ""
11934 "Hook parameters are passed to the hook as environment variables. Each " 11920 "Hook parameters are passed to the hook as environment variables. Each "
11935 "environment variable's name is converted in upper case and prefixed with the " 11921 "environment variable's name is converted in upper case and prefixed with the "
11936 "string <quote><literal>HG_</literal></quote>. For example, if the name of a " 11922 "string <quote><literal>HG_</literal></quote>. For example, if the name of a "
11937 "parameter is <quote><literal>node</literal></quote>, the name of the " 11923 "parameter is <quote><literal>node</literal></quote>, the name of the "
11938 "environment variable representing that parameter will be " 11924 "environment variable representing that parameter will be "
11939 "<quote><literal>HG_NODE</literal></quote>." 11925 "<quote><literal>HG_NODE</literal></quote>."
11940 msgstr "" 11926 msgstr ""
11941 11927
11942 #. type: Content of: <book><chapter><sect1><sect2><para> 11928 #. type: Content of: <book><chapter><sect1><sect2><para>
11943 #: ../en/ch09-hook.xml:1370 11929 #: ../en/ch09-hook.xml:1369
11944 msgid "" 11930 msgid ""
11945 "A boolean parameter is represented as the string <quote><literal>1</literal></" 11931 "A boolean parameter is represented as the string <quote><literal>1</literal></"
11946 "quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for " 11932 "quote> for <quote>true</quote>, <quote><literal>0</literal></quote> for "
11947 "<quote>false</quote>. If an environment variable is named <envar>HG_NODE</" 11933 "<quote>false</quote>. If an environment variable is named <envar>HG_NODE</"
11948 "envar>, <envar>HG_PARENT1</envar> or <envar>HG_PARENT2</envar>, it contains a " 11934 "envar>, <envar>HG_PARENT1</envar> or <envar>HG_PARENT2</envar>, it contains a "
11951 "If an environment variable is named <envar>HG_URL</envar>, it will contain " 11937 "If an environment variable is named <envar>HG_URL</envar>, it will contain "
11952 "the URL of a remote repository, if that can be determined." 11938 "the URL of a remote repository, if that can be determined."
11953 msgstr "" 11939 msgstr ""
11954 11940
11955 #. type: Content of: <book><chapter><sect1><sect2><para> 11941 #. type: Content of: <book><chapter><sect1><sect2><para>
11956 #: ../en/ch09-hook.xml:1382 11942 #: ../en/ch09-hook.xml:1381
11957 msgid "" 11943 msgid ""
11958 "If a hook exits with a status of zero, it is considered to have succeeded. " 11944 "If a hook exits with a status of zero, it is considered to have succeeded. "
11959 "If it exits with a non-zero status, it is considered to have failed." 11945 "If it exits with a non-zero status, it is considered to have failed."
11960 msgstr "" 11946 msgstr ""
11961 11947
11962 #. type: Content of: <book><chapter><sect1><sect2><title> 11948 #. type: Content of: <book><chapter><sect1><sect2><title>
11963 #: ../en/ch09-hook.xml:1389 11949 #: ../en/ch09-hook.xml:1388
11964 msgid "Finding out where changesets come from" 11950 msgid "Finding out where changesets come from"
11965 msgstr "检查修改集来自何处" 11951 msgstr "检查修改集来自何处"
11966 11952
11967 #. type: Content of: <book><chapter><sect1><sect2><para> 11953 #. type: Content of: <book><chapter><sect1><sect2><para>
11968 #: ../en/ch09-hook.xml:1391 11954 #: ../en/ch09-hook.xml:1390
11969 msgid "" 11955 msgid ""
11970 "A hook that involves the transfer of changesets between a local repository " 11956 "A hook that involves the transfer of changesets between a local repository "
11971 "and another may be able to find out information about the <quote>far side</" 11957 "and another may be able to find out information about the <quote>far side</"
11972 "quote>. Mercurial knows <emphasis>how</emphasis> changes are being " 11958 "quote>. Mercurial knows <emphasis>how</emphasis> changes are being "
11973 "transferred, and in many cases <emphasis>where</emphasis> they are being " 11959 "transferred, and in many cases <emphasis>where</emphasis> they are being "
11974 "transferred to or from." 11960 "transferred to or from."
11975 msgstr "" 11961 msgstr ""
11976 11962
11977 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 11963 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
11978 #: ../en/ch09-hook.xml:1400 11964 #: ../en/ch09-hook.xml:1399
11979 msgid "Sources of changesets" 11965 msgid "Sources of changesets"
11980 msgstr "修改集的来源" 11966 msgstr "修改集的来源"
11981 11967
11982 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 11968 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
11983 #: ../en/ch09-hook.xml:1402 11969 #: ../en/ch09-hook.xml:1401
11984 msgid "" 11970 msgid ""
11985 "Mercurial will tell a hook what means are, or were, used to transfer " 11971 "Mercurial will tell a hook what means are, or were, used to transfer "
11986 "changesets between repositories. This is provided by Mercurial in a Python " 11972 "changesets between repositories. This is provided by Mercurial in a Python "
11987 "parameter named <literal>source</literal>, or an environment variable named " 11973 "parameter named <literal>source</literal>, or an environment variable named "
11988 "<envar>HG_SOURCE</envar>." 11974 "<envar>HG_SOURCE</envar>."
11989 msgstr "" 11975 msgstr ""
11990 11976
11991 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 11977 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
11992 #: ../en/ch09-hook.xml:1410 11978 #: ../en/ch09-hook.xml:1409
11993 msgid "" 11979 msgid ""
11994 "<literal>serve</literal>: Changesets are transferred to or from a remote " 11980 "<literal>serve</literal>: Changesets are transferred to or from a remote "
11995 "repository over http or ssh." 11981 "repository over http or ssh."
11996 msgstr "" 11982 msgstr ""
11997 11983
11998 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 11984 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
11999 #: ../en/ch09-hook.xml:1415 11985 #: ../en/ch09-hook.xml:1414
12000 msgid "" 11986 msgid ""
12001 "<literal>pull</literal>: Changesets are being transferred via a pull from one " 11987 "<literal>pull</literal>: Changesets are being transferred via a pull from one "
12002 "repository into another." 11988 "repository into another."
12003 msgstr "" 11989 msgstr ""
12004 11990
12005 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 11991 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
12006 #: ../en/ch09-hook.xml:1420 11992 #: ../en/ch09-hook.xml:1419
12007 msgid "" 11993 msgid ""
12008 "<literal>push</literal>: Changesets are being transferred via a push from one " 11994 "<literal>push</literal>: Changesets are being transferred via a push from one "
12009 "repository into another." 11995 "repository into another."
12010 msgstr "" 11996 msgstr ""
12011 11997
12012 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 11998 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
12013 #: ../en/ch09-hook.xml:1425 11999 #: ../en/ch09-hook.xml:1424
12014 msgid "" 12000 msgid ""
12015 "<literal>bundle</literal>: Changesets are being transferred to or from a " 12001 "<literal>bundle</literal>: Changesets are being transferred to or from a "
12016 "bundle." 12002 "bundle."
12017 msgstr "" 12003 msgstr ""
12018 12004
12019 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 12005 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
12020 #: ../en/ch09-hook.xml:1432 12006 #: ../en/ch09-hook.xml:1431
12021 msgid "Where changes are going&emdash;remote repository URLs" 12007 msgid "Where changes are going&emdash;remote repository URLs"
12022 msgstr "修改集要到哪里&emdash;远程版本库的地址" 12008 msgstr "修改集要到哪里&emdash;远程版本库的地址"
12023 12009
12024 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 12010 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
12025 #: ../en/ch09-hook.xml:1435 12011 #: ../en/ch09-hook.xml:1434
12026 msgid "" 12012 msgid ""
12027 "When possible, Mercurial will tell a hook the location of the <quote>far " 12013 "When possible, Mercurial will tell a hook the location of the <quote>far "
12028 "side</quote> of an activity that transfers changeset data between " 12014 "side</quote> of an activity that transfers changeset data between "
12029 "repositories. This is provided by Mercurial in a Python parameter named " 12015 "repositories. This is provided by Mercurial in a Python parameter named "
12030 "<literal>url</literal>, or an environment variable named <envar>HG_URL</" 12016 "<literal>url</literal>, or an environment variable named <envar>HG_URL</"
12031 "envar>." 12017 "envar>."
12032 msgstr "" 12018 msgstr ""
12033 12019
12034 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 12020 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
12035 #: ../en/ch09-hook.xml:1443 12021 #: ../en/ch09-hook.xml:1442
12036 msgid "" 12022 msgid ""
12037 "This information is not always known. If a hook is invoked in a repository " 12023 "This information is not always known. If a hook is invoked in a repository "
12038 "that is being served via http or ssh, Mercurial cannot tell where the remote " 12024 "that is being served via http or ssh, Mercurial cannot tell where the remote "
12039 "repository is, but it may know where the client is connecting from. In such " 12025 "repository is, but it may know where the client is connecting from. In such "
12040 "cases, the URL will take one of the following forms:" 12026 "cases, the URL will take one of the following forms:"
12041 msgstr "" 12027 msgstr ""
12042 12028
12043 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 12029 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
12044 #: ../en/ch09-hook.xml:1450 12030 #: ../en/ch09-hook.xml:1449
12045 msgid "" 12031 msgid ""
12046 "<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP " 12032 "<literal>remote:ssh:1.2.3.4</literal>&emdash;remote ssh client, at the IP "
12047 "address <literal>1.2.3.4</literal>." 12033 "address <literal>1.2.3.4</literal>."
12048 msgstr "" 12034 msgstr ""
12049 12035
12050 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 12036 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
12051 #: ../en/ch09-hook.xml:1455 12037 #: ../en/ch09-hook.xml:1454
12052 msgid "" 12038 msgid ""
12053 "<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP " 12039 "<literal>remote:http:1.2.3.4</literal>&emdash;remote http client, at the IP "
12054 "address <literal>1.2.3.4</literal>. If the client is using SSL, this will be " 12040 "address <literal>1.2.3.4</literal>. If the client is using SSL, this will be "
12055 "of the form <literal>remote:https:1.2.3.4</literal>." 12041 "of the form <literal>remote:https:1.2.3.4</literal>."
12056 msgstr "" 12042 msgstr ""
12057 12043
12058 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 12044 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
12059 #: ../en/ch09-hook.xml:1462 12045 #: ../en/ch09-hook.xml:1461
12060 msgid "Empty&emdash;no information could be discovered about the remote client." 12046 msgid "Empty&emdash;no information could be discovered about the remote client."
12061 msgstr "" 12047 msgstr ""
12062 12048
12063 #. type: Content of: <book><chapter><sect1><title> 12049 #. type: Content of: <book><chapter><sect1><title>
12064 #: ../en/ch09-hook.xml:1471 12050 #: ../en/ch09-hook.xml:1470
12065 msgid "Hook reference" 12051 msgid "Hook reference"
12066 msgstr "钩子参考" 12052 msgstr "钩子参考"
12067 12053
12068 #. type: Content of: <book><chapter><sect1><sect2><title> 12054 #. type: Content of: <book><chapter><sect1><sect2><title>
12069 #: ../en/ch09-hook.xml:1474 12055 #: ../en/ch09-hook.xml:1473
12070 msgid "" 12056 msgid ""
12071 "<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets " 12057 "<literal role=\"hook\">changegroup</literal>&emdash;after remote changesets "
12072 "added" 12058 "added"
12073 msgstr "<literal role=\"hook\">changegroup</literal>&emdash;增加远程修改集之后" 12059 msgstr "<literal role=\"hook\">changegroup</literal>&emdash;增加远程修改集之后"
12074 12060
12075 #. type: Content of: <book><chapter><sect1><sect2><para> 12061 #. type: Content of: <book><chapter><sect1><sect2><para>
12076 #: ../en/ch09-hook.xml:1477 12062 #: ../en/ch09-hook.xml:1476
12077 msgid "" 12063 msgid ""
12078 "This hook is run after a group of pre-existing changesets has been added to " 12064 "This hook is run after a group of pre-existing changesets has been added to "
12079 "the repository, for example via a <command role=\"hg-cmd\">hg pull</command> " 12065 "the repository, for example via a <command role=\"hg-cmd\">hg pull</command> "
12080 "or <command role=\"hg-cmd\">hg unbundle</command>. This hook is run once per " 12066 "or <command role=\"hg-cmd\">hg unbundle</command>. This hook is run once per "
12081 "operation that added one or more changesets. This is in contrast to the " 12067 "operation that added one or more changesets. This is in contrast to the "
12082 "<literal role=\"hook\">incoming</literal> hook, which is run once per " 12068 "<literal role=\"hook\">incoming</literal> hook, which is run once per "
12083 "changeset, regardless of whether the changesets arrive in a group." 12069 "changeset, regardless of whether the changesets arrive in a group."
12084 msgstr "" 12070 msgstr ""
12085 12071
12086 #. type: Content of: <book><chapter><sect1><sect2><para> 12072 #. type: Content of: <book><chapter><sect1><sect2><para>
12087 #: ../en/ch09-hook.xml:1487 12073 #: ../en/ch09-hook.xml:1486
12088 msgid "" 12074 msgid ""
12089 "Some possible uses for this hook include kicking off an automated build or " 12075 "Some possible uses for this hook include kicking off an automated build or "
12090 "test of the added changesets, updating a bug database, or notifying " 12076 "test of the added changesets, updating a bug database, or notifying "
12091 "subscribers that a repository contains new changes." 12077 "subscribers that a repository contains new changes."
12092 msgstr "" 12078 msgstr ""
12093 12079
12094 #. type: Content of: <book><chapter><sect1><sect2><para> 12080 #. type: Content of: <book><chapter><sect1><sect2><para>
12095 #: ../en/ch09-hook.xml:1493 ../en/ch09-hook.xml:1533 ../en/ch09-hook.xml:1576 12081 #: ../en/ch09-hook.xml:1492 ../en/ch09-hook.xml:1532 ../en/ch09-hook.xml:1576
12096 #: ../en/ch09-hook.xml:1618 ../en/ch09-hook.xml:1673 ../en/ch09-hook.xml:1713 12082 #: ../en/ch09-hook.xml:1618 ../en/ch09-hook.xml:1673 ../en/ch09-hook.xml:1713
12097 #: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1784 ../en/ch09-hook.xml:1846 12083 #: ../en/ch09-hook.xml:1749 ../en/ch09-hook.xml:1783 ../en/ch09-hook.xml:1846
12098 #: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1938 ../en/ch09-hook.xml:1966 12084 #: ../en/ch09-hook.xml:1904 ../en/ch09-hook.xml:1940 ../en/ch09-hook.xml:1967
12099 msgid "Parameters to this hook:" 12085 msgid "Parameters to this hook:"
12100 msgstr "" 12086 msgstr ""
12101 12087
12102 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12088 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12103 #: ../en/ch09-hook.xml:1496 ../en/ch09-hook.xml:1849 12089 #: ../en/ch09-hook.xml:1495 ../en/ch09-hook.xml:1849
12104 msgid "" 12090 msgid ""
12105 "<literal>node</literal>: A changeset ID. The changeset ID of the first " 12091 "<literal>node</literal>: A changeset ID. The changeset ID of the first "
12106 "changeset in the group that was added. All changesets between this and " 12092 "changeset in the group that was added. All changesets between this and "
12107 "<literal role=\"tag\">tip</literal>, inclusive, were added by a single " 12093 "<literal role=\"tag\">tip</literal>, inclusive, were added by a single "
12108 "<command role=\"hg-cmd\">hg pull</command>, <command role=\"hg-cmd\">hg push</" 12094 "<command role=\"hg-cmd\">hg pull</command>, <command role=\"hg-cmd\">hg push</"
12109 "command> or <command role=\"hg-cmd\">hg unbundle</command>." 12095 "command> or <command role=\"hg-cmd\">hg unbundle</command>."
12110 msgstr "" 12096 msgstr ""
12111 12097
12112 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12098 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12113 #: ../en/ch09-hook.xml:1505 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676 12099 #: ../en/ch09-hook.xml:1504 ../en/ch09-hook.xml:1583 ../en/ch09-hook.xml:1676
12114 #: ../en/ch09-hook.xml:1859 12100 #: ../en/ch09-hook.xml:1859
12115 msgid "" 12101 msgid ""
12116 "<literal>source</literal>: A string. The source of these changes. See " 12102 "<literal>source</literal>: A string. The source of these changes. See <xref "
12117 "section <xref linkend=\"sec.hook.sources\"/> for details." 12103 "linkend=\"sec:hook:sources\"/> for details."
12118 msgstr "" 12104 msgstr ""
12119 12105
12120 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12106 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12121 #: ../en/ch09-hook.xml:1510 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639 12107 #: ../en/ch09-hook.xml:1509 ../en/ch09-hook.xml:1588 ../en/ch09-hook.xml:1639
12122 #: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1763 ../en/ch09-hook.xml:1864 12108 #: ../en/ch09-hook.xml:1681 ../en/ch09-hook.xml:1762 ../en/ch09-hook.xml:1864
12123 msgid "" 12109 msgid ""
12124 "<literal>url</literal>: A URL. The location of the remote repository, if " 12110 "<literal>url</literal>: A URL. The location of the remote repository, if "
12125 "known. See section <xref linkend=\"sec.hook.url\"/> for more information." 12111 "known. See <xref linkend=\"sec:hook:url\"/> for more information."
12126 msgstr "" 12112 msgstr ""
12127 12113
12128 #. type: Content of: <book><chapter><sect1><sect2><para> 12114 #. type: Content of: <book><chapter><sect1><sect2><para>
12129 #: ../en/ch09-hook.xml:1517 12115 #: ../en/ch09-hook.xml:1515
12130 msgid "" 12116 msgid ""
12131 "See also: <literal role=\"hook\">incoming</literal> (section <xref linkend=" 12117 "See also: <literal role=\"hook\">incoming</literal> (<xref linkend=\"sec:hook:"
12132 "\"sec.hook.incoming\"/>), <literal role=\"hook\">prechangegroup</literal> " 12118 "incoming\"/>), <literal role=\"hook\">prechangegroup</literal> (<xref linkend="
12133 "(section <xref linkend=\"sec.hook.prechangegroup\"/>), <literal role=\"hook" 12119 "\"sec:hook:prechangegroup\"/>), <literal role=\"hook\">pretxnchangegroup</"
12134 "\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." 12120 "literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)"
12135 "pretxnchangegroup\"/>)"
12136 msgstr "" 12121 msgstr ""
12137 12122
12138 #. type: Content of: <book><chapter><sect1><sect2><title> 12123 #. type: Content of: <book><chapter><sect1><sect2><title>
12139 #: ../en/ch09-hook.xml:1527 12124 #: ../en/ch09-hook.xml:1526
12140 msgid "" 12125 msgid ""
12141 "<literal role=\"hook\">commit</literal>&emdash;after a new changeset is " 12126 "<literal role=\"hook\">commit</literal>&emdash;after a new changeset is "
12142 "created" 12127 "created"
12143 msgstr "<literal role=\"hook\">commit</literal>&emdash;创建新修改集之后" 12128 msgstr "<literal role=\"hook\">commit</literal>&emdash;创建新修改集之后"
12144 12129
12145 #. type: Content of: <book><chapter><sect1><sect2><para> 12130 #. type: Content of: <book><chapter><sect1><sect2><para>
12146 #: ../en/ch09-hook.xml:1530 12131 #: ../en/ch09-hook.xml:1529
12147 msgid "This hook is run after a new changeset has been created." 12132 msgid "This hook is run after a new changeset has been created."
12148 msgstr "" 12133 msgstr ""
12149 12134
12150 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12135 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12151 #: ../en/ch09-hook.xml:1536 ../en/ch09-hook.xml:1907 12136 #: ../en/ch09-hook.xml:1535 ../en/ch09-hook.xml:1907
12152 msgid "" 12137 msgid ""
12153 "<literal>node</literal>: A changeset ID. The changeset ID of the newly " 12138 "<literal>node</literal>: A changeset ID. The changeset ID of the newly "
12154 "committed changeset." 12139 "committed changeset."
12155 msgstr "" 12140 msgstr ""
12156 12141
12157 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12142 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12158 #: ../en/ch09-hook.xml:1540 ../en/ch09-hook.xml:1911 12143 #: ../en/ch09-hook.xml:1539 ../en/ch09-hook.xml:1911
12159 msgid "" 12144 msgid ""
12160 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first " 12145 "<literal>parent1</literal>: A changeset ID. The changeset ID of the first "
12161 "parent of the newly committed changeset." 12146 "parent of the newly committed changeset."
12162 msgstr "" 12147 msgstr ""
12163 12148
12164 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12149 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12165 #: ../en/ch09-hook.xml:1545 ../en/ch09-hook.xml:1916 12150 #: ../en/ch09-hook.xml:1544 ../en/ch09-hook.xml:1916
12166 msgid "" 12151 msgid ""
12167 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second " 12152 "<literal>parent2</literal>: A changeset ID. The changeset ID of the second "
12168 "parent of the newly committed changeset." 12153 "parent of the newly committed changeset."
12169 msgstr "" 12154 msgstr ""
12170 12155
12171 #. type: Content of: <book><chapter><sect1><sect2><para> 12156 #. type: Content of: <book><chapter><sect1><sect2><para>
12172 #: ../en/ch09-hook.xml:1551 12157 #: ../en/ch09-hook.xml:1550
12173 msgid "" 12158 msgid ""
12174 "See also: <literal role=\"hook\">precommit</literal> (section <xref linkend=" 12159 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:"
12175 "\"sec.hook.precommit\"/>), <literal role=\"hook\">pretxncommit</literal> " 12160 "hook:precommit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref "
12176 "(section <xref linkend=\"sec.hook.pretxncommit\"/>)" 12161 "linkend=\"sec:hook:pretxncommit\"/>)"
12177 msgstr "" 12162 msgstr ""
12178 12163
12179 #. type: Content of: <book><chapter><sect1><sect2><title> 12164 #. type: Content of: <book><chapter><sect1><sect2><title>
12180 #: ../en/ch09-hook.xml:1559 12165 #: ../en/ch09-hook.xml:1559
12181 msgid "" 12166 msgid ""
12194 12179
12195 #. type: Content of: <book><chapter><sect1><sect2><para> 12180 #. type: Content of: <book><chapter><sect1><sect2><para>
12196 #: ../en/ch09-hook.xml:1569 12181 #: ../en/ch09-hook.xml:1569
12197 msgid "" 12182 msgid ""
12198 "You can use this hook for the same purposes as the <literal role=\"hook" 12183 "You can use this hook for the same purposes as the <literal role=\"hook"
12199 "\">changegroup</literal> hook (section <xref linkend=\"sec.hook.changegroup\"/" 12184 "\">changegroup</literal> hook (<xref linkend=\"sec:hook:changegroup\"/>); "
12200 ">); it's simply more convenient sometimes to run a hook once per group of " 12185 "it's simply more convenient sometimes to run a hook once per group of "
12201 "changesets, while other times it's handier once per changeset." 12186 "changesets, while other times it's handier once per changeset."
12202 msgstr "" 12187 msgstr ""
12203 12188
12204 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12189 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12205 #: ../en/ch09-hook.xml:1579 12190 #: ../en/ch09-hook.xml:1579
12206 msgid "" 12191 msgid ""
12207 "<literal>node</literal>: A changeset ID. The ID of the newly added changeset." 12192 "<literal>node</literal>: A changeset ID. The ID of the newly added changeset."
12208 msgstr "" 12193 msgstr ""
12209 12194
12210 #. type: Content of: <book><chapter><sect1><sect2><para> 12195 #. type: Content of: <book><chapter><sect1><sect2><para>
12211 #: ../en/ch09-hook.xml:1595 12196 #: ../en/ch09-hook.xml:1594
12212 msgid "" 12197 msgid ""
12213 "See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" 12198 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
12214 "\"sec.hook.changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> " 12199 "hook:changegroup\"/>) <literal role=\"hook\">prechangegroup</literal> (<xref "
12215 "(section <xref linkend=\"sec.hook.prechangegroup\"/>), <literal role=\"hook" 12200 "linkend=\"sec:hook:prechangegroup\"/>), <literal role=\"hook"
12216 "\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." 12201 "\">pretxnchangegroup</literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/"
12217 "pretxnchangegroup\"/>)" 12202 ">)"
12218 msgstr "" 12203 msgstr ""
12219 12204
12220 #. type: Content of: <book><chapter><sect1><sect2><title> 12205 #. type: Content of: <book><chapter><sect1><sect2><title>
12221 #: ../en/ch09-hook.xml:1605 12206 #: ../en/ch09-hook.xml:1605
12222 msgid "" 12207 msgid ""
12248 12233
12249 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12234 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12250 #: ../en/ch09-hook.xml:1626 12235 #: ../en/ch09-hook.xml:1626
12251 msgid "" 12236 msgid ""
12252 "<literal>source</literal>: A string. The source of the of the operation (see " 12237 "<literal>source</literal>: A string. The source of the of the operation (see "
12253 "section <xref linkend=\"sec.hook.sources\"/>). If a remote client pulled " 12238 "<xref linkend=\"sec:hook:sources\"/>). If a remote client pulled changes "
12254 "changes from this repository, <literal>source</literal> will be " 12239 "from this repository, <literal>source</literal> will be <literal>serve</"
12255 "<literal>serve</literal>. If the client that obtained changes from this " 12240 "literal>. If the client that obtained changes from this repository was "
12256 "repository was local, <literal>source</literal> will be <literal>bundle</" 12241 "local, <literal>source</literal> will be <literal>bundle</literal>, "
12257 "literal>, <literal>pull</literal>, or <literal>push</literal>, depending on " 12242 "<literal>pull</literal>, or <literal>push</literal>, depending on the "
12258 "the operation the client performed." 12243 "operation the client performed."
12259 msgstr "" 12244 msgstr ""
12260 12245
12261 #. type: Content of: <book><chapter><sect1><sect2><para> 12246 #. type: Content of: <book><chapter><sect1><sect2><para>
12262 #: ../en/ch09-hook.xml:1646 12247 #: ../en/ch09-hook.xml:1645
12263 msgid "" 12248 msgid ""
12264 "See also: <literal role=\"hook\">preoutgoing</literal> (section <xref linkend=" 12249 "See also: <literal role=\"hook\">preoutgoing</literal> (<xref linkend=\"sec:"
12265 "\"sec.hook.preoutgoing\"/>)" 12250 "hook:preoutgoing\"/>)"
12266 msgstr "" 12251 msgstr ""
12267 12252
12268 #. type: Content of: <book><chapter><sect1><sect2><title> 12253 #. type: Content of: <book><chapter><sect1><sect2><title>
12269 #: ../en/ch09-hook.xml:1652 12254 #: ../en/ch09-hook.xml:1652
12270 msgid "" 12255 msgid ""
12296 "server-hosted branch temporarily or permanently so that users cannot push to " 12281 "server-hosted branch temporarily or permanently so that users cannot push to "
12297 "it, while still allowing a local administrator to modify the repository." 12282 "it, while still allowing a local administrator to modify the repository."
12298 msgstr "" 12283 msgstr ""
12299 12284
12300 #. type: Content of: <book><chapter><sect1><sect2><para> 12285 #. type: Content of: <book><chapter><sect1><sect2><para>
12301 #: ../en/ch09-hook.xml:1688 12286 #: ../en/ch09-hook.xml:1687
12302 msgid "" 12287 msgid ""
12303 "See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" 12288 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
12304 "\"sec.hook.changegroup\"/>), <literal role=\"hook\">incoming</literal> " 12289 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref "
12305 "(section <xref linkend=\"sec.hook.incoming\"/>), , <literal role=\"hook" 12290 "linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">pretxnchangegroup</"
12306 "\">pretxnchangegroup</literal> (section <xref linkend=\"sec.hook." 12291 "literal> (<xref linkend=\"sec:hook:pretxnchangegroup\"/>)"
12307 "pretxnchangegroup\"/>)"
12308 msgstr "" 12292 msgstr ""
12309 12293
12310 #. type: Content of: <book><chapter><sect1><sect2><title> 12294 #. type: Content of: <book><chapter><sect1><sect2><title>
12311 #: ../en/ch09-hook.xml:1698 12295 #: ../en/ch09-hook.xml:1698
12312 msgid "" 12296 msgid ""
12352 msgstr "" 12336 msgstr ""
12353 12337
12354 #. type: Content of: <book><chapter><sect1><sect2><para> 12338 #. type: Content of: <book><chapter><sect1><sect2><para>
12355 #: ../en/ch09-hook.xml:1730 12339 #: ../en/ch09-hook.xml:1730
12356 msgid "" 12340 msgid ""
12357 "See also: <literal role=\"hook\">commit</literal> (section <xref linkend=" 12341 "See also: <literal role=\"hook\">commit</literal> (<xref linkend=\"sec:hook:"
12358 "\"sec.hook.commit\"/>), <literal role=\"hook\">pretxncommit</literal> " 12342 "commit\"/>), <literal role=\"hook\">pretxncommit</literal> (<xref linkend="
12359 "(section <xref linkend=\"sec.hook.pretxncommit\"/>)" 12343 "\"sec:hook:pretxncommit\"/>)"
12360 msgstr "" 12344 msgstr ""
12361 12345
12362 #. type: Content of: <book><chapter><sect1><sect2><title> 12346 #. type: Content of: <book><chapter><sect1><sect2><title>
12363 #: ../en/ch09-hook.xml:1738 12347 #: ../en/ch09-hook.xml:1738
12364 msgid "" 12348 msgid ""
12382 12366
12383 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12367 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12384 #: ../en/ch09-hook.xml:1752 12368 #: ../en/ch09-hook.xml:1752
12385 msgid "" 12369 msgid ""
12386 "<literal>source</literal>: A string. The source of the operation that is " 12370 "<literal>source</literal>: A string. The source of the operation that is "
12387 "attempting to obtain changes from this repository (see section <xref linkend=" 12371 "attempting to obtain changes from this repository (see <xref linkend=\"sec:"
12388 "\"sec.hook.sources\"/>). See the documentation for the <literal>source</" 12372 "hook:sources\"/>). See the documentation for the <literal>source</literal> "
12389 "literal> parameter to the <literal role=\"hook\">outgoing</literal> hook, in " 12373 "parameter to the <literal role=\"hook\">outgoing</literal> hook, in <xref "
12390 "section <xref linkend=\"sec.hook.outgoing\"/>, for possible values of this " 12374 "linkend=\"sec:hook:outgoing\"/>, for possible values of this parameter."
12391 "parameter." 12375 msgstr ""
12392 msgstr "" 12376
12393 12377 #. type: Content of: <book><chapter><sect1><sect2><para>
12394 #. type: Content of: <book><chapter><sect1><sect2><para> 12378 #: ../en/ch09-hook.xml:1768
12395 #: ../en/ch09-hook.xml:1770 12379 msgid ""
12396 msgid "" 12380 "See also: <literal role=\"hook\">outgoing</literal> (<xref linkend=\"sec:hook:"
12397 "See also: <literal role=\"hook\">outgoing</literal> (section <xref linkend=" 12381 "outgoing\"/>)"
12398 "\"sec.hook.outgoing\"/>)"
12399 msgstr "" 12382 msgstr ""
12400 12383
12401 #. type: Content of: <book><chapter><sect1><sect2><title> 12384 #. type: Content of: <book><chapter><sect1><sect2><title>
12402 #: ../en/ch09-hook.xml:1776 12385 #: ../en/ch09-hook.xml:1775
12403 msgid "" 12386 msgid ""
12404 "<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset" 12387 "<literal role=\"hook\">pretag</literal>&emdash;before tagging a changeset"
12405 msgstr "<literal role=\"hook\">pretag</literal>&emdash;创建标签之前" 12388 msgstr "<literal role=\"hook\">pretag</literal>&emdash;创建标签之前"
12406 12389
12407 #. type: Content of: <book><chapter><sect1><sect2><para> 12390 #. type: Content of: <book><chapter><sect1><sect2><para>
12408 #: ../en/ch09-hook.xml:1779 12391 #: ../en/ch09-hook.xml:1778
12409 msgid "" 12392 msgid ""
12410 "This controlling hook is run before a tag is created. If the hook succeeds, " 12393 "This controlling hook is run before a tag is created. If the hook succeeds, "
12411 "creation of the tag proceeds. If the hook fails, the tag is not created." 12394 "creation of the tag proceeds. If the hook fails, the tag is not created."
12412 msgstr "" 12395 msgstr ""
12413 12396
12414 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12397 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12415 #: ../en/ch09-hook.xml:1787 12398 #: ../en/ch09-hook.xml:1786
12416 msgid "" 12399 msgid ""
12417 "<literal>local</literal>: A boolean. Whether the tag is local to this " 12400 "<literal>local</literal>: A boolean. Whether the tag is local to this "
12418 "repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</" 12401 "repository instance (i.e. stored in <filename role=\"special\">.hg/localtags</"
12419 "filename>) or managed by Mercurial (stored in <filename role=\"special\">." 12402 "filename>) or managed by Mercurial (stored in <filename role=\"special\">."
12420 "hgtags</filename>)." 12403 "hgtags</filename>)."
12421 msgstr "" 12404 msgstr ""
12422 12405
12423 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12406 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12424 #: ../en/ch09-hook.xml:1794 12407 #: ../en/ch09-hook.xml:1793
12425 msgid "" 12408 msgid ""
12426 "<literal>node</literal>: A changeset ID. The ID of the changeset to be " 12409 "<literal>node</literal>: A changeset ID. The ID of the changeset to be "
12427 "tagged." 12410 "tagged."
12428 msgstr "" 12411 msgstr ""
12429 12412
12430 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12413 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12431 #: ../en/ch09-hook.xml:1798 12414 #: ../en/ch09-hook.xml:1797
12432 msgid "<literal>tag</literal>: A string. The name of the tag to be created." 12415 msgid "<literal>tag</literal>: A string. The name of the tag to be created."
12433 msgstr "" 12416 msgstr ""
12434 12417
12435 #. type: Content of: <book><chapter><sect1><sect2><para> 12418 #. type: Content of: <book><chapter><sect1><sect2><para>
12436 #: ../en/ch09-hook.xml:1803 12419 #: ../en/ch09-hook.xml:1802
12437 msgid "" 12420 msgid ""
12438 "If the tag to be created is revision-controlled, the <literal role=\"hook" 12421 "If the tag to be created is revision-controlled, the <literal role=\"hook"
12439 "\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> " 12422 "\">precommit</literal> and <literal role=\"hook\">pretxncommit</literal> "
12440 "hooks (sections <xref linkend=\"sec.hook.commit\"/> and <xref linkend=\"sec." 12423 "hooks (<xref linkend=\"sec:hook:commit\"/> and <xref linkend=\"sec:hook:"
12441 "hook.pretxncommit\"/>) will also be run." 12424 "pretxncommit\"/>) will also be run."
12442 msgstr "" 12425 msgstr ""
12443 12426
12444 #. type: Content of: <book><chapter><sect1><sect2><para> 12427 #. type: Content of: <book><chapter><sect1><sect2><para>
12445 #: ../en/ch09-hook.xml:1810 12428 #: ../en/ch09-hook.xml:1810
12446 msgid "" 12429 msgid ""
12447 "See also: <literal role=\"hook\">tag</literal> (section <xref linkend=\"sec." 12430 "See also: <literal role=\"hook\">tag</literal> (<xref linkend=\"sec:hook:tag"
12448 "hook.tag\"/>)" 12431 "\"/>)"
12449 msgstr "" 12432 msgstr ""
12450 12433
12451 #. type: Content of: <book><chapter><sect1><sect2><title> 12434 #. type: Content of: <book><chapter><sect1><sect2><title>
12452 #: ../en/ch09-hook.xml:1815 12435 #: ../en/ch09-hook.xml:1815
12453 msgid "" 12436 msgid ""
12491 "hook fails, all of the changesets are <quote>rejected</quote> when the " 12474 "hook fails, all of the changesets are <quote>rejected</quote> when the "
12492 "transaction rolls back." 12475 "transaction rolls back."
12493 msgstr "" 12476 msgstr ""
12494 12477
12495 #. type: Content of: <book><chapter><sect1><sect2><para> 12478 #. type: Content of: <book><chapter><sect1><sect2><para>
12496 #: ../en/ch09-hook.xml:1871 12479 #: ../en/ch09-hook.xml:1870
12497 msgid "" 12480 msgid ""
12498 "See also: <literal role=\"hook\">changegroup</literal> (section <xref linkend=" 12481 "See also: <literal role=\"hook\">changegroup</literal> (<xref linkend=\"sec:"
12499 "\"sec.hook.changegroup\"/>), <literal role=\"hook\">incoming</literal> " 12482 "hook:changegroup\"/>), <literal role=\"hook\">incoming</literal> (<xref "
12500 "(section <xref linkend=\"sec.hook.incoming\"/>), <literal role=\"hook" 12483 "linkend=\"sec:hook:incoming\"/>), <literal role=\"hook\">prechangegroup</"
12501 "\">prechangegroup</literal> (section <xref linkend=\"sec.hook.prechangegroup" 12484 "literal> (<xref linkend=\"sec:hook:prechangegroup\"/>)"
12502 "\"/>)"
12503 msgstr "" 12485 msgstr ""
12504 12486
12505 #. type: Content of: <book><chapter><sect1><sect2><title> 12487 #. type: Content of: <book><chapter><sect1><sect2><title>
12506 #: ../en/ch09-hook.xml:1881 12488 #: ../en/ch09-hook.xml:1881
12507 msgid "" 12489 msgid ""
12535 "avoid them." 12517 "avoid them."
12536 msgstr "" 12518 msgstr ""
12537 12519
12538 #. type: Content of: <book><chapter><sect1><sect2><para> 12520 #. type: Content of: <book><chapter><sect1><sect2><para>
12539 #: ../en/ch09-hook.xml:1922 12521 #: ../en/ch09-hook.xml:1922
12540 msgid "" 12522 #, fuzzy
12541 "See also: <literal role=\"hook\">precommit</literal> (section <xref linkend=" 12523 msgid ""
12542 "\"sec.hook.precommit\"/>)" 12524 "See also: <literal role=\"hook\">precommit</literal> (<xref linkend=\"sec:"
12543 msgstr "" 12525 "hook:precommit\"/>)"
12526 msgstr "<literal role=\"hook\">precommit</literal>&emdash;提交修改集之前"
12544 12527
12545 #. type: Content of: <book><chapter><sect1><sect2><title> 12528 #. type: Content of: <book><chapter><sect1><sect2><title>
12546 #: ../en/ch09-hook.xml:1928 12529 #: ../en/ch09-hook.xml:1929
12547 msgid "" 12530 msgid ""
12548 "<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging " 12531 "<literal role=\"hook\">preupdate</literal>&emdash;before updating or merging "
12549 "working directory" 12532 "working directory"
12550 msgstr "" 12533 msgstr ""
12551 "<literal role=\"hook\">preupdate</literal>&emdash;更新或合并工作目录之前" 12534 "<literal role=\"hook\">preupdate</literal>&emdash;更新或合并工作目录之前"
12552 12535
12553 #. type: Content of: <book><chapter><sect1><sect2><para> 12536 #. type: Content of: <book><chapter><sect1><sect2><para>
12554 #: ../en/ch09-hook.xml:1931 12537 #: ../en/ch09-hook.xml:1932
12555 msgid "" 12538 msgid ""
12556 "This controlling hook is run before an update or merge of the working " 12539 "This controlling hook is run before an update or merge of the working "
12557 "directory begins. It is run only if Mercurial's normal pre-update checks " 12540 "directory begins. It is run only if Mercurial's normal pre-update checks "
12558 "determine that the update or merge can proceed. If the hook succeeds, the " 12541 "determine that the update or merge can proceed. If the hook succeeds, the "
12559 "update or merge may proceed; if it fails, the update or merge does not start." 12542 "update or merge may proceed; if it fails, the update or merge does not start."
12560 msgstr "" 12543 msgstr ""
12561 12544
12562 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12545 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12563 #: ../en/ch09-hook.xml:1941 12546 #: ../en/ch09-hook.xml:1943
12564 msgid "" 12547 msgid ""
12565 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 12548 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the "
12566 "working directory is to be updated to. If the working directory is being " 12549 "working directory is to be updated to. If the working directory is being "
12567 "merged, it will not change this parent." 12550 "merged, it will not change this parent."
12568 msgstr "" 12551 msgstr ""
12569 12552
12570 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12553 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12571 #: ../en/ch09-hook.xml:1947 12554 #: ../en/ch09-hook.xml:1949
12572 msgid "" 12555 msgid ""
12573 "<literal>parent2</literal>: A changeset ID. Only set if the working " 12556 "<literal>parent2</literal>: A changeset ID. Only set if the working directory "
12574 "directory is being merged. The ID of the revision that the working directory " 12557 "is being merged. The ID of the revision that the working directory is being "
12575 "is being merged with." 12558 "merged with."
12576 msgstr "" 12559 msgstr ""
12577 12560
12578 #. type: Content of: <book><chapter><sect1><sect2><para> 12561 #. type: Content of: <book><chapter><sect1><sect2><para>
12579 #: ../en/ch09-hook.xml:1954 12562 #: ../en/ch09-hook.xml:1956
12580 msgid "" 12563 msgid ""
12581 "See also: <literal role=\"hook\">update</literal> (section <xref linkend=" 12564 "See also: <literal role=\"hook\">update</literal> (<xref linkend=\"sec:hook:"
12582 "\"sec.hook.update\"/>)" 12565 "update\"/>)"
12583 msgstr "" 12566 msgstr ""
12584 12567
12585 #. type: Content of: <book><chapter><sect1><sect2><title> 12568 #. type: Content of: <book><chapter><sect1><sect2><title>
12586 #: ../en/ch09-hook.xml:1960 12569 #: ../en/ch09-hook.xml:1961
12587 msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset" 12570 msgid "<literal role=\"hook\">tag</literal>&emdash;after tagging a changeset"
12588 msgstr "<literal role=\"hook\">tag</literal>&emdash;创建标签之后" 12571 msgstr "<literal role=\"hook\">tag</literal>&emdash;创建标签之后"
12589 12572
12590 #. type: Content of: <book><chapter><sect1><sect2><para> 12573 #. type: Content of: <book><chapter><sect1><sect2><para>
12591 #: ../en/ch09-hook.xml:1963 12574 #: ../en/ch09-hook.xml:1964
12592 msgid "This hook is run after a tag has been created." 12575 msgid "This hook is run after a tag has been created."
12593 msgstr "" 12576 msgstr ""
12594 12577
12595 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12578 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12596 #: ../en/ch09-hook.xml:1969 12579 #: ../en/ch09-hook.xml:1970
12597 msgid "" 12580 msgid ""
12598 "<literal>local</literal>: A boolean. Whether the new tag is local to this " 12581 "<literal>local</literal>: A boolean. Whether the new tag is local to this "
12599 "repository instance (i.e. stored in <filename role=\"special\">.hg/" 12582 "repository instance (i.e. stored in <filename role=\"special\">.hg/"
12600 "localtags</filename>) or managed by Mercurial (stored in <filename role=" 12583 "localtags</filename>) or managed by Mercurial (stored in <filename role="
12601 "\"special\">.hgtags</filename>)." 12584 "\"special\">.hgtags</filename>)."
12602 msgstr "" 12585 msgstr ""
12603 12586
12604 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12587 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12605 #: ../en/ch09-hook.xml:1977 12588 #: ../en/ch09-hook.xml:1978
12606 msgid "" 12589 msgid ""
12607 "<literal>node</literal>: A changeset ID. The ID of the changeset that was " 12590 "<literal>node</literal>: A changeset ID. The ID of the changeset that was "
12608 "tagged." 12591 "tagged."
12609 msgstr "" 12592 msgstr ""
12610 12593
12611 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12594 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12612 #: ../en/ch09-hook.xml:1981 12595 #: ../en/ch09-hook.xml:1982
12613 msgid "<literal>tag</literal>: A string. The name of the tag that was created." 12596 msgid "<literal>tag</literal>: A string. The name of the tag that was created."
12614 msgstr "" 12597 msgstr ""
12615 12598
12616 #. type: Content of: <book><chapter><sect1><sect2><para> 12599 #. type: Content of: <book><chapter><sect1><sect2><para>
12617 #: ../en/ch09-hook.xml:1986 12600 #: ../en/ch09-hook.xml:1987
12618 msgid "" 12601 msgid ""
12619 "If the created tag is revision-controlled, the <literal role=\"hook\">commit</" 12602 "If the created tag is revision-controlled, the <literal role=\"hook\">commit</"
12620 "literal> hook (section <xref linkend=\"sec.hook.commit\"/>) is run before " 12603 "literal> hook (section <xref linkend=\"sec:hook:commit\"/>) is run before "
12621 "this hook." 12604 "this hook."
12622 msgstr "" 12605 msgstr ""
12623 12606
12624 #. type: Content of: <book><chapter><sect1><sect2><para> 12607 #. type: Content of: <book><chapter><sect1><sect2><para>
12625 #: ../en/ch09-hook.xml:1991 12608 #: ../en/ch09-hook.xml:1992
12626 msgid "" 12609 #, fuzzy
12627 "See also: <literal role=\"hook\">pretag</literal> (section <xref linkend=" 12610 msgid ""
12628 "\"sec.hook.pretag\"/>)" 12611 "See also: <literal role=\"hook\">pretag</literal> (<xref linkend=\"sec:hook:"
12629 msgstr "" 12612 "pretag\"/>)"
12613 msgstr "<literal role=\"hook\">pretag</literal>&emdash;创建标签之前"
12630 12614
12631 #. type: Content of: <book><chapter><sect1><sect2><title> 12615 #. type: Content of: <book><chapter><sect1><sect2><title>
12632 #: ../en/ch09-hook.xml:1997 12616 #: ../en/ch09-hook.xml:1998
12633 msgid "" 12617 msgid ""
12634 "<literal role=\"hook\">update</literal>&emdash;after updating or merging " 12618 "<literal role=\"hook\">update</literal>&emdash;after updating or merging "
12635 "working directory" 12619 "working directory"
12636 msgstr "<literal role=\"hook\">update</literal>&emdash;更新或合并工作目录之后" 12620 msgstr "<literal role=\"hook\">update</literal>&emdash;更新或合并工作目录之后"
12637 12621
12638 #. type: Content of: <book><chapter><sect1><sect2><para> 12622 #. type: Content of: <book><chapter><sect1><sect2><para>
12639 #: ../en/ch09-hook.xml:2000 12623 #: ../en/ch09-hook.xml:2001
12640 msgid "" 12624 msgid ""
12641 "This hook is run after an update or merge of the working directory " 12625 "This hook is run after an update or merge of the working directory "
12642 "completes. Since a merge can fail (if the external <command>hgmerge</" 12626 "completes. Since a merge can fail (if the external <command>hgmerge</"
12643 "command> command fails to resolve conflicts in a file), this hook " 12627 "command> command fails to resolve conflicts in a file), this hook "
12644 "communicates whether the update or merge completed cleanly." 12628 "communicates whether the update or merge completed cleanly."
12645 msgstr "" 12629 msgstr ""
12646 12630
12647 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12631 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12648 #: ../en/ch09-hook.xml:2008 12632 #: ../en/ch09-hook.xml:2009
12649 msgid "" 12633 msgid ""
12650 "<literal>error</literal>: A boolean. Indicates whether the update or merge " 12634 "<literal>error</literal>: A boolean. Indicates whether the update or merge "
12651 "completed successfully." 12635 "completed successfully."
12652 msgstr "" 12636 msgstr ""
12653 12637
12654 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12638 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12655 #: ../en/ch09-hook.xml:2013 12639 #: ../en/ch09-hook.xml:2014
12656 msgid "" 12640 msgid ""
12657 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the " 12641 "<literal>parent1</literal>: A changeset ID. The ID of the parent that the "
12658 "working directory was updated to. If the working directory was merged, it " 12642 "working directory was updated to. If the working directory was merged, it "
12659 "will not have changed this parent." 12643 "will not have changed this parent."
12660 msgstr "" 12644 msgstr ""
12661 12645
12662 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 12646 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
12663 #: ../en/ch09-hook.xml:2019 12647 #: ../en/ch09-hook.xml:2020
12664 msgid "" 12648 msgid ""
12665 "<literal>parent2</literal>: A changeset ID. Only set if the working " 12649 "<literal>parent2</literal>: A changeset ID. Only set if the working "
12666 "directory was merged. The ID of the revision that the working directory was " 12650 "directory was merged. The ID of the revision that the working directory was "
12667 "merged with." 12651 "merged with."
12668 msgstr "" 12652 msgstr ""
12669 12653
12670 #. type: Content of: <book><chapter><sect1><sect2><para> 12654 #. type: Content of: <book><chapter><sect1><sect2><para>
12671 #: ../en/ch09-hook.xml:2025 12655 #: ../en/ch09-hook.xml:2026
12672 msgid "" 12656 msgid ""
12673 "See also: <literal role=\"hook\">preupdate</literal> (section <xref linkend=" 12657 "See also: <literal role=\"hook\">preupdate</literal> (<xref linkend=\"sec:"
12674 "\"sec.hook.preupdate\"/>)" 12658 "hook:preupdate\"/>)"
12675 msgstr "" 12659 msgstr ""
12676 12660
12677 #. type: Content of: <book><chapter><title> 12661 #. type: Content of: <book><chapter><title>
12678 #: ../en/ch10-template.xml:5 12662 #: ../en/ch10-template.xml:5
12679 msgid "Customising the output of Mercurial" 12663 msgid "Customising the output of Mercurial"
12816 #: ../en/ch10-template.xml:105 12800 #: ../en/ch10-template.xml:105
12817 msgid "" 12801 msgid ""
12818 "Notice that the template string above ends with the text <quote><literal>\\n</" 12802 "Notice that the template string above ends with the text <quote><literal>\\n</"
12819 "literal></quote>. This is an <emphasis>escape sequence</emphasis>, telling " 12803 "literal></quote>. This is an <emphasis>escape sequence</emphasis>, telling "
12820 "Mercurial to print a newline at the end of each template item. If you omit " 12804 "Mercurial to print a newline at the end of each template item. If you omit "
12821 "this newline, Mercurial will run each piece of output together. See section " 12805 "this newline, Mercurial will run each piece of output together. See <xref "
12822 "<xref linkend=\"sec.template.escape\"/> for more details of escape sequences." 12806 "linkend=\"sec:template:escape\"/> for more details of escape sequences."
12823 msgstr "" 12807 msgstr ""
12824 12808
12825 #. type: Content of: <book><chapter><sect1><para> 12809 #. type: Content of: <book><chapter><sect1><para>
12826 #: ../en/ch10-template.xml:113 12810 #: ../en/ch10-template.xml:113
12827 msgid "" 12811 msgid ""
12836 "template has been replaced in the output with the description of each " 12820 "template has been replaced in the output with the description of each "
12837 "changeset. Every time Mercurial finds text enclosed in curly braces " 12821 "changeset. Every time Mercurial finds text enclosed in curly braces "
12838 "(<quote><literal>{</literal></quote> and <quote><literal>}</literal></" 12822 "(<quote><literal>{</literal></quote> and <quote><literal>}</literal></"
12839 "quote>), it will try to replace the braces and text with the expansion of " 12823 "quote>), it will try to replace the braces and text with the expansion of "
12840 "whatever is inside. To print a literal curly brace, you must escape it, as " 12824 "whatever is inside. To print a literal curly brace, you must escape it, as "
12841 "described in section <xref linkend=\"sec.template.escape\"/>." 12825 "described in <xref linkend=\"sec:template:escape\"/>."
12842 msgstr "" 12826 msgstr ""
12843 12827
12844 #. type: Content of: <book><chapter><sect1><title> 12828 #. type: Content of: <book><chapter><sect1><title>
12845 #: ../en/ch10-template.xml:132 12829 #: ../en/ch10-template.xml:131
12846 msgid "Common template keywords" 12830 msgid "Common template keywords"
12847 msgstr "模版关键字" 12831 msgstr "模版关键字"
12848 12832
12849 #. type: Content of: <book><chapter><sect1><para> 12833 #. type: Content of: <book><chapter><sect1><para>
12850 #: ../en/ch10-template.xml:134 12834 #: ../en/ch10-template.xml:133
12851 msgid "" 12835 msgid ""
12852 "You can start writing simple templates immediately using the keywords below." 12836 "You can start writing simple templates immediately using the keywords below."
12853 msgstr "" 12837 msgstr ""
12854 12838
12855 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12839 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12856 #: ../en/ch10-template.xml:138 12840 #: ../en/ch10-template.xml:137
12857 msgid "" 12841 msgid ""
12858 "<literal role=\"template-keyword\">author</literal>: String. The unmodified " 12842 "<literal role=\"template-keyword\">author</literal>: String. The unmodified "
12859 "author of the changeset." 12843 "author of the changeset."
12860 msgstr "" 12844 msgstr ""
12861 12845
12862 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12846 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12863 #: ../en/ch10-template.xml:142 12847 #: ../en/ch10-template.xml:141
12864 msgid "" 12848 msgid ""
12865 "<literal role=\"template-keyword\">branches</literal>: String. The name of " 12849 "<literal role=\"template-keyword\">branches</literal>: String. The name of "
12866 "the branch on which the changeset was committed. Will be empty if the branch " 12850 "the branch on which the changeset was committed. Will be empty if the branch "
12867 "name was <literal>default</literal>." 12851 "name was <literal>default</literal>."
12868 msgstr "" 12852 msgstr ""
12869 12853
12870 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12854 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12871 #: ../en/ch10-template.xml:148 12855 #: ../en/ch10-template.xml:147
12872 msgid "" 12856 msgid ""
12873 "<literal role=\"template-keyword\">date</literal>: Date information. The " 12857 "<literal role=\"template-keyword\">date</literal>: Date information. The "
12874 "date when the changeset was committed. This is <emphasis>not</emphasis> " 12858 "date when the changeset was committed. This is <emphasis>not</emphasis> "
12875 "human-readable; you must pass it through a filter that will render it " 12859 "human-readable; you must pass it through a filter that will render it "
12876 "appropriately. See section <xref linkend=\"sec.template.filter\"/> for more " 12860 "appropriately. See <xref linkend=\"sec:template:filter\"/> for more "
12877 "information on filters. The date is expressed as a pair of numbers. The " 12861 "information on filters. The date is expressed as a pair of numbers. The "
12878 "first number is a Unix UTC timestamp (seconds since January 1, 1970); the " 12862 "first number is a Unix UTC timestamp (seconds since January 1, 1970); the "
12879 "second is the offset of the committer's timezone from UTC, in seconds." 12863 "second is the offset of the committer's timezone from UTC, in seconds."
12880 msgstr "" 12864 msgstr ""
12881 12865
12882 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12866 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12883 #: ../en/ch10-template.xml:159 12867 #: ../en/ch10-template.xml:158
12884 msgid "" 12868 msgid ""
12885 "<literal role=\"template-keyword\">desc</literal>: String. The text of the " 12869 "<literal role=\"template-keyword\">desc</literal>: String. The text of the "
12886 "changeset description." 12870 "changeset description."
12887 msgstr "" 12871 msgstr ""
12888 12872
12889 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12873 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12890 #: ../en/ch10-template.xml:162 12874 #: ../en/ch10-template.xml:161
12891 msgid "" 12875 msgid ""
12892 "<literal role=\"template-keyword\">files</literal>: List of strings. All " 12876 "<literal role=\"template-keyword\">files</literal>: List of strings. All "
12893 "files modified, added, or removed by this changeset." 12877 "files modified, added, or removed by this changeset."
12894 msgstr "" 12878 msgstr ""
12895 12879
12896 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12880 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12897 #: ../en/ch10-template.xml:167 12881 #: ../en/ch10-template.xml:166
12898 msgid "" 12882 msgid ""
12899 "<literal role=\"template-keyword\">file_adds</literal>: List of strings. " 12883 "<literal role=\"template-keyword\">file_adds</literal>: List of strings. "
12900 "Files added by this changeset." 12884 "Files added by this changeset."
12901 msgstr "" 12885 msgstr ""
12902 12886
12903 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12887 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12904 #: ../en/ch10-template.xml:171 12888 #: ../en/ch10-template.xml:170
12905 msgid "" 12889 msgid ""
12906 "<literal role=\"template-keyword\">file_dels</literal>: List of strings. " 12890 "<literal role=\"template-keyword\">file_dels</literal>: List of strings. "
12907 "Files removed by this changeset." 12891 "Files removed by this changeset."
12908 msgstr "" 12892 msgstr ""
12909 12893
12910 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12894 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12911 #: ../en/ch10-template.xml:175 12895 #: ../en/ch10-template.xml:174
12912 msgid "" 12896 msgid ""
12913 "<literal role=\"template-keyword\">node</literal>: String. The changeset " 12897 "<literal role=\"template-keyword\">node</literal>: String. The changeset "
12914 "identification hash, as a 40-character hexadecimal string." 12898 "identification hash, as a 40-character hexadecimal string."
12915 msgstr "" 12899 msgstr ""
12916 12900
12917 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12901 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12918 #: ../en/ch10-template.xml:179 12902 #: ../en/ch10-template.xml:178
12919 msgid "" 12903 msgid ""
12920 "<literal role=\"template-keyword\">parents</literal>: List of strings. The " 12904 "<literal role=\"template-keyword\">parents</literal>: List of strings. The "
12921 "parents of the changeset." 12905 "parents of the changeset."
12922 msgstr "" 12906 msgstr ""
12923 12907
12924 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12908 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12925 #: ../en/ch10-template.xml:183 12909 #: ../en/ch10-template.xml:182
12926 msgid "" 12910 msgid ""
12927 "<literal role=\"template-keyword\">rev</literal>: Integer. The repository-" 12911 "<literal role=\"template-keyword\">rev</literal>: Integer. The repository-"
12928 "local changeset revision number." 12912 "local changeset revision number."
12929 msgstr "" 12913 msgstr ""
12930 12914
12931 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12915 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12932 #: ../en/ch10-template.xml:187 12916 #: ../en/ch10-template.xml:186
12933 msgid "" 12917 msgid ""
12934 "<literal role=\"template-keyword\">tags</literal>: List of strings. Any tags " 12918 "<literal role=\"template-keyword\">tags</literal>: List of strings. Any tags "
12935 "associated with the changeset." 12919 "associated with the changeset."
12936 msgstr "" 12920 msgstr ""
12937 12921
12938 #. type: Content of: <book><chapter><sect1><para> 12922 #. type: Content of: <book><chapter><sect1><para>
12939 #: ../en/ch10-template.xml:192 12923 #: ../en/ch10-template.xml:191
12940 msgid "" 12924 msgid ""
12941 "A few simple experiments will show us what to expect when we use these " 12925 "A few simple experiments will show us what to expect when we use these "
12942 "keywords; you can see the results below." 12926 "keywords; you can see the results below."
12943 msgstr "" 12927 msgstr ""
12944 12928
12945 #. type: Content of: <book><chapter><sect1><para> 12929 #. type: Content of: <book><chapter><sect1><para>
12946 #: ../en/ch10-template.xml:197 12930 #: ../en/ch10-template.xml:196
12947 msgid "" 12931 msgid ""
12948 "As we noted above, the date keyword does not produce human-readable output, " 12932 "As we noted above, the date keyword does not produce human-readable output, "
12949 "so we must treat it specially. This involves using a <emphasis>filter</" 12933 "so we must treat it specially. This involves using a <emphasis>filter</"
12950 "emphasis>, about which more in section <xref linkend=\"sec.template.filter\"/" 12934 "emphasis>, about which more in <xref linkend=\"sec:template:filter\"/>."
12951 ">."
12952 msgstr "" 12935 msgstr ""
12953 12936
12954 #. type: Content of: <book><chapter><sect1><title> 12937 #. type: Content of: <book><chapter><sect1><title>
12955 #: ../en/ch10-template.xml:207 12938 #: ../en/ch10-template.xml:205
12956 msgid "Escape sequences" 12939 msgid "Escape sequences"
12957 msgstr "转义序列" 12940 msgstr "转义序列"
12958 12941
12959 #. type: Content of: <book><chapter><sect1><para> 12942 #. type: Content of: <book><chapter><sect1><para>
12960 #: ../en/ch10-template.xml:209 12943 #: ../en/ch10-template.xml:207
12961 msgid "" 12944 msgid ""
12962 "Mercurial's templating engine recognises the most commonly used escape " 12945 "Mercurial's templating engine recognises the most commonly used escape "
12963 "sequences in strings. When it sees a backslash (<quote><literal>\\</" 12946 "sequences in strings. When it sees a backslash (<quote><literal>\\</"
12964 "literal></quote>) character, it looks at the following character and " 12947 "literal></quote>) character, it looks at the following character and "
12965 "substitutes the two characters with a single replacement, as described below." 12948 "substitutes the two characters with a single replacement, as described below."
12966 msgstr "" 12949 msgstr ""
12967 12950
12968 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12951 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12969 #: ../en/ch10-template.xml:216 12952 #: ../en/ch10-template.xml:214
12970 msgid "" 12953 msgid ""
12971 "<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII " 12954 "<literal>\\</literal>: Backslash, <quote><literal>\\</literal></quote>, ASCII "
12972 "134." 12955 "134."
12973 msgstr "" 12956 msgstr ""
12974 12957
12975 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12958 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12976 #: ../en/ch10-template.xml:220 12959 #: ../en/ch10-template.xml:218
12977 msgid "<literal>\\n</literal>: Newline, ASCII 12." 12960 msgid "<literal>\\n</literal>: Newline, ASCII 12."
12978 msgstr "" 12961 msgstr ""
12979 12962
12980 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12963 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12981 #: ../en/ch10-template.xml:223 12964 #: ../en/ch10-template.xml:221
12982 msgid "<literal>\\r</literal>: Carriage return, ASCII 15." 12965 msgid "<literal>\\r</literal>: Carriage return, ASCII 15."
12983 msgstr "" 12966 msgstr ""
12984 12967
12985 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12968 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12986 #: ../en/ch10-template.xml:226 12969 #: ../en/ch10-template.xml:224
12987 msgid "<literal>\\t</literal>: Tab, ASCII 11." 12970 msgid "<literal>\\t</literal>: Tab, ASCII 11."
12988 msgstr "" 12971 msgstr ""
12989 12972
12990 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12973 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12991 #: ../en/ch10-template.xml:229 12974 #: ../en/ch10-template.xml:227
12992 msgid "<literal>\\v</literal>: Vertical tab, ASCII 13." 12975 msgid "<literal>\\v</literal>: Vertical tab, ASCII 13."
12993 msgstr "" 12976 msgstr ""
12994 12977
12995 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12978 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
12996 #: ../en/ch10-template.xml:232 12979 #: ../en/ch10-template.xml:230
12997 msgid "" 12980 msgid ""
12998 "<literal>{</literal>: Open curly brace, <quote><literal>{</literal></quote>, " 12981 "<literal>{</literal>: Open curly brace, <quote><literal>{</literal></quote>, "
12999 "ASCII 173." 12982 "ASCII 173."
13000 msgstr "" 12983 msgstr ""
13001 12984
13002 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 12985 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13003 #: ../en/ch10-template.xml:236 12986 #: ../en/ch10-template.xml:234
13004 msgid "" 12987 msgid ""
13005 "<literal>}</literal>: Close curly brace, <quote><literal>}</literal></quote>, " 12988 "<literal>}</literal>: Close curly brace, <quote><literal>}</literal></quote>, "
13006 "ASCII 175." 12989 "ASCII 175."
13007 msgstr "" 12990 msgstr ""
13008 12991
13009 #. type: Content of: <book><chapter><sect1><para> 12992 #. type: Content of: <book><chapter><sect1><para>
13010 #: ../en/ch10-template.xml:241 12993 #: ../en/ch10-template.xml:239
13011 msgid "" 12994 msgid ""
13012 "As indicated above, if you want the expansion of a template to contain a " 12995 "As indicated above, if you want the expansion of a template to contain a "
13013 "literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></" 12996 "literal <quote><literal>\\</literal></quote>, <quote><literal>{</literal></"
13014 "quote>, or <quote><literal>{</literal></quote> character, you must escape it." 12997 "quote>, or <quote><literal>{</literal></quote> character, you must escape it."
13015 msgstr "" 12998 msgstr ""
13016 12999
13017 #. type: Content of: <book><chapter><sect1><title> 13000 #. type: Content of: <book><chapter><sect1><title>
13018 #: ../en/ch10-template.xml:249 13001 #: ../en/ch10-template.xml:247
13019 msgid "Filtering keywords to change their results" 13002 msgid "Filtering keywords to change their results"
13020 msgstr "通过过滤关键字来修改输出结果" 13003 msgstr "通过过滤关键字来修改输出结果"
13021 13004
13022 #. type: Content of: <book><chapter><sect1><para> 13005 #. type: Content of: <book><chapter><sect1><para>
13023 #: ../en/ch10-template.xml:251 13006 #: ../en/ch10-template.xml:249
13024 msgid "" 13007 msgid ""
13025 "Some of the results of template expansion are not immediately easy to use. " 13008 "Some of the results of template expansion are not immediately easy to use. "
13026 "Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> " 13009 "Mercurial lets you specify an optional chain of <emphasis>filters</emphasis> "
13027 "to modify the result of expanding a keyword. You have already seen a common " 13010 "to modify the result of expanding a keyword. You have already seen a common "
13028 "filter, <literal role=\"template-kw-filt-date\">isodate</literal>, in action " 13011 "filter, <literal role=\"template-kw-filt-date\">isodate</literal>, in action "
13029 "above, to make a date readable." 13012 "above, to make a date readable."
13030 msgstr "" 13013 msgstr ""
13031 13014
13032 #. type: Content of: <book><chapter><sect1><para> 13015 #. type: Content of: <book><chapter><sect1><para>
13033 #: ../en/ch10-template.xml:258 13016 #: ../en/ch10-template.xml:256
13034 msgid "" 13017 msgid ""
13035 "Below is a list of the most commonly used filters that Mercurial supports. " 13018 "Below is a list of the most commonly used filters that Mercurial supports. "
13036 "While some filters can be applied to any text, others can only be used in " 13019 "While some filters can be applied to any text, others can only be used in "
13037 "specific circumstances. The name of each filter is followed first by an " 13020 "specific circumstances. The name of each filter is followed first by an "
13038 "indication of where it can be used, then a description of its effect." 13021 "indication of where it can be used, then a description of its effect."
13039 msgstr "" 13022 msgstr ""
13040 13023
13041 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13024 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13042 #: ../en/ch10-template.xml:265 13025 #: ../en/ch10-template.xml:263
13043 msgid "" 13026 msgid ""
13044 "<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML " 13027 "<literal role=\"template-filter\">addbreaks</literal>: Any text. Add an XHTML "
13045 "<quote><literal>&lt;br/&gt;</literal></quote> tag before the end of every " 13028 "<quote><literal>&lt;br/&gt;</literal></quote> tag before the end of every "
13046 "line except the last. For example, <quote><literal>foo\\nbar</literal></" 13029 "line except the last. For example, <quote><literal>foo\\nbar</literal></"
13047 "quote> becomes <quote><literal>foo&lt;br/&gt;\\nbar</literal></quote>." 13030 "quote> becomes <quote><literal>foo&lt;br/&gt;\\nbar</literal></quote>."
13048 msgstr "" 13031 msgstr ""
13049 13032
13050 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13033 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13051 #: ../en/ch10-template.xml:272 13034 #: ../en/ch10-template.xml:270
13052 msgid "" 13035 msgid ""
13053 "<literal role=\"template-kw-filt-date\">age</literal>: <literal role=" 13036 "<literal role=\"template-kw-filt-date\">age</literal>: <literal role="
13054 "\"template-keyword\">date</literal> keyword. Render the age of the date, " 13037 "\"template-keyword\">date</literal> keyword. Render the age of the date, "
13055 "relative to the current time. Yields a string like <quote><literal>10 " 13038 "relative to the current time. Yields a string like <quote><literal>10 "
13056 "minutes</literal></quote>." 13039 "minutes</literal></quote>."
13057 msgstr "" 13040 msgstr ""
13058 13041
13059 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13042 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13060 #: ../en/ch10-template.xml:279 13043 #: ../en/ch10-template.xml:277
13061 msgid "" 13044 msgid ""
13062 "<literal role=\"template-filter\">basename</literal>: Any text, but most " 13045 "<literal role=\"template-filter\">basename</literal>: Any text, but most "
13063 "useful for the <literal role=\"template-keyword\">files</literal> keyword and " 13046 "useful for the <literal role=\"template-keyword\">files</literal> keyword and "
13064 "its relatives. Treat the text as a path, and return the basename. For " 13047 "its relatives. Treat the text as a path, and return the basename. For "
13065 "example, <quote><literal>foo/bar/baz</literal></quote> becomes " 13048 "example, <quote><literal>foo/bar/baz</literal></quote> becomes "
13066 "<quote><literal>baz</literal></quote>." 13049 "<quote><literal>baz</literal></quote>."
13067 msgstr "" 13050 msgstr ""
13068 13051
13069 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13052 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13070 #: ../en/ch10-template.xml:288 13053 #: ../en/ch10-template.xml:286
13071 msgid "" 13054 msgid ""
13072 "<literal role=\"template-kw-filt-date\">date</literal>: <literal role=" 13055 "<literal role=\"template-kw-filt-date\">date</literal>: <literal role="
13073 "\"template-keyword\">date</literal> keyword. Render a date in a similar " 13056 "\"template-keyword\">date</literal> keyword. Render a date in a similar "
13074 "format to the Unix <literal role=\"template-keyword\">date</literal> command, " 13057 "format to the Unix <literal role=\"template-keyword\">date</literal> command, "
13075 "but with timezone included. Yields a string like <quote><literal>Mon Sep 04 " 13058 "but with timezone included. Yields a string like <quote><literal>Mon Sep 04 "
13076 "15:13:13 2006 -0700</literal></quote>." 13059 "15:13:13 2006 -0700</literal></quote>."
13077 msgstr "" 13060 msgstr ""
13078 13061
13079 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13062 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13080 #: ../en/ch10-template.xml:296 13063 #: ../en/ch10-template.xml:294
13081 msgid "" 13064 msgid ""
13082 "<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but " 13065 "<literal role=\"template-kw-filt-author\">domain</literal>: Any text, but "
13083 "most useful for the <literal role=\"template-keyword\">author</literal> " 13066 "most useful for the <literal role=\"template-keyword\">author</literal> "
13084 "keyword. Finds the first string that looks like an email address, and " 13067 "keyword. Finds the first string that looks like an email address, and "
13085 "extract just the domain component. For example, <quote><literal>Bryan " 13068 "extract just the domain component. For example, <quote><literal>Bryan "
13086 "O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> becomes " 13069 "O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> becomes "
13087 "<quote><literal>serpentine.com</literal></quote>." 13070 "<quote><literal>serpentine.com</literal></quote>."
13088 msgstr "" 13071 msgstr ""
13089 13072
13090 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13073 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13091 #: ../en/ch10-template.xml:306 13074 #: ../en/ch10-template.xml:304
13092 msgid "" 13075 msgid ""
13093 "<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most " 13076 "<literal role=\"template-kw-filt-author\">email</literal>: Any text, but most "
13094 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 13077 "useful for the <literal role=\"template-keyword\">author</literal> keyword. "
13095 "Extract the first string that looks like an email address. For example, " 13078 "Extract the first string that looks like an email address. For example, "
13096 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> " 13079 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
13097 "becomes <quote><literal>bos@serpentine.com</literal></quote>." 13080 "becomes <quote><literal>bos@serpentine.com</literal></quote>."
13098 msgstr "" 13081 msgstr ""
13099 13082
13100 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13083 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13101 #: ../en/ch10-template.xml:315 13084 #: ../en/ch10-template.xml:313
13102 msgid "" 13085 msgid ""
13103 "<literal role=\"template-filter\">escape</literal>: Any text. Replace the " 13086 "<literal role=\"template-filter\">escape</literal>: Any text. Replace the "
13104 "special XML/XHTML characters <quote><literal>&amp;</literal></quote>, " 13087 "special XML/XHTML characters <quote><literal>&amp;</literal></quote>, "
13105 "<quote><literal>&lt;</literal></quote> and <quote><literal>&gt;</literal></" 13088 "<quote><literal>&lt;</literal></quote> and <quote><literal>&gt;</literal></"
13106 "quote> with XML entities." 13089 "quote> with XML entities."
13107 msgstr "" 13090 msgstr ""
13108 13091
13109 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13092 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13110 #: ../en/ch10-template.xml:323 13093 #: ../en/ch10-template.xml:321
13111 msgid "" 13094 msgid ""
13112 "<literal role=\"template-filter\">fill68</literal>: Any text. Wrap the text " 13095 "<literal role=\"template-filter\">fill68</literal>: Any text. Wrap the text "
13113 "to fit in 68 columns. This is useful before you pass text through the " 13096 "to fit in 68 columns. This is useful before you pass text through the "
13114 "<literal role=\"template-filter\">tabindent</literal> filter, and still want " 13097 "<literal role=\"template-filter\">tabindent</literal> filter, and still want "
13115 "it to fit in an 80-column fixed-font window." 13098 "it to fit in an 80-column fixed-font window."
13116 msgstr "" 13099 msgstr ""
13117 13100
13118 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13101 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13119 #: ../en/ch10-template.xml:331 13102 #: ../en/ch10-template.xml:329
13120 msgid "" 13103 msgid ""
13121 "<literal role=\"template-filter\">fill76</literal>: Any text. Wrap the text " 13104 "<literal role=\"template-filter\">fill76</literal>: Any text. Wrap the text "
13122 "to fit in 76 columns." 13105 "to fit in 76 columns."
13123 msgstr "" 13106 msgstr ""
13124 13107
13125 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13108 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13126 #: ../en/ch10-template.xml:335 13109 #: ../en/ch10-template.xml:333
13127 msgid "" 13110 msgid ""
13128 "<literal role=\"template-filter\">firstline</literal>: Any text. Yield the " 13111 "<literal role=\"template-filter\">firstline</literal>: Any text. Yield the "
13129 "first line of text, without any trailing newlines." 13112 "first line of text, without any trailing newlines."
13130 msgstr "" 13113 msgstr ""
13131 13114
13132 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13115 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13133 #: ../en/ch10-template.xml:340 13116 #: ../en/ch10-template.xml:338
13134 msgid "" 13117 msgid ""
13135 "<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role=" 13118 "<literal role=\"template-kw-filt-date\">hgdate</literal>: <literal role="
13136 "\"template-keyword\">date</literal> keyword. Render the date as a pair of " 13119 "\"template-keyword\">date</literal> keyword. Render the date as a pair of "
13137 "readable numbers. Yields a string like <quote><literal>1157407993 25200</" 13120 "readable numbers. Yields a string like <quote><literal>1157407993 25200</"
13138 "literal></quote>." 13121 "literal></quote>."
13139 msgstr "" 13122 msgstr ""
13140 13123
13141 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13124 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13142 #: ../en/ch10-template.xml:347 13125 #: ../en/ch10-template.xml:345
13143 msgid "" 13126 msgid ""
13144 "<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role=" 13127 "<literal role=\"template-kw-filt-date\">isodate</literal>: <literal role="
13145 "\"template-keyword\">date</literal> keyword. Render the date as a text " 13128 "\"template-keyword\">date</literal> keyword. Render the date as a text "
13146 "string in ISO 8601 format. Yields a string like <quote><literal>2006-09-04 " 13129 "string in ISO 8601 format. Yields a string like <quote><literal>2006-09-04 "
13147 "15:13:13 -0700</literal></quote>." 13130 "15:13:13 -0700</literal></quote>."
13148 msgstr "" 13131 msgstr ""
13149 13132
13150 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13133 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13151 #: ../en/ch10-template.xml:354 13134 #: ../en/ch10-template.xml:352
13152 msgid "" 13135 msgid ""
13153 "<literal role=\"template-filter\">obfuscate</literal>: Any text, but most " 13136 "<literal role=\"template-filter\">obfuscate</literal>: Any text, but most "
13154 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 13137 "useful for the <literal role=\"template-keyword\">author</literal> keyword. "
13155 "Yield the input text rendered as a sequence of XML entities. This helps to " 13138 "Yield the input text rendered as a sequence of XML entities. This helps to "
13156 "defeat some particularly stupid screen-scraping email harvesting spambots." 13139 "defeat some particularly stupid screen-scraping email harvesting spambots."
13157 msgstr "" 13140 msgstr ""
13158 13141
13159 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13142 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13160 #: ../en/ch10-template.xml:362 13143 #: ../en/ch10-template.xml:360
13161 msgid "" 13144 msgid ""
13162 "<literal role=\"template-kw-filt-author\">person</literal>: Any text, but " 13145 "<literal role=\"template-kw-filt-author\">person</literal>: Any text, but "
13163 "most useful for the <literal role=\"template-keyword\">author</literal> " 13146 "most useful for the <literal role=\"template-keyword\">author</literal> "
13164 "keyword. Yield the text before an email address. For example, " 13147 "keyword. Yield the text before an email address. For example, "
13165 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> " 13148 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
13166 "becomes <quote><literal>Bryan O'Sullivan</literal></quote>." 13149 "becomes <quote><literal>Bryan O'Sullivan</literal></quote>."
13167 msgstr "" 13150 msgstr ""
13168 13151
13169 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13152 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13170 #: ../en/ch10-template.xml:371 13153 #: ../en/ch10-template.xml:369
13171 msgid "" 13154 msgid ""
13172 "<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role=" 13155 "<literal role=\"template-kw-filt-date\">rfc822date</literal>: <literal role="
13173 "\"template-keyword\">date</literal> keyword. Render a date using the same " 13156 "\"template-keyword\">date</literal> keyword. Render a date using the same "
13174 "format used in email headers. Yields a string like <quote><literal>Mon, 04 " 13157 "format used in email headers. Yields a string like <quote><literal>Mon, 04 "
13175 "Sep 2006 15:13:13 -0700</literal></quote>." 13158 "Sep 2006 15:13:13 -0700</literal></quote>."
13176 msgstr "" 13159 msgstr ""
13177 13160
13178 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13161 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13179 #: ../en/ch10-template.xml:378 13162 #: ../en/ch10-template.xml:376
13180 msgid "" 13163 msgid ""
13181 "<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash. " 13164 "<literal role=\"template-kw-filt-node\">short</literal>: Changeset hash. "
13182 "Yield the short form of a changeset hash, i.e. a 12-character hexadecimal " 13165 "Yield the short form of a changeset hash, i.e. a 12-character hexadecimal "
13183 "string." 13166 "string."
13184 msgstr "" 13167 msgstr ""
13185 13168
13186 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13169 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13187 #: ../en/ch10-template.xml:383 13170 #: ../en/ch10-template.xml:381
13188 msgid "" 13171 msgid ""
13189 "<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role=" 13172 "<literal role=\"template-kw-filt-date\">shortdate</literal>: <literal role="
13190 "\"template-keyword\">date</literal> keyword. Render the year, month, and day " 13173 "\"template-keyword\">date</literal> keyword. Render the year, month, and day "
13191 "of the date. Yields a string like <quote><literal>2006-09-04</literal></" 13174 "of the date. Yields a string like <quote><literal>2006-09-04</literal></"
13192 "quote>." 13175 "quote>."
13193 msgstr "" 13176 msgstr ""
13194 13177
13195 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13178 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13196 #: ../en/ch10-template.xml:389 13179 #: ../en/ch10-template.xml:387
13197 msgid "" 13180 msgid ""
13198 "<literal role=\"template-filter\">strip</literal>: Any text. Strip all " 13181 "<literal role=\"template-filter\">strip</literal>: Any text. Strip all "
13199 "leading and trailing whitespace from the string." 13182 "leading and trailing whitespace from the string."
13200 msgstr "" 13183 msgstr ""
13201 13184
13202 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13185 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13203 #: ../en/ch10-template.xml:393 13186 #: ../en/ch10-template.xml:391
13204 msgid "" 13187 msgid ""
13205 "<literal role=\"template-filter\">tabindent</literal>: Any text. Yield the " 13188 "<literal role=\"template-filter\">tabindent</literal>: Any text. Yield the "
13206 "text, with every line except the first starting with a tab character." 13189 "text, with every line except the first starting with a tab character."
13207 msgstr "" 13190 msgstr ""
13208 13191
13209 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13192 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13210 #: ../en/ch10-template.xml:398 13193 #: ../en/ch10-template.xml:396
13211 msgid "" 13194 msgid ""
13212 "<literal role=\"template-filter\">urlescape</literal>: Any text. Escape all " 13195 "<literal role=\"template-filter\">urlescape</literal>: Any text. Escape all "
13213 "characters that are considered <quote>special</quote> by URL parsers. For " 13196 "characters that are considered <quote>special</quote> by URL parsers. For "
13214 "example, <literal>foo bar</literal> becomes <literal>foo%20bar</literal>." 13197 "example, <literal>foo bar</literal> becomes <literal>foo%20bar</literal>."
13215 msgstr "" 13198 msgstr ""
13216 13199
13217 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 13200 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
13218 #: ../en/ch10-template.xml:405 13201 #: ../en/ch10-template.xml:403
13219 msgid "" 13202 msgid ""
13220 "<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most " 13203 "<literal role=\"template-kw-filt-author\">user</literal>: Any text, but most "
13221 "useful for the <literal role=\"template-keyword\">author</literal> keyword. " 13204 "useful for the <literal role=\"template-keyword\">author</literal> keyword. "
13222 "Return the <quote>user</quote> portion of an email address. For example, " 13205 "Return the <quote>user</quote> portion of an email address. For example, "
13223 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> " 13206 "<quote><literal>Bryan O'Sullivan &lt;bos@serpentine.com&gt;</literal></quote> "
13224 "becomes <quote><literal>bos</literal></quote>." 13207 "becomes <quote><literal>bos</literal></quote>."
13225 msgstr "" 13208 msgstr ""
13226 13209
13227 #. type: Content of: <book><chapter><sect1><note><para> 13210 #. type: Content of: <book><chapter><sect1><note><para>
13228 #: ../en/ch10-template.xml:418 13211 #: ../en/ch10-template.xml:416
13229 msgid "" 13212 msgid ""
13230 "If you try to apply a filter to a piece of data that it cannot process, " 13213 "If you try to apply a filter to a piece of data that it cannot process, "
13231 "Mercurial will fail and print a Python exception. For example, trying to run " 13214 "Mercurial will fail and print a Python exception. For example, trying to run "
13232 "the output of the <literal role=\"template-keyword\">desc</literal> keyword " 13215 "the output of the <literal role=\"template-keyword\">desc</literal> keyword "
13233 "into the <literal role=\"template-kw-filt-date\">isodate</literal> filter is " 13216 "into the <literal role=\"template-kw-filt-date\">isodate</literal> filter is "
13234 "not a good idea." 13217 "not a good idea."
13235 msgstr "" 13218 msgstr ""
13236 13219
13237 #. type: Content of: <book><chapter><sect1><sect2><title> 13220 #. type: Content of: <book><chapter><sect1><sect2><title>
13238 #: ../en/ch10-template.xml:427 13221 #: ../en/ch10-template.xml:425
13239 msgid "Combining filters" 13222 msgid "Combining filters"
13240 msgstr "组合过滤器" 13223 msgstr "组合过滤器"
13241 13224
13242 #. type: Content of: <book><chapter><sect1><sect2><para> 13225 #. type: Content of: <book><chapter><sect1><sect2><para>
13243 #: ../en/ch10-template.xml:429 13226 #: ../en/ch10-template.xml:427
13244 msgid "" 13227 msgid ""
13245 "It is easy to combine filters to yield output in the form you would like. " 13228 "It is easy to combine filters to yield output in the form you would like. "
13246 "The following chain of filters tidies up a description, then makes sure that " 13229 "The following chain of filters tidies up a description, then makes sure that "
13247 "it fits cleanly into 68 columns, then indents it by a further 8 characters " 13230 "it fits cleanly into 68 columns, then indents it by a further 8 characters "
13248 "(at least on Unix-like systems, where a tab is conventionally 8 characters " 13231 "(at least on Unix-like systems, where a tab is conventionally 8 characters "
13249 "wide)." 13232 "wide)."
13250 msgstr "" 13233 msgstr ""
13251 13234
13252 #. type: Content of: <book><chapter><sect1><sect2><para> 13235 #. type: Content of: <book><chapter><sect1><sect2><para>
13253 #: ../en/ch10-template.xml:438 13236 #: ../en/ch10-template.xml:436
13254 msgid "" 13237 msgid ""
13255 "Note the use of <quote><literal>\\t</literal></quote> (a tab character) in " 13238 "Note the use of <quote><literal>\\t</literal></quote> (a tab character) in "
13256 "the template to force the first line to be indented; this is necessary since " 13239 "the template to force the first line to be indented; this is necessary since "
13257 "<literal role=\"template-keyword\">tabindent</literal> indents all lines " 13240 "<literal role=\"template-keyword\">tabindent</literal> indents all lines "
13258 "<emphasis>except</emphasis> the first." 13241 "<emphasis>except</emphasis> the first."
13259 msgstr "" 13242 msgstr ""
13260 13243
13261 #. type: Content of: <book><chapter><sect1><sect2><para> 13244 #. type: Content of: <book><chapter><sect1><sect2><para>
13262 #: ../en/ch10-template.xml:444 13245 #: ../en/ch10-template.xml:442
13263 msgid "" 13246 msgid ""
13264 "Keep in mind that the order of filters in a chain is significant. The first " 13247 "Keep in mind that the order of filters in a chain is significant. The first "
13265 "filter is applied to the result of the keyword; the second to the result of " 13248 "filter is applied to the result of the keyword; the second to the result of "
13266 "the first filter; and so on. For example, using <literal>fill68|tabindent</" 13249 "the first filter; and so on. For example, using <literal>fill68|tabindent</"
13267 "literal> gives very different results from <literal>tabindent|fill68</" 13250 "literal> gives very different results from <literal>tabindent|fill68</"
13268 "literal>." 13251 "literal>."
13269 msgstr "" 13252 msgstr ""
13270 13253
13271 #. type: Content of: <book><chapter><sect1><title> 13254 #. type: Content of: <book><chapter><sect1><title>
13272 #: ../en/ch10-template.xml:455 13255 #: ../en/ch10-template.xml:453
13273 msgid "From templates to styles" 13256 msgid "From templates to styles"
13274 msgstr "从模版到样式" 13257 msgstr "从模版到样式"
13275 13258
13276 #. type: Content of: <book><chapter><sect1><para> 13259 #. type: Content of: <book><chapter><sect1><para>
13277 #: ../en/ch10-template.xml:457 13260 #: ../en/ch10-template.xml:455
13278 msgid "" 13261 msgid ""
13279 "A command line template provides a quick and simple way to format some " 13262 "A command line template provides a quick and simple way to format some "
13280 "output. Templates can become verbose, though, and it's useful to be able to " 13263 "output. Templates can become verbose, though, and it's useful to be able to "
13281 "give a template a name. A style file is a template with a name, stored in a " 13264 "give a template a name. A style file is a template with a name, stored in a "
13282 "file." 13265 "file."
13283 msgstr "" 13266 msgstr ""
13284 13267
13285 #. type: Content of: <book><chapter><sect1><para> 13268 #. type: Content of: <book><chapter><sect1><para>
13286 #: ../en/ch10-template.xml:462 13269 #: ../en/ch10-template.xml:460
13287 msgid "" 13270 msgid ""
13288 "More than that, using a style file unlocks the power of Mercurial's " 13271 "More than that, using a style file unlocks the power of Mercurial's "
13289 "templating engine in ways that are not possible using the command line " 13272 "templating engine in ways that are not possible using the command line "
13290 "<option role=\"hg-opt-log\">--template</option> option." 13273 "<option role=\"hg-opt-log\">--template</option> option."
13291 msgstr "" 13274 msgstr ""
13292 13275
13293 #. type: Content of: <book><chapter><sect1><sect2><title> 13276 #. type: Content of: <book><chapter><sect1><sect2><title>
13294 #: ../en/ch10-template.xml:468 13277 #: ../en/ch10-template.xml:466
13295 msgid "The simplest of style files" 13278 msgid "The simplest of style files"
13296 msgstr "最简单的样式文件" 13279 msgstr "最简单的样式文件"
13297 13280
13298 #. type: Content of: <book><chapter><sect1><sect2><para> 13281 #. type: Content of: <book><chapter><sect1><sect2><para>
13299 #: ../en/ch10-template.xml:470 13282 #: ../en/ch10-template.xml:468
13300 msgid "Our simple style file contains just one line:" 13283 msgid "Our simple style file contains just one line:"
13301 msgstr "" 13284 msgstr ""
13302 13285
13303 #. type: Content of: <book><chapter><sect1><sect2><para> 13286 #. type: Content of: <book><chapter><sect1><sect2><para>
13304 #: ../en/ch10-template.xml:474 13287 #: ../en/ch10-template.xml:472
13305 msgid "" 13288 msgid ""
13306 "This tells Mercurial, <quote>if you're printing a changeset, use the text on " 13289 "This tells Mercurial, <quote>if you're printing a changeset, use the text on "
13307 "the right as the template</quote>." 13290 "the right as the template</quote>."
13308 msgstr "" 13291 msgstr ""
13309 13292
13310 #. type: Content of: <book><chapter><sect1><sect2><title> 13293 #. type: Content of: <book><chapter><sect1><sect2><title>
13311 #: ../en/ch10-template.xml:480 13294 #: ../en/ch10-template.xml:478
13312 msgid "Style file syntax" 13295 msgid "Style file syntax"
13313 msgstr "样式文件语法" 13296 msgstr "样式文件语法"
13314 13297
13315 #. type: Content of: <book><chapter><sect1><sect2><para> 13298 #. type: Content of: <book><chapter><sect1><sect2><para>
13316 #: ../en/ch10-template.xml:482 13299 #: ../en/ch10-template.xml:480
13317 msgid "The syntax rules for a style file are simple." 13300 msgid "The syntax rules for a style file are simple."
13318 msgstr "" 13301 msgstr ""
13319 13302
13320 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13303 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13321 #: ../en/ch10-template.xml:485 13304 #: ../en/ch10-template.xml:483
13322 msgid "The file is processed one line at a time." 13305 msgid "The file is processed one line at a time."
13323 msgstr "" 13306 msgstr ""
13324 13307
13325 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13308 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13326 #: ../en/ch10-template.xml:488 13309 #: ../en/ch10-template.xml:486
13327 msgid "Leading and trailing white space are ignored." 13310 msgid "Leading and trailing white space are ignored."
13311 msgstr ""
13312
13313 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13314 #: ../en/ch10-template.xml:489
13315 msgid "Empty lines are skipped."
13328 msgstr "" 13316 msgstr ""
13329 13317
13330 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13318 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13331 #: ../en/ch10-template.xml:491 13319 #: ../en/ch10-template.xml:491
13332 msgid "Empty lines are skipped."
13333 msgstr ""
13334
13335 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13336 #: ../en/ch10-template.xml:493
13337 msgid "" 13320 msgid ""
13338 "If a line starts with either of the characters <quote><literal>#</literal></" 13321 "If a line starts with either of the characters <quote><literal>#</literal></"
13339 "quote> or <quote><literal>;</literal></quote>, the entire line is treated as " 13322 "quote> or <quote><literal>;</literal></quote>, the entire line is treated as "
13340 "a comment, and skipped as if empty." 13323 "a comment, and skipped as if empty."
13341 msgstr "" 13324 msgstr ""
13342 13325
13343 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13326 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13344 #: ../en/ch10-template.xml:498 13327 #: ../en/ch10-template.xml:496
13345 msgid "" 13328 msgid ""
13346 "A line starts with a keyword. This must start with an alphabetic character " 13329 "A line starts with a keyword. This must start with an alphabetic character "
13347 "or underscore, and can subsequently contain any alphanumeric character or " 13330 "or underscore, and can subsequently contain any alphanumeric character or "
13348 "underscore. (In regexp notation, a keyword must match <literal>[A-Za-z_][A-" 13331 "underscore. (In regexp notation, a keyword must match <literal>[A-Za-z_][A-"
13349 "Za-z0-9_]*</literal>.)" 13332 "Za-z0-9_]*</literal>.)"
13350 msgstr "" 13333 msgstr ""
13351 13334
13352 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13335 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13353 #: ../en/ch10-template.xml:504 13336 #: ../en/ch10-template.xml:502
13354 msgid "" 13337 msgid ""
13355 "The next element must be an <quote><literal>=</literal></quote> character, " 13338 "The next element must be an <quote><literal>=</literal></quote> character, "
13356 "which can be preceded or followed by an arbitrary amount of white space." 13339 "which can be preceded or followed by an arbitrary amount of white space."
13357 msgstr "" 13340 msgstr ""
13358 13341
13359 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13342 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13360 #: ../en/ch10-template.xml:509 13343 #: ../en/ch10-template.xml:507
13361 msgid "" 13344 msgid ""
13362 "If the rest of the line starts and ends with matching quote characters " 13345 "If the rest of the line starts and ends with matching quote characters "
13363 "(either single or double quote), it is treated as a template body." 13346 "(either single or double quote), it is treated as a template body."
13364 msgstr "" 13347 msgstr ""
13365 13348
13366 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13349 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13367 #: ../en/ch10-template.xml:513 13350 #: ../en/ch10-template.xml:511
13368 msgid "" 13351 msgid ""
13369 "If the rest of the line <emphasis>does not</emphasis> start with a quote " 13352 "If the rest of the line <emphasis>does not</emphasis> start with a quote "
13370 "character, it is treated as the name of a file; the contents of this file " 13353 "character, it is treated as the name of a file; the contents of this file "
13371 "will be read and used as a template body." 13354 "will be read and used as a template body."
13372 msgstr "" 13355 msgstr ""
13373 13356
13374 #. type: Content of: <book><chapter><sect1><title> 13357 #. type: Content of: <book><chapter><sect1><title>
13375 #: ../en/ch10-template.xml:522 13358 #: ../en/ch10-template.xml:520
13376 msgid "Style files by example" 13359 msgid "Style files by example"
13377 msgstr "样式文件例子" 13360 msgstr "样式文件例子"
13378 13361
13379 #. type: Content of: <book><chapter><sect1><para> 13362 #. type: Content of: <book><chapter><sect1><para>
13380 #: ../en/ch10-template.xml:524 13363 #: ../en/ch10-template.xml:522
13381 msgid "" 13364 msgid ""
13382 "To illustrate how to write a style file, we will construct a few by example. " 13365 "To illustrate how to write a style file, we will construct a few by example. "
13383 "Rather than provide a complete style file and walk through it, we'll mirror " 13366 "Rather than provide a complete style file and walk through it, we'll mirror "
13384 "the usual process of developing a style file by starting with something very " 13367 "the usual process of developing a style file by starting with something very "
13385 "simple, and walking through a series of successively more complete examples." 13368 "simple, and walking through a series of successively more complete examples."
13386 msgstr "" 13369 msgstr ""
13387 13370
13388 #. type: Content of: <book><chapter><sect1><sect2><title> 13371 #. type: Content of: <book><chapter><sect1><sect2><title>
13389 #: ../en/ch10-template.xml:531 13372 #: ../en/ch10-template.xml:529
13390 msgid "Identifying mistakes in style files" 13373 msgid "Identifying mistakes in style files"
13391 msgstr "在样式文件中定位错误" 13374 msgstr "在样式文件中定位错误"
13392 13375
13393 #. type: Content of: <book><chapter><sect1><sect2><para> 13376 #. type: Content of: <book><chapter><sect1><sect2><para>
13394 #: ../en/ch10-template.xml:533 13377 #: ../en/ch10-template.xml:531
13395 msgid "" 13378 msgid ""
13396 "If Mercurial encounters a problem in a style file you are working on, it " 13379 "If Mercurial encounters a problem in a style file you are working on, it "
13397 "prints a terse error message that, once you figure out what it means, is " 13380 "prints a terse error message that, once you figure out what it means, is "
13398 "actually quite useful." 13381 "actually quite useful."
13399 msgstr "" 13382 msgstr ""
13400 13383
13401 #. type: Content of: <book><chapter><sect1><sect2><para> 13384 #. type: Content of: <book><chapter><sect1><sect2><para>
13402 #: ../en/ch10-template.xml:539 13385 #: ../en/ch10-template.xml:537
13403 msgid "" 13386 msgid ""
13404 "Notice that <filename>broken.style</filename> attempts to define a " 13387 "Notice that <filename>broken.style</filename> attempts to define a "
13405 "<literal>changeset</literal> keyword, but forgets to give any content for it. " 13388 "<literal>changeset</literal> keyword, but forgets to give any content for it. "
13406 "When instructed to use this style file, Mercurial promptly complains." 13389 "When instructed to use this style file, Mercurial promptly complains."
13407 msgstr "" 13390 msgstr ""
13408 13391
13409 #. type: Content of: <book><chapter><sect1><sect2><para> 13392 #. type: Content of: <book><chapter><sect1><sect2><para>
13410 #: ../en/ch10-template.xml:546 13393 #: ../en/ch10-template.xml:544
13411 msgid "This error message looks intimidating, but it is not too hard to follow." 13394 msgid "This error message looks intimidating, but it is not too hard to follow."
13412 msgstr "" 13395 msgstr ""
13413 13396
13414 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13397 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13415 #: ../en/ch10-template.xml:550 13398 #: ../en/ch10-template.xml:548
13416 msgid "" 13399 msgid ""
13417 "The first component is simply Mercurial's way of saying <quote>I am giving " 13400 "The first component is simply Mercurial's way of saying <quote>I am giving "
13418 "up</quote>." 13401 "up</quote>."
13419 msgstr "" 13402 msgstr ""
13420 13403
13421 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13404 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13422 #: ../en/ch10-template.xml:554 13405 #: ../en/ch10-template.xml:552
13423 msgid "Next comes the name of the style file that contains the error." 13406 msgid "Next comes the name of the style file that contains the error."
13424 msgstr "" 13407 msgstr ""
13425 13408
13426 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13409 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13427 #: ../en/ch10-template.xml:558 13410 #: ../en/ch10-template.xml:556
13428 msgid "" 13411 msgid ""
13429 "Following the file name is the line number where the error was encountered." 13412 "Following the file name is the line number where the error was encountered."
13430 msgstr "" 13413 msgstr ""
13431 13414
13432 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13415 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13433 #: ../en/ch10-template.xml:562 13416 #: ../en/ch10-template.xml:560
13434 msgid "Finally, a description of what went wrong." 13417 msgid "Finally, a description of what went wrong."
13435 msgstr "" 13418 msgstr ""
13436 13419
13437 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13420 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13438 #: ../en/ch10-template.xml:566 13421 #: ../en/ch10-template.xml:564
13439 msgid "" 13422 msgid ""
13440 "The description of the problem is not always clear (as in this case), but " 13423 "The description of the problem is not always clear (as in this case), but "
13441 "even when it is cryptic, it is almost always trivial to visually inspect the " 13424 "even when it is cryptic, it is almost always trivial to visually inspect the "
13442 "offending line in the style file and see what is wrong." 13425 "offending line in the style file and see what is wrong."
13443 msgstr "" 13426 msgstr ""
13444 13427
13445 #. type: Content of: <book><chapter><sect1><sect2><title> 13428 #. type: Content of: <book><chapter><sect1><sect2><title>
13446 #: ../en/ch10-template.xml:574 13429 #: ../en/ch10-template.xml:572
13447 msgid "Uniquely identifying a repository" 13430 msgid "Uniquely identifying a repository"
13448 msgstr "版本库的唯一标识" 13431 msgstr "版本库的唯一标识"
13449 13432
13450 #. type: Content of: <book><chapter><sect1><sect2><para> 13433 #. type: Content of: <book><chapter><sect1><sect2><para>
13451 #: ../en/ch10-template.xml:576 13434 #: ../en/ch10-template.xml:574
13452 msgid "" 13435 msgid ""
13453 "If you would like to be able to identify a Mercurial repository <quote>fairly " 13436 "If you would like to be able to identify a Mercurial repository <quote>fairly "
13454 "uniquely</quote> using a short string as an identifier, you can use the first " 13437 "uniquely</quote> using a short string as an identifier, you can use the first "
13455 "revision in the repository." 13438 "revision in the repository."
13456 msgstr "" 13439 msgstr ""
13457 13440
13458 #. type: Content of: <book><chapter><sect1><sect2><para> 13441 #. type: Content of: <book><chapter><sect1><sect2><para>
13459 #: ../en/ch10-template.xml:583 13442 #: ../en/ch10-template.xml:581
13460 msgid "" 13443 msgid ""
13461 "This is not guaranteed to be unique, but it is nevertheless useful in many " 13444 "This is not guaranteed to be unique, but it is nevertheless useful in many "
13462 "cases." 13445 "cases."
13463 msgstr "" 13446 msgstr ""
13464 13447
13465 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13448 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13466 #: ../en/ch10-template.xml:586 13449 #: ../en/ch10-template.xml:584
13467 msgid "" 13450 msgid ""
13468 "It will not work in a completely empty repository, because such a repository " 13451 "It will not work in a completely empty repository, because such a repository "
13469 "does not have a revision zero." 13452 "does not have a revision zero."
13470 msgstr "" 13453 msgstr ""
13471 13454
13472 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13455 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13473 #: ../en/ch10-template.xml:590 13456 #: ../en/ch10-template.xml:588
13474 msgid "" 13457 msgid ""
13475 "Neither will it work in the (extremely rare) case where a repository is a " 13458 "Neither will it work in the (extremely rare) case where a repository is a "
13476 "merge of two or more formerly independent repositories, and you still have " 13459 "merge of two or more formerly independent repositories, and you still have "
13477 "those repositories around." 13460 "those repositories around."
13478 msgstr "" 13461 msgstr ""
13479 13462
13480 #. type: Content of: <book><chapter><sect1><sect2><para> 13463 #. type: Content of: <book><chapter><sect1><sect2><para>
13481 #: ../en/ch10-template.xml:595 13464 #: ../en/ch10-template.xml:593
13482 msgid "Here are some uses to which you could put this identifier:" 13465 msgid "Here are some uses to which you could put this identifier:"
13483 msgstr "" 13466 msgstr ""
13484 13467
13485 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13468 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13486 #: ../en/ch10-template.xml:598 13469 #: ../en/ch10-template.xml:596
13487 msgid "" 13470 msgid ""
13488 "As a key into a table for a database that manages repositories on a server." 13471 "As a key into a table for a database that manages repositories on a server."
13489 msgstr "" 13472 msgstr ""
13490 13473
13491 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13474 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13492 #: ../en/ch10-template.xml:601 13475 #: ../en/ch10-template.xml:599
13493 msgid "" 13476 msgid ""
13494 "As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</" 13477 "As half of a {<emphasis>repository ID</emphasis>, <emphasis>revision ID</"
13495 "emphasis>} tuple. Save this information away when you run an automated build " 13478 "emphasis>} tuple. Save this information away when you run an automated build "
13496 "or other activity, so that you can <quote>replay</quote> the build later if " 13479 "or other activity, so that you can <quote>replay</quote> the build later if "
13497 "necessary." 13480 "necessary."
13498 msgstr "" 13481 msgstr ""
13499 13482
13500 #. type: Content of: <book><chapter><sect1><sect2><title> 13483 #. type: Content of: <book><chapter><sect1><sect2><title>
13501 #: ../en/ch10-template.xml:610 13484 #: ../en/ch10-template.xml:608
13502 msgid "Mimicking Subversion's output" 13485 msgid "Mimicking Subversion's output"
13503 msgstr "模仿 Subversion 的输出" 13486 msgstr "模仿 Subversion 的输出"
13504 13487
13505 # 13488 #
13506 #. type: Content of: <book><chapter><sect1><sect2><para> 13489 #. type: Content of: <book><chapter><sect1><sect2><para>
13507 #: ../en/ch10-template.xml:612 13490 #: ../en/ch10-template.xml:610
13508 msgid "" 13491 msgid ""
13509 "Let's try to emulate the default output format used by another revision " 13492 "Let's try to emulate the default output format used by another revision "
13510 "control tool, Subversion." 13493 "control tool, Subversion."
13511 msgstr "" 13494 msgstr ""
13512 13495
13513 # 13496 #
13514 #. type: Content of: <book><chapter><sect1><sect2><para> 13497 #. type: Content of: <book><chapter><sect1><sect2><para>
13515 #: ../en/ch10-template.xml:617 13498 #: ../en/ch10-template.xml:615
13516 msgid "" 13499 msgid ""
13517 "Since Subversion's output style is fairly simple, it is easy to copy-and-" 13500 "Since Subversion's output style is fairly simple, it is easy to copy-and-"
13518 "paste a hunk of its output into a file, and replace the text produced above " 13501 "paste a hunk of its output into a file, and replace the text produced above "
13519 "by Subversion with the template values we'd like to see expanded." 13502 "by Subversion with the template values we'd like to see expanded."
13520 msgstr "" 13503 msgstr ""
13521 13504
13522 #. type: Content of: <book><chapter><sect1><sect2><para> 13505 #. type: Content of: <book><chapter><sect1><sect2><para>
13523 #: ../en/ch10-template.xml:624 13506 #: ../en/ch10-template.xml:622
13524 msgid "" 13507 msgid ""
13525 "There are a few small ways in which this template deviates from the output " 13508 "There are a few small ways in which this template deviates from the output "
13526 "produced by Subversion." 13509 "produced by Subversion."
13527 msgstr "" 13510 msgstr ""
13528 13511
13529 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13512 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13530 #: ../en/ch10-template.xml:627 13513 #: ../en/ch10-template.xml:625
13531 msgid "" 13514 msgid ""
13532 "Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 " 13515 "Subversion prints a <quote>readable</quote> date (the <quote><literal>Wed, 27 "
13533 "Sep 2006</literal></quote> in the example output above) in parentheses. " 13516 "Sep 2006</literal></quote> in the example output above) in parentheses. "
13534 "Mercurial's templating engine does not provide a way to display a date in " 13517 "Mercurial's templating engine does not provide a way to display a date in "
13535 "this format without also printing the time and time zone." 13518 "this format without also printing the time and time zone."
13536 msgstr "" 13519 msgstr ""
13537 13520
13538 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13521 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13539 #: ../en/ch10-template.xml:634 13522 #: ../en/ch10-template.xml:632
13540 msgid "" 13523 msgid ""
13541 "We emulate Subversion's printing of <quote>separator</quote> lines full of " 13524 "We emulate Subversion's printing of <quote>separator</quote> lines full of "
13542 "<quote><literal>-</literal></quote> characters by ending the template with " 13525 "<quote><literal>-</literal></quote> characters by ending the template with "
13543 "such a line. We use the templating engine's <literal role=\"template-keyword" 13526 "such a line. We use the templating engine's <literal role=\"template-keyword"
13544 "\">header</literal> keyword to print a separator line as the first line of " 13527 "\">header</literal> keyword to print a separator line as the first line of "
13545 "output (see below), thus achieving similar output to Subversion." 13528 "output (see below), thus achieving similar output to Subversion."
13546 msgstr "" 13529 msgstr ""
13547 13530
13548 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 13531 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
13549 #: ../en/ch10-template.xml:643 13532 #: ../en/ch10-template.xml:641
13550 msgid "" 13533 msgid ""
13551 "Subversion's output includes a count in the header of the number of lines in " 13534 "Subversion's output includes a count in the header of the number of lines in "
13552 "the commit message. We cannot replicate this in Mercurial; the templating " 13535 "the commit message. We cannot replicate this in Mercurial; the templating "
13553 "engine does not currently provide a filter that counts the number of lines " 13536 "engine does not currently provide a filter that counts the number of lines "
13554 "the template generates." 13537 "the template generates."
13555 msgstr "" 13538 msgstr ""
13556 13539
13557 # 13540 #
13558 #. type: Content of: <book><chapter><sect1><sect2><para> 13541 #. type: Content of: <book><chapter><sect1><sect2><para>
13559 #: ../en/ch10-template.xml:649 13542 #: ../en/ch10-template.xml:647
13560 msgid "" 13543 msgid ""
13561 "It took me no more than a minute or two of work to replace literal text from " 13544 "It took me no more than a minute or two of work to replace literal text from "
13562 "an example of Subversion's output with some keywords and filters to give the " 13545 "an example of Subversion's output with some keywords and filters to give the "
13563 "template above. The style file simply refers to the template." 13546 "template above. The style file simply refers to the template."
13564 msgstr "" 13547 msgstr ""
13565 13548
13566 #. type: Content of: <book><chapter><sect1><sect2><para> 13549 #. type: Content of: <book><chapter><sect1><sect2><para>
13567 #: ../en/ch10-template.xml:656 13550 #: ../en/ch10-template.xml:654
13568 msgid "" 13551 msgid ""
13569 "We could have included the text of the template file directly in the style " 13552 "We could have included the text of the template file directly in the style "
13570 "file by enclosing it in quotes and replacing the newlines with " 13553 "file by enclosing it in quotes and replacing the newlines with "
13571 "<quote><literal>\\n</literal></quote> sequences, but it would have made the " 13554 "<quote><literal>\\n</literal></quote> sequences, but it would have made the "
13572 "style file too difficult to read. Readability is a good guide when you're " 13555 "style file too difficult to read. Readability is a good guide when you're "
13627 #. type: Content of: <book><chapter><sect1><para> 13610 #. type: Content of: <book><chapter><sect1><para>
13628 #: ../en/ch11-mq.xml:37 13611 #: ../en/ch11-mq.xml:37
13629 msgid "" 13612 msgid ""
13630 "When you have few changes to maintain, it is easy to manage a single patch " 13613 "When you have few changes to maintain, it is easy to manage a single patch "
13631 "using the standard <command>diff</command> and <command>patch</command> " 13614 "using the standard <command>diff</command> and <command>patch</command> "
13632 "programs (see section <xref linkend=\"sec.mq.patch\"/> for a discussion of " 13615 "programs (see <xref linkend=\"sec:mq:patch\"/> for a discussion of these "
13633 "these tools). Once the number of changes grows, it starts to make sense to " 13616 "tools). Once the number of changes grows, it starts to make sense to maintain "
13634 "maintain patches as discrete <quote>chunks of work,</quote> so that for " 13617 "patches as discrete <quote>chunks of work,</quote> so that for example a "
13635 "example a single patch will contain only one bug fix (the patch might modify " 13618 "single patch will contain only one bug fix (the patch might modify several "
13636 "several files, but it's doing <quote>only one thing</quote>), and you may " 13619 "files, but it's doing <quote>only one thing</quote>), and you may have a "
13637 "have a number of such patches for different bugs you need fixed and local " 13620 "number of such patches for different bugs you need fixed and local changes "
13638 "changes you require. In this situation, if you submit a bug fix patch to the " 13621 "you require. In this situation, if you submit a bug fix patch to the "
13639 "upstream maintainers of a package and they include your fix in a subsequent " 13622 "upstream maintainers of a package and they include your fix in a subsequent "
13640 "release, you can simply drop that single patch when you're updating to the " 13623 "release, you can simply drop that single patch when you're updating to the "
13641 "newer release." 13624 "newer release."
13642 msgstr "" 13625 msgstr ""
13643 13626
13903 msgstr "" 13886 msgstr ""
13904 13887
13905 #. type: Content of: <book><chapter><sect1><para> 13888 #. type: Content of: <book><chapter><sect1><para>
13906 #: ../en/ch11-mq.xml:243 13889 #: ../en/ch11-mq.xml:243
13907 msgid "" 13890 msgid ""
13908 "We will return to some of the more subtle aspects of patches later (in " 13891 "We will return to some of the more subtle aspects of patches later (in <xref "
13909 "section <xref linkend=\"sec.mq.adv-patch\"/>), but you should have enough " 13892 "linkend=\"sec:mq:adv-patch\"/>), but you should have enough information now "
13910 "information now to use MQ." 13893 "to use MQ."
13911 msgstr "" 13894 msgstr ""
13912 13895
13913 #. type: Content of: <book><chapter><sect1><title> 13896 #. type: Content of: <book><chapter><sect1><title>
13914 #: ../en/ch11-mq.xml:250 13897 #: ../en/ch11-mq.xml:250
13915 msgid "Getting started with Mercurial Queues" 13898 msgid "Getting started with Mercurial Queues"
14099 "repository, and the effects of the patch and changeset are visible in the " 14082 "repository, and the effects of the patch and changeset are visible in the "
14100 "working directory. You can undo the application of a patch using the " 14083 "working directory. You can undo the application of a patch using the "
14101 "<command role=\"hg-ext-mq\">qpop</command> command. MQ still <emphasis>knows " 14084 "<command role=\"hg-ext-mq\">qpop</command> command. MQ still <emphasis>knows "
14102 "about</emphasis>, or manages, a popped patch, but the patch no longer has a " 14085 "about</emphasis>, or manages, a popped patch, but the patch no longer has a "
14103 "corresponding changeset in the repository, and the working directory does not " 14086 "corresponding changeset in the repository, and the working directory does not "
14104 "contain the changes made by the patch. Figure <xref endterm=\"fig.mq.stack." 14087 "contain the changes made by the patch. <xref linkend=\"fig:mq:stack\"/> "
14105 "caption\" linkend=\"fig.mq.stack\"/> illustrates the difference between " 14088 "illustrates the difference between applied and tracked patches."
14106 "applied and tracked patches." 14089 msgstr ""
14107 msgstr "" 14090
14108 14091 #. type: Content of: <book><chapter><sect1><sect2><figure><title>
14109 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 14092 #: ../en/ch11-mq.xml:408
14110 #: ../en/ch11-mq.xml:409 14093 msgid "Applied and unapplied patches in the MQ patch stack"
14111 msgid "<imageobject><imagedata fileref=\"images/mq-stack.png\"/></imageobject>" 14094 msgstr ""
14112 msgstr "" 14095
14113 14096 #. type: Content of: <book><chapter><sect1><sect2><figure><mediaobject>
14114 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
14115 #: ../en/ch11-mq.xml:411 14097 #: ../en/ch11-mq.xml:411
14116 msgid "Applied and unapplied patches in the MQ patch stack" 14098 msgid "<imageobject><imagedata fileref=\"figs/mq-stack.png\"/></imageobject>"
14117 msgstr "" 14099 msgstr ""
14118 14100
14119 #. type: Content of: <book><chapter><sect1><sect2><para> 14101 #. type: Content of: <book><chapter><sect1><sect2><para>
14120 #: ../en/ch11-mq.xml:416 14102 #: ../en/ch11-mq.xml:416
14121 msgid "" 14103 msgid ""
14147 "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-" 14129 "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-"
14148 "qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</" 14130 "qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</"
14149 "command> causes it to push all unapplied patches, while the <option role=\"hg-" 14131 "command> causes it to push all unapplied patches, while the <option role=\"hg-"
14150 "ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</" 14132 "ext-mq-cmd-qpop-opt\">-a</option> option to <command role=\"hg-ext-mq\">qpop</"
14151 "command> causes it to pop all applied patches. (For some more ways to push " 14133 "command> causes it to pop all applied patches. (For some more ways to push "
14152 "and pop many patches, see section <xref linkend=\"sec.mq.perf\"/> below.)" 14134 "and pop many patches, see <xref linkend=\"sec:mq:perf\"/> below.)"
14153 msgstr "" 14135 msgstr ""
14154 14136
14155 #. type: Content of: <book><chapter><sect1><sect2><title> 14137 #. type: Content of: <book><chapter><sect1><sect2><title>
14156 #: ../en/ch11-mq.xml:452 14138 #: ../en/ch11-mq.xml:451
14157 msgid "Safety checks, and overriding them" 14139 msgid "Safety checks, and overriding them"
14158 msgstr "安全的检查,然后覆盖它们" 14140 msgstr "安全的检查,然后覆盖它们"
14159 14141
14160 #. type: Content of: <book><chapter><sect1><sect2><para> 14142 #. type: Content of: <book><chapter><sect1><sect2><para>
14161 #: ../en/ch11-mq.xml:454 14143 #: ../en/ch11-mq.xml:453
14162 msgid "" 14144 msgid ""
14163 "Several MQ commands check the working directory before they do anything, and " 14145 "Several MQ commands check the working directory before they do anything, and "
14164 "fail if they find any modifications. They do this to ensure that you won't " 14146 "fail if they find any modifications. They do this to ensure that you won't "
14165 "lose any changes that you have made, but not yet incorporated into a patch. " 14147 "lose any changes that you have made, but not yet incorporated into a patch. "
14166 "The example below illustrates this; the <command role=\"hg-ext-mq\">qnew</" 14148 "The example below illustrates this; the <command role=\"hg-ext-mq\">qnew</"
14168 "changes, caused in this case by the <command role=\"hg-cmd\">hg add</command> " 14150 "changes, caused in this case by the <command role=\"hg-cmd\">hg add</command> "
14169 "of <filename>file3</filename>." 14151 "of <filename>file3</filename>."
14170 msgstr "" 14152 msgstr ""
14171 14153
14172 #. type: Content of: <book><chapter><sect1><sect2><para> 14154 #. type: Content of: <book><chapter><sect1><sect2><para>
14173 #: ../en/ch11-mq.xml:466 14155 #: ../en/ch11-mq.xml:465
14174 msgid "" 14156 msgid ""
14175 "Commands that check the working directory all take an <quote>I know what I'm " 14157 "Commands that check the working directory all take an <quote>I know what I'm "
14176 "doing</quote> option, which is always named <option>-f</option>. The exact " 14158 "doing</quote> option, which is always named <option>-f</option>. The exact "
14177 "meaning of <option>-f</option> depends on the command. For example, <command " 14159 "meaning of <option>-f</option> depends on the command. For example, <command "
14178 "role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</" 14160 "role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</"
14182 "affected by the patch that it is popping. Be sure to read the documentation " 14164 "affected by the patch that it is popping. Be sure to read the documentation "
14183 "for a command's <option>-f</option> option before you use it!" 14165 "for a command's <option>-f</option> option before you use it!"
14184 msgstr "" 14166 msgstr ""
14185 14167
14186 #. type: Content of: <book><chapter><sect1><sect2><title> 14168 #. type: Content of: <book><chapter><sect1><sect2><title>
14187 #: ../en/ch11-mq.xml:481 14169 #: ../en/ch11-mq.xml:480
14188 msgid "Working on several patches at once" 14170 msgid "Working on several patches at once"
14189 msgstr "同时处理多个补丁" 14171 msgstr "同时处理多个补丁"
14190 14172
14191 #. type: Content of: <book><chapter><sect1><sect2><para> 14173 #. type: Content of: <book><chapter><sect1><sect2><para>
14192 #: ../en/ch11-mq.xml:483 14174 #: ../en/ch11-mq.xml:482
14193 msgid "" 14175 msgid ""
14194 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes " 14176 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes "
14195 "the <emphasis>topmost</emphasis> applied patch. This means that you can " 14177 "the <emphasis>topmost</emphasis> applied patch. This means that you can "
14196 "suspend work on one patch (by refreshing it), pop or push to make a different " 14178 "suspend work on one patch (by refreshing it), pop or push to make a different "
14197 "patch the top, and work on <emphasis>that</emphasis> patch for a while." 14179 "patch the top, and work on <emphasis>that</emphasis> patch for a while."
14198 msgstr "" 14180 msgstr ""
14199 14181
14200 #. type: Content of: <book><chapter><sect1><sect2><para> 14182 #. type: Content of: <book><chapter><sect1><sect2><para>
14201 #: ../en/ch11-mq.xml:490 14183 #: ../en/ch11-mq.xml:489
14202 msgid "" 14184 msgid ""
14203 "Here's an example that illustrates how you can use this ability. Let's say " 14185 "Here's an example that illustrates how you can use this ability. Let's say "
14204 "you're developing a new feature as two patches. The first is a change to the " 14186 "you're developing a new feature as two patches. The first is a change to the "
14205 "core of your software, and the second&emdash;layered on top of the " 14187 "core of your software, and the second&emdash;layered on top of the "
14206 "first&emdash;changes the user interface to use the code you just added to the " 14188 "first&emdash;changes the user interface to use the code you just added to the "
14212 "role=\"hg-ext-mq\">qpush</command> back to the UI patch to continue where you " 14194 "role=\"hg-ext-mq\">qpush</command> back to the UI patch to continue where you "
14213 "left off." 14195 "left off."
14214 msgstr "" 14196 msgstr ""
14215 14197
14216 #. type: Content of: <book><chapter><sect1><title> 14198 #. type: Content of: <book><chapter><sect1><title>
14217 #: ../en/ch11-mq.xml:507 14199 #: ../en/ch11-mq.xml:506
14218 msgid "More about patches" 14200 msgid "More about patches"
14219 msgstr "关于补丁的更多信息" 14201 msgstr "关于补丁的更多信息"
14220 14202
14221 #. type: Content of: <book><chapter><sect1><para> 14203 #. type: Content of: <book><chapter><sect1><para>
14222 #: ../en/ch11-mq.xml:509 14204 #: ../en/ch11-mq.xml:508
14223 msgid "" 14205 msgid ""
14224 "MQ uses the GNU <command>patch</command> command to apply patches, so it's " 14206 "MQ uses the GNU <command>patch</command> command to apply patches, so it's "
14225 "helpful to know a few more detailed aspects of how <command>patch</command> " 14207 "helpful to know a few more detailed aspects of how <command>patch</command> "
14226 "works, and about patches themselves." 14208 "works, and about patches themselves."
14227 msgstr "" 14209 msgstr ""
14228 14210
14229 #. type: Content of: <book><chapter><sect1><sect2><title> 14211 #. type: Content of: <book><chapter><sect1><sect2><title>
14230 #: ../en/ch11-mq.xml:515 14212 #: ../en/ch11-mq.xml:514
14231 msgid "The strip count" 14213 msgid "The strip count"
14232 msgstr "修剪计数" 14214 msgstr "修剪计数"
14233 14215
14234 #. type: Content of: <book><chapter><sect1><sect2><para> 14216 #. type: Content of: <book><chapter><sect1><sect2><para>
14235 #: ../en/ch11-mq.xml:517 14217 #: ../en/ch11-mq.xml:516
14236 msgid "" 14218 msgid ""
14237 "If you look at the file headers in a patch, you will notice that the " 14219 "If you look at the file headers in a patch, you will notice that the "
14238 "pathnames usually have an extra component on the front that isn't present in " 14220 "pathnames usually have an extra component on the front that isn't present in "
14239 "the actual path name. This is a holdover from the way that people used to " 14221 "the actual path name. This is a holdover from the way that people used to "
14240 "generate patches (people still do this, but it's somewhat rare with modern " 14222 "generate patches (people still do this, but it's somewhat rare with modern "
14241 "revision control tools)." 14223 "revision control tools)."
14242 msgstr "" 14224 msgstr ""
14243 14225
14244 #. type: Content of: <book><chapter><sect1><sect2><para> 14226 #. type: Content of: <book><chapter><sect1><sect2><para>
14245 #: ../en/ch11-mq.xml:524 14227 #: ../en/ch11-mq.xml:523
14246 msgid "" 14228 msgid ""
14247 "Alice would unpack a tarball, edit her files, then decide that she wanted to " 14229 "Alice would unpack a tarball, edit her files, then decide that she wanted to "
14248 "create a patch. So she'd rename her working directory, unpack the tarball " 14230 "create a patch. So she'd rename her working directory, unpack the tarball "
14249 "again (hence the need for the rename), and use the <option role=\"cmd-opt-diff" 14231 "again (hence the need for the rename), and use the <option role=\"cmd-opt-diff"
14250 "\">-r</option> and <option role=\"cmd-opt-diff\">-N</option> options to " 14232 "\">-r</option> and <option role=\"cmd-opt-diff\">-N</option> options to "
14254 "every file header, and the name of the modified directory would be at the " 14236 "every file header, and the name of the modified directory would be at the "
14255 "front of the right-hand path." 14237 "front of the right-hand path."
14256 msgstr "" 14238 msgstr ""
14257 14239
14258 #. type: Content of: <book><chapter><sect1><sect2><para> 14240 #. type: Content of: <book><chapter><sect1><sect2><para>
14259 #: ../en/ch11-mq.xml:537 14241 #: ../en/ch11-mq.xml:536
14260 msgid "" 14242 msgid ""
14261 "Since someone receiving a patch from the Alices of the net would be unlikely " 14243 "Since someone receiving a patch from the Alices of the net would be unlikely "
14262 "to have unmodified and modified directories with exactly the same names, the " 14244 "to have unmodified and modified directories with exactly the same names, the "
14263 "<command>patch</command> command has a <option role=\"cmd-opt-patch\">-p</" 14245 "<command>patch</command> command has a <option role=\"cmd-opt-patch\">-p</"
14264 "option> option that indicates the number of leading path name components to " 14246 "option> option that indicates the number of leading path name components to "
14265 "strip when trying to apply a patch. This number is called the " 14247 "strip when trying to apply a patch. This number is called the "
14266 "<emphasis>strip count</emphasis>." 14248 "<emphasis>strip count</emphasis>."
14267 msgstr "" 14249 msgstr ""
14268 14250
14269 #. type: Content of: <book><chapter><sect1><sect2><para> 14251 #. type: Content of: <book><chapter><sect1><sect2><para>
14270 #: ../en/ch11-mq.xml:545 14252 #: ../en/ch11-mq.xml:544
14271 msgid "" 14253 msgid ""
14272 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip " 14254 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip "
14273 "count of one</quote>. If <command>patch</command> sees a file name " 14255 "count of one</quote>. If <command>patch</command> sees a file name "
14274 "<filename>foo/bar/baz</filename> in a file header, it will strip " 14256 "<filename>foo/bar/baz</filename> in a file header, it will strip "
14275 "<filename>foo</filename> and try to patch a file named <filename>bar/baz</" 14257 "<filename>foo</filename> and try to patch a file named <filename>bar/baz</"
14279 "<filename>bar</filename>, but <filename>/foo/bar</filename> (notice the extra " 14261 "<filename>bar</filename>, but <filename>/foo/bar</filename> (notice the extra "
14280 "leading slash) into <filename>foo/bar</filename>.)" 14262 "leading slash) into <filename>foo/bar</filename>.)"
14281 msgstr "" 14263 msgstr ""
14282 14264
14283 #. type: Content of: <book><chapter><sect1><sect2><para> 14265 #. type: Content of: <book><chapter><sect1><sect2><para>
14284 #: ../en/ch11-mq.xml:558 14266 #: ../en/ch11-mq.xml:557
14285 msgid "" 14267 msgid ""
14286 "The <quote>standard</quote> strip count for patches is one; almost all " 14268 "The <quote>standard</quote> strip count for patches is one; almost all "
14287 "patches contain one leading path name component that needs to be stripped. " 14269 "patches contain one leading path name component that needs to be stripped. "
14288 "Mercurial's <command role=\"hg-cmd\">hg diff</command> command generates path " 14270 "Mercurial's <command role=\"hg-cmd\">hg diff</command> command generates path "
14289 "names in this form, and the <command role=\"hg-cmd\">hg import</command> " 14271 "names in this form, and the <command role=\"hg-cmd\">hg import</command> "
14290 "command and MQ expect patches to have a strip count of one." 14272 "command and MQ expect patches to have a strip count of one."
14291 msgstr "" 14273 msgstr ""
14292 14274
14293 #. type: Content of: <book><chapter><sect1><sect2><para> 14275 #. type: Content of: <book><chapter><sect1><sect2><para>
14294 #: ../en/ch11-mq.xml:566 14276 #: ../en/ch11-mq.xml:565
14295 msgid "" 14277 msgid ""
14296 "If you receive a patch from someone that you want to add to your patch queue, " 14278 "If you receive a patch from someone that you want to add to your patch queue, "
14297 "and the patch needs a strip count other than one, you cannot just <command " 14279 "and the patch needs a strip count other than one, you cannot just <command "
14298 "role=\"hg-ext-mq\">qimport</command> the patch, because <command role=\"hg-" 14280 "role=\"hg-ext-mq\">qimport</command> the patch, because <command role=\"hg-"
14299 "ext-mq\">qimport</command> does not yet have a <literal>-p</literal> option " 14281 "ext-mq\">qimport</command> does not yet have a <literal>-p</literal> option "
14306 "unnecessary; see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/" 14288 "unnecessary; see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/"
14307 "mercurial/bts/issue311\">issue 311</ulink> for details." 14289 "mercurial/bts/issue311\">issue 311</ulink> for details."
14308 msgstr "" 14290 msgstr ""
14309 14291
14310 #. type: Content of: <book><chapter><sect1><sect2><title> 14292 #. type: Content of: <book><chapter><sect1><sect2><title>
14311 #: ../en/ch11-mq.xml:585 14293 #: ../en/ch11-mq.xml:584
14312 msgid "Strategies for applying a patch" 14294 msgid "Strategies for applying a patch"
14313 msgstr "应用补丁的策略" 14295 msgstr "应用补丁的策略"
14314 14296
14315 #. type: Content of: <book><chapter><sect1><sect2><para> 14297 #. type: Content of: <book><chapter><sect1><sect2><para>
14316 #: ../en/ch11-mq.xml:587 14298 #: ../en/ch11-mq.xml:586
14317 msgid "" 14299 msgid ""
14318 "When <command>patch</command> applies a hunk, it tries a handful of " 14300 "When <command>patch</command> applies a hunk, it tries a handful of "
14319 "successively less accurate strategies to try to make the hunk apply. This " 14301 "successively less accurate strategies to try to make the hunk apply. This "
14320 "falling-back technique often makes it possible to take a patch that was " 14302 "falling-back technique often makes it possible to take a patch that was "
14321 "generated against an old version of a file, and apply it against a newer " 14303 "generated against an old version of a file, and apply it against a newer "
14322 "version of that file." 14304 "version of that file."
14323 msgstr "" 14305 msgstr ""
14324 14306
14325 #. type: Content of: <book><chapter><sect1><sect2><para> 14307 #. type: Content of: <book><chapter><sect1><sect2><para>
14326 #: ../en/ch11-mq.xml:594 14308 #: ../en/ch11-mq.xml:593
14327 msgid "" 14309 msgid ""
14328 "First, <command>patch</command> tries an exact match, where the line numbers, " 14310 "First, <command>patch</command> tries an exact match, where the line numbers, "
14329 "the context, and the text to be modified must apply exactly. If it cannot " 14311 "the context, and the text to be modified must apply exactly. If it cannot "
14330 "make an exact match, it tries to find an exact match for the context, without " 14312 "make an exact match, it tries to find an exact match for the context, without "
14331 "honouring the line numbering information. If this succeeds, it prints a line " 14313 "honouring the line numbering information. If this succeeds, it prints a line "
14332 "of output saying that the hunk was applied, but at some <emphasis>offset</" 14314 "of output saying that the hunk was applied, but at some <emphasis>offset</"
14333 "emphasis> from the original line number." 14315 "emphasis> from the original line number."
14334 msgstr "" 14316 msgstr ""
14335 14317
14336 #. type: Content of: <book><chapter><sect1><sect2><para> 14318 #. type: Content of: <book><chapter><sect1><sect2><para>
14337 #: ../en/ch11-mq.xml:603 14319 #: ../en/ch11-mq.xml:602
14338 msgid "" 14320 msgid ""
14339 "If a context-only match fails, <command>patch</command> removes the first and " 14321 "If a context-only match fails, <command>patch</command> removes the first and "
14340 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-" 14322 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-"
14341 "only match. If the hunk with reduced context succeeds, it prints a message " 14323 "only match. If the hunk with reduced context succeeds, it prints a message "
14342 "saying that it applied the hunk with a <emphasis>fuzz factor</emphasis> (the " 14324 "saying that it applied the hunk with a <emphasis>fuzz factor</emphasis> (the "
14343 "number after the fuzz factor indicates how many lines of context " 14325 "number after the fuzz factor indicates how many lines of context "
14344 "<command>patch</command> had to trim before the patch applied)." 14326 "<command>patch</command> had to trim before the patch applied)."
14345 msgstr "" 14327 msgstr ""
14346 14328
14347 #. type: Content of: <book><chapter><sect1><sect2><para> 14329 #. type: Content of: <book><chapter><sect1><sect2><para>
14348 #: ../en/ch11-mq.xml:612 14330 #: ../en/ch11-mq.xml:611
14349 msgid "" 14331 msgid ""
14350 "When neither of these techniques works, <command>patch</command> prints a " 14332 "When neither of these techniques works, <command>patch</command> prints a "
14351 "message saying that the hunk in question was rejected. It saves rejected " 14333 "message saying that the hunk in question was rejected. It saves rejected "
14352 "hunks (also simply called <quote>rejects</quote>) to a file with the same " 14334 "hunks (also simply called <quote>rejects</quote>) to a file with the same "
14353 "name, and an added <filename role=\"special\">.rej</filename> extension. It " 14335 "name, and an added <filename role=\"special\">.rej</filename> extension. It "
14360 "hunk, and <filename>foo</filename>, containing the changes made by the five " 14342 "hunk, and <filename>foo</filename>, containing the changes made by the five "
14361 "successful hunks." 14343 "successful hunks."
14362 msgstr "" 14344 msgstr ""
14363 14345
14364 #. type: Content of: <book><chapter><sect1><sect2><title> 14346 #. type: Content of: <book><chapter><sect1><sect2><title>
14365 #: ../en/ch11-mq.xml:630 14347 #: ../en/ch11-mq.xml:629
14366 msgid "Some quirks of patch representation" 14348 msgid "Some quirks of patch representation"
14367 msgstr "补丁的一些特性" 14349 msgstr "补丁的一些特性"
14368 14350
14369 #. type: Content of: <book><chapter><sect1><sect2><para> 14351 #. type: Content of: <book><chapter><sect1><sect2><para>
14370 #: ../en/ch11-mq.xml:632 14352 #: ../en/ch11-mq.xml:631
14371 msgid "" 14353 msgid ""
14372 "There are a few useful things to know about how <command>patch</command> " 14354 "There are a few useful things to know about how <command>patch</command> "
14373 "works with files." 14355 "works with files."
14374 msgstr "" 14356 msgstr ""
14375 14357
14376 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14358 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14377 #: ../en/ch11-mq.xml:635 14359 #: ../en/ch11-mq.xml:634
14378 msgid "" 14360 msgid ""
14379 "This should already be obvious, but <command>patch</command> cannot handle " 14361 "This should already be obvious, but <command>patch</command> cannot handle "
14380 "binary files." 14362 "binary files."
14381 msgstr "" 14363 msgstr ""
14382 14364
14383 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14365 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14384 #: ../en/ch11-mq.xml:639 14366 #: ../en/ch11-mq.xml:638
14385 msgid "" 14367 msgid ""
14386 "Neither does it care about the executable bit; it creates new files as " 14368 "Neither does it care about the executable bit; it creates new files as "
14387 "readable, but not executable." 14369 "readable, but not executable."
14388 msgstr "" 14370 msgstr ""
14389 14371
14390 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14372 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14391 #: ../en/ch11-mq.xml:643 14373 #: ../en/ch11-mq.xml:642
14392 msgid "" 14374 msgid ""
14393 "<command>patch</command> treats the removal of a file as a diff between the " 14375 "<command>patch</command> treats the removal of a file as a diff between the "
14394 "file to be removed and the empty file. So your idea of <quote>I deleted this " 14376 "file to be removed and the empty file. So your idea of <quote>I deleted this "
14395 "file</quote> looks like <quote>every line of this file was deleted</quote> in " 14377 "file</quote> looks like <quote>every line of this file was deleted</quote> in "
14396 "a patch." 14378 "a patch."
14397 msgstr "" 14379 msgstr ""
14398 14380
14399 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14381 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14400 #: ../en/ch11-mq.xml:649 14382 #: ../en/ch11-mq.xml:648
14401 msgid "" 14383 msgid ""
14402 "It treats the addition of a file as a diff between the empty file and the " 14384 "It treats the addition of a file as a diff between the empty file and the "
14403 "file to be added. So in a patch, your idea of <quote>I added this file</" 14385 "file to be added. So in a patch, your idea of <quote>I added this file</"
14404 "quote> looks like <quote>every line of this file was added</quote>." 14386 "quote> looks like <quote>every line of this file was added</quote>."
14405 msgstr "" 14387 msgstr ""
14406 14388
14407 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14389 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14408 #: ../en/ch11-mq.xml:655 14390 #: ../en/ch11-mq.xml:654
14409 msgid "" 14391 msgid ""
14410 "It treats a renamed file as the removal of the old name, and the addition of " 14392 "It treats a renamed file as the removal of the old name, and the addition of "
14411 "the new name. This means that renamed files have a big footprint in " 14393 "the new name. This means that renamed files have a big footprint in "
14412 "patches. (Note also that Mercurial does not currently try to infer when " 14394 "patches. (Note also that Mercurial does not currently try to infer when "
14413 "files have been renamed or copied in a patch.)" 14395 "files have been renamed or copied in a patch.)"
14414 msgstr "" 14396 msgstr ""
14415 14397
14416 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14398 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14417 #: ../en/ch11-mq.xml:661 14399 #: ../en/ch11-mq.xml:660
14418 msgid "" 14400 msgid ""
14419 "<command>patch</command> cannot represent empty files, so you cannot use a " 14401 "<command>patch</command> cannot represent empty files, so you cannot use a "
14420 "patch to represent the notion <quote>I added this empty file to the tree</" 14402 "patch to represent the notion <quote>I added this empty file to the tree</"
14421 "quote>." 14403 "quote>."
14422 msgstr "" 14404 msgstr ""
14423 14405
14424 #. type: Content of: <book><chapter><sect1><sect2><title> 14406 #. type: Content of: <book><chapter><sect1><sect2><title>
14425 #: ../en/ch11-mq.xml:668 14407 #: ../en/ch11-mq.xml:667
14426 msgid "Beware the fuzz" 14408 msgid "Beware the fuzz"
14427 msgstr "当心毛刺" 14409 msgstr "当心毛刺"
14428 14410
14429 #. type: Content of: <book><chapter><sect1><sect2><para> 14411 #. type: Content of: <book><chapter><sect1><sect2><para>
14430 #: ../en/ch11-mq.xml:670 14412 #: ../en/ch11-mq.xml:669
14431 msgid "" 14413 msgid ""
14432 "While applying a hunk at an offset, or with a fuzz factor, will often be " 14414 "While applying a hunk at an offset, or with a fuzz factor, will often be "
14433 "completely successful, these inexact techniques naturally leave open the " 14415 "completely successful, these inexact techniques naturally leave open the "
14434 "possibility of corrupting the patched file. The most common cases typically " 14416 "possibility of corrupting the patched file. The most common cases typically "
14435 "involve applying a patch twice, or at an incorrect location in the file. If " 14417 "involve applying a patch twice, or at an incorrect location in the file. If "
14437 "mentions an offset or fuzz factor, you should make sure that the modified " 14419 "mentions an offset or fuzz factor, you should make sure that the modified "
14438 "files are correct afterwards." 14420 "files are correct afterwards."
14439 msgstr "" 14421 msgstr ""
14440 14422
14441 #. type: Content of: <book><chapter><sect1><sect2><para> 14423 #. type: Content of: <book><chapter><sect1><sect2><para>
14442 #: ../en/ch11-mq.xml:680 14424 #: ../en/ch11-mq.xml:679
14443 msgid "" 14425 msgid ""
14444 "It's often a good idea to refresh a patch that has applied with an offset or " 14426 "It's often a good idea to refresh a patch that has applied with an offset or "
14445 "fuzz factor; refreshing the patch generates new context information that will " 14427 "fuzz factor; refreshing the patch generates new context information that will "
14446 "make it apply cleanly. I say <quote>often,</quote> not <quote>always,</" 14428 "make it apply cleanly. I say <quote>often,</quote> not <quote>always,</"
14447 "quote> because sometimes refreshing a patch will make it fail to apply " 14429 "quote> because sometimes refreshing a patch will make it fail to apply "
14450 "a source tree, it's acceptable to have a patch apply with some fuzz, provided " 14432 "a source tree, it's acceptable to have a patch apply with some fuzz, provided "
14451 "you've verified the results of the patching process in such cases." 14433 "you've verified the results of the patching process in such cases."
14452 msgstr "" 14434 msgstr ""
14453 14435
14454 #. type: Content of: <book><chapter><sect1><sect2><title> 14436 #. type: Content of: <book><chapter><sect1><sect2><title>
14455 #: ../en/ch11-mq.xml:693 14437 #: ../en/ch11-mq.xml:692
14456 msgid "Handling rejection" 14438 msgid "Handling rejection"
14457 msgstr "处理拒绝" 14439 msgstr "处理拒绝"
14458 14440
14459 #. type: Content of: <book><chapter><sect1><sect2><para> 14441 #. type: Content of: <book><chapter><sect1><sect2><para>
14460 #: ../en/ch11-mq.xml:695 14442 #: ../en/ch11-mq.xml:694
14461 msgid "" 14443 msgid ""
14462 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it " 14444 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it "
14463 "will print an error message and exit. If it has left <filename role=\"special" 14445 "will print an error message and exit. If it has left <filename role=\"special"
14464 "\">.rej</filename> files behind, it is usually best to fix up the rejected " 14446 "\">.rej</filename> files behind, it is usually best to fix up the rejected "
14465 "hunks before you push more patches or do any further work." 14447 "hunks before you push more patches or do any further work."
14466 msgstr "" 14448 msgstr ""
14467 14449
14468 #. type: Content of: <book><chapter><sect1><sect2><para> 14450 #. type: Content of: <book><chapter><sect1><sect2><para>
14469 #: ../en/ch11-mq.xml:701 14451 #: ../en/ch11-mq.xml:700
14470 msgid "" 14452 msgid ""
14471 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does " 14453 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does "
14472 "because you've changed the underlying code that your patches are based on, " 14454 "because you've changed the underlying code that your patches are based on, "
14473 "Mercurial Queues can help; see section <xref linkend=\"sec.mq.merge\"/> for " 14455 "Mercurial Queues can help; see <xref linkend=\"sec:mq:merge\"/> for details."
14474 "details." 14456 msgstr ""
14475 msgstr "" 14457
14476 14458 #. type: Content of: <book><chapter><sect1><sect2><para>
14477 #. type: Content of: <book><chapter><sect1><sect2><para> 14459 #: ../en/ch11-mq.xml:705
14478 #: ../en/ch11-mq.xml:707
14479 msgid "" 14460 msgid ""
14480 "Unfortunately, there aren't any great techniques for dealing with rejected " 14461 "Unfortunately, there aren't any great techniques for dealing with rejected "
14481 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</" 14462 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</"
14482 "filename> file and edit the target file, applying the rejected hunks by hand." 14463 "filename> file and edit the target file, applying the rejected hunks by hand."
14483 msgstr "" 14464 msgstr ""
14484 14465
14485 #. type: Content of: <book><chapter><sect1><sect2><para> 14466 #. type: Content of: <book><chapter><sect1><sect2><para>
14486 #: ../en/ch11-mq.xml:712 14467 #: ../en/ch11-mq.xml:710
14487 msgid "" 14468 msgid ""
14488 "If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a " 14469 "If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a "
14489 "tool called <command>wiggle</command> <citation>web:wiggle</citation>, which " 14470 "tool called <command>wiggle</command> <citation>web:wiggle</citation>, which "
14490 "is more vigorous than <command>patch</command> in its attempts to make a " 14471 "is more vigorous than <command>patch</command> in its attempts to make a "
14491 "patch apply." 14472 "patch apply."
14492 msgstr "" 14473 msgstr ""
14493 14474
14494 #. type: Content of: <book><chapter><sect1><sect2><para> 14475 #. type: Content of: <book><chapter><sect1><sect2><para>
14495 #: ../en/ch11-mq.xml:718 14476 #: ../en/ch11-mq.xml:716
14496 msgid "" 14477 msgid ""
14497 "Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), " 14478 "Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), "
14498 "wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</" 14479 "wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</"
14499 "citation>, which takes a simple approach to automating the application of " 14480 "citation>, which takes a simple approach to automating the application of "
14500 "hunks rejected by <command>patch</command>. The <command>mpatch</command> " 14481 "hunks rejected by <command>patch</command>. The <command>mpatch</command> "
14501 "command can help with four common reasons that a hunk may be rejected:" 14482 "command can help with four common reasons that a hunk may be rejected:"
14502 msgstr "" 14483 msgstr ""
14503 14484
14504 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14485 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14505 #: ../en/ch11-mq.xml:727 14486 #: ../en/ch11-mq.xml:725
14506 msgid "The context in the middle of a hunk has changed." 14487 msgid "The context in the middle of a hunk has changed."
14507 msgstr "" 14488 msgstr ""
14508 14489
14509 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14490 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14510 #: ../en/ch11-mq.xml:730 14491 #: ../en/ch11-mq.xml:728
14511 msgid "A hunk is missing some context at the beginning or end." 14492 msgid "A hunk is missing some context at the beginning or end."
14512 msgstr "" 14493 msgstr ""
14513 14494
14514 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14495 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14515 #: ../en/ch11-mq.xml:733 14496 #: ../en/ch11-mq.xml:731
14516 msgid "" 14497 msgid ""
14517 "A large hunk might apply better&emdash;either entirely or in part&emdash;if " 14498 "A large hunk might apply better&emdash;either entirely or in part&emdash;if "
14518 "it was broken up into smaller hunks." 14499 "it was broken up into smaller hunks."
14519 msgstr "" 14500 msgstr ""
14520 14501
14521 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14502 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14522 #: ../en/ch11-mq.xml:737 14503 #: ../en/ch11-mq.xml:735
14523 msgid "" 14504 msgid ""
14524 "A hunk removes lines with slightly different content than those currently " 14505 "A hunk removes lines with slightly different content than those currently "
14525 "present in the file." 14506 "present in the file."
14526 msgstr "" 14507 msgstr ""
14527 14508
14528 #. type: Content of: <book><chapter><sect1><sect2><para> 14509 #. type: Content of: <book><chapter><sect1><sect2><para>
14529 #: ../en/ch11-mq.xml:741 14510 #: ../en/ch11-mq.xml:739
14530 msgid "" 14511 msgid ""
14531 "If you use <command>wiggle</command> or <command>mpatch</command>, you should " 14512 "If you use <command>wiggle</command> or <command>mpatch</command>, you should "
14532 "be doubly careful to check your results when you're done. In fact, " 14513 "be doubly careful to check your results when you're done. In fact, "
14533 "<command>mpatch</command> enforces this method of double-checking the tool's " 14514 "<command>mpatch</command> enforces this method of double-checking the tool's "
14534 "output, by automatically dropping you into a merge program when it has done " 14515 "output, by automatically dropping you into a merge program when it has done "
14535 "its job, so that you can verify its work and finish off any remaining merges." 14516 "its job, so that you can verify its work and finish off any remaining merges."
14536 msgstr "" 14517 msgstr ""
14537 14518
14538 #. type: Content of: <book><chapter><sect1><title> 14519 #. type: Content of: <book><chapter><sect1><title>
14539 #: ../en/ch11-mq.xml:753 14520 #: ../en/ch11-mq.xml:751
14540 msgid "Getting the best performance out of MQ" 14521 msgid "Getting the best performance out of MQ"
14541 msgstr "MQ 的性能" 14522 msgstr "MQ 的性能"
14542 14523
14543 #. type: Content of: <book><chapter><sect1><para> 14524 #. type: Content of: <book><chapter><sect1><para>
14544 #: ../en/ch11-mq.xml:755 14525 #: ../en/ch11-mq.xml:753
14545 msgid "" 14526 msgid ""
14546 "MQ is very efficient at handling a large number of patches. I ran some " 14527 "MQ is very efficient at handling a large number of patches. I ran some "
14547 "performance experiments in mid-2006 for a talk that I gave at the 2006 " 14528 "performance experiments in mid-2006 for a talk that I gave at the 2006 "
14548 "EuroPython conference <citation>web:europython</citation>. I used as my data " 14529 "EuroPython conference <citation>web:europython</citation>. I used as my data "
14549 "set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I " 14530 "set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I "
14550 "applied these on top of a Linux kernel repository containing all 27,472 " 14531 "applied these on top of a Linux kernel repository containing all 27,472 "
14551 "revisions between Linux 2.6.12-rc2 and Linux 2.6.17." 14532 "revisions between Linux 2.6.12-rc2 and Linux 2.6.17."
14552 msgstr "" 14533 msgstr ""
14553 14534
14554 #. type: Content of: <book><chapter><sect1><para> 14535 #. type: Content of: <book><chapter><sect1><para>
14555 #: ../en/ch11-mq.xml:764 14536 #: ../en/ch11-mq.xml:762
14556 msgid "" 14537 msgid ""
14557 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " 14538 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush "
14558 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " 14539 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 "
14559 "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role=" 14540 "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role="
14560 "\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. " 14541 "\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. "
14562 "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest " 14543 "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest "
14563 "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds." 14544 "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds."
14564 msgstr "" 14545 msgstr ""
14565 14546
14566 #. type: Content of: <book><chapter><sect1><para> 14547 #. type: Content of: <book><chapter><sect1><para>
14567 #: ../en/ch11-mq.xml:775 14548 #: ../en/ch11-mq.xml:773
14568 msgid "" 14549 msgid ""
14569 "Clearly, MQ is well suited to working in large trees, but there are a few " 14550 "Clearly, MQ is well suited to working in large trees, but there are a few "
14570 "tricks you can use to get the best performance of it." 14551 "tricks you can use to get the best performance of it."
14571 msgstr "" 14552 msgstr ""
14572 14553
14573 #. type: Content of: <book><chapter><sect1><para> 14554 #. type: Content of: <book><chapter><sect1><para>
14574 #: ../en/ch11-mq.xml:779 14555 #: ../en/ch11-mq.xml:777
14575 msgid "" 14556 msgid ""
14576 "First of all, try to <quote>batch</quote> operations together. Every time " 14557 "First of all, try to <quote>batch</quote> operations together. Every time "
14577 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-" 14558 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-"
14578 "mq\">qpop</command>, these commands scan the working directory once to make " 14559 "mq\">qpop</command>, these commands scan the working directory once to make "
14579 "sure you haven't made some changes and then forgotten to run <command role=" 14560 "sure you haven't made some changes and then forgotten to run <command role="
14581 "takes is unnoticeable. However, on a medium-sized tree (containing tens of " 14562 "takes is unnoticeable. However, on a medium-sized tree (containing tens of "
14582 "thousands of files), it can take a second or more." 14563 "thousands of files), it can take a second or more."
14583 msgstr "" 14564 msgstr ""
14584 14565
14585 #. type: Content of: <book><chapter><sect1><para> 14566 #. type: Content of: <book><chapter><sect1><para>
14586 #: ../en/ch11-mq.xml:790 14567 #: ../en/ch11-mq.xml:788
14587 msgid "" 14568 msgid ""
14588 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq" 14569 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq"
14589 "\">qpop</command> commands allow you to push and pop multiple patches at a " 14570 "\">qpop</command> commands allow you to push and pop multiple patches at a "
14590 "time. You can identify the <quote>destination patch</quote> that you want to " 14571 "time. You can identify the <quote>destination patch</quote> that you want to "
14591 "end up at. When you <command role=\"hg-ext-mq\">qpush</command> with a " 14572 "end up at. When you <command role=\"hg-ext-mq\">qpush</command> with a "
14593 "the applied stack. When you <command role=\"hg-ext-mq\">qpop</command> to a " 14574 "the applied stack. When you <command role=\"hg-ext-mq\">qpop</command> to a "
14594 "destination, MQ will pop patches until the destination patch is at the top." 14575 "destination, MQ will pop patches until the destination patch is at the top."
14595 msgstr "" 14576 msgstr ""
14596 14577
14597 #. type: Content of: <book><chapter><sect1><para> 14578 #. type: Content of: <book><chapter><sect1><para>
14598 #: ../en/ch11-mq.xml:800 14579 #: ../en/ch11-mq.xml:798
14599 msgid "" 14580 msgid ""
14600 "You can identify a destination patch using either the name of the patch, or " 14581 "You can identify a destination patch using either the name of the patch, or "
14601 "by number. If you use numeric addressing, patches are counted from zero; " 14582 "by number. If you use numeric addressing, patches are counted from zero; "
14602 "this means that the first patch is zero, the second is one, and so on." 14583 "this means that the first patch is zero, the second is one, and so on."
14603 msgstr "" 14584 msgstr ""
14604 14585
14605 #. type: Content of: <book><chapter><sect1><title> 14586 #. type: Content of: <book><chapter><sect1><title>
14606 #: ../en/ch11-mq.xml:807 14587 #: ../en/ch11-mq.xml:805
14607 msgid "Updating your patches when the underlying code changes" 14588 msgid "Updating your patches when the underlying code changes"
14608 msgstr "当基础代码改变时,更新补丁的方法" 14589 msgstr "当基础代码改变时,更新补丁的方法"
14609 14590
14610 #. type: Content of: <book><chapter><sect1><para> 14591 #. type: Content of: <book><chapter><sect1><para>
14611 #: ../en/ch11-mq.xml:810 14592 #: ../en/ch11-mq.xml:808
14612 msgid "" 14593 msgid ""
14613 "It's common to have a stack of patches on top of an underlying repository " 14594 "It's common to have a stack of patches on top of an underlying repository "
14614 "that you don't modify directly. If you're working on changes to third-party " 14595 "that you don't modify directly. If you're working on changes to third-party "
14615 "code, or on a feature that is taking longer to develop than the rate of " 14596 "code, or on a feature that is taking longer to develop than the rate of "
14616 "change of the code beneath, you will often need to sync up with the " 14597 "change of the code beneath, you will often need to sync up with the "
14617 "underlying code, and fix up any hunks in your patches that no longer apply. " 14598 "underlying code, and fix up any hunks in your patches that no longer apply. "
14618 "This is called <emphasis>rebasing</emphasis> your patch series." 14599 "This is called <emphasis>rebasing</emphasis> your patch series."
14619 msgstr "" 14600 msgstr ""
14620 14601
14621 #. type: Content of: <book><chapter><sect1><para> 14602 #. type: Content of: <book><chapter><sect1><para>
14622 #: ../en/ch11-mq.xml:819 14603 #: ../en/ch11-mq.xml:817
14623 msgid "" 14604 msgid ""
14624 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option " 14605 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option "
14625 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " 14606 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then "
14626 "<command role=\"hg-cmd\">hg pull</command> changes into the underlying " 14607 "<command role=\"hg-cmd\">hg pull</command> changes into the underlying "
14627 "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-" 14608 "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-"
14631 "\">qrefresh</command> the affected patch, and continue pushing until you have " 14612 "\">qrefresh</command> the affected patch, and continue pushing until you have "
14632 "fixed your entire stack." 14613 "fixed your entire stack."
14633 msgstr "" 14614 msgstr ""
14634 14615
14635 #. type: Content of: <book><chapter><sect1><para> 14616 #. type: Content of: <book><chapter><sect1><para>
14636 #: ../en/ch11-mq.xml:831 14617 #: ../en/ch11-mq.xml:829
14637 msgid "" 14618 msgid ""
14638 "This approach is easy to use and works well if you don't expect changes to " 14619 "This approach is easy to use and works well if you don't expect changes to "
14639 "the underlying code to affect how well your patches apply. If your patch " 14620 "the underlying code to affect how well your patches apply. If your patch "
14640 "stack touches code that is modified frequently or invasively in the " 14621 "stack touches code that is modified frequently or invasively in the "
14641 "underlying repository, however, fixing up rejected hunks by hand quickly " 14622 "underlying repository, however, fixing up rejected hunks by hand quickly "
14642 "becomes tiresome." 14623 "becomes tiresome."
14643 msgstr "" 14624 msgstr ""
14644 14625
14645 #. type: Content of: <book><chapter><sect1><para> 14626 #. type: Content of: <book><chapter><sect1><para>
14646 #: ../en/ch11-mq.xml:838 14627 #: ../en/ch11-mq.xml:836
14647 msgid "" 14628 msgid ""
14648 "It's possible to partially automate the rebasing process. If your patches " 14629 "It's possible to partially automate the rebasing process. If your patches "
14649 "apply cleanly against some revision of the underlying repo, MQ can use this " 14630 "apply cleanly against some revision of the underlying repo, MQ can use this "
14650 "information to help you to resolve conflicts between your patches and a " 14631 "information to help you to resolve conflicts between your patches and a "
14651 "different revision." 14632 "different revision."
14652 msgstr "" 14633 msgstr ""
14653 14634
14654 #. type: Content of: <book><chapter><sect1><para> 14635 #. type: Content of: <book><chapter><sect1><para>
14636 #: ../en/ch11-mq.xml:842
14637 msgid "The process is a little involved."
14638 msgstr ""
14639
14640 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14655 #: ../en/ch11-mq.xml:844 14641 #: ../en/ch11-mq.xml:844
14656 msgid "The process is a little involved."
14657 msgstr ""
14658
14659 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14660 #: ../en/ch11-mq.xml:846
14661 msgid "" 14642 msgid ""
14662 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches " 14643 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches "
14663 "on top of the revision where you know that they apply cleanly." 14644 "on top of the revision where you know that they apply cleanly."
14664 msgstr "" 14645 msgstr ""
14665 14646
14666 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14647 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14667 #: ../en/ch11-mq.xml:850 14648 #: ../en/ch11-mq.xml:848
14668 msgid "" 14649 msgid ""
14669 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg " 14650 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg "
14670 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role=" 14651 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role="
14671 "\"hg-ext-mq-cmd-qsave-opt\">hg -c</option></command>. This prints the name " 14652 "\"hg-ext-mq-cmd-qsave-opt\">hg -c</option></command>. This prints the name "
14672 "of the directory that it has saved the patches in. It will save the patches " 14653 "of the directory that it has saved the patches in. It will save the patches "
14677 "\"special\">series</filename> and <filename role=\"special\">status</" 14658 "\"special\">series</filename> and <filename role=\"special\">status</"
14678 "filename> files." 14659 "filename> files."
14679 msgstr "" 14660 msgstr ""
14680 14661
14681 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14662 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14682 #: ../en/ch11-mq.xml:864 14663 #: ../en/ch11-mq.xml:862
14683 msgid "" 14664 msgid ""
14684 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the " 14665 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the "
14685 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</" 14666 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</"
14686 "command>; see below for why.)" 14667 "command>; see below for why.)"
14687 msgstr "" 14668 msgstr ""
14688 14669
14689 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14670 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14690 #: ../en/ch11-mq.xml:869 14671 #: ../en/ch11-mq.xml:867
14691 msgid "" 14672 msgid ""
14692 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update " 14673 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update "
14693 "<option role=\"hg-opt-update\">-C</option></command> to override the patches " 14674 "<option role=\"hg-opt-update\">-C</option></command> to override the patches "
14694 "you have pushed." 14675 "you have pushed."
14695 msgstr "" 14676 msgstr ""
14696 14677
14697 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14678 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14698 #: ../en/ch11-mq.xml:874 14679 #: ../en/ch11-mq.xml:872
14699 msgid "" 14680 msgid ""
14700 "Merge all patches using <command>hg qpush -m -a</command>. The <option role=" 14681 "Merge all patches using <command>hg qpush -m -a</command>. The <option role="
14701 "\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq" 14682 "\"hg-ext-mq-cmd-qpush-opt\">-m</option> option to <command role=\"hg-ext-mq"
14702 "\">qpush</command> tells MQ to perform a three-way merge if the patch fails " 14683 "\">qpush</command> tells MQ to perform a three-way merge if the patch fails "
14703 "to apply." 14684 "to apply."
14704 msgstr "" 14685 msgstr ""
14705 14686
14706 #. type: Content of: <book><chapter><sect1><para> 14687 #. type: Content of: <book><chapter><sect1><para>
14707 #: ../en/ch11-mq.xml:882 14688 #: ../en/ch11-mq.xml:880
14708 msgid "" 14689 msgid ""
14709 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-" 14690 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-"
14710 "qpush-opt\">hg -m</option></command>, each patch in the <filename role=" 14691 "qpush-opt\">hg -m</option></command>, each patch in the <filename role="
14711 "\"special\">series</filename> file is applied normally. If a patch applies " 14692 "\"special\">series</filename> file is applied normally. If a patch applies "
14712 "with fuzz or rejects, MQ looks at the queue you <command role=\"hg-ext-mq" 14693 "with fuzz or rejects, MQ looks at the queue you <command role=\"hg-ext-mq"
14714 "changeset. This merge uses Mercurial's normal merge machinery, so it may pop " 14695 "changeset. This merge uses Mercurial's normal merge machinery, so it may pop "
14715 "up a GUI merge tool to help you to resolve problems." 14696 "up a GUI merge tool to help you to resolve problems."
14716 msgstr "" 14697 msgstr ""
14717 14698
14718 #. type: Content of: <book><chapter><sect1><para> 14699 #. type: Content of: <book><chapter><sect1><para>
14719 #: ../en/ch11-mq.xml:892 14700 #: ../en/ch11-mq.xml:890
14720 msgid "" 14701 msgid ""
14721 "When you finish resolving the effects of a patch, MQ refreshes your patch " 14702 "When you finish resolving the effects of a patch, MQ refreshes your patch "
14722 "based on the result of the merge." 14703 "based on the result of the merge."
14723 msgstr "" 14704 msgstr ""
14724 14705
14725 #. type: Content of: <book><chapter><sect1><para> 14706 #. type: Content of: <book><chapter><sect1><para>
14726 #: ../en/ch11-mq.xml:895 14707 #: ../en/ch11-mq.xml:893
14727 msgid "" 14708 msgid ""
14728 "At the end of this process, your repository will have one extra head from the " 14709 "At the end of this process, your repository will have one extra head from the "
14729 "old patch queue, and a copy of the old patch queue will be in <filename role=" 14710 "old patch queue, and a copy of the old patch queue will be in <filename role="
14730 "\"special\" class=\"directory\">.hg/patches.N</filename>. You can remove the " 14711 "\"special\" class=\"directory\">.hg/patches.N</filename>. You can remove the "
14731 "extra head using <command role=\"hg-cmd\">hg qpop -a -n patches.N</command> " 14712 "extra head using <command role=\"hg-cmd\">hg qpop -a -n patches.N</command> "
14733 "role=\"special\" class=\"directory\">.hg/patches.N</filename> once you are " 14714 "role=\"special\" class=\"directory\">.hg/patches.N</filename> once you are "
14734 "sure that you no longer need it as a backup." 14715 "sure that you no longer need it as a backup."
14735 msgstr "" 14716 msgstr ""
14736 14717
14737 #. type: Content of: <book><chapter><sect1><title> 14718 #. type: Content of: <book><chapter><sect1><title>
14738 #: ../en/ch11-mq.xml:907 14719 #: ../en/ch11-mq.xml:905
14739 msgid "Identifying patches" 14720 msgid "Identifying patches"
14740 msgstr "标识补丁" 14721 msgstr "标识补丁"
14741 14722
14742 #. type: Content of: <book><chapter><sect1><para> 14723 #. type: Content of: <book><chapter><sect1><para>
14743 #: ../en/ch11-mq.xml:909 14724 #: ../en/ch11-mq.xml:907
14744 msgid "" 14725 msgid ""
14745 "MQ commands that work with patches let you refer to a patch either by using " 14726 "MQ commands that work with patches let you refer to a patch either by using "
14746 "its name or by a number. By name is obvious enough; pass the name " 14727 "its name or by a number. By name is obvious enough; pass the name "
14747 "<filename>foo.patch</filename> to <command role=\"hg-ext-mq\">qpush</" 14728 "<filename>foo.patch</filename> to <command role=\"hg-ext-mq\">qpush</"
14748 "command>, for example, and it will push patches until <filename>foo.patch</" 14729 "command>, for example, and it will push patches until <filename>foo.patch</"
14749 "filename> is applied." 14730 "filename> is applied."
14750 msgstr "" 14731 msgstr ""
14751 14732
14752 #. type: Content of: <book><chapter><sect1><para> 14733 #. type: Content of: <book><chapter><sect1><para>
14753 #: ../en/ch11-mq.xml:916 14734 #: ../en/ch11-mq.xml:914
14754 msgid "" 14735 msgid ""
14755 "As a shortcut, you can refer to a patch using both a name and a numeric " 14736 "As a shortcut, you can refer to a patch using both a name and a numeric "
14756 "offset; <literal>foo.patch-2</literal> means <quote>two patches before " 14737 "offset; <literal>foo.patch-2</literal> means <quote>two patches before "
14757 "<literal>foo.patch</literal></quote>, while <literal>bar.patch+4</literal> " 14738 "<literal>foo.patch</literal></quote>, while <literal>bar.patch+4</literal> "
14758 "means <quote>four patches after <literal>bar.patch</literal></quote>." 14739 "means <quote>four patches after <literal>bar.patch</literal></quote>."
14759 msgstr "" 14740 msgstr ""
14760 14741
14761 #. type: Content of: <book><chapter><sect1><para> 14742 #. type: Content of: <book><chapter><sect1><para>
14762 #: ../en/ch11-mq.xml:922 14743 #: ../en/ch11-mq.xml:920
14763 msgid "" 14744 msgid ""
14764 "Referring to a patch by index isn't much different. The first patch printed " 14745 "Referring to a patch by index isn't much different. The first patch printed "
14765 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero " 14746 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero "
14766 "(yes, it's one of those start-at-zero counting systems); the second is patch " 14747 "(yes, it's one of those start-at-zero counting systems); the second is patch "
14767 "one; and so on." 14748 "one; and so on."
14768 msgstr "" 14749 msgstr ""
14769 14750
14770 #. type: Content of: <book><chapter><sect1><para> 14751 #. type: Content of: <book><chapter><sect1><para>
14771 #: ../en/ch11-mq.xml:928 14752 #: ../en/ch11-mq.xml:926
14772 msgid "" 14753 msgid ""
14773 "MQ also makes it easy to work with patches when you are using normal " 14754 "MQ also makes it easy to work with patches when you are using normal "
14774 "Mercurial commands. Every command that accepts a changeset ID will also " 14755 "Mercurial commands. Every command that accepts a changeset ID will also "
14775 "accept the name of an applied patch. MQ augments the tags normally in the " 14756 "accept the name of an applied patch. MQ augments the tags normally in the "
14776 "repository with an eponymous one for each applied patch. In addition, the " 14757 "repository with an eponymous one for each applied patch. In addition, the "
14778 "\">qtip</literal> identify the <quote>bottom-most</quote> and topmost applied " 14759 "\">qtip</literal> identify the <quote>bottom-most</quote> and topmost applied "
14779 "patches, respectively." 14760 "patches, respectively."
14780 msgstr "" 14761 msgstr ""
14781 14762
14782 #. type: Content of: <book><chapter><sect1><para> 14763 #. type: Content of: <book><chapter><sect1><para>
14783 #: ../en/ch11-mq.xml:938 14764 #: ../en/ch11-mq.xml:936
14784 msgid "" 14765 msgid ""
14785 "These additions to Mercurial's normal tagging capabilities make dealing with " 14766 "These additions to Mercurial's normal tagging capabilities make dealing with "
14786 "patches even more of a breeze." 14767 "patches even more of a breeze."
14787 msgstr "" 14768 msgstr ""
14788 14769
14789 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14770 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14790 #: ../en/ch11-mq.xml:941 14771 #: ../en/ch11-mq.xml:939
14791 msgid "Want to patchbomb a mailing list with your latest series of changes?" 14772 msgid "Want to patchbomb a mailing list with your latest series of changes?"
14792 msgstr "" 14773 msgstr ""
14793 14774
14794 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14775 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14795 #: ../en/ch11-mq.xml:944 14776 #: ../en/ch11-mq.xml:942
14796 msgid "" 14777 msgid ""
14797 "(Don't know what <quote>patchbombing</quote> is? See section <xref linkend=" 14778 "(Don't know what <quote>patchbombing</quote> is? See <xref linkend=\"sec:"
14798 "\"sec.hgext.patchbomb\"/>.)" 14779 "hgext:patchbomb\"/>.)"
14799 msgstr "" 14780 msgstr ""
14800 14781
14801 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14782 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14802 #: ../en/ch11-mq.xml:947 14783 #: ../en/ch11-mq.xml:945
14803 msgid "" 14784 msgid ""
14804 "Need to see all of the patches since <literal>foo.patch</literal> that have " 14785 "Need to see all of the patches since <literal>foo.patch</literal> that have "
14805 "touched files in a subdirectory of your tree?" 14786 "touched files in a subdirectory of your tree?"
14806 msgstr "" 14787 msgstr ""
14807 14788
14808 #. type: Content of: <book><chapter><sect1><para> 14789 #. type: Content of: <book><chapter><sect1><para>
14809 #: ../en/ch11-mq.xml:954 14790 #: ../en/ch11-mq.xml:952
14810 msgid "" 14791 msgid ""
14811 "Because MQ makes the names of patches available to the rest of Mercurial " 14792 "Because MQ makes the names of patches available to the rest of Mercurial "
14812 "through its normal internal tag machinery, you don't need to type in the " 14793 "through its normal internal tag machinery, you don't need to type in the "
14813 "entire name of a patch when you want to identify it by name." 14794 "entire name of a patch when you want to identify it by name."
14814 msgstr "" 14795 msgstr ""
14815 14796
14816 #. type: Content of: <book><chapter><sect1><para> 14797 #. type: Content of: <book><chapter><sect1><para>
14817 #: ../en/ch11-mq.xml:959 14798 #: ../en/ch11-mq.xml:957
14818 msgid "" 14799 msgid ""
14819 "Another nice consequence of representing patch names as tags is that when you " 14800 "Another nice consequence of representing patch names as tags is that when you "
14820 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a " 14801 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a "
14821 "patch's name as a tag, simply as part of its normal output. This makes it " 14802 "patch's name as a tag, simply as part of its normal output. This makes it "
14822 "easy to visually distinguish applied patches from underlying <quote>normal</" 14803 "easy to visually distinguish applied patches from underlying <quote>normal</"
14823 "quote> revisions. The following example shows a few normal Mercurial " 14804 "quote> revisions. The following example shows a few normal Mercurial "
14824 "commands in use with applied patches." 14805 "commands in use with applied patches."
14825 msgstr "" 14806 msgstr ""
14826 14807
14827 #. type: Content of: <book><chapter><sect1><title> 14808 #. type: Content of: <book><chapter><sect1><title>
14828 #: ../en/ch11-mq.xml:972 14809 #: ../en/ch11-mq.xml:970
14829 msgid "Useful things to know about" 14810 msgid "Useful things to know about"
14830 msgstr "其它需要了解的东西" 14811 msgstr "其它需要了解的东西"
14831 14812
14832 #. type: Content of: <book><chapter><sect1><para> 14813 #. type: Content of: <book><chapter><sect1><para>
14833 #: ../en/ch11-mq.xml:974 14814 #: ../en/ch11-mq.xml:972
14834 msgid "" 14815 msgid ""
14835 "There are a number of aspects of MQ usage that don't fit tidily into sections " 14816 "There are a number of aspects of MQ usage that don't fit tidily into sections "
14836 "of their own, but that are good to know. Here they are, in one place." 14817 "of their own, but that are good to know. Here they are, in one place."
14837 msgstr "" 14818 msgstr ""
14838 14819
14839 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14820 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14840 #: ../en/ch11-mq.xml:979 14821 #: ../en/ch11-mq.xml:977
14841 msgid "" 14822 msgid ""
14842 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and " 14823 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and "
14843 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that " 14824 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that "
14844 "represents the patch after the pop/push will have a <emphasis>different " 14825 "represents the patch after the pop/push will have a <emphasis>different "
14845 "identity</emphasis> than the changeset that represented the hash beforehand. " 14826 "identity</emphasis> than the changeset that represented the hash beforehand. "
14846 "See section <xref linkend=\"sec.mqref.cmd.qpush\"/> for information as to why " 14827 "See <xref linkend=\"sec:mqref:cmd:qpush\"/> for information as to why this is."
14847 "this is."
14848 msgstr "" 14828 msgstr ""
14849 14829
14850 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14830 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14851 #: ../en/ch11-mq.xml:988 14831 #: ../en/ch11-mq.xml:986
14852 msgid "" 14832 msgid ""
14853 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes " 14833 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes "
14854 "from another branch with a patch changeset, at least if you want to maintain " 14834 "from another branch with a patch changeset, at least if you want to maintain "
14855 "the <quote>patchiness</quote> of that changeset and changesets below it on " 14835 "the <quote>patchiness</quote> of that changeset and changesets below it on "
14856 "the patch stack. If you try to do this, it will appear to succeed, but MQ " 14836 "the patch stack. If you try to do this, it will appear to succeed, but MQ "
14857 "will become confused." 14837 "will become confused."
14858 msgstr "" 14838 msgstr ""
14859 14839
14860 #. type: Content of: <book><chapter><sect1><title> 14840 #. type: Content of: <book><chapter><sect1><title>
14861 #: ../en/ch11-mq.xml:999 14841 #: ../en/ch11-mq.xml:997
14862 msgid "Managing patches in a repository" 14842 msgid "Managing patches in a repository"
14863 msgstr "在版本库管理补丁" 14843 msgstr "在版本库管理补丁"
14864 14844
14865 #. type: Content of: <book><chapter><sect1><para> 14845 #. type: Content of: <book><chapter><sect1><para>
14866 #: ../en/ch11-mq.xml:1001 14846 #: ../en/ch11-mq.xml:999
14867 msgid "" 14847 msgid ""
14868 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</" 14848 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</"
14869 "filename> directory resides outside a Mercurial repository's working " 14849 "filename> directory resides outside a Mercurial repository's working "
14870 "directory, the <quote>underlying</quote> Mercurial repository knows nothing " 14850 "directory, the <quote>underlying</quote> Mercurial repository knows nothing "
14871 "about the management or presence of patches." 14851 "about the management or presence of patches."
14872 msgstr "" 14852 msgstr ""
14873 14853
14874 #. type: Content of: <book><chapter><sect1><para> 14854 #. type: Content of: <book><chapter><sect1><para>
14875 #: ../en/ch11-mq.xml:1007 14855 #: ../en/ch11-mq.xml:1005
14876 msgid "" 14856 msgid ""
14877 "This presents the interesting possibility of managing the contents of the " 14857 "This presents the interesting possibility of managing the contents of the "
14878 "patch directory as a Mercurial repository in its own right. This can be a " 14858 "patch directory as a Mercurial repository in its own right. This can be a "
14879 "useful way to work. For example, you can work on a patch for a while, " 14859 "useful way to work. For example, you can work on a patch for a while, "
14880 "<command role=\"hg-ext-mq\">qrefresh</command> it, then <command role=\"hg-cmd" 14860 "<command role=\"hg-ext-mq\">qrefresh</command> it, then <command role=\"hg-cmd"
14881 "\">hg commit</command> the current state of the patch. This lets you " 14861 "\">hg commit</command> the current state of the patch. This lets you "
14882 "<quote>roll back</quote> to that version of the patch later on." 14862 "<quote>roll back</quote> to that version of the patch later on."
14883 msgstr "" 14863 msgstr ""
14884 14864
14885 #. type: Content of: <book><chapter><sect1><para> 14865 #. type: Content of: <book><chapter><sect1><para>
14886 #: ../en/ch11-mq.xml:1016 14866 #: ../en/ch11-mq.xml:1014
14887 msgid "" 14867 msgid ""
14888 "You can then share different versions of the same patch stack among multiple " 14868 "You can then share different versions of the same patch stack among multiple "
14889 "underlying repositories. I use this when I am developing a Linux kernel " 14869 "underlying repositories. I use this when I am developing a Linux kernel "
14890 "feature. I have a pristine copy of my kernel sources for each of several CPU " 14870 "feature. I have a pristine copy of my kernel sources for each of several CPU "
14891 "architectures, and a cloned repository under each that contains the patches I " 14871 "architectures, and a cloned repository under each that contains the patches I "
14893 "push my current patches to the patch repository associated with that kernel " 14873 "push my current patches to the patch repository associated with that kernel "
14894 "tree, pop and push all of my patches, and build and test that kernel." 14874 "tree, pop and push all of my patches, and build and test that kernel."
14895 msgstr "" 14875 msgstr ""
14896 14876
14897 #. type: Content of: <book><chapter><sect1><para> 14877 #. type: Content of: <book><chapter><sect1><para>
14898 #: ../en/ch11-mq.xml:1026 14878 #: ../en/ch11-mq.xml:1024
14899 msgid "" 14879 msgid ""
14900 "Managing patches in a repository makes it possible for multiple developers to " 14880 "Managing patches in a repository makes it possible for multiple developers to "
14901 "work on the same patch series without colliding with each other, all on top " 14881 "work on the same patch series without colliding with each other, all on top "
14902 "of an underlying source base that they may or may not control." 14882 "of an underlying source base that they may or may not control."
14903 msgstr "" 14883 msgstr ""
14904 14884
14905 #. type: Content of: <book><chapter><sect1><sect2><title> 14885 #. type: Content of: <book><chapter><sect1><sect2><title>
14906 #: ../en/ch11-mq.xml:1032 14886 #: ../en/ch11-mq.xml:1030
14907 msgid "MQ support for patch repositories" 14887 msgid "MQ support for patch repositories"
14908 msgstr "MQ 支持补丁版本库" 14888 msgstr "MQ 支持补丁版本库"
14909 14889
14910 #. type: Content of: <book><chapter><sect1><sect2><para> 14890 #. type: Content of: <book><chapter><sect1><sect2><para>
14911 #: ../en/ch11-mq.xml:1034 14891 #: ../en/ch11-mq.xml:1032
14912 msgid "" 14892 msgid ""
14913 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">." 14893 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">."
14914 "hg/patches</filename> directory as a repository; when you prepare a " 14894 "hg/patches</filename> directory as a repository; when you prepare a "
14915 "repository for working with patches using <command role=\"hg-ext-mq\">qinit</" 14895 "repository for working with patches using <command role=\"hg-ext-mq\">qinit</"
14916 "command>, you can pass the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 14896 "command>, you can pass the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
14917 "option> option to create the <filename role=\"special\" class=\"directory\">." 14897 "option> option to create the <filename role=\"special\" class=\"directory\">."
14918 "hg/patches</filename> directory as a Mercurial repository." 14898 "hg/patches</filename> directory as a Mercurial repository."
14919 msgstr "" 14899 msgstr ""
14920 14900
14921 #. type: Content of: <book><chapter><sect1><sect2><note><para> 14901 #. type: Content of: <book><chapter><sect1><sect2><note><para>
14922 #: ../en/ch11-mq.xml:1044 14902 #: ../en/ch11-mq.xml:1042
14923 msgid "" 14903 msgid ""
14924 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 14904 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
14925 "option> option, you can simply go into the <filename role=\"special\" class=" 14905 "option> option, you can simply go into the <filename role=\"special\" class="
14926 "\"directory\">.hg/patches</filename> directory at any time and run <command " 14906 "\"directory\">.hg/patches</filename> directory at any time and run <command "
14927 "role=\"hg-cmd\">hg init</command>. Don't forget to add an entry for the " 14907 "role=\"hg-cmd\">hg init</command>. Don't forget to add an entry for the "
14928 "<filename role=\"special\">status</filename> file to the <filename role=" 14908 "<filename role=\"special\">status</filename> file to the <filename role="
14929 "\"special\">.hgignore</filename> file, though" 14909 "\"special\">.hgignore</filename> file, though"
14930 msgstr "" 14910 msgstr ""
14931 14911
14932 #. type: Content of: <book><chapter><sect1><sect2><note><para> 14912 #. type: Content of: <book><chapter><sect1><sect2><note><para>
14933 #: ../en/ch11-mq.xml:1053 14913 #: ../en/ch11-mq.xml:1051
14934 msgid "" 14914 msgid ""
14935 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt" 14915 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt"
14936 "\">hg -c</option></command> does this for you automatically); you " 14916 "\">hg -c</option></command> does this for you automatically); you "
14937 "<emphasis>really</emphasis> don't want to manage the <filename role=\"special" 14917 "<emphasis>really</emphasis> don't want to manage the <filename role=\"special"
14938 "\">status</filename> file." 14918 "\">status</filename> file."
14939 msgstr "" 14919 msgstr ""
14940 14920
14941 #. type: Content of: <book><chapter><sect1><sect2><para> 14921 #. type: Content of: <book><chapter><sect1><sect2><para>
14942 #: ../en/ch11-mq.xml:1060 14922 #: ../en/ch11-mq.xml:1058
14943 msgid "" 14923 msgid ""
14944 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/" 14924 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/"
14945 "patches</filename> directory is a repository, it will automatically <command " 14925 "patches</filename> directory is a repository, it will automatically <command "
14946 "role=\"hg-cmd\">hg add</command> every patch that you create and import." 14926 "role=\"hg-cmd\">hg add</command> every patch that you create and import."
14947 msgstr "" 14927 msgstr ""
14948 14928
14949 #. type: Content of: <book><chapter><sect1><sect2><para> 14929 #. type: Content of: <book><chapter><sect1><sect2><para>
14950 #: ../en/ch11-mq.xml:1065 14930 #: ../en/ch11-mq.xml:1063
14951 msgid "" 14931 msgid ""
14952 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</" 14932 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</"
14953 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the " 14933 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the "
14954 "<filename role=\"special\" class=\"directory\">.hg/patches</filename> " 14934 "<filename role=\"special\" class=\"directory\">.hg/patches</filename> "
14955 "directory. This saves some bothersome typing." 14935 "directory. This saves some bothersome typing."
14956 msgstr "" 14936 msgstr ""
14957 14937
14958 #. type: Content of: <book><chapter><sect1><sect2><para> 14938 #. type: Content of: <book><chapter><sect1><sect2><para>
14959 #: ../en/ch11-mq.xml:1071 14939 #: ../en/ch11-mq.xml:1069
14960 msgid "" 14940 msgid ""
14961 "Finally, as a convenience to manage the patch directory, you can define the " 14941 "Finally, as a convenience to manage the patch directory, you can define the "
14962 "alias <command>mq</command> on Unix systems. For example, on Linux systems " 14942 "alias <command>mq</command> on Unix systems. For example, on Linux systems "
14963 "using the <command>bash</command> shell, you can include the following " 14943 "using the <command>bash</command> shell, you can include the following "
14964 "snippet in your <filename role=\"home\">~/.bashrc</filename>." 14944 "snippet in your <filename role=\"home\">~/.bashrc</filename>."
14965 msgstr "" 14945 msgstr ""
14966 14946
14967 #. type: Content of: <book><chapter><sect1><sect2><para> 14947 #. type: Content of: <book><chapter><sect1><sect2><para>
14968 #: ../en/ch11-mq.xml:1080 14948 #: ../en/ch11-mq.xml:1078
14969 msgid "" 14949 msgid ""
14970 "You can then issue commands of the form <command>mq pull</command> from the " 14950 "You can then issue commands of the form <command>mq pull</command> from the "
14971 "main repository." 14951 "main repository."
14972 msgstr "" 14952 msgstr ""
14973 14953
14974 #. type: Content of: <book><chapter><sect1><sect2><title> 14954 #. type: Content of: <book><chapter><sect1><sect2><title>
14975 #: ../en/ch11-mq.xml:1085 14955 #: ../en/ch11-mq.xml:1083
14976 msgid "A few things to watch out for" 14956 msgid "A few things to watch out for"
14977 msgstr "需要注意的事情" 14957 msgstr "需要注意的事情"
14978 14958
14979 #. type: Content of: <book><chapter><sect1><sect2><para> 14959 #. type: Content of: <book><chapter><sect1><sect2><para>
14980 #: ../en/ch11-mq.xml:1087 14960 #: ../en/ch11-mq.xml:1085
14981 msgid "" 14961 msgid ""
14982 "MQ's support for working with a repository full of patches is limited in a " 14962 "MQ's support for working with a repository full of patches is limited in a "
14983 "few small respects." 14963 "few small respects."
14984 msgstr "" 14964 msgstr ""
14985 14965
14986 #. type: Content of: <book><chapter><sect1><sect2><para> 14966 #. type: Content of: <book><chapter><sect1><sect2><para>
14987 #: ../en/ch11-mq.xml:1090 14967 #: ../en/ch11-mq.xml:1088
14988 msgid "" 14968 msgid ""
14989 "MQ cannot automatically detect changes that you make to the patch directory. " 14969 "MQ cannot automatically detect changes that you make to the patch directory. "
14990 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " 14970 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command "
14991 "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role=" 14971 "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role="
14992 "\"special\">series</filename> file, you will have to <command role=\"hg-cmd" 14972 "\"special\">series</filename> file, you will have to <command role=\"hg-cmd"
14996 "changes show up there. If you forget to do this, you can confuse MQ's idea " 14976 "changes show up there. If you forget to do this, you can confuse MQ's idea "
14997 "of which patches are applied." 14977 "of which patches are applied."
14998 msgstr "" 14978 msgstr ""
14999 14979
15000 #. type: Content of: <book><chapter><sect1><title> 14980 #. type: Content of: <book><chapter><sect1><title>
15001 #: ../en/ch11-mq.xml:1106 14981 #: ../en/ch11-mq.xml:1104
15002 msgid "Third party tools for working with patches" 14982 msgid "Third party tools for working with patches"
15003 msgstr "操作补丁的第三方工具" 14983 msgstr "操作补丁的第三方工具"
15004 14984
15005 #. type: Content of: <book><chapter><sect1><para> 14985 #. type: Content of: <book><chapter><sect1><para>
15006 #: ../en/ch11-mq.xml:1108 14986 #: ../en/ch11-mq.xml:1106
15007 msgid "" 14987 msgid ""
15008 "Once you've been working with patches for a while, you'll find yourself " 14988 "Once you've been working with patches for a while, you'll find yourself "
15009 "hungry for tools that will help you to understand and manipulate the patches " 14989 "hungry for tools that will help you to understand and manipulate the patches "
15010 "you're dealing with." 14990 "you're dealing with."
15011 msgstr "" 14991 msgstr ""
15012 14992
15013 #. type: Content of: <book><chapter><sect1><para> 14993 #. type: Content of: <book><chapter><sect1><para>
15014 #: ../en/ch11-mq.xml:1112 14994 #: ../en/ch11-mq.xml:1110
15015 msgid "" 14995 msgid ""
15016 "The <command>diffstat</command> command <citation>web:diffstat</citation> " 14996 "The <command>diffstat</command> command <citation>web:diffstat</citation> "
15017 "generates a histogram of the modifications made to each file in a patch. It " 14997 "generates a histogram of the modifications made to each file in a patch. It "
15018 "provides a good way to <quote>get a sense of</quote> a patch&emdash;which " 14998 "provides a good way to <quote>get a sense of</quote> a patch&emdash;which "
15019 "files it affects, and how much change it introduces to each file and as a " 14999 "files it affects, and how much change it introduces to each file and as a "
15022 "as otherwise it will try to do clever things with prefixes of file names that " 15002 "as otherwise it will try to do clever things with prefixes of file names that "
15023 "inevitably confuse at least me.)" 15003 "inevitably confuse at least me.)"
15024 msgstr "" 15004 msgstr ""
15025 15005
15026 #. type: Content of: <book><chapter><sect1><para> 15006 #. type: Content of: <book><chapter><sect1><para>
15027 #: ../en/ch11-mq.xml:1126 15007 #: ../en/ch11-mq.xml:1124
15028 msgid "" 15008 msgid ""
15029 "The <literal role=\"package\">patchutils</literal> package <citation>web:" 15009 "The <literal role=\"package\">patchutils</literal> package <citation>web:"
15030 "patchutils</citation> is invaluable. It provides a set of small utilities " 15010 "patchutils</citation> is invaluable. It provides a set of small utilities "
15031 "that follow the <quote>Unix philosophy;</quote> each does one useful thing " 15011 "that follow the <quote>Unix philosophy;</quote> each does one useful thing "
15032 "with a patch. The <literal role=\"package\">patchutils</literal> command I " 15012 "with a patch. The <literal role=\"package\">patchutils</literal> command I "
15033 "use most is <command>filterdiff</command>, which extracts subsets from a " 15013 "use most is <command>filterdiff</command>, which extracts subsets from a "
15034 "patch file. For example, given a patch that modifies hundreds of files " 15014 "patch file. For example, given a patch that modifies hundreds of files "
15035 "across dozens of directories, a single invocation of <command>filterdiff</" 15015 "across dozens of directories, a single invocation of <command>filterdiff</"
15036 "command> can generate a smaller patch that only touches files whose names " 15016 "command> can generate a smaller patch that only touches files whose names "
15037 "match a particular glob pattern. See section <xref linkend=\"mq-collab.tips." 15017 "match a particular glob pattern. See <xref linkend=\"mq-collab:tips:interdiff"
15038 "interdiff\"/> for another example." 15018 "\"/> for another example."
15039 msgstr "" 15019 msgstr ""
15040 15020
15041 #. type: Content of: <book><chapter><sect1><title> 15021 #. type: Content of: <book><chapter><sect1><title>
15042 #: ../en/ch11-mq.xml:1142 15022 #: ../en/ch11-mq.xml:1140
15043 msgid "Good ways to work with patches" 15023 msgid "Good ways to work with patches"
15044 msgstr "操作补丁的好习惯" 15024 msgstr "操作补丁的好习惯"
15045 15025
15046 #. type: Content of: <book><chapter><sect1><para> 15026 #. type: Content of: <book><chapter><sect1><para>
15047 #: ../en/ch11-mq.xml:1144 15027 #: ../en/ch11-mq.xml:1142
15048 msgid "" 15028 msgid ""
15049 "Whether you are working on a patch series to submit to a free software or " 15029 "Whether you are working on a patch series to submit to a free software or "
15050 "open source project, or a series that you intend to treat as a sequence of " 15030 "open source project, or a series that you intend to treat as a sequence of "
15051 "regular changesets when you're done, you can use some simple techniques to " 15031 "regular changesets when you're done, you can use some simple techniques to "
15052 "keep your work well organised." 15032 "keep your work well organised."
15053 msgstr "" 15033 msgstr ""
15054 15034
15055 #. type: Content of: <book><chapter><sect1><para> 15035 #. type: Content of: <book><chapter><sect1><para>
15056 #: ../en/ch11-mq.xml:1150 15036 #: ../en/ch11-mq.xml:1148
15057 msgid "" 15037 msgid ""
15058 "Give your patches descriptive names. A good name for a patch might be " 15038 "Give your patches descriptive names. A good name for a patch might be "
15059 "<filename>rework-device-alloc.patch</filename>, because it will immediately " 15039 "<filename>rework-device-alloc.patch</filename>, because it will immediately "
15060 "give you a hint what the purpose of the patch is. Long names shouldn't be a " 15040 "give you a hint what the purpose of the patch is. Long names shouldn't be a "
15061 "problem; you won't be typing the names often, but you <emphasis>will</" 15041 "problem; you won't be typing the names often, but you <emphasis>will</"
15065 "with, or if you are juggling a number of different tasks and your patches " 15045 "with, or if you are juggling a number of different tasks and your patches "
15066 "only get a fraction of your attention." 15046 "only get a fraction of your attention."
15067 msgstr "" 15047 msgstr ""
15068 15048
15069 #. type: Content of: <book><chapter><sect1><para> 15049 #. type: Content of: <book><chapter><sect1><para>
15070 #: ../en/ch11-mq.xml:1162 15050 #: ../en/ch11-mq.xml:1160
15071 msgid "" 15051 msgid ""
15072 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq" 15052 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq"
15073 "\">qtop</command> command and skim over the text of your patches " 15053 "\">qtop</command> command and skim over the text of your patches "
15074 "frequently&emdash;for example, using <command role=\"hg-cmd\">hg tip <option " 15054 "frequently&emdash;for example, using <command role=\"hg-cmd\">hg tip <option "
15075 "role=\"hg-opt-tip\">-p</option></command>)&emdash;to be sure of where you " 15055 "role=\"hg-opt-tip\">-p</option></command>)&emdash;to be sure of where you "
15078 "tricky to migrate changes into the right patch after making them in the wrong " 15058 "tricky to migrate changes into the right patch after making them in the wrong "
15079 "one." 15059 "one."
15080 msgstr "" 15060 msgstr ""
15081 15061
15082 #. type: Content of: <book><chapter><sect1><para> 15062 #. type: Content of: <book><chapter><sect1><para>
15083 #: ../en/ch11-mq.xml:1172 15063 #: ../en/ch11-mq.xml:1170
15084 msgid "" 15064 msgid ""
15085 "For this reason, it is very much worth investing a little time to learn how " 15065 "For this reason, it is very much worth investing a little time to learn how "
15086 "to use some of the third-party tools I described in section <xref linkend=" 15066 "to use some of the third-party tools I described in <xref linkend=\"sec:mq:"
15087 "\"sec.mq.tools\"/>, particularly <command>diffstat</command> and " 15067 "tools\"/>, particularly <command>diffstat</command> and <command>filterdiff</"
15088 "<command>filterdiff</command>. The former will give you a quick idea of what " 15068 "command>. The former will give you a quick idea of what changes your patch "
15089 "changes your patch is making, while the latter makes it easy to splice hunks " 15069 "is making, while the latter makes it easy to splice hunks selectively out of "
15090 "selectively out of one patch and into another." 15070 "one patch and into another."
15091 msgstr "" 15071 msgstr ""
15092 15072
15093 #. type: Content of: <book><chapter><sect1><title> 15073 #. type: Content of: <book><chapter><sect1><title>
15094 #: ../en/ch11-mq.xml:1183 15074 #: ../en/ch11-mq.xml:1181
15095 msgid "MQ cookbook" 15075 msgid "MQ cookbook"
15096 msgstr "MQ 手册" 15076 msgstr "MQ 手册"
15097 15077
15098 #. type: Content of: <book><chapter><sect1><sect2><title> 15078 #. type: Content of: <book><chapter><sect1><sect2><title>
15099 #: ../en/ch11-mq.xml:1186 15079 #: ../en/ch11-mq.xml:1184
15100 msgid "Manage <quote>trivial</quote> patches" 15080 msgid "Manage <quote>trivial</quote> patches"
15101 msgstr "管理<quote>琐碎的</quote>补丁" 15081 msgstr "管理<quote>琐碎的</quote>补丁"
15102 15082
15103 #. type: Content of: <book><chapter><sect1><sect2><para> 15083 #. type: Content of: <book><chapter><sect1><sect2><para>
15104 #: ../en/ch11-mq.xml:1188 15084 #: ../en/ch11-mq.xml:1186
15105 msgid "" 15085 msgid ""
15106 "Because the overhead of dropping files into a new Mercurial repository is so " 15086 "Because the overhead of dropping files into a new Mercurial repository is so "
15107 "low, it makes a lot of sense to manage patches this way even if you simply " 15087 "low, it makes a lot of sense to manage patches this way even if you simply "
15108 "want to make a few changes to a source tarball that you downloaded." 15088 "want to make a few changes to a source tarball that you downloaded."
15109 msgstr "" 15089 msgstr ""
15110 15090
15111 # 15091 #
15112 #. type: Content of: <book><chapter><sect1><sect2><para> 15092 #. type: Content of: <book><chapter><sect1><sect2><para>
15113 #: ../en/ch11-mq.xml:1193 15093 #: ../en/ch11-mq.xml:1191
15114 msgid "" 15094 msgid ""
15115 "Begin by downloading and unpacking the source tarball, and turning it into a " 15095 "Begin by downloading and unpacking the source tarball, and turning it into a "
15116 "Mercurial repository." 15096 "Mercurial repository."
15117 msgstr "" 15097 msgstr ""
15118 15098
15119 #. type: Content of: <book><chapter><sect1><sect2><para> 15099 #. type: Content of: <book><chapter><sect1><sect2><para>
15120 #: ../en/ch11-mq.xml:1198 15100 #: ../en/ch11-mq.xml:1196
15121 msgid "Continue by creating a patch stack and making your changes." 15101 msgid "Continue by creating a patch stack and making your changes."
15122 msgstr "" 15102 msgstr ""
15123 15103
15124 #. type: Content of: <book><chapter><sect1><sect2><para> 15104 #. type: Content of: <book><chapter><sect1><sect2><para>
15125 #: ../en/ch11-mq.xml:1203 15105 #: ../en/ch11-mq.xml:1201
15126 msgid "" 15106 msgid ""
15127 "Let's say a few weeks or months pass, and your package author releases a new " 15107 "Let's say a few weeks or months pass, and your package author releases a new "
15128 "version. First, bring their changes into the repository." 15108 "version. First, bring their changes into the repository."
15129 msgstr "" 15109 msgstr ""
15130 15110
15131 #. type: Content of: <book><chapter><sect1><sect2><para> 15111 #. type: Content of: <book><chapter><sect1><sect2><para>
15132 #: ../en/ch11-mq.xml:1209 15112 #: ../en/ch11-mq.xml:1207
15133 msgid "" 15113 msgid ""
15134 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above " 15114 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above "
15135 "deletes all files in the working directory, so that <command role=\"hg-cmd" 15115 "deletes all files in the working directory, so that <command role=\"hg-cmd"
15136 "\">hg commit</command>'s <option role=\"hg-opt-commit\">--addremove</option> " 15116 "\">hg commit</command>'s <option role=\"hg-opt-commit\">--addremove</option> "
15137 "option can actually tell which files have really been removed in the newer " 15117 "option can actually tell which files have really been removed in the newer "
15138 "version of the source." 15118 "version of the source."
15139 msgstr "" 15119 msgstr ""
15140 15120
15141 #. type: Content of: <book><chapter><sect1><sect2><para> 15121 #. type: Content of: <book><chapter><sect1><sect2><para>
15142 #: ../en/ch11-mq.xml:1217 15122 #: ../en/ch11-mq.xml:1215
15143 msgid "Finally, you can apply your patches on top of the new tree." 15123 msgid "Finally, you can apply your patches on top of the new tree."
15144 msgstr "" 15124 msgstr ""
15145 15125
15146 #. type: Content of: <book><chapter><sect1><sect2><title> 15126 #. type: Content of: <book><chapter><sect1><sect2><title>
15147 #: ../en/ch11-mq.xml:1224 15127 #: ../en/ch11-mq.xml:1222
15148 msgid "Combining entire patches" 15128 msgid "Combining entire patches"
15149 msgstr "组合全部的补丁" 15129 msgstr "组合全部的补丁"
15150 15130
15151 #. type: Content of: <book><chapter><sect1><sect2><para> 15131 #. type: Content of: <book><chapter><sect1><sect2><para>
15152 #: ../en/ch11-mq.xml:1226 15132 #: ../en/ch11-mq.xml:1224
15153 msgid "" 15133 msgid ""
15154 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets " 15134 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets "
15155 "you combine entire patches. This <quote>folds</quote> the patches you name, " 15135 "you combine entire patches. This <quote>folds</quote> the patches you name, "
15156 "in the order you name them, into the topmost applied patch, and concatenates " 15136 "in the order you name them, into the topmost applied patch, and concatenates "
15157 "their descriptions onto the end of its description. The patches that you " 15137 "their descriptions onto the end of its description. The patches that you "
15158 "fold must be unapplied before you fold them." 15138 "fold must be unapplied before you fold them."
15159 msgstr "" 15139 msgstr ""
15160 15140
15161 #. type: Content of: <book><chapter><sect1><sect2><para> 15141 #. type: Content of: <book><chapter><sect1><sect2><para>
15162 #: ../en/ch11-mq.xml:1234 15142 #: ../en/ch11-mq.xml:1232
15163 msgid "" 15143 msgid ""
15164 "The order in which you fold patches matters. If your topmost applied patch " 15144 "The order in which you fold patches matters. If your topmost applied patch "
15165 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</" 15145 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</"
15166 "command> <literal>bar</literal> and <literal>quux</literal> into it, you will " 15146 "command> <literal>bar</literal> and <literal>quux</literal> into it, you will "
15167 "end up with a patch that has the same effect as if you applied first " 15147 "end up with a patch that has the same effect as if you applied first "
15168 "<literal>foo</literal>, then <literal>bar</literal>, followed by " 15148 "<literal>foo</literal>, then <literal>bar</literal>, followed by "
15169 "<literal>quux</literal>." 15149 "<literal>quux</literal>."
15170 msgstr "" 15150 msgstr ""
15171 15151
15172 #. type: Content of: <book><chapter><sect1><sect2><title> 15152 #. type: Content of: <book><chapter><sect1><sect2><title>
15173 #: ../en/ch11-mq.xml:1245 15153 #: ../en/ch11-mq.xml:1243
15174 msgid "Merging part of one patch into another" 15154 msgid "Merging part of one patch into another"
15175 msgstr "合并补丁的部分内容到其它补丁" 15155 msgstr "合并补丁的部分内容到其它补丁"
15176 15156
15177 #. type: Content of: <book><chapter><sect1><sect2><para> 15157 #. type: Content of: <book><chapter><sect1><sect2><para>
15178 #: ../en/ch11-mq.xml:1247 15158 #: ../en/ch11-mq.xml:1245
15179 msgid "" 15159 msgid ""
15180 "Merging <emphasis>part</emphasis> of one patch into another is more difficult " 15160 "Merging <emphasis>part</emphasis> of one patch into another is more difficult "
15181 "than combining entire patches." 15161 "than combining entire patches."
15182 msgstr "" 15162 msgstr ""
15183 15163
15184 #. type: Content of: <book><chapter><sect1><sect2><para> 15164 #. type: Content of: <book><chapter><sect1><sect2><para>
15185 #: ../en/ch11-mq.xml:1251 15165 #: ../en/ch11-mq.xml:1249
15186 msgid "" 15166 msgid ""
15187 "If you want to move changes to entire files, you can use <command>filterdiff</" 15167 "If you want to move changes to entire files, you can use <command>filterdiff</"
15188 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role=" 15168 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role="
15189 "\"cmd-opt-filterdiff\">-x</option> options to choose the modifications to " 15169 "\"cmd-opt-filterdiff\">-x</option> options to choose the modifications to "
15190 "snip out of one patch, concatenating its output onto the end of the patch you " 15170 "snip out of one patch, concatenating its output onto the end of the patch you "
15194 "the other patch), and you can simply <command role=\"hg-ext-mq\">qrefresh</" 15174 "the other patch), and you can simply <command role=\"hg-ext-mq\">qrefresh</"
15195 "command> the patch to drop the duplicate hunks." 15175 "command> the patch to drop the duplicate hunks."
15196 msgstr "" 15176 msgstr ""
15197 15177
15198 #. type: Content of: <book><chapter><sect1><sect2><para> 15178 #. type: Content of: <book><chapter><sect1><sect2><para>
15199 #: ../en/ch11-mq.xml:1264 15179 #: ../en/ch11-mq.xml:1262
15200 msgid "" 15180 msgid ""
15201 "If you have a patch that has multiple hunks modifying a file, and you only " 15181 "If you have a patch that has multiple hunks modifying a file, and you only "
15202 "want to move a few of those hunks, the job becomes more messy, but you can " 15182 "want to move a few of those hunks, the job becomes more messy, but you can "
15203 "still partly automate it. Use <command>lsdiff -nvv</command> to print some " 15183 "still partly automate it. Use <command>lsdiff -nvv</command> to print some "
15204 "metadata about the patch." 15184 "metadata about the patch."
15205 msgstr "" 15185 msgstr ""
15206 15186
15207 #. type: Content of: <book><chapter><sect1><sect2><para> 15187 #. type: Content of: <book><chapter><sect1><sect2><para>
15208 #: ../en/ch11-mq.xml:1272 15188 #: ../en/ch11-mq.xml:1270
15209 msgid "This command prints three different kinds of number:" 15189 msgid "This command prints three different kinds of number:"
15210 msgstr "" 15190 msgstr ""
15211 15191
15212 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15192 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15213 #: ../en/ch11-mq.xml:1275 15193 #: ../en/ch11-mq.xml:1273
15214 msgid "" 15194 msgid ""
15215 "(in the first column) a <emphasis>file number</emphasis> to identify each " 15195 "(in the first column) a <emphasis>file number</emphasis> to identify each "
15216 "file modified in the patch;" 15196 "file modified in the patch;"
15217 msgstr "" 15197 msgstr ""
15218 15198
15219 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15199 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15220 #: ../en/ch11-mq.xml:1279 15200 #: ../en/ch11-mq.xml:1277
15221 msgid "" 15201 msgid ""
15222 "(on the next line, indented) the line number within a modified file where a " 15202 "(on the next line, indented) the line number within a modified file where a "
15223 "hunk starts; and" 15203 "hunk starts; and"
15224 msgstr "" 15204 msgstr ""
15225 15205
15226 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15206 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15227 #: ../en/ch11-mq.xml:1282 15207 #: ../en/ch11-mq.xml:1280
15228 msgid "" 15208 msgid ""
15229 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk." 15209 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk."
15230 msgstr "" 15210 msgstr ""
15231 15211
15232 #. type: Content of: <book><chapter><sect1><sect2><para> 15212 #. type: Content of: <book><chapter><sect1><sect2><para>
15233 #: ../en/ch11-mq.xml:1286 15213 #: ../en/ch11-mq.xml:1284
15234 msgid "" 15214 msgid ""
15235 "You'll have to use some visual inspection, and reading of the patch, to " 15215 "You'll have to use some visual inspection, and reading of the patch, to "
15236 "identify the file and hunk numbers you'll want, but you can then pass them to " 15216 "identify the file and hunk numbers you'll want, but you can then pass them to "
15237 "to <command>filterdiff</command>'s <option role=\"cmd-opt-filterdiff\">--" 15217 "to <command>filterdiff</command>'s <option role=\"cmd-opt-filterdiff\">--"
15238 "files</option> and <option role=\"cmd-opt-filterdiff\">--hunks</option> " 15218 "files</option> and <option role=\"cmd-opt-filterdiff\">--hunks</option> "
15239 "options, to select exactly the file and hunk you want to extract." 15219 "options, to select exactly the file and hunk you want to extract."
15240 msgstr "" 15220 msgstr ""
15241 15221
15242 #. type: Content of: <book><chapter><sect1><sect2><para> 15222 #. type: Content of: <book><chapter><sect1><sect2><para>
15243 #: ../en/ch11-mq.xml:1294 15223 #: ../en/ch11-mq.xml:1292
15244 msgid "" 15224 msgid ""
15245 "Once you have this hunk, you can concatenate it onto the end of your " 15225 "Once you have this hunk, you can concatenate it onto the end of your "
15246 "destination patch and continue with the remainder of section <xref linkend=" 15226 "destination patch and continue with the remainder of <xref linkend=\"sec:mq:"
15247 "\"sec.mq.combine\"/>." 15227 "combine\"/>."
15248 msgstr "" 15228 msgstr ""
15249 15229
15250 #. type: Content of: <book><chapter><sect1><title> 15230 #. type: Content of: <book><chapter><sect1><title>
15251 #: ../en/ch11-mq.xml:1301 15231 #: ../en/ch11-mq.xml:1299
15252 msgid "Differences between quilt and MQ" 15232 msgid "Differences between quilt and MQ"
15253 msgstr "MQ 与 quilt 的区别" 15233 msgstr "MQ 与 quilt 的区别"
15254 15234
15255 #. type: Content of: <book><chapter><sect1><para> 15235 #. type: Content of: <book><chapter><sect1><para>
15256 #: ../en/ch11-mq.xml:1303 15236 #: ../en/ch11-mq.xml:1301
15257 msgid "" 15237 msgid ""
15258 "If you are already familiar with quilt, MQ provides a similar command set. " 15238 "If you are already familiar with quilt, MQ provides a similar command set. "
15259 "There are a few differences in the way that it works." 15239 "There are a few differences in the way that it works."
15260 msgstr "" 15240 msgstr ""
15261 15241
15262 #. type: Content of: <book><chapter><sect1><para> 15242 #. type: Content of: <book><chapter><sect1><para>
15263 #: ../en/ch11-mq.xml:1307 15243 #: ../en/ch11-mq.xml:1305
15264 msgid "" 15244 msgid ""
15265 "You will already have noticed that most quilt commands have MQ counterparts " 15245 "You will already have noticed that most quilt commands have MQ counterparts "
15266 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions " 15246 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions "
15267 "are quilt's <literal>add</literal> and <literal>remove</literal> commands, " 15247 "are quilt's <literal>add</literal> and <literal>remove</literal> commands, "
15268 "the counterparts for which are the normal Mercurial <command role=\"hg-cmd" 15248 "the counterparts for which are the normal Mercurial <command role=\"hg-cmd"
15872 15852
15873 #. type: Content of: <book><chapter><sect1><sect2><para> 15853 #. type: Content of: <book><chapter><sect1><sect2><para>
15874 #: ../en/ch12-mq-collab.xml:436 15854 #: ../en/ch12-mq-collab.xml:436
15875 msgid "" 15855 msgid ""
15876 "If you're developing a set of patches over a long time, it's a good idea to " 15856 "If you're developing a set of patches over a long time, it's a good idea to "
15877 "maintain them in a repository, as discussed in section <xref linkend=\"sec.mq." 15857 "maintain them in a repository, as discussed in <xref linkend=\"sec:mq:repo\"/"
15878 "repo\"/>. If you do so, you'll quickly discover that using the <command role=" 15858 ">. If you do so, you'll quickly discover that using the <command role=\"hg-"
15879 "\"hg-cmd\">hg diff</command> command to look at the history of changes to a " 15859 "cmd\">hg diff</command> command to look at the history of changes to a patch "
15880 "patch is unworkable. This is in part because you're looking at the second " 15860 "is unworkable. This is in part because you're looking at the second "
15881 "derivative of the real code (a diff of a diff), but also because MQ adds " 15861 "derivative of the real code (a diff of a diff), but also because MQ adds "
15882 "noise to the process by modifying time stamps and directory names when it " 15862 "noise to the process by modifying time stamps and directory names when it "
15883 "updates a patch." 15863 "updates a patch."
15884 msgstr "" 15864 msgstr ""
15885 15865
15958 #. type: Content of: <book><chapter><sect1><sect2><para> 15938 #. type: Content of: <book><chapter><sect1><sect2><para>
15959 #: ../en/ch12-mq-collab.xml:505 15939 #: ../en/ch12-mq-collab.xml:505
15960 msgid "" 15940 msgid ""
15961 "The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more " 15941 "The <literal role=\"hg-ext\">extdiff</literal> extension is useful for more "
15962 "than merely improving the presentation of MQ patches. To read more about it, " 15942 "than merely improving the presentation of MQ patches. To read more about it, "
15963 "go to section <xref linkend=\"sec.hgext.extdiff\"/>." 15943 "go to <xref linkend=\"sec:hgext:extdiff\"/>."
15964 msgstr "" 15944 msgstr ""
15965 15945
15966 #. type: Content of: <book><chapter><title> 15946 #. type: Content of: <book><chapter><title>
15967 #: ../en/ch13-hgext.xml:5 15947 #: ../en/ch13-hgext.xml:5
15968 msgid "Adding functionality with extensions" 15948 msgid "Adding functionality with extensions"
15987 msgstr "" 15967 msgstr ""
15988 15968
15989 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 15969 #. type: Content of: <book><chapter><itemizedlist><listitem><para>
15990 #: ../en/ch13-hgext.xml:18 15970 #: ../en/ch13-hgext.xml:18
15991 msgid "" 15971 msgid ""
15992 "Section <xref linkend=\"sec.tour-merge.fetch\"/> covers the <literal role=" 15972 "<xref linkend=\"sec:tour-merge:fetch\"/> covers the <literal role=\"hg-ext"
15993 "\"hg-ext\">fetch</literal> extension; this combines pulling new changes and " 15973 "\">fetch</literal> extension; this combines pulling new changes and merging "
15994 "merging them with local changes into a single command, <command role=\"hg-ext-" 15974 "them with local changes into a single command, <command role=\"hg-ext-fetch"
15995 "fetch\">fetch</command>." 15975 "\">fetch</command>."
15996 msgstr "" 15976 msgstr ""
15997 15977
15998 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 15978 #. type: Content of: <book><chapter><itemizedlist><listitem><para>
15999 #: ../en/ch13-hgext.xml:24 15979 #: ../en/ch13-hgext.xml:24
16000 msgid "" 15980 msgid ""
16001 "In chapter <xref linkend=\"chap.hook\"/>, we covered several extensions that " 15981 "In <xref linkend=\"chap:hook\"/>, we covered several extensions that are "
16002 "are useful for hook-related functionality: <literal role=\"hg-ext\">acl</" 15982 "useful for hook-related functionality: <literal role=\"hg-ext\">acl</literal> "
16003 "literal> adds access control lists; <literal role=\"hg-ext\">bugzilla</" 15983 "adds access control lists; <literal role=\"hg-ext\">bugzilla</literal> adds "
16004 "literal> adds integration with the Bugzilla bug tracking system; and <literal " 15984 "integration with the Bugzilla bug tracking system; and <literal role=\"hg-ext"
16005 "role=\"hg-ext\">notify</literal> sends notification emails on new changes." 15985 "\">notify</literal> sends notification emails on new changes."
16006 msgstr "" 15986 msgstr ""
16007 15987
16008 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 15988 #. type: Content of: <book><chapter><itemizedlist><listitem><para>
16009 #: ../en/ch13-hgext.xml:33 15989 #: ../en/ch13-hgext.xml:33
16010 msgid "" 15990 msgid ""
16011 "The Mercurial Queues patch management extension is so invaluable that it " 15991 "The Mercurial Queues patch management extension is so invaluable that it "
16012 "merits two chapters and an appendix all to itself. Chapter <xref linkend=" 15992 "merits two chapters and an appendix all to itself. <xref linkend=\"chap:mq\"/"
16013 "\"chap.mq\"/> covers the basics; chapter <xref linkend=\"chap.mq-collab\"/> " 15993 "> covers the basics; <xref linkend=\"chap:mq-collab\"/> discusses advanced "
16014 "discusses advanced topics; and appendix <xref linkend=\"chap.mqref\"/> goes " 15994 "topics; and <xref linkend=\"chap:mqref\"/> goes into detail on each command."
16015 "into detail on each command."
16016 msgstr "" 15995 msgstr ""
16017 15996
16018 #. type: Content of: <book><chapter><para> 15997 #. type: Content of: <book><chapter><para>
16019 #: ../en/ch13-hgext.xml:43 15998 #: ../en/ch13-hgext.xml:43
16020 msgid "" 15999 msgid ""
16024 msgstr "" 16003 msgstr ""
16025 16004
16026 #. type: Content of: <book><chapter><itemizedlist><listitem><para> 16005 #. type: Content of: <book><chapter><itemizedlist><listitem><para>
16027 #: ../en/ch13-hgext.xml:48 16006 #: ../en/ch13-hgext.xml:48
16028 msgid "" 16007 msgid ""
16029 "In section <xref linkend=\"sec.hgext.inotify\"/>, we'll discuss the " 16008 "In <xref linkend=\"sec:hgext:inotify\"/>, we'll discuss the possibility of "
16030 "possibility of <emphasis>huge</emphasis> performance improvements using the " 16009 "<emphasis>huge</emphasis> performance improvements using the <literal role="
16031 "<literal role=\"hg-ext\">inotify</literal> extension." 16010 "\"hg-ext\">inotify</literal> extension."
16032 msgstr "" 16011 msgstr ""
16033 16012
16034 #. type: Content of: <book><chapter><sect1><title> 16013 #. type: Content of: <book><chapter><sect1><title>
16035 #: ../en/ch13-hgext.xml:55 16014 #: ../en/ch13-hgext.xml:55
16036 msgid "" 16015 msgid ""
16207 16186
16208 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 16187 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
16209 #: ../en/ch13-hgext.xml:184 16188 #: ../en/ch13-hgext.xml:184
16210 msgid "" 16189 msgid ""
16211 "Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext" 16190 "Make sure that you have the Mercurial Queues extension, <literal role=\"hg-ext"
16212 "\">mq</literal>, enabled. If you've never used MQ, read section <xref " 16191 "\">mq</literal>, enabled. If you've never used MQ, read <xref linkend=\"sec:"
16213 "linkend=\"sec.mq.start\"/> to get started quickly." 16192 "mq:start\"/> to get started quickly."
16214 msgstr "" 16193 msgstr ""
16215 16194
16216 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 16195 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
16217 #: ../en/ch13-hgext.xml:190 16196 #: ../en/ch13-hgext.xml:190
16218 msgid "" 16197 msgid ""
16418 #: ../en/ch13-hgext.xml:352 16397 #: ../en/ch13-hgext.xml:352
16419 msgid "" 16398 msgid ""
16420 "If your diff viewing command can't deal with directories, you can easily work " 16399 "If your diff viewing command can't deal with directories, you can easily work "
16421 "around this with a little scripting. For an example of such scripting in " 16400 "around this with a little scripting. For an example of such scripting in "
16422 "action with the <literal role=\"hg-ext\">mq</literal> extension and the " 16401 "action with the <literal role=\"hg-ext\">mq</literal> extension and the "
16423 "<command>interdiff</command> command, see section <xref linkend=\"mq-collab." 16402 "<command>interdiff</command> command, see <xref linkend=\"mq-collab:tips:"
16424 "tips.interdiff\"/>." 16403 "interdiff\"/>."
16425 msgstr "" 16404 msgstr ""
16426 16405
16427 #. type: Content of: <book><chapter><sect1><sect2><title> 16406 #. type: Content of: <book><chapter><sect1><sect2><title>
16428 #: ../en/ch13-hgext.xml:360 16407 #: ../en/ch13-hgext.xml:360
16429 msgid "Defining command aliases" 16408 msgid "Defining command aliases"
16620 msgstr "" 16599 msgstr ""
16621 16600
16622 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 16601 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
16623 #: ../en/ch13-hgext.xml:504 16602 #: ../en/ch13-hgext.xml:504
16624 msgid "" 16603 msgid ""
16625 "The default behaviour is to send unified diffs (see section <xref linkend=" 16604 "The default behaviour is to send unified diffs (see <xref linkend=\"sec:mq:"
16626 "\"sec.mq.patch\"/> for a description of the format), one per message. You " 16605 "patch\"/> for a description of the format), one per message. You can send a "
16627 "can send a binary bundle instead with the <option role=\"hg-ext-patchbomb-cmd-" 16606 "binary bundle instead with the <option role=\"hg-ext-patchbomb-cmd-email-opt"
16628 "email-opt\">hg -b</option> option." 16607 "\">hg -b</option> option."
16629 msgstr "" 16608 msgstr ""
16630 16609
16631 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 16610 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
16632 #: ../en/ch13-hgext.xml:512 16611 #: ../en/ch13-hgext.xml:512
16633 msgid "" 16612 msgid ""