Mercurial > hgbook
comparison en/ch14-hgext.xml @ 724:cfdb601a3c8b
Fix imagedata fileref in xml files, and replace ':' with '.' in id attribute
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Thu, 12 Mar 2009 15:51:39 +0800 |
parents | 13513d2a128d |
children | d0160b0b1a9e |
comparison
equal
deleted
inserted
replaced
723:3c5e1c03cc3e | 724:cfdb601a3c8b |
---|---|
1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : --> | 1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : --> |
2 | 2 |
3 <chapter id="chap:hgext"> | 3 <chapter id="chap.hgext"> |
4 <?dbhtml filename="adding-functionality-with-extensions.html"?> | 4 <?dbhtml filename="adding-functionality-with-extensions.html"?> |
5 <title>Adding functionality with extensions</title> | 5 <title>Adding functionality with extensions</title> |
6 | 6 |
7 <para>While the core of Mercurial is quite complete from a | 7 <para>While the core of Mercurial is quite complete from a |
8 functionality standpoint, it's deliberately shorn of fancy | 8 functionality standpoint, it's deliberately shorn of fancy |
13 command set: you can add features to it as | 13 command set: you can add features to it as |
14 <emphasis>extensions</emphasis> (sometimes known as | 14 <emphasis>extensions</emphasis> (sometimes known as |
15 <emphasis>plugins</emphasis>). We've already discussed a few of | 15 <emphasis>plugins</emphasis>). We've already discussed a few of |
16 these extensions in earlier chapters.</para> | 16 these extensions in earlier chapters.</para> |
17 <itemizedlist> | 17 <itemizedlist> |
18 <listitem><para>Section <xref linkend="sec:tour-merge:fetch"/> | 18 <listitem><para>Section <xref linkend="sec.tour-merge.fetch"/> |
19 covers the <literal role="hg-ext">fetch</literal> extension; | 19 covers the <literal role="hg-ext">fetch</literal> extension; |
20 this combines pulling new changes and merging them with local | 20 this combines pulling new changes and merging them with local |
21 changes into a single command, <command | 21 changes into a single command, <command |
22 role="hg-ext-fetch">fetch</command>.</para> | 22 role="hg-ext-fetch">fetch</command>.</para> |
23 </listitem> | 23 </listitem> |
24 <listitem><para>In chapter <xref linkend="chap:hook"/>, we covered | 24 <listitem><para>In chapter <xref linkend="chap.hook"/>, we covered |
25 several extensions that are useful for hook-related | 25 several extensions that are useful for hook-related |
26 functionality: <literal role="hg-ext">acl</literal> adds | 26 functionality: <literal role="hg-ext">acl</literal> adds |
27 access control lists; <literal | 27 access control lists; <literal |
28 role="hg-ext">bugzilla</literal> adds integration with the | 28 role="hg-ext">bugzilla</literal> adds integration with the |
29 Bugzilla bug tracking system; and <literal | 29 Bugzilla bug tracking system; and <literal |
30 role="hg-ext">notify</literal> sends notification emails on | 30 role="hg-ext">notify</literal> sends notification emails on |
31 new changes.</para> | 31 new changes.</para> |
32 </listitem> | 32 </listitem> |
33 <listitem><para>The Mercurial Queues patch management extension is | 33 <listitem><para>The Mercurial Queues patch management extension is |
34 so invaluable that it merits two chapters and an appendix all | 34 so invaluable that it merits two chapters and an appendix all |
35 to itself. Chapter <xref linkend="chap:mq"/> covers the | 35 to itself. Chapter <xref linkend="chap.mq"/> covers the |
36 basics; chapter <xref | 36 basics; chapter <xref |
37 linkend="chap:mq-collab"/> discusses advanced topics; | 37 linkend="chap.mq-collab"/> discusses advanced topics; |
38 and appendix <xref linkend="chap:mqref"/> goes into detail on | 38 and appendix <xref linkend="chap.mqref"/> goes into detail on |
39 each | 39 each |
40 command.</para> | 40 command.</para> |
41 </listitem></itemizedlist> | 41 </listitem></itemizedlist> |
42 | 42 |
43 <para>In this chapter, we'll cover some of the other extensions that | 43 <para>In this chapter, we'll cover some of the other extensions that |
44 are available for Mercurial, and briefly touch on some of the | 44 are available for Mercurial, and briefly touch on some of the |
45 machinery you'll need to know about if you want to write an | 45 machinery you'll need to know about if you want to write an |
46 extension of your own.</para> | 46 extension of your own.</para> |
47 <itemizedlist> | 47 <itemizedlist> |
48 <listitem><para>In section <xref linkend="sec:hgext:inotify"/>, | 48 <listitem><para>In section <xref linkend="sec.hgext.inotify"/>, |
49 we'll discuss the possibility of <emphasis>huge</emphasis> | 49 we'll discuss the possibility of <emphasis>huge</emphasis> |
50 performance improvements using the <literal | 50 performance improvements using the <literal |
51 role="hg-ext">inotify</literal> extension.</para> | 51 role="hg-ext">inotify</literal> extension.</para> |
52 </listitem></itemizedlist> | 52 </listitem></itemizedlist> |
53 | 53 |
54 <sect1 id="sec:hgext:inotify"> | 54 <sect1 id="sec.hgext.inotify"> |
55 <title>Improve performance with the <literal | 55 <title>Improve performance with the <literal |
56 role="hg-ext">inotify</literal> extension</title> | 56 role="hg-ext">inotify</literal> extension</title> |
57 | 57 |
58 <para>Are you interested in having some of the most common | 58 <para>Are you interested in having some of the most common |
59 Mercurial operations run as much as a hundred times faster? | 59 Mercurial operations run as much as a hundred times faster? |
186 </programlisting> | 186 </programlisting> |
187 </listitem> | 187 </listitem> |
188 <listitem><para>Make sure that you have the Mercurial Queues | 188 <listitem><para>Make sure that you have the Mercurial Queues |
189 extension, <literal role="hg-ext">mq</literal>, enabled. If | 189 extension, <literal role="hg-ext">mq</literal>, enabled. If |
190 you've never used MQ, read section <xref | 190 you've never used MQ, read section <xref |
191 linkend="sec:mq:start"/> to get started | 191 linkend="sec.mq.start"/> to get started |
192 quickly.</para> | 192 quickly.</para> |
193 </listitem> | 193 </listitem> |
194 <listitem><para>Go into the <filename | 194 <listitem><para>Go into the <filename |
195 class="directory">inotify</filename> repo, and apply all | 195 class="directory">inotify</filename> repo, and apply all |
196 of the <literal role="hg-ext">inotify</literal> patches | 196 of the <literal role="hg-ext">inotify</literal> patches |
261 specifically expect that commands will not print different | 261 specifically expect that commands will not print different |
262 output; neither should they give different results. If either of | 262 output; neither should they give different results. If either of |
263 these situations occurs, please report a bug.</para> | 263 these situations occurs, please report a bug.</para> |
264 | 264 |
265 </sect1> | 265 </sect1> |
266 <sect1 id="sec:hgext:extdiff"> | 266 <sect1 id="sec.hgext.extdiff"> |
267 <title>Flexible diff support with the <literal | 267 <title>Flexible diff support with the <literal |
268 role="hg-ext">extdiff</literal> extension</title> | 268 role="hg-ext">extdiff</literal> extension</title> |
269 | 269 |
270 <para>Mercurial's built-in <command role="hg-cmd">hg | 270 <para>Mercurial's built-in <command role="hg-cmd">hg |
271 diff</command> command outputs plaintext unified diffs.</para> | 271 diff</command> command outputs plaintext unified diffs.</para> |
358 <para>If your diff viewing command can't deal with directories, | 358 <para>If your diff viewing command can't deal with directories, |
359 you can easily work around this with a little scripting. For an | 359 you can easily work around this with a little scripting. For an |
360 example of such scripting in action with the <literal | 360 example of such scripting in action with the <literal |
361 role="hg-ext">mq</literal> extension and the | 361 role="hg-ext">mq</literal> extension and the |
362 <command>interdiff</command> command, see section <xref | 362 <command>interdiff</command> command, see section <xref |
363 linkend="mq-collab:tips:interdiff"/>.</para> | 363 linkend="mq-collab.tips.interdiff"/>.</para> |
364 | 364 |
365 <sect2> | 365 <sect2> |
366 <title>Defining command aliases</title> | 366 <title>Defining command aliases</title> |
367 | 367 |
368 <para>It can be cumbersome to remember the options to both the | 368 <para>It can be cumbersome to remember the options to both the |
400 <programlisting>[extdiff] cmd.vimdiff = vim opts.vimdiff = -f | 400 <programlisting>[extdiff] cmd.vimdiff = vim opts.vimdiff = -f |
401 '+next' '+execute "DirDiff" argv(0) argv(1)'</programlisting> | 401 '+next' '+execute "DirDiff" argv(0) argv(1)'</programlisting> |
402 | 402 |
403 </sect2> | 403 </sect2> |
404 </sect1> | 404 </sect1> |
405 <sect1 id="sec:hgext:transplant"> | 405 <sect1 id="sec.hgext.transplant"> |
406 <title>Cherrypicking changes with the <literal | 406 <title>Cherrypicking changes with the <literal |
407 role="hg-ext">transplant</literal> extension</title> | 407 role="hg-ext">transplant</literal> extension</title> |
408 | 408 |
409 <para>Need to have a long chat with Brendan about this.</para> | 409 <para>Need to have a long chat with Brendan about this.</para> |
410 | 410 |
411 </sect1> | 411 </sect1> |
412 <sect1 id="sec:hgext:patchbomb"> | 412 <sect1 id="sec.hgext.patchbomb"> |
413 <title>Send changes via email with the <literal | 413 <title>Send changes via email with the <literal |
414 role="hg-ext">patchbomb</literal> extension</title> | 414 role="hg-ext">patchbomb</literal> extension</title> |
415 | 415 |
416 <para>Many projects have a culture of <quote>change | 416 <para>Many projects have a culture of <quote>change |
417 review</quote>, in which people send their modifications to a | 417 review</quote>, in which people send their modifications to a |
502 role="hg-ext-patchbomb-cmd-email-opt">hg -f</option> | 502 role="hg-ext-patchbomb-cmd-email-opt">hg -f</option> |
503 option. This takes one argument, the email address to | 503 option. This takes one argument, the email address to |
504 use.</para> | 504 use.</para> |
505 </listitem> | 505 </listitem> |
506 <listitem><para>The default behaviour is to send unified diffs | 506 <listitem><para>The default behaviour is to send unified diffs |
507 (see section <xref linkend="sec:mq:patch"/> for a | 507 (see section <xref linkend="sec.mq.patch"/> for a |
508 description of the | 508 description of the |
509 format), one per message. You can send a binary bundle | 509 format), one per message. You can send a binary bundle |
510 instead with the <option | 510 instead with the <option |
511 role="hg-ext-patchbomb-cmd-email-opt">hg -b</option> | 511 role="hg-ext-patchbomb-cmd-email-opt">hg -b</option> |
512 option.</para> | 512 option.</para> |