Mercurial > hgbook
comparison en/ch05-collab.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 | b788b405e141 |
children | 0b45854f0b7b |
comparison
equal
deleted
inserted
replaced
690:b788b405e141 | 691:4ce9d0754af3 |
---|---|
40 <para id="x_44f">The easiest way to get started with the web interface is to | 40 <para id="x_44f">The easiest way to get started with the web interface is to |
41 use your web browser to visit an existing repository, such as | 41 use your web browser to visit an existing repository, such as |
42 the master Mercurial repository at <ulink | 42 the master Mercurial repository at <ulink |
43 url="http://www.selenic.com/repo/hg?style=gitweb">http://www.selenic.com/repo/hg?style=gitweb</ulink>.</para> | 43 url="http://www.selenic.com/repo/hg?style=gitweb">http://www.selenic.com/repo/hg?style=gitweb</ulink>.</para> |
44 | 44 |
45 <para id="x_450">If you're interested in providing a web interface to your | 45 <para id="x_450">If you're interested in providing a web interface |
46 own repositories, Mercurial provides two ways to do this. The | 46 to your own repositories, Mercurial provides two ways to do |
47 first is using the <command role="hg-cmd">hg serve</command> | 47 this. The first is using the <command role="hg-cmd">hg |
48 command, which is best suited to short-term | 48 serve</command> command, which is best suited to short-term |
49 <quote>lightweight</quote> serving. See section <xref | 49 <quote>lightweight</quote> serving. See <xref |
50 linkend="sec:collab:serve"/> below for details of how to use | 50 linkend="sec:collab:serve"/> below for details of how to use |
51 this command. If you have a long-lived repository that you'd | 51 this command. If you have a long-lived repository that you'd |
52 like to make permanently available, Mercurial has built-in | 52 like to make permanently available, Mercurial has built-in |
53 support for the CGI (Common Gateway Interface) standard, which | 53 support for the CGI (Common Gateway Interface) standard, which |
54 all common web servers support. See section <xref | 54 all common web servers support. See <xref |
55 linkend="sec:collab:cgi"/> for details of CGI | 55 linkend="sec:collab:cgi"/> for details of CGI |
56 configuration.</para> | 56 configuration.</para> |
57 | 57 |
58 </sect1> | 58 </sect1> |
59 <sect1> | 59 <sect1> |
113 a number of people get together in a single location (a | 113 a number of people get together in a single location (a |
114 company's conference room, a hotel meeting room, that kind of | 114 company's conference room, a hotel meeting room, that kind of |
115 place) and spend several days more or less locked in there, | 115 place) and spend several days more or less locked in there, |
116 hacking intensely on a handful of projects.</para> | 116 hacking intensely on a handful of projects.</para> |
117 | 117 |
118 <para id="x_457">A sprint is the perfect place to use the <command | 118 <para id="x_457">A sprint is the perfect place to use the |
119 role="hg-cmd">hg serve</command> command, since <command | 119 <command role="hg-cmd">hg serve</command> command, since |
120 role="hg-cmd">hg serve</command> does not require any fancy | 120 <command role="hg-cmd">hg serve</command> does not require any |
121 server infrastructure. You can get started with <command | 121 fancy server infrastructure. You can get started with |
122 role="hg-cmd">hg serve</command> in moments, by reading | 122 <command role="hg-cmd">hg serve</command> in moments, by |
123 section <xref linkend="sec:collab:serve"/> below. Then simply | 123 reading <xref linkend="sec:collab:serve"/> below. Then simply |
124 tell | 124 tell the person next to you that you're running a server, send |
125 the person next to you that you're running a server, send the | 125 the URL to them in an instant message, and you immediately |
126 URL to them in an instant message, and you immediately have a | 126 have a quick-turnaround way to work together. They can type |
127 quick-turnaround way to work together. They can type your URL | 127 your URL into their web browser and quickly review your |
128 into their web browser and quickly review your changes; or | 128 changes; or they can pull a bugfix from you and verify it; or |
129 they can pull a bugfix from you and verify it; or they can | 129 they can clone a branch containing a new feature and try it |
130 clone a branch containing a new feature and try it out.</para> | 130 out.</para> |
131 | 131 |
132 <para id="x_458">The charm, and the problem, with doing things in an ad hoc | 132 <para id="x_458">The charm, and the problem, with doing things in an ad hoc |
133 fashion like this is that only people who know about your | 133 fashion like this is that only people who know about your |
134 changes, and where they are, can see them. Such an informal | 134 changes, and where they are, can see them. Such an informal |
135 approach simply doesn't scale beyond a handful people, because | 135 approach simply doesn't scale beyond a handful people, because |
160 potential for damage, I can ask you to clone my repository | 160 potential for damage, I can ask you to clone my repository |
161 into a temporary repository of your own and test it. This | 161 into a temporary repository of your own and test it. This |
162 lets us put off publishing the potentially unsafe change until | 162 lets us put off publishing the potentially unsafe change until |
163 it has had a little testing.</para> | 163 it has had a little testing.</para> |
164 | 164 |
165 <para id="x_45c">In this kind of scenario, people usually use the | 165 <para id="x_45c">In this kind of scenario, people usually use |
166 <command>ssh</command> protocol to securely push changes to | 166 the <command>ssh</command> protocol to securely push changes |
167 the central repository, as documented in section <xref | 167 to the central repository, as documented in <xref |
168 linkend="sec:collab:ssh"/>. It's also | 168 linkend="sec:collab:ssh"/>. It's also usual to publish a |
169 usual to publish a read-only copy of the repository over HTTP | 169 read-only copy of the repository over HTTP using CGI, as in |
170 using CGI, as in section <xref linkend="sec:collab:cgi"/>. | 170 <xref linkend="sec:collab:cgi"/>. Publishing |
171 Publishing over HTTP | 171 over HTTP satisfies the needs of people who don't have push |
172 satisfies the needs of people who don't have push access, and | 172 access, and those who want to use web browsers to browse the |
173 those who want to use web browsers to browse the repository's | 173 repository's history.</para> |
174 history.</para> | |
175 | 174 |
176 </sect2> | 175 </sect2> |
177 <sect2> | 176 <sect2> |
178 <title>Working with multiple branches</title> | 177 <title>Working with multiple branches</title> |
179 | 178 |
400 | 399 |
401 </sect2> | 400 </sect2> |
402 <sect2> | 401 <sect2> |
403 <title>Where collaboration meets branch management</title> | 402 <title>Where collaboration meets branch management</title> |
404 | 403 |
405 <para id="x_479">Once you and your team set up some shared repositories and | 404 <para id="x_479">Once you and your team set up some shared |
406 start propagating changes back and forth between local and | 405 repositories and start propagating changes back and forth |
407 shared repos, you begin to face a related, but slightly | 406 between local and shared repos, you begin to face a related, |
408 different challenge: that of managing the multiple directions | 407 but slightly different challenge: that of managing the |
409 in which your team may be moving at once. Even though this | 408 multiple directions in which your team may be moving at once. |
410 subject is intimately related to how your team collaborates, | 409 Even though this subject is intimately related to how your |
411 it's dense enough to merit treatment of its own, in chapter | 410 team collaborates, it's dense enough to merit treatment of its |
412 <xref linkend="chap:branch"/>.</para> | 411 own, in <xref linkend="chap:branch"/>.</para> |
413 | 412 |
414 </sect2> | 413 </sect2> |
415 </sect1> | 414 </sect1> |
416 <sect1> | 415 <sect1> |
417 <title>The technical side of sharing</title> | 416 <title>The technical side of sharing</title> |
1108 url="http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>.</para> | 1107 url="http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>.</para> |
1109 | 1108 |
1110 <para id="x_4d6">You'll need to copy this script into your <filename | 1109 <para id="x_4d6">You'll need to copy this script into your <filename |
1111 class="directory">public_html</filename> directory, and | 1110 class="directory">public_html</filename> directory, and |
1112 ensure that it's executable.</para> | 1111 ensure that it's executable.</para> |
1112 | |
1113 <programlisting>cp .../hgwebdir.cgi ~/public_html | 1113 <programlisting>cp .../hgwebdir.cgi ~/public_html |
1114 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi</programlisting> | 1114 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi</programlisting> |
1115 <para id="x_4d7">With basic configuration out of the way, try to visit | 1115 |
1116 <ulink url="http://myhostname/ | 1116 <para id="x_4d7">With basic configuration out of the way, try to |
1117 visit <ulink url="http://myhostname/ | |
1117 myuser/hgwebdir.cgi">http://myhostname/ | 1118 myuser/hgwebdir.cgi">http://myhostname/ |
1118 myuser/hgwebdir.cgi</ulink> in your browser. It should | 1119 myuser/hgwebdir.cgi</ulink> in your browser. It should |
1119 display an empty list of repositories. If you get a blank | 1120 display an empty list of repositories. If you get a blank |
1120 window or error message, try walking through the list of | 1121 window or error message, try walking through the list of |
1121 potential problems in section <xref | 1122 potential problems in <xref |
1122 linkend="sec:collab:wtf"/>.</para> | 1123 linkend="sec:collab:wtf"/>.</para> |
1123 | 1124 |
1124 <para id="x_4d8">The <filename role="special">hgwebdir.cgi</filename> | 1125 <para id="x_4d8">The <filename role="special">hgwebdir.cgi</filename> |
1125 script relies on an external configuration file. By default, | 1126 script relies on an external configuration file. By default, |
1126 it searches for a file named <filename | 1127 it searches for a file named <filename |
1311 Integer. If the web interface displays alternating | 1312 Integer. If the web interface displays alternating |
1312 <quote>stripes</quote> to make it easier to visually align | 1313 <quote>stripes</quote> to make it easier to visually align |
1313 rows when you are looking at a table, this number controls | 1314 rows when you are looking at a table, this number controls |
1314 the number of rows in each stripe.</para> | 1315 the number of rows in each stripe.</para> |
1315 </listitem> | 1316 </listitem> |
1316 <listitem><para id="x_4f0"><envar role="rc-item-web">style</envar>: | 1317 <listitem><para id="x_4f0"><envar |
1317 Controls the template Mercurial uses to display the web | 1318 role="rc-item-web">style</envar>: Controls the template |
1318 interface. Mercurial ships with two web templates, named | 1319 Mercurial uses to display the web interface. Mercurial |
1320 ships with two web templates, named | |
1319 <literal>default</literal> and <literal>gitweb</literal> | 1321 <literal>default</literal> and <literal>gitweb</literal> |
1320 (the latter is much more visually attractive). You can | 1322 (the latter is much more visually attractive). You can |
1321 also specify a custom template of your own; see chapter | 1323 also specify a custom template of your own; see |
1322 <xref linkend="chap:template"/> for details. | 1324 <xref linkend="chap:template"/> for details. Here, you can |
1323 Here, you can see how to enable the | 1325 see how to enable the <literal>gitweb</literal> |
1324 <literal>gitweb</literal> style.</para> | 1326 style.</para> |
1325 <programlisting>[web] | 1327 <programlisting>[web] |
1326 style = gitweb</programlisting> | 1328 style = gitweb</programlisting> |
1327 </listitem> | 1329 </listitem> |
1328 <listitem><para id="x_4f1"><envar role="rc-item-web">templates</envar>: | 1330 <listitem><para id="x_4f1"><envar role="rc-item-web">templates</envar>: |
1329 Path. The directory in which to search for template | 1331 Path. The directory in which to search for template |