comparison en/ch13-mq-collab.xml @ 746:d0160b0b1a9e

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <dongsheng.song@gmail.com>
date Wed, 18 Mar 2009 20:32:37 +0800
parents cfdb601a3c8b 8366882f67f2
children
comparison
equal deleted inserted replaced
745:c2cefd9f9893 746:d0160b0b1a9e
458 458
459 <para>You can enable the <literal 459 <para>You can enable the <literal
460 role="hg-ext">extdiff</literal> extension in the usual way, 460 role="hg-ext">extdiff</literal> extension in the usual way,
461 by adding a line to the <literal 461 by adding a line to the <literal
462 role="rc-extensions">extensions</literal> section of your 462 role="rc-extensions">extensions</literal> section of your
463 <filename role="special"> /.hgrc</filename>.</para> 463 <filename role="special">~/.hgrc</filename>.</para>
464 <programlisting>[extensions] extdiff =</programlisting> 464 <programlisting>[extensions]
465 extdiff =</programlisting>
465 <para>The <command>interdiff</command> command expects to be 466 <para>The <command>interdiff</command> command expects to be
466 passed the names of two files, but the <literal 467 passed the names of two files, but the <literal
467 role="hg-ext">extdiff</literal> extension passes the program 468 role="hg-ext">extdiff</literal> extension passes the program
468 it runs a pair of directories, each of which can contain an 469 it runs a pair of directories, each of which can contain an
469 arbitrary number of files. We thus need a small program that 470 arbitrary number of files. We thus need a small program that
475 &example.hg-interdiff; --></para> 476 &example.hg-interdiff; --></para>
476 477
477 <para>With the <filename role="special">hg-interdiff</filename> 478 <para>With the <filename role="special">hg-interdiff</filename>
478 program in your shell's search path, you can run it as 479 program in your shell's search path, you can run it as
479 follows, from inside an MQ patch directory:</para> 480 follows, from inside an MQ patch directory:</para>
480 <programlisting>hg extdiff -p hg-interdiff -r A:B 481 <programlisting>hg extdiff -p hg-interdiff -r A:B my-change.patch</programlisting>
481 my-change.patch</programlisting>
482 <para>Since you'll probably want to use this long-winded command 482 <para>Since you'll probably want to use this long-winded command
483 a lot, you can get <literal role="hg-ext">hgext</literal> to 483 a lot, you can get <literal role="hg-ext">hgext</literal> to
484 make it available as a normal Mercurial command, again by 484 make it available as a normal Mercurial command, again by
485 editing your <filename role="special"> 485 editing your <filename
486 /.hgrc</filename>.</para> 486 role="special">~/.hgrc</filename>.</para>
487 <programlisting>[extdiff] cmd.interdiff = 487 <programlisting>[extdiff]
488 hg-interdiff</programlisting> 488 cmd.interdiff = hg-interdiff</programlisting>
489 <para>This directs <literal role="hg-ext">hgext</literal> to 489 <para>This directs <literal role="hg-ext">hgext</literal> to
490 make an <literal>interdiff</literal> command available, so you 490 make an <literal>interdiff</literal> command available, so you
491 can now shorten the previous invocation of <command 491 can now shorten the previous invocation of <command
492 role="hg-ext-extdiff">extdiff</command> to something a 492 role="hg-ext-extdiff">extdiff</command> to something a
493 little more wieldy.</para> 493 little more wieldy.</para>
494 <programlisting>hg interdiff -r A:B 494 <programlisting>hg interdiff -r A:B my-change.patch</programlisting>
495 my-change.patch</programlisting>
496 495
497 <note> 496 <note>
498 <para> The <command>interdiff</command> command works well 497 <para> The <command>interdiff</command> command works well
499 only if the underlying files against which versions of a 498 only if the underlying files against which versions of a
500 patch are generated remain the same. If you create a patch, 499 patch are generated remain the same. If you create a patch,