
foozy@708: \chapter{Collaborating with other people}
foozy@708: \label{cha:collab}
foozy@708: 
foozy@708: Mercurial $B$O40A4$KHsCf1{=8LsE*$J%D!<%k$G$"$k$?$a!"(B
foozy@708: $BMxMQ<TAj8_$NO"7H$K4X$7$F$O2?$i@)Ls$r2]$9$3$H$r$7$^$;$s!#(B
foozy@708: $B$G$9$,!"(B
foozy@708: $BJ,;69=@.4IM}$KFk@w$_$,L5$$$N$G$"$l$P!"(B
foozy@708: $B$$$/$D$+$N%D!<%k$d;HMQNc$rCN$C$F$*$/$3$H$O!"(B
foozy@708: $BBEEv$J:n6H<j=g$N%b%G%k$r9M$($k:]$KLr$KN)$A$^$9!#(B
foozy@708: 
foozy@708: \section{Mercurial's web interface}
foozy@708: 
foozy@708: Mercurial $B$O!"(B
foozy@708: $B$$$/$D$+$NM-MQ$J5!G=$rDs6!$9$k!"(B
foozy@708: $B6/NO$J%&%'%V%$%s%?%U%'!<%9$r;}$C$F$$$^$9!#(B
foozy@708: 
foozy@708: $BBPOCE*$JMxMQ$N>l9g!"(B
foozy@708: $B%&%'%V%$%s%?%U%'!<%97PM3$G#1$D$J$$$7J#?t$N%j%]%8%H%j$N1\Mw$,$G$-$^$9!#(B
foozy@708: $B%j%]%8%H%jMzNr$N;2>H$d!"(B
foozy@708: $B8D!9$NJQ99!J%3%_%C%H%a%C%;!<%8$d:9J,!K$N8!>Z!"(B
foozy@708: $B$*$h$S3F%G%#%l%/%H%j$d%U%!%$%k$NFbMF$N;2>H!"(B
foozy@708: $B$H$$$C$?$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $BDLCN$K4X$7$F$b!"(B
foozy@708: $B%&%'%V%$%s%?%U%'!<%9$O!"(B
foozy@708: $B%j%]%8%H%j$K$*$1$kJQ99$K4X$9$k(B RSS $BG[?.5!G=$rDs6!$7$^$9!#(B
foozy@708: $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
foozy@708: $B%j%]%8%H%j$K$*$1$k3hF0>u67$N<+F0DLCN$rB(:B$K9T$&$3$H$b$G$-$^$9!#(B
foozy@708: $B%j%]%8%H%jDs6!<TB&$K$*$1$kDI2C@_Dj$,ITMW$G$"$k$3$H$+$i!"(B
foozy@708: $BI.<T<+?H$O!"(B
foozy@708: $BJQ99DLCN$N%a!<%j%s%0%j%9%H$h$j$b!"(B
foozy@708: $B!V(BRSS $BG[?.$r9XFI!W$9$k%b%G%k$NJ}$,Hs>o$KJXMx$@$H;W$$$^$9!#(B
foozy@708: 
foozy@708: $B%&%'%V%$%s%?%U%'!<%9$K$h$j!"(B
foozy@708: $B1s3V%f!<%6$K$h$k%j%]%8%H%j$NJ#@=$dJQ99$N<h$j9~$_!"(B
foozy@708: $B$*$h$S!J%5!<%PB&$G$=$l$r5v2D$7$F$$$k$J$i$P!K(B
foozy@708: $BJQ99$N<uM}$,2DG=$K$J$j$^$9!#(B
foozy@708: Mercurial $B$N(B HTTP $B%H%s%M%j%s%0%W%m%H%3%k$G$O!"(B
foozy@708: $B@Q6KE*$K%G!<%?$N05=L$r9T$$$^$9$N$G!"(B
foozy@708: $B69$$BS0h$N%M%C%H%o!<%/@\B37PM3$G$b8zN($h$/5!G=$7$^$9!#(B
foozy@708: 
foozy@708: $B%&%'%V%$%s%?%U%'!<%9$r?($C$F$_$k:G$b4JC1$JJ}K!$O!"(B
foozy@708: Mercurial $B$N%^%9%?%j%]%8%H%j$G$"$k(B
foozy@708: \url{http://www.selenic.com/repo/hg?style=gitweb} $B$N$h$&$J!"(B
foozy@708: $B4{B8$N%j%]%8%H%j$K%&%'%V%V%i%&%6$G@\B3$7$F$_$k$3$H$G$9!#(B
foozy@708: 
foozy@708: $B<+?H$G%j%]%8%H%j$N%&%'%V%$%s%?%U%'!<%9$rDs6!$9$k$3$H$K6=L#$,$"$k>l9g!"(B
foozy@708: Mercurial $B$K$O#2$D$NA*Br;h$,$"$j$^$9!#(B
foozy@708: $B#1$D$O(B \hgcmd{serve} $B%3%^%s%I$r;HMQ$9$k$b$N$G!"(B
foozy@708: $BC;4|4V$N(B``$B7ZNL$J(B''$B2TF0$N>l9g$K:GE,$G$9!#(B
foozy@708: $B$3$N%3%^%s%I$NMxMQ$K4X$9$k>\:Y$O!"(B
foozy@708: \ref{sec:collab:serve}~$B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708: $BD94|E*3n$D>o;~MxMQ2DG=$J2TF0$rK>$`>l9g$O!"(B
foozy@708: Mercurial $B$KAH$_9~$^$l$F$$$k(B
foozy@708: CGI $B!J(BCommon Gateway Interface$B!K5!G=$,!"(B
foozy@708: $B0lHLE*$JA4$F$N%&%'%V%5!<%P$GMxMQ2DG=$G$9!#(B
foozy@708: CGI $B@_Dj$N>\:Y$O!"(B
foozy@708: \ref{sec:collab:cgi}~$B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \section{Collaboration models}
foozy@708: 
foozy@708: $BE,@Z$J=@Fp@-$r;}$D%D!<%k$r;H$&$3$H$G!"(B
foozy@708: $B:n6H<j=g$N7hDj$O!"(B
foozy@708: $B5;=QE*$JLdBj$+$iAH?%9)3XE*!J(Bsocial engineering$B!K$JLdBj$X$HJQ$o$j$^$9!#(B
foozy@708: Mercurial $B$O!"(B
foozy@708: $B%W%m%8%'%/%H$K$*$1$k:n6H<j=g$N9=@.$K4X$7$FKX$I@)8B$r2]$5$J$$$?$a!"(B
foozy@708: $B8DJL$NMWK>$K1h$C$?%b%G%k$N@_Dj$H1?MQ$OMxMQ<T<!Bh$H$J$j$^$9!#(B
foozy@708: 
foozy@708: \subsection{Factors to keep in mind}
foozy@708: 
foozy@708: $B$$$:$l$N%b%G%k$K$*$$$F$b?4F@$F$*$/$Y$-:G$b=EMW$JE@$O!"(B
foozy@708: $B$=$l$rMxMQ$9$k?M!9$NMWK>$HG=NO$K$I$l$@$1E,9g$9$k$+!"(B
foozy@708: $B$H$$$&$3$H$G$9!#(B
foozy@708: $B$3$l$O<+L@$K8+$($k$+$b$7$l$^$;$s$,!"(B
foozy@708: $B$[$s$N>/$7$N4V$G$b$3$N$3$H$rK:$l$F$O$$$1$^$;$s!#(B
foozy@708: 
foozy@708: $BI.<T$O0JA0!"40`z$H;W$($k:n6H<j=g%b%G%k$r9=C[$7$?$N$G$9$,!"(B
foozy@708: $B3+H/%A!<%`$K>/$J$+$i$LNL$N6C$-$HITOB$r$b$?$i$7$^$7$?!#(B
foozy@708: $BJ#;($J%V%i%s%A72$,I,MW$JM}M3$H!"(B
foozy@708: $B$=$l$i$N4V$K$*$1$kJQ99$N<h$j07$$$K$D$$$F@bL@$7$h$&$H;n$_$^$7$?$,!"(B
foozy@708: $B%A!<%`$N%a%s%P!<$N2??M$+$,0[$r>'$($F$-$?$N$G$9!#(B
foozy@708: $BH`$i$OAoL@$J?MC#$G$7$?$,!"(B
foozy@708: $B:n6H$K$*$1$k@)Ls$KCm0U$rJ'$&(B\footnote{$BLuCm(B: $B!V%k!<%k$r<i$k!W$N0U$+!)(B}$B$3$H$b!"(B
foozy@708: $BI.<T$,>'$($k%b%G%k$N:YIt$K$*$1$k@)Ls$N=EMW@-$K8~$-9g$*$&$H$b$7$^$;$s$G$7$?!#(B
foozy@708: 
foozy@708: $B6a$$>-Mh$N<R2qE*!&5;=QE*$JLdBj$+$iL\$rGX$1$J$$$G$/$@$5$$!#(B
foozy@708: $B$I$s$J7W2h$r<B;\$7$h$&$H$b!"(B
foozy@708: $B4V0c$$$dLdBj$,H/@8$7$?>l9g$KHw$($k$Y$-$G$9!#(B
foozy@708: $BM=A[2DG=$JLdBj$KBP$7$F!"(B
foozy@708: $B<+F0E*$JKI8f$dB(;~I|5l$N$?$a$N;EAH$_$NDI2C$r9MN8$7$^$7$g$&!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B%j%j!<%98~$1$G$O$J$$JQ99$N$?$a$N%V%i%s%A$r:n@.$7$h$&$H$7$?>l9g!"(B
foozy@708: $BB>$N:n6H<T$,%j%j!<%9MQ%V%i%s%A$K$&$C$+$j%^!<%8$7$F$7$^$&2DG=@-$K$D$$$F!"(B
foozy@708: $BAa$$;~E@$G9MN8$7$?$[$&$,NI$$$G$7$g$&!#(B
foozy@708: $BITE,@Z$J%V%i%s%A$+$i%A%'%s%8%;%C%H$r%^!<%8$5$;$J$$%U%C%/$r5-=R$9$k$3$H$G!"(B
foozy@708: $B$3$NLdBj$K4X$7$F$O2sHr2DG=$G$9!#(B
foozy@708: 
foozy@708: \subsection{Informal anarchy}
foozy@708: 
foozy@708: $B;}B32DG=@-$NE@$+$i(B
foozy@708: ``$B2?$G$b%"%j(B''$B$J$d$jJ}$O$*A&$a$7$^$;$s$,!"(B
foozy@708: $B4JC1$KGD0.$9$k$3$H$,$G$-$k%b%G%k$G$"$j!"(B
foozy@708: $B$$$/$D$+$NFC0[$J>u67$G$OHs>o$KNI$/5!G=$7$^$9!#(B
foozy@708: 
foozy@708: $B0l$D$NNc$H$7$F!"(B
foozy@708: $BB?$/$N%W%m%8%'%/%H$,!"(B
foozy@708: $BD>@\2q$&$3$H$N5)$J<e$/$^$H$^$C$?6(NO<T%0%k!<%W$r;}$F$$$k(B
foozy@708: As one example, many projects have a loose-knit group of collaborators
foozy@708: who rarely physically meet each other.  
foozy@708: $B;~@^$N(B``$BA4NO<@Av(B''$B!J(Bsprints$B!K(B\footnote{$BLuCm(B:
foozy@708: $B%*%U2q$H$+$G$9$M!#(B}$B$r@_$1$k$3$H$G!"(B
foozy@708: $B5wN%$K$h$C$F3V$F$i$l$?:n6H$KBG$A>!$D%0%k!<%W$b$"$j$^$9!#(B
foozy@708: $BA4NO<@Av$N5!2q$G$O!"(B
foozy@708: $BB?$/$N?M$,6&$KF1$8>l=j!J2q<R$N2q5D<<$d%[%F%k$N2q5D<<$NN`!K(B
foozy@708: $B$K=8$^$j!"(B
foozy@708: $B?tF|DxEY$rJD$8$3$b$C$F2a$4$7!"(B
foozy@708: $B>/NL$N%W%m%8%'%/%H$K=8Cf$7$F%O%C%-%s%0$r9T$$$^$9!#(B
foozy@708: 
foozy@708: $BA4NO<@Av$O!"(B
foozy@708: $BBg3]$+$j$J%5!<%P%$%s%U%i$rI,MW$H$7$J$$(B
foozy@708: \hgcmd{serve} $B%3%^%s%I$rMxMQ$9$k$N$K$A$g$&$INI$$5!2q$G$9!#(B
foozy@708: $B0J2<$N(B\ref{sec:collab:serve}~$B@a$rFI$`$3$H$G!"(B
foozy@708: $B$9$0$K$G$b(B \hgcmd{serve} $B$r;H$$;O$a$k$3$H$,$G$-$^$9!#(B
foozy@708: $B$=$&$7$?$J$i!"(B
foozy@708: $B<~0O$N?MC#$K%5!<%P$r<B9TCf$G$"$k$3$H$rEA$(!"(B
foozy@708: $B%$%s%9%?%s%H%a%C%;%s%8%c!<Ey$r;HMQ$7$F(B URL $B$rAw$l$P!"(B
foozy@708: $B6&F1:n6H$9$k>e$G$N@^$jJV$7COE@$^$GC)$jCe$-$^$7$?!#(B
foozy@708: $B%V%i%&%6$K65$($i$l$?(B URL $B$rF~NO$9$l$P!"(B
foozy@708: $BH`$i$O$9$0$K$G$b$"$J$?$NJQ99$r%l%S%e!<$9$k$3$H$,$G$-$^$9$7!"(B
foozy@708: $B$"$J$?$+$i%P%0%U%#%C%/%9$rF~<j$7$F$=$l$r8!>Z$7$?$j!"(B
foozy@708: $B?75!G=$,4^$^$l$k%V%i%s%A$rJ#@=$7$F$=$l$r;n$7$F$_$?$j$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B$=$N>l8B$j$N$3$N$h$&$J7A<0$G;v$r?J$a$k$3$H$NMxE@$H7gE@$O!"(B
foozy@708: $B$"$J$?$K$h$kJQ99$NB8:_$H!"$I$3$G%"%/%;%92DG=$+$rCN$k?M$@$1$,!"(B
foozy@708: $B$=$l$r;2>H$9$k$3$H$,$G$-$k!"$H$$$&E@$K$"$j$^$9!#(B
foozy@708: $B$3$N$h$&$JHs8x<0$J<jK!$O!"(B
foozy@708: $BJ#?t$N0[$J$k%j%]%8%H%j$+$i$N<h$j9~$_$,3F<+$KMW5a$5$l$k$?$a!"(B
foozy@708: $B?t?M0J>e$KBP$7$F$OC1=c$K5,LO$N3HBg$,$G$-$^$;$s!#(B
foozy@708: 
foozy@708: \subsection{A single central repository}
foozy@708: 
foozy@708: $B>.5,LO$J%W%m%8%'%/%H$K$*$$$F!"(B
foozy@708: $BCf1{=8LsE*$J9=@.4IM}%D!<%k$+$i$N0\9T$9$k:G$b4JC1$JJ}K!$O!"(B
foozy@708: $BC10l$N6&M-%j%]%8%H%j$r7PM3$7$FJQ99$N$d$j<h$j$r$9$k!"(B
foozy@708: $B$H$$$&$b$N$G$9!#(B
foozy@708: $B$3$NBN@)$O!"(B
foozy@708: $B$h$jLn?4E*$J:n6H<j=gBN7O$N$?$a$N:G$b4pK\E*$J(B``$B9=@.MWAG(B''$B$G$b$"$j$^$9!#(B
foozy@708: 
foozy@708: $B3+H/<T!J(Bcontributor$B!K$O!"(B
foozy@708: $B6&M-%j%]%8%H%j$NJ#@=$r9T$&$3$H$G:n6H$r3+;O$7$^$9!#(B
foozy@708: $BI,MW$J;~$K$$$D$G$bJQ99$N<h$j9~$_$r9T$($^$9$7!"(B
foozy@708: $B3+H/<T$N2??M$+$O!JA40w$G$b2D!K!"(B
foozy@708: $B30It$K8x3+2DG=$K$J$C$?:]$KJQ99$r6&M-%j%]%8%H%j$KH?1G$5$;$k8"8B$r;}$A$^$9!#(B
foozy@708: 
foozy@708: $B$3$N%b%G%k$G$"$C$F$b!"(B
foozy@708: $B6&M-%j%]%8%H%j$r7PM3$;$:$K$*8_$$$NJQ99$rD>@\(B \hgcmd{pull} $B$9$k$3$H$O!"(B
foozy@708: $B3+H/<T$K$H$C$F$O0U5A$N$"$k$3$H$G$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B;CDjE*$J%P%0=$@5$r9T$C$?$b$N$N!"(B
foozy@708: $B6&M-%j%]%8%H%j$K$=$N=$@5$r8x3+$7$?>l9g$K!"(B
foozy@708: $B$=$N=$@5$r<h$j9~$s$@B>$N3+H/<T$N:n6H$K;Y>c$r$-$?$962$l$,$"$k!"(B
foozy@708: $B$H$$$&>l9g$r9M$($F$_$^$7$g$&!#(B
foozy@708: $B%P%0=$@5$r4^$`<+J,$N%j%]%8%H%j$+$i0l;~E*$J%j%]%8%H%j$rJ#@=$7!"(B
foozy@708: $BJ#@=@h$G=$@5FbMF$r8!>Z$7$F$b$i$($k$h$&$KB>$N3+H/<T$K$*4j$$$9$k$3$H$G!"(B
foozy@708: $B@x:_E*$JB;32$rDc8:$9$k$3$H$,$G$-$^$9!#(B
foozy@708: $B$3$N$h$&$K$9$k$3$H$G!"(B
foozy@708: $B@x:_E*$J4m81@-$r;}$DJQ99$G$"$C$F$b!"(B
foozy@708: $B4JC1$J8!>Z$,:Q$`$^$G$O8x3+$5$l$J$$$h$&$K$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B$3$N<o$N$d$j<h$j$N>l9g$O!"(B
foozy@708: $B6&M-%j%]%8%H%j$X$N0BA4$JJQ99H?1G$N$?$a$K(B
foozy@708: \command{ssh} $B%W%m%H%3%k$r;HMQ$9$k$N$,0lHLE*$G$9(B
foozy@708: $B!J(B\ref{sec:collab:ssh}~$B@a;2>H!K!#(B
foozy@708: $BFI$_=P$7@lMQ%j%]%8%H%j$r!"(B
foozy@708: CGI $B$r;HMQ$7$F(B HTTP $B7PM3$G8x3+$9$k$3$H$b2DG=$G$9(B
foozy@708: $B!J(B\ref{sec:collab:cgi}~$B@a;2>H!K!#(B
foozy@708: $B%j%]%8%H%j$X$NJQ99H?1G$,I,MW$J$$>l9g$d!"(B
foozy@708: $B%j%]%8%H%j$NMzNr$r%&%'%V%V%i%&%67PM3$G;2>H$7$?$$>l9g$K$O!"(B
foozy@708: HTTP $B7PM3$G$N8x3+$G==J,%K!<%:$,K~$?$5$l$^$9!#(B
foozy@708: 
foozy@708: \subsection{Working with multiple branches}
foozy@708: 
foozy@708: $B0lDj0J>e$N5,LO$r;}$D%W%m%8%'%/%H$K$*$$$F$O!"(B
foozy@708: $B:n6H$N?JE8$,F1;~$KJ#?t$N!VA0@~!W$G9T$o$l$k$3$H$O<+A3$J@.$j9T$-$G$9!#(B
foozy@708: $B%=%U%H%&%'%"3+H/$N>l9g!"(B
foozy@708: $B$I$N%W%m%8%'%/%H$G$b!"(B
foozy@708: $B0lDj4|4V$4$H$K8x<0%j%j!<%9$r9T$&$N$,0lHLE*$G$9!#(B
foozy@708: $B3F%j%j!<%9$O:G=i$N8x3+$N8e$K!"(B
foozy@708: $B0lDj4|4V$N(B``$BJ]<i>uBV(B''$B!J(Bmaintenance mode$B!K$H$J$k$3$H$,$"$j$^$9!#(B
foozy@708: $BJ]<i%j%j!<%9$G$O%P%0=$@5$N$_$r07$$!"(B
foozy@708: $B?75,5!G=$K$D$$$F$O<h$j07$o$J$$$N$,DLNc$G$9!#(B
foozy@708: $B$3$l$iJ]<i%j%j!<%9$HJ?9T$7$F!"(B
foozy@708: $B!J>l9g$K$h$C$F$OJ#?t$N!K>-Mh$N%j%j!<%9$K8~$1$?3+H/$,?J9T$7$^$9!#(B
foozy@708: $BJ}8~@-$N>/$70[$J$k!"$3$l$i?J9TCf$N8D!9$N3+H/$r;X$9$N$K!"(B
foozy@708: $B0lHLE*$K(B``$B%V%i%s%A(B''$B$H$$$&I=8=$r;H$$$^$9!#(B
foozy@708: 
foozy@708: Mercurial $B$OFC$K!"(B
foozy@708: $BJ#?t$N0[$J$k%V%i%s%A$rF1;~$K4IM}$9$k$3$H$KE,$7$F$$$^$9!#(B
foozy@708: $B$=$l$>$l$N(B``$B3+H/;X8~(B''$B$4$H$K!"(B
foozy@708: $BJL!9$N6&M-MQ%j%]%8%H%j$rMQ0U$9$k$3$H$G!"(B
foozy@708: $BI,MW$K$J$kETEY!"(B
foozy@708: $B$"$k%j%]%8%H%j$+$iJL$N%j%]%8%H%j$X$N%^!<%8$r9T$($PNI$$$N$G$9!#(B
foozy@708: $B3F%j%]%8%H%j$O8_$$$KFHN)$7$F$$$^$9$+$i!"(B
foozy@708: $BC/$+$,L@<(E*$K%^!<%8$7$J$$8B$j$O(B
foozy@708: $B3+H/%V%i%s%A$K$*$1$kIT0BDj$JJQ99$,!"(B
foozy@708: $B0BDjHG$N$?$a$N%V%i%s%A$K1F6A$rM?$($k$3$H$O$"$j$^$;$s!#(B
foozy@708: 
foozy@708: $B%V%i%s%A$4$H$K%j%]%8%H%j$rMQ0U$9$k8/$jJ}$N<B:]$NNc$r0J2<$K<($7$^$9!#(B
foozy@708: $BCf1{$N%5!<%P$K(B``$B%a%$%s%V%i%s%A(B''$B$,$"$k$b$N$H$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.init}
foozy@708: 
foozy@708: $B3+H/<T$O%a%$%s%V%i%s%A$+$iJ#@=$7!"(B
foozy@708: $BJQ99!"JQ99$N%F%9%H!"%3%_%C%H$N8e$K!"(B
foozy@708: $BJQ99$r%a%$%s%V%i%s%A$N%j%]%8%H%j$KH?1G$7$^$9!#(B
foozy@708: 
foozy@708: $B%a%$%s%V%i%s%A$,%j%j!<%9$N%^%$%k%9%H!<%s$KC#$7$?$J$i$P!"(B
foozy@708: $B%^%$%k%9%H!<%s$H$J$k%j%S%8%g%s$K(B
foozy@708: \hgcmd{tag} $B%3%^%s%I$G1JB3E*$JL>A0$rIUM?$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.tag}
foozy@708: 
foozy@708: $B%a%$%s%V%i%s%A$G$O3+H/$,7QB3$7$F$$$k$H$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.main}
foozy@708: 
foozy@708: $B%j%j!<%9%^%$%k%9%H!<%s8e$NG$0U$N;~E@$G%j%]%8%H%j$rJ#@=$7$?3+H/<T$O!"(B
foozy@708: $B%j%j!<%9%^%$%k%9%H!<%s$G5-O?$5$l$?%?%0$r;H$&$3$H$G!"(B
foozy@708: $B%?%0$,IUM?$5$l$?%j%S%8%g%s$,%3%_%C%H$5$l$?;~E@$H(B
foozy@708: $B87L)$K0lCW$9$k:n6HNN0h%G%#%l%/%H%j$r(B
foozy@708: \hgcmd{update} $B%3%^%s%I$K$h$jJ#@=$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.update}
foozy@708: 
foozy@708: $B$=$l$K2C$($F!"(B
foozy@708: $B%a%$%s%V%i%s%A$G$N%?%0IU$1$N8e$G!"(B
foozy@708: $B%5!<%P>e$N%a%$%s%V%i%s%A$r!"(B
foozy@708: $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{
foozy@708: $BLuCm(B: $B%a%$%s%V%i%s%A$H0BDjHG%V%i%s%A$N3F%j%]%8%H%j$O!"(B
foozy@708: $BI,$:$7$bF10l%5!<%P$G1?MQ$5$l$kI,MW$O$"$j$^$;$s!#(B}$B!#(B
foozy@708: 
foozy@708: \interaction{branching.clone}
foozy@708: 
foozy@708: $B0BDjHG%V%i%s%A$KBP$7$FJQ99$9$kI,MW$,$"$k>l9g!"(B
foozy@708: $B3+H/<T$O(B\emph{$B0BDjHG%V%i%s%A(B}$B$N%j%]%8%H%j$+$iJ#@=$7!"(B
foozy@708: $BJQ99!"JQ99$N%F%9%H!"%3%_%C%H$N8e$K!"(B
foozy@708: $BJQ99$r0BDjHG%V%i%s%A$N%j%]%8%H%j$KH?1G$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.stable}
foozy@708: 
foozy@708: Mercurial $B$N%j%]%8%H%j$O$*8_$$$K!JJ*M}E*$K!KFHN)$7$F$*$j!"(B
foozy@708: $B%j%]%8%H%j4V$G$NJQ99$N<+F0E*$J$d$j<h$j$O9T$o$l$J$$$?$a!"(B
foozy@708: $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
foozy@708: $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
foozy@708: $B$=$N5U$K4X$7$F$bF1MM$G$9!#(B
foozy@708: 
foozy@708: $B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$r!"(B
foozy@708: $B%a%$%s%V%i%s%A$KH?1G$7$?$$>l9g$b$"$k$G$7$g$&!#(B
foozy@708: $B%a%$%s%V%i%s%A$G%P%0=$@5$r:FEY!J<jF0$G!K9T$&Be$o$j$K!"(B
foozy@708: $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
foozy@708: $B0BDjHG%V%i%s%A$K$*$1$kJQ99$r%a%$%s%V%i%s%A$K;}$A9~$`$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \interaction{branching.merge}
foozy@708: 
foozy@708: $B$3$N;~E@$G$N%a%$%s%V%i%s%A$O!"(B
foozy@708: $B0BDjHG%V%i%s%A$K$OL5$$JQ99$rJ];}$7$F$$$^$9$,!"(B
foozy@708: $B0BDjHG%V%i%s%A$K$*$1$kA4$F$N%P%0=$@5$rJ];}$7$F$$$^$9!#(B
foozy@708: $B0BDjHG%V%i%s%A$O!"(B
foozy@708: $B%a%$%s%V%i%s%A$K$N$_4^$^$l$kJQ99$K$O1F6A$r<u$1$J$$$^$^$G$9!#(B
foozy@708: 
foozy@708: \subsection{Feature branches}
foozy@708: 
foozy@708: $BBg5,LO%W%m%8%'%/%H$GM-8z$JJQ994IM}J}K!$O!"(B
foozy@708: $B3+H/%A!<%`$r>.$5$J%0%k!<%W$KJ,3d$9$k$3$H$G$9!#(B
foozy@708: $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
foozy@708: $B!J!a(B $B%j%]%8%H%j!K$r!"(B
foozy@708: $B3F%0%k!<%W$4$H$K$=$l$>$l;}$A$^$9!#(B
foozy@708: $B8D!9$N%V%i%s%A>e$G:n6H$9$k3+H/%a%s%P!<$O!"(B
foozy@708: $BB>$N%V%i%s%A$K$*$1$k3+H/:n6H$H$O3VN%$5$l$F$$$^$9!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \centering
foozy@708:   \grafix[width=\textwidth]{feature-branches}
foozy@708:   \caption{Feature branches}
foozy@708:   \label{fig:collab:feature-branches}
foozy@708: \end{figure}
foozy@708: 
foozy@708: $B$H$"$k5!G=$,E,@Z$J>u67(B\footnote{$BLuCm(B:
foozy@708: ``$B%3%s%Q%$%k%(%i!<$,L5$/$J$C$?(B''$B>u67$J$N$+!"(B
foozy@708: ``$BC1BN%F%9%H$,40N;$7$?(B''$B>u67$J$N$+$O!"(B
foozy@708: $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
foozy@708: $BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
foozy@708: $B%^%9%?!<%V%i%s%A!J$N%j%]%8%H%j!K(B
foozy@708: $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
foozy@708: $B%^%9%?!<%V%i%s%A$X$H%^!<%87k2L$rH?1G$9$l$PNI$$$N$G$9!#(B
foozy@708: 
foozy@708: \subsection{The release train}
foozy@708: 
foozy@708: $B%W%m%8%'%/%H$K$h$C$F$O!"(B
foozy@708: ``train''$B%b%G%k$G1?MQ$5$l$F$$$k>l9g$b$"$j$^$9!#(B
foozy@708: ``train'' $B%b%G%k$G1?MQ$5$l$F$$$k%W%m%8%'%/%H$G$O!"(B
foozy@708: $B%j%j!<%9$O?t%v7n$4$H$K@_Dj$5$l$F$*$j!"(B
foozy@708: ``train''$B$,=PH/=`Hw40N;$7$?CJ3,(B\footnote{$BLuCm(B: 
foozy@708: $B!V?t%v7n$4$H$K@_Dj$5$l$?%j%j!<%9%9%1%8%e!<%k!W$r(B
foozy@708: $B!V;~9oI=DL$j$NH/<V;~9o!W$KNc$($F$$$kLOMM!#(B
foozy@708: }$B$GDs6!2DG=$J5!G=$@$1$,%j%j!<%9$K4^$^$l$^$9!#(B
foozy@708: 
foozy@708: $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
foozy@708: ``train''$B%b%G%k$N>l9g!"(B
foozy@708: $B5!G=JL%V%i%s%A$,Ns<V$K>h$j$=$3$J$C$?>l9g!"(B
foozy@708: $BEv3:5!G=$NC4Ev%A!<%`$G$O!"(B
foozy@708: $B<+%A!<%`$N5!G=%V%i%s%A!J%j%]%8%H%j!K$KBP$7$F!"(B
foozy@708: $B%j%j!<%9Ns<V$K4^$^$l$kJQ99$N<h$j9~$_$*$h$S%^!<%8$r9T$$!"(B
foozy@708: $B%^!<%87k2L$KBP$7$F:n6H$r7QB3$9$kI,MW$,$"$kE@$,0[$J$j$^$9!#(B
foozy@708: $B$3$N%^!<%8:n6H$r9T$&$3$H$G!"(B
foozy@708: $B<!2s%j%j!<%9$N:]$K!"(B
foozy@708: $BEv3:5!G=$,@09g@-$rJ]$D$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{The Linux kernel model}
foozy@708: 
foozy@708: Linux $B%+!<%M%k$N3+H/BN@)$O!"(B
foozy@708: $B@u$$3,AX9=B$$H!"$=$l$r<h$j0O$`0l8+:.FY$H$7$?72=8$+$i@.$jN)$C$F$$$^$9!#(B
foozy@708: $BKX$I$N(B Linux $B3+H/<T$,!"(B
foozy@708: Mercurial $B$HF1Ey$N5!G=$r;}$C$?J,;69=@.4IM}%D!<%k$G$"$k(B
foozy@708: \command{git} $B%3%^%s%I$r;HMQ$7$F$$$k$N$G!"(B
foozy@708: Linux $B%+!<%M%k3+H/$K$*$1$k:n6H<j=g$N@bL@$O(B
foozy@708: Mercurial $BMxMQ$K$H$C$F$bM-MQ@-$r;}$C$F$$$^$9!#(B
foozy@708: $B5$$KF~$C$?%"%$%G%"$,$"$l$P!"(B
foozy@708: $B%D!<%k$rD6$($F<jK!$rMxMQ$9$k$3$H$O2DG=$J$N$G$9$+$i!#(B
foozy@708: 
foozy@708: $B%3%_%e%K%F%#$NCf?4$K$O!"(B
foozy@708: Linux $B$rAO$j=P$7$?(B Linus Torvalds $B;a$,$$$^$9!#(B
foozy@708: $BH`$OC10l$N%=!<%9%j%]%8%H%j$r8x3+$7$F$*$j!"(B
foozy@708: $B3+H/%3%_%e%K%F%#A4BN$K$H$C$F$O!"(B
foozy@708: $B$3$N%j%]%8%H%j$,(B``$B8"0R$"$k(B''$B8=9T%=!<%9%D%j!<$H$_$J$5$l$^$9!#(B
foozy@708: $BC/$b$,(B Torvalds $B;a$N%=!<%9%D%j!<$rJ#@=$G$-$^$9$,!"(B
foozy@708: $BC/$N%D%j!<$+$iJQ99$r<h$j9~$`$+$H$$$&E@$K4X$7$F!"(B
foozy@708: Torvalds $B;a$OHs>o$K?5=E$JA*Br$r$7$F$$$^$9!#(B
foozy@708: 
foozy@708: Torvalds $B;a$K$O(B``$B?.Mj$G$-$kJd:4Lr(B''$B$,2??M$+$$$^$9!#(B
foozy@708: $BH`$iJd:4Lr$,8x3+$7$F$$$kJQ99$O!"(B
foozy@708: $B%l%S%e!<$,9T$o$l$F$$$J$/$F$b!"(B
foozy@708: $BBg35$O(B Torvalds $B;a$K$h$j<h$j9~$^$l$^$9!#(B
foozy@708: $BJd:4Lr$N$&$A$N2??M$+$O!"(B
foozy@708: ``$BJ]<iC4Ev<T(B''$B$H$7$F>5G'$5$l$F$*$j!"(B
foozy@708: $B%+!<%M%k$NFCDj$N%5%V%7%9%F%`$K4X$9$k@UG$$rIi$C$F$$$^$9(B
foozy@708: $B$H$"$k%+!<%M%k%O%C%+!<$,%5%V%7%9%F%`$X$NJQ99$r9T$$!"(B
foozy@708: $B$=$NJQ99$r:G=*E*$K(B Torvalds $B;a$N%D%j!<$K<h$j9~$s$GM_$7$$$H9M$($?>l9g!"(B
foozy@708: $BEv3:%5%V%7%9%F%`$NJ]<iC4Ev<T$,C/$G$"$k$+$rD4$Y$F!"(B
foozy@708: $B$=$NC4Ev<T$KJQ99$N:NMQ$r$*4j$$$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $BJ]<iC4Ev<T$,JQ99$N%l%S%e!<$N8e$K:NMQ$KF10U$7$?>l9g!"(B
foozy@708: $B$=$NJQ99$O<j=g$K=>$$(B Torvalds $B;a$X$HEO$5$l$^$9!#(B
foozy@708: 
foozy@708: $B8D!9$NJd:4Lr$O!"(B
foozy@708: $BJQ99$N%l%S%e!<!&>5G'$*$h$S8x3+$K4X$9$k$=$l$>$l$N<jK!$r;}$C$F$*$j!"(B
foozy@708: Torvalds $B;a$X$NJQ99AwIU;~4|$NH=CG$K4X$7$F$b!"$=$l$OEv$F$O$^$j$^$9!#(B
foozy@708: $B$=$l$K2C$($F!"(B
foozy@708: $B0[$J$kL\E*8~$1$NNI$/CN$i$l$?%V%i%s%A$,$$$/$D$+B8:_$7$^$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B8E$$HG$N%+!<%M%k$N(B``$B0BDjHG(B''$B%j%]%8%H%j$,!"(B
foozy@708: $BI,MW$K1~$8$F?<9o$J>c32$N=$@5$rE,MQ$9$k$?$a$K!"(B
foozy@708: $B>/?t$N?M!9$K$h$jJ]<i$5$l$F$$$^$9!#(B
foozy@708: $B2??M$+$NJ]<iC4Ev<T$O!"(B
foozy@708: $BJ#?t$N%=!<%9%D%j!<$r8x3+$7$F$$$^$9!#(B
foozy@708: $B#1$D$O<B83E*$JJQ99$N$?$a$N$b$N!"(B
foozy@708: $B#1$D$O>eN.%j%]%8%H%j$+$iG[I[$7$h$&$H$7$F$$$kJQ99$N$?$a$N$b$N!"(B
foozy@708: $B$H$$$C$?0DG[$G$9!#(B
foozy@708: $BB>$NJ]<iC4Ev<T$O!"%=!<%9%D%j!<$r#1$D$@$18x3+$7$F$$$^$9!#(B
foozy@708: 
foozy@708: Linux $B$K$*$1$k$3$N%b%G%k$O!"(B
foozy@708: $B#2$D$NCmL\$KCM$9$kFCD'$r;}$C$F$$$^$9!#(B
foozy@708: $B#1$DL\$O(B``$B<h$j9~$_8BDj(B''$B!J(Bpull only$B!K$G$"$kE@$G$9!#(B
foozy@708: $BJ]<iC4Ev<T0J30$,JQ99$rH?1G$G$-$k%=!<%9%D%j!<$,KX$IL5$/!"(B
foozy@708: $BB>$N?M$,4IM}$7$F$$$k%=!<%9%D%j!<$KJQ99$rH?1G$9$kJ}K!$,L5$$$3$H$+$i!"(B
foozy@708: $BJQ99$rH?1G$5$;$?$$%=!<%9%D%j!<$NJ]<iC4Ev<T$KBP$7$F!"(B
foozy@708: $BJQ99$N:NMQ$r(B\emph{$B$*4j$$(B}$B$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $B#2$DL\$NFCD'$O!"(B
foozy@708: $BCNL>EY$HI>H=$K4p$E$$$F$$$kE@$G$9!#(B
foozy@708: $BL>$NCN$i$l$F$$$J$$3+H/<T$+$i$NJQ990MMj$N>l9g!"(B
foozy@708: Torvalds $B;a$,0MMj%a!<%k$r<u$1<h$C$?$N$J$i!"(B
foozy@708: $BJV?.$b$;$:$KL5;k$7$F$7$^$&$G$7$g$&!#(B
foozy@708: $B$7$+$7!"(B
foozy@708: $B%5%V%7%9%F%`$NJ]<iC4Ev<T$,0MMj%a!<%k$r<u$1<h$C$?>l9g!"(B
foozy@708: $BFbMF$,%l%S%e!<$5$l$?>e$G!"(B
foozy@708: $B$=$l$,J]<iC4Ev<T$N4p=`$rK~$?$7$F$$$l$P!"(B
foozy@708: $B$*$=$i$/$=$NJQ99$O:NMQ$5$l$k$G$7$g$&!#(B
foozy@708: $B$h$j(B``$BNI$$(B''$BJQ99$G9W8%$9$kDx!"(B
foozy@708: $BJ]<iC4Ev<T$O$"$J$?$NH=CG$r?.Mj$9$k$G$7$g$&$7!"(B
foozy@708: $B$"$J$?$NJQ990MMj$,<uM}EY$5$l$kEY9g$$$bA}$9$G$7$g$&!#(B
foozy@708: $B$"$J$?$,M-L>$K$J$j!"(B
foozy@708: Torvalds $B;a$,$^$@<uM}$7$F$$$J$$B)$ND9$$%V%i%s%A$NJ]<i$r9T$&$h$&$K$J$l$P!"(B
foozy@708: $B$"$J$?$N:n6HFbMF$KDI=>$9$k$?$a$K!"(B
foozy@708: $B;w$?$h$&$J6=L#$r;}$D?M!9$,$"$J$?$NJQ99$rDj4|E*$K<h$j9~$`$h$&$K$J$k$G$7$g$&!#(B
foozy@708: 
foozy@708: $BCNL>EY$dI>H=$O!"(B
foozy@708: $BI,$:$7$b%5%V%7%9%F%`$d(B``$B?ME*(B''$B6-3&$r1[$($k$o$1$G$O$"$j$^$;$s!#(B
foozy@708: $B@l$i%9%H%l!<%87O$GCxL>$J%O%C%+!<$,!"(B
foozy@708: $B%M%C%H%o!<%/$N%P%0=$@5$r;n$_$?>l9g!"(B
foozy@708: $B%M%C%H%o!<%/%5%V%7%9%F%`$NJ]<iC4Ev<T$K$h$k4F::$O!"(B
foozy@708: $BA4$/$NIt30<T$K$h$kJQ99$HF1DxEY$H$J$k$G$7$g$&!#(B
foozy@708: 
foozy@708: $B$h$j@0A3$H$7$?%W%m%8%'%/%H=>;v$N7P83$r;}$D?M$K$H$C$F!"(B
foozy@708: $BAjEv$KL5Ca=x$J(B Linux $B%+!<%M%k$N3+H/<j=g$O!"(B
foozy@708: $BA4$/Hs>o<1$J$b$N$K8+$($k$3$H$G$7$g$&!#(B
foozy@708: $B$3$N3+H/7ABV$O!"8D?M$N5$$^$0$l$N1F6A$r<u$1$d$9$$$N$G$9!#(B
foozy@708: $B:n6H$O3F<+$NET9g$NNI$$;~$K!"6C$/$Y$-%Z!<%99T$o$l$^$9!#(B
foozy@708: $B$=$l$G$b$J$*(B  Linux $B$O!"(B
foozy@708: $B@.8y$r<}$a$?=EMW$J%=%U%H%&%'%"$N#1$D$H$J$C$F$$$^$9!#(B
foozy@708: 
foozy@708: \subsection{Pull-only versus shared-push collaboration}
foozy@708: 
foozy@708: $BB>$N?M$N%j%]%8%H%j$+$i$OJQ99$NH?1G$N$_$7$+$7$J$$%b%G%k$H!"(B
foozy@708: $BJ#?t$N?M!9$,6&M-%j%]%8%H%j$X$NJQ99H?1G$r9T$&$3$H$,$G$-$k3+H/%b%G%k$N!"(B
foozy@708: $B$I$A$i$,(B``$B$h$jNI$$(B''$B%b%G%k$G$"$k$+$O!"(B
foozy@708: $B%*!<%W%s%=!<%9%3%_%e%K%F%#$K$*$$$F7QB3E*$J5DO@$NE*$K$J$C$F$$$^$9!#(B
foozy@708: $B$G$9!#(B
foozy@708: 
foozy@708: $B6&M-%j%]%8%H%j!\H?1G%b%G%k$N;Y;}<T$O!"(B
foozy@708: $B$=$N<jK!$r@Q6KE*$K;HMQ$9$k%D!<%k$r;HMQ$9$k798~$K$"$j$^$9!#(B
foozy@708: Subversion $B$N$h$&$JCf1{=8LsE*$J9=@.4IM}%D!<%k$r;HMQ$7$F$$$k>l9g!"(B
foozy@708: $B:NMQ$9$k%b%G%k$NA*Br;h$O$"$j$^$;$s!#(B
foozy@708: $B6&M-%j%]%8%H%j!\H?1G%b%G%k$,%D!<%k$K$h$C$F6/@)$5$l$k$?$a!"(B
foozy@708: $BB>$N%b%G%k$r;HMQ$9$k$K$O!"(B
foozy@708: $B$=$N%D!<%k>e$GFH<+$N<jK!!JNc$($P!"<jF0$G(B \command{patch}
foozy@708: $B$r08$F$k!"$J$I!K$r6n;H$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: Mercurial $B$N$h$&$JE,@Z$JJ,;69=@.4IM}%D!<%k$G$"$l$P!"(B
foozy@708: $BN>J}$N%b%G%k$rA*Br2DG=$G$9!#(B
foozy@708: $BMxMQ<T4V$NO"7H7ABV$O!"(B
foozy@708: $B%D!<%k$K$h$j6/@)$5$l$kOD$s$@$b$N$G$O$J$/!"(B
foozy@708: $B8GM-$NMWK>$d9%$_$K4p$E$$$F9=C[$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{Where collaboration meets branch management}
foozy@708: 
foozy@708: $B6&M-%j%]%8%H%j$r9=C[$7!"(B
foozy@708: $B3F:n6H<T$,<j85$N%j%]%8%H%j$H6&M-%j%]%8%H%j$H$N4V$G!"(B
foozy@708: $BJQ99$NEAGE$r3+;O$7;O$a$?$J$i!"(B
foozy@708: $B%A!<%`Fb$N3+H/$NJ}8~@-$rF1;~$KJ#?t4IM}$9$k$H$$$&!"(B
foozy@708: $BO"7H$K4X$9$k$3$H$G$O$"$j$D$D$b!"(B
foozy@708: $BHyL/$K0[$J$kFqLd$KD>LL$9$k$3$H$G$7$g$&!#(B
foozy@708: $B$3$NLdBj$O3+H/%A!<%`$NO"7HJ}<0$HL)@\$K4XO"$7$F$O$$$k$b$N$N!"(B
foozy@708: $B2~$a$F<h$j>e$2$k2ACM$,$"$k$[$IHs>o$K9~$_F~$C$?OC$G$"$k$3$H$+$i!"(B
foozy@708: \ref{chap:branch}~$B>O$G2~$a$F@bL@$7$^$9!#(B
foozy@708: 
foozy@708: \section{The technical side of sharing}
foozy@708: 
foozy@708: $BK\>O$N;D$j$O!"(B
foozy@708: $B6&F1:n6H<T$KBP$7$F%G!<%?$NDs6!$r9T$&>e$G$NLdBjE@$K3d$-$?$$$H;W$$$^$9!#(B
foozy@708: 
foozy@708: \section{Informal sharing with \hgcmd{serve}}
foozy@708: \label{sec:collab:serve}
foozy@708: 
foozy@708: Mercurial $B$N(B \hgcmd{serve} $B%3%^%s%I$O!"(B
foozy@708: $B>.$5$/6[L)$GB-JB$_$NAa$$=8CD$G$NMxMQ$KBgJQE,$7$F$$$^$9!#(B
foozy@708: \hgcmd{serve} $B%3%^%s%I$O$^$?!"(B
foozy@708: $B%M%C%H%o!<%/1[$7$G$N(B Mercurial $B%3%^%s%I$NMxMQ46$rDO$`$?$a$N!"(B
foozy@708: $BAG@2$i$7$$<jCJ$rDs6!$7$F$$$^$9!#(B
foozy@708: 
foozy@708: $B%j%]%8%H%jG[2<$K$*$$$F(B \hgcmd{serve} $B$r<B9T$9$k$3$H$G!"(B
foozy@708: $B#1IC$b7P$?$:$KFC@=$N(B HTTP $B%5!<%P$,5/F0$7$^$9!#(B
foozy@708: $B<B9T$,Dd;_$5$l$k$^$G$N4V$K$3$N(B HTTP $B%5!<%P$O!"(B
foozy@708: $BG$0U$N%/%i%$%"%s%H$+$i$N@\B3$r<uM}$7!"(B
foozy@708: $BEv3:%j%]%8%H%jCf$N%G!<%?$NDs6!$r9T$$$^$9!#(B
foozy@708: $B$?$C$?:#5/F0$7$?$P$+$j$N%5!<%P$N(B URL $B$rCN$C$F$$$F!"(B
foozy@708: $B%M%C%H%o!<%/1[$7$K%5!<%P$,2TF0$7$F$$$k%3%s%T%e!<%?$HDL?.$G$-$k$J$i!"(B
foozy@708: $B%&%'%V%V%i%&%6$d(B Mercurial $B$rMxMQ$7$F!"(B
foozy@708: $BC/$b$,%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$3$H$,$G$-$^$9!#(B
foozy@708: $B%N!<%H(B PC $B>e$G2TF0$9$k(B \hgcmd{serve} $B%W%m%;%9$N(B URL $B$O!"(B
foozy@708: \Verb|http://my-notepc.local:8000/| $B$N$h$&$J7A<0$K$J$j$^$9!#(B
foozy@708: 
foozy@708: \hgcmd{serve} $B%3%^%s%I$OHFMQ%&%'%V%5!<%P$G$O(B\emph{$B$"$j$^$;$s(B}$B!#(B
foozy@708: $B$3$N%3%^%s%I$r;HMQ$9$k$3$H$G#2$D$N;v$,2DG=$K$J$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item $B0lHLE*$J%&%'%V%V%i%&%67PM3$G$N%5!<%S%9BP>]%j%]%8%H%j$NMzNr$N1\Mw(B
foozy@708: 
foozy@708: \item Mercurial $B%W%m%H%3%k$K$h$kDL?.$r9T$&$3$H$G!"(B
foozy@708:   $B%j%]%8%H%jFb%A%'%s%8%;%C%H$N(B \hgcmd{clone} $B$J$$$7(B \hgcmd{pull}
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $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
foozy@708: \hgcmd{serve} $B$OFI$_=P$7@lMQ$H$7$F$NMxMQ$,A[Dj$5$l$F$$$^$9!#(B
foozy@708: 
foozy@708: Mercurial $B$r4{$KMxMQ$7;O$a$F$$$k$N$G$"$l$P!"(B
foozy@708: $B<+?H$N%3%s%T%e!<%?>e$N%j%]%8%H%j$rBP>]$H$7$F(B
foozy@708: \hgcmd{serve} $B$rMxMQ$9$k$3$H$,$G$-$^$9$+$i!"(B
foozy@708: $B%M%C%H%o!<%/1[$7$K8x3+$5$l$F$$$k%j%]%8%H%j$N>l9g$HF1MM$K!"(B
foozy@708: \hgcmd{clone} $B$d(B \hgcmd{incoming} 
foozy@708: $B$N$h$&$J%3%^%s%I$r;HMQ$7$F!"(B
foozy@708: \hgcmd{serve} $B$K$h$C$F5/F0$5$l$?%5!<%P$HDL?.$7$F$_$^$7$g$&!#(B
foozy@708: $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
foozy@708: $B<jAa$/=,F@$9$k0l=u$K(B \hgcmd{serve} $B$r;HMQ$9$k$N$bNI$$$G$7$g$&!#(B
foozy@708: 
foozy@708: \subsection{A few things to keep in mind}
foozy@708: 
foozy@708: \hgcmd{serve} $B$O!"(B
foozy@708: $B%M%C%H%o!<%/1[$7$NFI$_=P$7A`:n$rG'>ZL5$7$GA4$F5v2D$7$F$$$k$?$a!"(B
foozy@708: $BBP>]%j%]%8%H%j$+$i%G!<%?$rFI$_=P$9$?$a$KC/$,@\B3$7$FMh$k$N$+$r!"(B
foozy@708: $B5$$K$7$J$/$FNI$$!J$"$k$$$O40A4$K@)8f$G$-$k!K4D6-$G$N$_(B
foozy@708: \hgcmd{serve}  $B$r;H$&$h$&$K$9$Y$-$G$9!#(B
foozy@708: 
foozy@708: $B%3%s%T%e!<%?$d%M%C%H%o!<%/$X$N%U%!%$%d%&%)!<%k$NF3F~>u67$K$D$$$F!"(B
foozy@708: \hgcmd{serve} $B%3%^%s%I$O0l@Z4XCN$7$^$;$s!#(B
foozy@708: $B%U%!%$%d%&%)!<%k$N8!=P$b@)8f$b$G$-$^$;$s!#(B
foozy@708: $B<B9TCf$N(B \hgcmd{serve} $B%W%m%;%9$H$NDL?.$,$G$-$J$$>l9g$O!"(B
foozy@708: $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
foozy@708: $B%U%!%$%"%&%)!<%k$N@_Dj$r3NG'$9$Y$-$G$9!#(B
foozy@708: 
foozy@708: \hgcmd{serve} $B$K$h$k%M%C%H%o!<%/@\B3$N<u$1IU$1$O!"(B
foozy@708: $BDL>o$O(B 8000 $BHV%]!<%H$G9T$o$l$^$9!#(B
foozy@708: $BEv3:%]!<%H$,4{$KB>$N%W%m%;%9$K$h$j;HMQ$5$l$F$$$?>l9g$O!"(B
foozy@708: \hgopt{serve}{-p} $B%*%W%7%g%s$r;HMQ$9$k$3$H$G!"(B
foozy@708: $B@\B3<u$1IU$1%]!<%HHV9f$r;XDj$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \hgcmd{serve} $B5/F0$N:]$K$ODL>o2?$b=PNO$5$l$^$;$s$N$G!"(B
foozy@708: $B>/!9IT0B$K$J$k$+$b$7$l$^$;$s!#(B
foozy@708: \hgcmd{serve} $B$,E,@Z$K2TF0$7$F$$$k$3$H$r3NG'$7$?$j!"(B
foozy@708: $B6&F1:n6H<T$KAwIU$9$k(B URL $B$rCN$j$?$$$N$G$"$l$P!"(B
foozy@708: \hggopt{-v} $B%*%W%7%g%sIU$-$G(B \hgcmd{serve} $B$r5/F0$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \section{Using the Secure Shell (ssh) protocol}
foozy@708: \label{sec:collab:ssh}
foozy@708: 
foozy@708: Secure Shell $B!J(B\texttt{ssh}$B!K%W%m%H%3%k$r;HMQ$9$k$3$H$G!"(B
foozy@708: $B%M%C%H%o!<%/@\B31[$7$K0BA4$KJQ99FbMF$N<h$j9~$_!&H?1G$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708: $B$3$N@\B3J}K!$r@5$7$/5!G=$5$;$k$K$O!"(B
foozy@708: $B%/%i%$%"%s%H$"$k$$$O%5!<%PB&$G>/!9@_Dj$,I,MW$+$b$7$l$^$;$s!#(B
foozy@708: 
foozy@708: ssh $B$KFk@w$_$,$J$$$N$G$"$l$P!"(B
foozy@708: $BB>$N%3%s%T%e!<%?$H0BA4$KDL?.$9$k$?$a$N%M%C%H%o!<%/%W%m%H%3%k$G$"$k!"(B
foozy@708: $B$HM}2r$7$F$*$$$F$/$@$5$$!#(B
foozy@708: Mercurial $B$G(B ssh $B$rMxMQ$9$k$K$O!"(B
foozy@708: $B%5!<%P$X$N%m%0%$%s$*$h$S%3%^%s%I<B9T$,$G$-$k$h$&$K!"(B
foozy@708: $B%5!<%PB&$K%f!<%6%"%+%&%s%H$r!JI,MW$G$"$l$PJ#?t!KMQ0U$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $B!J(Bssh $B$K$D$$$F>\$7$$>l9g!"(B
foozy@708: $B0J9_$N@bL@$O$*$=$i$/Hs>o$K=iJbE*$K46$8$k$G$7$g$&!K(B
foozy@708: 
foozy@708: \subsection{How to read and write ssh URLs}
foozy@708: 
foozy@708: ssh $B%W%m%H%3%k$rMxMQ$9$k>l9g$N(B URL $B$O!"(B
foozy@708: $B35$M0J2<$N$h$&$J7A<0$r;}$A$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   ssh://bos@hg.serpentine.com:22/hg/hgbook
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \begin{enumerate}
foozy@708: \item ``\texttt{ssh://}' $BItJ,$,(B Mercurial $B$K(B ssh $B%W%m%H%3%k$NMxMQ$r;X<($7$^$9(B
foozy@708: 
foozy@708: \item ``\texttt{bos@}''$BItJ,$,%5!<%P$X$N%m%0%$%s$K$*$1$k%f!<%6L>$rI=$7$^$9!#(B
foozy@708:   $B%5!<%P$G$N%f!<%6L>$,%m!<%+%k%^%7%s>e$N%f!<%6L>$H0lCW$9$k>l9g$O!"(B
foozy@708:   $B$3$NItJ,$r>JN,$G$-$^$9!#(B
foozy@708: 
foozy@708: \item ``\texttt{hg.serpentine.com}'' 
foozy@708:   $BItJ,$O%m%0%$%s@h%5!<%P$N%[%9%HL>$rI=$7$^$9!#(B
foozy@708: 
foozy@708: \item ``:22'' $BItJ,$O%5!<%P$K@\B3$9$k:]$N%]!<%HHV9f$rI=$7$^$9!#(B
foozy@708:   ssh $B@\B3$K$*$1$k4{Dj%]!<%HHV9f$O(B 22 $BHV$G$9$N$G!"(B
foozy@708:   22 $BHV(B\emph{$B0J30(B}$B$N%]!<%H$r;HMQ$9$k>l9g$N$_;XDj$,I,MW$G$9!#(B
foozy@708: 
foozy@708: \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
foozy@708: 
foozy@708: \end{enumerate}
foozy@708: 
foozy@708: ssh $B%W%m%H%3%k$K$*$1$k(B URL $BI=5-$N%Q%9MWAGItJ,$K$O!"(B
foozy@708: $BCM$N2r<a$K4X$9$kI8=`E*$J<jK!$,$J$$$?$a$K!"(B
foozy@708: $B:.Mp$NM>CO$,B?!9$"$j$^$9!#(B
foozy@708: $B0l72$N%W%m%0%i%`$O!"(B
foozy@708: $B%Q%9MWAGItJ,$K4X$7$FB>$N%W%m%0%i%`$H0[$J$k?6$kIq$$$r$7$^$9!#(B
foozy@708: $B$3$N$h$&$J>u67$OM}A[E*$G$O$"$j$^$;$s$,!"(B
foozy@708: $B>u67$,JQ$o$j$=$&$K$O$"$j$^$;$s!#(B
foozy@708: $B$G$9$+$i0J9_$N@bL@$OCm0U?<$/FI$s$G$/$@$5$$!#(B
foozy@708: 
foozy@708: Mercurial $B$O%Q%9ItJ,$r!"(B
foozy@708: $B%5!<%P$K%m%0%$%s$9$k%f!<%6$N!"(B
foozy@708: $B%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$H$_$J$7$^$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B%5!<%P$K$*$1$k(B \texttt{foo} $B%f!<%6$N%[!<%`%G%#%l%/%H%j$,(B
foozy@708: \dirname{/home/foo} $B$G$"$k>l9g!"(B
foozy@708: ssh $B%W%m%H%3%k$K$*$1$k(B URL $B$N%Q%9MWAG$,(B \dirname{bar} $B$G$"$l$P!"(B
foozy@708: $B$=$N(B URL $B$K$h$j(B\emph{$B<B:]$K(B}$B;2>H$5$l$k$N$O(B
foozy@708: \dirname{/home/foo/bar} $B%G%#%l%/%H%j$G$9!#(B
foozy@708: 
foozy@708: $BB>$N%f!<%6$N%[!<%`%G%#%l%/%H%j$KBP$9$kAjBP%Q%9$r;XDj$9$k>l9g$O!"(B
foozy@708: $B%A%k%@J8;z!J(B\texttt{~}$B!K$K%f!<%6L>!J$3$3$G$O(B
foozy@708: \texttt{otheruser} $B$H$7$^$9!K$rB3$1$?%Q%9$G;O$^$k!"(B
foozy@708: $B0J2<$N$h$&$JI=5-$K$J$j$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   ssh://server/~otheruser/hg/repo
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \emph{$B@dBP(B}$B%Q%9$K$h$k;XDj$r9T$&>l9g$O!"(B
foozy@708: $B0J2<$N$h$&$K%Q%9MWAG$r%@%V%k%9%i%C%7%e$G;O$a$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   ssh://server//absolute/path
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \subsection{Finding an ssh client for your system}
foozy@708: 
foozy@708: $BKX$IA4$F$N(B Unix $B%i%$%/$J%7%9%F%`$K$O(B
foozy@708: OpenSSH $B$,;vA0F3F~$5$l$F$$$^$9!#(B
foozy@708: Unix $B%i%$%/$J%7%9%F%`$r;HMQ$7$F$$$k>l9g!"(B
foozy@708: \Verb|which ssh| $B$HF~NO$9$k$3$H$G(B
foozy@708: \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
foozy@708: $B$N%$%s%9%H!<%k$NM-L5$r3NG'$9$k$3$H$,$G$-$^$9!#(B
foozy@708: $BM=A[$KH?$7$F%$%s%9%H!<%k$5$l$F$$$J$+$C$?>l9g$K$O!"(B
foozy@708: $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
foozy@708: 
foozy@708: Windows $B$N>l9g!"(B
foozy@708: $BBEEv$J(B ssh $B%/%i%$%"%s%H$rA*Br$7$F%@%&%s%m!<%I$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $B<g$JA*Br;h$O#2$D$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item Simon Tatham $B;a$K$h$k(B PuTTY~\cite{web:putty} $B$O!"(B
foozy@708:   ssh $B%/%i%$%"%s%H%3%^%s%I0l<0$rDs6!$7$F$$$^$9!#(B
foozy@708: 
foozy@708: \item $BLLE]$J;v$X$NBQ@-$,9b$$J}$J$i!"(B
foozy@708:   Cygwin $B>e$N(B OpenSSH $B$r;H$&$N$bNI$$$G$7$g$&!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $B$I$A$i$N>l9g$G$b!"(B
foozy@708: Mercurial $B$,(B ssh $B%/%i%$%"%s%H%3%^%s%I$rC5$7=P$;$k$h$&$K(B
foozy@708: \hgini\ $B%U%!%$%k$rJT=8$9$kI,MW$,$"$k$G$7$g$&!#(B
foozy@708: $BNc$($P(B PuTTY $B$r;HMQ$9$k$J$i!"(B
foozy@708: $B%3%^%s%I9T$G<B9T$9$k(B ssh $B%/%i%$%"%s%H$H$7$F(B
foozy@708: \command{plink} $B$r<B9T$9$k$3$H$K$J$j$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   [ui]
foozy@708:   ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key"
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \begin{note}
foozy@708:   \command{plink} $B$X$N%Q%9$,6uGrJ8;z$r4^$`>l9g!"(B
foozy@708:   Mercurial $B$O(B \command{plink} $B%3%^%s%I$r@5$7$/5/F0$G$-$^$;$s(B
foozy@708:   $B!J$G$9$N$G(B \dirname{C:\\Program Files} $B$K%$%s%9%H!<%k$9$k$N$O!"(B
foozy@708:   $B$h$/$"$j$^$;$s!K!#(B
foozy@708: \end{note}
foozy@708: 
foozy@708: \subsection{Generating a key pair}
foozy@708: 
foozy@708: ssh $B%/%i%$%"%s%H$r;HMQ$9$kEY$K!"(B
foozy@708: $BKh2s%Q%9%o!<%IF~NO$r7+$jJV$5$J$/$F$bNI$$MM$K!"(B
foozy@708: $B80BP!J(Bkey pair$B!K(B\footnote{$BLuCm(B:
foozy@708: $B!V8x3+80!W!J(Bpublic key$B!K$H(B
foozy@708: $B!VHkL)80!W!J(Bprivate key$B!K$NBP$,@8@.$5$l$^$9!#(B
foozy@708: }$B$r@8@.$9$k$3$H$r$*$9$9$a$7$^$9!#(B
foozy@708: Unix $B%i%$%/$J%7%9%F%`(B\footnote{$BLuCm(B: Windows $B$N(B Cygwin $B4D6-4^$`(B}$B$G$O!"(B
foozy@708: \command{ssh-keygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
foozy@708: Windows $B>e$G(B PuTTY $B$r;HMQ$7$F$$$k>l9g$O!"(B
foozy@708: \command{puttygen} $B%3%^%s%I$G80BP$r@8@.$7$^$9!#(B
foozy@708: 
foozy@708: $B80BP$r@8@.$9$k>l9g!"(B
foozy@708: $B%Q%9%U%l!<%:$G80$r<i$k$h$&$K$9$k$N$,!"(B
foozy@708: $B0lHL$K$O(B\emph{$BHs>o$K(B}$B8-L@$H$5$l$F$$$^$9(B
foozy@708: $B!J(Bssh $B%W%m%H%3%k$K$h$k0BA4$J%M%C%H%o!<%/$r!"(B
foozy@708: $B<+F02=$5$l$?=hM}$K$*$$$F;HMQ$9$k>l9g$r=|$/!K!#(B
foozy@708: 
foozy@708: $B$7$+$7!"C1$K80BP$r@8@.$7$?$@$1$G$OIT==J,$G$9!#(B
foozy@708: $B%M%C%H%o!<%/7PM3$G%m%0%$%s$9$k%5!<%PB&%"%+%&%s%H$K$*$$$F!"(B
foozy@708: $B>5G'800lMw$K8x3+80$rDI2CEPO?$9$kI,MW$,$"$j$^$9!#(B
foozy@708: OpenSSH $B$,F3F~$5$l$F$$$k%5!<%P$G$N8x3+80$NDI2C$O!"(B
foozy@708: $BEv3:%"%+%&%s%H$N(B \sdirname{.ssh} $B%G%#%l%/%H%jG[2<$N(B
foozy@708: \sfilename{authorized\_keys} 
foozy@708: $B%U%!%$%k$K8x3+80$NFbMF$rDI2C$9$k$3$H$G9T$o$l$^$9!#(B
foozy@708: 
foozy@708: Unix $B%i%$%/L>%7%9%F%`$G$O!"(B
foozy@708: $B8x3+80$ODL>o(B \filename{.pub} $B3HD%;R$r;}$C$F$$$^$9!#(B
foozy@708: Windows $B>e$G(B \command{puttygen} $B$r;HMQ$9$k>l9g$O!"(B
foozy@708: $BG$0U$N%U%!%$%kL>$GJ]B82DG=$G$9$7!"(B
foozy@708: $B8x3+80$NFbMF$,I=<($5$l$F$$$k%&%#%s%I%&$+$i(B
foozy@708: \sfilename{authorized\_keys} $B$XD>@\E=$jIU$1!J(Bpaste$B!K$k$3$H$b2DG=$G$9(B
foozy@708: 
foozy@708: \subsection{Using an authentication agent}
foozy@708: 
foozy@708: $BG'>Z%(!<%8%'%s%H$O!"(B
foozy@708: $B%Q%9%U%l!<%:$r%a%b%j>e$K3JG<$9$k%G!<%b%s%W%m%;%9$G$9(B
foozy@708: $B!J$=$N$?$a!"%m%0%"%&%H8e$K:FEY%m%0%$%s$7$?>l9g!"(B
foozy@708: $B%Q%9%U%l!<%:$O<:$o$l$^$9!K!#(B
foozy@708: $BG'>Z%(!<%8%'%s%H$N2TF0$r8!CN$9$k$H!"(B
foozy@708: ssh $B%/%i%$%"%s%H$OG'>Z%(!<%8%'%s%H$K%Q%9%U%l!<%:$NLd$$9g$o$;$r9T$$$^$9!#(B
foozy@708: $BG'>Z%(!<%8%'%s%H$,2TF0$7$F$$$J$$$+!"(B
foozy@708: $B$"$k$$$OI,MW$J%Q%9%U%l!<%:$r5-21$7$F$$$J$$>l9g$O!"(B
foozy@708: Mercurial $B$K$h$k%5!<%PO"7H!JNc(B: \hgcmd{push} $B$d(B \hgcmd{pull}$B!K$NETEY!"(B
foozy@708: $B%Q%9%U%l!<%:$NF~NO$,I,MW$G$9!#(B
foozy@708: 
foozy@708: $BG'>Z%(!<%8%'%s%H$K$h$k%Q%9%U%l!<%:J]B8$N7gE@$O!"(B
foozy@708: $BF~G0$K=`Hw$7$?967b<T$K$H$C$F$O!"(B
foozy@708: $B$?$H$(Dj4|E*$K:F5/F0$7$F$$$k%7%9%F%`$G$"$C$F$b(B XXXXXX power-cycled XXXX
foozy@708: $B%Q%9%U%l!<%:$NJ?J,$rI|852DG=$G$"$kE@$G$9!#(B
foozy@708: $B$3$NLdBj$,5vMF2DG=$J$b$N$+H]$+$O!"3F<+$GH=CG$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $BG'>Z%(!<%8%'%s%H$r;HMQ$9$k$3$H$G!"(B
foozy@708: $B7+$jJV$7%Q%9%U%l!<%:$rF~NO$9$k<j4V$rBgI}$KDc8:$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: Unix $B%i%$%/L>%7%9%F%`$G$O!"(B
foozy@708: $BG'>Z%(!<%8%'%s%H$O(B \command{ssh-agent} $B$H$$$&L>A0$G!"(B
foozy@708: \command{ssh-add} 
foozy@708: $B%3%^%s%I$r;H$C$F%(!<%8%'%s%H$N5-21NN0h$K%Q%9%U%l!<%:$rJ]B8$7$^$9!#(B
foozy@708: Windows $B>e$G(B PuTTY $B$r;HMQ$9$k>l9g$O!"(B
foozy@708: \command{pageant} $B%3%^%s%I$,G'>Z%(!<%8%'%s%H$7$F?6Iq$$$^$9!#(B
foozy@708: $B%7%9%F%`%H%l%$$KDI2C$5$l$?%"%$%3%s$r%/%j%C%/$9$k$3$H$G!"(B
foozy@708: $B3JG<$5$l$?%Q%9%U%l!<%:$N4IM}$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{Configuring the server side properly}
foozy@708: 
foozy@708: $B=i?4<T$K$H$C$F(B ssh $B$N@_Dj$OLLE]$J$N$G!"(B
foozy@708: $BLdBj$,H/@8$9$k>u67$bB?4t$KEO$j$^$9!#(B
foozy@708: Add Mercurial on top, and
foozy@708: there's plenty more scope for head-scratching.  XXXXX
foozy@708: $BLdBjH/@8$N2DG=@-$O!"(B
foozy@708: $B%/%i%$%"%s%HB&$G$O$J$/%5!<%PB&$NJ}$,9b$$$G$9!#(B
foozy@708: $B$"$j$,$?$$$3$H$K!"(B
foozy@708: $B0lC6@5$7$/F0:n$9$k@_Dj$,$G$-$F$7$^$($P!"(B
foozy@708: $BDL>o$OL54|8B$K@5$7$/F0:n$7B3$1$^$9!#(B
foozy@708: 
foozy@708: Mercurial $B$G(B ssh $B%5!<%P$HDL?.$r$7$F$_$kA0$K!"(B
foozy@708: $BDL>o$N(B \command{ssh} $B$J$$$7(B 
foozy@708: \command{putty} $B%3%^%s%I$K$h$k%5!<%P$H$NDL?.$r3NG'$9$k$N$,L5Fq$G$9!#(B
foozy@708: $BD>@\%3%^%s%I$r;HMQ$7$?:]$KLdBj$,H/@8$7$?$J$i$P!"(B
foozy@708: Mercurial $B$,5!G=$7$J$$$3$H$O3N<B$G$9!#(B
foozy@708: $B99$K0-$$$3$H$K!"(B
foozy@708: Mercurial $B$r2p$7$F$N(B ssh $B%5!<%P$H$NO"7H$O!"(B
foozy@708: $B:,K\E*$J860x$,1#$l$F$7$^$$$^$9!#(B
foozy@708: ssh $B$K4XO"$9$k(B Mercurial $B$NLdBj$r2r7h$9$k>l9g$O!"(B
foozy@708: Mercurial $B$NIT6q9g$r5?$&(B\emph{$BA0$K(B}$B!"(B
foozy@708: ssh $B%/%i%$%"%s%H%3%^%s%I$ND>@\<B9T$,5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B%5!<%PB&$G:G=i$K3NG'$9$Y$-;v$O!"(B
foozy@708: $B$"$k%^%7%s$+$i%5!<%P%^%7%s$X$N<B:]$N%m%0%$%s$N2DH]$G$9!#(B
foozy@708: \command{ssh} $B$J$$$7(B \command{putty} $B$G%m%0%$%s$G$-$J$$>l9g!"(B
foozy@708: $BI=<($5$l$k%(%i!<%a%C%;!<%8$+$iLdBjFCDj$N%R%s%H$,F@$i$l$k$+$b$7$l$^$;$s!#(B
foozy@708: $B$h$/$"$kLdBj$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item ``connection refused'' $B$,I=<($5$l$k>l9g$O!"(B
foozy@708:   ssh $B%5!<%P%W%m%;%9$,5/F0$5$l$F$$$J$$$+!"(B
foozy@708:   $B%U%!%$%d!<%&%)!<%k@_Dj$K$h$j%M%C%H%o!<%/@\B3$G$-$J$$$3$H$,860x$G$9!#(B
foozy@708: 
foozy@708: \item ``no route to host'' $B$,I=<($5$l$k>l9g$O!"(B
foozy@708:   $B@\B3@h$N%5!<%P%"%I%l%9$,4V0c$C$F$$$k$+!"(B
foozy@708:   $B%U%!%$%d!<%&%)!<%k$K$h$C$F@\B3$,87=E$K6X;_$5$l$F$$$k$3$H$,860x$G$9!#(B
foozy@708: 
foozy@708: \item ``permission denied'' $B$,I=<($5$l$k>l9g$O!"(B
foozy@708:   $B%5!<%P@\B3$N:]$N%f!<%6L>!"%Q%9%U%l!<%:!"(B
foozy@708:   $B$J$$$7%5!<%PB&%f!<%6$N%Q%9%o!<%I$NF~NO$r4V0c$($F$$$k$3$H$,860x$G$9!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $B$3$l$^$G$NOC$r$^$H$a$k$H!"(B
foozy@708: $B%5!<%P%^%7%s>e$N(B ssh $B%5!<%P%W%m%;%9$H$NDL?.$KLdBj$,$"$k>l9g!"(B
foozy@708: $B$^$:$O%5!<%P%W%m%;%9$N2TF0>u67$r3NG'$7$F$/$@$5$$!#(B
foozy@708: $BB?$/$N%7%9%F%`$G$O!"(B
foozy@708: ssh $B<+BN$O%$%s%9%H!<%k$5$l$F$$$^$9$,!"(B
foozy@708: $B=i4|>uBV$G$OL58z2=$5$l$F$$$k>l9g$,$"$j$^$9!#(B
foozy@708: $B$3$N3NG'$,:Q$s$@$J$i!"(B
foozy@708: $B<!$K3NG'$9$k$N$O!"(B
foozy@708: ssh $B%5!<%P%W%m%;%9$,30It$+$i$N@\B3$r<u$1IU$1$k%]!<%H!JDL>o$O(B 22 $BHV!K(B
foozy@708: $B$KBP$9$k30It$+$i$N@\B3$r!"(B
foozy@708: $B%5!<%P$N%U%!%$%d!<%&%)!<%k@_Dj$,5v2D$7$F$$$k$+H]$+$G$9!#(B
foozy@708: $B$3$l$i#2$D$N3NG'$r:Q$^$;$k$^$G$O!"(B
foozy@708: $BFMGo;R$b$J$$@_Dj%_%9$N2DG=@-$K4X$7$F?4G[$9$kI,MW$O$"$j$^$;$s!#(B
foozy@708: 
foozy@708: $BHkL)80MQ%Q%9%U%l!<%:$NJ];}$N$?$a$K!"(B
foozy@708: $B%/%i%$%"%s%HB&$GG'>Z%(!<%8%'%s%H$r;HMQ$7$F$$$k>l9g$O!"(B
foozy@708: $B%Q%9%U%l!<%:$d%Q%9%o!<%I$NLd$$9g$o$;$r<u$1$k;vL5$/!"(B
foozy@708: $B%5!<%P$K%m%0%$%s$G$-$F$$$J$1$l$P$J$j$^$;$s!#(B
foozy@708: $B%Q%9%U%l!<%:$rLd$$9g$o$;$k%W%m%s%W%H$,I=<($5$l$k>l9g!"(B
foozy@708: $BLdBj$N2DG=@-$N$"$k$b$N$,4v$D$+$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item \command{ssh-add} $B$J$$$7(B \command{pageant} 
foozy@708:   $B$K$h$k%Q%9%U%l!<%:$N3JG<$rK:$l$F$$$k$N$+$b$7$l$^$;$s!#(B
foozy@708: 
foozy@708: \item $BA[Dj$7$F$$$k$b$N$H$OJL$J80$N%Q%9%U%l!<%:$r3JG<$7$F$$$k$N$+$b$7$l$^$;$s!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $B%5!<%PB&%f!<%6$N%Q%9%o!<%I$NLd$$9g$o$;$,$"$C$?>l9g!"(B
foozy@708: $BJL$JLdBj$N2DG=@-$r8!F$$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item $B%5!<%PB&%f!<%6$N!"%[!<%`%G%#%l%/%H%j$J$$$7(B
foozy@708:   \sdirname{.ssh} $B%G%#%l%/%H%j$N8"8B@_Dj$,!"(B
foozy@708:   $B2aEY$K4K$/@_Dj$5$l$F$$$k$N$+$b$7$l$^$;$s!#(B
foozy@708:   ssh $B%5!<%P%W%m%;%9$O$=$N>l9g!"(B
foozy@708:   \sfilename{authorized\_keys}
foozy@708:   $B%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
foozy@708:   $BNc$($P!"(B
foozy@708:   $B%[!<%`%G%#%l%/%H%j$J$$$7(B \sdirname{.ssh} $B%G%#%l%/%H%j$,!"(B
foozy@708:   $B%0%k!<%W$KBP$9$k=q$-9~$_8"8B$r@_Dj$5$l$F$$$k>l9g!"(B
foozy@708:   $B%Q%9%o!<%ILd$$9g$o$;$,9T$o$l$k!"$H$$$C$?>I>u$,8+$i$l$^$9!#(B
foozy@708: 
foozy@708: \item \sfilename{authorized\_keys} 
foozy@708:   $B%U%!%$%k$=$N$b$N$KLdBj$,$"$k2DG=@-$b$"$j$^$9!#(B
foozy@708:   $B$3$N%U%!%$%k$X$N=q$-9~$_8"8B$,=jM-<T0J30$K$b@_Dj$5$l$F$$$k>l9g!"(B
foozy@708:   ssh $B%5!<%P%W%m%;%9$O%U%!%$%k$N?.Mj@-$,Dc$$$b$N$H$7$FFI$_9~$_$r9T$$$^$;$s!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $B0J2<$N%3%^%s%I<B9T$KBP$7$F!"(B
foozy@708: $B!J%5!<%PB&$N!K8=:_;~9o$rI=<($9$k#19T$@$1$,=PNO$5$l$k!"(B
foozy@708: $B$H$$$&>uBV$,M}A[E*$G$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   ssh myserver date
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B>e5-$N$h$&$JHsBPOCE*$J%3%^%s%I<B9T$N>l9g$K$b!"(B
foozy@708: $B%P%J!<I=<($d$=$l$KN`$9$kI=<($,9T$o$l$k$h$&$J@_Dj$,!"(B
foozy@708: $BO"7H@h%5!<%PB&$G9T$o$l$F$$$k>l9g$K$O!"(B
foozy@708: $B$3$N@h$N<j=g$K?J$`A0$K!"(B
foozy@708: $BBPOCE*$J<B9T(B\footnote{$BLuCm(B: $B!V(Bssh $B$K$h$k%m%0%$%s;~!W$N0U(B}$B$N;~$K$N$_!"(B
foozy@708: $B$3$l$i$,I=<($5$l$k$h$&$K@_DjJQ99$7$F$/$@$5$$!#(B
foozy@708: $B$3$l$rBU$k$H!"(B
foozy@708: $B%P%J!<Ey$NI=<($,(B Mercurial $B$N=PNO$r:.Mp$5$;$F$7$^$$$^$9!#(B
foozy@708: $B99$KLdBj$J$3$H$K!"(B
foozy@708: $B%P%J!<Ey$NI=<($O(B Mercurial $B%3%^%s%I$N1s3V<B9T$K$*$1$k@x:_E*$JLdBj$H@.$jF@$^$9!#(B
foozy@708: $BHsBPOCE*$J(B \command{ssh} $BO"7H$K$*$$$F!"(B
foozy@708: Mercurial $B$O6KNO%P%J!<Ey$NI=<($N8!CN$J$i$S$KL5;k$KEX$a$^$9$,!"(B
foozy@708: $BI,$:$7$bA4$F$,L5;k$G$-$k$o$1$G$O$"$j$^$;$s(B
foozy@708: $B!J%5!<%PB&$G%m%0%$%s;~<B9T%9%/%j%W%H$r%+%9%?%^%$%:$9$k>l9g!"(B
foozy@708: \Verb|tty -s| $B%3%^%s%I$NLa$jCM$rH=Dj$9$k$3$H$G!"(B
foozy@708: $BEv3:%9%/%j%W%H$,8=:_BPOC%7%'%k$G<B9T$5$l$F$$$k$+H]$+$rH=Dj$9$k$3$H$,$G$-$^$9!K(B
foozy@708: \footnote{$BLuCm(B: $B%m%0%$%s%9%/%j%W%H$G$N=PNO0J30$G$b!"(B
foozy@708: $B%U%C%/<B9T;~$KI8=`=PNO$KBP$7$F2?$i$+$NI=<($,$"$C$?>l9g!"(B
foozy@708: Mercurial $B$O!VO"7H$K$*$1$kA[Dj30$N%G!<%?<x<u!W$H$_$J$9$?$a!"(B
foozy@708: $BCm0U$,I,MW$G$9!#(B}$B!#(B
foozy@708: 
foozy@708: $BAG$N(B ssh $B$K$h$k%5!<%PO"7H$,5!G=$9$k$3$H$r3NG'$7$?$J$i$P!"(B
foozy@708: $B<!$K3NG'$9$k$N$O!"(B
foozy@708: $B%5!<%PB&$G$N(B Mercurial $B<B9T$N2DH]$G$9!#(B
foozy@708: $B0J2<$N%3%^%s%I<B9T$,@5$7$/5!G=$9$k$3$H$r3NG'$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   ssh myserver hg version
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $BDL>o$N(B \hgcmd{version} $B=PNO$G$O$J$/%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g!"(B
foozy@708: $BBg35$O(B \dirname{/usr/bin} $B$K(B
foozy@708: Mercurial $B$,%$%s%9%H!<%k$5$l$F$$$J$$$3$H$,860x$G$9!#(B
foozy@708: $B$=$N>l9g$G$b!"(B
foozy@708: $BI,$:$7$b(B \dirname{/usr/bin} $B$K%$%s%9%H!<%k$9$kI,MW$O$"$j$^$;$s!#(B
foozy@708: $B$7$+$7!"9M$(F@$k0J2<$N4v$D$+$N860x$K4X$7$F3NG'$,I,MW$G$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item Mercurial $B$OK\Ev$K%5!<%P$K%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
foozy@708:   $BJQ$J<ALd$H;W$o$l$k$+$b$7$l$^$;$s$,!"$3$l$OHs>o$K=EMW$J3NG';v9`$G$9!#(B
foozy@708: 
foozy@708: \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
foozy@708:   $B$N@_Dj$,C1$KITE,@Z$J$N$+$b$7$l$^$;$s!#(B
foozy@708: 
foozy@708: \item $B$R$g$C$H$7$?$i!"(B\envar{PATH} $B4D6-JQ?t$,(B 
foozy@708:   \command{hg} 
foozy@708:   $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
foozy@708:   $B$H$$$&2DG=@-$b$"$j$^$9!#(B
foozy@708:   \envar{PATH} $B4D6-JQ?t$N@_Dj$rITE,Ev$J5/F0%9%/%j%W%H$G9T$C$F$$$k>l9g$K!"(B
foozy@708:   $B$3$N$h$&$J8=>]$,H/@8$7$^$9!#(B
foozy@708:   $B3F<+$N;HMQ$7$F$$$k%7%'%k$N%I%-%e%a%s%H$r3NG'$7$F$_$^$7$g$&(B\footnote{$BLuCm(B:
foozy@708:   $BNc$($P(B bash $B$N>l9g!"BPOCE*%m%0%$%s$+H]$+$G(B
foozy@708:   \sfilename{.bashrc}$B!"(B
foozy@708:   \sfilename{.bash\_profile}$B!"(B
foozy@708:   \sfilename{.profile} $B$*$h$S(B
foozy@708:   \sfilename{.login} $B$H$$$C$?3F%U%!%$%k$NFI$_9~$_$NM-L5$,JQ2=$7$^$9!#(B
foozy@708:   $B$^$?!"%G%#%9%H%j%S%e!<%7%g%s$K$h$C$F$O!"(B
foozy@708:   $BHsBPOCE*$J<B9T$N:]$K$O!"(B
foozy@708:   \dirname{/etc/bashrc} $B$K$h$k(B
foozy@708:   \dirname{/etc/profile.d} 
foozy@708:   $BG[2<$N@_Dj%U%!%$%kFI$_9~$_$,9T$o$l$J$$>l9g$,$"$j$^$9(B
foozy@708:   $B!J(B2.6.x $B7O%+!<%M%k%Y!<%9$N$b$N$OFI$_9~$^$J$$J}?K$NLOMM!K$N$G!"(B
foozy@708:   \envar{PYTHONPATH} $B$N7o$b4^$a$F!"(B
foozy@708:   $B%7%9%F%`%o%$%I$J@_Dj$r9T$&J}$OCm0U$,I,MW$G$9!#(B
foozy@708:   \Verb|ssh myserver env| 
foozy@708:   $B<B9T$G=PNO$5$l$k4D6-JQ?t0lMw$r3NG'$7$F$_$^$7$g$&!#(B
foozy@708:   }$B!#(B
foozy@708: 
foozy@708: \item \envar{PYTHONPATH} $B4D6-JQ?t$K$h$k(B
foozy@708:   Mercurial $B$N(B Python 
foozy@708:   $B%b%8%e!<%k3JG<%G%#%l%/%H%j$N;2>H$,I,MW$G$"$k%1!<%9$b$"$j$^$9!#(B
foozy@708:   $BITE,@Z$J@_Dj$@$C$?$j!"BPOCE*%m%0%$%s;~$K$N$_@_Dj$5$l$F$$$k2DG=@-$,$"$j$^$9!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: ssh $B7PM3$G$N(B \hgcmd{version} $B%3%^%s%I<B9T$,@.8y$7$?$J$i=`Hw$O40N;$G$9!#(B
foozy@708: $B%5!<%P!&%/%i%$%"%s%H$O6&$KLdBj2r7h:Q$_$H$J$j$^$7$?!#(B
foozy@708: $B%5!<%P>e$G8x3+$5$l$F$$$k(B $B%j%]%8%H%j$K!"(B
foozy@708: $BEv3:%f!<%6L>$K$h$k(B Mercurial $B$G$N%"%/%;%9$,2DG=$K$J$C$F$$$kH&$G$9!#(B
foozy@708: $B$3$3$^$G$N3NG'$r%/%j%"$7$?>e$G!"(B
foozy@708: Mercurial $B$H(B ssh $B$NO"7H$K$*$$$FLdBj$,H/@8$7$?>l9g!"(B
foozy@708: $BLdBjH/@8$N>u67$r$h$jL@3N$K$9$k$?$a$K!"(B
foozy@708: \hggopt{--debug} $B%*%W%7%g%s$rIU$1$F$N<B9T$r;n$7$F$_$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \subsection{Using compression with ssh}
foozy@708: 
foozy@708: ssh $B%W%m%H%3%k$r;HMQ$9$k>l9g!"(B
foozy@708: ssh $B%W%m%H%3%k<+?H$,DL?.;~$K%G!<%?05=L$r9T$&$?$a!"(B
foozy@708: Mercurial $B$O05=L$r9T$$$^$;$s!#(B
foozy@708: $B$7$+$7!"(Bssh $B%/%i%$%"%s%H$N!JDL>o$N!K4pDlF0:n$G$O!"(B
foozy@708: $B05=L$r(B\emph{$B9T$$$^$;$s(B}$B!#(B
foozy@708: 
foozy@708: $B9bB.$J(B LAN $B$N>l9g$r=|$1$P!JL5@~%M%C%H%o!<%/$G$"$C$F$b!K!"(B
foozy@708: $BDL?.;~$N05=L$O(B Mercurial 
foozy@708: $B$N%M%C%H%o!<%/7PM3$N=hM}$r82Cx$K9bB.2=$7$^$9!#(B
foozy@708: $BNc$($P(B WAN $B7PM3$G$NO"7H$N>l9g!"(B
foozy@708: $B$+$J$jBg$-$J%j%]%8%H%j$NJ#@=$KMW$9$k;~4V$,(B 51 $BJ,$+$i(B 17 $BJ,$KDc8:$7$?!"(B
foozy@708: $B$H$N@-G=7WB,Js9p$b$"$j$^$9!#(B
foozy@708: 
foozy@708: \command{ssh} $B$H(B \command{plink} $B$NN>J}$H$b!"(B
foozy@708: $BDL?.;~05=L$rM-8z2=$9$k(B
foozy@708: \cmdopt{ssh}{-C} $B%*%W%7%g%s$r<u$1IU$1$^$9!#(B
foozy@708: \hgrc\ $B%U%!%$%k$r0J2<$N$h$&$KJT=8$9$k$3$H$G!"(B
foozy@708: 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
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   [ui]
foozy@708:   ssh = ssh -C
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \command{ssh} $B$r;HMQ$7$F$$$k>l9g$O!"(B
foozy@708: $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
foozy@708: $B$3$N@_Dj$r9T$&$K$O!"(B
foozy@708: $B%[!<%`%G%#%l%/%H%jG[2<$N(B
foozy@708: \sfilename{.ssh/config} $B%U%!%$%k(B
foozy@708: $B!JL5$$>l9g$O?75,$K:n@.$7$^$9!K$K0J2<$N$h$&$K5-=R$7$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   Host hg
foozy@708:     Compression yes
foozy@708:     HostName hg.example.com
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B>e5-$N5-=R$O!"(B
foozy@708: \texttt{hg} $B$H$$$&JLL>!J(Balias$B!K$r:n@.$7$^$9!#(B
foozy@708: \command{ssh} $B<B9T$N:]$N%3%^%s%I9T5-=R$d!"(B
foozy@708: Mercurial $B$N(B \texttt{ssh} $B%W%m%H%3%k$K$*$1$k(B URL $B$H$7$F!"(B
foozy@708: \texttt{hg} $B$r!J%[%9%HL>$H$7$F!K;HMQ$7$?>l9g!"(B
foozy@708: \command{ssh} $B$ODL?.;~05=L$r9T$$$D$D(B \texttt{hg.example.com} $B$K@\B3$7$^$9!#(B
foozy@708: $B$3$N@_Dj$K$h$j!"(B
foozy@708: $BF~NO$NJXMx$J>JN,L>$H!"05=L;XDj$NN>J}$r<j$K$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \section{Serving over HTTP using CGI}
foozy@708: \label{sec:collab:cgi}
foozy@708: 
foozy@708: $B0U5$9~$_<!Bh$G$O!"(B
foozy@708: Mercurial $B$N(B CGI $B%$%s%?%U%'!<%9$N@_Dj$O!"(B
foozy@708: $B?tJ,$N$b$N$r?t;~4V$K$7$F$7$^$&2DG=@-$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $B:G$bC1=c$JNc$+$i=i$a$F!"(B
foozy@708: $B$h$jJ#;($J@_Dj$X$H8~$1$F?J$a$F$f$-$^$7$g$&!#(B
foozy@708: $B:G$b4pK\E*$J%1!<%9$G$9$i!"(B
foozy@708: $B%&%'%V%5!<%P$N@_Dj%U%!%&%k$NFI$_=q$-$r9T$&I,MW$,=P$F$/$k$3$H$G$7$g$&!#(B
foozy@708: 
foozy@708: \begin{note}
foozy@708:   $B%&%'%V%5!<%P$N@_Dj$OJ#;($G!"07$$$K$/$/!"3n$D%7%9%F%`0MB8@-$N9b$$:n6H$G$9!#(B
foozy@708:   $B$=$N$?$aK\=q$G$O!"(B
foozy@708:   $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
foozy@708:   $B0J9_$N5-=R$O!"?5=E$5$H3F<+$NH=CG$r$b$C$FFI$_?J$a$k$h$&$K$7$F$/$@$5$$!#(B
foozy@708:   $BBt;34V0c$($?$j!"%5!<%P$N%(%i!<%m%02r@O$K;~4V$rHq$d$93P8g$,I,MW$G$7$g$&!#(B
foozy@708: \end{note}
foozy@708: 
foozy@708: \subsection{Web server configuration checklist}
foozy@708: 
foozy@708: $BFI$_?J$a$kA0$K!"(B
foozy@708: $B%7%9%F%`$N@_Dj>u67$K4X$9$k4v$D$+$N3NG'$r9T$$$^$7$g$&!#(B
foozy@708: 
foozy@708: \begin{enumerate}
foozy@708: \item $B%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$9$+!)(B
foozy@708:   Mac OS X $B$O(B Apache $B$,%$%s%9%H!<%k$5$l$?>uBV$G=P2Y$5$l$^$9$,!"(B
foozy@708:   $BB?$/$N%7%9%F%`$G$O%&%'%V%5!<%P$O%$%s%9%H!<%k$5$l$F$$$^$;$s!#(B
foozy@708: 
foozy@708: \item $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$k>l9g!"(B
foozy@708:   $B$=$l$O<B:]$K2TF0$7$F$$$^$9$+!)(B
foozy@708:   $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$?>l9g$G$b!"(B
foozy@708:   $BB?$/$N%7%9%F%`$N4pDl>uBV$O!"%&%'%V%5!<%P$,L58z2=$5$l$F$$$^$9!#(B
foozy@708: 
foozy@708: \item CGI $B$r2TF0$5$;$h$&$H$7$F$$$k%G%#%l%/%H%j$O!"(B
foozy@708:   $B%&%'%V%5!<%P$N@_Dj$G(B CGI $B$N<B9T$,5v2D$5$l$F$$$^$9$+!)(B
foozy@708:   $BB?$/$N%&%'%V%5!<%P$N4pDl>uBV$O!"(B
foozy@708:   CGI $B%W%m%0%i%`$N<B9T5!G=$,L@<(E*$KL58z2=$5$l$F$$$^$9!#(B
foozy@708: 
foozy@708: \end{enumerate}
foozy@708: 
foozy@708: $B%&%'%V%5!<%P$,%$%s%9%H!<%k$5$l$F$$$J$$>l9g$d!"(B
foozy@708: Apache $B%&%'%V%5!<%P$N@_Dj7P83$,$"$^$jL5$$>l9g$K$O!"(B
foozy@708: Apache $B%&%'%V%5!<%P$NBe$o$j$K(B
foozy@708: \texttt{lighttpd} $B%&%'%V%5!<%P$NMxMQ$r$*A&$a$7$^$9!#(B
foozy@708: Apache $B%&%'%V%5!<%P$N@_Dj$O!"(B
foozy@708: $B6E$C$F$$$F3n$D$o$+$j$K$/$$$H$$$&I>H=$K8+9g$&$b$N$,$"$j$^$9!#(B
foozy@708: \texttt{lighttpd} $B$O(B Apache $B%&%'%V%5!<%PDx$N5!G=$OL5$$$b$N$N!"(B
foozy@708: $BB-$j$J$$5!G=$NKX$I$,(B Mercurial $B%j%]%8%H%j$N1?MQ$K$O4X78$J$$$b$N$G$9!#(B
foozy@708: $B$=$l$K2C$($F!"(B
foozy@708: $BL@$i$+$K(B \texttt{lighttpd} $B$O(B
foozy@708: Apache $B%&%'%V%5!<%P$h$j$b4JC1$KMxMQ$,3+;O$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{Basic CGI configuration}
foozy@708: 
foozy@708: Unix $BE*$J%7%9%F%`$rMxMQ$7$F$$$k>l9g!"(B
foozy@708: $B%&%'%V%Z!<%8$H$7$F8x3+$9$k$?$a$N(B
foozy@708: \dirname{public\_html} $B$N$h$&$J%G%#%l%/%H%j$r!"(B
foozy@708: $B%[!<%`%G%#%l%/%H%jG[2<$K;}$D$N$,6&DLG'<1$H$J$C$F$$$^$9!#(B
foozy@708: $B$3$N%G%#%l%/%H%jD>2<$KCV$$$?(B
foozy@708: \filename{foo} $B$H$$$&L>A0$N%U%!%$%k$O!"(B
foozy@708: \texttt{http://www.example.com/\~username/foo} $B$H$$$&(B
foozy@708: URL $B$G;2>H2DG=$K$J$j$^$9!#(B
foozy@708: 
foozy@708: $B@_Dj$r;O$a$k$KEv$?$C$F!"(B
foozy@708: Mercurial $B$N%$%s%9%H!<%k@h$K3JG<$5$l$F$$$k(B
foozy@708: \sfilename{hgweb.cgi} $B%9%/%j%W%H$N=j:_$r3NG'$7$F$/$@$5$$!#(B
foozy@708: $B%7%9%F%`>e$N=j:_$,$9$0$K$O$o$+$i$J$+$C$?>l9g$O!"(B
foozy@708: Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
foozy@708: \url{http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi}
foozy@708: $B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B>e5-%9%/%j%W%H$r(B
foozy@708: \dirname{public\_html} $BG[2<$KG[CV$7!"(B
foozy@708: $B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   cp .../hgweb.cgi ~/public_html
foozy@708:   chmod 755 ~/public_html/hgweb.cgi
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \command{chmod} $B%3%^%s%I$X$N(B \texttt{755} $B0z?t;XDj$O!"(B
foozy@708: $B%9%/%j%W%H$K<B9T2DG=8"8B$rIUM?$9$k0J>e$NIU2CE*$J;XDj$r0UL#$7$^$9!#(B
foozy@708: $B$3$N@_Dj$K$h$j!"%9%/%j%W%H$,C/$+$i$b<B9T2DG=$K$J$k$HF1;~$K!"(B
foozy@708: ``group'' $B$*$h$S(B ``other'' $B$K$h$k=q$-9~$_8"8B$,(B\emph{$BGmC%(B}$B$5$l$^$9!#(B
foozy@708: $B$3$l$i$N=q$-9~$_8"8B$rM-8z$J$^$^$K$7$?>l9g!"(B
foozy@708: Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
foozy@708: $B$*$=$i$/%9%/%j%W%H$N<B9T$r5qH]$9$k$G$7$g$&!#(B
foozy@708: $B<B$N$H$3$m(B \texttt{suexec} $B$O!"(B
foozy@708: $B%9%/%j%W%H$,G[CV$5$l$F$$$k(B\emph{$B%G%#%l%/%H%j(B}$B$KBP$9$k(B
foozy@708: ``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
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   chmod 755 ~/public_html
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: \subsubsection{What could \emph{possibly} go wrong?}
foozy@708: \label{sec:collab:wtf}
foozy@708: 
foozy@708: CGI $B$rG[CV$7$?$J$i$P!"(B
foozy@708: $B%&%'%V%V%i%&%6$r5/F0$7$F(B
foozy@708: \url{http://myhostname/~myuser/hgweb.cgi} $B$KAjEv$9$k(B
foozy@708: URL $B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
foozy@708: $BC"$7!"$A$g$C$H$7$?<:GT$K$O(B\emph{$B?H9=$($F$*$$$F$/$@$5$$(B}$B!#(B
foozy@708: $B=jK>$N(B URL $B$X$N%"%/%;%9$,<:GT$9$k8x;;$OHs>o$K9b$/!"(B
foozy@708: $B$=$NM}M3$OB?4t$KEO$j$^$9!#(B
foozy@708: $B<B:]$N$H$3$m!"(B
foozy@708: $B0J2<$N5/$3$jF@$k%(%i!<MW0x$NA4$F$Gm5$/2DG=@-$,$"$j$^$9$+$i!"(B
foozy@708: $B$3$N@h$OCm0U?<$/FI$_?J$a$F$/$@$5$$!#(B
foozy@708: $B0J2<$G=R$Y$kLdBj$O!"(B
foozy@708: $B$^$C$5$i$J>uBV$+$i%$%s%9%H!<%k$7$?(B Apache $B$r;H$$!"(B
foozy@708: $B$3$N<BNc$r9T$&$?$a$K?7$?$K@8@.$7$?%f!<%6%"%+%&%s%H$G!"(B
foozy@708: Fedora~7 $B>e$G:n6H$r<B;\$7$?:]$K!"(B
foozy@708: $BI.<T$,<B:]$KD>LL$7$?A4$F$NLdBj$G$9!#(B
foozy@708: 
foozy@708: $B;HMQ$7$F$$$k%&%'%V%5!<%P$O!"(B
foozy@708: $B%f!<%6Kh$N%G%#%l%/%H%j$rL58z2=$7$F$$$k$+$b$7$l$^$;$s!#(B
foozy@708: Apache $B$r;HMQ$7$F$$$k>l9g$O!"(B
foozy@708: $B@_Dj%U%!%$%kCf$K(B \texttt{UserDir} $B;XDj$NM-L5$r3NG'$7$F$/$@$5$$!#(B
foozy@708: $B$3$N;XDj$,L5$$>l9g!"%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
foozy@708: $B;XDj$,M-$C$F$b(B\texttt{$BL58z2=$5$l$F$$$k(B}$B>l9g$b!"(B
foozy@708: $B%f!<%6Kh%G%#%l%/%H%j$OL58z$K$J$j$^$9!#(B
foozy@708: $BM-8z$J(B \texttt{UserDir} $B;XDj$,$"$k>l9g!"(B
foozy@708: \texttt{UserDir} $B;XDj$G5-=R$5$l$F$$$kJ8;zNs(B
foozy@708: $B!JNc$($P(B \dirname{public\_html}$B!K$,!"(B
foozy@708: $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
foozy@708: 
foozy@708: $B%U%!%$%k$N%"%/%;%98"8B$,87$7$9$.$k2DG=@-$b$"$j$^$9!#(B
foozy@708: $B%&%'%V%5!<%P$O!"(B
foozy@708: $BBP>]$H$J$k%f!<%6$N%[!<%`%G%#%l%/%H%j!"(B
foozy@708: $B$*$h$S(B \dirname{public\_html} 
foozy@708: $BG[2<$N%U%!%$%k!&%G%#%l%/%H%j$NFI$_9~$_$,$G$-$J$1$l$P$J$j$^$;$s!#(B
foozy@708: $BE,@Z$J8"8B@_Dj$r9T$&$?$a$N4JC1$J<j=g$r0J2<$K<($7$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   chmod 755 ~
foozy@708:   find ~/public_html -type d -print0 | xargs -0r chmod 755
foozy@708:   find ~/public_html -type f -print0 | xargs -0r chmod 644
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B8"8B@_Dj$K4X$9$kB>$NMW0x$N2DG=@-$,$"$k>l9g$O!"(B
foozy@708: $B%V%i%&%6$G$N=jK>$N(B URL $B%"%/%;%9;~$K!"(B
foozy@708: $B40A4$K6u$N2hLL$,I=<($5$l$k$3$H$G$7$g$&!#(B
foozy@708: $B$3$N>l9g$O!"$*$=$i$/%"%/%;%98"8B$,(B\emph{$B4K$9$.$k(B}$B$N$G$7$g$&!#(B
foozy@708: $BNc$($P(B Apache $B$N(B \texttt{suexec} $B%5%V%7%9%F%`$O!"(B
foozy@708: group $B$J$$$7(B other $B$K=q$-9~$_8"8B$,IUM?$5$l$?%9%/%j%W%H$O<B9T$7$^$;$s!#(B
foozy@708: 
foozy@708: $B;HMQ$7$F$$$k%&%'%V%5!<%P$,!"(B
foozy@708: $B%f!<%6Kh%G%#%l%/%H%jG[2<$N(B CGI $B%W%m%0%i%`$N<B9T$r!"(B
foozy@708: $B6X;_$9$k$h$&$K@_Dj$5$l$F$$$k2DG=@-$bM-$j$^$9!#(B
foozy@708: $BI.<T$N(B Fedora~7 $B%7%9%F%`$K$*$1$k(B Apache $B$N!"(B
foozy@708: $B=i4|>uBV$N%f!<%6Kh@_Dj$r0J2<$K<($7$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   <Directory /home/*/public_html>
foozy@708:       AllowOverride FileInfo AuthConfig Limit
foozy@708:       Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
foozy@708:       <Limit GET POST OPTIONS>
foozy@708:           Order allow,deny
foozy@708:           Allow from all
foozy@708:       </Limit>
foozy@708:       <LimitExcept GET POST OPTIONS>
foozy@708:           Order deny,allow
foozy@708:           Deny from all
foozy@708:       </LimitExcept>
foozy@708:   </Directory>
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $BBP>]$H$J$k(B Apache $B@_Dj%U%!%$%kCf$K;w$?$h$&$J(B
foozy@708: \texttt{Directory} $B@_Dj$,$"$k>l9g!"(B
foozy@708: \texttt{Options} $B;XDj$KCmL\$7$F$/$@$5$$!#(B
foozy@708: \texttt{ExecCGI} $B$,;XDj$5$l$F$$$J$$>l9g$O0lMwKvHx$K$3$l$rDI2C$7!"(B
foozy@708: $B%&%'%V%5!<%P$r:F5/F0$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: Apache $B$,(B CGI $B$r<B9T$9$k$N$G$O$J$/!"(B
foozy@708: CGI $B%9%/%j%W%H$NFbMF$=$N$b$N$rJV5Q$7$F$-$?>l9g$O!"(B
foozy@708: $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
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   AddHandler cgi-script .cgi
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B<!$KLdBj$NH/@8$7F@$k%1!<%9$G$O!"(B
foozy@708: Python $B$N%P%C%/%H%l!<%9$,I=<($5$l!"(B
foozy@708: \texttt{mercurial} $B4XO"%b%8%e!<%k$,%$%s%]!<%H(B
foozy@708: $B!J(Bimport$B!K$G$-$J$$;]$rEA$($F$$$k$3$H$G$7$g$&!#(B
foozy@708: $B=jK>$N7k2L$OF@$i$l$F$$$^$;$s$,!"(B
foozy@708: $B%&%'%V%5!<%P$O(B CGI $B%9%/%j%W%H$N<B9T$r9T$&$h$&$K$J$C$?$N$G!"(B
foozy@708: $B@hDx$N>uBV$+$i$OA0?J$7$F$$$^$9!*(B
foozy@708: $B%$%s%]!<%H$,$G$-$J$$;]$N%(%i!<$O!"(B
foozy@708: $B%7%9%F%`%o%$%I$GMxMQ2DG=$J(B Mercurial $B$G$O$J$/!"(B
foozy@708: $B$*$=$i$/8D?ME*$K%$%s%9%H!<%k$7$?(B Mercurial 
foozy@708: $B$r<B9T$7$F$$$k>l9g$K$N$_H/@8$7$^$9!#(B
foozy@708: $B%&%'%V%5!<%P$,(B CGI $B%W%m%0%i%`$r<B9T$9$k>l9g!"(B
foozy@708: $B3F8D?M$NBPOCE*%m%0%$%s%;%C%7%g%s$G<B;\$5$l$F$$$k4D6-JQ?t;XDj$,L5$$!"(B
foozy@708: $B$H$$$&$3$H$rK:$l$J$$$G$/$@$5$$!#(B
foozy@708: $B$3$N%(%i!<$,H/@8$7$?>l9g$O!"(B
foozy@708: \envar{PYTHONPATH} $B4D6-JQ?t@_Dj$,E,@Z$K$J$k$h$&$K(B
foozy@708: \sfilename{hgweb.cgi} $B$N5-=R$rJT=8$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B:G=*E*$K!"(B
foozy@708: \dirname{/path/to/repository} $B$,8+$D$+$i$J$$;]$rEA$($k(B
foozy@708: Python $B$N%P%C%/%H%l!<%9$,(B\emph{$B3N<B$K(B}$BI=<($5$l$k$3$H$G$7$g$&!#(B
foozy@708: \sfilename{hgweb.cgi} $B%9%/%j%W%H$rJT=8$7$F!"(B
foozy@708: $BJ8;zNs(B \dirname{/path/to/repository} 
foozy@708: $B$r<B:]$K8x3+$7$?$$%j%]%8%H%j$X$N@dBP%Q%9$GCV$-49$($F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B$3$3$^$GMh$l$P!"(B
foozy@708: $B%&%'%V%V%i%&%6$G%Z!<%8$r%j%m!<%I$7$?:]$K!"(B
foozy@708: $Be:No$K(B HTML $B$G@07A$5$l$?%j%]%8%H%jMzNr$NI=<($r8+$k$3$H$,$G$-$kH&$G$9!#(B
foozy@708: $B$*Hh$lMM$G$9!#(B
foozy@708: 
foozy@708: \subsubsection{Configuring lighttpd}
foozy@708: 
foozy@708: $BE0DlE*$K<B83$9$k$?$a$K!"(B
foozy@708: $B$3$l$^$G(B Apache $B$K4X$7$F@bL@$7$?$N$HF1MM$K!"(B
foozy@708: $B6aG/?M5$$,9b$^$C$F$$$k(B \texttt{lighttpd} $B%&%'%V%5!<%P$G!"(B
foozy@708: $BF1$8%j%]%8%H%j$r8x3+$9$k$?$a$N@_Dj5-=R$KD)@o$7$F$_$^$7$?!#(B
foozy@708: Apache $B$K$D$$$F$3$l$^$G35@b$7$F$-$?A4$F$NLdBj$O4{$K9nI~:Q$_$G$9$7!"(B
foozy@708: $B$=$NKX$I$O%&%'%V%5!<%P<BAu$K0MB8$7$^$;$s!#(B
foozy@708: $B7k2L$H$7$F!"(B
foozy@708: $B%U%!%$%k!&%G%#%l%/%H%j$N8"8B@_Dj$,BEEv$G$"$k$3$H$H!"(B
foozy@708: \sfilename{hgweb.cgi} $B%9%/%j%W%H$,E,@Z$K2~JQ:Q$_$G$"$k$3$H$O!"(B
foozy@708: $B$"$kDxEY3N?.$G$-$^$9!#(B
foozy@708: 
foozy@708: $B0lC6(B Apache $B$G$N8x3+$K@.8y$7$F$$$l$P!"(B
foozy@708: \texttt{lighttpd} $B$G$N%j%]%8%H%j8x3+$O4JC1(B
foozy@708: $B!J8@$$49$($k$J$i!"(B
foozy@708: \texttt{lighttpd} $B$r;HMQ$9$k>l9g$G$b!"(B
foozy@708: $BA0=R$N(B Apache $B$K4X$9$k@bL@$rFI$`$Y$-$H8@$($^$9(B
foozy@708: $B!K$G$9!#(B
foozy@708: $B=i4|>uBV$G(B
foozy@708: \texttt{mod\_cgi} $B$*$h$S(B \texttt{mod\_userdir} $B$,L58z2=$5$l$F$$$?>l9g!"(B
foozy@708: $B$3$l$i$rM-8z2=$9$k$?$a$K!"(B
foozy@708: $B$^$:$O!"(B
foozy@708: $B@_Dj%U%!%$%k$N(B \texttt{mod\_access} $B%;%/%7%g%s$rJT=8$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $B$=$N8e!"$3$l$i$N%b%8%e!<%k$r@_Dj$9$k$?$a$K!"(B
foozy@708: $B@_Dj%U%!%$%kKvHx$K?t9T$[$IDI2C$7$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   userdir.path = "public_html"
foozy@708:   cgi.assign = ( ".cgi" => "" )
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B$3$N5-=R$K$h$j!"(B
foozy@708: \texttt{lighttpd} $B$O%f!<%6Kh$N%G%#%l%/%H%j$*$h$S(B CGI $B$rG'<1$7$^$9!#(B
foozy@708: Apache $B$h$j$bA0$K(B
foozy@708: \texttt{lighttpd} $B$N@_Dj$r$7$?$H$7$?$i!"(B
foozy@708: $BKX$I4V0c$$$J$/!"(B
foozy@708: Apache 
foozy@708: $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
foozy@708: $B$7$+$7(B
foozy@708: Apache $B$N;HMQ7P83$,#1#0G/0J>e$"$j!"(B
foozy@708: $B3n$D=i$a$F$N(B \texttt{lighttpd} $B;HMQ$G$O$"$k$b$N$N!"(B
foozy@708: Apache $B$N@_Dj$h$j$b(B \texttt{lighttpd} $B$N$=$l$OCx$7$/MF0W$G$"$k$H;W$o$l$^$9!#(B
foozy@708: 
foozy@708: \subsection{Sharing multiple repositories with one CGI script}
foozy@708: 
foozy@708: $BC10l$N%j%]%8%H%j$N$_$7$+8x3+$G$-$J$$$H$$$&$N$O!"(B
foozy@708: \sfilename{hgweb.cgi} $B%9%/%j%W%H$NG:$^$7$$@)Ls$G$9!#(B
foozy@708: $BF1$8%9%/%j%W%H(B\footnote{$BLuCm(B: $B87L)$K$O!"(B
foozy@708: $B8x3+BP>]%j%]%8%H%j$N%Q%9$,0[$J$k$N$G$9$,!"(B
foozy@708: $B35$M!VF1$8!W$H8@$C$FNI$$$G$7$g$&!#(B
foozy@708: }$B$r0[$J$kL>A0$GJ#@=$9$k!"(B
foozy@708: $B$H$$$&LLE]$JJ}K!$h$j$O!"(B
foozy@708: \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$N;HMQ$,$*A&$a$G$9!#(B
foozy@708: 
foozy@708: \sfilename{hgwebdir.cgi} $B$N@_Dj<j=g$O!"(B
foozy@708: \sfilename{hgweb.cgi} $B$h$j$bB?>/9~$_F~$C$F$$$^$9!#(B
foozy@708: $B$^$:;O$a$K(B
foozy@708: $B%9%/%j%W%H$N%3%T!<$rF~<j$7$^$9!#(B
foozy@708: $B<j6a$KL5$$>l9g$O(B
foozy@708: Mercurial $B$N%^%9%?!<%j%]%8%H%j$+$i(B
foozy@708: \url{http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi}
foozy@708: $B$rD>@\%@%&%s%m!<%I$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \dirname{public\_html} $BG[2<$K>e5-%9%/%j%W%H$rG[CV$7!"(B
foozy@708: $B<B9T2DG=$H$J$k$h$&$K8"8B@_Dj$r9T$$$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   cp .../hgwebdir.cgi ~/public_html
foozy@708:   chmod 755 ~/public_html ~/public_html/hgwebdir.cgi
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B4pK\E*$J@_Dj$,:Q$s$@$J$i!"(B
foozy@708: $B%V%i%&%6$G(B \url{http://myhostname/~myuser/hgwebdir.cgi}
foozy@708: $B$K%"%/%;%9$7$F$_$^$7$g$&!#(B
foozy@708: $B6u$N%j%]%8%H%j%j%9%H$,I=<($5$l$kH&$G$9!#(B
foozy@708: $B2?$bI=<($5$l$J$$$+!"%(%i!<%a%C%;!<%8$,I=<($5$l$k>l9g$O!"(B
foozy@708: \ref{sec:collab:wtf}~$B@a$G@bL@$7$?@x:_E*LdBj0lMw$r0lDL$j3NG'$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O30It@_Dj%U%!%$%k$rI,MW$H$7$^$9!#(B
foozy@708: $B4pDl>uBV$N(B
foozy@708: \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O!"(B
foozy@708: $B<+?H$HF1$8%G%#%l%/%H%j$K3JG<$5$l$?(B
foozy@708: \sfilename{hgweb.config} $B%U%!%$%k$rFI$_9~$b$&$H$7$^$9!#(B
foozy@708: $B$3$N%U%!%$%k$r@8@.$7!"(B
foozy@708: $BC/$KBP$7$F$bFI$_=P$78"8B$rIUM?$7$J$1$l$P$J$j$^$;$s!#(B
foozy@708: $B$3$N%U%!%$%k$N5-=R7A<0$O!"(B
foozy@708: Windows $B$K$*$1$k(B ``ini'' $B%U%!%$%k$N$=$l$HF1$8$G!"(B
foozy@708: Python $B$N(B
foozy@708: \texttt{ConfigParser}~\cite{web:configparser} 
foozy@708: $B$K$h$j2r@O2DG=$J7A<0$G$9!#(B
foozy@708: 
foozy@708: $B:G$b4JC1$K(B \sfilename{hgwebdir.cgi} $B$r@_Dj$9$k$K$O!"(B
foozy@708: \texttt{collections} $B$H$$$&L>A0$N%;%/%7%g%s$r@_Dj$7$F$/$@$5$$!#(B
foozy@708: $B$3$N%;%/%7%g%s$r5-=R$9$k$3$H$G!"(B
foozy@708: $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
foozy@708: $B$3$N%;%/%7%g%s$N5-=R$O0J2<$N$h$&$K$J$j$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   [collections]
foozy@708:   /my/root = /my/root
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: Mercurial $B$O$3$N5-=R$r2r<a$9$k$KEv$?$j!"(B
foozy@708: ``\texttt{=}'' 
foozy@708: $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
foozy@708: ``\texttt{=}'' $B5-9f$N(B\emph{$B:8JU(B}$B$N%F%-%9%H$K9gCW$9$kItJ,$r!"(B
foozy@708: $B%&%'%V%$%s%?%U%'!<%9$G$N0lMwI=<($G<B:]$K8x3+$5$l$kL>A0$+$i=|30$7$^$9!#(B
foozy@708: $B=|30=hM}$N8e$K;D$C$?%Q%9MWAG$O!"(B``$B2>A[%Q%9(B''$B$H8F$P$l$^$9!#(B
foozy@708: 
foozy@708: $BNc$H$7$F(B
foozy@708: \dirname{/my/root/this/repo} $B$K%j%]%8%H%j$,$"$k$H$7$?>l9g!"(B
foozy@708: CGI $B%9%/%j%W%H$OKAF,$N(B
foozy@708: \dirname{/my/root} $BItJ,$rL>A0$+$i=|30$7!"(B
foozy@708: $B2>A[%Q%9$H$7$F(B \dirname{this/repo} $B$r;}$D%j%]%8%H%j$H$7$F8x3+$7$^$9!#(B
foozy@708: CGI $B%9%/%j%W%H$N4pDl(B URL $B$r(B
foozy@708: \url{http://myhostname/~myuser/hgwebdir.cgi} $B$H$9$k$H!"(B
foozy@708: $B$3$N%j%]%8%H%j$N40A4$J(B URL $B$O!"(B
foozy@708: \url{http://myhostname/~myuser/hgwebdir.cgi/this/repo} $B$H$J$j$^$9!#(B
foozy@708: 
foozy@708: $B$3$N@_Dj5-=RNc$G$N:8JU$r(B \dirname{/my/root} $B$+$i(B
foozy@708: \dirname{/my} $B$KJQ99$7$?>l9g!"(B
foozy@708: \sfilename{hgwebdir.cgi} $B$O%j%]%8%H%jL>$+$i(B
foozy@708: \dirname{/my} $B$N$_$r#z#yJb30$9$k$N$G!"(B
foozy@708: $B2>A[%Q%9$O(B \dirname{this/repo} $B$G$O$J$/(B
foozy@708: \dirname{root/this/repo} $B$H$J$j$^$9!#(B
foozy@708: 
foozy@708: \sfilename{hgwebdir.cgi} $B$O!"(B
foozy@708: $B@_Dj%U%!%$%kCf$N(B \texttt{collections}
foozy@708: $B%;%/%7%g%s$GNs5s$5$l$?8D!9$N%G%#%l%/%H%j$KBP$7$F!"(B
foozy@708: $B:F5"E*$K%j%]%8%H%j$rC5$7$^$9$,!"(B
foozy@708: $B8+$D$+$C$?%j%]%8%H%j$+$i99$K2<$X$N:F5"E*C5:w$O(B\texttt{$B9T$$$^$;$s(B}$B!#(B
foozy@708: 
foozy@708: \texttt{collections} $B$N5!9=$O!"(B
foozy@708: $BB?$/$N%j%]%8%H%j$r(B``fire and forget''$B:nK!$G8x3+$9$k$N$KE,$7$F$$$^$9!#(B
foozy@708: CGI $B$d@_Dj%U%!%$%k$N5-=R$O0lEY$G;vB-$j$^$9!#(B
foozy@708: $B@_Dj$,:Q$s$@$J$i!"(B
foozy@708: \sfilename{hgwebdir.cgi} 
foozy@708: $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
foozy@708: $B%j%]%8%H%j$N8x3+!&Hs8x3+$rG$0U$N;~E@$G9T$&$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsubsection{Explicitly specifying which repositories to publish}
foozy@708: 
foozy@708: \sfilename{hgwebdir.cgi} $B%9%/%j%W%H$O(B
foozy@708: \texttt{collections} $B$K$h$k8x3+$N;EAH$_$K2C$($F!"(B
foozy@708: $BFCDj$N0lMw;XDj$K$h$k%j%]%8%H%j8x3+$r$9$k$3$H$b$G$-$^$9!#(B
foozy@708: $B$3$NJ}K!$G$N8x3+$r$9$k$K$O!"(B
foozy@708: $B0J2<$N$h$&$J7A<0$NFbMF$r;}$D(B
foozy@708: \texttt{paths} $B%;%/%7%g%s$r5-=R$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{codesample2}
foozy@708:   [paths]
foozy@708:   repo1 = /my/path/to/some/repo
foozy@708:   repo2 = /some/path/to/another
foozy@708: \end{codesample2}
foozy@708: 
foozy@708: $B>e5-$NNc$G$O!"8D!9$NDj5A$N:8JU$,2>A[%Q%9!J(BURL $BCf$K8=$l$k%Q%9MWAG!K!"(B
foozy@708: $B1&JU$,%j%]%8%H%j$X$N%Q%9$H$J$j$^$9!#(B
foozy@708: $B2>A[%Q%9$N;XDj$H!"(B
foozy@708: $B%U%!%$%k%7%9%F%`>e$N%j%]%8%H%j0LCV$K$O!"(B
foozy@708: $B2?$N4XO"@-$bL5$$E@$KCm0U$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $BC10l$N@_Dj%U%!%$%kCf$G(B
foozy@708: \texttt{collections} $B$H(B
foozy@708: \texttt{paths} $B$NN>J}$rF1;~$K;HMQ$9$k$3$H$b2DG=$G$9!#(B
foozy@708: 
foozy@708: \begin{note}
foozy@708:   $BF10l$N2>A[%Q%9$KJ#?t$N%j%]%8%H%j$,4XO"IU$1$i$l$F$$$k>l9g!"(B
foozy@708:   \sfilename{hgwebdir.cgi} $B$O%(%i!<$rDLCN$7$^$;$s!#(B
foozy@708:   $B$=$NBe$o$j$K!"(B
foozy@708:   \sfilename{hgwebdir.cgi} $B$N?6$kIq$$$OM=A[$G$-$J$$$b$N$H$J$j$^$9!#(B
foozy@708: \end{note}
foozy@708: 
foozy@708: \subsection{Downloading source archives}
foozy@708: 
foozy@708: Mercurial $B$N%&%'%V%$%s%?%U%'!<%97PM3$G!"(B
foozy@708: $BG$0U$N%j%S%8%g%s$N%"!<%+%$%V$r%@%&%s%m!<%I$9$k$3$H$,2DG=$G$9!#(B
foozy@708: $B$3$N%"!<%+%$%V$K$O!"(B
foozy@708: $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
foozy@708: $B%j%]%8%H%j%G!<%?ItJ,$O4^$^$l$^$;$s!#(B
foozy@708: 
foozy@708: $B$3$N5!G=$O4{Dj>uBV$G$OL58z2=$5$l$F$$$^$9!#(B
foozy@708: $B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
foozy@708: \rcitem{web}{allow\_archive} $B9`L\$r(B
foozy@708: \hgrc $B%U%!%$%k$N(B \rcsection{web} $B%;%/%7%g%s$KDI2C$7$F$/$@$5$$(B\footnote{$BLuCm(B:
foozy@708: $B$3$N$3$H$+$i!"(B
foozy@708: $B%"!<%+%$%V%@%&%s%m!<%I$NM-8z2=!&L58z2=@_Dj$,!"(B
foozy@708: \sfilename{hgwebdir.cgi} $BC10L$G$O$J$/!"(B
foozy@708: $B%j%]%8%H%jC10L$G$N@_Dj$G$"$k$3$H$,$o$+$j$^$9!#(B}$B!#(B
foozy@708: 
foozy@708: \subsection{Web configuration options}
foozy@708: 
foozy@708: Mercurial $B$N%&%'%V%$%s%?%U%'!<%9(B
foozy@708: $B!J(B\hgcmd{serve} $B%3%^%s%I$*$h$S(B
foozy@708: \sfilename{hgweb.cgi} $B$J$$$7(B \sfilename{hgwebdir.cgi} $B%9%/%j%W%H!K(B
foozy@708: $B$K$OJQ992DG=$J@_Dj9`L\$,B??t$"$j$^$9!#(B
foozy@708: $B$3$l$i$N@_Dj9`L\$O(B
foozy@708: \rcsection{web} $B%;%/%7%g%s$KB0$7$F$$$^$9!#(B
foozy@708: 
foozy@708: \begin{description}
foozy@708: 
foozy@708: \item[\rcitem{web}{allow\_archive}] 
foozy@708:   Mercurial $B$N%"!<%+%$%V%@%&%s%m!<%I5!G=$rM-8z2=$9$k$+H]$+$r;XDj!#(B
foozy@708:   $B$3$N5!G=$rM-8z2=$7$?>l9g%&%'%V%$%s%?%U%'!<%9$NMxMQ<T$O!"(B
foozy@708:   $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
foozy@708:   $B$3$N5!G=$rM-8z2=$9$k$K$O!"(B
foozy@708:   $B0J2<$KNs5s$5$l$k%-!<%o!<%I$NJB$S$r(B
foozy@708:   \rcitem{web}{allow\_archive} $B9`L\$K;XDj$9$kI,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708:   \begin{description}
foozy@708:   \item[\texttt{bz2}] \texttt{bzip2} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
foozy@708:     $B$3$N7A<0$O:G$b9b$$05=LN($rF@$i$l$^$9$,!"(B
foozy@708:     $B%5!<%PB&$N(B CPU $B$r:G$b9s;H$7$^$9!#(B
foozy@708: 
foozy@708:   \item[\texttt{gz}] \texttt{gzip} $B05=L$5$l$?(B \command{tar} $B%"!<%+%$%V7A<0!#(B
foozy@708: 
foozy@708:   \item[\texttt{zip}] LZW $B05=L$5$l$?(B \command{zip} $B%"!<%+%$%V7A<0!#(B
foozy@708:     $B$3$N7A<0$O05=LN($,:G$bNt$j$^$9$,!"(BWindows $B4D6-$G$O9-$/;HMQ$5$l$F$$$^$9!#(B
foozy@708: 
foozy@708:   \end{description}
foozy@708: 
foozy@708:   $BCM$r;XDj$7$J$+$C$?$j!"(B
foozy@708:   \rcitem{web}{allow\_archive} $B9`L\$=$N$b$N$r;XDj$7$J$+$C$?>l9g!"(B
foozy@708:   $B%"!<%+%$%V%@%&%s%m!<%I5!G=$OL58z2=$5$l$^$9!#(B
foozy@708:   $BMxMQ2DG=$JA4$F$N%"!<%+%$%V7A<0$rM-8z2=$9$k5-=RNc$r0J2<$K<($7$^$9!#(B
foozy@708: 
foozy@708:   \begin{codesample4}
foozy@708:     [web]
foozy@708:     allow_archive = bz2 gz zip
foozy@708:   \end{codesample4}
foozy@708: 
foozy@708: \item[\rcitem{web}{allowpull}] 
foozy@708:   $B%&%'%V%$%s%?%U%'!<%97PM3$G$N(B HTTP $B1[$7$N(B
foozy@708:   \hgcmd{pull} $B$*$h$S(B \hgcmd{clone} $B$r5v2D$9$k$+H]$+$r;XDj$9$k??56CM!#(B
foozy@708:   \texttt{no} $B$J$$$7(B \texttt{false} $B$,;XDj$5$l$?>l9g!"(B
foozy@708:   $B%&%'%V%$%s%?%U%'!<%9$N(B``$B?M4V8~$1(B''$BItJ,$N$_$,M-8z2=$5$l$^$9!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{contact}] 
foozy@708:   $B%j%]%8%H%j$N4IM}$r9T$&?MJ*!&AH?%$rFCDj$9$k$?$a$NG$0U$N(B
foozy@708:   $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
foozy@708:   $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
foozy@708:   $BB?$/$N>l9g!"(B
foozy@708:   $B$3$N>pJs$O%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B%U%!%$%k$K5-=R$7$^$9$,!"(B
foozy@708:   $BA4$F$N%j%]%8%H%j$,F10l$NJ]<iC4Ev$K$h$jJ]<i$5$l$F$$$k>l9g!"(B
foozy@708:   $BBg0hE*$J(B \hgrc $B%U%!%$%k$K5-=R$9$k$N$bNI$$$G$7$g$&!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{maxchanges}] 
foozy@708:   $B%Z!<%8Kh$KI=<($5$l$k%A%'%s%8%;%C%H$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{maxfiles}] 
foozy@708:   $B%Z!<%8Kh$KI=<($5$l$kJQ99%U%!%$%k$N:GBg?t!J4{DjCM!K$rI=$9?tCM!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{stripes}] 
foozy@708:   $B%F!<%V%kI=<($K$*$1$k2DFI@-8~>e$N$?$a$K!"(B
foozy@708:   $B3F9T$N?'$r8_$$0c$$$K(B``$B<JLOMM(B''$B$H$9$k:]$K!"(B
foozy@708:   $B2?9TKh$K?'$rJQ99$9$k$+$N?tCM!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{style}] 
foozy@708:   Mercurial $B$,%&%'%V%$%s%?%U%'!<%9$rI=<($9$k:]$K;HMQ$9$k%F%s%W%l!<%H!#(B
foozy@708:   Mercurial $B$O(B \texttt{default} $B$*$h$S(B
foozy@708:   \texttt{gitweb} $B$N#2$D$N%&%'%V%$%s%?%U%'!<%9MQ%F%s%W%l!<%H$rF1:-$7$F$$$^$9(B
foozy@708:   $B!J8e<T$NJ}$,8+1I$($,NI$$$G$9!K!#(B
foozy@708:   $B<+A0$G%+%9%?%^%$%:$7$?%F%s%W%l!<%H$r;XDj$9$k$3$H$b$G$-$^$9!#(B
foozy@708:   $B>\:Y$O(B\ref{chap:template}~$B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708:   \texttt{gitweb} $B%9%?%$%k$NMxMQJ}K!$r0J2<$K<($7$^$9!#(B
foozy@708: 
foozy@708:   \begin{codesample4}
foozy@708:     [web]
foozy@708:     style = gitweb
foozy@708:   \end{codesample4}
foozy@708: 
foozy@708: \item[\rcitem{web}{templates}] 
foozy@708:   $B%F%s%W%l!<%H%U%!%$%k$N;2>H@h%G%#%l%/%H%j$r<($9%Q%9!#(B
foozy@708:   Mercurial $B$N4{DjCM$G$O!"%$%s%9%H!<%k@h%G%#%l%/%H%j$r;2>H$7$^$9!#(B
foozy@708: 
foozy@708: \end{description}
foozy@708: 
foozy@708: \sfilename{hgwebdir.cgi} $B$r;HMQ$9$k>l9g!"(B
foozy@708: $B4v$D$+$N@_Dj9`L\$K4X$7$F$OMxJX@->e!"(B
foozy@708: \hgrc $B%U%!%$%k$K5-=R$9$kBe$o$j$K!"(B
foozy@708: \sfilename{hgweb.config} $B%U%!%$%k$N(B
foozy@708: \rcsection{web} $B%;%/%7%g%s$K5-=R$9$k$3$H$,$G$-$^$9!#(B
foozy@708: $B5-=R2DG=$J@_Dj9`L\$O!"(B
foozy@708: \rcitem{web}{motd} $B$*$h$S(B \rcitem{web}{style} $B$G$9!#(B
foozy@708: 
foozy@708: \subsubsection{Options specific to an individual repository}
foozy@708: 
foozy@708: $B%f!<%6Kh$J$$$7Bg0hE*$J(B \hgrc $B%U%!%$%k$G$O$J$/!"(B
foozy@708: $B%j%]%8%H%jKh$N(B \sfilename{.hg/hgrc} $B$G5-=R$9$Y$-(B
foozy@708: \rcsection{web} $B%;%/%7%g%s$N@_Dj9`L\$,4v$D$+$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{description}
foozy@708: \item[\rcitem{web}{description}] 
foozy@708:   $B%j%]%8%H%j$NFbMF$J$$$7L\E*$r5-=R$7$?G$0U$N(B
foozy@708:   $B!JC"$76KNO4J7i$J!KJ8;zNs!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{name}] 
foozy@708:   $B%&%'%V%$%s%?%U%'!<%9$K$*$1$k%j%]%8%H%j;2>HL>$r<($9J8;zNs!#(B
foozy@708:   $B$3$NCM$O!"(B
foozy@708:   $B%j%]%8%H%j$N%Q%9(B\footnote{$BLuCm(B: $B2>A[%Q%9!)(B
foozy@708:   }$B$NKvHxMWAG$rMQ$$$?4{DjL>$r>e=q$-$7$^$9!#(B
foozy@708: 
foozy@708: \end{description}
foozy@708: 
foozy@708: \subsubsection{Options specific to the \hgcmd{serve} command}
foozy@708: 
foozy@708: \hgrc $B%U%!%$%k$N(B
foozy@708: \rcsection{web} $B%;%/%7%g%s$K$*$1$k@_Dj9`L\$N4v$D$+$O!"(B
foozy@708: \hgcmd{serve} $B%3%^%s%I@lMQ$N9`L\$G$9!#(B
foozy@708: 
foozy@708: \begin{description}
foozy@708: 
foozy@708: \item[\rcitem{web}{accesslog}] 
foozy@708:   $B%"%/%;%9%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
foozy@708:   \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%"%/%;%9%m%0=PNO@h$O!"(B
foozy@708:   $B%U%!%$%k$G$O$J$/I8=`=PNO$G$9!#(B
foozy@708:   $B%m%0MWAG$O!"(B
foozy@708:   $BB?$/$N%&%'%V%5!<%P$K$*$$$FMxMQ$5$l$kI8=`E*$J(B``$BJ#9g(B''$B!J(Bcombined$B!K(B
foozy@708:   $B%U%!%$%k7A<0$G=PNO$5$l$^$9!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{address}] 
foozy@708:   $B30It$+$i$N@\B3$r<u$1IU$1$k%"%I%l%9$r;XDj$9$kJ8;zNs!#(B
foozy@708:   $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
foozy@708: 
foozy@708: \item[\rcitem{web}{errorlog}] 
foozy@708:   $B%(%i!<%m%0$r=q$-=P$9%U%!%$%k$N%Q%9!#(B
foozy@708:   \hgcmd{serve} $B%3%^%s%I$N4pDlF0:n$G$N%(%i!<%m%0=PNO@h$O!"(B
foozy@708:   $B%U%!%$%k$G$O$J$/I8=`%(%i!<=PNO$G$9!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{ipv6}] 
foozy@708:   IPv6 $B%W%m%H%3%kMxMQ$NM-L5$r;XDj$9$k??56CM!#(B
foozy@708:   $B4pDlF0:n$G$O(B IPv6 $B$O%5%]!<%H$5$l$^$;$s!#(B
foozy@708: 
foozy@708: \item[\rcitem{web}{port}] 
foozy@708:   \hgcmd{serve} $B%3%^%s%I$,@\B3$r<u$1IU$1$k(B TCP $B%]!<%H$NHV9f$r;XDj$9$k?tCM!#(B
foozy@708:   $B4pDlF0:n$G$O!"(B8000 $BHV%]!<%H$,;HMQ$5$l$^$9!#(B
foozy@708: 
foozy@708: \end{description}
foozy@708: 
foozy@708: \subsubsection{Choosing the right \hgrc\ file to add \rcsection{web}
foozy@708:   items to}
foozy@708: 
foozy@708: Apache $B$d(B \texttt{lighttpd} $B$N$h$&$J%&%'%V%5!<%P$O!"(B
foozy@708: $B%j%]%8%H%j=jM-<T$H$O0[$J$k%f!<%68"8B$G2TF0$9$k2DG=@-$,$"$k!"(B
foozy@708: $B$H$$$&E@$O=EMW$G$9$N$GK:$l$J$$$h$&$K$7$F$/$@$5$$!#(B
foozy@708: $B%&%'%V%5!<%P$K$h$C$F5/F0$5$l$k(B
foozy@708: \sfilename{hgweb.cgi} $B$N$h$&$J(B
foozy@708: CGI $B%9%/%j%W%H$ODL>o!"(B
foozy@708: $B%&%'%V%5!<%P$HF10l$N%f!<%68"8B$G2TF0$7$^$9!#(B
foozy@708: 
foozy@708: $B8D?M$N(B \hgrc $B%U%!%$%k$K(B
foozy@708: \rcsection{web} $B%;%/%7%g%s$r5-=R$7$F$b!"(B
foozy@708: CGI $B%9%/%j%W%H$O$=$N@_Dj$rFI$_9~$_$^$;$s!#(B
foozy@708: $B8D?M$N(B \hgrc $B%U%!%$%k$K5-=R$7$?@_Dj$O!"(B
foozy@708: $BEv3:%f!<%6<+?H$G(B \hgcmd{serve} 
foozy@708: $B%3%^%s%I$r<B9T$7$?>l9g$K$N$_8zNO$rH/4x$7$^$9!#(B
foozy@708: CGI $B%9%/%j%W%H$N5sF0$K=jK>$N@_Dj$rH?1G$9$k$K$O!"(B
foozy@708: $B%&%'%V%5!<%P$,2TF0$5$l$k:]$N%f!<%6$N%[!<%`%G%#%l%/%H%j$K(B
foozy@708: \hgrc $B%U%!%$%k$r:n@.$7$F=jK>$N@_Dj$r5-=R$9$k$+!"(B
foozy@708: $B$"$k$$$O%7%9%F%`%o%$%I$J(B \hgrc $B%U%!%$%k$K=jK>$N@_Dj$rDI2C$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: 
foozy@708: %%% Local Variables: 
foozy@708: %%% mode: latex
foozy@708: %%% TeX-master: "00book"
foozy@708: %%% End: 




