Mercurial > hgbook
comparison en/ch05-collab.xml @ 775:29f0f79cf614
Update paragraph IDs
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 16 Apr 2009 23:46:45 -0700 |
parents | e6c99cbd0abd |
children | 743dc55775fe |
comparison
equal
deleted
inserted
replaced
774:e6c99cbd0abd | 775:29f0f79cf614 |
---|---|
46 | 46 |
47 <para id="x_450">If you're interested in providing a web interface | 47 <para id="x_450">If you're interested in providing a web interface |
48 to your own repositories, there are several good ways to do | 48 to your own repositories, there are several good ways to do |
49 this.</para> | 49 this.</para> |
50 | 50 |
51 <para>The easiest and fastest way to get started in an informal | 51 <para id="x_69d">The easiest and fastest way to get started in an informal |
52 environment is to use the <command role="hg-cmd">hg | 52 environment is to use the <command role="hg-cmd">hg |
53 serve</command> command, which is best suited to short-term | 53 serve</command> command, which is best suited to short-term |
54 <quote>lightweight</quote> serving. See <xref | 54 <quote>lightweight</quote> serving. See <xref |
55 linkend="sec:collab:serve"/> below for details of how to use | 55 linkend="sec:collab:serve"/> below for details of how to use |
56 this command.</para> | 56 this command.</para> |
57 | 57 |
58 <para>For longer-lived repositories that you'd like to have | 58 <para id="x_69e">For longer-lived repositories that you'd like to have |
59 permanently available, there are several public hosting services | 59 permanently available, there are several public hosting services |
60 available.</para> | 60 available.</para> |
61 | 61 |
62 <itemizedlist> | 62 <itemizedlist> |
63 <listitem> | 63 <listitem> |
64 <para>Bitbucket, at <ulink | 64 <para id="x_69f">Bitbucket, at <ulink |
65 url="http://bitbucket.org/">http://bitbucket.org/</ulink>, | 65 url="http://bitbucket.org/">http://bitbucket.org/</ulink>, |
66 provides free hosting for open source projects, and paid | 66 provides free hosting for open source projects, and paid |
67 hosting for commercial projects.</para> | 67 hosting for commercial projects.</para> |
68 </listitem> | 68 </listitem> |
69 </itemizedlist> | 69 </itemizedlist> |
70 | 70 |
71 <para>If you would prefer to host your own repositories, Mercurial | 71 <para id="x_6a0">If you would prefer to host your own repositories, Mercurial |
72 has built-in support for several popular hosting technologies, | 72 has built-in support for several popular hosting technologies, |
73 most notably CGI (Common Gateway Interface), and WSGI (Web | 73 most notably CGI (Common Gateway Interface), and WSGI (Web |
74 Services Gateway Interface). See <xref | 74 Services Gateway Interface). See <xref |
75 linkend="sec:collab:cgi"/> for details of CGI and WSGI | 75 linkend="sec:collab:cgi"/> for details of CGI and WSGI |
76 configuration.</para> | 76 configuration.</para> |
196 </sect2> | 196 </sect2> |
197 | 197 |
198 <sect2> | 198 <sect2> |
199 <title>A hosted central repository</title> | 199 <title>A hosted central repository</title> |
200 | 200 |
201 <para>A wonderful thing about public hosting services like | 201 <para id="x_6a1">A wonderful thing about public hosting services like |
202 <ulink url="http://bitbucket.org/">Bitbucket</ulink> is that | 202 <ulink url="http://bitbucket.org/">Bitbucket</ulink> is that |
203 not only do they handle the fiddly server configuration | 203 not only do they handle the fiddly server configuration |
204 details, such as user accounts, authentication, and secure | 204 details, such as user accounts, authentication, and secure |
205 wire protocols, they provide additional infrastructure to make | 205 wire protocols, they provide additional infrastructure to make |
206 this model work well.</para> | 206 this model work well.</para> |
207 | 207 |
208 <para>For instance, a well-engineered hosting service will let | 208 <para id="x_6a2">For instance, a well-engineered hosting service will let |
209 people clone their own copies of a repository with a single | 209 people clone their own copies of a repository with a single |
210 click. This lets people work in separate spaces and share | 210 click. This lets people work in separate spaces and share |
211 their changes when they're ready.</para> | 211 their changes when they're ready.</para> |
212 | 212 |
213 <para>In addition, a good hosting service will let people | 213 <para id="x_6a3">In addition, a good hosting service will let people |
214 communicate with each other, for instance to say <quote>there | 214 communicate with each other, for instance to say <quote>there |
215 are changes ready for you to review in this | 215 are changes ready for you to review in this |
216 tree</quote>.</para> | 216 tree</quote>.</para> |
217 </sect2> | 217 </sect2> |
218 | 218 |
641 recommend generating a key pair.</para> | 641 recommend generating a key pair.</para> |
642 | 642 |
643 <tip> | 643 <tip> |
644 <title>Key pairs are not mandatory</title> | 644 <title>Key pairs are not mandatory</title> |
645 | 645 |
646 <para>Mercurial knows nothing about ssh authentication or key | 646 <para id="x_6a4">Mercurial knows nothing about ssh authentication or key |
647 pairs. You can, if you like, safely ignore this section and | 647 pairs. You can, if you like, safely ignore this section and |
648 the one that follows until you grow tired of repeatedly | 648 the one that follows until you grow tired of repeatedly |
649 typing ssh passwords.</para> | 649 typing ssh passwords.</para> |
650 </tip> | 650 </tip> |
651 | 651 |
652 <itemizedlist> | 652 <itemizedlist> |
653 <listitem> | 653 <listitem> |
654 <para>On a Unix-like system, the | 654 <para id="x_6a5">On a Unix-like system, the |
655 <command>ssh-keygen</command> command will do the | 655 <command>ssh-keygen</command> command will do the |
656 trick.</para> | 656 trick.</para> |
657 <para>On Windows, if you're using TortoiseHg, you may need | 657 <para id="x_6a6">On Windows, if you're using TortoiseHg, you may need |
658 to download a command named <command>puttygen</command> | 658 to download a command named <command>puttygen</command> |
659 from <ulink | 659 from <ulink |
660 url="http://www.chiark.greenend.org.uk/~sgtatham/putty">the | 660 url="http://www.chiark.greenend.org.uk/~sgtatham/putty">the |
661 PuTTY web site</ulink> to generate a key pair. See | 661 PuTTY web site</ulink> to generate a key pair. See |
662 <ulink | 662 <ulink |
714 automatically for you when you log in. You'll need to use | 714 automatically for you when you log in. You'll need to use |
715 the <command>ssh-add</command> command to add passphrases | 715 the <command>ssh-add</command> command to add passphrases |
716 to the agent's store.</para> | 716 to the agent's store.</para> |
717 </listitem> | 717 </listitem> |
718 <listitem> | 718 <listitem> |
719 <para>On Windows, if you're using TortoiseHg, the | 719 <para id="x_6a7">On Windows, if you're using TortoiseHg, the |
720 <command>pageant</command> command acts as the agent. As | 720 <command>pageant</command> command acts as the agent. As |
721 with <command>puttygen</command>, you'll need to <ulink | 721 with <command>puttygen</command>, you'll need to <ulink |
722 url="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">download | 722 url="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html">download |
723 <command>pageant</command></ulink> from the PuTTY web | 723 <command>pageant</command></ulink> from the PuTTY web |
724 site and read <ulink | 724 site and read <ulink |
926 </sect1> | 926 </sect1> |
927 | 927 |
928 <sect1 id="sec:collab:cgi"> | 928 <sect1 id="sec:collab:cgi"> |
929 <title>Serving over HTTP using CGI</title> | 929 <title>Serving over HTTP using CGI</title> |
930 | 930 |
931 <para>The simplest way to host one or more repositories in a | 931 <para id="x_6a8">The simplest way to host one or more repositories in a |
932 permanent way is to use a web server and Mercurial's CGI | 932 permanent way is to use a web server and Mercurial's CGI |
933 support.</para> | 933 support.</para> |
934 | 934 |
935 <para id="x_4bb">Depending on how ambitious you are, configuring Mercurial's | 935 <para id="x_4bb">Depending on how ambitious you are, configuring Mercurial's |
936 CGI interface can take anything from a few moments to several | 936 CGI interface can take anything from a few moments to several |
950 cases you will encounter. Please use your discretion and | 950 cases you will encounter. Please use your discretion and |
951 judgment in following the sections below. Be prepared to make | 951 judgment in following the sections below. Be prepared to make |
952 plenty of mistakes, and to spend a lot of time reading your | 952 plenty of mistakes, and to spend a lot of time reading your |
953 server's error logs.</para> | 953 server's error logs.</para> |
954 | 954 |
955 <para>If you don't have a strong stomach for tweaking | 955 <para id="x_6a9">If you don't have a strong stomach for tweaking |
956 configurations over and over, or a compelling need to host | 956 configurations over and over, or a compelling need to host |
957 your own services, you might want to try one of the public | 957 your own services, you might want to try one of the public |
958 hosting services that I mentioned earlier.</para> | 958 hosting services that I mentioned earlier.</para> |
959 </note> | 959 </note> |
960 | 960 |
1392 role="rc-item-web">style</envar>: Controls the template | 1392 role="rc-item-web">style</envar>: Controls the template |
1393 Mercurial uses to display the web interface. Mercurial | 1393 Mercurial uses to display the web interface. Mercurial |
1394 ships with several web templates.</para> | 1394 ships with several web templates.</para> |
1395 <itemizedlist> | 1395 <itemizedlist> |
1396 <listitem> | 1396 <listitem> |
1397 <para><literal>coal</literal> is monochromatic.</para> | 1397 <para id="x_6aa"><literal>coal</literal> is monochromatic.</para> |
1398 </listitem> | 1398 </listitem> |
1399 <listitem> | 1399 <listitem> |
1400 <para><literal>gitweb</literal> emulates the visual | 1400 <para id="x_6ab"><literal>gitweb</literal> emulates the visual |
1401 style of git's web interface.</para> | 1401 style of git's web interface.</para> |
1402 </listitem> | 1402 </listitem> |
1403 <listitem> | 1403 <listitem> |
1404 <para><literal>monoblue</literal> uses solid blues and | 1404 <para id="x_6ac"><literal>monoblue</literal> uses solid blues and |
1405 greys.</para> | 1405 greys.</para> |
1406 </listitem> | 1406 </listitem> |
1407 <listitem> | 1407 <listitem> |
1408 <para><literal>paper</literal> is the default.</para> | 1408 <para id="x_6ad"><literal>paper</literal> is the default.</para> |
1409 </listitem> | 1409 </listitem> |
1410 <listitem> | 1410 <listitem> |
1411 <para><literal>spartan</literal> was the default for a | 1411 <para id="x_6ae"><literal>spartan</literal> was the default for a |
1412 long time.</para> | 1412 long time.</para> |
1413 </listitem> | 1413 </listitem> |
1414 </itemizedlist> | 1414 </itemizedlist> |
1415 <para>You can | 1415 <para id="x_6af">You can |
1416 also specify a custom template of your own; see | 1416 also specify a custom template of your own; see |
1417 <xref linkend="chap:template"/> for details. Here, you can | 1417 <xref linkend="chap:template"/> for details. Here, you can |
1418 see how to enable the <literal>gitweb</literal> | 1418 see how to enable the <literal>gitweb</literal> |
1419 style.</para> | 1419 style.</para> |
1420 <programlisting>[web] | 1420 <programlisting>[web] |
1521 </sect1> | 1521 </sect1> |
1522 | 1522 |
1523 <sect1> | 1523 <sect1> |
1524 <title>System-wide configuration</title> | 1524 <title>System-wide configuration</title> |
1525 | 1525 |
1526 <para>On Unix-like systems shared by multiple users (such as a | 1526 <para id="x_6b0">On Unix-like systems shared by multiple users (such as a |
1527 server to which people publish changes), it often makes sense to | 1527 server to which people publish changes), it often makes sense to |
1528 set up some global default behaviors, such as what theme to use | 1528 set up some global default behaviors, such as what theme to use |
1529 in web interfaces.</para> | 1529 in web interfaces.</para> |
1530 | 1530 |
1531 <para>If a file named <filename>/etc/mercurial/hgrc</filename> | 1531 <para id="x_6b1">If a file named <filename>/etc/mercurial/hgrc</filename> |
1532 exists, Mercurial will read it at startup time and apply any | 1532 exists, Mercurial will read it at startup time and apply any |
1533 configuration settings it finds in that file. It will also look | 1533 configuration settings it finds in that file. It will also look |
1534 for files ending in a <literal>.rc</literal> extension in a | 1534 for files ending in a <literal>.rc</literal> extension in a |
1535 directory named <filename>/etc/mercurial/hgrc.d</filename>, and | 1535 directory named <filename>/etc/mercurial/hgrc.d</filename>, and |
1536 apply any configuration settings it finds in each of those | 1536 apply any configuration settings it finds in each of those |
1537 files.</para> | 1537 files.</para> |
1538 | 1538 |
1539 <sect2> | 1539 <sect2> |
1540 <title>Making Mercurial more trusting</title> | 1540 <title>Making Mercurial more trusting</title> |
1541 | 1541 |
1542 <para>One situation in which a global <filename>hgrc</filename> | 1542 <para id="x_6b2">One situation in which a global <filename>hgrc</filename> |
1543 can be useful is if users are pulling changes owned by other | 1543 can be useful is if users are pulling changes owned by other |
1544 users. By default, Mercurial will not trust most of the | 1544 users. By default, Mercurial will not trust most of the |
1545 configuration items in a <filename>.hg/hgrc</filename> file | 1545 configuration items in a <filename>.hg/hgrc</filename> file |
1546 inside a repository that is owned by a different user. If we | 1546 inside a repository that is owned by a different user. If we |
1547 clone or pull changes from such a repository, Mercurial will | 1547 clone or pull changes from such a repository, Mercurial will |
1548 print a warning stating that it does not trust their | 1548 print a warning stating that it does not trust their |
1549 <filename>.hg/hgrc</filename>.</para> | 1549 <filename>.hg/hgrc</filename>.</para> |
1550 | 1550 |
1551 <para>If everyone in a particular Unix group is on the same team | 1551 <para id="x_6b3">If everyone in a particular Unix group is on the same team |
1552 and <emphasis>should</emphasis> trust each other's | 1552 and <emphasis>should</emphasis> trust each other's |
1553 configuration settings, or we want to trust particular users, | 1553 configuration settings, or we want to trust particular users, |
1554 we can override Mercurial's skeptical defaults by creating a | 1554 we can override Mercurial's skeptical defaults by creating a |
1555 system-wide <filename>hgrc</filename> file such as the | 1555 system-wide <filename>hgrc</filename> file such as the |
1556 following:</para> | 1556 following:</para> |