Mercurial > hgbook
comparison en/ch09-hook.xml @ 691:4ce9d0754af3
Remove the words "section", "chapter", etc from in front of xref tags.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 26 Mar 2009 21:22:03 -0700 |
parents | c838b3975bc6 |
children | 1c13ed2130a7 |
comparison
equal
deleted
inserted
replaced
690:b788b405e141 | 691:4ce9d0754af3 |
---|---|
15 two names refer to the same idea.</para> | 15 two names refer to the same idea.</para> |
16 | 16 |
17 <sect1> | 17 <sect1> |
18 <title>An overview of hooks in Mercurial</title> | 18 <title>An overview of hooks in Mercurial</title> |
19 | 19 |
20 <para id="x_1e8">Here is a brief list of the hooks that Mercurial supports. | 20 <para id="x_1e8">Here is a brief list of the hooks that Mercurial |
21 We will revisit each of these hooks in more detail later, in | 21 supports. We will revisit each of these hooks in more detail |
22 section <xref linkend="sec:hook:ref"/>.</para> | 22 later, in <xref linkend="sec:hook:ref"/>.</para> |
23 | 23 |
24 <itemizedlist> | 24 <itemizedlist> |
25 <listitem><para id="x_1e9"><literal role="hook">changegroup</literal>: This | 25 <listitem><para id="x_1e9"><literal role="hook">changegroup</literal>: This |
26 is run after a group of changesets has been brought into the | 26 is run after a group of changesets has been brought into the |
27 repository from elsewhere.</para> | 27 repository from elsewhere.</para> |
391 <literal>commit.bar</literal> before | 391 <literal>commit.bar</literal> before |
392 <literal>commit.foo</literal>, and <literal>commit</literal> | 392 <literal>commit.foo</literal>, and <literal>commit</literal> |
393 before both. | 393 before both. |
394 </para> | 394 </para> |
395 | 395 |
396 <para id="x_218">It is a good idea to use a somewhat descriptive extension | 396 <para id="x_218">It is a good idea to use a somewhat descriptive |
397 when you define a new hook. This will help you to remember | 397 extension when you define a new hook. This will help you to |
398 what the hook was for. If the hook fails, you'll get an error | 398 remember what the hook was for. If the hook fails, you'll get |
399 message that contains the hook name and extension, so using a | 399 an error message that contains the hook name and extension, so |
400 descriptive extension could give you an immediate hint as to | 400 using a descriptive extension could give you an immediate hint |
401 why the hook failed (see section <xref | 401 as to why the hook failed (see <xref |
402 linkend="sec:hook:perm"/> for an example). | 402 linkend="sec:hook:perm"/> for an example). |
403 </para> | 403 </para> |
404 | 404 |
405 </sect2> | 405 </sect2> |
406 <sect2 id="sec:hook:perm"> | 406 <sect2 id="sec:hook:perm"> |
1092 role="hg-ext">bugzilla</literal> hook relate to running | 1092 role="hg-ext">bugzilla</literal> hook relate to running |
1093 Bugzilla's <filename>processmail</filename> script and | 1093 Bugzilla's <filename>processmail</filename> script and |
1094 mapping committer names to user names. | 1094 mapping committer names to user names. |
1095 </para> | 1095 </para> |
1096 | 1096 |
1097 <para id="x_263">Recall from section <xref | 1097 <para id="x_263">Recall from <xref |
1098 linkend="sec:hook:bugzilla:config"/> above that the user | 1098 linkend="sec:hook:bugzilla:config"/> above that the user |
1099 that runs the Mercurial process on the server is also the | 1099 that runs the Mercurial process on the server is also the |
1100 one that will run the <filename>processmail</filename> | 1100 one that will run the <filename>processmail</filename> |
1101 script. The <filename>processmail</filename> script | 1101 script. The <filename>processmail</filename> script |
1102 sometimes causes Bugzilla to write to files in its | 1102 sometimes causes Bugzilla to write to files in its |
1248 <listitem><para id="x_274"><envar | 1248 <listitem><para id="x_274"><envar |
1249 role="rc-item-notify">sources</envar>: A list of | 1249 role="rc-item-notify">sources</envar>: A list of |
1250 sources of changesets to consider. This lets you limit | 1250 sources of changesets to consider. This lets you limit |
1251 <literal role="hg-ext">notify</literal> to only sending | 1251 <literal role="hg-ext">notify</literal> to only sending |
1252 out email about changes that remote users pushed into | 1252 out email about changes that remote users pushed into |
1253 this repository via a server, for example. See section | 1253 this repository via a server, for example. See |
1254 <xref | 1254 <xref linkend="sec:hook:sources"/> for the sources you |
1255 linkend="sec:hook:sources"/> for the sources you can | 1255 can specify here. |
1256 specify here. | |
1257 </para> | 1256 </para> |
1258 </listitem></itemizedlist> | 1257 </listitem></itemizedlist> |
1259 | 1258 |
1260 <para id="x_275">If you set the <envar role="rc-item-web">baseurl</envar> | 1259 <para id="x_275">If you set the <envar role="rc-item-web">baseurl</envar> |
1261 item in the <literal role="rc-web">web</literal> section, | 1260 item in the <literal role="rc-web">web</literal> section, |
1500 <command role="hg-cmd">hg pull</command>, <command | 1499 <command role="hg-cmd">hg pull</command>, <command |
1501 role="hg-cmd">hg push</command> or <command | 1500 role="hg-cmd">hg push</command> or <command |
1502 role="hg-cmd">hg unbundle</command>. | 1501 role="hg-cmd">hg unbundle</command>. |
1503 </para> | 1502 </para> |
1504 </listitem> | 1503 </listitem> |
1505 <listitem><para id="x_294"><literal>source</literal>: A string. The | 1504 <listitem><para id="x_294"><literal>source</literal>: A |
1506 source of these changes. See section <xref | 1505 string. The source of these changes. See <xref |
1507 linkend="sec:hook:sources"/> for details. | 1506 linkend="sec:hook:sources"/> for details. |
1508 </para> | 1507 </para> |
1509 </listitem> | 1508 </listitem> |
1510 <listitem><para id="x_295"><literal>url</literal>: A URL. The location | 1509 <listitem><para id="x_295"><literal>url</literal>: A URL. The |
1511 of the remote repository, if known. See section <xref | 1510 location of the remote repository, if known. See <xref |
1512 linkend="sec:hook:url"/> for more | 1511 linkend="sec:hook:url"/> for more information. |
1513 information. | |
1514 </para> | 1512 </para> |
1515 </listitem></itemizedlist> | 1513 </listitem></itemizedlist> |
1516 | 1514 |
1517 <para id="x_296">See also: <literal role="hook">incoming</literal> (section | 1515 <para id="x_296">See also: <literal |
1518 <xref linkend="sec:hook:incoming"/>), <literal | 1516 role="hook">incoming</literal> (<xref |
1519 role="hook">prechangegroup</literal> (section <xref | 1517 linkend="sec:hook:incoming"/>), <literal |
1518 role="hook">prechangegroup</literal> (<xref | |
1520 linkend="sec:hook:prechangegroup"/>), <literal | 1519 linkend="sec:hook:prechangegroup"/>), <literal |
1521 role="hook">pretxnchangegroup</literal> (section <xref | 1520 role="hook">pretxnchangegroup</literal> (<xref |
1522 linkend="sec:hook:pretxnchangegroup"/>) | 1521 linkend="sec:hook:pretxnchangegroup"/>) |
1523 </para> | 1522 </para> |
1524 | 1523 |
1525 </sect2> | 1524 </sect2> |
1526 <sect2 id="sec:hook:commit"> | 1525 <sect2 id="sec:hook:commit"> |
1546 The changeset ID of the second parent of the newly | 1545 The changeset ID of the second parent of the newly |
1547 committed changeset. | 1546 committed changeset. |
1548 </para> | 1547 </para> |
1549 </listitem></itemizedlist> | 1548 </listitem></itemizedlist> |
1550 | 1549 |
1551 <para id="x_29c">See also: <literal role="hook">precommit</literal> | 1550 <para id="x_29c">See also: <literal |
1552 (section <xref linkend="sec:hook:precommit"/>), <literal | 1551 role="hook">precommit</literal> (<xref |
1553 role="hook">pretxncommit</literal> (section <xref | 1552 linkend="sec:hook:precommit"/>), <literal |
1553 role="hook">pretxncommit</literal> (<xref | |
1554 linkend="sec:hook:pretxncommit"/>) | 1554 linkend="sec:hook:pretxncommit"/>) |
1555 </para> | 1555 </para> |
1556 | 1556 |
1557 </sect2> | 1557 </sect2> |
1558 <sect2 id="sec:hook:incoming"> | 1558 <sect2 id="sec:hook:incoming"> |
1564 role="hg-cmd">hg push</command>. If a group of changesets | 1564 role="hg-cmd">hg push</command>. If a group of changesets |
1565 was added in a single operation, this hook is called once for | 1565 was added in a single operation, this hook is called once for |
1566 each added changeset. | 1566 each added changeset. |
1567 </para> | 1567 </para> |
1568 | 1568 |
1569 <para id="x_29e">You can use this hook for the same purposes as the | 1569 <para id="x_29e">You can use this hook for the same purposes as |
1570 <literal role="hook">changegroup</literal> hook (section <xref | 1570 the <literal role="hook">changegroup</literal> hook (<xref |
1571 linkend="sec:hook:changegroup"/>); it's simply | 1571 linkend="sec:hook:changegroup"/>); it's simply more |
1572 more convenient sometimes to run a hook once per group of | 1572 convenient sometimes to run a hook once per group of |
1573 changesets, while other times it's handier once per changeset. | 1573 changesets, while other times it's handier once per changeset. |
1574 </para> | 1574 </para> |
1575 | 1575 |
1576 <para id="x_29f">Parameters to this hook: | 1576 <para id="x_29f">Parameters to this hook: |
1577 </para> | 1577 </para> |
1578 <itemizedlist> | 1578 <itemizedlist> |
1579 <listitem><para id="x_2a0"><literal>node</literal>: A changeset ID. The | 1579 <listitem><para id="x_2a0"><literal>node</literal>: A changeset ID. The |
1580 ID of the newly added changeset. | 1580 ID of the newly added changeset. |
1581 </para> | 1581 </para> |
1582 </listitem> | 1582 </listitem> |
1583 <listitem><para id="x_2a1"><literal>source</literal>: A string. The | 1583 <listitem><para id="x_2a1"><literal>source</literal>: A |
1584 source of these changes. See section <xref | 1584 string. The source of these changes. See <xref |
1585 linkend="sec:hook:sources"/> for details. | 1585 linkend="sec:hook:sources"/> for details. |
1586 </para> | 1586 </para> |
1587 </listitem> | 1587 </listitem> |
1588 <listitem><para id="x_2a2"><literal>url</literal>: A URL. The location | 1588 <listitem><para id="x_2a2"><literal>url</literal>: A URL. The |
1589 of the remote repository, if known. See section <xref | 1589 location of the remote repository, if known. See <xref |
1590 linkend="sec:hook:url"/> for more | 1590 linkend="sec:hook:url"/> for more information. |
1591 information. | |
1592 </para> | 1591 </para> |
1593 </listitem></itemizedlist> | 1592 </listitem></itemizedlist> |
1594 | 1593 |
1595 <para id="x_2a3">See also: <literal role="hook">changegroup</literal> | 1594 <para id="x_2a3">See also: <literal |
1596 (section <xref linkend="sec:hook:changegroup"/>) <literal | 1595 role="hook">changegroup</literal> (<xref |
1597 role="hook">prechangegroup</literal> (section <xref | 1596 linkend="sec:hook:changegroup"/>) <literal |
1597 role="hook">prechangegroup</literal> (<xref | |
1598 linkend="sec:hook:prechangegroup"/>), <literal | 1598 linkend="sec:hook:prechangegroup"/>), <literal |
1599 role="hook">pretxnchangegroup</literal> (section <xref | 1599 role="hook">pretxnchangegroup</literal> (<xref |
1600 linkend="sec:hook:pretxnchangegroup"/>) | 1600 linkend="sec:hook:pretxnchangegroup"/>) |
1601 </para> | 1601 </para> |
1602 | 1602 |
1603 </sect2> | 1603 </sect2> |
1604 <sect2 id="sec:hook:outgoing"> | 1604 <sect2 id="sec:hook:outgoing"> |
1622 changeset ID of the first changeset of the group that was | 1622 changeset ID of the first changeset of the group that was |
1623 sent. | 1623 sent. |
1624 </para> | 1624 </para> |
1625 </listitem> | 1625 </listitem> |
1626 <listitem><para id="x_2a8"><literal>source</literal>: A string. The | 1626 <listitem><para id="x_2a8"><literal>source</literal>: A string. The |
1627 source of the of the operation (see section <xref | 1627 source of the of the operation (see <xref |
1628 linkend="sec:hook:sources"/>). If a remote | 1628 linkend="sec:hook:sources"/>). If a remote |
1629 client pulled changes from this repository, | 1629 client pulled changes from this repository, |
1630 <literal>source</literal> will be | 1630 <literal>source</literal> will be |
1631 <literal>serve</literal>. If the client that obtained | 1631 <literal>serve</literal>. If the client that obtained |
1632 changes from this repository was local, | 1632 changes from this repository was local, |
1634 <literal>bundle</literal>, <literal>pull</literal>, or | 1634 <literal>bundle</literal>, <literal>pull</literal>, or |
1635 <literal>push</literal>, depending on the operation the | 1635 <literal>push</literal>, depending on the operation the |
1636 client performed. | 1636 client performed. |
1637 </para> | 1637 </para> |
1638 </listitem> | 1638 </listitem> |
1639 <listitem><para id="x_2a9"><literal>url</literal>: A URL. The location | 1639 <listitem><para id="x_2a9"><literal>url</literal>: A URL. The |
1640 of the remote repository, if known. See section <xref | 1640 location of the remote repository, if known. See <xref |
1641 linkend="sec:hook:url"/> for more | 1641 linkend="sec:hook:url"/> for more information. |
1642 information. | |
1643 </para> | 1642 </para> |
1644 </listitem></itemizedlist> | 1643 </listitem></itemizedlist> |
1645 | 1644 |
1646 <para id="x_2aa">See also: <literal role="hook">preoutgoing</literal> | 1645 <para id="x_2aa">See also: <literal |
1647 (section <xref linkend="sec:hook:preoutgoing"/>) | 1646 role="hook">preoutgoing</literal> (<xref |
1647 linkend="sec:hook:preoutgoing"/>) | |
1648 </para> | 1648 </para> |
1649 | 1649 |
1650 </sect2> | 1650 </sect2> |
1651 <sect2 id="sec:hook:prechangegroup"> | 1651 <sect2 id="sec:hook:prechangegroup"> |
1652 <title><literal | 1652 <title><literal |
1672 | 1672 |
1673 <para id="x_2ae">Parameters to this hook: | 1673 <para id="x_2ae">Parameters to this hook: |
1674 </para> | 1674 </para> |
1675 <itemizedlist> | 1675 <itemizedlist> |
1676 <listitem><para id="x_2af"><literal>source</literal>: A string. The | 1676 <listitem><para id="x_2af"><literal>source</literal>: A string. The |
1677 source of these changes. See section <xref | 1677 source of these changes. See <xref |
1678 linkend="sec:hook:sources"/> for details. | 1678 linkend="sec:hook:sources"/> for details. |
1679 </para> | 1679 </para> |
1680 </listitem> | 1680 </listitem> |
1681 <listitem><para id="x_2b0"><literal>url</literal>: A URL. The location | 1681 <listitem><para id="x_2b0"><literal>url</literal>: A URL. The |
1682 of the remote repository, if known. See section <xref | 1682 location of the remote repository, if known. See <xref |
1683 linkend="sec:hook:url"/> for more | 1683 linkend="sec:hook:url"/> for more information. |
1684 information. | |
1685 </para> | 1684 </para> |
1686 </listitem></itemizedlist> | 1685 </listitem></itemizedlist> |
1687 | 1686 |
1688 <para id="x_2b1">See also: <literal role="hook">changegroup</literal> | 1687 <para id="x_2b1">See also: <literal |
1689 (section <xref linkend="sec:hook:changegroup"/>), <literal | 1688 role="hook">changegroup</literal> (<xref |
1690 role="hook">incoming</literal> (section <xref | 1689 linkend="sec:hook:changegroup"/>), <literal |
1691 linkend="sec:hook:incoming"/>), , <literal | 1690 role="hook">incoming</literal> (<xref |
1692 role="hook">pretxnchangegroup</literal> (section <xref | 1691 linkend="sec:hook:incoming"/>), <literal |
1692 role="hook">pretxnchangegroup</literal> (<xref | |
1693 linkend="sec:hook:pretxnchangegroup"/>) | 1693 linkend="sec:hook:pretxnchangegroup"/>) |
1694 </para> | 1694 </para> |
1695 | 1695 |
1696 </sect2> | 1696 </sect2> |
1697 <sect2 id="sec:hook:precommit"> | 1697 <sect2 id="sec:hook:precommit"> |
1725 </listitem></itemizedlist> | 1725 </listitem></itemizedlist> |
1726 <para id="x_2b7">If the commit proceeds, the parents of the working | 1726 <para id="x_2b7">If the commit proceeds, the parents of the working |
1727 directory will become the parents of the new changeset. | 1727 directory will become the parents of the new changeset. |
1728 </para> | 1728 </para> |
1729 | 1729 |
1730 <para id="x_2b8">See also: <literal role="hook">commit</literal> (section | 1730 <para id="x_2b8">See also: <literal role="hook">commit</literal> |
1731 <xref linkend="sec:hook:commit"/>), <literal | 1731 (<xref linkend="sec:hook:commit"/>), <literal |
1732 role="hook">pretxncommit</literal> (section <xref | 1732 role="hook">pretxncommit</literal> (<xref |
1733 linkend="sec:hook:pretxncommit"/>) | 1733 linkend="sec:hook:pretxncommit"/>) |
1734 </para> | 1734 </para> |
1735 | 1735 |
1736 </sect2> | 1736 </sect2> |
1737 <sect2 id="sec:hook:preoutgoing"> | 1737 <sect2 id="sec:hook:preoutgoing"> |
1747 </para> | 1747 </para> |
1748 | 1748 |
1749 <para id="x_2bb">Parameters to this hook: | 1749 <para id="x_2bb">Parameters to this hook: |
1750 </para> | 1750 </para> |
1751 <itemizedlist> | 1751 <itemizedlist> |
1752 <listitem><para id="x_2bc"><literal>source</literal>: A string. The | 1752 <listitem><para id="x_2bc"><literal>source</literal>: A |
1753 source of the operation that is attempting to obtain | 1753 string. The source of the operation that is attempting to |
1754 changes from this repository (see section <xref | 1754 obtain changes from this repository (see <xref |
1755 linkend="sec:hook:sources"/>). See the documentation | 1755 linkend="sec:hook:sources"/>). See the documentation |
1756 for the <literal>source</literal> parameter to the | 1756 for the <literal>source</literal> parameter to the |
1757 <literal role="hook">outgoing</literal> hook, in section | 1757 <literal role="hook">outgoing</literal> hook, in |
1758 <xref linkend="sec:hook:outgoing"/>, for possible values | 1758 <xref linkend="sec:hook:outgoing"/>, for possible values |
1759 of | 1759 of this parameter. |
1760 this parameter. | 1760 </para> |
1761 </para> | 1761 </listitem> |
1762 </listitem> | 1762 <listitem><para id="x_2bd"><literal>url</literal>: A URL. The |
1763 <listitem><para id="x_2bd"><literal>url</literal>: A URL. The location | 1763 location of the remote repository, if known. See <xref |
1764 of the remote repository, if known. See section <xref | 1764 linkend="sec:hook:url"/> for more information. |
1765 linkend="sec:hook:url"/> for more | |
1766 information. | |
1767 </para> | 1765 </para> |
1768 </listitem></itemizedlist> | 1766 </listitem></itemizedlist> |
1769 | 1767 |
1770 <para id="x_2be">See also: <literal role="hook">outgoing</literal> (section | 1768 <para id="x_2be">See also: <literal |
1771 <xref linkend="sec:hook:outgoing"/>) | 1769 role="hook">outgoing</literal> (<xref |
1770 linkend="sec:hook:outgoing"/>) | |
1772 </para> | 1771 </para> |
1773 | 1772 |
1774 </sect2> | 1773 </sect2> |
1775 <sect2 id="sec:hook:pretag"> | 1774 <sect2 id="sec:hook:pretag"> |
1776 <title><literal role="hook">pretag</literal>&emdash;before | 1775 <title><literal role="hook">pretag</literal>&emdash;before |
1798 <listitem><para id="x_2c3"><literal>tag</literal>: A string. The name of | 1797 <listitem><para id="x_2c3"><literal>tag</literal>: A string. The name of |
1799 the tag to be created. | 1798 the tag to be created. |
1800 </para> | 1799 </para> |
1801 </listitem></itemizedlist> | 1800 </listitem></itemizedlist> |
1802 | 1801 |
1803 <para id="x_2c4">If the tag to be created is revision-controlled, the | 1802 <para id="x_2c4">If the tag to be created is |
1804 <literal role="hook">precommit</literal> and <literal | 1803 revision-controlled, the <literal |
1805 role="hook">pretxncommit</literal> hooks (sections <xref | 1804 role="hook">precommit</literal> and <literal |
1805 role="hook">pretxncommit</literal> hooks (<xref | |
1806 linkend="sec:hook:commit"/> and <xref | 1806 linkend="sec:hook:commit"/> and <xref |
1807 linkend="sec:hook:pretxncommit"/>) will also be run. | 1807 linkend="sec:hook:pretxncommit"/>) will also be run. |
1808 </para> | 1808 </para> |
1809 | 1809 |
1810 <para id="x_2c5">See also: <literal role="hook">tag</literal> (section | 1810 <para id="x_2c5">See also: <literal role="hook">tag</literal> |
1811 <xref linkend="sec:hook:tag"/>) | 1811 (<xref linkend="sec:hook:tag"/>) |
1812 </para> | 1812 </para> |
1813 </sect2> | 1813 </sect2> |
1814 <sect2 id="sec:hook:pretxnchangegroup"> | 1814 <sect2 id="sec:hook:pretxnchangegroup"> |
1815 <title><literal | 1815 <title><literal |
1816 role="hook">pretxnchangegroup</literal>&emdash;before | 1816 role="hook">pretxnchangegroup</literal>&emdash;before |
1854 role="hg-cmd">hg pull</command>, <command | 1854 role="hg-cmd">hg pull</command>, <command |
1855 role="hg-cmd">hg push</command> or <command | 1855 role="hg-cmd">hg push</command> or <command |
1856 role="hg-cmd">hg unbundle</command>. | 1856 role="hg-cmd">hg unbundle</command>. |
1857 </para> | 1857 </para> |
1858 </listitem> | 1858 </listitem> |
1859 <listitem><para id="x_2cc"><literal>source</literal>: A string. The | 1859 <listitem><para id="x_2cc"><literal>source</literal>: A |
1860 source of these changes. See section <xref | 1860 string. The source of these changes. See <xref |
1861 linkend="sec:hook:sources"/> for details. | 1861 linkend="sec:hook:sources"/> for details. |
1862 </para> | 1862 </para> |
1863 </listitem> | 1863 </listitem> |
1864 <listitem><para id="x_2cd"><literal>url</literal>: A URL. The location | 1864 <listitem><para id="x_2cd"><literal>url</literal>: A URL. The |
1865 of the remote repository, if known. See section <xref | 1865 location of the remote repository, if known. See <xref |
1866 linkend="sec:hook:url"/> for more | 1866 linkend="sec:hook:url"/> for more information. |
1867 information. | |
1868 </para> | 1867 </para> |
1869 </listitem></itemizedlist> | 1868 </listitem></itemizedlist> |
1870 | 1869 |
1871 <para id="x_2ce">See also: <literal role="hook">changegroup</literal> | 1870 <para id="x_2ce">See also: <literal |
1872 (section <xref linkend="sec:hook:changegroup"/>), <literal | 1871 role="hook">changegroup</literal> (<xref |
1873 role="hook">incoming</literal> (section <xref | 1872 linkend="sec:hook:changegroup"/>), <literal |
1873 role="hook">incoming</literal> (<xref | |
1874 linkend="sec:hook:incoming"/>), <literal | 1874 linkend="sec:hook:incoming"/>), <literal |
1875 role="hook">prechangegroup</literal> (section <xref | 1875 role="hook">prechangegroup</literal> (<xref |
1876 linkend="sec:hook:prechangegroup"/>) | 1876 linkend="sec:hook:prechangegroup"/>) |
1877 </para> | 1877 </para> |
1878 | 1878 |
1879 </sect2> | 1879 </sect2> |
1880 <sect2 id="sec:hook:pretxncommit"> | 1880 <sect2 id="sec:hook:pretxncommit"> |
1917 The changeset ID of the second parent of the newly | 1917 The changeset ID of the second parent of the newly |
1918 committed changeset. | 1918 committed changeset. |
1919 </para> | 1919 </para> |
1920 </listitem></itemizedlist> | 1920 </listitem></itemizedlist> |
1921 | 1921 |
1922 <para id="x_2d6">See also: <literal role="hook">precommit</literal> | 1922 <para id="x_2d6">See also: <literal |
1923 (section <xref linkend="sec:hook:precommit"/>) | 1923 role="hook">precommit</literal> (<xref |
1924 linkend="sec:hook:precommit"/>) | |
1924 </para> | 1925 </para> |
1925 | 1926 |
1926 </sect2> | 1927 </sect2> |
1927 <sect2 id="sec:hook:preupdate"> | 1928 <sect2 id="sec:hook:preupdate"> |
1928 <title><literal role="hook">preupdate</literal>&emdash;before | 1929 <title><literal role="hook">preupdate</literal>&emdash;before |
1929 updating or merging working directory</title> | 1930 updating or merging working directory</title> |
1930 | 1931 |
1931 <para id="x_2d7">This controlling hook is run before an update or merge of | 1932 <para id="x_2d7">This controlling hook is run before an update |
1932 the working directory begins. It is run only if Mercurial's | 1933 or merge of the working directory begins. It is run only if |
1933 normal pre-update checks determine that the update or merge | 1934 Mercurial's normal pre-update checks determine that the update |
1934 can proceed. If the hook succeeds, the update or merge may | 1935 or merge can proceed. If the hook succeeds, the update or |
1935 proceed; if it fails, the update or merge does not start. | 1936 merge may proceed; if it fails, the update or merge does not |
1937 start. | |
1936 </para> | 1938 </para> |
1937 | 1939 |
1938 <para id="x_2d8">Parameters to this hook: | 1940 <para id="x_2d8">Parameters to this hook: |
1939 </para> | 1941 </para> |
1940 <itemizedlist> | 1942 <itemizedlist> |
1941 <listitem><para id="x_2d9"><literal>parent1</literal>: A changeset ID. | 1943 <listitem><para id="x_2d9"><literal>parent1</literal>: A |
1942 The ID of the parent that the working directory is to be | 1944 changeset ID. The ID of the parent that the working |
1943 updated to. If the working directory is being merged, it | 1945 directory is to be updated to. If the working directory |
1944 will not change this parent. | 1946 is being merged, it will not change this parent. |
1945 </para> | 1947 </para> |
1946 </listitem> | 1948 </listitem> |
1947 <listitem><para id="x_2da"><literal>parent2</literal>: A changeset ID. | 1949 <listitem><para id="x_2da"><literal>parent2</literal>: A |
1948 Only set if the working directory is being merged. The ID | 1950 changeset ID. Only set if the working directory is being |
1949 of the revision that the working directory is being merged | 1951 merged. The ID of the revision that the working directory |
1950 with. | 1952 is being merged with. |
1951 </para> | 1953 </para> |
1952 </listitem></itemizedlist> | 1954 </listitem></itemizedlist> |
1953 | 1955 |
1954 <para id="x_2db">See also: <literal role="hook">update</literal> (section | 1956 <para id="x_2db">See also: <literal role="hook">update</literal> |
1955 <xref linkend="sec:hook:update"/>) | 1957 (<xref linkend="sec:hook:update"/>)</para> |
1956 </para> | |
1957 | 1958 |
1958 </sect2> | 1959 </sect2> |
1959 <sect2 id="sec:hook:tag"> | 1960 <sect2 id="sec:hook:tag"> |
1960 <title><literal role="hook">tag</literal>&emdash;after tagging a | 1961 <title><literal role="hook">tag</literal>&emdash;after tagging a |
1961 changeset</title> | 1962 changeset</title> |
1986 <para id="x_2e1">If the created tag is revision-controlled, the <literal | 1987 <para id="x_2e1">If the created tag is revision-controlled, the <literal |
1987 role="hook">commit</literal> hook (section <xref | 1988 role="hook">commit</literal> hook (section <xref |
1988 linkend="sec:hook:commit"/>) is run before this hook. | 1989 linkend="sec:hook:commit"/>) is run before this hook. |
1989 </para> | 1990 </para> |
1990 | 1991 |
1991 <para id="x_2e2">See also: <literal role="hook">pretag</literal> (section | 1992 <para id="x_2e2">See also: <literal role="hook">pretag</literal> |
1992 <xref linkend="sec:hook:pretag"/>) | 1993 (<xref linkend="sec:hook:pretag"/>) |
1993 </para> | 1994 </para> |
1994 | 1995 |
1995 </sect2> | 1996 </sect2> |
1996 <sect2 id="sec:hook:update"> | 1997 <sect2 id="sec:hook:update"> |
1997 <title><literal role="hook">update</literal>&emdash;after | 1998 <title><literal role="hook">update</literal>&emdash;after |
2021 the revision that the working directory was merged with. | 2022 the revision that the working directory was merged with. |
2022 </para> | 2023 </para> |
2023 </listitem></itemizedlist> | 2024 </listitem></itemizedlist> |
2024 | 2025 |
2025 <para id="x_2e7">See also: <literal role="hook">preupdate</literal> | 2026 <para id="x_2e7">See also: <literal role="hook">preupdate</literal> |
2026 (section <xref linkend="sec:hook:preupdate"/>) | 2027 (<xref linkend="sec:hook:preupdate"/>) |
2027 </para> | 2028 </para> |
2028 | 2029 |
2029 </sect2> | 2030 </sect2> |
2030 </sect1> | 2031 </sect1> |
2031 </chapter> | 2032 </chapter> |