hgbook

view ja/collab.tex @ 1070:3dec81dc4543

2.4 partly zh translated
author Zhaoping Sun <zhaopingsun@gmail.com>
date Wed Nov 11 21:25:10 2009 -0500 (2009-11-11)
parents
children
line source
1 \chapter{Collaborating with other people}
2 \label{cha:collab}
4 Mercurial $B$O40A4$KHsCf1{=8LsE*$J%D!<%k$G$"$k$?$a!"(B
5 $BMxMQ<TAj8_$NO"7H$K4X$7$F$O2?$i@)Ls$r2]$9$3$H$r$7$^$;$s!#(B
6 $B$G$9$,!"(B
7 $BJ,;69=@.4IM}$KFk@w$_$,L5$$$N$G$"$l$P!"(B
8 $B$$$/$D$+$N%D!<%k$d;HMQNc$rCN$C$F$*$/$3$H$O!"(B
9 $BBEEv$J:n6H<j=g$N%b%G%k$r9M$($k:]$KLr$KN)$A$^$9!#(B
11 \section{Mercurial's web interface}
13 Mercurial $B$O!"(B
14 $B$$$/$D$+$NM-MQ$J5!G=$rDs6!$9$k!"(B
15 $B6/NO$J%&%'%V%$%s%?%U%'!<%9$r;}$C$F$$$^$9!#(B
17 $BBPOCE*$JMxMQ$N>l9g!"(B
18 $B%&%'%V%$%s%?%U%'!<%97PM3$G#1$D$J$$$7J#?t$N%j%]%8%H%j$N1\Mw$,$G$-$^$9!#(B
19 $B%j%]%8%H%jMzNr$N;2>H$d!"(B
20 $B8D!9$NJQ99!J%3%_%C%H%a%C%;!<%8$d:9J,!K$N8!>Z!"(B
21 $B$*$h$S3F%G%#%l%/%H%j$d%U%!%$%k$NFbMF$N;2>H!"(B
22 $B$H$$$C$?$3$H$,$G$-$^$9!#(B
24 $BDLCN$K4X$7$F$b!"(B
25 $B%&%'%V%$%s%?%U%'!<%9$O!"(B
26 $B%j%]%8%H%j$K$*$1$kJQ99$K4X$9$k(B RSS $BG[?.5!G=$rDs6!$7$^$9!#(B
27 $B$*5$$KF~$j$N%D!<%k$r;H$C$F%j%]%8%H%j$r(B``$B9XFI(B''$B$9$k$3$H$b$G$-$^$9$7!"(B
28 $B%j%]%8%H%j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MQ$K4X$9$k>\:Y$O!"(B
52 \ref{sec:collab:serve}~$B@a$r;2>H$7$F$/$@$5$$!#(B
53 $BD94|E*3n$D>o;~MxMQ2DG=$J2TF0$rK>$`>l9g$O!"(B
54 Mercurial $B$KAH$_9~$^$l$F$$$k(B
55 CGI $B!J(BCommon Gateway Interface$B!K5!G=$,!"(B
56 $B0lHLE*$JA4$F$N%&%'%V%5!<%P$GMxMQ2DG=$G$9!#(B
57 CGI $B@_Dj$N>\:Y$O!"(B
58 \ref{sec:collab:cgi}~$B@a$r;2>H$7$F$/$@$5$$!#(B
60 \section{Collaboration models}
62 $BE,@Z$J=@Fp@-$r;}$D%D!<%k$r;H$&$3$H$G!"(B
63 $B:n6H<j=g$N7hDj$O!"(B
64 $B5;=QE*$JLdBj$+$iAH?%9)3XE*!J(Bsocial engineering$B!K$JLdBj$X$HJQ$o$j$^$9!#(B
65 Mercurial $B$O!"(B
66 $B%W%m%8%'%/%H$K$*$1$k:n6H<j=g$N9=@.$K4X$7$FKX$I@)8B$r2]$5$J$$$?$a!"(B
67 $B8DJL$NMWK>$K1h$C$?%b%G%k$N@_Dj$H1?MQ$OMxMQ<T<!Bh$H$J$j$^$9!#(B
69 \subsection{Factors to keep in mind}
71 $B$$$:$l$N%b%G%k$K$*$$$F$b?4F@$F$*$/$Y$-:G$b=EMW$JE@$O!"(B
72 $B$=$l$rMxMQ$9$k?M!9$NMWK>$HG=NO$K$I$l$@$1E,9g$9$k$+!"(B
73 $B$H$$$&$3$H$G$9!#(B
74 $B$3$l$O<+L@$K8+$($k$+$b$7$l$^$;$s$,!"(B
75 $B$[$s$N>/$7$N4V$G$b$3$N$3$H$rK:$l$F$O$$$1$^$;$s!#(B
77 $BI.<T$O0JA0!"40`z$H;W$($k:n6H<j=g%b%G%k$r9=C[$7$?$N$G$9$,!"(B
78 $B3+H/%A!<%`$K>/$J$+$i$LNL$N6C$-$HITOB$r$b$?$i$7$^$7$?!#(B
79 $BJ#;($J%V%i%s%A72$,I,M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JC1$KGD0.$9$k$3$H$,$G$-$k%b%G%k$G$"$j!"(B
103 $B$$$/$D$+$NFC0[$J>u67$G$OHs>o$KNI$/5!G=$7$^$9!#(B
105 $B0l$D$NNc$H$7$F!"(B
106 $BB?$/$N%W%m%8%'%/%H$,!"(B
107 $BD>@\2q$&$3$H$N5)$J<e$/$^$H$^$C$?6(NO<T%0%k!<%W$r;}$F$$$k(B
108 As one example, many projects have a loose-knit group of collaborators
109 who rarely physically meet each other.
110 $B;~@^$N(B``$BA4NO<@Av(B''$B!J(Bsprints$B!K(B\footnote{$BLuCm(B:
111 $B%*%U2q$H$+$G$9$M!#(B}$B$r@_$1$k$3$H$G!"(B
112 $B5wN%$K$h$C$F3V$F$i$l$?:n6H$KBG$A>!$D%0%k!<%W$b$"$j$^$9!#(B
113 $BA4NO<@Av$N5!2q$G$O!"(B
114 $BB?$/$N?M$,6&$KF1$8>l=j!J2q<R$N2q5D<<$d%[%F%k$N2q5D<<$NN`!K(B
115 $B$K=8$^$j!"(B
116 $B?tF|DxEY$rJD$8$3$b$C$F2a$4$7!"(B
117 $B>/NL$N%W%m%8%'%/%H$K=8Cf$7$F%O%C%-%s%0$r9T$$$^$9!#(B
119 $BA4NO<@Av$O!"(B
120 $BBg3]$+$j$J%5!<%P%$%s%U%i$rI,MW$H$7$J$$(B
121 \hgcmd{serve} $B%3%^%s%I$rMxMQ$9$k$N$K$A$g$&$INI$$5!2q$G$9!#(B
122 $B0J2<$N(B\ref{sec:collab:serve}~$B@a$rFI$`$3$H$G!"(B
123 $B$9$0$K$G$b(B \hgcmd{serve} $B$r;H$$;O$a$k$3$H$,$G$-$^$9!#(B
124 $B$=$&$7$?$J$i!"(B
125 $B<~0O$N?MC#$K%5!<%P$r<B9TCf$G$"$k$3$H$rEA$(!"(B
126 $B%$%s%9%?%s%H%a%C%;%s%8%c!<Ey$r;HMQ$7$F(B URL $B$rAw$l$P!"(B
127 $B6&F1:n6H$9$k>e$G$N@^$jJV$7COE@$^$GC)$jC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?%?%0$r;H$&$3$H$G!"(B
229 $B%?%0$,IUM?$5$l$?%j%S%8%g%s$,%3%_%C%H$5$l$?;~E@$H(B
230 $B87L)$K0lCW$9$k:n6HNN0h%G%#%l%/%H%j$r(B
231 \hgcmd{update} $B%3%^%s%I$K$h$jJ#@=$9$k$3$H$,$G$-$^$9!#(B
233 \interaction{branching.update}
235 $B$=$l$K2C$($F!"(B
236 $B%a%$%s%V%i%s%A$G$N%?%0IU$1$N8e$G!"(B
237 $B%5!<%P>e$N%a%$%s%V%i%s%A$r!"(B
238 $B?7$?$J(B``$B0BDjHG(B''$B%V%i%s%A!J$N%j%]%8%H%j!K$X$HJ#@=$9$k$3$H$b$G$-$^$9(B\footnote{
239 $BLuCm(B: $B%a%$%s%V%i%s%A$H0BDjHG%V%i%s%A$N3F%j%]%8%H%j$O!"(B
240 $BI,$:$7$bF10l%5!<%P$G1?MQ$5$l$kI,MW$O$"$j$^$;$s!#(B}$B!#(B
242 \interaction{branching.clone}
244 $B0BDjHG%V%i%s%A$KBP$7$FJQ99$9$kI,MW$,$"$k>l9g!"(B
245 $B3+H/<T$O(B\emph{$B0BDjHG%V%i%s%A(B}$B$N%j%]%8%H%j$+$iJ#@=$7!"(B
246 $BJQ99!"JQ99$N%F%9%H!"%3%_%C%H$N8e$K!"(B
247 $BJQ99$r0BDjHG%V%i%s%A$N%j%]%8%H%j$KH?1G$7$^$9!#(B
249 \interaction{branching.stable}
251 Mercurial $B$N%j%]%8%H%j$O$*8_$$$K!JJ*M}E*$K!KFHN)$7$F$*$j!"(B
252 $B%j%]%8%H%j4V$G$NJQ99$N<+F0E*$J$d$j<h$j$O9T$o$l$J$$$?$a!"(B
253 $B0BDjHG%V%i%s%A$H$H%a%$%s%V%i%s$O$*8_$$$K(B\emph{$B3VN%(B}$B$5$l$F$$$^$9!#(B
254 $B%a%$%s%V%i%s%A$K2C$($?JQ99$,0BDjHG%V%i%s%A$K(B``$BO3$l=P$9(B''$B$3$H$O$"$j$^$;$s$7!"(B
255 $B$=$N5U$K4X$7$F$bF1MM$G$9!#(B
257 $B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$r!"(B
258 $B%a%$%s%V%i%s%A$KH?1G$7$?$$>l9g$b$"$k$G$7$g$&!#(B
259 $B%a%$%s%V%i%s%A$G%P%0=$@5$r:FEY!J<jF0$G!K9T$&Be$o$j$K!"(B
260 $B0BDjHG%V%i%s%A$+$i<h$j9~$s$@JQ99$r%a%$%s%V%i%s$KBP$7$F%^!<%8$9$k$3$H$G!"(B
261 $B0BDjHG%V%i%s%A$K$*$1$kJQ99$r%a%$%s%V%i%s%A$K;}$A9~$`$3$H$,$G$-$^$9!#(B
263 \interaction{branching.merge}
265 $B$3$N;~E@$G$N%a%$%s%V%i%s%A$O!"(B
266 $B0BDjHG%V%i%s%A$K$OL5$$JQ99$rJ];}$7$F$$$^$9$,!"(B
267 $B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$rJ];}$7$F$$$^$9!#(B
268 $B0BDjHG%V%i%s%A$O!"(B
269 $B%a%$%s%V%i%s%A$K$N$_4^$^$l$kJQ99$K$O1F6A$r<u$1$J$$$^$^$G$9!#(B
271 \subsection{Feature branches}
273 $BBg5,LO%W%m%8%'%/%H$GM-8z$JJQ994IM}J}K!$O!"(B
274 $B3+H/%A!<%`$r>.$5$J%0%k!<%W$KJ,3d$9$k$3$H$G$9!#(B
275 $B%W%m%8%'%/%HA4BN$,;2>H$9$kC10l$N(B``$B%^%9%?!<(B''$B%V%i%s%A$+$iJ#@=$7$?6&M-%V%i%s%A(B
276 $B!J!a(B $B%j%]%8%H%j!K$r!"(B
277 $B3F%0%k!<%W$4$H$K$=$l$>$l;}$A$^$9!#(B
278 $B8D!9$N%V%i%s%A>e$G:n6H$9$k3+H/%a%s%P!<$O!"(B
279 $BB>$N%V%i%s%A$K$*$1$k3+H/:n6H$H$O3VN%$5$l$F$$$^$9!#(B
281 \begin{figure}[ht]
282 \centering
283 \grafix[width=\textwidth]{feature-branches}
284 \caption{Feature branches}
285 \label{fig:collab:feature-branches}
286 \end{figure}
288 $B$H$"$k5!G=$,E,@Z$J>u67(B\footnote{$BLuCm(B:
289 ``$B%3%s%Q%$%k%(%i!<$,L5$/$J$C$?(B''$B>u67$J$N$+!"(B
290 ``$BC1BN%F%9%H$,40N;$7$?(B''$B>u67$J$N$+$O!"(B
291 $B3F%W%m%8%'%/%H$N9=@.4IM}J}?K<!Bh$H$J$j$^$9!#(B}$B$KE~C#$7$?$HH=CG$5$l$?$J$i!"(B
292 $BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
293 $B%^%9%?!<%V%i%s%A!J$N%j%]%8%H%j!K(B
294 $B$+$iH?1G$7$?JQ99$r<+%A!<%`$N%V%i%s%A!J$N%j%]%8%H%j!K$X$H%^!<%8$7$F$+$i!"(B
295 $B%^%9%?!<%V%i%s%A$X$H%^!<%87k2L$rH?1G$9$l$PNI$$$N$G$9!#(B
297 \subsection{The release train}
299 $B%W%m%8%'%/%H$K$h$C$F$O!"(B
300 ``train''$B%b%G%k$G1?MQ$5$l$F$$$k>l9g$b$"$j$^$9!#(B
301 ``train'' $B%b%G%k$G1?MQ$5$l$F$$$k%W%m%8%'%/%H$G$O!"(B
302 $B%j%j!<%9$O?t%v7n$4$H$K@_Dj$5$l$F$*$j!"(B
303 ``train''$B$,=PH/=`Hw40N;$7$?CJ3,(B\footnote{$BLuCm(B:
304 $B!V?t%v7n$4$H$K@_Dj$5$l$?%j%j!<%9%9%1%8%e!<%k!W$r(B
305 $B!V;~9oI=DL$j$NH/<V;~9o!W$KNc$($F$$$kLOMM!#(B
306 }$B$GDs6!2DG=$J5!G=$@$1$,%j%j!<%9$K4^$^$l$^$9!#(B
308 $B$3$N%b%G%k$O!"@h$K@bL@$7$?5!G=JL%V%i%s%A$K$h$k:n6H$H;w$F$$$^$9!#(B
309 ``train''$B%b%G%k$N>l9g!"(B
310 $B5!G=JL%V%i%s%A$,Ns<V$K>h$j$=$3$J$C$?>l9g!"(B
311 $BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
312 $B<+%A!<%`$N5!G=%V%i%s%A!J%j%]%8%H%j!K$KBP$7$F!"(B
313 $B%j%j!<%9Ns<V$K4^$^$l$kJQ99$N<h$j9~$_$*$h$S%^!<%8$r9T$$!"(B
314 $B%^!<%87k2L$KBP$7$F:n6H$r7QB3$9$kI,MW$,$"$kE@$,0[$J$j$^$9!#(B
315 $B$3$N%^!<%8:n6H$r9T$&$3$H$G!"(B
316 $B<!2s%j%j!<%9$N:]$K!"(B
317 $BEv3:5!G=$,@09g@-$rJ]$D$3$H$,$G$-$^$9!#(B
319 \subsection{The Linux kernel model}
321 Linux $B%+!<%M%k$N3+H/BN@)$O!"(B
322 $B@u$$3,AX9=B$$H!"$=$l$r<h$j0O$`0l8+:.FY$H$7$?72=8$+$i@.$jN)$C$F$$$^$9!#(B
323 $BKX$I$N(B Linux $B3+H/<T$,!"(B
324 Mercurial $B$HF1Ey$N5!G=$r;}$C$?J,;69=@.4IM}%D!<%k$G$"$k(B
325 \command{git} $B%3%^%s%I$r;HMQ$7$F$$$k$N$G!"(B
326 Linux $B%+!<%M%k3+H/$K$*$1$k:n6H<j=g$N@bL@$O(B
327 Mercurial $BMxMQ$K$H$C$F$bM-MQ@-$r;}$C$F$$$^$9!#(B
328 $B5$$KF~$C$?%"%$%G%"$,$"$l$P!"(B
329 $B%D!<%k$rD6$($F<jK!$rMxMQ$9$k$3$H$O2DG=$J$N$G$9$+$i!#(B
331 $B%3%_%e%K%F%#$NCf?4$K$O!"(B
332 Linux $B$rAO$j=P$7$?(B Linus Torvalds $B;a$,$$$^$9!#(B
333 $BH`$OC10l$N%=!<%9%j%]%8%H%j$r8x3+$7$F$*$j!"(B
334 $B3+H/%3%_%e%K%F%#A4BN$K$H$C$F$O!"(B
335 $B$3$N%j%]%8%H%j$,(B``$B8"0R$"$k(B''$B8=9T%=!<%9%D%j!<$H$_$J$5$l$^$9!#(B
336 $BC/$b$,(B Tor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9!#(B
428 Mercurial $B$N$h$&$JE,@Z$JJ,;69=@.4IM}%D!<%k$G$"$l$P!"(B
429 $BN>J}$N%b%G%k$rA*Br2DG=$G$9!#(B
430 $BMxMQ<T4V$NO"7H7ABV$O!"(B
431 $B%D!<%k$K$h$j6/@)$5$l$kOD$s$@$b$N$G$O$J$/!"(B
432 $B8GM-$NMWK>$d9%$_$K4p$E$$$F9=C[$9$k$3$H$,$G$-$^$9!#(B
434 \subsection{Where collaboration meets branch management}
436 $B6&M-%j%]%8%H%j$r9=C[$7!"(B
437 $B3F:n6H<T$,<j85$N%j%]%8%H%j$H6&M-%j%]%8%H%j$H$N4V$G!"(B
438 $BJQ99$NEAGE$r3+;O$7;O$a$?$J$i!"(B
439 $B%A!<%`Fb$N3+H/$NJ}8~@-$rF1;~$KJ#?t4IM}$9$k$H$$$&!"(B
440 $BO"7H$K4X$9$k$3$H$G$O$"$j$D$D$b!"(B
441 $BHyL/$K0[$J$kFqLd$KD>LL$9$k$3$H$G$7$g$&!#(B
442 $B$3$NLdBj$O3+H/%A!<%`$NO"7HJ}<0$HL)@\$K4XO"$7$F$O$$$k$b$N$N!"(B
443 $B2~$a$F<h$j>e$2$k2ACM$,$"$k$[$IHs>o$K9~$_F~$C$?OC$G$"$k$3$H$+$i!"(B
444 \ref{chap:branch}~$B>O$G2~$a$F@bL@$7$^$9!#(B
446 \section{The technical side of sharing}
448 $BK\>O$N;D$j$O!"(B
449 $B6&F1:n6H<T$KBP$7$F%G!<%?$NDs6!$r9T$&>e$G$NLdBjE@$K3d$-$?$$$H;W$$$^$9!#(B
451 \section{Informal sharing with \hgcmd{serve}}
452 \label{sec:collab:serve}
454 Mercurial $B$N(B \hgcmd{serve} $B%3%^%s%I$O!"(B
455 $B>.$5$/6[L)$GB-JB$_$NAa$$=8CD$G$NMxMQ$KBgJQE,$7$F$$$^$9!#(B
456 \hgcmd{serve} $B%3%^%s%I$O$^$?!"(B
457 $B%M%C%H%o!<%/1[$7$G$N(B Mercurial $B%3%^%s%I$NMxMQ46$rDO$`$?$a$N!"(B
458 $BAG@2$i$7$$<jCJ$rDs6!$7$F$$$^$9!#(B
460 $B%j%]%8%H%jG[2<$K$*$$$F(B \hgcmd{serve} $B$r<B9T$9$k$3$H$G!"(B
461 $B#1IC$b7P$?$:$KFC@=$N(B HTTP $B%5!<%P$,5/F0$7$^$9!#(B
462 $B<B9T$,Dd;_$5$l$k$^$G$N4V$K$3$N(B HTTP $B%5!<%P$O!"(B
463 $BG$0U$N%/%i%$%"%s%H$+$i$N@\B3$r<uM}$7!"(B
464 $BEv3:%j%]%8%H%jCf$N%G!<%?$NDs6!$r9T$$$^$9!#(B
465 $B$?$C$?:#5/F0$7$?$P$+$j$N%5!<%P$N(B URL $B$rCN$C$F$$$F!"(B
466 $B%M%C%H%o!<%/1[$7$K%5!<%P$,2TF0$7$F$$$k%3%s%T%e!<%?$HDL?.$G$-$k$J$i!"(B
467 $B%&%'%V%V%i%&%6$d(B Mercurial $B$rMxMQ$7$F!"(B
468 $BC/$b$,%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$3$H$,$G$-$^$9!#(B
469 $B%N!<%H(B PC $B>e$G2TF0$9$k(B \hgcmd{serve} $B%W%m%;%9$N(B URL $B$O!"(B
470 \Verb|http://my-notepc.local:8000/| $B$N$h$&$J7A<0$K$J$j$^$9!#(B
472 \hgcmd{serve} $B%3%^%s%I$OHFMQ%&%'%V%5!<%P$G$O(B\emph{$B$"$j$^$;$s(B}$B!#(B
473 $B$3$N%3%^%s%I$r;HMQ$9$k$3$H$G#2$D$N;v$,2DG=$K$J$j$^$9!#(B
475 \begin{itemize}
476 \item $B0lHLE*$J%&%'%V%V%i%&%67PM3$G$N%5!<%S%9BP>]%j%]%8%H%j$NMzNr$N1\Mw(B
478 \item Mercurial $B%W%m%H%3%k$K$h$kDL?.$r9T$&$3$H$G!"(B
479 $B%j%]%8%H%jFb%A%'%s%8%;%C%H$N(B \hgcmd{clone} $B$J$$$7(B \hgcmd{pull}
481 \end{itemize}
483 $B$H$j$o$11s3V%f!<%6$K$h$kBP>]%j%]%8%H%j$N(B\emph{$BJQ99(B}$B$r5v2D$7$J$$$3$H$+$i!"(B
484 \hgcmd{serve} $B$OFI$_=P$7@lMQ$H$7$F$NMxMQ$,A[Dj$5$l$F$$$^$9!#(B
486 Mercurial $B$r4{$KMxMQ$7;O$a$F$$$k$N$G$"$l$P!"(B
487 $B<+?H$N%3%s%T%e!<%?>e$N%j%]%8%H%j$rBP>]$H$7$F(B
488 \hgcmd{serve} $B$rMxMQ$9$k$3$H$,$G$-$^$9$+$i!"(B
489 $B%M%C%H%o!<%/1[$7$K8x3+$5$l$F$$$k%j%]%8%H%j$N>l9g$HF1MM$K!"(B
490 \hgcmd{clone} $B$d(B \hgcmd{incoming}
491 $B$N$h$&$J%3%^%s%I$r;HMQ$7$F!"(B
492 \hgcmd{serve} $B$K$h$C$F5/F0$5$l$?%5!<%P$HDL?.$7$F$_$^$7$g$&!#(B
493 $B%M%C%H%o!<%/7PM3$G8x3+$5$l$F$$$k%j%]%8%H%j$KBP$9$k%3%^%s%I$N;HMQJ}K!$r!"(B
494 $B<jAa$/=,F@$9$k0l=u$K(B \hgcmd{serve} $B$r;HMQ$9$k$N$bNI$$$G$7$g$&!#(B
496 \subsection{A few things to keep in mind}
498 \hgcmd{serve} $B$O!"(B
499 $B%M%C%H%o!<%/1[$7$NFI$_=P$7A`:n$rG'>ZL5$7$GA4$F5v2D$7$F$$$k$?$a!"(B
500 $BBP>]%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$?$a$KC/$,@\B3$7$FMh$k$N$+$r!"(B
501 $B5$$K$7$J$/$FNI$$!J$"$k$$$O40A4$K@)8f$G$-$k!K4D6-$G$N$_(B
502 \hgcmd{serve} $B$r;H$&$h$&$K$9$Y$-$G$9!#(B
504 $B%3%s%T%e!<%?$d%M%C%H%o!<%/$X$N%U%!%$%d%&%)!<%k$NF3F~>u67$K$D$$$F!"(B
505 \hgcmd{serve} $B%3%^%s%I$O0l@Z4XCN$7$^$;$s!#(B
506 $B%U%!%$%d%&%)!<%k$N8!=P$b@)8f$b$G$-$^$;$s!#(B
507 $B<B9TCf$N(B \hgcmd{serve} $B%W%m%;%9$H$NDL?.$,$G$-$J$$>l9g$O!"(B
508 $B!JM}>&<R$,@5$7$$(B URL $B$r;HMQ$7$F$$$k$3$H$r3NG'$7$?(B\emph{$B8e(B}$B$G!K(B
509 $B%U%!%$%"%&%)!<%k$N@_Dj$r3NG'$9$Y$-$G$9!#(B
511 \hgcmd{serve} $B$K$h$k%M%C%H%o!<%/@\B3$N<u$1IU$1$O!"(B
512 $BDL>o$O(B 8000 $BHV%]!<%H$G9T$o$l$^$9!#(B
513 $BEv3:%]!<%H$,4{$KB>$N%W%m%;%9$K$h$j;HMQ$5$l$F$$$?>l9g$O!"(B
514 \hgopt{serve}{-p} $B%*%W%7%g%s$r;HMQ$9$k$3$H$G!"(B
515 $B@\B3<u$1IU$1%]!<%HHV9f$r;XDj$9$k$3$H$,$G$-$^$9!#(B
517 \hgcmd{serve} $B5/F0$N:]$K$ODL>o2?$b=PNO$5$l$^$;$s$N$G!"(B
518 $B>/!9IT0B$K$J$k$+$b$7$l$^$;$s!#(B
519 \hgcmd{serve} $B$,E,@Z$K2TF0$7$F$$$k$3$H$r3NG'$7$?$j!"(B
520 $B6&F1:n6H<T$KAwIU$9$k(B URL $B$rCN$j$?$$$N$G$"$l$P!"(B
521 \hggopt{-v} $B%*%W%7%g%sIU$-$G(B \hgcmd{serve} $B$r5/F0$7$F$/$@$5$$!#(B
523 \section{Using the Secure Shell (ssh) protocol}
524 \label{sec:collab:ssh}
526 Secure Shell $B!J(B\texttt{ssh}$B!K%W%m%H%3%k$r;HMQ$9$k$3$H$G!"(B
527 $B%M%C%H%o!<%/@\B31[$7$K0BA4$KJQ99FbMF$N<h$j9~$_!&H?1G$r9T$&$3$H$,$G$-$^$9!#(B
528 $B$3$N@\B3J}K!$r@5$7$/5!G=$5$;$k$K$O!"(B
529 $B%/%i%$%"%s%H$"$k$$$O%5!<%PB&$G>/!9@_Dj$,I,MW$+$b$7$l$^$;$s!#(B
531 ssh $B$KFk@w$_$,$J$$$N$G$"$l$P!"(B
532 $BB>$N%3%s%T%e!<%?$H0BA4$KDL?.$9$k$?$a$N%M%C%H%o!<%/%W%m%H%3%k$G$"$k!"(B
533 $B$HM}2r$7$F$*$$$F$/$@$5$$!#(B
534 Mercurial $B$G(B ssh $B$rMxMQ$9$k$K$O!"(B
535 $B%5!<%P$X$N%m%0%$%s$*$h$S%3%^%s%I<B9T$,$G$-$k$h$&$K!"(B
536 $B%5!<%PB&$K%f!<%6%"%+%&%s%H$r!JI,MW$G$"$l$PJ#?t!KMQ0U$9$kI,MW$,$"$j$^$9!#(B
538 $B!J(Bssh $B$K$D$$$F>\$7$$>l9g!"(B
539 $B0J9_$N@bL@$O$*$=$i$/Hs>o$K=iJbE*$K46$8$k$G$7$g$&!K(B
541 \subsection{How to read and write ssh URLs}
543 ssh $B%W%m%H%3%k$rMxMQ$9$k>l9g$N(B URL $B$O!"(B
544 $B35$M0J2<$N$h$&$J7A<0$r;}$A$^$9!#(B
546 \begin{codesample2}
547 ssh://bos@hg.serpentine.com:22/hg/hgbook
548 \end{codesample2}
550 \begin{enumerate}
551 \item ``\texttt{ssh://}' $BItJ,$,(B Mercurial $B$K(B ssh $B%W%m%H%3%k$NMxMQ$r;X<($7$^$9(B
553 \item ``\texttt{bos@}''$BItJ,$,%5!<%P$X$N%m%0%$%s$K$*$1$k%f!<%6L>$rI=$7$^$9!#(B
554 $B%5!<%P$G$N%f!<%6L>$,%m!<%+%k%^%7%s>e$N%f!<%6L>$H0lCW$9$k>l9g$O!"(B
555 $B$3$NItJ,$r>JN,$G$-$^$9!#(B
557 \item ``\texttt{hg.serpentine.com}''
558 $BItJ,$O%m%0%$%s@h%5!<%P$N%[%9%HL>$rI=$7$^$9!#(B
560 \item ``:22'' $BItJ,$O%5!<%P$K@\B3$9$k:]$N%]!<%HHV9f$rI=$7$^$9!#(B
561 ssh $B@\B3$K$*$1$k4{Dj%]!<%HHV9f$O(B 22 $BHV$G$9$N$G!"(B
562 22 $BHV(B\emph{$B0J30(B}$B$N%]!<%H$r;HMQ$9$k>l9g$N$_;XDj$,I,MW$G$9!#(B
564 \item URL $B$N;D$j$NItJ,$O%5!<%P>e$K$*$1$k%j%]%8%H%j$N%Q%9$rI=$7$^$9!#(B
566 \end{enumerate}
568 ssh $B%W%m%H%3%k$K$*$1$k(B URL $BI=5-$N%Q%9MWAGItJ,$K$O!"(B
569 $BCM$N2r<a$K4X$9$kI8=`E*$J<jK!$,$J$$$?$a$K!"(B
570 $B:.Mp$NM>CO$,B?!9$"$j$^$9!#(B
571 $B0l72$N%W%m%0%i%`$O!"(B
572 $B%Q%9MWAGItJ,$K4X$7$FB>$N%W%m%0%i%`$H0[$J$k?6$kIq$$$r$7$^$9!#(B
573 $B$3$N$h$&$J>u67$OM}A[E*$G$O$"$j$^$;$s$,!"(B
574 $B>u67$,JQ$o$j$=$&$K$O$"$j$^$;$s!#(B
575 $B$G$9$+$i0J9_$N@bL@$OCm0U?<$/FI$s$G$/$@$5$$!#(B
577 Mercurial $B$O%Q%9ItJ,$r!"(B
578 $B%5!<%P$K%m%0%$%s$9$k%f!<%6$N!"(B
579 $B%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$H$_$J$7$^$9!#(B
580 $BNc$($P!"(B
581 $B%5!<%P$K$*$1$k(B \texttt{foo} $B%f!<%6$N%[!<%`%G%#%l%/%H%j$,(B
582 \dirname{/home/foo} $B$G$"$k>l9g!"(B
583 ssh $B%W%m%H%3%k$K$*$1$k(B URL $B$N%Q%9MWAG$,(B \dirname{bar} $B$G$"$l$P!"(B
584 $B$=$N(B URL $B$K$h$j(B\emph{$B<B:]$K(B}$B;2>H$5$l$k$N$O(B
585 \dirname{/home/foo/bar} $B%G%#%l%/%H%j$G$9!#(B
587 $BB>$N%f!<%6$N%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$r;XDj$9$k>l9g$O!"(B
588 $B%A%k%@J8;z!J(B\texttt{~}$B!K$K%f!<%6L>!J$3$3$G$O(B
589 \texttt{otheruser} $B$H$7$^$9!K$rB3$1$?%Q%9$G;O$^$k!"(B
590 $B0J2<$N$h$&$JI=5-$K$J$j$^$9!#(B
592 \begin{codesample2}
593 ssh://server/~otheruser/hg/repo
594 \end{codesample2}
596 \emph{$B@dBP(B}$B%Q%9$K$h$k;XDj$r9T$&>l9g$O!"(B
597 $B0J2<$N$h$&$K%Q%9MWAG$r%@%V%k%9%i%C%7%e$G;O$a$^$9!#(B
599 \begin{codesample2}
600 ssh://server//absolute/path
601 \end{codesample2}
603 \subsection{Finding an ssh client for your system}
605 $BKX$IA4$F$N(B Unix $B%i%$%/$J%7%9%F%`$K$O(B
606 OpenSSH $B$,;vA0F3F~$5$l$F$$$^$9!#(B
607 Unix $B%i%$%/$J%7%9%F%`$r;HMQ$7$F$$$k>l9g!"(B
608 \Verb|which ssh| $B$HF~NO$9$k$3$H$G(B
609 \command{ssh} $B%3%^%s%I!JDL>o$O(B \dirname{/usr/bin} $B$K%$%s%9%H!<%k$5$l$F$$$^$9!K(B
610 $B$N%$%s%9%H!<%k$NM-L5$r3NG'$9$k$3$H$,$G$-$^$9!#(B
611 $BM=A[$KH?$7$F%$%s%9%H!<%k$5$l$F$$$J$+$C$?>l9g$K$O!"(B
612 $B%7%9%F%`E:IU$N%I%-%e%a%s%H$r;2>H$7$F%$%s%9%H!<%kJ}K!$rD4$Y$F$/$@$5$$!#(B
614 Windows $B$N>l9g!"(B
615 $BBEEv$J(B ssh $B%/%i%$%"%s%H$rA*Br$7$F%@%&%s%m!<%I$9$kI,MW$,$"$j$^$9!#(B
616 $B<g$JA*Br;h$O#2$D$"$j$^$9!#(B
618 \begin{itemize}
619 \item Simon Tatham $B;a$K$h$k(B PuTTY~\cite{web:putty} $B$O!"(B
620 ssh $B%/%i%$%"%s%H%3%^%s%I0l<0$rDs6!$7$F$$$^$9!#(B
622 \item $BLLE]$J;v$X$NBQ@-$,9b$$J}$J$i!"(B
623 Cygwin $B>e$N(B OpenSSH $B$r;H$&$N$bNI$$$G$7$g$&!#(B
625 \end{itemize}
627 $B$I$A$i$N>l9g$G$b!"(B
628 Mercurial $B$,(B ssh $B%/%i%$%"%s%H%3%^%s%I$rC5$7=P$;$k$h$&$K(B
629 \hgini\ $B%U%!%$%k$rJT=8$9$kI,MW$,$"$k$G$7$g$&!#(B
630 $BNc$($P(B PuTTY $B$r;HMQ$9$k$J$i!"(B
631 $B%3%^%s%I9T$G<B9T$9$k(B ssh $B%/%i%$%"%s%H$H$7$F(B
632 \command{plink} $B$r<B9T$9$k$3$H$K$J$j$^$9!#(B
634 \begin{codesample2}
635 [ui]
636 ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key"
637 \end{codesample2}
639 \begin{note}
640 \command{plink} $B$X$N%Q%9$,6uGrJ8;z$r4^$`>l9g!"(B
641 Mercurial $B$O(B \command{plink} $B%3%^%s%I$r@5$7$/5/F0$G$-$^$;$s(B
642 $B!J$G$9$N$G(B \dirname{C:\\Program Files} $B$K%$%s%9%H!<%k$9$k$N$O!"(B
643 $B$h$/$"$j$^$;$s!K!#(B
644 \end{note}
646 \subsection{Generating a key pair}
648 ssh $B%/%i%$%"%s%H$r;HMQ$9$kEY$K!"(B
649 $BKh2s%Q%9%o!<%IF~NO$r7+$jJV$5$J$/$F$bNI$$MM$K!"(B
650 $B80BP!J(Bkey pair$B!K(B\footnote{$BLuCm(B:
651 $B!V8x3+80!W!J(Bpublic key$B!K$H(B
652 $B!VHkL)80!W!J(Bprivate key$B!K$NBP$,@8@.$5$l$^$9!#(B
653 }$B$r@8@.$9$k$3$H$r$*$9$9$a$7$^$9!#(B
654 Unix $B%i%$%/$J%7%9%F%`(B\footnote{$BLuCm(B: Windows $B$N(B Cygwin $B4D6-4^$`(B}$B$G$O!"(B
655 \command{ssh-keygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
656 Windows $B>e$G(B PuTTY $B$r;HMQ$7$F$$$k>l9g$O!"(B
657 \command{puttygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
659 $B80BP$r@8@.$9$k>l9g!"(B
660 $B%Q%9%U%l!<%:$G80$r<i$k$h$&$K$9$k$N$,!"(B
661 $B0lHL$K$O(B\emph{$BHs>o$K(B}$B8-L@$H$5$l$F$$$^$9(B
662 $B!J(Bssh $B%W%m%H%3%k$K$h$k0BA4$J%M%C%H%o!<%/$r!"(B
663 $B<+F02=$5$l$?=hM}$K$*$$$F;HMQ$9$k>l9g$r=|$/!K!#(B
665 $B$7$+$7!"C1$K80BP$r@8@.$7$?$@$1$G$OIT==J,$G$9!#(B
666 $B%M%C%H%o!<%/7PM3$G%m%0%$%s$9$k%5!<%PB&%"%+%&%s%H$K$*$$$F!"(B
667 $B>5G'800lMw$K8x3+80$rDI2CEPO?$9$kI,MW$,$"$j$^$9!#(B
668 OpenSSH $B$,F3F~$5$l$F$$$k%5!<%P$G$N8x3+80$NDI2C$O!"(B
669 $BEv3:%"%+%&%s%H$N(B \sdirname{.ssh} $B%G%#%l%/%H%jG[2<$N(B
670 \sfilename{authorized\_keys}
671 $B%U%!%$%k$K8x3+80$NFbMF$rDI2C$9$k$3$H$G9T$o$l$^$9!#(B
673 Unix $B%i%$%/L>%7%9%F%`$G$O!"(B
674 $B8x3+80$ODL>o(B \filename{.pub} $B3HD%;R$r;}$C$F$$$^$9!#(B
675 Windows $B>e$G(B \command{puttygen} $B$r;HMQ$9$k>l9g$O!"(B
676 $BG$0U$N%U%!%$%kL>$GJ]B82DG=$G$9$7!"(B
677 $B8x3+80$NFbMF$,I=<($5$l$F$$$k%&%#%s%I%&$+$i(B
678 \sfilename{authorized\_keys} $B$XD>@\E=$jIU$1!J(Bpaste$B!K$k$3$H$b2DG=$G$9(B
680 \subsection{Using an authentication agent}
682 $BG'>Z%(!<%8%'%s%H$O!"(B
683 $B%Q%9%U%l!<%:$r%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]B8$7$^$9!#(B
705 Windows $B>e$G(B PuTTY $B$r;HMQ$9$k>l9g$O!"(B
706 \command{pageant} $B%3%^%s%I$,G'>Z%(!<%8%'%s%H$7$F?6Iq$$$^$9!#(B
707 $B%7%9%F%`%H%l%$$KDI2C$5$l$?%"%$%3%s$r%/%j%C%/$9$k$3$H$G!"(B
708 $B3JG<$5$l$?%Q%9%U%l!<%:$N4IM}$r9T$&$3$H$,$G$-$^$9!#(B
710 \subsection{Configuring the server side properly}
712 $B=i?4<T$K$H$C$F(B ssh $B$N@_Dj$OLLE]$J$N$G!"(B
713 $BLdBj$,H/@8$9$k>u67$bB?4t$KEO$j$^$9!#(B
714 Add Mercurial on top, and
715 there's plenty more scope for head-scratching. XXXXX
716 $BLdBjH/@8$N2DG=@-$O!"(B
717 $B%/%i%$%"%s%HB&$G$O$J$/%5!<%PB&$NJ}$,9b$$$G$9!#(B
718 $B$"$j$,$?$$$3$H$K!"(B
719 $B0lC6@5$7$/F0:n$9$k@_Dj$,$G$-$F$7$^$($P!"(B
720 $BDL>o$OL54|8B$K@5$7$/F0:n$7B3$1$^$9!#(B
722 Mercurial $B$G(B ssh $B%5!<%P$HDL?.$r$7$F$_$kA0$K!"(B
723 $BDL>o$N(B \command{ssh} $B$J$$$7(B
724 \command{putty} $B%3%^%s%I$K$h$k%5!<%P$H$NDL?.$r3NG'$9$k$N$,L5Fq$G$9!#(B
725 $BD>@\%3%^%s%I$r;HMQ$7$?:]$KLdBj$,H/@8$7$?$J$i$P!"(B
726 Mercurial $B$,5!G=$7$J$$$3$H$O3N<B$G$9!#(B
727 $B99$K0-$$$3$H$K!"(B
728 Mercurial $B$r2p$7$F$N(B ssh $B%5!<%P$H$NO"7H$O!"(B
729 $B:,K\E*$J860x$,1#$l$F$7$^$$$^$9!#(B
730 ssh $B$K4XO"$9$k(B Mercurial $B$NLdBj$r2r7h$9$k>l9g$O!"(B
731 Mercurial $B$NIT6q9g$r5?$&(B\emph{$BA0$K(B}$B!"(B
732 ssh $B%/%i%$%"%s%H%3%^%s%I$ND>@\<B9T$,5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
734 $B%5!<%PB&$G:G=i$K3NG'$9$Y$-;v$O!"(B
735 $B$"$k%^%7%s$+$i%5!<%P%^%7%s$X$N<B:]$N%m%0%$%s$N2DH]$G$9!#(B
736 \command{ssh} $B$J$$$7(B \command{putty} $B$G%m%0%$%s$G$-$J$$>l9g!"(B
737 $BI=<($5$l$k%(%i!<%a%C%;!<%8$+$iLdBjFCDj$N%R%s%H$,F@$i$l$k$+$b$7$l$^$;$s!#(B
738 $B$h$/$"$kLdBj$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B
740 \begin{itemize}
741 \item ``connection refused'' $B$,I=<($5$l$k>l9g$O!"(B
742 ssh $B%5!<%P%W%m%;%9$,5/F0$5$l$F$$$J$$$+!"(B
743 $B%U%!%$%d!<%&%)!<%k@_Dj$K$h$j%M%C%H%o!<%/@\B3$G$-$J$$$3$H$,860x$G$9!#(B
745 \item ``no route to host'' $B$,I=<($5$l$k>l9g$O!"(B
746 $B@\B3@h$N%5!<%P%"%I%l%9$,4V0c$C$F$$$k$+!"(B
747 $B%U%!%$%d!<%&%)!<%k$K$h$C$F@\B3$,87=E$K6X;_$5$l$F$$$k$3$H$,860x$G$9!#(B
749 \item ``permission denied'' $B$,I=<($5$l$k>l9g$O!"(B
750 $B%5!<%P@\B3$N:]$N%f!<%6L>!"%Q%9%U%l!<%:!"(B
751 $B$J$$$7%5!<%PB&%f!<%6$N%Q%9%o!<%I$NF~NO$r4V0c$($F$$$k$3$H$,860x$G$9!#(B
753 \end{itemize}
755 $B$3$l$^$G$NOC$r$^$H$a$k$H!"(B
756 $B%5!<%P%^%7%s>e$N(B ssh $B%5!<%P%W%m%;%9$H$NDL?.$KLdBj$,$"$k>l9g!"(B
757 $B$^$:$O%5!<%P%W%m%;%9$N2TF0>u67$r3NG'$7$F$/$@$5$$!#(B
758 $BB?$/$N%7%9%F%`$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$BJL$JLdBj$N2DG=@-$r8!F$$9$kI,MW$,$"$j$^$9!#(B
787 \begin{itemize}
788 \item $B%5!<%PB&%f!<%6$N!"%[!<%`%G%#%l%/%H%j$J$$$7(B
789 \sdirname{.ssh} $B%G%#%l%/%H%j$N8"8B@_Dj$,!"(B
790 $B2aEY$K4K$/@_Dj$5$l$F$$$k$N$+$b$7$l$^$;$s!#(B
791 ssh $B%5!<%P%W%m%;%9$O$=$N>l9g!"(B
792 \sfilename{authorized\_keys}
793 $B%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
794 $BNc$($P!"(B
795 $B%[!<%`%G%#%l%/%H%j$J$$$7(B \sdirname{.ssh} $B%G%#%l%/%H%j$,!"(B
796 $B%0%k!<%W$KBP$9$k=q$-9~$_8"8B$r@_Dj$5$l$F$$$k>l9g!"(B
797 $B%Q%9%o!<%ILd$$9g$o$;$,9T$o$l$k!"$H$$$C$?>I>u$,8+$i$l$^$9!#(B
799 \item \sfilename{authorized\_keys}
800 $B%U%!%$%k$=$N$b$N$KLdBj$,$"$k2DG=@-$b$"$j$^$9!#(B
801 $B$3$N%U%!%$%k$X$N=q$-9~$_8"8B$,=jM-<T0J30$K$b@_Dj$5$l$F$$$k>l9g!"(B
802 ssh $B%5!<%P%W%m%;%9$O%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
804 \end{itemize}
806 $B0J2<$N%3%^%s%I<B9T$KBP$7$F!"(B
807 $B!J%5!<%PB&$N!K8=:_;~9o$rI=<($9$k#19T$@$1$,=PNO$5$l$k!"(B
808 $B$H$$$&>uBV$,M}A[E*$G$9!#(B
810 \begin{codesample2}
811 ssh myserver date
812 \end{codesample2}
814 $B>e5-$N$h$&$JHsBPOCE*$J%3%^%s%I<B9T$N>l9g$K$b!"(B
815 $B%P%J!<I=<($d$=$l$KN`$9$kI=<($,9T$o$l$k$h$&$J@_Dj$,!"(B
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G'$7$?$J$i$P!"(B
836 $B<!$K3NG'$9$k$N$O!"(B
837 $B%5!<%PB&$G$N(B Mercurial $B<B9T$N2DH]$G$9!#(B
838 $B0J2<$N%3%^%s%I<B9T$,@5$7$/5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
840 \begin{codesample2}
841 ssh myserver hg version
842 \end{codesample2}
844 $BDL>o$N(B \hgcmd{version} $B=PNO$G$O$J$/%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g!"(B
845 $BBg35$O(B \dirname{/usr/bin} $B$K(B
846 Mercurial $B$,%$%s%9%H!<%k$5$l$F$$$J$$$3$H$,860x$G$9!#(B
847 $B$=$N>l9g$G$b!"(B
848 $BI,$:$7$b(B \dirname{/usr/bin} $B$K%$%s%9%H!<%k$9$kI,MW$O$"$j$^$;$s!#(B
849 $B$7$+$7!"9M$(F@$k0J2<$N4v$D$+$N860x$K4X$7$F3NG'$,I,MW$G$9!#(B
851 \begin{itemize}
852 \item Mercurial $B$OK\Ev$K%5!<%P$K%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
853 $BJQ$J<ALd$H;W$o$l$k$+$b$7$l$^$;$s$,!"$3$l$OHs>o$K=EMW$J3NG';v9`$G$9!#(B
855 \item $B%7%'%k$N%3%^%s%I%5!<%A%Q%9!JDL>o$O(B \envar{PATH} $B4D6-JQ?t$G@_Dj!K(B
856 $B$N@_Dj$,C1$KITE,@Z$J$N$+$b$7$l$^$;$s!#(B
858 \item $B$R$g$C$H$7$?$i!"(B\envar{PATH} $B4D6-JQ?t$,(B
859 \command{hg}
860 $B%3%^%s%I$N3JG<>l=j$r;X$9$h$&$K@_Dj$5$l$k$N$OBPOCE*$J%m%0%$%s;~$K$N$_!"(B
861 $B$H$$$&2DG=@-$b$"$j$^$9!#(B
862 \envar{PATH} $B4D6-JQ?t$N@_Dj$rITE,Ev$J5/F0%9%/%j%W%H$G9T$C$F$$$k>l9g$K!"(B
863 $B$3$N$h$&$J8=>]$,H/@8$7$^$9!#(B
864 $B3F<+$N;HMQ$7$F$$$k%7%'%k$N%I%-%e%a%s%H$r3NG'$7$F$_$^$7$g$&(B\footnote{$BLuCm(B:
865 $BNc$($P(B bash $B$N>l9g!"BPOCE*%m%0%$%s$+H]$+$G(B
866 \sfilename{.bashrc}$B!"(B
867 \sfilename{.bash\_profile}$B!"(B
868 \sfilename{.profile} $B$*$h$S(B
869 \sfilename{.login} $B$H$$$C$?3F%U%!%$%k$NFI$_9~$_$NM-L5$,JQ2=$7$^$9!#(B
870 $B$^$?!"%G%#%9%H%j%S%e!<%7%g%s$K$h$C$F$O!"(B
871 $BHsBPOCE*$J<B9T$N:]$K$O!"(B
872 \dirname{/etc/bashrc} $B$K$h$k(B
873 \dirname{/etc/profile.d}
874 $BG[2<$N@_Dj%U%!%$%kFI$_9~$_$,9T$o$l$J$$>l9g$,$"$j$^$9(B
875 $B!J(B2.6.x $B7O%+!<%M%k%Y!<%9$N$b$N$OFI$_9~$^$J$$J}?K$NLOMM!K$N$G!"(B
876 \envar{PYTHONPATH} $B$N7o$b4^$a$F!"(B
877 $B%7%9%F%`%o%$%I$J@_Dj$r9T$&J}$OCm0U$,I,MW$G$9!#(B
878 \Verb|ssh myserver env|
879 $B<B9T$G=PNO$5$l$k4D6-JQ?t0lMw$r3NG'$7$F$_$^$7$g$&!#(B
880 }$B!#(B
882 \item \envar{PYTHONPATH} $B4D6-JQ?t$K$h$k(B
883 Mercurial $B$N(B Python
884 $B%b%8%e!<%k3JG<%G%#%l%/%H%j$N;2>H$,I,MW$G$"$k%1!<%9$b$"$j$^$9!#(B
885 $BITE,@Z$J@_Dj$@$C$?$j!"BPOCE*%m%0%$%s;~$K$N$_@_Dj$5$l$F$$$k2DG=@-$,$"$j$^$9!#(B
887 \end{itemize}
889 ssh $B7PM3$G$N(B \hgcmd{version} $B%3%^%s%I<B9T$,@.8y$7$?$J$i=`Hw$O40N;$G$9!#(B
890 $B%5!<%P!&%/%i%$%"%s%H$O6&$KLdBj2r7h:Q$_$H$J$j$^$7$?!#(B
891 $B%5!<%P>e$G8x3+$5$l$F$$$k(B $B%j%]%8%H%j$K!"(B
892 $BEv3:%f!<%6L>$K$h$k(B Mercurial $B$G$N%"%/%;%9$,2DG=$K$J$C$F$$$kH&$G$9!#(B
893 $B$3$3$^$G$N3NG'$r%/%j%"$7$?>e$G!"(B
894 Mercurial $B$H(B ssh $B$NO"7H$K$*$$$FLdBj$,H/@8$7$?>l9g!"(B
895 $BLdBjH/@8$N>u67$r$h$jL@3N$K$9$k$?$a$K!"(B
896 \hggopt{--debug} $B%*%W%7%g%s$rIU$1$F$N<B9T$r;n$7$F$_$F$/$@$5$$!#(B
898 \subsection{Using compression with ssh}
900 ssh $B%W%m%H%3%k$r;HMQ$9$k>l9g!"(B
901 ssh $B%W%m%H%3%k<+?H$,DL?.;~$K%G!<%?05=L$r9T$&$?$a!"(B
902 Mercurial $B$O05=L$r9T$$$^$;$s!#(B
903 $B$7$+$7!"(Bssh $B%/%i%$%"%s%H$N!JDL>o$N!K4pDlF0:n$G$O!"(B
904 $B05=L$r(B\emph{$B9T$$$^$;$s(B}$B!#(B
906 $B9bB.$J(B LAN $B$N>l9g$r=|$1$P!JL5@~%M%C%H%o!<%/$G$"$C$F$b!K!"(B
907 $BDL?.;~$N05=L$O(B Mercurial
908 $B$N%M%C%H%o!<%/7PM3$N=hM}$r82Cx$K9bB.2=$7$^$9!#(B
909 $BNc$($P(B WAN $B7PM3$G$NO"7H$N>l9g!"(B
910 $B$+$J$jBg$-$J%j%]%8%H%j$NJ#@=$KMW$9$k;~4V$,(B 51 $BJ,$+$i(B 17 $BJ,$KDc8:$7$?!"(B
911 $B$H$N@-G=7WB,Js9p$b$"$j$^$9!#(B
913 \command{ssh} $B$H(B \command{plink} $B$NN>J}$H$b!"(B
914 $BDL?.;~05=L$rM-8z2=$9$k(B
915 \cmdopt{ssh}{-C} $B%*%W%7%g%s$r<u$1IU$1$^$9!#(B
916 \hgrc\ $B%U%!%$%k$r0J2<$N$h$&$KJT=8$9$k$3$H$G!"(B
917 ssh $B%W%m%H%3%kMxMQ$N:]$K>o$K05=L$r9T$&$h$&$K(B Mercurial $B$KBP$7$F;XDj$G$-$^$9!#(B
919 \begin{codesample2}
920 [ui]
921 ssh = ssh -C
922 \end{codesample2}
924 \command{ssh} $B$r;HMQ$7$F$$$k>l9g$O!"(B
925 $BO"7H@h%5!<%P$H$NDL?.$N:]$K$O>o$K05=L$r9T$&$h$&$K@_Dj$9$k$3$H$b$G$-$^$9!#(B
926 $B$3$N@_Dj$r9T$&$K$O!"(B
927 $B%[!<%`%G%#%l%/%H%jG[2<$N(B
928 \sfilename{.ssh/config} $B%U%!%$%k(B
929 $B!JL5$$>l9g$O?75,$K:n@.$7$^$9!K$K0J2<$N$h$&$K5-=R$7$^$9!#(B
931 \begin{codesample2}
932 Host hg
933 Compression yes
934 HostName hg.example.com
935 \end{codesample2}
937 $B>e5-$N5-=R$O!"(B
938 \texttt{hg} $B$H$$$&JLL>!J(Balias$B!K$r:n@.$7$^$9!#(B
939 \command{ssh} $B<B9T$N:]$N%3%^%s%I9T5-=R$d!"(B
940 Mercurial $B$N(B \texttt{ssh} $B%W%m%H%3%k$K$*$1$k(B URL $B$H$7$F!"(B
941 \texttt{hg} $B$r!J%[%9%HL>$H$7$F!K;HMQ$7$?>l9g!"(B
942 \command{ssh} $B$ODL?.;~05=L$r9T$$$D$D(B \texttt{hg.example.com} $B$K@\B3$7$^$9!#(B
943 $B$3$N@_Dj$K$h$j!"(B
944 $BF~NO$NJXMx$J>JN,L>$H!"05=L;XDj$NN>J}$r<j$K$9$k$3$H$,$G$-$^$9!#(B
946 \section{Serving over HTTP using CGI}
947 \label{sec:collab:cgi}
949 $B0U5$9~$_<!Bh$G$O!"(B
950 Mercurial $B$N(B CGI $B%$%s%?%U%'!<%9$N@_Dj$O!"(B
951 $B?tJ,$N$b$N$r?t;~4V$K$7$F$7$^$&2DG=@-$,$"$j$^$9!#(B
953 $B:G$bC1=c$JNc$+$i=i$a$F!"(B
954 $B$h$jJ#;($J@_Dj$X$H8~$1$F?J$a$F$f$-$^$7$g$&!#(B
955 $B:G$b4pK\E*$J%1!<%9$G$9$i!"(B
956 $B%&%'%V%5!<%P$N@_Dj%U%!%&%k$NFI$_=q$-$r9T$&I,MW$,=P$F$/$k$3$H$G$7$g$&!#(B
958 \begin{note}
959 $B%&%'%V%5!<%P$N@_Dj$OJ#;($G!"07$$$K$/$/!"3n$D%7%9%F%`0MB8@-$N9b$$:n6H$G$9!#(B
960 $B$=$N$?$aK\=q$G$O!"(B
961 $BH/@8$9$k$G$"$m$&LdBj$N%1!<%9$rA4$FLVMe$9$k$h$&$J<j=g$r<($9$3$H$,$G$-$^$;$s!#(B
962 $B0J9_$N5-=R$O!"?5=E$5$H3F<+$NH=CG$r$b$C$FFI$_?J$a$k$h$&$K$7$F$/$@$5$$!#(B
963 $BBt;34V0c$($?$j!"%5!<%P$N%(%i!<%m%02r@O$K;~4V$rHq$d$93P8g$,I,MW$G$7$g$&!#(B
964 \end{note}
966 \subsection{Web server configuration checklist}
968 $BFI$_?J$a$kA0$K!"(B
969 $B%7%9%F%`$N@_Dj>u67$K4X$9$k4v$D$+$N3NG'$r9T$$$^$7$g$&!#(B
971 \begin{enumerate}
972 \item $B%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
973 Mac OS X $B$O(B Apache $B$,%$%s%9%H!<%k$5$l$?>uBV$G=P2Y$5$l$^$9$,!"(B
974 $BB?$/$N%7%9%F%`$G$O%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$;$s!#(B
976 \item $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$k>l9g!"(B
977 $B$=$l$O<B:]$K2TF0$7$F$$$^$9$+!)(B
978 $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$?>l9g$G$b!"(B
979 $BB?$/$N%7%9%F%`$N4pDl>uBV$O!"%&%'%V%5!<%P$,L58z2=$5$l$F$$$^$9!#(B
981 \item CGI $B$r2TF0$5$;$h$&$H$7$F$$$k%G%#%l%/%H%j$O!"(B
982 $B%&%'%V%5!<%P$N@_Dj$G(B CGI $B$N<B9T$,5v2D$5$l$F$$$^$9$+!)(B
983 $BB?$/$N%&%'%V%5!<%P$N4pDl>uBV$O!"(B
984 CGI $B%W%m%0%i%`$N<B9T5!G=$,L@<(E*$KL58z2=$5$l$F$$$^$9!#(B
986 \end{enumerate}
988 $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$J$$>l9g$d!"(B
989 Apache $B%&%'%V%5!<%P$N@_Dj7P83$,$"$^$jL5$$>l9g$K$O!"(B
990 Apache $B%&%'%V%5!<%P$NBe$o$j$K(B
991 \texttt{lighttpd} $B%&%'%V%5!<%P$NMxMQ$r$*A&$a$7$^$9!#(B
992 Apache $B%&%'%V%5!<%P$N@_Dj$O!"(B
993 $B6E$C$F$$$F3n$D$o$+$j$K$/$$$H$$$&I>H=$K8+9g$&$b$N$,$"$j$^$9!#(B
994 \texttt{lighttpd} $B$O(B Apache $B%&%'%V%5!<%PDx$N5!G=$OL5$$$b$N$N!"(B
995 $BB-$j$J$$5!G=$NKX$I$,(B Mercurial $B%j%]%8%H%j$N1?MQ$K$O4X78$J$$$b$N$G$9!#(B
996 $B$=$l$K2C$($F!"(B
997 $BL@$i$+$K(B \texttt{lighttpd} $B$O(B
998 Apache $B%&%'%V%5!<%P$h$j$b4JC1$KMxMQ$,3+;O$G$-$^$9!#(B
1000 \subsection{Basic CGI configuration}
1002 Unix $BE*$J%7%9%F%`$rMxMQ$7$F$$$k>l9g!"(B
1003 $B%&%'%V%Z!<%8$H$7$F8x3+$9$k$?$a$N(B
1004 \dirname{public\_html} $B$N$h$&$J%G%#%l%/%H%j$r!"(B
1005 $B%[!<%`%G%#%l%/%H%jG[2<$K;}$D$N$,6&DLG'<1$H$J$C$F$$$^$9!#(B
1006 $B$3$N%G%#%l%/%H%jD>2<$KCV$$$?(B
1007 \filename{foo} $B$H$$$&L>A0$N%U%!%$%k$O!"(B
1008 \texttt{http://www.example.com/\~username/foo} $B$H$$$&(B
1009 URL $B$G;2>H2DG=$K$J$j$^$9!#(B
1011 $B@_Dj$r;O$a$k$KEv$?$C$F!"(B
1012 Mercurial $B$N%$%s%9%H!<%k@h$K3JG<$5$l$F$$$k(B
1013 \sfilename{hgweb.cgi} $B%9%/%j%W%H$N=j:_$r3NG'$7$F$/$@$5$$!#(B
1014 $B%7%9%F%`>e$N=j:_$,$9$0$K$O$o$+$i$J$+$C$?>l9g$O!"(B
1015 Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
1016 \url{http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi}
1017 $B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
1019 $B>e5-%9%/%j%W%H$r(B
1020 \dirname{public\_html} $BG[2<$KG[CV$7!"(B
1021 $B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
1023 \begin{codesample2}
1024 cp .../hgweb.cgi ~/public_html
1025 chmod 755 ~/public_html/hgweb.cgi
1026 \end{codesample2}
1028 \command{chmod} $B%3%^%s%I$X$N(B \texttt{755} $B0z?t;XDj$O!"(B
1029 $B%9%/%j%W%H$K<B9T2DG=8"8B$rIUM?$9$k0J>e$NIU2CE*$J;XDj$r0UL#$7$^$9!#(B
1030 $B$3$N@_Dj$K$h$j!"%9%/%j%W%H$,C/$+$i$b<B9T2DG=$K$J$k$HF1;~$K!"(B
1031 ``group'' $B$*$h$S(B ``other'' $B$K$h$k=q$-9~$_8"8B$,(B\emph{$BGmC%(B}$B$5$l$^$9!#(B
1032 $B$3$l$i$N=q$-9~$_8"8B$rM-8z$J$^$^$K$7$?>l9g!"(B
1033 Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
1034 $B$*$=$i$/%9%/%j%W%H$N<B9T$r5qH]$9$k$G$7$g$&!#(B
1035 $B<B$N$H$3$m(B \texttt{suexec} $B$O!"(B
1036 $B%9%/%j%W%H$,G[CV$5$l$F$$$k(B\emph{$B%G%#%l%/%H%j(B}$B$KBP$9$k(B
1037 ``group'' $B$*$h$S(B ``other'' $B$K$h$k=q$-9~$_8"8B$,GmC%$5$l$F$$$k$3$H$bMW5a$7$^$9!#(B
1039 \begin{codesample2}
1040 chmod 755 ~/public_html
1041 \end{codesample2}
1043 \subsubsection{What could \emph{possibly} go wrong?}
1044 \label{sec:collab:wtf}
1046 CGI $B$rG[CV$7$?$J$i$P!"(B
1047 $B%&%'%V%V%i%&%6$r5/F0$7$F(B
1048 \url{http://myhostname/~myuser/hgweb.cgi} $B$KAjEv$9$k(B
1049 URL $B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
1050 $BC"$7!"$A$g$C$H$7$?<:GT$K$O(B\emph{$B?H9=$($F$*$$$F$/$@$5$$(B}$B!#(B
1051 $B=jK>$N(B URL $B$X$N%"%/%;%9$,<:GT$9$k8x;;$OHs>o$K9b$/!"(B
1052 $B$=$NM}M3$OB?4t$KEO$j$^$9!#(B
1053 $B<B:]$N$H$3$m!"(B
1054 $B0J2<$N5/$3$jF@$k%(%i!<MW0x$NA4$F$Gm5$/2DG=@-$,$"$j$^$9$+$i!"(B
1055 $B$3$N@h$OCm0U?<$/FI$_?J$a$F$/$@$5$$!#(B
1056 $B0J2<$G=R$Y$kLdBj$O!"(B
1057 $B$^$C$5$i$J>uBV$+$i%$%s%9%H!<%k$7$?(B Apache $B$r;H$$!"(B
1058 $B$3$N<BNc$r9T$&$?$a$K?7$?$K@8@.$7$?%f!<%6%"%+%&%s%H$G!"(B
1059 Fedora~7 $B>e$G:n6H$r<B;\$7$?:]$K!"(B
1060 $BI.<T$,<B:]$KD>LL$7$?A4$F$NLdBj$G$9!#(B
1062 $B;HMQ$7$F$$$k%&%'%V%5!<%P$O!"(B
1063 $B%f!<%6Kh$N%G%#%l%/%H%j$rL58z2=$7$F$$$k$+$b$7$l$^$;$s!#(B
1064 Apache $B$r;HMQ$7$F$$$k>l9g$O!"(B
1065 $B@_Dj%U%!%$%kCf$K(B \texttt{UserDir} $B;XDj$NM-L5$r3NG'$7$F$/$@$5$$!#(B
1066 $B$3$N;XDj$,L5$$>l9g!"%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
1067 $B;XDj$,M-$C$F$b(B\texttt{$BL58z2=$5$l$F$$$k(B}$B>l9g$b!"(B
1068 $B%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
1069 $BM-8z$J(B \texttt{UserDir} $B;XDj$,$"$k>l9g!"(B
1070 \texttt{UserDir} $B;XDj$G5-=R$5$l$F$$$kJ8;zNs(B
1071 $B!JNc$($P(B \dirname{public\_html}$B!K$,!"(B
1072 $B%[!<%`%G%#%l%/%H%jD>2<$G(B Apache $B$,;2>H$9$k%5%V%G%#%l%/%H%jL>$K$J$j$^$9!#(B
1074 $B%U%!%$%k$N%"%/%;%98"8B$,87$7$9$.$k2DG=@-$b$"$j$^$9!#(B
1075 $B%&%'%V%5!<%P$O!"(B
1076 $BBP>]$H$J$k%f!<%6$N%[!<%`%G%#%l%/%H%j!"(B
1077 $B$*$h$S(B \dirname{public\_html}
1078 $BG[2<$N%U%!%$%k!&%G%#%l%/%H%j$NFI$_9~$_$,$G$-$J$1$l$P$J$j$^$;$s!#(B
1079 $BE,@Z$J8"8B@_Dj$r9T$&$?$a$N4JC1$J<j=g$r0J2<$K<($7$^$9!#(B
1081 \begin{codesample2}
1082 chmod 755 ~
1083 find ~/public_html -type d -print0 | xargs -0r chmod 755
1084 find ~/public_html -type f -print0 | xargs -0r chmod 644
1085 \end{codesample2}
1087 $B8"8B@_Dj$K4X$9$kB>$NMW0x$N2DG=@-$,$"$k>l9g$O!"(B
1088 $B%V%i%&%6$G$N=jK>$N(B URL $B%"%/%;%9;~$K!"(B
1089 $B40A4$K6u$N2hLL$,I=<($5$l$k$3$H$G$7$g$&!#(B
1090 $B$3$N>l9g$O!"$*$=$i$/%"%/%;%98"8B$,(B\emph{$B4K$9$.$k(B}$B$N$G$7$g$&!#(B
1091 $BNc$($P(B Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
1092 group $B$J$$$7(B other $B$K=q$-9~$_8"8B$,IUM?$5$l$?%9%/%j%W%H$O<B9T$7$^$;$s!#(B
1094 $B;HMQ$7$F$$$k%&%'%V%5!<%P$,!"(B
1095 $B%f!<%6Kh%G%#%l%/%H%jG[2<$N(B CGI $B%W%m%0%i%`$N<B9T$r!"(B
1096 $B6X;_$9$k$h$&$K@_Dj$5$l$F$$$k2DG=@-$bM-$j$^$9!#(B
1097 $BI.<T$N(B Fedora~7 $B%7%9%F%`$K$*$1$k(B Apache $B$N!"(B
1098 $B=i4|>uBV$N%f!<%6Kh@_Dj$r0J2<$K<($7$^$9!#(B
1100 \begin{codesample2}
1101 <Directory /home/*/public_html>
1102 AllowOverride FileInfo AuthConfig Limit
1103 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
1104 <Limit GET POST OPTIONS>
1105 Order allow,deny
1106 Allow from all
1107 </Limit>
1108 <LimitExcept GET POST OPTIONS>
1109 Order deny,allow
1110 Deny from all
1111 </LimitExcept>
1112 </Directory>
1113 \end{codesample2}
1115 $BBP>]$H$J$k(B Apache $B@_Dj%U%!%$%kCf$K;w$?$h$&$J(B
1116 \texttt{Directory} $B@_Dj$,$"$k>l9g!"(B
1117 \texttt{Options} $B;XDj$KCmL\$7$F$/$@$5$$!#(B
1118 \texttt{ExecCGI} $B$,;XDj$5$l$F$$$J$$>l9g$O0lMwKvHx$K$3$l$rDI2C$7!"(B
1119 $B%&%'%V%5!<%P$r:F5/F0$7$F$/$@$5$$!#(B
1121 Apache $B$,(B CGI $B$r<B9T$9$k$N$G$O$J$/!"(B
1122 CGI $B%9%/%j%W%H$NFbMF$=$N$b$N$rJV5Q$7$F$-$?>l9g$O!"(B
1123 $B0J2<$N5-=R$r!J4{$K5-=R$,$"$k$J$i$P!KM-8z2=$9$k$J$jDI2C$9$k$J$j$7$F$/$@$5$$!#(B
1125 \begin{codesample2}
1126 AddHandler cgi-script .cgi
1127 \end{codesample2}
1129 $B<!$KLdBj$NH/@8$7F@$k%1!<%9$G$O!"(B
1130 Python $B$N%P%C%/%H%l!<%9$,I=<($5$l!"(B
1131 \texttt{mercurial} $B4XO"%b%8%e!<%k$,%$%s%]!<%H(B
1132 $B!J(Bimport$B!K$G$-$J$$;]$rEA$($F$$$k$3$H$G$7$g$&!#(B
1133 $B=jK>$N7k2L$OF@$i$l$F$$$^$;$s$,!"(B
1134 $B%&%'%V%5!<%P$O(B CGI $B%9%/%j%W%H$N<B9T$r9T$&$h$&$K$J$C$?$N$G!"(B
1135 $B@hDx$N>uBV$+$i$OA0?J$7$F$$$^$9!*(B
1136 $B%$%s%]!<%H$,$G$-$J$$;]$N%(%i!<$O!"(B
1137 $B%7%9%F%`%o%$%I$GMxMQ2DG=$J(B Mercurial $B$G$O$J$/!"(B
1138 $B$*$=$i$/8D?ME*$K%$%s%9%H!<%k$7$?(B Mercurial
1139 $B$r<B9T$7$F$$$k>l9g$K$N$_H/@8$7$^$9!#(B
1140 $B%&%'%V%5!<%P$,(B CGI $B%W%m%0%i%`$r<B9T$9$k>l9g!"(B
1141 $B3F8D?M$NBPOCE*%m%0%$%s%;%C%7%g%s$G<B;\$5$l$F$$$k4D6-JQ?t;XDj$,L5$$!"(B
1142 $B$H$$$&$3$H$rK:$l$J$$$G$/$@$5$$!#(B
1143 $B$3$N%(%i!<$,H/@8$7$?>l9g$O!"(B
1144 \envar{PYTHONPATH} $B4D6-JQ?t@_Dj$,E,@Z$K$J$k$h$&$K(B
1145 \sfilename{hgweb.cgi} $B$N5-=R$rJT=8$7$F$/$@$5$$!#(B
1147 $B:G=*E*$K!"(B
1148 \dirname{/path/to/repository} $B$,8+$D$+$i$J$$;]$rEA$($k(B
1149 Python $B$N%P%C%/%H%l!<%9$,(B\emph{$B3N<B$K(B}$BI=<($5$l$k$3$H$G$7$g$&!#(B
1150 \sfilename{hgweb.cgi} $B%9%/%j%W%H$rJT=8$7$F!"(B
1151 $BJ8;zNs(B \dirname{/path/to/repository}
1152 $B$r<B:]$K8x3+$7$?$$%j%]%8%H%j$X$N@dBP%Q%9$GCV$-49$($F$/$@$5$$!#(B
1154 $B$3$3$^$GMh$l$P!"(B
1155 $B%&%'%V%V%i%&%6$G%Z!<%8$r%j%m!<%I$7$?:]$K!"(B
1156 $Be:No$K(B HTML $B$G@07A$5$l$?%j%]%8%H%jMzNr$NI=<($r8+$k$3$H$,$G$-$kH&$G$9!#(B
1157 $B$*Hh$lMM$G$9!#(B
1159 \subsubsection{Configuring lighttpd}
1161 $BE0DlE*$K<B83$9$k$?$a$K!"(B
1162 $B$3$l$^$G(B Apache $B$K4X$7$F@bL@$7$?$N$HF1MM$K!"(B
1163 $B6aG/?M5$$,9b$^$C$F$$$k(B \texttt{lighttpd} $B%&%'%V%5!<%P$G!"(B
1164 $BF1$8%j%]%8%H%j$r8x3+$9$k$?$a$N@_Dj5-=R$KD)@o$7$F$_$^$7$?!#(B
1165 Apache $B$K$D$$$F$3$l$^$G35@b$7$F$-$?A4$F$NLdBj$O4{$K9nI~:Q$_$G$9$7!"(B
1166 $B$=$NKX$I$O%&%'%V%5!<%P<BAu$K0MB8$7$^$;$s!#(B
1167 $B7k2L$H$7$F!"(B
1168 $B%U%!%$%k!&%G%#%l%/%H%j$N8"8B@_Dj$,BEEv$G$"$k$3$H$H!"(B
1169 \sfilename{hgweb.cgi} $B%9%/%j%W%H$,E,@Z$K2~JQ:Q$_$G$"$k$3$H$O!"(B
1170 $B$"$kDxEY3N?.$G$-$^$9!#(B
1172 $B0lC6(B Apache $B$G$N8x3+$K@.8y$7$F$$$l$P!"(B
1173 \texttt{lighttpd} $B$G$N%j%]%8%H%j8x3+$O4JC1(B
1174 $B!J8@$$49$($k$J$i!"(B
1175 \texttt{lighttpd} $B$r;HMQ$9$k>l9g$G$b!"(B
1176 $BA0=R$N(B Apache $B$K4X$9$k@bL@$rFI$`$Y$-$H8@$($^$9(B
1177 $B!K$G$9!#(B
1178 $B=i4|>uBV$G(B
1179 \texttt{mod\_cgi} $B$*$h$S(B \texttt{mod\_userdir} $B$,L58z2=$5$l$F$$$?>l9g!"(B
1180 $B$3$l$i$rM-8z2=$9$k$?$a$K!"(B
1181 $B$^$:$O!"(B
1182 $B@_Dj%U%!%$%k$N(B \texttt{mod\_access} $B%;%/%7%g%s$rJT=8$9$kI,MW$,$"$j$^$9!#(B
1183 $B$=$N8e!"$3$l$i$N%b%8%e!<%k$r@_Dj$9$k$?$a$K!"(B
1184 $B@_Dj%U%!%$%kKvHx$K?t9T$[$IDI2C$7$^$9!#(B
1186 \begin{codesample2}
1187 userdir.path = "public_html"
1188 cgi.assign = ( ".cgi" => "" )
1189 \end{codesample2}
1191 $B$3$N5-=R$K$h$j!"(B
1192 \texttt{lighttpd} $B$O%f!<%6Kh$N%G%#%l%/%H%j$*$h$S(B CGI $B$rG'<1$7$^$9!#(B
1193 Apache $B$h$j$bA0$K(B
1194 \texttt{lighttpd} $B$N@_Dj$r$7$?$H$7$?$i!"(B
1195 $BKX$I4V0c$$$J$/!"(B
1196 Apache
1197 $B$N@_Dj$N:]$K7P83$7$?$N$HF1$8%7%9%F%`%l%Y%k$N@_Dj%_%9$rHH$7$?$3$H$G$7$g$&!#(B
1198 $B$7$+$7(B
1199 Apache $B$N;HMQ7P83$,#1#0G/0J>e$"$j!"(B
1200 $B3n$D=i$a$F$N(B \texttt{lighttpd} $B;HMQ$G$O$"$k$b$N$N!"(B
1201 Apache $B$N@_Dj$h$j$b(B \texttt{lighttpd} $B$N$=$l$OCx$7$/MF0W$G$"$k$H;W$o$l$^$9!#(B
1203 \subsection{Sharing multiple repositories with one CGI script}
1205 $BC10l$N%j%]%8%H%j$N$_$7$+8x3+$G$-$J$$$H$$$&$N$O!"(B
1206 \sfilename{hgweb.cgi} $B%9%/%j%W%H$NG:$^$7$$@)Ls$G$9!#(B
1207 $BF1$8%9%/%j%W%H(B\footnote{$BLuCm(B: $B87L)$K$O!"(B
1208 $B8x3+BP>]%j%]%8%H%j$N%Q%9$,0[$J$k$N$G$9$,!"(B
1209 $B35$M!VF1$8!W$H8@$C$FNI$$$G$7$g$&!#(B
1210 }$B$r0[$J$kL>A0$GJ#@=$9$k!"(B
1211 $B$H$$$&LLE]$JJ}K!$h$j$O!"(B
1212 \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$N;HMQ$,$*A&$a$G$9!#(B
1214 \sfilename{hgwebdir.cgi} $B$N@_Dj<j=g$O!"(B
1215 \sfilename{hgweb.cgi} $B$h$j$bB?>/9~$_F~$C$F$$$^$9!#(B
1216 $B$^$:;O$a$K(B
1217 $B%9%/%j%W%H$N%3%T!<$rF~<j$7$^$9!#(B
1218 $B<j6a$KL5$$>l9g$O(B
1219 Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
1220 \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}
1221 $B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
1223 \dirname{public\_html} $BG[2<$K>e5-%9%/%j%W%H$rG[CV$7!"(B
1224 $B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
1226 \begin{codesample2}
1227 cp .../hgwebdir.cgi ~/public_html
1228 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
1229 \end{codesample2}
1231 $B4pK\E*$J@_Dj$,:Q$s$@$J$i!"(B
1232 $B%V%i%&%6$G(B \url{http://myhostname/~myuser/hgwebdir.cgi}
1233 $B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
1234 $B6u$N%j%]%8%H%j%j%9%H$,I=<($5$l$kH&$G$9!#(B
1235 $B2?$bI=<($5$l$J$$$+!"%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g$O!"(B
1236 \ref{sec:collab:wtf}~$B@a$G@bL@$7$?@x:_E*LdBj0lMw$r0lDL$j3NG'$7$F$/$@$5$$!#(B
1238 \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O30It@_Dj%U%!%$%k$rI,MW$H$7$^$9!#(B
1239 $B4pDl>uBV$N(B
1240 \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O!"(B
1241 $B<+?H$HF1$8%G%#%l%/%H%j$K3JG<$5$l$?(B
1242 \sfilename{hgweb.config} $B%U%!%$%k$rFI$_9~$b$&$H$7$^$9!#(B
1243 $B$3$N%U%!%$%k$r@8@.$7!"(B
1244 $BC/$KBP$7$F$bFI$_=P$78"8B$rIUM?$7$J$1$l$P$J$j$^$;$s!#(B
1245 $B$3$N%U%!%$%k$N5-=R7A<0$O!"(B
1246 Windows $B$K$*$1$k(B ``ini'' $B%U%!%$%k$N$=$l$HF1$8$G!"(B
1247 Python $B$N(B
1248 \texttt{ConfigParser}~\cite{web:configparser}
1249 $B$K$h$j2r@O2DG=$J7A<0$G$9!#(B
1251 $B:G$b4JC1$K(B \sfilename{hgwebdir.cgi} $B$r@_Dj$9$k$K$O!"(B
1252 \texttt{collections} $B$H$$$&L>A0$N%;%/%7%g%s$r@_Dj$7$F$/$@$5$$!#(B
1253 $B$3$N%;%/%7%g%s$r5-=R$9$k$3$H$G!"(B
1254 $BL>IU$1$?%G%#%l%/%H%jG[2<$N(B\emph{$BA4$F$N(B}$B%j%]%8%H%j$r<+F0E*$K8x3+$7$^$9!#(B
1255 $B$3$N%;%/%7%g%s$N5-=R$O0J2<$N$h$&$K$J$j$^$9!#(B
1257 \begin{codesample2}
1258 [collections]
1259 /my/root = /my/root
1260 \end{codesample2}
1262 Mercurial $B$O$3$N5-=R$r2r<a$9$k$KEv$?$j!"(B
1263 ``\texttt{=}''
1264 $B5-9f$N(B\emph{$B1&JU(B}$B$K5-=R$5$l$?%G%#%l%/%H%j3,AX2<$G%j%]%8%H%j$rC5$7!"(B
1265 ``\texttt{=}'' $B5-9f$N(B\emph{$B:8JU(B}$B$N%F%-%9%H$K9gCW$9$kItJ,$r!"(B
1266 $B%&%'%V%$%s%?%U%'!<%9$G$N0lMwI=<($G<B:]$K8x3+$5$l$kL>A0$+$i=|30$7$^$9!#(B
1267 $B=|30=hM}$N8e$K;D$C$?%Q%9MWAG$O!"(B``$B2>A[%Q%9(B''$B$H8F$P$l$^$9!#(B
1269 $BNc$H$7$F(B
1270 \dirname{/my/root/this/repo} $B$K%j%]%8%H%j$,$"$k$H$7$?>l9g!"(B
1271 CGI $B%9%/%j%W%H$OKAF,$N(B
1272 \dirname{/my/root} $BItJ,$rL>A0$+$i=|30$7!"(B
1273 $B2>A[%Q%9$H$7$F(B \dirname{this/repo} $B$r;}$D%j%]%8%H%j$H$7$F8x3+$7$^$9!#(B
1274 CGI $B%9%/%j%W%H$N4pDl(B URL $B$r(B
1275 \url{http://myhostname/~myuser/hgwebdir.cgi} $B$H$9$k$H!"(B
1276 $B$3$N%j%]%8%H%j$N40A4$J(B URL $B$O!"(B
1277 \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo} $B$H$J$j$^$9!#(B
1279 $B$3$N@_Dj5-=RNc$G$N:8JU$r(B \dirname{/my/root} $B$+$i(B
1280 \dirname{/my} $B$KJQ99$7$?>l9g!"(B
1281 \sfilename{hgwebdir.cgi} $B$O%j%]%8%H%jL>$+$i(B
1282 \dirname{/my} $B$N$_$r#z#yJb30$9$k$N$G!"(B
1283 $B2>A[%Q%9$O(B \dirname{this/repo} $B$G$O$J$/(B
1284 \dirname{root/this/repo} $B$H$J$j$^$9!#(B
1286 \sfilename{hgwebdir.cgi} $B$O!"(B
1287 $B@_Dj%U%!%$%kCf$N(B \texttt{collections}
1288 $B%;%/%7%g%s$GNs5s$5$l$?8D!9$N%G%#%l%/%H%j$KBP$7$F!"(B
1289 $B:F5"E*$K%j%]%8%H%j$rC5$7$^$9$,!"(B
1290 $B8+$D$+$C$?%j%]%8%H%j$+$i99$K2<$X$N:F5"E*C5:w$O(B\texttt{$B9T$$$^$;$s(B}$B!#(B
1292 \texttt{collections} $B$N5!9=$O!"(B
1293 $BB?$/$N%j%]%8%H%j$r(B``fire and forget''$B:nK!$G8x3+$9$k$N$KE,$7$F$$$^$9!#(B
1294 CGI $B$d@_Dj%U%!%$%k$N5-=R$O0lEY$G;vB-$j$^$9!#(B
1295 $B@_Dj$,:Q$s$@$J$i!"(B
1296 \sfilename{hgwebdir.cgi}
1297 $B$KC5:w$r;X<($7$?%G%#%l%/%H%j3,AXG[2<$H$N4V$G%j%]%8%H%j$N0\F0$r9T$&$@$1$G!"(B
1298 $B%j%]%8%H%j$N8x3+!&Hs8x3+$rG$0U$N;~E@$G9T$&$3$H$,$G$-$^$9!#(B
1300 \subsubsection{Explicitly specifying which repositories to publish}
1302 \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O(B
1303 \texttt{collections} $B$K$h$k8x3+$N;EAH$_$K2C$($F!"(B
1304 $BFCDj$N0lMw;XDj$K$h$k%j%]%8%H%j8x3+$r$9$k$3$H$b$G$-$^$9!#(B
1305 $B$3$NJ}K!$G$N8x3+$r$9$k$K$O!"(B
1306 $B0J2<$N$h$&$J7A<0$NFbMF$r;}$D(B
1307 \texttt{paths} $B%;%/%7%g%s$r5-=R$9$kI,MW$,$"$j$^$9!#(B
1309 \begin{codesample2}
1310 [paths]
1311 repo1 = /my/path/to/some/repo
1312 repo2 = /some/path/to/another
1313 \end{codesample2}
1315 $B>e5-$NNc$G$O!"8D!9$NDj5A$N:8JU$,2>A[%Q%9!J(BURL $BCf$K8=$l$k%Q%9MWAG!K!"(B
1316 $B1&JU$,%j%]%8%H%j$X$N%Q%9$H$J$j$^$9!#(B
1317 $B2>A[%Q%9$N;XDj$H!"(B
1318 $B%U%!%$%k%7%9%F%`>e$N%j%]%8%H%j0LCV$K$O!"(B
1319 $B2?$N4XO"@-$bL5$$E@$KCm0U$7$F$/$@$5$$!#(B
1321 $BC10l$N@_Dj%U%!%$%kCf$G(B
1322 \texttt{collections} $B$H(B
1323 \texttt{paths} $B$NN>J}$rF1;~$K;HMQ$9$k$3$H$b2DG=$G$9!#(B
1325 \begin{note}
1326 $BF10l$N2>A[%Q%9$KJ#?t$N%j%]%8%H%j$,4XO"IU$1$i$l$F$$$k>l9g!"(B
1327 \sfilename{hgwebdir.cgi} $B$O%(%i!<$rDLCN$7$^$;$s!#(B
1328 $B$=$NBe$o$j$K!"(B
1329 \sfilename{hgwebdir.cgi} $B$N?6$kIq$$$OM=A[$G$-$J$$$b$N$H$J$j$^$9!#(B
1330 \end{note}
1332 \subsection{Downloading source archives}
1334 Mercurial $B$N%&%'%V%$%s%?%U%'!<%97PM3$G!"(B
1335 $BG$0U$N%j%S%8%g%s$N%"!<%+%$%V$r%@%&%s%m!<%I$9$k$3$H$,2DG=$G$9!#(B
1336 $B$3$N%"!<%+%$%V$K$O!"(B
1337 $BEv3:%j%S%8%g%s$K$*$1$k:n6HNN0h%G%#%l%/%H%j$N%9%J%C%W%7%g%C%H$,3JG<$5$l$^$9$,!"(B
1338 $B%j%]%8%H%j%G!<%?ItJ,$O4^$^$l$^$;$s!#(B
1340 $B$3$N5!G=$O4{Dj>uBV$G$OL58z2=$5$l$F$$$^$9!#(B
1341 $B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
1342 \rcitem{web}{allow\_archive} $B9`L\$r(B
1343 \hgrc $B%U%!%$%k$N(B \rcsection{web} $B%;%/%7%g%s$KDI2C$7$F$/$@$5$$(B\footnote{$BLuCm(B:
1344 $B$3$N$3$H$+$i!"(B
1345 $B%"!<%+%$%V%@%&%s%m!<%I$NM-8z2=!&L58z2=@_Dj$,!"(B
1346 \sfilename{hgwebdir.cgi} $BC10L$G$O$J$/!"(B
1347 $B%j%]%8%H%jC10L$G$N@_Dj$G$"$k$3$H$,$o$+$j$^$9!#(B}$B!#(B
1349 \subsection{Web configuration options}
1351 Mercurial $B$N%&%'%V%$%s%?%U%'!<%9(B
1352 $B!J(B\hgcmd{serve} $B%3%^%s%I$*$h$S(B
1353 \sfilename{hgweb.cgi} $B$J$$$7(B \sfilename{hgwebdir.cgi} $B%9%/%j%W%H!K(B
1354 $B$K$OJQ992DG=$J@_Dj9`L\$,B??t$"$j$^$9!#(B
1355 $B$3$l$i$N@_Dj9`L\$O(B
1356 \rcsection{web} $B%;%/%7%g%s$KB0$7$F$$$^$9!#(B
1358 \begin{description}
1360 \item[\rcitem{web}{allow\_archive}]
1361 Mercurial $B$N%"!<%+%$%V%@%&%s%m!<%I5!G=$rM-8z2=$9$k$+H]$+$r;XDj!#(B
1362 $B$3$N5!G=$rM-8z2=$7$?>l9g%&%'%V%$%s%?%U%'!<%9$NMxMQ<T$O!"(B
1363 $B%j%]%8%H%jCf$N;2>H2DG=$JG$0U$N%j%S%8%g%s$N%"!<%+%$%V$r%@%&%s%m!<%I$G$-$^$9!#(B
1364 $B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
1365 $B0J2<$KNs5s$5$l$k%-!<%o!<%I$NJB$S$r(B
1366 \rcitem{web}{allow\_archive} $B9`L\$K;XDj$9$kI,MW$,$"$j$^$9!#(B
1368 \begin{description}
1369 \item[\texttt{bz2}] \texttt{bzip2} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
1370 $B$3$N7A<0$O:G$b9b$$05=LN($rF@$i$l$^$9$,!"(B
1371 $B%5!<%PB&$N(B CPU $B$r:G$b9s;H$7$^$9!#(B
1373 \item[\texttt{gz}] \texttt{gzip} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
1375 \item[\texttt{zip}] LZW $B05=L$5$l$?(B \command{zip} $B%"!<%+%$%V7A<0!#(B
1376 $B$3$N7A<0$O05=LN($,:G$bNt$j$^$9$,!"(BWindows $B4D6-$G$O9-$/;HMQ$5$l$F$$$^$9!#(B
1378 \end{description}
1380 $BCM$r;XDj$7$J$+$C$?$j!"(B
1381 \rcitem{web}{allow\_archive} $B9`L\$=$N$b$N$r;XDj$7$J$+$C$?>l9g!"(B
1382 $B%"!<%+%$%V%@%&%s%m!<%I5!G=$OL58z2=$5$l$^$9!#(B
1383 $BMxMQ2DG=$JA4$F$N%"!<%+%$%V7A<0$rM-8z2=$9$k5-=RNc$r0J2<$K<($7$^$9!#(B
1385 \begin{codesample4}
1386 [web]
1387 allow_archive = bz2 gz zip
1388 \end{codesample4}
1390 \item[\rcitem{web}{allowpull}]
1391 $B%&%'%V%$%s%?%U%'!<%97PM3$G$N(B HTTP $B1[$7$N(B
1392 \hgcmd{pull} $B$*$h$S(B \hgcmd{clone} $B$r5v2D$9$k$+H]$+$r;XDj$9$k??56CM!#(B
1393 \texttt{no} $B$J$$$7(B \texttt{false} $B$,;XDj$5$l$?>l9g!"(B
1394 $B%&%'%V%$%s%?%U%'!<%9$N(B``$B?M4V8~$1(B''$BItJ,$N$_$,M-8z2=$5$l$^$9!#(B
1396 \item[\rcitem{web}{contact}]
1397 $B%j%]%8%H%j$N4IM}$r9T$&?MJ*!&AH?%$rFCDj$9$k$?$a$NG$0U$N(B
1398 $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
1399 $BDL>o$3$NCM$O!"4IM}<T$J$$$7%a!<%j%s%0%j%9%H$NL>A0$HEE;R%a!<%k%"%I%l%9$G$9!#(B
1400 $BB?$/$N>l9g!"(B
1401 $B$3$N>pJs$O%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B%U%!%$%k$K5-=R$7$^$9$,!"(B
1402 $BA4$F$N%j%]%8%H%j$,F10l$NJ]<iC4Ev$K$h$jJ]<i$5$l$F$$$k>l9g!"(B
1403 $BBg0hE*$J(B \hgrc $B%U%!%$%k$K5-=R$9$k$N$bNI$$$G$7$g$&!#(B
1405 \item[\rcitem{web}{maxchanges}]
1406 $B%Z!<%8Kh$KI=<($5$l$k%A%'%s%8%;%C%H$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
1408 \item[\rcitem{web}{maxfiles}]
1409 $B%Z!<%8Kh$KI=<($5$l$kJQ99%U%!%$%k$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
1411 \item[\rcitem{web}{stripes}]
1412 $B%F!<%V%kI=<($K$*$1$k2DFI@-8~>e$N$?$a$K!"(B
1413 $B3F9T$N?'$r8_$$0c$$$K(B``$B<JLOMM(B''$B$H$9$k:]$K!"(B
1414 $B2?9TKh$K?'$rJQ99$9$k$+$N?tCM!#(B
1416 \item[\rcitem{web}{style}]
1417 Mercurial $B$,%&%'%V%$%s%?%U%'!<%9$rI=<($9$k:]$K;HMQ$9$k%F%s%W%l!<%H!#(B
1418 Mercurial $B$O(B \texttt{default} $B$*$h$S(B
1419 \texttt{gitweb} $B$N#2$D$N%&%'%V%$%s%?%U%'!<%9MQ%F%s%W%l!<%H$rF1:-$7$F$$$^$9(B
1420 $B!J8e<T$NJ}$,8+1I$($,NI$$$G$9!K!#(B
1421 $B<+A0$G%+%9%?%^%$%:$7$?%F%s%W%l!<%H$r;XDj$9$k$3$H$b$G$-$^$9!#(B
1422 $B>\:Y$O(B\ref{chap:template}~$B@a$r;2>H$7$F$/$@$5$$!#(B
1423 \texttt{gitweb} $B%9%?%$%k$NMxMQJ}K!$r0J2<$K<($7$^$9!#(B
1425 \begin{codesample4}
1426 [web]
1427 style = gitweb
1428 \end{codesample4}
1430 \item[\rcitem{web}{templates}]
1431 $B%F%s%W%l!<%H%U%!%$%k$N;2>H@h%G%#%l%/%H%j$r<($9%Q%9!#(B
1432 Mercurial $B$N4{DjCM$G$O!"%$%s%9%H!<%k@h%G%#%l%/%H%j$r;2>H$7$^$9!#(B
1434 \end{description}
1436 \sfilename{hgwebdir.cgi} $B$r;HMQ$9$k>l9g!"(B
1437 $B4v$D$+$N@_Dj9`L\$K4X$7$F$OMxJX@->e!"(B
1438 \hgrc $B%U%!%$%k$K5-=R$9$kBe$o$j$K!"(B
1439 \sfilename{hgweb.config} $B%U%!%$%k$N(B
1440 \rcsection{web} $B%;%/%7%g%s$K5-=R$9$k$3$H$,$G$-$^$9!#(B
1441 $B5-=R2DG=$J@_Dj9`L\$O!"(B
1442 \rcitem{web}{motd} $B$*$h$S(B \rcitem{web}{style} $B$G$9!#(B
1444 \subsubsection{Options specific to an individual repository}
1446 $B%f!<%6Kh$J$$$7Bg0hE*$J(B \hgrc $B%U%!%$%k$G$O$J$/!"(B
1447 $B%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B$G5-=R$9$Y$-(B
1448 \rcsection{web} $B%;%/%7%g%s$N@_Dj9`L\$,4v$D$+$"$j$^$9!#(B
1450 \begin{description}
1451 \item[\rcitem{web}{description}]
1452 $B%j%]%8%H%j$NFbMF$J$$$7L\E*$r5-=R$7$?G$0U$N(B
1453 $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
1455 \item[\rcitem{web}{name}]
1456 $B%&%'%V%$%s%?%U%'!<%9$K$*$1$k%j%]%8%H%j;2>HL>$r<($9J8;zNs!#(B
1457 $B$3$NCM$O!"(B
1458 $B%j%]%8%H%j$N%Q%9(B\footnote{$BLuCm(B: $B2>A[%Q%9!)(B
1459 }$B$NKvHxMWAG$rMQ$$$?4{DjL>$r>e=q$-$7$^$9!#(B
1461 \end{description}
1463 \subsubsection{Options specific to the \hgcmd{serve} command}
1465 \hgrc $B%U%!%$%k$N(B
1466 \rcsection{web} $B%;%/%7%g%s$K$*$1$k@_Dj9`L\$N4v$D$+$O!"(B
1467 \hgcmd{serve} $B%3%^%s%I@lMQ$N9`L\$G$9!#(B
1469 \begin{description}
1471 \item[\rcitem{web}{accesslog}]
1472 $B%"%/%;%9%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
1473 \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%"%/%;%9%m%0=PNO@h$O!"(B
1474 $B%U%!%$%k$G$O$J$/I8=`=PNO$G$9!#(B
1475 $B%m%0MWAG$O!"(B
1476 $BB?$/$N%&%'%V%5!<%P$K$*$$$FMxMQ$5$l$kI8=`E*$J(B``$BJ#9g(B''$B!J(Bcombined$B!K(B
1477 $B%U%!%$%k7A<0$G=PNO$5$l$^$9!#(B
1479 \item[\rcitem{web}{address}]
1480 $B30It$+$i$N@\B3$r<u$1IU$1$k%"%I%l%9$r;XDj$9$kJ8;zNs!#(B
1481 $B4pDlF0:n$G$O!"(B\hgcmd{serve} $B%3%^%s%I$OA4$F$N%"%I%l%9$G@\B3$r<u$1IU$1$^$9!#(B
1483 \item[\rcitem{web}{errorlog}]
1484 $B%(%i!<%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
1485 \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%(%i!<%m%0=PNO@h$O!"(B
1486 $B%U%!%$%k$G$O$J$/I8=`%(%i!<=PNO$G$9!#(B
1488 \item[\rcitem{web}{ipv6}]
1489 IPv6 $B%W%m%H%3%kMxMQ$NM-L5$r;XDj$9$k??56CM!#(B
1490 $B4pDlF0:n$G$O(B IPv6 $B$O%5%]!<%H$5$l$^$;$s!#(B
1492 \item[\rcitem{web}{port}]
1493 \hgcmd{serve} $B%3%^%s%I$,@\B3$r<u$1IU$1$k(B TCP $B%]!<%H$NHV9f$r;XDj$9$k?tCM!#(B
1494 $B4pDlF0:n$G$O!"(B8000 $BHV%]!<%H$,;HMQ$5$l$^$9!#(B
1496 \end{description}
1498 \subsubsection{Choosing the right \hgrc\ file to add \rcsection{web}
1499 items to}
1501 Apache $B$d(B \texttt{lighttpd} $B$N$h$&$J%&%'%V%5!<%P$O!"(B
1502 $B%j%]%8%H%j=jM-<T$H$O0[$J$k%f!<%68"8B$G2TF0$9$k2DG=@-$,$"$k!"(B
1503 $B$H$$$&E@$O=EMW$G$9$N$GK:$l$J$$$h$&$K$7$F$/$@$5$$!#(B
1504 $B%&%'%V%5!<%P$K$h$C$F5/F0$5$l$k(B
1505 \sfilename{hgweb.cgi} $B$N$h$&$J(B
1506 CGI $B%9%/%j%W%H$ODL>o!"(B
1507 $B%&%'%V%5!<%P$HF10l$N%f!<%68"8B$G2TF0$7$^$9!#(B
1509 $B8D?M$N(B \hgrc $B%U%!%$%k$K(B
1510 \rcsection{web} $B%;%/%7%g%s$r5-=R$7$F$b!"(B
1511 CGI $B%9%/%j%W%H$O$=$N@_Dj$rFI$_9~$_$^$;$s!#(B
1512 $B8D?M$N(B \hgrc $B%U%!%$%k$K5-=R$7$?@_Dj$O!"(B
1513 $BEv3:%f!<%6<+?H$G(B \hgcmd{serve}
1514 $B%3%^%s%I$r<B9T$7$?>l9g$K$N$_8zNO$rH/4x$7$^$9!#(B
1515 CGI $B%9%/%j%W%H$N5sF0$K=jK>$N@_Dj$rH?1G$9$k$K$O!"(B
1516 $B%&%'%V%5!<%P$,2TF0$5$l$k:]$N%f!<%6$N%[!<%`%G%#%l%/%H%j$K(B
1517 \hgrc $B%U%!%$%k$r:n@.$7$F=jK>$N@_Dj$r5-=R$9$k$+!"(B
1518 $B$"$k$$$O%7%9%F%`%o%$%I$J(B \hgrc $B%U%!%$%k$K=jK>$N@_Dj$rDI2C$7$F$/$@$5$$!#(B
1521 %%% Local Variables:
1522 %%% mode: latex
1523 %%% TeX-master: "00book"
1524 %%% End: