
foozy@708: \chapter{Managing change with Mercurial Queues}
foozy@708: \label{chap:mq}
foozy@708: 
foozy@708: \section{$B%Q%C%A4IM}LdBj(B}
foozy@708: \label{sec:mq:patch-mgmt}
foozy@708: 
foozy@708: $B%=%U%H%&%'%"%Q%C%1!<%8$r%=!<%9$+$i%$%s%9%H!<%k$9$kI,MW$,$"$k$N$K!"(B
foozy@708: $B%Q%C%1!<%8;HMQA0$K=$@5$7$F$*$+$J$1$l$P$J$i$J$$%P%0$r%=!<%9Cf$KH/8+$7$F$7$^$&!"(B
foozy@708: $B$H$$$&$h$&$J;vBV$O$h$/$"$k$3$H$G$9!#(B
foozy@708:   $BJQ99$N8e!";C$/%Q%C%1!<%8$N$3$H$rK:$l$F$$$k$H!"(B
foozy@708: $B?t%u7n8e$K%Q%C%1!<%8$r?7$7$$HG$G99?7$9$kI,MW$,=P$F$-$?$H$7$^$9!#(B
foozy@708:   $B%Q%C%1!<%8$N?7$7$$HG$,L$$@$K%P%0$r;D$7$F$$$?$J$i!"(B
foozy@708: $B8E$$HG$N%=!<%9%D%j!<$+$i=$@5FbMF$rCj=P$7$F!"(B
foozy@708: $B?7$7$$HG$KE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
foozy@708:   $B$3$N$h$&$J:n6H$OB`6~$G4V0c$$$r5/$3$7$d$9$$$b$N$G$9!#(B
foozy@708: 
foozy@708: $B$3$l$O(B``$B%Q%C%A4IM}(B''$BLdBj$NC1=c$J%1!<%9$G$9!#(B
foozy@708:   $B<+J,$G$OJQ99$9$k$3$H$,$G$-$J$$(B``$B>eN.(B''$B$N%=!<%9%D%j!<$,$"$k$H$7$^$9!#(B
foozy@708: $B>eN.$N%=!<%9%D%j!<$N>e$G%m!<%+%k$J=$@5$r9T$&I,MW$,$"$k$J$i!"(B
foozy@708: $B>eN.%=!<%9$N?7$7$$HG$KBP$7$F%m!<%+%k$J=$@5$rE,MQ$G$-$k$h$&$K!"(B
foozy@708: $B$=$&$$$C$?=$@5$rJLES4IM}$7$?$$$H;W$&$G$7$g$&!#(B
foozy@708: 
foozy@708: $B%Q%C%A4IM}LdBj$O$5$^$6$^$J>u67$GH/@8$7$^$9!#(B
foozy@708: $B%*!<%W%s%=!<%9%=%U%H%&%'%"%W%m%8%'%/%H$N%f!<%6$,!"(B
foozy@708: $B%W%m%8%'%/%H$N%a%s%F%J%s%9C4Ev$X!"(B
foozy@708: $B%P%0=$@5$d?75,5!G=$r%Q%C%A7A<0$GAwIU$9$k>u67$,!"(B
foozy@708: $B$*$=$i$/:G$b$o$+$j$d$9$$>u67$G$7$g$&!#(B
foozy@708: 
foozy@708: $B%*!<%W%s%=!<%9%=%U%H%&%'%"$r4^$`%*%Z%l!<%F%#%s%0%7%9%F%`$NG[I[<T$O!"(B
foozy@708: $BG[I[$9$k%Q%C%1!<%8$KBP$9$kJQ99$rIQHK$K9T$&$N$G!"(B
foozy@708: $B<+J,$?$A$N4D6-$K$*$$$F%S%k%I$r9T$&$N$OEvA3$N$3$H$G$9!#(B
foozy@708: 
foozy@708: $B@0Hw$N>e$G4v$D$+JQ99$r9T$$$?$$>l9g!"(B
foozy@708: $BI8=`E*$J(B
foozy@708: \command{diff} $B$*$h$S(B \command{patch} $B%W%m%0%i%`(B
foozy@708: $B!J$3$l$i$N%D!<%k$K4X$9$k5DO@$O(B \ref{sec:mq:patch} $B@a$r;2>H$N$3$H!K(B
foozy@708: $B$r;HMQ$7$F!"C10l$N%Q%C%A$r4IM}$9$k$3$H$O4JC1$G$9!#(B
foozy@708: $B$7$+$7!"0lC6JQ99$N?t$,A}$(;O$a$k$H!"(B
foozy@708: $BC10l$N%Q%C%A$N4IM}$O4XO"@-$NL5$$(B``$B@.2L$N2t(B''$B$K46$8;O$a$k$?$a!"(B
foozy@708: $BNc$($P!"C10l$N%Q%C%A$OC10l$N%P%0=$@5$N$_$r4^$`(B
foozy@708: $B!J%Q%C%A$OJ#?t$N%U%!%$%k$r=$@5$9$k$+$b$7$l$^$;$s$,!"(B
foozy@708: ``$BC10l$N;v(B''$B$7$+9T$o$J$$!K$h$&$K$J$k$G$7$g$&$+$i!"(B
foozy@708: $B0[$J$k%P%0$d%m!<%+%k$J=$@5$KI,MW$H$5$l$k%Q%C%A$r!"(B
foozy@708: $B$$$/$D$bJz$($k$3$H$K$J$k$+$b$7$l$^$;$s!#(B
foozy@708:   $B$3$N$h$&$J>u67$G!"(B
foozy@708: $B>eN.$N%Q%C%1!<%8J]<iC4Ev<T$K%P%0=$@5$N%Q%C%A$rAw$C$?$H$9$k$H!"(B
foozy@708: $BH`$i$O$=$N8e$N%j%j!<%9$K$*$$$F$=$N=$@5$r<h$j9~$`$G$7$g$&$+$i!"(B
foozy@708: $B?7$7$$HG$X$N99?7$N:]$K$O!"(B
foozy@708: $B$=$N%Q%C%A$NE,MQ$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B>eN.$N%=!<%9%D%j!<$KBP$7$FC10l$N%Q%C%A$rJ]<i$9$k$3$H$O!"(B
foozy@708: $BB`6~$G4V0c$$$d$9$$$G$9$,Fq$7$/$O$"$j$^$;$s!#(B
foozy@708:   $B$7$+$7!"J]<i$7$J$1$l$P$J$i$J$$%Q%C%A$N?t$,A}$($k$K$7$?$,$$!"(B
foozy@708: $BLdBj$NJ#;($5$O$9$_$d$+$KA}2C$7$^$9!#(B
foozy@708:   $B$9$/$J$+$i$L%Q%C%A$rJz$(9~$`$3$H$G!"(B
foozy@708: $BE,MQ$NM-L5$rGD0.$7$?$j!"$=$l$i$rJ]<i$9$k$3$H$,!"(B
foozy@708: $B!VLLE]$J$3$H!W$+$i!V05E]$5$l$k$3$H!W$X$HJQ2=$9$k$G$7$g$&!#(B
foozy@708: 
foozy@708: $B9,$$$J$3$H$K!"(BMercurial $B$O(B
foozy@708: Mercurial Queues
foozy@708: $B!J$"$k$$$OC1$K(B ``MQ''$B!K$H8F$P$l$k!"(B
foozy@708: $B%Q%C%A4IM}LdBj$r4JAG2=$9$k6/NO$J3HD%5!G=$r;}$C$F$$$^$9!#(B
foozy@708: 
foozy@708: \section{Mercurial Queues $B0JA0(B}
foozy@708: \label{sec:mq:history}
foozy@708: 
foozy@708: 1990 $BG/Be8eH>!"2??M$+$N(B Linux $B%+!<%M%k3+H/<TC#$O!"(B
foozy@708: Linux $B%+!<%M%k$N5sF0$rJQ$($k(B``$B%Q%C%A7ONs(B''$B$NJ]<i$r;O$a$F$$$^$7$?!#(B
foozy@708: $B4v$D$+$N7ONs$O0BDj@-$K!"4v$D$+$OLVMe@-$K!"(B
foozy@708: $B$=$NB>$N7ONs$O$h$j<B83E*$JItJ,$K>GE@$rEv$F$F$$$^$7$?!#(B
foozy@708: 
foozy@708: $B$3$l$i$N%Q%C%A$N%5%$%:$OB.$d$+$K5pBg2=$7$^$7$?!#(B
foozy@708: 2002 $BG/!"(BAndrew Morton $B$,!"(B
foozy@708: $B<+J,$N%Q%C%A%-%e!<4IM}:n6H$r<+F02=$9$k$N$KMQ$$$F$$$?!"(B
foozy@708: $B4v$D$+$N%7%'%k%9%/%j%W%H$rH/I=$7$^$7$?!#(B
foozy@708: Andrew $B$O!"(B
foozy@708: Linux $B%+!<%M%k%=!<%9>e$G$N?tI4!J;~$K$O?t@i!K$N%Q%C%A$N4IM}$K!"(B
foozy@708: $B$3$l$i$N%9%/%j%W%H$r>e<j$KMxMQ$7$F$$$^$7$?!#(B
foozy@708: 
foozy@708: \subsection{A patchwork quilt$B!JLuCm!'7Q$.$O$.$N>e3]$1!K(B}
foozy@708: \label{sec:mq:quilt}
foozy@708: 
foozy@708: 2003 $BG/$N=iF,!"(B
foozy@708: Andreas Gruenbacher $B$H(B Martin Quinson $B$O!"(B
foozy@708: Andrew $B$K$h$k%9%/%j%W%H$N<jK!$r<h$jF~$l$F!"(B
foozy@708: 
foozy@708: ``patchwork quilt''~\cite{web:quilt} $B$"$k$$$OC1$K(B ``quilt''
foozy@708: ($B$3$l$K$D$$$F=R$Y$?O@J8$O(B~\cite{gruenbacher:2005}$B$r;2>H$N$3$H(B)
foozy@708: $B$H8F$P$l$k%D!<%k$rH/I=$7$^$7$?!#(B
foozy@708:   $B%Q%C%A4IM}$,BgI}$K<+F02=$5$l$k$3$H$+$i!"(B
foozy@708: quilt $B$O%*!<%W%s%=!<%93+H/<T$N4V$G=V$/4V$KBg$-$J;Y;}$rF@$^$7$?!#(B
foozy@708: 
foozy@708: quilt $B$O!"(B
foozy@708: $B:G>e0L$N%G%#%l%/%H%j$K$*$$$F(B\emph{$B%Q%C%A$N%9%?%C%/(B}$B$r4IM}$7$^$9!#(B
foozy@708: $B4IM}3+;O$N:]$K$O!"(B
foozy@708: quilt $B$KBP$7$F%G%#%l%/%H%j%D%j!<$r4IM}$9$k;]$H!"(B
foozy@708: $B$I$N%U%!%$%k$r4IM}$7$?$$$N$+$rEA$($^$9!#(B
foozy@708: quilt $B$O$3$l$i$N%U%!%$%k$NL>A0$HFbMF$rJL$J>l=j$KJ]B8$7$^$9!#(B
foozy@708:   $B%P%0$N=$@5$N:]$K$O!"(B
foozy@708: $B?7$7$$%Q%C%A$r!JC10l$N%3%^%s%I$r;HMQ$7$F!K:n@.$7!"(B
foozy@708: $B=$@5$9$kI,MW$NM-$k%U%!%$%k$NJT=8$r9T$$!"(B
foozy@708: $B%Q%C%A$r(B``refresh''$B$7$^$9!#(B
foozy@708: 
foozy@708: refresh $B$NCJ3,$G(B quilt $B$O%G%#%l%/%H%j%D%j!<$rAv::$7$^$9!#(B
foozy@708: quilt $B$O<B;\$5$l$?A4$F$NJQ99$G%Q%C%A$r99?7$7$^$9!#(B
foozy@708: $B:G>e0L$N%G%#%l%/%H%j$K$*$$$F:n@.$7$?JL$J%Q%C%A$rMQ$$$k$3$H$G!"(B
foozy@708: ``$B#1$D$N%Q%C%A$,E,MQ$5$l$?%D%j!<(B''$B$+$i(B
foozy@708: ``$B#2$D$N%Q%C%A$,E,MQ$5$l$?%D%j!<(B''$B$X$HJQ2=$5$;$k$?$a$KI,MW$JJQ99$r!"(B
foozy@708: $BDI@W$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B%D%j!<$KBP$9$k%Q%C%A$NE,MQ>u67$r(B\emph{$BJQ99(B}$B$9$k$3$H$b$G$-$^$9!#(B
foozy@708: $B%Q%C%A$r(B``pop''$B$9$k$H!"(B
foozy@708: $B$=$N%Q%C%A$K$h$kJQ99$O%G%#%l%/%H%j%D%j!<$+$i<h$j=|$+$l$^$9!#(B
foozy@708: $B$7$+$7!"(B
foozy@708: quilt $B$O$I$N%Q%C%A$,<h$j=|$+$l$?$N$+$r3P$($F$$$k$N$G!"(B
foozy@708: $B<h$j=|$+$l$?%Q%C%A$r:F$S(B``push''$B$9$k$3$H$,$G$-!"(B
foozy@708: $B%G%#%l%/%H%j%D%j!<$K$OEv3:%Q%C%A$K$h$kJQ99$,I|85$5$l$^$9!#(B
foozy@708: $B:G$b=EMW$JE@$O!"(B
foozy@708: ``refresh''$B%3%^%s%I$N<B9T$H!"(B
foozy@708: $B$=$l$K$h$k:G>e0L$N%Q%C%A$NFbMF99?7$,G$0U$N;~E@$K$G$-$k$3$H$G$9!#(B
foozy@708: $B$3$l$O!"(B
foozy@708: $B%Q%C%A$NE,MQ>u67$H!"$=$N%Q%C%A$K$h$kJQ99FbMF$NN>J}$r!"(B
foozy@708: $BG$0U$N;~E@$GJQ99$G$-$k$3$H$r0UL#$7$^$9!#(B
foozy@708: 
foozy@708: quilt $B$OJQ99@)8f%D!<%k$r0U<1$7$J$$$?$a!"(B
foozy@708: $BE83+$5$l$?(B tarball $B$N:G>e0L%G%#%l%/%H%j$K$*$$$F$b!"(B
foozy@708: Subversion $B%j%]%8%H%j$K$*$$$F$bF1Ey$K5!G=$7$^$9!#(B
foozy@708: 
foozy@708: \subsection{patchwork quilt $B$+$i(B Mercurial Queues $B$X(B}
foozy@708: \label{sec:mq:quilt-mq}
foozy@708: 
foozy@708: 2005 $BG/Cf=\!"(B
foozy@708: quilt $BE*$J?6$kIq$$$r(B Mercurial $B$KDI2C$9$k$?$a$N!"(B
foozy@708: Mercurial Queues $B$H8F$P$l$k3HD%5!G=$,!"(B
foozy@708: Chris Mason $B$K$h$j<BAu$5$l$^$7$?!#(B
foozy@708: 
foozy@708: quilt $B$H(B MQ $B$NBg$-$J0c$$$O!"(B
foozy@708: quilt $B$,JQ99@)8f%7%9%F%`$r0U<1$7$J$$$N$KBP$7$F!"(B
foozy@708: MQ $B$,(B Mercurial $B$K(B\emph{$BE}9g(B}$B$5$l$F$$$k$3$H$G$9!#(B
foozy@708:   push $B$5$l$k8D!9$N%Q%C%A$O!"(B
foozy@708: Mercurial $B$N%A%'%s%8%;%C%H$H$7$FI=8=$5$l$^$9!#(B
foozy@708:   $B%Q%C%A$r(B pop $B$9$k$3$H$G!"%A%'%s%8%;%C%H$O<h$j=|$+$l$^$9!#(B
foozy@708: 
foozy@708: $BJQ99@)8f%7%9%F%`$r0U<1$7$J$$$3$H$+$i!"(B
foozy@708: Mercurial $B$H(B MQ $B$rMxMQ$G$-$J$$>u67$K$D$$$FCN$k>e$G!"(B
foozy@708: $B0MA3$H$7$F(B quilt $B$OHs>o$KM-MQ$J%=%U%H%&%'%"$G$9!#(B
foozy@708: 
foozy@708: \section{MQ $B$NBg$-$JMxE@(B}
foozy@708: 
foozy@708: $B%Q%C%A$HJQ994IM}$NE}0l$rDL$7$F(B MQ $B$,Ds6!$9$k$b$N$N2ACM$r!"(B
foozy@708: $B8XD%$72a$.$k$3$H$O$"$j$^$;$s!#(B
foozy@708: 
foozy@708: $B%U%j!<%=%U%H%&%'%"$*$h$S%*!<%W%s%=!<%9$N@$3&$G%Q%C%A$,MxMQ$5$lB3$1$k$N$O!"(B
foozy@708: $BJQ994IM}%D!<%k$,G/!9$=$N5!G=$r8~>e$5$;$F$$$k$K$b4X$o$i$:!"(B
foozy@708: $B%Q%C%A$,(B\emph{$B7Z2w$5(B}$B$r;}$C$F$$$k$3$H$,Bg$-$JM}M3$N0l$D$G$9!#(B
foozy@708: 
foozy@708: $BEAE}E*$JJQ99@)8f%D!<%k$O!"(B
foozy@708: $B<B;\$7$?$3$H$K4X$9$kA4$F$r!"(B
foozy@708: $B1JB3E*$G<h$j>C$7$N=PMh$J$$$b$N$H$7$F5-O?$7$^$9!#(B
foozy@708: $B$3$N?6$kIq$$$KBg$-$J2ACM$,$"$k0lJ}$G!"(B
foozy@708: $B4vJ,7x6l$7$/$b$"$j$^$9!#(B
foozy@708: $B2a7c$J<B83$r9T$*$&$H$9$k>l9g!"(B
foozy@708: $B<+J,$,9T$*$&$H$9$k$3$H$K?5=E$K$J$k$+!"(B
foozy@708: $BI,MW$H$5$l$J$$!A$J$*0-$$$3$H$K$O!"8m2r$dIT0BDj$N85$H$J$k!A(B
foozy@708: $B<:GT$H4V0c$$$N5-O?$r!"(B
foozy@708: $B1JB3E*$JMzNr5-O?Cf$K;D$94m81$rKA$9I,MW$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $BBP>HE*$K!"(B
foozy@708: MQ $B$K$*$1$kJ,;6MzNr4IM}$H%Q%C%A$N7k9g$K$h$j!"(B
foozy@708: $B$"$J$?$N:n6H$rMF0W$K3VN%$9$k$3$H$,$G$-$^$9!#(B
foozy@708: $B$"$J$?$N%Q%C%A$ODL>o$NJQ99MzNr$N>e$GB8B3$7B3$1!"(B
foozy@708: $BK>$`;~$K$=$l$i$N<B;\!?<h$j>C$7$r9T$&$3$H$,=PMh$^$9!#(B
foozy@708: $B$=$N%Q%C%A$,5$$KF~$i$J$$>l9g!"$=$l$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
foozy@708: $B$=$N%Q%C%A$,40A4$K$OK>$`$b$N$G$J$$>l9g!"(B
foozy@708: $BK>$`;Q$K@vN}$5$;$k$^$G!"I,MW$J$@$12?EY$G$b=$@5$9$k$3$H$,=PMh$^$9!#(B
foozy@708: 
foozy@708: $BNc$($P!"(B
foozy@708: $B%Q%C%A$HJQ994IM}$NE}9g$K$h$j!"(B
foozy@708: $B%Q%C%A$NM}2r$H$=$N8z2L!A$*$h$S85$K$J$C$?%3!<%I$H$NO"7H!A$N%G%P%C%0$,!"(B
foozy@708: \emph{$BHs>o$K(B}$B4JC1$K$J$j$^$9!#(B
foozy@708: $BA4$F$NE,MQ:Q$_%Q%C%A$,4XO"$7$?%A%'%s%8%;%C%H$r;}$C$F$$$k$N$G!"(B
foozy@708: $B$I$N%A%'%s%8%;%C%H$H%Q%C%A$,$=$N%U%!%$%k$K1F6A$r5Z$\$7$F$$$k$N$+$r!"(B
foozy@708: \hgcmdargs{log}{\emph{filename}} $B$K$h$C$F8+$k$3$H$,=PMh$^$9!#(B
foozy@708: \hgext{bisect} $B3HD%$rMQ$$$k$3$H$G!"(B
foozy@708: $B%P%0$,;}$A9~$^$l$?$j=$@5$5$l$?;~E@$r8+$k$?$a$K!"(B
foozy@708: $BA4$F$N%A%'%s%8%;%C%H$HE,MQ:Q$_%Q%C%A$rDL$7$F$NFsJ,C5:w$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708: \hgcmd{annotate} $B%3%^%s%I$rMQ$$$k$3$H$G!"(B
foozy@708: $B%=!<%9%U%!%$%k$NFCDj$N9T$rJQ99$7$?$N$,!"(B
foozy@708: $B$I$N%A%'%s%8%;%C%H$d%Q%C%A$G$"$k$+$r8+$k$3$H$,=PMh$^$9!#(B
foozy@708: 
foozy@708: \section{$B%Q%C%A$NM}2r(B}
foozy@708: \label{sec:mq:patch}
foozy@708: 
foozy@708: MQ $B$O!"$=$l$,%Q%C%A;X8~$NFC@-$r;}$D$3$H$rI=$K=P$7$F$$$k$?$a!"(B
foozy@708: $B%Q%C%A$,$I$&$$$C$?$b$N$G$"$k$+$d!"(B
foozy@708: $B%Q%C%A$H$H$b$K5!G=$9$k%D!<%k$K4X$9$k$3$H$,$i$rM}2r$9$k<j=u$1$K$J$j$^$9!#(B
foozy@708: 
foozy@708: $BEAE}E*$J(B Unix $B$N(B \command{diff} $B%3%^%s%I$O!"(B
foozy@708: $B#2$D$N%U%!%$%k$rHf3S$7N><T$N0c$$$rI=<($7$^$9!#(B
foozy@708: \command{patch} $B%3%^%s%I$O!"(B
foozy@708: $B$3$N0c$$$r%U%!%$%k$KBP$9$k(B\emph{$BJQ99(B}$B$H$_$J$7$^$9!#(B
foozy@708: $B$3$l$i$N%3%^%s%I$N4JC1$JF0:nNc$H$7$F!"(B
foozy@708: $B?^(B~\ref{ex:mq:diff}$B$r8+$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.dodiff.diff}
foozy@708:   \label{ex:mq:diff}
foozy@708:   \caption{\command{diff} $B$*$h$S(B \command{patch} $B%3%^%s%I$NMxMQNc(B}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \command{diff} $B$,@8@.$9$k!J$=$7$F!"(B\command{patch} $B$,F~NO$9$k!K(B
foozy@708: $B%U%!%$%k$N7A<0$O(B``$B%Q%C%A!J(Bpatch$B!K(B''$B$J$$$7(B``$B:9J,!J(Bdiff$B!K(B''$B$H8F$P$l$^$9!#(B
foozy@708: $B%Q%C%A$H:9J,$N4V$K0c$$$O$"$j$^$;$s(B
foozy@708: $B!J0J8e$O!"$h$j0lHLE*$K;HMQ$5$l$k(B``$B%Q%C%A(B''$B$H$$$&8F>N$r;HMQ$7$^$9!K!#(B
foozy@708: 
foozy@708: $B%Q%C%A%U%!%$%k$O!"G$0U$N%F%-%9%H$+$i;O$a$k$3$H$,$G$-$^$9!#(B
foozy@708: \command{patch} $B%3%^%s%I$O$3$N%F%-%9%H$rL5;k$7$^$9$,!"(B
foozy@708: MQ $B$O%A%'%s%8%;%C%H$r@8@.$9$k:]$N%3%_%C%H%a%C%;!<%8$H$_$J$7$^$9!#(B
foozy@708: $B%Q%C%AFbMF$r3+;O$r8+$D$1$k$?$a$K!"(B
foozy@708: \command{patch} $B$O(B ``\texttt{diff~-}'' $B$G;O$^$k:G=i$N9T$rC5$7$^$9!#(B
foozy@708: 
foozy@708: MQ $B$O(B \emph{unified} $B:9J,$H6&$K5!G=$7$^$9(B
foozy@708: $B!J(B\command{patch} $B$O$=$l0J30$N2?<oN`$+$N:9J,7A<0$G$b5!G=$7$^$9$,!"(B
foozy@708: MQ $B$O(B \emph{unified} $B:9J,$G$J$$$H5!G=$7$^$;$s!K!#(B
foozy@708: unified $B:9J,$O#2<oN`$N%X%C%@$r;}$C$F$$$^$9!#(B
foozy@708: \emph{$B%U%!%$%k%X%C%@(B header}$B$K$O!"(B
foozy@708: $BJQ99BP>]$H$J$k%U%!%$%k$N%U%!%$%kL>$,5-=R$5$l!"(B
foozy@708: \command{patch} $B%3%^%s%I$,?75,$N%U%!%$%k%X%C%@$r8+$D$1$?:]$K$O!"(B
foozy@708: $BJQ99$r9T$&$?$a$KEv3:$9$kL>A0$N%U%!%$%k$rC5$7$^$9!#(B
foozy@708: 
foozy@708: $B%U%!%$%k%X%C%@$KB3$$$F!"(B\emph{hunk} $BNs$,5-=R$5$l$^$9!#(B
foozy@708: $B$=$l$>$l$N(B hunk $B$O%X%C%@$G3+;O$5$l!"(B
foozy@708: $B$=$N(B hunk $B$K$h$jJQ99$5$l$kBP>]$N!"(B
foozy@708: $B%U%!%$%k$K$*$1$k9THV9f$NHO0O$r<1JL$7$^$9!#(B
foozy@708: $B%X%C%@$KB3$/(B hunk $B$O!"(B
foozy@708: $B%U%!%$%k$N2~JQ$5$l$J$$ItJ,$+$i$J$k?t9T$N%F%-%9%H$,A08e$KIU2C$5$l$^$9!#(B
foozy@708: $B$3$l$i$N2~JQ$5$l$J$$ItJ,$N$3$H$r!"(Bhunk $B$KBP$9$k(B\emph{$B%3%s%F%-%9%H(B}$B$H8F$S$^$9!#(B
foozy@708: $B8eB3$N(B hunk $B$H$N4V$K>/NL$N%3%s%F%-%9%H$7$+$J$$>l9g!"(B
foozy@708: \command{diff} $B$O?7$?$J(B hunk $B%X%C%@$rI=<($7$^$;$s!#(B
foozy@708: $BJQ99FbMF$N4V$K?t9T$N%3%s%F%-%9%H9T$rCV$$$F!"(B
foozy@708: hunk $B$r$=$N$^$^B3$1$^$9!#(B
foozy@708: 
foozy@708: $B%3%s%F%-%9%H$N8D!9$N9T$O6uGrJ8;z$G;O$^$j$^$9!#(B
foozy@708: hunk $BFbIt$G$O!"(B
foozy@708: ``\texttt{-}'' $B$G;O$^$k9T$O(B``$B:o=|$5$l$k9T(B''$B$r!"(B
foozy@708: ``\texttt{+}'' $B$G;O$^$k9T$O(B``$BA^F~$5$l$k9T(B''$B$r0UL#$7$^$9!#(B
foozy@708: $BNc$($P!"JQ99$5$l$k9T$O!"#19T$N:o=|$H#19T$NA^F~$GI=8=$5$l$^$9!#(B
foozy@708: 
foozy@708: $B%Q%C%A$N$h$jHyL/$JB&LL$K4X$7$F$O8e$[$I!J(B~\ref{sec:mq:adv-patch}$B@a$K$F!K(B
foozy@708: $B@bL@$7$^$9$,!"(BMQ $B$rMxMQ$9$k$KEv$?$C$F$O$3$3$^$G$NCN<1$G==J,$G$9!#(B
foozy@708: 
foozy@708: \section{Mercurial Queues $B$NMxMQ(B}
foozy@708: \label{sec:mq:start}
foozy@708: 
foozy@708: MQ $B$O(B Mercurial $B$N3HD%$H$7$F<BAu$5$l$F$$$k$N$G!"(B
foozy@708: $BMxMQ$NA0$KL@<(E*$KM-8z2=$9$kI,MW$,$"$j$^$9(B
foozy@708: $B!J%@%&%s%m!<%I$NI,MW$O$"$j$^$;$s!#(B
foozy@708: MQ $B$ODL>o$N(B Mercurial $B$NG[I[J*$K4^$^$l$F$$$^$9!K!#(B
foozy@708: MQ $B$rM-8z$K$9$k$K$O!"(B
foozy@708: \tildefile{.hgrc} $B%U%!%$%k$rJT=8$7!"(B
foozy@708: ~\ref{ex:mq:config} $B$K<($99T$rDI2C$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \begin{codesample4}
foozy@708:     [extensions]
foozy@708:     hgext.mq =
foozy@708:   \end{codesample4}
foozy@708:   \label{ex:mq:config}
foozy@708:   \caption{MQ $B3HD%M-8z2=$N$?$a$K(B \tildefile{.hgrc} $B$KDI2C$9$kFbMF(B}
foozy@708: \end{figure}
foozy@708: 
foozy@708: $B3HD%$,M-8z2=$5$l$k$H!"(B
foozy@708: $B$$$/$D$+$N?7$7$$%3%^%s%I$,M-8z2=$5$l$^$9!#(B
foozy@708: \hgcmd{help} $B$r;H$C$F(B \hgxcmd{mq}{qinit} $B%3%^%s%I$NMxMQ2DH]$r8+$k$3$H$G!"(B
foozy@708: $B3HD%$,5!G=$9$k$3$H$r3NG'$G$-$^$9!#(B
foozy@708: ~\ref{ex:mq:enabled} $B$NNc$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.qinit-help.help}
foozy@708:   \caption{MQ $BMxMQ2DH]$N3NG'(B}
foozy@708:   \label{ex:mq:enabled}
foozy@708: \end{figure}
foozy@708: 
foozy@708: MQ $B$O(B\emph{$BA4$F$N(B} Mercurial $B%j%]%8%H%j$GMxMQ$G$-!"(B
foozy@708: $B%3%^%s%I$O$=$N%j%]%8%H%j$K$7$+:nMQ$7$^$;$s!#(B
foozy@708: $BMxMQ3+;O$N:]$K$O!"(B
foozy@708: \hgxcmd{mq}{qinit} $B%3%^%s%I$K$h$j%j%]%8%H%j$N=`Hw$r9T$$$^$9(B
foozy@708: $B!J(B~\ref{ex:mq:qinit} $B;2>H!K!#(B
foozy@708: $B$3$N%3%^%s%I$O!"(B\sdirname{.hg/patches} $B$H8F$P$l$k6u$N%G%#%l%/%H%j$r:n@.$7!"(B
foozy@708: MQ $B$O$3$N%G%#%l%/%H%j$K%a%?%G!<%?$r3JG<$7$^$9!#(B
foozy@708: $BB?$/$N(B Mercurial $B%3%^%s%I$HF1MM!"(B
foozy@708: \hgxcmd{mq}{qinit} $B%3%^%s%I$O<B9T$,@5>o$K=*N;$7$?>l9g$K$O!"(B
foozy@708: $BFC$K2?$bI=<($7$^$;$s!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qinit}
foozy@708:   \caption{MQ $BMxMQ$K8~$1$?%j%]%8%H%j$N=`Hw(B}
foozy@708:   \label{ex:mq:qinit}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qnew}
foozy@708:   \caption{$B?7$7$$%Q%C%A$N:n@.(B}
foozy@708:   \label{ex:mq:qnew}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \subsection{$B?7$7$$%Q%C%A$N:n@.(B}
foozy@708: 
foozy@708: $B?7$7$$%Q%C%A$G:n6H$r3+;O$9$k$K$O!"(B
foozy@708: \hgxcmd{mq}{qnew} $B%3%^%s%I$r;H$$$^$9!#(B
foozy@708: $B$3$N%3%^%s%I$O:n@.$9$k%Q%C%A$NL>A0$r0z?t$K<h$j$^$9!#(B
foozy@708: $BNc(B~\ref{ex:mq:qnew}$B$K<($9$h$&$K!"(B
foozy@708: MQ $B$O$3$l$r(B \sdirname{.hg/patches} 
foozy@708: $B%G%#%l%/%H%jCf$N<B%U%!%$%k$NL>A0$H$_$J$7$^$9!#(B
foozy@708: 
foozy@708: \sdirname{.hg/patches} $B%G%#%l%/%H%jG[2<$K$O$=$l0J30$K$b!"(B
foozy@708: \sfilename{series} $B$H(B \sfilename{status} 
foozy@708: $B$H$$$&#2$D$N?7$7$$%U%!%$%k$,:n@.$5$l$^$9!#(B
foozy@708: \sfilename{series} $B$O!"(B
foozy@708: $B$=$N%j%]%8%H%j$K$*$$$F(B MQ $B$,4IM}$9$kA4$F$N%Q%C%A$N0lMw$r!"(B
foozy@708: $B#19T#1%Q%C%A$GJ];}$7$F$$$^$9!#(B
foozy@708: \sfilename{status} $B$O(B
foozy@708: $B$=$N%j%]%8%H%j$K$*$$$F(B MQ $B$,(B\emph{$BE,MQ(B}$B$7$?A4$F$N%Q%C%A$rDI@W$9$k$?$a$N!"(B
foozy@708: $BFbItD"JmE*$JMQES$K;HMQ$5$l$^$9!#(B
foozy@708: 
foozy@708: \begin{note}
foozy@708:   $BNc$($P!"%Q%C%A$NE,MQ=g=x$rJQ99$7$?$$$h$&$J>l9g!"(B
foozy@708:   \sfilename{series} $B$r<jF0$GJQ99$7$?$$>l9g$,$"$k$+$b$7$l$^$;$s!#(B
foozy@708:   $B$7$+$7!"(BMQ $B$NG'<1>u67$rMF0W$KB;$J$&$3$H$+$i!"(B
foozy@708:   $B<jF0$G$N(B \sfilename{status} $BJT=8$OKX$IA4$F$N>l9g$K$*$$$FITE,@Z$G$9!#(B
foozy@708: \end{note}
foozy@708: 
foozy@708: $B?7$7$$%Q%C%A$r:n@.$7$?$J$i$P!"(B
foozy@708: $BIaCJ$HF1$8$h$&$K:n6HNN0h%G%#%l%/%H%j$N%U%!%$%k$rJT=8$G$-$^$9!#(B
foozy@708: \hgcmd{diff} $B$d(B \hgcmd{annotate} $B$H$$$C$?!"(B
foozy@708: Mercurial $B$NA4$F$NDL>o%3%^%s%I$O$=$l0JA0$HA4$/F1MM$K5!G=$7$^$9!#(B
foozy@708: 
foozy@708: \subsection{$B%Q%C%A$N(B refresh}
foozy@708: 
foozy@708: $B:n6HFbMF$rJ]B8$9$kCJ3,$K$J$C$?$J$i!"(B
foozy@708: $B:n6HCf$N%Q%C%A$r99?7$9$k$?$a$K(B \hgxcmd{mq}{qrefresh} $B$r;HMQ$7$^$9(B
foozy@708: $B!J?^(B~\ref{ex:mq:qnew}$B;2>H!K!#(B
foozy@708: $B$3$N%3%^%s%I$O!"(B
foozy@708: $B:n6HNN0h%G%#%l%/%H%j$G$NJQ99FbMF$r%Q%C%A$X$H3JG<$7!"(B
foozy@708: $BBP1~$9$k%A%'%s%8%;%C%H$r!"$=$l$i$NJQ99FbMF$rJ];}$9$k$h$&$K99?7$7$^$9!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qrefresh}
foozy@708:   \caption{$B%Q%C%A$N(B refresh}
foozy@708:   \label{ex:mq:qrefresh}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \hgxcmd{mq}{qrefresh} $B%3%^%s%I$O$$$D$G$b2?EY$G$b<B9T$G$-$k$N$G!"(B
foozy@708: $B:n6H$N(B``$B%A%'%C%/%]%$%s%H(B''$B$H$7$FMxMQ$9$k$N$bNI$$$G$7$g$&!#(B
foozy@708: $BET9g$NNI$$;~$K%Q%C%A$N(B refresh $B$r<B;\$9$k$3$H$G!"(B
foozy@708: $B<B83E*$J:n6H$r9T$C$F$_$F!"$=$l$,$&$^$/5!G=$7$J$$>l9g$K$O!"(B
foozy@708: $BD>6a$N(B refresh $B;~E@$^$G$NJQ99$r!"(B
foozy@708: \hgcmd{revert} $B%3%^%s%I$K$h$j<h$j>C$9$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qrefresh2}
foozy@708:   \caption{$BJ#?t2s$N%Q%C%A(B refresh $B$K$h$kJQ99$NC_@Q(B}
foozy@708:   \label{ex:mq:qrefresh2}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \subsection{$B%Q%C%A$N@Q$_=E$M$HDI@W(B}
foozy@708: 
foozy@708: $B%Q%C%A$KBP$9$k:n6H$r=*$($k$+!"(B
foozy@708: $BB>$N%Q%C%A$KBP$9$k:n6H$,I,MW$K$J$C$?$J$i!"(B
foozy@708: $B:FEY(B \hgxcmd{mq}{qnew} $B%3%^%s%I$r<B9T$9$k$3$H$G!"(B
foozy@708: $B?7$7$$%Q%C%A$r:n@.$7$^$9!#(B
foozy@708: Mercurial $B$O!"?75,$K:n@.$7$?$3$N%Q%C%A$r!"(B
foozy@708: $B4{B8$N%Q%C%A$N:G>e0L$KE,MQ$7$^$9!#(B
foozy@708: $B?^(B~\ref{ex:mq:qnew2}$B$r;2>H$7$F$/$@$5$$!#(B
foozy@708: $B@h$K:n6H$7$F$$$?%Q%C%A$K4^$^$l$kJQ99$O!"(B
foozy@708: $B$3$N?7$7$$%Q%C%A$NJ8L.$N0lIt$H$7$F4^$^$l$^$9(B
foozy@708: $B!J(B\hgcmd{annotate} $B=PNO$r8+$l$P!"$3$N$3$H$OL@$i$+$G$9!K!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qnew2}
foozy@708:   \caption{$B#1$DL\$N>e$K@Q$_=E$M$i$l$k#2$DL\$N%Q%C%A(B}
foozy@708:   \label{ex:mq:qnew2}
foozy@708: \end{figure}
foozy@708: 
foozy@708: $B$3$l$^$G$O!"(B
foozy@708: \hgxcmd{mq}{qnew} $B$H(B \hgxcmd{mq}{qrefresh} $B$r=|$$$F!"(B
foozy@708: Mercurial $B$NDL>o%3%^%s%I$N$_$r;HMQ$9$k$h$&$KCm0U$7$F$-$^$7$?!#(B
foozy@708: $B$7$+$7!"(B
foozy@708: $B?^(B~\ref{ex:mq:qseries} $B$K<($9$h$&$K!"(B
foozy@708: $B%Q%C%A$K4X$9$k:n6H$r9T$&:]$K$h$jJXMx$JB?$/$N%3%^%s%I$r!"(B
foozy@708: MQ $B$ODs6!$7$F$$$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item \hgxcmd{mq}{qseries} $B%3%^%s%I$O(B
foozy@708:   MQ $B$,Ev3:%j%]%8%H%jCf$G4IM}$7$F$$$kA4$F$N%Q%C%A$N0lMw$r!"(B
foozy@708:   $B8E$$$b$N$+$i?7$7$$$b$N!J:G$b:G6a(B\emph{$B:n@.$5$l$?$b$N(B}$B!K(B
foozy@708:   $B$N=g=x$G0lMwI=<($7$^$9!#(B
foozy@708: 
foozy@708: \item \hgxcmd{mq}{qapplied} $B%3%^%s%I$O!"(B
foozy@708:   MQ $B$,Ev3:%j%]%8%H%j$G(B\emph{$BE,MQ$7$?(B}$BA4$F$N%Q%C%A$N0lMw$r!"(B
foozy@708:   $B8E$$$b$N$+$i?7$7$$$b$N!J:G$b:G6aE,MQ$5$l$?$b$N!K(B
foozy@708:   $B$N=g=x$G0lMwI=<($7$^$9!#(B
foozy@708: \end{itemize}
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qseries}
foozy@708:   \label{ex:mq:qseries}
foozy@708:   \caption{\hgxcmd{mq}{qseries} $B$*$h$S(B 
foozy@708:    \hgxcmd{mq}{qapplied} $B$K$h$k%Q%C%A$N@Q$_=E$M$N=,F@(B}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \subsection{$B%Q%C%A$N@Q$_=E$M$NA`:n(B}
foozy@708: 
foozy@708: ``$B4IM}$5$l$F$$$k(B''$B%Q%C%A$H(B``$BE,MQ$5$l$F$$$k(B''$B$=$l$N4V$K0c$$$,$"$k$3$H$r!"(B
foozy@708: $B@h$N5-=R$G$O0E$K<($7$F$$$^$9$,!"(B
foozy@708: $B<B:]$KN><T$N4V$K$O0c$$$,$"$j$^$9!#(B
foozy@708: MQ $B$OE,MQ$9$k$3$HL5$7$K!"%Q%C%A$r%j%]%8%H%jCf$G4IM}$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \emph{$BE,MQ$5$l$?(B}$B%Q%C%A$O!"(B
foozy@708: $B%j%]%8%H%jCf$KBP1~$9$k%A%'%s%8%;%C%H$r;}$A!"(B
foozy@708: $B%Q%C%A$H%A%'%s%8%;%C%H$N8z2L$O:n6HNN0h%G%#%l%/%H%j$K$*$$$F8+$k$3$H$,$G$-$^$9!#(B
foozy@708: \hgxcmd{mq}{qpop} $B%3%^%s%I$r;HMQ$7$F!"(B
foozy@708: $B%Q%C%A$NE,MQ$r<h$j>C$9$3$H$b$G$-$^$9!#(B
foozy@708: 
foozy@708: MQ $B$O<h$j=|$+$l$?%Q%C%A$r(B\emph{$B4IM}(B}$B$7B3$1$^$9$,!"(B
foozy@708: $B$=$N%Q%C%A$O$b$O$d%j%]%8%H%jCf$KBP1~$9$k%A%'%s%8%;%C%H$r;}$?$:!"(B
foozy@708: $B:n6HNN0h%G%#%l%/%H%j$K$O%Q%C%A$K$h$kJQ99$N:/@W$O;D$5$l$F$$$^$;$s!#(B
foozy@708: $B?^(B~\ref{fig:mq:stack}$B$K!"(B
foozy@708: $BE,MQ$5$l$?%Q%C%A$HDI@W$5$l$F$$$k$=$l$N0c$$$r<($7$^$9!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \centering
foozy@708:   \grafix{mq-stack}
foozy@708:   \caption{MQ $B$N%Q%C%A$N@Q$_=E$M$K$*$1$kE,MQ:Q$_%Q%C%A$HL$E,MQ%Q%C%A(B}
foozy@708:   \label{fig:mq:stack}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \hgxcmd{mq}{qpush} $B%3%^%s%I$r;HMQ$9$k$3$H$G!"(B
foozy@708: $BL$E,MQ%Q%C%A$N:FE,MQ!"$J$$$7<h$j=|$-$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708: $B$3$NA`:n$K$h$j%Q%C%A$KBP1~$9$k?7$7$$%A%'%s%8%;%C%H$,:n@.$5$l!"(B
foozy@708: $B%Q%C%A$K$h$kJQ99$O:F$S:n6HNN0h%G%#%l%/%H%j$K8=$l$^$9!#(B
foozy@708: $B?^(B~\ref{ex:mq:qpop}$B$K!"(B
foozy@708: \hgxcmd{mq}{qpop} $B$*$h$S(B \hgxcmd{mq}{qpush} $B$N<B;\Nc$r<($7$^$9!#(B
foozy@708: $B?^$N$h$&$K#1$D$J$$$7#2$D$N%Q%C%A$r0lEY<h$j=|$$$F$b!"(B
foozy@708: \hgxcmd{mq}{qseries} $B$N=PNO$OJQ2=$7$^$;$s$,!"(B
foozy@708: $B$=$N0lJ}$G(B \hgxcmd{mq}{qapplied} $B$N=PNO$OJQ2=$7$^$9!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qpop}
foozy@708:   \caption{$BE,MQ%Q%C%A$N@Q$_=E$M$NJQ99(B}
foozy@708:   \label{ex:mq:qpop}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \subsection{$BJ#?t%Q%C%A$NE,MQ(B(push)$B$*$h$S<h$j>C$7(B(pop)}
foozy@708: 
foozy@708: \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N$=$l$>$l$,!"(B
foozy@708: $B%G%U%)%k%H$G$O0lEY$K0l$D$N%Q%C%A$KBP$7$F=hM}$r9T$&0lJ}$G!"(B
foozy@708: $B0lEY$KJ#?t$N%Q%C%A$NE,MQ$d<h$j>C$7$r9T$&$3$H$b$G$-$^$9!#(B
foozy@708: \hgxcmd{mq}{qpush} $B$K(B
foozy@708: \hgxopt{mq}{qpush}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
foozy@708: $BA4$F$NL$E,MQ%Q%C%A$NE,MQ$,!"(B
foozy@708: \hgxcmd{mq}{qpop} $B$K(B
foozy@708: \hgxopt{mq}{qpop}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
foozy@708: $BA4$F$NE,MQ:Q$_%Q%C%A$N<h$j>C$7$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708: $B!J$=$l0J30$NJ#?t%Q%C%A$NE,MQ!?<h$j>C$7$NJ}K!$K4X$7$F$O!"(B
foozy@708: ~\ref{sec:mq:perf} $B@a$r;2>H$7$F$/$@$5$$!#!K(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.qpush-a}
foozy@708:   \caption{$BA4$F$NL$E,MQ%Q%C%A$NE,MQ(B}
foozy@708:   \label{ex:mq:qpush-a}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \subsection{$B0BA43NG'$H$=$NL58z2=(B}
foozy@708: 
foozy@708: $B$$$/$D$+$N(B MQ $B%3%^%s%I$O!"(B
foozy@708: $B=hM}$NA0$K:n6HNN0h%G%#%l%/%H%j$N3NG'$r9T$$!"(B
foozy@708: $B2?$i$+$N2~JQ$,8!=P$5$l$?>l9g$K$O=hM}$rCfCG$7$^$9!#(B
foozy@708: $B$3$N3NG'$O!"(B
foozy@708: $B%Q%C%A$K<h$j9~$^$l$F$$$J$$JQ99FbMF$r<:$o$J$$$?$a$K9T$o$l$^$9!#(B
foozy@708: $B?^(B~\ref{ex:mq:add} $B$KNc$r<($7$^$9!#(B
foozy@708: \hgxcmd{mq}{qnew} $B%3%^%s%I$OL$<h$j9~$_$NJQ99(B
foozy@708: $B!J$3$N%1!<%9$G$O(B \filename{file3} $B$N(B \hgcmd{add} $B$K5/0x$9$k$b$N!K$,$"$k>l9g!"(B
foozy@708: $B?7$7$$%Q%C%A$r@8@.$7$^$;$s!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tutorial.add}
foozy@708:   \caption{$B6/@)E*$J%Q%C%A$N@8@.(B}
foozy@708:   \label{ex:mq:add}
foozy@708: \end{figure}
foozy@708: 
foozy@708: $B:n6HNN0h%G%#%l%/%H%j$r3NG'$9$k%3%^%s%I$O!"(B
foozy@708: $B$9$Y$F(B``$BN;2r:Q$_(B''$B%*%W%7%g%s$r<h$k$3$H$,$G$-!"(B
foozy@708: $B$=$N%*%W%7%g%s$O>o$K(B \option{-f} $B$HL>$E$1$i$l$F$$$^$9!#(B
foozy@708: \option{-f} $B%*%W%7%g%s$N87L)$J0UL#$O%3%^%s%I$4$H$K0[$J$j$^$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: \hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}} 
foozy@708: $B$O?7$?$K@8@.$5$l$k%Q%C%A$KL$<h$j9~$_$NJQ99$rA4$F<h$j9~$_$^$9$,!"(B
foozy@708: \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} 
foozy@708: $B$O<h$j>C$5$l$k%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k$KBP$9$kJQ99$r85$KLa$7$^$9(B
foozy@708: \footnote{$BLuCm(B:
foozy@708: $B!V%Q%C%A$N1F6A$r85$KLa$9!W$N$G$O$J$/!"(B
foozy@708: $B!V%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k!W$rA4$F85$KLa$9!"$N0U(B}$B!#(B
foozy@708: $BMxMQ$9$kA0$K3F%3%^%s%I$N(B \option{-f} $B%*%W%7%g%s$N%I%-%e%a%s%H$r3NG'$7$^$7$g$&!*(B
foozy@708: 
foozy@708: \subsection{$BJ#?t%Q%C%A$N0l3g=hM}(B}
foozy@708: 
foozy@708: \hgxcmd{mq}{qrefresh} $B%3%^%s%I$O!"(B
foozy@708: $B>o$K(B\emph{$B:G>e0L$N(B}$BE,MQ:Q$_%Q%C%A$r99?7$7$^$9!#(B
foozy@708: $B$3$l$O!"$"$k%Q%C%A$KBP$9$kA`:n$r!J(Brefresh $B$9$k$3$H$G!KCfCG$7!"(B
foozy@708: $B<h$j>C$7!J(Bpop$B!K$J$$$7E,MQ!J(Bpush$B!K$K$h$jJL$N%Q%C%A$r:G>e0L$K;}$C$F$/$k$3$H$G!"(B
foozy@708: $B$=$N%Q%C%A$KBP$7$F:n6H$9$k$3$H$,$G$-$k$3$H$r0UL#$7$^$9!#(B
foozy@708: 
foozy@708: $B$3$N5!G=$K$h$C$F2DG=$K$J$k$3$H$rNc$K$h$C$F<($7$^$9!#(B
foozy@708: $B#2$D$N%Q%C%A$K$h$C$F?7$7$$5!G=$r3+H/$7$F$$$k$b$N$H$7$^$7$g$&!#(B
foozy@708: $B#1$DL\$N%Q%C%A$O%=%U%H%&%'%"$NCf3K5!G=$NJQ99$r!"(B
foozy@708: $B$=$7$F#2$DL\$N%Q%C%A$O(B --- $B#1$DL\$N%Q%C%A$N>e$G(B ---
foozy@708: $BCf3K5!G=$NJQ99$r;HMQ$9$k$?$a$N%f!<%6!<%$%s%?%U%'!<%9(B(UI)$B$NJQ99$r9T$$$^$9!#(B
foozy@708: UI $B$X$N%Q%C%A$N:n6HCf$K!"(B
foozy@708: $BCf3K5!G=$X$N%Q%C%A$K%P%0$r8+$D$1$?$H$7$F$b!"(B
foozy@708: $B$=$l$r=$@5$9$k$N$O4JC1$J$3$H$G$9!#(B
foozy@708: UI $B$X$N%Q%C%A$KBP$9$k(B \hgxcmd{mq}{qrefresh} $B$K$h$j:n6HCf$NJQ99$rJ]B8$7$?8e$K!"(B
foozy@708: \hgxcmd{mq}{qpop} $B$K$h$jA`:nBP>]%Q%C%A$rCf3K5!G=$X$N$=$l$KJQ99$7$^$9(B
foozy@708: $B!J%Q%C%A%9%?%C%/$r2<$X$H0\F0$7$^$9!K!#(B
foozy@708: $BCf3K5!G=$X$N%Q%C%A$N%P%0$r=$@5$7!"(B
foozy@708: \hgxcmd{mq}{qrefresh} $B$K$h$C$F%Q%C%A$X$NH?1G$r9T$C$?8e$K!"(B
foozy@708: \hgxcmd{mq}{qpush} $B$K$h$jA`:nBP>]%Q%C%A$r(B UI $B$X$N%Q%C%A$KLa$9$3$H$G!"(B
foozy@708: $B$d$j$+$1$N:n6H$r7QB3$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \section{$B%Q%C%A$K4X$7$F99$K>\$7$/(B}
foozy@708: \label{sec:mq:adv-patch}
foozy@708: 
foozy@708: MQ $B$O%Q%C%A$NE,MQ$K(B GNU \command{patch} $B%3%^%s%I$r;HMQ$7$^$9$N$G!"(B
foozy@708: \command{patch} $B%3%^%s%I$NF0:n$H%Q%C%A$=$N$b$N$K4X$7$F!"(B
foozy@708: $B$h$j>\:Y$J>pJs$rCN$k$3$H$OM-MQ$G$9!#(B
foozy@708: 
foozy@708: \subsection{$B=|5n?t(B}
foozy@708: 
foozy@708: $B%Q%C%A$N%U%!%$%k%X%C%@$r8+$k$H!"(B
foozy@708: $B<B:]$N%Q%9L>$K$O8=$l$J$$M>J,$JMWAG$r@hF,$K;}$C$F$$$k$3$H$K5$$,IU$/$G$7$g$&!#(B
foozy@708: $B$3$l$O0JA0$K%Q%C%A$,@8@.$5$l$F$$$?J}K!$NL>;D$G$9(B
foozy@708: $B!J:#$G$b$3$NJ}K!$rMQ$$$F$$$^$9$,!"(B
foozy@708: $B6aG/$N9=@.4IM}%D!<%k$G$O5)$G$9!K!#(B
foozy@708: 
foozy@708: Alice $B$,(B tarball $B$rE83+$7$F%U%!%$%k$rJT=8$7$?8e$G!"(B
foozy@708: $B%Q%C%A$r:n@.$7$h$&$H9M$($?$H$7$^$9!#(B
foozy@708: $B:n6HNN0h%G%#%l%/%H%j$r2~L>$7!"(B
foozy@708: $B:FEY(B tarball $B$rE83+!J$3$NE83+$N$?$a$K2~L>$9$k$3$H$,I,MW$K$J$j$^$9!K$7!"(B
foozy@708: \command{diff} $B%3%^%s%I$K(B
foozy@708: \cmdopt{diff}{-r} $B$*$h$S(B \cmdopt{diff}{-N} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
foozy@708: $B2~JQA0$N%G%#%l%/%H%j$H2~JQ8e$N%G%#%l%/%H%j$N4V$G:F5"E*$K%Q%C%A$r@8@.$7$^$9!#(B
foozy@708: $B0lJ}$K$O2~JQA0$N%G%#%l%/%H%jL>$,A4$F$N%U%!%$%k$N%Q%9KAF,$KIU2C$5$l!"(B
foozy@708: $BB>J}$K$O2~JQ8e$N%G%#%l%/%H%jL>$,F1MM$KIU2C$5$l$^$9!#(B
foozy@708: 
foozy@708: Alices $B$+$i%Q%C%A$r<u$1<h$C$??MJ*$N4D6-$K!"(B
foozy@708: $B2~JQA0$H2~JQ8e%G%#%l%/%H%j$NN>J}$H87L)$K0lCW$9$kL>A0$N%G%#%l%/%H%j$,$"$k!"(B
foozy@708: $B$H$$$&$N$O$"$j$=$&$b$J$$;v$G$9$+$i!"(B
foozy@708: \command{patch} $B%3%^%s%I$O!"(B
foozy@708: $B%Q%C%AE,MQ;~$K%Q%9L>MWAG$N2?HVL\$^$G$r<h$j=|$/$+$r;X$9(B
foozy@708: \cmdopt{patch}{-p} $B%*%W%7%g%s$r;}$C$F$$$^$9!#(B
foozy@708: $B$3$N%*%W%7%g%s$K;XDj$5$l$k?t$r(B\emph{$B=|5n?t(B}$B!J(Bstrip count$B!K$H8F$S$^$9!#(B
foozy@708: 
foozy@708: ``\texttt{-p1}'' $B%*%W%7%g%s$O!"(B
foozy@708: ``$B=|5n?t$r#1$H$_$J$9(B''$B$3$H$r0UL#$7$^$9!#(B
foozy@708: \command{patch} $B%3%^%s%I$,!"(B
foozy@708: $B%U%!%$%k%X%C%@$K$*$$$F%U%!%$%kL>(B \filename{foo/bar/baz} $B$r8!CN$7$?>l9g!"(B
foozy@708: \filename{foo} $BItJ,$r=|5n$7$?(B 
foozy@708: \filename{bar/baz} $B$H$$$&%U%!%$%k$KBP$7$F%Q%C%A$r$"$F$^$9(B
foozy@708: $B!J87L)$J$3$H$r8@$($P!"(B
foozy@708: $B=|5n?t$O=|5n$5$l$k(B\emph{$B%Q%96h@Z$j(B}$B!J$*$h$S$=$l$KIU?o$9$kMWAG!K$N?t$r;X$7$^$9!#(B
foozy@708: $B=|5n?t#1$O!"(B\filename{foo/bar} $B$r(B \filename{bar} $B$K$7$^$9$,!"(B
foozy@708: \filename{/foo/bar}$B!J@hF,$N%9%i%C%7%e$KCm0U!K$O(B 
foozy@708: \filename{foo/bar} $B$K$J$j$^$9!K!#(B
foozy@708: 
foozy@708: $B%Q%C%A$K$*$1$k(B``$BI8=`$N(B''$B=|5n?t$O#1$G$9$N$G!"(B
foozy@708: $B$[$H$s$IA4$F$N%Q%C%A$O<h$j=|$+$l$k@hF,MWAG$r#1$D4^$s$G$$$^$9!#(B
foozy@708: Mercurial $B$N(B \hgcmd{diff} $B%3%^%s%I$O$3$N7A<0$G%Q%9L>$r@8@.$7$^$9$N$G!"(B
foozy@708: \hgcmd{import} $B%3%^%s%I$d(B MQ $B$O=|5n?t#1$N%Q%C%A$r4|BT$7$F$$$^$9!#(B
foozy@708: 
foozy@708: $B=|5n?t$,#1$G$O$J$$%Q%C%A$r%Q%C%A%-%e!<$KDI2C$7$h$&$H$7$?>l9g!"(B
foozy@708: $B8=;~E@$G(B \texttt{-p} $B%*%W%7%g%s$r;}$C$F$$$J$$(B
foozy@708: \hgxcmd{mq}{qimport} $B!J(B~\bug{311} $B;2>H$N$3$H!K$G$O<h$j9~$`$3$H$,$G$-$^$;$s!#(B
foozy@708: $B$=$N>l9g!"(B
foozy@708: \hgxcmd{mq}{qnew} $B$G?75,%Q%C%A$r(B MQ $B>e$K:n@.$7!"(B
foozy@708: \cmdargs{patch}{-p\emph{N}} $B$K$h$j%Q%C%A$rE,MQ!"(B
foozy@708: \hgcmd{addremove} $B$G%Q%C%A$K$h$jDI2C!?:o=|$5$l$?%U%!%$%k$rFCDj$7!"(B
foozy@708: \hgxcmd{mq}{qrefresh} $B$r9T$&$N$,:GA1$NJ}K!$G$9!#(B
foozy@708: $B$3$N$h$&$JLLE]$J<j=g$O$$$:$lITMW$K$J$k$+$b$7$l$^$;$s!#(B
foozy@708: $B>\:Y$O(B ~\bug{311} $B$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \subsection{$B%Q%C%AE,MQ<j=g(B}
foozy@708: 
foozy@708: \command{patch} $B$,(B hunk $B$rE,MQ$9$k:]$K$O!"(B
foozy@708: it tries a handful of
foozy@708: (successively $B$O$I$3$K3]$+$k!)(B)
foozy@708: successively less accurate strategies to try to make the hunk apply XXXXX
foozy@708: $BMQ?4?<$$$3$NJ}K!$K$h$j!"8E$$HG$N%U%!%$%k$G@8@.$5$l$?%Q%C%A$G$"$C$F$b!"(B
foozy@708: $B?7$7$$HG$N%U%!%$%k$KE,MQ$9$k$3$H$,!"B?$/$N>l9g$G2DG=$H$J$j$^$9!#(B
foozy@708: 
foozy@708: \command{patch} $B%3%^%s%I$O!"(B
foozy@708: $B:G=i$O(B hunk $B$K$*$1$k9THV9f!"(B
foozy@708: $B%3%s%F%-%9%H$*$h$SJQ99BP>]%F%-%9%H$N87L)0lCW$r;n$_$^$9!#(B
foozy@708: $B87L)0lCW$,$G$-$J$$>l9g!"(B
foozy@708: $B9THV9f$K4X$9$k>pJs$rL5;k$7!"(B
foozy@708: $B%3%s%F%-%9%H$N$_$N87L)0lCW$r;n$_$^$9!#(B
foozy@708: $B$3$l$,@.8y$7$?>l9g!"(B
foozy@708: \command{patch} $B%3%^%s%I$O!"(B
foozy@708: hunk $B$,E,MQ$5$l$?$3$H$H!"(B
foozy@708: $B85$N9THV9f$+$i(B\emph{$B%*%U%;%C%HJ,(B}$B$:$l$F$$$k$3$H$rI=<($7$^$9!#(B
foozy@708: 
foozy@708: $B%3%s%F%-%9%H$N$_$K$h$k0lCW$,<:GT$7$?>l9g!"(B
foozy@708: \command{patch} $B$OKAF,$*$h$SKvHx9T$r<h$j=|$$$?%3%s%F%-%9%H$rMQ$$$F!"(B
foozy@708: \emph{$B=L>.(B}$B%3%s%F%-%9%H$N$_$K$h$k0lCW$r;n$_$^$9!#(B
foozy@708: $B=L>.%3%s%F%-%9%H$K$h$k(B hunk $BE,MQ$,@.8y$7$?>l9g!"(B
foozy@708: \emph{$B$"$$$^$$$JMW0x(B}$B$r85$K(B hunk $B$,E,MQ$5$l$?$3$H$rI=<($7$^$9(B
foozy@708: $B!J$3$N;~<($5$l$k?tCM$O!"(B
foozy@708: \command{patch} $B%3%^%s%I$,%Q%C%AE,MQA0$K%3%s%F%-%9%H$+$i<h$j=|$$$?9T?t$G$9!K!#(B
foozy@708: 
foozy@708: $B$3$l$i$N$I$N5;K!$G$bE,MQ$G$-$J$$>l9g!"(B
foozy@708: \command{patch} $B%3%^%s%I$OAhE@$H$J$C$F$$$k(B hunk $B$,5Q2<$5$l$?;]$rI=<($7$^$9!#(B
foozy@708: \command{patch} $B%3%^%s%I$O5Q2<$5$l$?(B hunk $B!JC1$K(B ``reject'' $B$H$b8F$P$l$^$9!K(B
foozy@708: $B$rF1L>$G(B \sfilename{.rej} $B3HD%;R$r;}$D%U%!%$%k$KJ]B8$7$^$9!#(B
foozy@708: $B99$K$=$N>e$G!"(B
foozy@708: $B%Q%C%AE,MQA0$N%U%!%$%k$N%3%T!<$r(B \sfilename{.orig} $B3HD%;RIU$-$GJ]B8$7$^$9!#(B
foozy@708: $B3HD%;RL5$7$N%U%!%$%k$O!"(B
foozy@708: $BE,@Z$K$NE,MQ(B\emph{$B$5$l$?(B} hunk $B$K$h$kJQ99$r4^$s$G$$$^$9!#(B
foozy@708: $B%U%!%$%k(B \filename{foo} $B$rJQ99$9$k#6$D$N(B hunk $B$r;}$D%Q%C%A$,$"$j!"(B
foozy@708: $B$=$N$&$A$N#1$D$,E,MQ$G$-$J$+$C$?>l9g!"(B
foozy@708: $BJQ99A0$NFbMF$r;}$D(B \filename{foo.orig}$B!"(B
foozy@708: $BE,MQ$G$-$J$+$C$?(B hunk $B$r#1$D;}$D(B \filename{foo.rej} $B$*$h$S(B
foozy@708: $BE,MQ$G$-$?#5$D$N(B hynk $B$K$h$kJQ99$r4^$`(B \filename{foo} 
foozy@708: $B$N#3$D$N%U%!%$%k$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{$B%Q%C%A$N<B8=>e$NJJ(B}
foozy@708: 
foozy@708: \command{patch} $B%3%^%s%I$N%U%!%$%k$X$N:nMQ$rCN$k>e$G!"(B
foozy@708: $BM-MQ$J;v$,$$$/$D$+$"$j$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item $B$o$+$j$-$C$?;v$G$9$,!"(B\command{patch} $B$O%P%$%J%j%U%!%$%k$r07$($^$;$s!#(B
foozy@708: 
foozy@708: \item $B<B9T%S%C%H$b07$($^$;$s$N$G!"?7$7$$%U%!%$%k$r:n@.$9$k:]$K$O!"(B
foozy@708:   $BFI$_<h$j2DG=$K$O$7$^$9$,!"<B9T2DG=$K$O$7$^$;$s!#(B
foozy@708: 
foozy@708: \item \command{patch} $B$O!":o=|BP>]%U%!%$%k$H6u%U%!%$%k$N:9J,$r$b$C$F!"(B
foozy@708:   $B%U%!%$%k$N:o=|$rI=$7$^$9!#(B
foozy@708:   $B$=$N$?$a!"(B``$B%U%!%$%k$r:o=|$9$k(B''$B$3$H$O!"(B
foozy@708:    $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,:o=|$5$l$k(B''$B$h$&$K8+$($^$9!#(B
foozy@708: 
foozy@708: \item $B6u$N%U%!%$%k$HDI2CBP>]%U%!%$%k$N:9J,$r$b$C$F!"(B
foozy@708:   $B%U%!%$%k$NDI2C$rI=$7$^$9!#(B
foozy@708:   $B$=$N$?$a!"(B``$B%U%!%$%k$rDI2C$9$k(B''$B$3$H$O!"(B
foozy@708:   $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,DI2C$5$l$k(B''$B$h$&$K8+$($^$9!#(B
foozy@708: 
foozy@708: \item $B8E$$L>A0$N%U%!%$%k$N:o=|$H?7$7$$L>A0$N%U%!%$%k$NDI2C$r$b$C$F!"(B
foozy@708:   $B%U%!%$%k$N2~L>$rI=$7$^$9!#(B
foozy@708:   $B$3$l$O!"%U%!%$%k$N2~L>$r9T$&%Q%C%A$N%5%$%:(B
foozy@708:   $B!J(Bfootprint$B!K$,Bg$-$/$J$k$3$H$r0UL#$7$^$9(B
foozy@708:   $B!J%Q%C%A$K$*$1$k%U%!%$%k$N2~L>$d%3%T!<$r(B Mercurial $B$,?dB,$9$k$3$H$O!"(B
foozy@708:   $B8=>u$G$O9T$o$l$J$$$3$H$K$bN10U$7$F$/$@$5$$!K(B $B!#(B
foozy@708: 
foozy@708: \item \command{patch} $B$O6u$N%U%!%$%k$rI=8=$G$-$^$;$s$N$G!"(B
foozy@708:   ``$B6u$N%U%!%$%k$r%D%j!<$KDI2C$9$k(B''$B$3$H$r%Q%C%A$GI=8=$9$k$3$H$O=PMh$^$;$s!#(B
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: \subsection{$B$"$$$^$$$5$KCm0U(B}
foozy@708: 
foozy@708: $B%*%U%;%C%HIU$-$d!"$"$$$^$$$JMW0x$r85$K$7$F$$$k>l9g$G$"$C$F$b!"(B
foozy@708: $B%Q%C%A$NE,MQ$O40A4$K@.8y$9$k$3$H$,B?$$$N$G$9$,!"(B
foozy@708: $B0lJ}$G$3$N$h$&$J87L)@-$r7g$$$?E,MQ<jK!$O!"(B
foozy@708: $B$*$N$:$H%U%!%$%k$X$N%Q%C%AE,MQ$,IT40A4$G$"$k2DG=@-$r;D$7$F$7$^$$$^$9!#(B
foozy@708: $B:G$bE57?E*$J;vNc$O!"(B
foozy@708: $B%Q%C%A$r#2EYE,MQ$7$F$7$^$&$3$H$d!"(B
foozy@708: $BITE,@Z$J0LCV$KE,MQ$7$F$7$^$&$3$H$G$9!#(B
foozy@708: \command{patch} $B$d(B \hgxcmd{mq}{qpush} 
foozy@708: $B$,%*%U%;%C%H$d$"$$$^$$MW0x$K4X$7$F8@5Z$7$?:]$K$O!"(B
foozy@708: $B%U%!%$%k$,E,@Z$KJQ99$5$l$F$$$k$3$H$r8e$+$i3NG'$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B%*%U%;%C%HIU$-$d!"$"$$$"$^$$$JMW0x$r85$KE,MQ$5$l$?%Q%C%A$r(B refresh $B$9$k$N$,!"(B
foozy@708: $BB?$/$N>l9g$K$*$$$F$*$9$9$a$J$N$O!"(B
foozy@708: $B%Q%C%A$N(B refresh $B$,!"(B
foozy@708: $B%Q%C%A$re:No$KE,MQ$9$k$?$a$N?7$7$$%3%s%F%-%9%H>pJs$r@8@.$9$k$+$i$G$9!#(B
foozy@708: $B$?$@$7!"%Q%C%A$r(B refresh $B$9$k$3$H$G!"(B
foozy@708: $B85%U%!%$%k$N0[$J$kHG$KBP$7$F%Q%C%A$NE,MQ$,<:GT$9$k$h$&$K$J$k>l9g$,$"$k$?$a!"(B
foozy@708: ``$BB?$/$N>l9g(B''$B$*$9$9$a$G$9$,!"(B``$B>o$K(B''$B$G$O$"$j$^$;$s!#(B
foozy@708: $B%=!<%9%D%j!<$NJ#?t$NHG$KBP$7$FE,MQ2DG=$J%Q%C%A$rJ]<i$9$k$h$&$J>l9g!"(B
foozy@708: $B%Q%C%AE,MQ=hM}$N7k2L$r8!>Z$9$k5!2q$rF@$k$3$H$,=PMh$k$N$G!"(B
foozy@708: $B%Q%C%A$K$"$$$^$$MW0x$r;}$?$;$F$*$/$N$O5vMFHO0O$G$9!#(B
foozy@708: 
foozy@708: \subsection{$B5Q2<$5$l$?(B hunk $B$N<h$j07$$(B}
foozy@708: 
foozy@708: $B%Q%C%A$NE,MQ$K<:GT$9$k$H!"(B
foozy@708: \hgxcmd{mq}{qpush} $B$O%(%i!<%a%C%;!<%8$rI=<($7$F=*N;$7$^$9!#(B
foozy@708: \sfilename{.rej} $B%U%!%$%k$,;D$5$l$F$$$k>l9g!"(B
foozy@708: $B$=$l0J>e$N%Q%C%A$r(B push $B$7$?$jB>$N:n6H$r$9$kA0$K!"(B
foozy@708: $B5Q2<$5$l$?(B hunk $B$N=$@5$r9T$&$3$H$,0lHLE*$K$O:GA1$G$9!#(B
foozy@708: 
foozy@708: $B%Q%C%A$NE,MQBP>]$G$"$k%=!<%9$N99?7$K$h$j!"(B
foozy@708: \emph{$B$=$l$^$G$O(B}$B$-$A$s$HE,MQ$G$-$F$$$?%Q%C%A$,E,MQ$G$-$J$/$J$C$?>l9g$N(B
foozy@708: Mercurial Queues $B$N;H$$J}$N>\:Y$K4X$7$F$O!"(B
foozy@708: ~\ref{sec:mq:merge} $B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: $B;DG0$J$3$H$K!"5Q2<$5$l$?(B hunk $B$r07$&$?$a$N7hDjE*$J5;K!$OB8:_$7$^$;$s!#(B
foozy@708: $BB?$/$N>l9g!"(B\sfilename{.rej} $B%U%!%$%k$r;2>H$7$J$,$i!"(B
foozy@708: $BBP>]%U%!%$%k$rJT=8$7!"(B
foozy@708: $B5Q2<$5$l$?(B hunk $B$r<jF0$GE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
foozy@708: 
foozy@708: $B;W$$@Z$C$?;v$b<-$5$J$$$N$G$"$l$P!"(B
foozy@708: $B%Q%C%A$NE,MQ$K4X$7$F$O(B \command{patch} $B$h$j$b6/NO$J!"(B
foozy@708: \command{wiggle}~\cite{web:wiggle} $B$H8F$P$l$k%D!<%k$,!"(B
foozy@708: Linux $B%+!<%M%k%O%C%+!<$N(B Neil Brown $B$K$h$j=q$+$l$F$$$^$9!#(B
foozy@708: 
foozy@708: \command{patch} $B$K$h$j5Q2<$5$l$?(B hunk $B$NE,MQ$r<+F02=$9$k$?$a$K!"(B
foozy@708: $B4JJX$J<jK!$rMQ$$$k(B \command{mpatch}~\cite{web:mpatch} $B$H8F$P$l$k%D!<%k$b!"(B
foozy@708: $BJL$N(B Linux $B%+!<%M%k%O%C%+!<$N(B Chris Mason
foozy@708: $B!J(BMercurial Queues $B$N:n<T$G$9!K$K$h$j=q$+$l$F$$$^$9!#(B
foozy@708: \command{mpatch} $B$O!"(B
foozy@708: $B#4$D$N$h$/$"$kM}M3$G5Q2<$5$l$?(B hunk $B$NE,MQ$r=u$1$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item hunk $BCfDx$N%3%s%F%-%9%H$,JQ99$5$l$?!#(B
foozy@708: \item hunk $B$N%3%s%F%-%9%H$N!"@hF,$"$k$$$OKvHx$N0lJ}$,8+Ev$?$i$J$$!#(B
foozy@708: \item $BBg$-$J(B hunk $B$h$j$b(B---$BA4It$J$j0lIt$J$j$,(B---
foozy@708:   $B>.$5$J(B hunk $B$KJ,3d$5$l$?J}$,E,MQ$7$d$9$$!#(B
foozy@708: \item $B8=;~E@$G$N%U%!%$%k$H$o$:$+$KFbMF$N0[$J$k9T$r(B 
foozy@708:   hunk $B$,:o=|$7$h$&$H$7$F$$$k!#(B
foozy@708: \end{itemize}
foozy@708: 
foozy@708: \command{wiggle} $B$J$$$7(B \command{mpatch} $B$r;HMQ$9$k:]$K$O!"(B
foozy@708: $B<B;\7k2L$KBP$7$FFs=E$KCm0U$rJ'$&I,MW$,$"$j$^$9!#(B
foozy@708: $B<B$N$H$3$m(B \command{mpatch} $B$O!"(B
foozy@708: $B=hM}$N40N;;~$K<+F0E*$K%^!<%8%W%m%0%i%`$X$HM6F3$9$k$3$H$G!"(B
foozy@708: $B%D!<%k=PNO$NFs=E3NG'$N<jK!$r6/MW$7$F$$$^$9$N$G!"(B
foozy@708: \command{mpatch} $B$N<B9T7k2L$r3NG'$7!"(B
foozy@708: $B;D$5$l$?%^!<%8=hM}$r40N;$5$;$k$3$H$,=PMh$^$9!#(B
foozy@708: 
foozy@708: \section{MQ $B$G:G9b@-G=$r=P$9$?$a$K(B}
foozy@708: \label{sec:mq:perf}
foozy@708: 
foozy@708: MQ $B$OBgNL$N%Q%C%A$N<h$j07$$$r8zN($h$/<B;\$7$^$9!#(B
foozy@708: 2006 EuroPython conference~\cite{web:europython} $B$G$N9V1i$N$?$a$K!"(B
foozy@708: 2006 $BG/Cf=\$K@-G=<B83$r<B;\$7$^$7$?!#(B
foozy@708: $BE,MQ%Q%C%A$H$7$F!"(B
foozy@708: 1,738 $B8D$N%Q%C%A$r;}$D(B Linux 2.6.17-mm1 $B%Q%C%A7ONs$r;HMQ$7$F$$$^$9!#(B
foozy@708: Linux 2.6.12-rc2 $B$+$i(B Linux 2.6.17 $B$K$+$1$F$N!"(B
foozy@708: 27,472 $B$N%j%S%8%g%sA4$F$r;}$D(B Linux $B%+!<%M%k%j%]%8%H%j$KBP$7$F!"(B
foozy@708: $B$3$l$i$N%Q%C%A$rE,MQ$7$?$N$G$9!#(B
foozy@708: 
foozy@708: $B5l<0$NCY$$%i%C%W%H%C%W(B PC $B>e$G!"(B
foozy@708: 1,738 $B8D$N%Q%C%AA4$F$r(B
foozy@708: \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$9$k$N$K(B 3.5 $BJ,!"(B
foozy@708: $B$=$l$i$r(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$9$k$N$K(B 30 $BIC$+$+$j$^$7$?(B
foozy@708: $B!J?7$7$$%i%C%W%H%C%W$J$i!"(B
foozy@708: $BA4$F$N%Q%C%A$r(B push $B$9$k;~4V$O#2J,$^$G2<$,$j$^$7$?!K!#(B
foozy@708: $B:G$bBg$-$J%Q%C%A$N#1$D!J(B22,779 $B9T$NJQ99$r(B 287 $B$N%U%!%$%k$KBP$7$F9T$$$^$9!K(B
foozy@708: $B$r(B 6.6 $BIC$G(B \hgxcmd{mq}{qrefresh} $B$G$-$F$$$^$9!#(B
foozy@708: 
foozy@708: MQ $B$,5pBg$J%=!<%9%D%j!<$G:n6H$9$k$N$KE,$7$F$$$k$N$OL@$i$+$G$9$,!"(B
foozy@708: $B:G9b$N@-G=$r=P$9$?$a$KCN$C$F$*$$$?$[$&$,NI$$4v$D$+$N%3%D$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $B:G=i$N%3%D$O!"(B``$B0l3g(B''$BA`:n$r9T$&$3$H$G$9!#(B
foozy@708: \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N<B9T$N:]$K$O!"(B
foozy@708: $B2?$iJQ99$,$5$l$F$$$J$$$3$H$H!"(B
foozy@708: \hgxcmd{mq}{qrefresh} $B$7K:$l$,$J$$$3$H$r3NG'$9$k$?$a$K!"(B
foozy@708: $B>o$K:n6HNN0h%G%#%l%/%H%j$rAv::$7$F$$$^$9!#(B
foozy@708: $B>.$5$J%=!<%9%D%j!<$N>l9g$O!"(B
foozy@708: $B$3$NAv::$KMW$9$k;~4V$O5$$K$J$j$^$;$s!#(B
foozy@708: $B$7$+$7!"CfDxEY!J(B10,000 $B%U%!%$%kDxEY!K$N%=!<%9%D%j!<$G$O!"(B
foozy@708: $B#1IC$+$i$=$l0J>e$N;~4V$,I,MW$G$9!#(B
foozy@708: 
foozy@708: \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B%3%^%s%I$G$O!"(B
foozy@708: $BJ#?t%Q%C%A$r0l3g$7$F(B push $B$*$h$S(B pop $B$9$k:]$K!"(B
foozy@708: $B:n6H$r@Z$j>e$2$k(B``$BE~C#%Q%C%A(B''$B$r;XDj$9$k$3$H$,$G$-$^$9!#(B
foozy@708: $BE~C#%Q%C%A;XDjIU$-$G<B9T$9$k$3$H$G!"(B
foozy@708: \hgxcmd{mq}{qpush} 
foozy@708: $B$O;XDj$7$?%Q%C%A$,E,MQ%9%?%C%/$N:G>e0L$K$J$k$^$G%Q%C%A$NE,MQ$r9T$$$^$9!#(B
foozy@708: \hgxcmd{mq}{qpop} $B$N>l9g$O!"(B
foozy@708: $BE~C#%Q%C%A$,E,MQ%9%?%C%/$N:G>e0L$K$J$k$^$G%Q%C%A$N<h$j>C$7$r9T$$$^$9!#(B
foozy@708: 
foozy@708: $BE~C#%Q%C%A$N;XDj$K$O!"%Q%C%A$NL>A0$+?tCM$,;HMQ$G$-$^$9!#(B
foozy@708: $B?tCM;XDj$N>l9g!"%Q%C%A$O#0$+$i?t$(;O$a$k$?$a!"(B
foozy@708: $B:G=i$N%Q%C%A$O#0!"<!$N%Q%C%A$N#1$H$J$j$^$9!#(B
foozy@708: 
foozy@708: \section{$B85%=!<%9JQ99;~$N%Q%C%A$N99?7(B}
foozy@708: \label{sec:mq:merge}
foozy@708: 
foozy@708: $BD>@\JQ99$9$k$3$H$N$G$-$J$$%j%]%8%H%j$KBP$7$F!"(B
foozy@708: $B%Q%C%A%9%?%C%/$r;}$D$3$H$O$h$/$"$k;v$G$9!#(B
foozy@708: $BBh;0<T$N%=!<%9$KBP$9$kJQ99$d!"(B
foozy@708: $B85%=!<%9$N99?7IQEY$h$j$b3+H/$K;~4V$N3]$+$k5!G=$r<BAu$7$F$$$k>l9g!"(B
foozy@708: $B85%=!<%9$N99?7$H$NF14|$d!"(B
foozy@708: $BE,MQ$G$-$J$/$J$C$?%Q%C%A$N(B hunk $B$r=$@5$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $B$3$N$h$&$J:n6H$O!"%Q%C%A7ONs$N(B\emph{$B%j%Y!<%9(B}$B$H8F$P$l$^$9!#(B
foozy@708: 
foozy@708: $B%j%Y!<%9$N0lHVC1=c$JJ}K!$O!"(B
foozy@708: $B%Q%C%A$KBP$7$F(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$r9T$$!"(B
foozy@708: \hgcmd{pull} $B$G85%=!<%9$NJQ99$r%j%]%8%H%j$K<h$j9~$_!"(B
foozy@708: $B:G8e$K(B \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} $B$G%Q%C%A$r:FE,MQ$7$^$9!#(B
foozy@708: MQ $B$K$h$k%Q%C%AE,MQ$G$O!"(B
foozy@708: $B>WFM$,8!=P$5$l$F$$$k4V$OE,MQ$G$-$J$$%Q%C%A$NE,MQ$r;_$a$k$3$H$G!"(B
foozy@708: $B>WFM$N2r>C$H%Q%C%A$N(B \hgxcmd{mq}{qrefresh} $B$r9T$&5!2q$r@_$1$D$D!"(B
foozy@708: $B%Q%C%A%9%?%C%/Cf$NA4$F$N%Q%C%A$r99?7$7=*$o$k$^$G%Q%C%A$NE,MQ$r7QB3$7$^$9!#(B
foozy@708: 
foozy@708: $B85%=!<%9$NJQ99$,%Q%C%A$NE,MQ6q9g$K0-1F6A$r5Z$\$9?4G[$,L5$$$N$G$"$l$P!"(B
foozy@708: $B$3$N<jK!$O<j7Z$G3n$D>e<j$/5!G=$9$k$G$7$g$&!#(B
foozy@708: $B$7$+$7$J$,$i!"(B
foozy@708: $B85%=!<%9$GIQHK$K99?7$5$l$kItJ,$K?($l$k$h$&$J%Q%C%A%9%?%C%/$N>l9g!"(B
foozy@708: $B5Q2<$5$l$?(B hunk $B$N<jF0$G$N=$@5$O!"(B
foozy@708: $B$9$0$K$G$bLLE]$J:n6H$H2=$9$G$7$g$&!#(B
foozy@708: 
foozy@708: $B%j%Y!<%9=hM}$rItJ,E*$K<+F02=$9$k;v$O2DG=$G$9!#(B
foozy@708: $B85%=!<%9$N4v$D$+$N%j%S%8%g%s$KBP$7$F$-$A$s$HE,MQ$G$-$k%Q%C%A$G$"$l$P!"(B
foozy@708: $B0[$J$k%j%S%8%g%s$H%Q%C%A$H$N4V$G$N>WFM$KBP$7$F!"(B
foozy@708: $B;vA0$NE,MQ>pJs$rMQ$$$?2r>C$r(B MQ $B$K$h$j9T$&$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B<j=g$O>/!99~$_F~$C$F$$$^$9!#(B
foozy@708: 
foozy@708: \begin{enumerate}
foozy@708: \item $B3+;O$KEv$?$C$F!"(B
foozy@708:   $B%Q%C%A$,$-$A$s$HE,MQ$G$-$F$$$k:G>e0L%j%S%8%g%s$KBP$7$F(B
foozy@708:   \hgcmdargs{qpush}{-a} $B$K$h$jA4$F$N%Q%C%A$rE,MQ$7$^$9!#(B
foozy@708: 
foozy@708: \item \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}} 
foozy@708:   $B$rMQ$$$F%Q%C%A%G%#%l%/%H%j$N%P%C%/%"%C%W$rJ]B8$7$^$9!#(B
foozy@708:   $B$3$N%3%^%s%I$N<B9T$N:]$K$O!"%Q%C%A$rJ]B8$7$?%G%#%l%/%H%j$NL>A0$rI=<($7$^$9!#(B
foozy@708:   \texttt{\emph{N}} $B$r>.$5$$@0?t$H$7$?>l9g!"(B
foozy@708:   \sdirname{.hg/patches.\emph{N}} 
foozy@708:   $B$H$$$&7A<0$NL>A0$N%G%#%l%/%H%j$K%Q%C%A$,J]B8$5$l$^$9!#(B
foozy@708:   $BE,MQ$5$l$?%Q%C%A0J30$K!"(B
foozy@708:   ``$BJ]B8$5$l$?%A%'%s%8%;%C%H(B''$B$b%3%_%C%H$7$^$9$,!"(B
foozy@708:   $B$3$l$OFbItE*$J>pJs$H!"(B
foozy@708:   \sfilename{series} $B$*$h$S(B \sfilename{status} $B$N>uBV$r5-O?$9$k$?$a$G$9!#(B
foozy@708: 
foozy@708: \item hgcmd{pull} $B$K$h$j!"99?7$r%j%]%8%H%j$K<h$j9~$_$^$9(B
foozy@708:   $B!J(B\hgcmdargs{pull}{-u} $B$rMQ$$$J$$M}M3$O!"0J9_$N5-=R$r;2>H$7$F$/$@$5$$!K!#(B
foozy@708: 
foozy@708: \item \hgcmdargs{update}{\hgopt{update}{-C}} $B$rMQ$$$F:G?7$N(B 
foozy@708:   tip $B%j%S%8%g%s$K99?7$9$k$3$H$G!"E,MQ$7$?%Q%C%A$rL58z$K$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \item \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}
foozy@708:     \hgxopt{mq}{qpush}{-a}} $B$rMQ$$$FA4$F$N%Q%C%A$r%^!<%8$7$^$9!#(B
foozy@708:   \hgxcmd{mq}{qpush} $B$X$N(B \hgxopt{mq}{qpush}{-m} $B%*%W%7%g%s;XDj$K$h$j!"(B
foozy@708:   $B%Q%C%AE,MQ$K<:GT$7$?:]$K!"(BMQ $B$O(B 3-way $B%^!<%8$r<B;\$7$^$9!#(B
foozy@708: 
foozy@708: \end{enumerate}
foozy@708: 
foozy@708: \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}} $B<B;\$N:]$K$O!"(B
foozy@708: \sfilename{series} 
foozy@708: $B%U%!%$%k$KNs5s$5$l$?$=$l$>$l$N%Q%C%A$ODL>oDL$jE,MQ$5$l$^$9!#(B
foozy@708: $B$"$$$^$$MW0x$r85$K%Q%C%A$,E,MQ$5$l$?$j!"%Q%C%A$NE,MQ$,5Q2<$5$l$?>l9g!"(B
foozy@708: MQ $B$O(B \hgxcmd{mq}{qsave} $B$K$h$jJ]B8$5$l$?%Q%C%A%-%e!<$r;2>H$7!"(B
foozy@708: $B%Q%C%A$KBP1~$9$k%A%'%s%8%;%C%H$rMQ$$$?(B 3-way $B%^!<%8$r9T$$$^$9!#(B
foozy@708: $B$3$N%^!<%8=hM}$K$O(B Mercurial $B$NDL>o$N%^!<%85!9=$,MxMQ$5$l$^$9$N$G!"(B
foozy@708: $B>WFM$N2r>C$N:]$K$O(B GUI $B%^!<%8%D!<%k$,5/F0$5$l$k$+$b$7$l$^$;$s!#(B
foozy@708: 
foozy@708: $B%Q%C%A$N1F6A$r2r>C$7=*$($k$H!"(B
foozy@708: $B%^!<%87k2L$r85$K(B MQ $B$K$h$k%Q%C%A$N(B refresh $B$,9T$o$l$^$9!#(B
foozy@708: 
foozy@708: $B$3$N<j=g$r=*$($?%j%]%8%H%j$K$O!"(B
foozy@708: $B8E$$%Q%C%A%-%e!<$KAjEv$9$k%A%'%s%8%;%C%H$r85$K$7$?M>J,$J(B head $B$H!"(B
foozy@708: \sdirname{.hg/patches.\emph{N}} $B$KJ]B8$5$l$?8E$$%Q%C%A%-%e!<$,;D$j$^$9!#(B
foozy@708: $BM>J,$J(B head $B$N:o=|$O!"(B
foozy@708: \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}}
foozy@708: $B$J$$$7(B \hgcmd{strip} $B$G9T$&$3$H$,$G$-$^$9!#(B
foozy@708: $B%P%C%/%"%C%W$H$7$F$NI,MW@-$,$J$/$J$C$?$J$i!"(B
foozy@708: \sdirname{.hg/patches.\emph{N}} $B$b:o=|$7$F$7$^$C$F9=$$$^$;$s!#(B
foozy@708: 
foozy@708: \section{$B%Q%C%A$N;XDj(B}
foozy@708: 
foozy@708: $B%Q%C%A$rA`:n$9$k(B MQ $B%3%^%s%I$K$*$1$k%Q%C%A$N;XDj$O!"(B
foozy@708: $B%Q%C%A$NL>A0$+?tCM$G9T$$$^$9!#(B
foozy@708: $BL>A0$K$h$k;XDj$OHs>o$K$o$+$j$d$9$$$G$7$g$&!#(B
foozy@708: $BNc$($P!"(B\hgxcmd{mq}{qpush} $B%3%^%s%I$X$N(B
foozy@708: \filename{foo.patch} $B$N;XDj$K$h$j!"(B
foozy@708: \filename{foo.patch} $B$,E,MQ$5$l$k$^$G%Q%C%A$NE,MQ$,7+$jJV$5$l$^$9!#(B
foozy@708: 
foozy@708: $BC;=L7A<0$H$7$F!"L>A0$H?tCM%*%U%;%C%H$NN>J}$r;XDj$9$k$3$H$b$G$-$^$9!#(B
foozy@708: \texttt{foo.patch-2} $B$O(B
foozy@708: ``\texttt{foo.patch} $B%Q%C%A$N#2$DA0(B''$B$r!"(B
foozy@708: \texttt{bar.patch+4} $B$O(B
foozy@708: ``\texttt{bar.patch} $B%Q%C%A$N#4$D8e$m(B''$B$r0UL#$7$^$9!#(B
foozy@708: 
foozy@708: $B?tCM$K$h$k%Q%C%A$N;XDj$O$=$l$[$IFq$7$/$"$j$^$;$s!#(B
foozy@708: \hgxcmd{mq}{qseries} $B$K$h$j:G=i$KI=<($5$l$k%Q%C%A$O#0!"(B
foozy@708: $B#2HVL\$O#1!"$H$J$C$F$$$^$9(B
foozy@708: $B!J$=$&!"#0$+$i?t$(;O$a$k;EAH$_$G$9!K!#(B
foozy@708: 
foozy@708: MQ $B$O!"DL>o$N(B Mercurial $B%3%^%s%I$NMxMQ;~$K$*$1$k%Q%C%AA`:n$b4JJX$K$7$^$9!#(B
foozy@708: $B%A%'%s%8%;%C%H<1JL;R$r<u$1IU$1$kA4$F$N%3%^%s%I$O!"(B
foozy@708: $BE,MQ:Q$_$N%Q%C%AL>$b<u$1IU$1$^$9!#(B
foozy@708: $B%j%]%8%H%jCf$K85!9$"$C$?DL>o$N%?%0$K2C$($F!"(B
foozy@708: $B%Q%C%AE,MQ$N:]$N5/E@$H$J$k%j%S%8%g%s$K%?%0(B\footnote{
foozy@708: \index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qparent}
foozy@708: }$B$,IUM?$5$l$^$9!#(B
foozy@708: $B$=$l$K2C$($F!"(B
foozy@708: \index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qbase} $B$*$h$S(B
foozy@708: \index{tags!$BFC<l%?%0L>(B!\texttt{qtip}}\texttt{qtip} $B%?%0$K$h$j!"(B
foozy@708: $B:G2<0L$*$h$S:G>e0L$NE,MQ$:$_%Q%C%A$r$=$l$>$l;XDj$G$-$^$9!#(B
foozy@708: 
foozy@708: Mercurial $B$NDL>o%?%0$KBP$9$k$3$l$i$N3HD%$O!"(B
foozy@708: $B%Q%C%A$N<h$j07$$$r$h$j4JJX$K$7$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: 
foozy@708: \item $B:G?7$N0lO"$NJQ99$r85$K!"%a!<%j%s%0%j%9%H$X%Q%C%AGzCF!J(Bpatchbomb$B!K(B
foozy@708:   $B$rEj9F$7$?$$>l9g$K$O!)(B
foozy@708:   \begin{codesample4}
foozy@708:     hg email qbase:qtip
foozy@708:   \end{codesample4}
foozy@708:   $B!J(B``$B%Q%C%AGzCF(B''$B$K$D$$$F$O(B \ref{sec:hgext:patchbomb} $B@a$r;2>H$7$F$/$@$5$$!K(B
foozy@708: 
foozy@708: \item \texttt{foo.patch} $B0J9_$N%Q%C%A$G!"(B
foozy@708:   $BFCDj$N%G%#%l%/%H%jG[2<$N%U%!%$%k$K4XM?$7$F$$$k$b$N$r!"(B
foozy@708:   $BA4$FCN$j$?$$>l9g$K$O!)(B
foozy@708:   \begin{codesample4}
foozy@708:     hg log -r foo.patch:qtip \emph{subdir}
foozy@708:   \end{codesample4}
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $B%Q%C%A$NL>A0$rMxMQ2DG=$K$9$k$?$a$K!"(B
foozy@708: MQ $B$O(B Mercurial $B$N;}$DFbIt%?%05!G=$r;HMQ$7$F$$$k$N$G!"(B
foozy@708: $B%Q%C%A$rL>A0$G;XDj$9$k>l9g$K$O!"(B
foozy@708: $B$=$NL>A0$rA4$FF~NO$9$kI,MW$O$"$j$^$;$s!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.id.output}
foozy@708:   \caption{MQ $B$N%?%05!G=$r;HMQ$7$?%Q%C%A$NA`:n(B}
foozy@708:   \label{ex:mq:id}
foozy@708: \end{figure}
foozy@708: 
foozy@708: $B%Q%C%A$NL>A0$r%?%0$G<B8=$9$k$3$H$G!"(B
foozy@708: \hgcmd{log} $B%3%^%s%I$N<B9T;~$K!"(B
foozy@708: $B$=$N=PNO$N0lIt$H$7$F%?%0$H$7$F$N%Q%C%AL>$,I=<($5$l$k!"(B
foozy@708: $B$H$$$&I{:nMQ$bF@$i$l$^$9!#(B
foozy@708: $B$3$N$3$H$K$h$j!"(B
foozy@708: $BE,MQ:Q$_$N%Q%C%A$H(B``$BDL>o$N(B''$B%j%S%8%g%s$r!"(B
foozy@708: $B;k3PE*$K<1JL$9$k$3$H$rMF0W$K$7$^$9!#(B
foozy@708: $BE,MQ:Q$_%Q%C%A$HO"7H$9$k(B Mercurial $B$NDL>o%3%^%s%I$N<B9TNc$r(B
foozy@708: $B?^(B ~\ref{ex:mq:id} $B$K<($7$^$9!#(B
foozy@708: 
foozy@708: \section{$BCN$C$F$*$/$HJXMx$J;vJA(B}
foozy@708: 
foozy@708: MQ $B$NMxMQ$K4X$7$F!"FHN)$7$?@a$r@_$1$kDx$G$O$J$$$b$N$N!"(B
foozy@708: $BCN$C$F$*$$$?$[$&$,NI$$;vJA$,4v$D$+$"$j$^$9!#(B
foozy@708: $B$3$3$G$O!"$=$&$$$C$?;vJA$r=8$a$F$_$^$7$?!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item \hgxcmd{mq}{qpop} $B$G%Q%C%A$r<h$j>C$7$?8e$K!"(B
foozy@708:   \hgxcmd{mq}{qpush} $B$G:FEYE,MQ$7$?>l9g!"(B
foozy@708:   $B$=$N;~E@$G$NE,MQ:Q$_%Q%C%A$KAjEv$9$k%A%'%s%8%;%C%H$O!"(B
foozy@708:   pop/push $B$9$kA0$N%A%'%s%8%;%C%H$H$O(B\emph{$B0[$J$k<1JL;R(B}$B$r;}$A$^$9!#(B
foozy@708:   $B<1JL;R$,0[$J$kM}M3$O(B ~\ref{sec:mqref:cmd:qpush} $B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \item $B>/$J$/$H$b!"(B
foozy@708:   $B%Q%C%A%9%?%C%/>e$N%Q%C%A$K$h$k%A%'%s%8%;%C%H72$N(B
foozy@708:   ``$B%Q%C%A@-(B''$B$rJ]$A$?$$$N$G$"$l$P!"(B
foozy@708:   $BB>$N%V%i%s%A$H$=$l$i$r(B\hgcmd{$B%^!<%8(B}$B$9$Y$-$G$O$"$j$^$;$s!#(B
foozy@708:   \hgcmd{$B%^!<%8(B}$B$7$?>l9g!"$=$l<+BN$O@.8y$9$k$G$7$g$&$,!"(B
foozy@708:   $B7k2L$H$7$F(B MQ $B$,:.Mp$7$F$7$^$&$G$7$g$&!#(B
foozy@708: \end{itemize}
foozy@708: 
foozy@708: \section{$B%j%]%8%H%j$K$*$1$k%Q%C%A$N4IM}(B}
foozy@708: \label{sec:mq:repo}
foozy@708: 
foozy@708: MQ $B$,MxMQ$9$k(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$,(B
foozy@708: Mercurial $B$N:n6HNN0h%G%#%l%/%H%j$N30$K$"$k$?$a!"(B
foozy@708: MQ $B$N(B``$B2<$K$"$k(B''Mercurial $B$N%j%]%8%H%j$O!"(B
foozy@708: $B%Q%C%A$N4IM}$dB8:_$K4X$7$F2?$bG'<1$7$F$$$^$;$s!#(B
foozy@708: 
foozy@708: $B$3$N$3$H$O!"(B
foozy@708: $B%Q%C%A%G%#%l%/%H%j$NFbMF$r$=$l<+?H$N(B Mercurial $B%j%]%8%H%j$rMQ$$$F4IM}$G$-$k!"(B
foozy@708: $B$H$$$&6=L#?<$$2DG=@-$r$b$?$i$7$^$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B%Q%C%A$K4X$9$k:n6H$r9T$$!"(B\hgxcmd{mq}{qrefresh} $B$r$7$?8e$G!"(B
foozy@708: $B%Q%C%A$N8=>u$r(B \hgcmd{commit} $B$9$k$3$H$G!"(B
foozy@708: $B8e$+$i$=$N>uBV$X$H%Q%C%A$r(B``$B4,$-La$9(B''$B!J(Broll back$B!K$9$k$3$H$,$G$-$k$J$I!"(B
foozy@708: $BM-MQ$J5!G=$rDs6!$7$^$9!#(B
foozy@708: 
foozy@708: $BJ#?t$N%j%]%8%H%j$N4V$G!"(B
foozy@708: $BF10l%Q%C%A%9%?%C%/$N0[$J$kHG$r6&M-$9$k$3$H$b=PMh$^$9!#(B
foozy@708: $BI.<T$O(B Linux $B%+!<%M%k5!G=$N3+H/$N:]$K$3$N<jK!$r;HMQ$7$F$$$^$9!#(B
foozy@708: $BJ#?t$N(B CPU $B%"!<%-%F%/%A%c$4$H$K$=$l$>$l???7$7$$%+!<%M%k%=!<%9$N%3%T!<$rMQ0U$7!"(B
foozy@708: $B$=$l$>$l$K:n6HCf$N%Q%C%A$r4^$`%j%]%8%H%j$rJ#@=$7$^$9!#(B
foozy@708: $BJL$J%"!<%-%F%/%A%c$GJQ99FbMF$N;n83$r9T$&:]$K$O!"(B
foozy@708: $BBP1~$9$k%+!<%M%k%=!<%9$N%Q%C%A%j%]%8%H%j$X8=;~E@$N%Q%C%A$r(B push $B$7!"(B
foozy@708: $BA4$F$N%Q%C%A$r:GE,MQ!J(Bpop $B8e$K(B push$B!K$7$?8e$K!"(B
foozy@708: $B$=$N%+!<%M%k$N%S%k%I$*$h$S;n83$r9T$$$^$9!#(B
foozy@708: 
foozy@708: $B%j%]%8%H%j7A<0$N>e$G%Q%C%A$r4IM}$9$k$3$H$G!"(B
foozy@708: $BE,MQBP>]$N%=!<%9$KBP$9$k@)8f$N2DH]$K4X$o$jL5$/!"(B
foozy@708: $B3+H/<TF1;N$G$*8_$$$K>WFM$9$k$3$HL5$7$K!"(B
foozy@708: $BF1$8%Q%C%A7ONs$KBP$9$k:n6H$r<B;\$G$-$^$9(B
foozy@708: 
foozy@708: \subsection{MQ $B$N%Q%C%A%j%]%8%H%j%5%]!<%H(B}
foozy@708: 
foozy@708: MQ $B$O(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$r<+?H$N%j%]%8%H%j$H$7$F!"(B
foozy@708: $B%Q%C%AA`:n$rJd=u$7$^$9$,!"(B
foozy@708: \hgxcmd{mq}{qinit} $B$G$N=i4|2=$N:]$K(B
foozy@708: \hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
foozy@708: \sdirname{.hg/patches} $B%G%#%l%/%H%j$r(B
foozy@708: Mercurial $B%j%]%8%H%j$H$7$F:n@.$9$k$3$H$,=PMh$^$9!#(B
foozy@708: 
foozy@708: \begin{note}
foozy@708:   \hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$N;XDj$rK:$l$?>l9g!"(B
foozy@708:   $BG$0U$N;~E@$G(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$G(B
foozy@708:   \hgcmd{init} $B$r<B9T$7$F$/$@$5$$!#(B
foozy@708:   \sfilename{status} $B$rMzNr4IM}$7$h$&$H;W$&$3$H$O(B\emph{$BK\Ev$K(B}$B$"$j$^$;$s$+$i!"(B
foozy@708:   \sfilename{.hgignore} $B%U%!%$%k$K(B 
foozy@708:   \sfilename{status} $B$rDI2C$9$k$N$rK:$l$J$$$G$/$@$5$$(B
foozy@708:   $B!J(B\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} $B$O!"(B
foozy@708:   $B$3$N:n6H$r<+F0E*$K9T$$$^$9!K!#(B
foozy@708: \end{note}
foozy@708: 
foozy@708: $BMxJX@->e!"(B
foozy@708: \dirname{.hg/patches} $B%G%#%l%/%H%j$,(B
foozy@708: Mercurial $B%j%]%8%H%j$G$"$k>l9g!"(B
foozy@708: MQ $B$O:n@.!&<h$j9~$_$r9T$C$?%Q%C%A$NA4$F$r<+F0E*$K(B
foozy@708: \hgcmd{add} $B$7$^$9!#(B
foozy@708: 
foozy@708: $B:G8e$K$J$j$^$9$,!"(B
foozy@708: MQ $B$O(B \sdirname{.hg/patches} $B$K$*$$$F(B 
foozy@708: \hgcmd{commit} $B$r<B9T$9$kC;=L%3%^%s%I(B 
foozy@708: \hgxcmd{mq}{qcommit} $B$rDs6!$7$F$$$^$9$N$G!"(B
foozy@708: $B!J%G%#%l%/%H%j0\F0Ey$N!KHQ$o$7$$%-!<F~NO$,>JN,$G$-$^$9!#(B
foozy@708: 
foozy@708: \subsection{$B4v$D$+$NCm0UE@(B}
foozy@708: 
foozy@708: MQ $B$K$h$k%Q%C%A$N%j%]%8%H%j4IM}$N%5%]!<%H$O!"8BDjE*$J$b$N$G$9!#(B
foozy@708: 
foozy@708: MQ $B$O!"%Q%C%A%G%#%l%/%H%j$KBP$7$F9T$o$l$?JQ99$r!"(B
foozy@708: $B<+F0E*$K8!=P$9$k$3$H$O$G$-$^$;$s!#(B
foozy@708: \hgcmd{pull} $B$N<B9T$d!"<jF0$G$NJT=8!"(B
foozy@708: $B$"$k$$$O(B \hgcmd{update} $B$N<B9T$K$h$k%Q%C%A$d(B 
foozy@708: \sfilename{series} $B$NJQ99$r9T$C$?>l9g!"(B
foozy@708: $B%Q%C%AE,MQBP>]$N%j%]%8%H%j$K$*$$$F(B
foozy@708: \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$N8e$K(B
foozy@708: \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$r9T$C$F!"(B
foozy@708: $B$=$l$i$NJQ99$rM-8z$K$9$kI,MW$,$"$j$^$9!#(B
foozy@708: $B$3$N:n6H$rK:$l$?>l9g!"(B
foozy@708: MQ $B$OE,MQ$5$l$F$$$k%Q%C%A$,$I$l$J$N$+:.Mp$7$F$7$^$&$G$7$g$&!#(B
foozy@708: 
foozy@708: \section{$B%Q%C%AA`:n$N$?$a$N%5!<%I%Q!<%F%#!<@=%D!<%k(B}
foozy@708: \label{sec:mq:tools}
foozy@708: 
foozy@708: $B;C$/$N4V!"%Q%C%A$r;H$C$?:n6H$r$7$F$$$k$H!"(B
foozy@708: $B07$C$F$$$k%Q%C%A$N2r<a$dA`:n$rJd=u$9$k%D!<%k$,!"(B
foozy@708: $BM_$7$/$F$?$^$i$J$/$J$C$F$$$k$K0c$$$"$j$^$;$s!#(B
foozy@708: 
foozy@708: \command{diffstat} $B%3%^%s%I(B ~\cite{web:diffstat} $B$O!"(B
foozy@708: $B%Q%C%A$K$h$C$F3F%U%!%$%k$,$I$l$@$1JQ99$5$l$k$+$rI=$9%R%9%H%0%i%`$r@8@.$7$^$9!#(B
foozy@708: $B$I$N%U%!%$%k$,!"$I$NDxEY$N1F6A$r<u$1$k$N$+!"(B
foozy@708: $B$H$$$C$?A4BNE*$J(B``$B463P$rDO$`(B''$B$K$ONI$$J}K!$G$9(B
foozy@708: $B!J(B\command{diffstat} $B$N(B 
foozy@708: \cmdopt{diffstat}{-p} $B%*%W%7%g%sMxMQ$OL^O@NI$$$N$G$9$,!"(B
foozy@708: $B%U%!%$%kL>$NA0CV;l$KBP$7$F9T$&(B \cmdopt{diffstat}{-p} $B%*%W%7%g%s$N9*L/$J=hM}$O!"(B
foozy@708: $B>/$J$/$H$bI.<T$K$H$C$F$O$o$+$j$K$/$$$G$9!K!#(B
foozy@708: 
foozy@708: \begin{figure}[ht]
foozy@708:   \interaction{mq.tools.tools}
foozy@708:   \label{ex:mq:tools}
foozy@708:   \caption{\command{diffstat}$B!"(B\command{filterdiff} $B$*$h$S(B \command{lsdiff} $B%3%^%s%I(B}
foozy@708: \end{figure}
foozy@708: 
foozy@708: \package{patchutils} $B%Q%C%1!<%8(B ~\cite{web:patchutils} $B$O5.=E$JB8:_$G$9!#(B
foozy@708: $B$3$N%Q%C%1!<%8$O!"(B
foozy@708: ``Unix $B$NM}G0(B''$B$K=>$C$F!"(B
foozy@708: $B$=$l$>$l$,%Q%C%A$KBP$7$FC10l$N=hM}$r9T$&>.$5$J%D!<%k$N=8$^$j$G$9!#(B
foozy@708: \package{patchutils} $B$NCf$GI.<T$,:G$bMxMQ$7$F$$$k$N$O!"(B
foozy@708: $B%Q%C%A%U%!%$%k$+$i0lIt$rE83+$9$k(B \command{filterdiff} $B$G$9!#(B
foozy@708: $BNc$($P!"(B
foozy@708: $B$"$k%Q%C%A$,?t%@!<%9$N%G%#%l%/%H%j$KEO$C$F?tI4$N%U%!%$%k$rJQ99$9$k>l9g!"(B
foozy@708: \command{filterdiff} $B$r5/F0$9$k$3$H$G!"(B
foozy@708: $B;XDj$7$?%Q%?!<%s$KL>A0$,9gCW$9$k%U%!%$%k$K$@$1JQ99$r9T$&!"(B
foozy@708: $B>.$5$J%Q%C%A$r@8@.$9$k$3$H$,=PMh$^$9!#(B
foozy@708: $B$=$l0J30$NNc$K$D$$$F$O!"(B
foozy@708: ~\ref{mq-collab:tips:interdiff} $B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708: 
foozy@708: \section{$B%Q%C%A$r07$&NI$$J}K!(B}
foozy@708: 
foozy@708: $B0lO"$N%Q%C%A$,!"(B
foozy@708: $B%U%j!<%=%U%H%&%'%"$d%*!<%W%s%=!<%9%W%m%8%'%/%H$XAwIU$9$k$b$N$G$"$m$&$H!"(B
foozy@708: $B$"$J$?$N:n6H$K$*$1$kDj4|E*$JJQ99<jB3$-$H$_$J$5$l$k$b$N$G$"$m$&$H$b!"(B
foozy@708: $B$h$jNI$/:n6H$9$k$?$a$N!"(B
foozy@708: $B4JC1$KMxMQ$G$-$k<jK!$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $B$^$:$O!"%Q%C%A$K@bL@E*$JL>A0$r$D$1$^$7$g$&!#(B
foozy@708: $BNc$($P(B \filename{rework-device-alloc.patch} $B$H$$$C$?L>A0$O!"(B
foozy@708: $B$=$N%Q%C%A$,2?$r9T$&$b$N$+$H$$$&%R%s%H$r$9$P$d$/M?$($F$/$l$k$N$G!"(B
foozy@708: $BNI$$L>A0$H8@$($k$G$7$g$&!#(B
foozy@708: $BL>A0$OD9$/$F$bLdBj$K$O$J$j$^$;$s!#(B
foozy@708: $BL>A0$rF~NO$9$k$3$H$O$=$l$[$IB?$/$O$J$$$G$7$g$&$,!"(B
foozy@708: \hgxcmd{mq}{qapplied} $B$d(B \hgxcmd{mq}{qtop} $B$H$$$C$?%3%^%s%I$O!"(B
foozy@708: $B2?EY$b2?EY$b<B9T$9$k$b$N$G$9$+$i!#(B
foozy@708: $BB?$/$N%Q%C%A$r07$&>l9g$d!"(B
foozy@708: $BB?$/$N0[$J$k%?%9%/$K<j0lGU$G%Q%C%A$KB?$/$NCm0U$r3d$1$J$$$h$&$J>l9g!"(B
foozy@708: $BL>A0$NE,@Z$5$O$H$j$o$1=EMW$G$9!#(B
foozy@708: 
foozy@708: $B<!$K!"$I$N%Q%C%A$KBP$7$F:n6H$7$F$$$k$N$+$KCm0U$7$^$7$g$&!#(B
foozy@708: \hgxcmd{mq}{qtop} $B%3%^%s%I$r(B
foozy@708: ---$BNc$($P!"(B\hgcmdargs{tip}{\hgopt{tip}{-p}} $B$r;XDj$7$D$D(B---
foozy@708: $B;HMQ$7$FIQHK$K%Q%C%A$NL>A0$r8+$k$3$H$G!"(B
foozy@708: $B$I$s$J:n6H$r$7$F$$$k$N$+$r3NG'$7$^$7$g$&!#(B
foozy@708: $BI.<T$O:n6HCf$K2?EY$b0U?^$7$J$$%Q%C%A$KBP$7$F(B
foozy@708: \hgxcmd{mq}{qrefresh} $B$r<B9T$7$F$7$^$C$?$3$H$,$"$j$^$9$,!"(B
foozy@708: $B4V0c$C$?%Q%C%A$K<h$j9~$s$G$7$^$C$?JQ99$r@5$7$$%Q%C%A$K0\F0$5$;$k$N$O!"(B
foozy@708: $B1}!9$K$7$F<j$N$+$+$k$b$N$G$9!#(B
foozy@708: 
foozy@708: $B>e5-$NM}M3$+$i!"(B
foozy@708: ~\ref{sec:mq:tools} $B@a$G>R2p$7$F$$$k(B
foozy@708: \command{diffstat} $B$d(B \command{filterdiff} 
foozy@708: $B$N$h$&$J%5!<%I%Q!<%F%#!<@=%D!<%k$N3X=,$K!"(B
foozy@708: $B>/$7$G$bNI$$$N$G;~4V$rHq$d$9$Y$-$G$9!#(B
foozy@708: $BA0<T$O%Q%C%A$N5Z$\$9JQ99$K4X$7$F$9$P$d$$8+2r$rF@$k$3$H$,!"(B
foozy@708: $B8e<T$O%Q%C%ACf$N(B hunk 
foozy@708: $B$rA*BrE*$K7Q$.9g$o$;$F0[$J$k%Q%C%A$KAH$_>e$2$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \section{MQ $B%/%C%/%V%C%/(B}
foozy@708: 
foozy@708: \subsection{``$B:3:Y$J(B''$B%Q%C%A$N4IM}(B}
foozy@708: 
foozy@708: $B???7$7$$(B Mercurial $B%j%]%8%H%j$K%U%!%$%k$rEjF~$9$k$N$O!"(B
foozy@708: $BHs>o$K%*!<%P!<%X%C%I$,Dc$$$N$G!"(B
foozy@708: $BC1$K%@%&%s%m!<%I$7$?%=!<%9(B tarball $B$KBP$7$FJQ99$r2C$($k$N$@$H$7$F$b!"(B
foozy@708: MQ $B$K$h$j%Q%C%A4IM}$r9T$&$3$H$OHs>o$KM}$K$+$J$C$F$$$^$9!#(B
foozy@708: 
foozy@708: $B$^$:$O%=!<%9(B tarball $B$N%@%&%s%m!<%I$HE83+$r9T$$!"(B
foozy@708: Mercurial $B%j%]%8%H%j$KEjF~$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{mq.tarball.download}
foozy@708: 
foozy@708: $B<!$K%Q%C%A%9%?%C%/$r:n@.$7!"JQ99$r9T$$$^$9!#(B
foozy@708: 
foozy@708: \interaction{mq.tarball.qinit}
foozy@708: 
foozy@708: $B?t=54V$+$i?t%u7n7P$C$F$+$i!"(B
foozy@708: $B$=$N%Q%C%1!<%8$NCx<T$,?7$7$$HG$r%j%j!<%9$7$?$H$7$^$9!#(B
foozy@708: $B$^$:$O%j%]%8%H%j$KJQ99$r<h$j9~$_$^$9!#(B
foozy@708: 
foozy@708: \interaction{mq.tarball.newsource}
foozy@708: 
foozy@708: $B>e5-<j=g$G(B \hgcmd{locate} $B$K$h$j;O$^$k%Q%$%W%i%$%s$O!"(B
foozy@708: $B:n6HNN0h%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$r:o=|$7$^$9$N$G!"(B
foozy@708: \hgcmd{commit} $B$N(B \hgopt{commit}{--addremove} $B%*%W%7%g%s$O!"(B
foozy@708: $B?7$7$$HG$K$*$$$F$I$N%U%!%$%k$,K\Ev$KDI2C!?:o=|$5$l$?$N$+$rH=Dj$G$-$^$9!#(B
foozy@708: 
foozy@708: $B:G8e$K!"?7$7$/$J$C$?%=!<%9%D%j!<$N:G>e0L$G%Q%C%A$rE,MQ$7$^$9!#(B
foozy@708: 
foozy@708: \interaction{mq.tarball.repush}
foozy@708: 
foozy@708: \subsection{$B%Q%C%AA4BN$N7k9g(B}
foozy@708: \label{sec:mq:combine}
foozy@708: 
foozy@708: MQ $B$O%Q%C%AA4BN$r7k9g$9$k(B
foozy@708: \hgxcmd{mq}{qfold} $B%3%^%s%I$rDs6!$7$F$$$^$9!#(B
foozy@708: $B$3$N%3%^%s%I$O!"(B
foozy@708: $BL>A0$r;XDj$7$?%Q%C%A$r;XDj$7$?=g=x$G!"(B
foozy@708: $B:G>e0L$NE,MQ:Q$_%Q%C%A$X$H(B``$B7k9g(B''$B$7!"(B
foozy@708: $B$=$l$i$N@bL@J8$r:G>e0L%Q%C%A$N@bL@J8KvHx$XDI2C$7$^$9!#(B
foozy@708: $B7k9gBP>]$N%Q%C%A$O!"7k9g$N;~E@$GL$E,MQ$G$J$1$l$P$J$j$^$;$s!#(B
foozy@708: 
foozy@708: $B%Q%C%A$N7k9g=g=x$O=EMW$G$9!#(B
foozy@708: $B:G>e0L$NE,MQ:Q$_%Q%C%A$,(B \texttt{foo} $B$G!"(B
foozy@708: $B$=$3$K(B \hgxcmd{mq}{qfold} $B$H(B \texttt{quux} $B$r(B
foozy@708: \hgxcmd{mq}{qfold} $B$9$k>l9g!"(B
foozy@708: $B=g$K(B \texttt{foo}$B!"(B\texttt{bar} $B$=$7$F(B \texttt{quux} 
foozy@708: $B$HE,MQ$9$k$N$HF1$88z2L$r;}$D%Q%C%A$,$G$-$"$,$j$^$9!#(B
foozy@708: 
foozy@708: \subsection{$B%Q%C%A$N0lIt$NB>$N%Q%C%A$X$NJ;9g(B}
foozy@708: 
foozy@708: $B%Q%C%A$N(B\emph{$B0lIt(B}$B$rB>$N%Q%C$XJ;9g$9$k$N$O!"(B
foozy@708: $B%Q%C%AA4BN$r7k9g$9$k$h$j$bLLE]$G$9!#(B
foozy@708: 
foozy@708: $B$"$k%U%!%$%k!J72!K$KBP$9$kJQ99A4BN$r0\F0$7$?$$>l9g!"(B
foozy@708: \command{filterdiff} $B$N(B \cmdopt{filterdiff}{-i} $B$*$h$S(B
foozy@708: \cmdopt{filterdiff}{-x} $B%*%W%7%g%s$rMQ$$$k$3$H$G!"(B
foozy@708: $B%Q%C%A$+$i@Z$j=P$9JQ99E@$rA*Br$7$F!"(B
foozy@708: $B$=$N7k2L$rJ;9g@h%Q%C%A$X$H<h$j9~$`$3$H$G$,$G$-$^$9!#(B
foozy@708: $BDL>o$O<h$j9~$_85$H$J$C$?%Q%C%A$=$N$b$N$OJQ99$7$?$/$J$$$b$N$G$9!#(B
foozy@708: $B$=$3$G!"(B
foozy@708: MQ $B$O<h$j9~$_85%Q%C%A$r(B \hgxcmd{mq}{qpush} $B$9$k:]$K!"(B
foozy@708: $B<h$j9~$^$l$?J,$N(B hunk $B$,5qH]$5$l$?$3$H$,Js9p$5$l$^$9$+$i!"(B
foozy@708: \hgxcmd{mq}{qrefresh} $B$G%Q%C%A$r99?7$9$k$3$H$G!"(B
foozy@708: $B=EJ#$7$?(B hunk $B$r<h$j=|$/$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B#1$D$N%U%!%$%k$KBP$9$kJ#?t$N(B hunk $B$r;}$D%Q%C%A$N0lIt$@$1$,M_$7$$>l9g!"(B
foozy@708: $B;vBV$O$b$&>/$7Lq2p$G$9$,!"(B
foozy@708: $B$=$l$G$bItJ,E*$K<+F02=$9$k$3$H$,$G$-$^$9!#(B
foozy@708: \cmdargs{lsdiff}{-nvv} $B$r;H$&$3$H$G!"(B
foozy@708: $B%Q%C%A$K4X$9$k%a%?%G!<%?$rI=<($5$;$^$9!#(B
foozy@708: 
foozy@708: \interaction{mq.tools.lsdiff}
foozy@708: 
foozy@708: $B$3$N%3%^%s%I$O!"#3$D$N0[$J$k?tCM$NN`$rI=<($7$^$9!#(B
foozy@708: 
foozy@708: \begin{itemize}
foozy@708: \item $B!J:G=i$N%+%i%`$O!K2~JQBP>]$N8D!9$N%U%!%$%k$r%Q%C%ACf$G<1JL$9$k$?$a$N(B
foozy@708:  \emph{$B%U%!%$%kHV9f(B}$B$G!"(B
foozy@708: 
foozy@708: \item $B!J;z2<$2$5$l$?<!$N9T$K$O!KJQ99$5$l$k%U%!%$%k$G$N(B hunk $B$N3+;O9THV9f$H!"(B
foozy@708: 
foozy@708: \item $B!JF1$89T$K!K(Bhunk $B$r<1JL$9$k$?$a$N(B \emph{hunk $BHV9f(B}
foozy@708: 
foozy@708: \end{itemize}
foozy@708: 
foozy@708: $BI,MW$J%U%!%$%kHV9f$d(B hunk $BHV9f$rFCDj$9$k$?$a$K$O!"(B
foozy@708: $B;k3PE*$J@:::$d%Q%C%A$NFI2r$,I,MW$H$5$l$^$9$,!"(B
foozy@708: $B$=$l$i$N?tCM$r(B \command{filterdiff} $B$N(B
foozy@708: \cmdopt{filterdiff}{--files} $B$d(B
foozy@708: \cmdopt{filterdiff}{--hunks} $B$H$$$C$?%*%W%7%g%s$K;XDj$9$k$3$H$G!"(B
foozy@708: $B%U%!%$%k$d(B hunk $B$r@53N$KA*Br$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: $B0lEY(B hunk $B$r<h$j=P$7$F$7$^$($P!"(B
foozy@708: $B7k9g@h%Q%C%A$NKvHx$K7k9g$7$F(B
foozy@708: ~\ref{sec:mq:combine} $B@a$N;D$j$N:n6H$r:F3+$9$k$3$H$,$G$-$^$9!#(B
foozy@708: 
foozy@708: \section{quilt $B$H(B MQ $B$N0c$$(B}
foozy@708: 
foozy@708: $B4{$K(B quilt $B$r=OCN$7$F$$$k$N$G$"$l$P!"(B
foozy@708: MQ $B$OF1MM$N%3%^%s%I72$r;}$C$F$$$^$9$,!"(B
foozy@708: $B$=$NF/$-$K$O$$$/$i$+$N0c$$$,$"$j$^$9!#(B
foozy@708: 
foozy@708: $BKX$I$N(B quilt $B%3%^%s%I$KBP$7$F!"(B
foozy@708: ``\texttt{q}'' $B$G;O$^$kBP1~$9$k(B 
foozy@708: MQ $B$N%3%^%s%I$,$"$k$3$H$K5$IU$/$3$H$G$7$g$&!#(B
foozy@708: $BC"$7!"(B
foozy@708: quilt $B$N(B \texttt{add} $B$*$h$S(B \texttt{remove} $B%3%^%s%I$KBP1~$9$k$N$,!"(B
foozy@708: Mercurial $B$NDL>o$N(B \hgcmd{add} $B$*$h$S(B \hgcmd{remove} $B$G$"$k$N$,Nc30$G$9!#(B
foozy@708: $B$^$?!"(BMQ $B$K$O(B quilt $B$N(B \texttt{edit} $B$KBP1~$9$k%3%^%s%I$O$"$j$^$;$s!#(B
foozy@708: 
foozy@708: %%% Local Variables: 
foozy@708: %%% mode: latex
foozy@708: %%% TeX-master: "00book"
foozy@708: %%% End: 




