hgbook

annotate ja/mq.tex @ 863:84eb02cbf057

Be more Pythonic.
author gpiancastelli
date Tue Sep 01 22:55:17 2009 +0200 (2009-09-01)
parents
children
rev   line source
foozy@708 1 \chapter{Managing change with Mercurial Queues}
foozy@708 2 \label{chap:mq}
foozy@708 3
foozy@708 4 \section{$B%Q%C%A4IM}LdBj(B}
foozy@708 5 \label{sec:mq:patch-mgmt}
foozy@708 6
foozy@708 7 $B%=%U%H%&%'%"%Q%C%1!<%8$r%=!<%9$+$i%$%s%9%H!<%k$9$kI,MW$,$"$k$N$K!"(B
foozy@708 8 $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 9 $B$H$$$&$h$&$J;vBV$O$h$/$"$k$3$H$G$9!#(B
foozy@708 10 $BJQ99$N8e!";C$/%Q%C%1!<%8$N$3$H$rK:$l$F$$$k$H!"(B
foozy@708 11 $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 12 $B%Q%C%1!<%8$N?7$7$$HG$,L$$@$K%P%0$r;D$7$F$$$?$J$i!"(B
foozy@708 13 $B8E$$HG$N%=!<%9%D%j!<$+$i=$@5FbMF$rCj=P$7$F!"(B
foozy@708 14 $B?7$7$$HG$KE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
foozy@708 15 $B$3$N$h$&$J:n6H$OB`6~$G4V0c$$$r5/$3$7$d$9$$$b$N$G$9!#(B
foozy@708 16
foozy@708 17 $B$3$l$O(B``$B%Q%C%A4IM}(B''$BLdBj$NC1=c$J%1!<%9$G$9!#(B
foozy@708 18 $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 19 $B>eN.$N%=!<%9%D%j!<$N>e$G%m!<%+%k$J=$@5$r9T$&I,MW$,$"$k$J$i!"(B
foozy@708 20 $B>eN.%=!<%9$N?7$7$$HG$KBP$7$F%m!<%+%k$J=$@5$rE,MQ$G$-$k$h$&$K!"(B
foozy@708 21 $B$=$&$$$C$?=$@5$rJLES4IM}$7$?$$$H;W$&$G$7$g$&!#(B
foozy@708 22
foozy@708 23 $B%Q%C%A4IM}LdBj$O$5$^$6$^$J>u67$GH/@8$7$^$9!#(B
foozy@708 24 $B%*!<%W%s%=!<%9%=%U%H%&%'%"%W%m%8%'%/%H$N%f!<%6$,!"(B
foozy@708 25 $B%W%m%8%'%/%H$N%a%s%F%J%s%9C4Ev$X!"(B
foozy@708 26 $B%P%0=$@5$d?75,5!G=$r%Q%C%A7A<0$GAwIU$9$k>u67$,!"(B
foozy@708 27 $B$*$=$i$/:G$b$o$+$j$d$9$$>u67$G$7$g$&!#(B
foozy@708 28
foozy@708 29 $B%*!<%W%s%=!<%9%=%U%H%&%'%"$r4^$`%*%Z%l!<%F%#%s%0%7%9%F%`$NG[I[<T$O!"(B
foozy@708 30 $BG[I[$9$k%Q%C%1!<%8$KBP$9$kJQ99$rIQHK$K9T$&$N$G!"(B
foozy@708 31 $B<+J,$?$A$N4D6-$K$*$$$F%S%k%I$r9T$&$N$OEvA3$N$3$H$G$9!#(B
foozy@708 32
foozy@708 33 $B@0Hw$N>e$G4v$D$+JQ99$r9T$$$?$$>l9g!"(B
foozy@708 34 $BI8=`E*$J(B
foozy@708 35 \command{diff} $B$*$h$S(B \command{patch} $B%W%m%0%i%`(B
foozy@708 36 $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 37 $B$r;HMQ$7$F!"C10l$N%Q%C%A$r4IM}$9$k$3$H$O4JC1$G$9!#(B
foozy@708 38 $B$7$+$7!"0lC6JQ99$N?t$,A}$(;O$a$k$H!"(B
foozy@708 39 $BC10l$N%Q%C%A$N4IM}$O4XO"@-$NL5$$(B``$B@.2L$N2t(B''$B$K46$8;O$a$k$?$a!"(B
foozy@708 40 $BNc$($P!"C10l$N%Q%C%A$OC10l$N%P%0=$@5$N$_$r4^$`(B
foozy@708 41 $B!J%Q%C%A$OJ#?t$N%U%!%$%k$r=$@5$9$k$+$b$7$l$^$;$s$,!"(B
foozy@708 42 ``$BC10l$N;v(B''$B$7$+9T$o$J$$!K$h$&$K$J$k$G$7$g$&$+$i!"(B
foozy@708 43 $B0[$J$k%P%0$d%m!<%+%k$J=$@5$KI,MW$H$5$l$k%Q%C%A$r!"(B
foozy@708 44 $B$$$/$D$bJz$($k$3$H$K$J$k$+$b$7$l$^$;$s!#(B
foozy@708 45 $B$3$N$h$&$J>u67$G!"(B
foozy@708 46 $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 47 $BH`$i$O$=$N8e$N%j%j!<%9$K$*$$$F$=$N=$@5$r<h$j9~$`$G$7$g$&$+$i!"(B
foozy@708 48 $B?7$7$$HG$X$N99?7$N:]$K$O!"(B
foozy@708 49 $B$=$N%Q%C%A$NE,MQ$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
foozy@708 50
foozy@708 51 $B>eN.$N%=!<%9%D%j!<$KBP$7$FC10l$N%Q%C%A$rJ]<i$9$k$3$H$O!"(B
foozy@708 52 $BB`6~$G4V0c$$$d$9$$$G$9$,Fq$7$/$O$"$j$^$;$s!#(B
foozy@708 53 $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 54 $BLdBj$NJ#;($5$O$9$_$d$+$KA}2C$7$^$9!#(B
foozy@708 55 $B$9$/$J$+$i$L%Q%C%A$rJz$(9~$`$3$H$G!"(B
foozy@708 56 $BE,MQ$NM-L5$rGD0.$7$?$j!"$=$l$i$rJ]<i$9$k$3$H$,!"(B
foozy@708 57 $B!VLLE]$J$3$H!W$+$i!V05E]$5$l$k$3$H!W$X$HJQ2=$9$k$G$7$g$&!#(B
foozy@708 58
foozy@708 59 $B9,$$$J$3$H$K!"(BMercurial $B$O(B
foozy@708 60 Mercurial Queues
foozy@708 61 $B!J$"$k$$$OC1$K(B ``MQ''$B!K$H8F$P$l$k!"(B
foozy@708 62 $B%Q%C%A4IM}LdBj$r4JAG2=$9$k6/NO$J3HD%5!G=$r;}$C$F$$$^$9!#(B
foozy@708 63
foozy@708 64 \section{Mercurial Queues $B0JA0(B}
foozy@708 65 \label{sec:mq:history}
foozy@708 66
foozy@708 67 1990 $BG/Be8eH>!"2??M$+$N(B Linux $B%+!<%M%k3+H/<TC#$O!"(B
foozy@708 68 Linux $B%+!<%M%k$N5sF0$rJQ$($k(B``$B%Q%C%A7ONs(B''$B$NJ]<i$r;O$a$F$$$^$7$?!#(B
foozy@708 69 $B4v$D$+$N7ONs$O0BDj@-$K!"4v$D$+$OLVMe@-$K!"(B
foozy@708 70 $B$=$NB>$N7ONs$O$h$j<B83E*$JItJ,$K>GE@$rEv$F$F$$$^$7$?!#(B
foozy@708 71
foozy@708 72 $B$3$l$i$N%Q%C%A$N%5%$%:$OB.$d$+$K5pBg2=$7$^$7$?!#(B
foozy@708 73 2002 $BG/!"(BAndrew Morton $B$,!"(B
foozy@708 74 $B<+J,$N%Q%C%A%-%e!<4IM}:n6H$r<+F02=$9$k$N$KMQ$$$F$$$?!"(B
foozy@708 75 $B4v$D$+$N%7%'%k%9%/%j%W%H$rH/I=$7$^$7$?!#(B
foozy@708 76 Andrew $B$O!"(B
foozy@708 77 Linux $B%+!<%M%k%=!<%9>e$G$N?tI4!J;~$K$O?t@i!K$N%Q%C%A$N4IM}$K!"(B
foozy@708 78 $B$3$l$i$N%9%/%j%W%H$r>e<j$KMxMQ$7$F$$$^$7$?!#(B
foozy@708 79
foozy@708 80 \subsection{A patchwork quilt$B!JLuCm!'7Q$.$O$.$N>e3]$1!K(B}
foozy@708 81 \label{sec:mq:quilt}
foozy@708 82
foozy@708 83 2003 $BG/$N=iF,!"(B
foozy@708 84 Andreas Gruenbacher $B$H(B Martin Quinson $B$O!"(B
foozy@708 85 Andrew $B$K$h$k%9%/%j%W%H$N<jK!$r<h$jF~$l$F!"(B
foozy@708 86
foozy@708 87 ``patchwork quilt''~\cite{web:quilt} $B$"$k$$$OC1$K(B ``quilt''
foozy@708 88 ($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 89 $B$H8F$P$l$k%D!<%k$rH/I=$7$^$7$?!#(B
foozy@708 90 $B%Q%C%A4IM}$,BgI}$K<+F02=$5$l$k$3$H$+$i!"(B
foozy@708 91 quilt $B$O%*!<%W%s%=!<%93+H/<T$N4V$G=V$/4V$KBg$-$J;Y;}$rF@$^$7$?!#(B
foozy@708 92
foozy@708 93 quilt $B$O!"(B
foozy@708 94 $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 95 $B4IM}3+;O$N:]$K$O!"(B
foozy@708 96 quilt $B$KBP$7$F%G%#%l%/%H%j%D%j!<$r4IM}$9$k;]$H!"(B
foozy@708 97 $B$I$N%U%!%$%k$r4IM}$7$?$$$N$+$rEA$($^$9!#(B
foozy@708 98 quilt $B$O$3$l$i$N%U%!%$%k$NL>A0$HFbMF$rJL$J>l=j$KJ]B8$7$^$9!#(B
foozy@708 99 $B%P%0$N=$@5$N:]$K$O!"(B
foozy@708 100 $B?7$7$$%Q%C%A$r!JC10l$N%3%^%s%I$r;HMQ$7$F!K:n@.$7!"(B
foozy@708 101 $B=$@5$9$kI,MW$NM-$k%U%!%$%k$NJT=8$r9T$$!"(B
foozy@708 102 $B%Q%C%A$r(B``refresh''$B$7$^$9!#(B
foozy@708 103
foozy@708 104 refresh $B$NCJ3,$G(B quilt $B$O%G%#%l%/%H%j%D%j!<$rAv::$7$^$9!#(B
foozy@708 105 quilt $B$O<B;\$5$l$?A4$F$NJQ99$G%Q%C%A$r99?7$7$^$9!#(B
foozy@708 106 $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 107 ``$B#1$D$N%Q%C%A$,E,MQ$5$l$?%D%j!<(B''$B$+$i(B
foozy@708 108 ``$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 109 $BDI@W$9$k$3$H$,$G$-$^$9!#(B
foozy@708 110
foozy@708 111 $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 112 $B%Q%C%A$r(B``pop''$B$9$k$H!"(B
foozy@708 113 $B$=$N%Q%C%A$K$h$kJQ99$O%G%#%l%/%H%j%D%j!<$+$i<h$j=|$+$l$^$9!#(B
foozy@708 114 $B$7$+$7!"(B
foozy@708 115 quilt $B$O$I$N%Q%C%A$,<h$j=|$+$l$?$N$+$r3P$($F$$$k$N$G!"(B
foozy@708 116 $B<h$j=|$+$l$?%Q%C%A$r:F$S(B``push''$B$9$k$3$H$,$G$-!"(B
foozy@708 117 $B%G%#%l%/%H%j%D%j!<$K$OEv3:%Q%C%A$K$h$kJQ99$,I|85$5$l$^$9!#(B
foozy@708 118 $B:G$b=EMW$JE@$O!"(B
foozy@708 119 ``refresh''$B%3%^%s%I$N<B9T$H!"(B
foozy@708 120 $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 121 $B$3$l$O!"(B
foozy@708 122 $B%Q%C%A$NE,MQ>u67$H!"$=$N%Q%C%A$K$h$kJQ99FbMF$NN>J}$r!"(B
foozy@708 123 $BG$0U$N;~E@$GJQ99$G$-$k$3$H$r0UL#$7$^$9!#(B
foozy@708 124
foozy@708 125 quilt $B$OJQ99@)8f%D!<%k$r0U<1$7$J$$$?$a!"(B
foozy@708 126 $BE83+$5$l$?(B tarball $B$N:G>e0L%G%#%l%/%H%j$K$*$$$F$b!"(B
foozy@708 127 Subversion $B%j%]%8%H%j$K$*$$$F$bF1Ey$K5!G=$7$^$9!#(B
foozy@708 128
foozy@708 129 \subsection{patchwork quilt $B$+$i(B Mercurial Queues $B$X(B}
foozy@708 130 \label{sec:mq:quilt-mq}
foozy@708 131
foozy@708 132 2005 $BG/Cf=\!"(B
foozy@708 133 quilt $BE*$J?6$kIq$$$r(B Mercurial $B$KDI2C$9$k$?$a$N!"(B
foozy@708 134 Mercurial Queues $B$H8F$P$l$k3HD%5!G=$,!"(B
foozy@708 135 Chris Mason $B$K$h$j<BAu$5$l$^$7$?!#(B
foozy@708 136
foozy@708 137 quilt $B$H(B MQ $B$NBg$-$J0c$$$O!"(B
foozy@708 138 quilt $B$,JQ99@)8f%7%9%F%`$r0U<1$7$J$$$N$KBP$7$F!"(B
foozy@708 139 MQ $B$,(B Mercurial $B$K(B\emph{$BE}9g(B}$B$5$l$F$$$k$3$H$G$9!#(B
foozy@708 140 push $B$5$l$k8D!9$N%Q%C%A$O!"(B
foozy@708 141 Mercurial $B$N%A%'%s%8%;%C%H$H$7$FI=8=$5$l$^$9!#(B
foozy@708 142 $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 143
foozy@708 144 $BJQ99@)8f%7%9%F%`$r0U<1$7$J$$$3$H$+$i!"(B
foozy@708 145 Mercurial $B$H(B MQ $B$rMxMQ$G$-$J$$>u67$K$D$$$FCN$k>e$G!"(B
foozy@708 146 $B0MA3$H$7$F(B quilt $B$OHs>o$KM-MQ$J%=%U%H%&%'%"$G$9!#(B
foozy@708 147
foozy@708 148 \section{MQ $B$NBg$-$JMxE@(B}
foozy@708 149
foozy@708 150 $B%Q%C%A$HJQ994IM}$NE}0l$rDL$7$F(B MQ $B$,Ds6!$9$k$b$N$N2ACM$r!"(B
foozy@708 151 $B8XD%$72a$.$k$3$H$O$"$j$^$;$s!#(B
foozy@708 152
foozy@708 153 $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 154 $BJQ994IM}%D!<%k$,G/!9$=$N5!G=$r8~>e$5$;$F$$$k$K$b4X$o$i$:!"(B
foozy@708 155 $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 156
foozy@708 157 $BEAE}E*$JJQ99@)8f%D!<%k$O!"(B
foozy@708 158 $B<B;\$7$?$3$H$K4X$9$kA4$F$r!"(B
foozy@708 159 $B1JB3E*$G<h$j>C$7$N=PMh$J$$$b$N$H$7$F5-O?$7$^$9!#(B
foozy@708 160 $B$3$N?6$kIq$$$KBg$-$J2ACM$,$"$k0lJ}$G!"(B
foozy@708 161 $B4vJ,7x6l$7$/$b$"$j$^$9!#(B
foozy@708 162 $B2a7c$J<B83$r9T$*$&$H$9$k>l9g!"(B
foozy@708 163 $B<+J,$,9T$*$&$H$9$k$3$H$K?5=E$K$J$k$+!"(B
foozy@708 164 $BI,MW$H$5$l$J$$!A$J$*0-$$$3$H$K$O!"8m2r$dIT0BDj$N85$H$J$k!A(B
foozy@708 165 $B<:GT$H4V0c$$$N5-O?$r!"(B
foozy@708 166 $B1JB3E*$JMzNr5-O?Cf$K;D$94m81$rKA$9I,MW$,$"$j$^$9!#(B
foozy@708 167
foozy@708 168 $BBP>HE*$K!"(B
foozy@708 169 MQ $B$K$*$1$kJ,;6MzNr4IM}$H%Q%C%A$N7k9g$K$h$j!"(B
foozy@708 170 $B$"$J$?$N:n6H$rMF0W$K3VN%$9$k$3$H$,$G$-$^$9!#(B
foozy@708 171 $B$"$J$?$N%Q%C%A$ODL>o$NJQ99MzNr$N>e$GB8B3$7B3$1!"(B
foozy@708 172 $BK>$`;~$K$=$l$i$N<B;\!?<h$j>C$7$r9T$&$3$H$,=PMh$^$9!#(B
foozy@708 173 $B$=$N%Q%C%A$,5$$KF~$i$J$$>l9g!"$=$l$r<h$j$d$a$k$3$H$,$G$-$^$9!#(B
foozy@708 174 $B$=$N%Q%C%A$,40A4$K$OK>$`$b$N$G$J$$>l9g!"(B
foozy@708 175 $BK>$`;Q$K@vN}$5$;$k$^$G!"I,MW$J$@$12?EY$G$b=$@5$9$k$3$H$,=PMh$^$9!#(B
foozy@708 176
foozy@708 177 $BNc$($P!"(B
foozy@708 178 $B%Q%C%A$HJQ994IM}$NE}9g$K$h$j!"(B
foozy@708 179 $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 180 \emph{$BHs>o$K(B}$B4JC1$K$J$j$^$9!#(B
foozy@708 181 $BA4$F$NE,MQ:Q$_%Q%C%A$,4XO"$7$?%A%'%s%8%;%C%H$r;}$C$F$$$k$N$G!"(B
foozy@708 182 $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 183 \hgcmdargs{log}{\emph{filename}} $B$K$h$C$F8+$k$3$H$,=PMh$^$9!#(B
foozy@708 184 \hgext{bisect} $B3HD%$rMQ$$$k$3$H$G!"(B
foozy@708 185 $B%P%0$,;}$A9~$^$l$?$j=$@5$5$l$?;~E@$r8+$k$?$a$K!"(B
foozy@708 186 $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 187 \hgcmd{annotate} $B%3%^%s%I$rMQ$$$k$3$H$G!"(B
foozy@708 188 $B%=!<%9%U%!%$%k$NFCDj$N9T$rJQ99$7$?$N$,!"(B
foozy@708 189 $B$I$N%A%'%s%8%;%C%H$d%Q%C%A$G$"$k$+$r8+$k$3$H$,=PMh$^$9!#(B
foozy@708 190
foozy@708 191 \section{$B%Q%C%A$NM}2r(B}
foozy@708 192 \label{sec:mq:patch}
foozy@708 193
foozy@708 194 MQ $B$O!"$=$l$,%Q%C%A;X8~$NFC@-$r;}$D$3$H$rI=$K=P$7$F$$$k$?$a!"(B
foozy@708 195 $B%Q%C%A$,$I$&$$$C$?$b$N$G$"$k$+$d!"(B
foozy@708 196 $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 197
foozy@708 198 $BEAE}E*$J(B Unix $B$N(B \command{diff} $B%3%^%s%I$O!"(B
foozy@708 199 $B#2$D$N%U%!%$%k$rHf3S$7N><T$N0c$$$rI=<($7$^$9!#(B
foozy@708 200 \command{patch} $B%3%^%s%I$O!"(B
foozy@708 201 $B$3$N0c$$$r%U%!%$%k$KBP$9$k(B\emph{$BJQ99(B}$B$H$_$J$7$^$9!#(B
foozy@708 202 $B$3$l$i$N%3%^%s%I$N4JC1$JF0:nNc$H$7$F!"(B
foozy@708 203 $B?^(B~\ref{ex:mq:diff}$B$r8+$F$/$@$5$$!#(B
foozy@708 204
foozy@708 205 \begin{figure}[ht]
foozy@708 206 \interaction{mq.dodiff.diff}
foozy@708 207 \label{ex:mq:diff}
foozy@708 208 \caption{\command{diff} $B$*$h$S(B \command{patch} $B%3%^%s%I$NMxMQNc(B}
foozy@708 209 \end{figure}
foozy@708 210
foozy@708 211 \command{diff} $B$,@8@.$9$k!J$=$7$F!"(B\command{patch} $B$,F~NO$9$k!K(B
foozy@708 212 $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 213 $B%Q%C%A$H:9J,$N4V$K0c$$$O$"$j$^$;$s(B
foozy@708 214 $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 215
foozy@708 216 $B%Q%C%A%U%!%$%k$O!"G$0U$N%F%-%9%H$+$i;O$a$k$3$H$,$G$-$^$9!#(B
foozy@708 217 \command{patch} $B%3%^%s%I$O$3$N%F%-%9%H$rL5;k$7$^$9$,!"(B
foozy@708 218 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 219 $B%Q%C%AFbMF$r3+;O$r8+$D$1$k$?$a$K!"(B
foozy@708 220 \command{patch} $B$O(B ``\texttt{diff~-}'' $B$G;O$^$k:G=i$N9T$rC5$7$^$9!#(B
foozy@708 221
foozy@708 222 MQ $B$O(B \emph{unified} $B:9J,$H6&$K5!G=$7$^$9(B
foozy@708 223 $B!J(B\command{patch} $B$O$=$l0J30$N2?<oN`$+$N:9J,7A<0$G$b5!G=$7$^$9$,!"(B
foozy@708 224 MQ $B$O(B \emph{unified} $B:9J,$G$J$$$H5!G=$7$^$;$s!K!#(B
foozy@708 225 unified $B:9J,$O#2<oN`$N%X%C%@$r;}$C$F$$$^$9!#(B
foozy@708 226 \emph{$B%U%!%$%k%X%C%@(B header}$B$K$O!"(B
foozy@708 227 $BJQ99BP>]$H$J$k%U%!%$%k$N%U%!%$%kL>$,5-=R$5$l!"(B
foozy@708 228 \command{patch} $B%3%^%s%I$,?75,$N%U%!%$%k%X%C%@$r8+$D$1$?:]$K$O!"(B
foozy@708 229 $BJQ99$r9T$&$?$a$KEv3:$9$kL>A0$N%U%!%$%k$rC5$7$^$9!#(B
foozy@708 230
foozy@708 231 $B%U%!%$%k%X%C%@$KB3$$$F!"(B\emph{hunk} $BNs$,5-=R$5$l$^$9!#(B
foozy@708 232 $B$=$l$>$l$N(B hunk $B$O%X%C%@$G3+;O$5$l!"(B
foozy@708 233 $B$=$N(B hunk $B$K$h$jJQ99$5$l$kBP>]$N!"(B
foozy@708 234 $B%U%!%$%k$K$*$1$k9THV9f$NHO0O$r<1JL$7$^$9!#(B
foozy@708 235 $B%X%C%@$KB3$/(B hunk $B$O!"(B
foozy@708 236 $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 237 $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 238 $B8eB3$N(B hunk $B$H$N4V$K>/NL$N%3%s%F%-%9%H$7$+$J$$>l9g!"(B
foozy@708 239 \command{diff} $B$O?7$?$J(B hunk $B%X%C%@$rI=<($7$^$;$s!#(B
foozy@708 240 $BJQ99FbMF$N4V$K?t9T$N%3%s%F%-%9%H9T$rCV$$$F!"(B
foozy@708 241 hunk $B$r$=$N$^$^B3$1$^$9!#(B
foozy@708 242
foozy@708 243 $B%3%s%F%-%9%H$N8D!9$N9T$O6uGrJ8;z$G;O$^$j$^$9!#(B
foozy@708 244 hunk $BFbIt$G$O!"(B
foozy@708 245 ``\texttt{-}'' $B$G;O$^$k9T$O(B``$B:o=|$5$l$k9T(B''$B$r!"(B
foozy@708 246 ``\texttt{+}'' $B$G;O$^$k9T$O(B``$BA^F~$5$l$k9T(B''$B$r0UL#$7$^$9!#(B
foozy@708 247 $BNc$($P!"JQ99$5$l$k9T$O!"#19T$N:o=|$H#19T$NA^F~$GI=8=$5$l$^$9!#(B
foozy@708 248
foozy@708 249 $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 250 $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 251
foozy@708 252 \section{Mercurial Queues $B$NMxMQ(B}
foozy@708 253 \label{sec:mq:start}
foozy@708 254
foozy@708 255 MQ $B$O(B Mercurial $B$N3HD%$H$7$F<BAu$5$l$F$$$k$N$G!"(B
foozy@708 256 $BMxMQ$NA0$KL@<(E*$KM-8z2=$9$kI,MW$,$"$j$^$9(B
foozy@708 257 $B!J%@%&%s%m!<%I$NI,MW$O$"$j$^$;$s!#(B
foozy@708 258 MQ $B$ODL>o$N(B Mercurial $B$NG[I[J*$K4^$^$l$F$$$^$9!K!#(B
foozy@708 259 MQ $B$rM-8z$K$9$k$K$O!"(B
foozy@708 260 \tildefile{.hgrc} $B%U%!%$%k$rJT=8$7!"(B
foozy@708 261 ~\ref{ex:mq:config} $B$K<($99T$rDI2C$7$F$/$@$5$$!#(B
foozy@708 262
foozy@708 263 \begin{figure}[ht]
foozy@708 264 \begin{codesample4}
foozy@708 265 [extensions]
foozy@708 266 hgext.mq =
foozy@708 267 \end{codesample4}
foozy@708 268 \label{ex:mq:config}
foozy@708 269 \caption{MQ $B3HD%M-8z2=$N$?$a$K(B \tildefile{.hgrc} $B$KDI2C$9$kFbMF(B}
foozy@708 270 \end{figure}
foozy@708 271
foozy@708 272 $B3HD%$,M-8z2=$5$l$k$H!"(B
foozy@708 273 $B$$$/$D$+$N?7$7$$%3%^%s%I$,M-8z2=$5$l$^$9!#(B
foozy@708 274 \hgcmd{help} $B$r;H$C$F(B \hgxcmd{mq}{qinit} $B%3%^%s%I$NMxMQ2DH]$r8+$k$3$H$G!"(B
foozy@708 275 $B3HD%$,5!G=$9$k$3$H$r3NG'$G$-$^$9!#(B
foozy@708 276 ~\ref{ex:mq:enabled} $B$NNc$r;2>H$7$F$/$@$5$$!#(B
foozy@708 277
foozy@708 278 \begin{figure}[ht]
foozy@708 279 \interaction{mq.qinit-help.help}
foozy@708 280 \caption{MQ $BMxMQ2DH]$N3NG'(B}
foozy@708 281 \label{ex:mq:enabled}
foozy@708 282 \end{figure}
foozy@708 283
foozy@708 284 MQ $B$O(B\emph{$BA4$F$N(B} Mercurial $B%j%]%8%H%j$GMxMQ$G$-!"(B
foozy@708 285 $B%3%^%s%I$O$=$N%j%]%8%H%j$K$7$+:nMQ$7$^$;$s!#(B
foozy@708 286 $BMxMQ3+;O$N:]$K$O!"(B
foozy@708 287 \hgxcmd{mq}{qinit} $B%3%^%s%I$K$h$j%j%]%8%H%j$N=`Hw$r9T$$$^$9(B
foozy@708 288 $B!J(B~\ref{ex:mq:qinit} $B;2>H!K!#(B
foozy@708 289 $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 290 MQ $B$O$3$N%G%#%l%/%H%j$K%a%?%G!<%?$r3JG<$7$^$9!#(B
foozy@708 291 $BB?$/$N(B Mercurial $B%3%^%s%I$HF1MM!"(B
foozy@708 292 \hgxcmd{mq}{qinit} $B%3%^%s%I$O<B9T$,@5>o$K=*N;$7$?>l9g$K$O!"(B
foozy@708 293 $BFC$K2?$bI=<($7$^$;$s!#(B
foozy@708 294
foozy@708 295 \begin{figure}[ht]
foozy@708 296 \interaction{mq.tutorial.qinit}
foozy@708 297 \caption{MQ $BMxMQ$K8~$1$?%j%]%8%H%j$N=`Hw(B}
foozy@708 298 \label{ex:mq:qinit}
foozy@708 299 \end{figure}
foozy@708 300
foozy@708 301 \begin{figure}[ht]
foozy@708 302 \interaction{mq.tutorial.qnew}
foozy@708 303 \caption{$B?7$7$$%Q%C%A$N:n@.(B}
foozy@708 304 \label{ex:mq:qnew}
foozy@708 305 \end{figure}
foozy@708 306
foozy@708 307 \subsection{$B?7$7$$%Q%C%A$N:n@.(B}
foozy@708 308
foozy@708 309 $B?7$7$$%Q%C%A$G:n6H$r3+;O$9$k$K$O!"(B
foozy@708 310 \hgxcmd{mq}{qnew} $B%3%^%s%I$r;H$$$^$9!#(B
foozy@708 311 $B$3$N%3%^%s%I$O:n@.$9$k%Q%C%A$NL>A0$r0z?t$K<h$j$^$9!#(B
foozy@708 312 $BNc(B~\ref{ex:mq:qnew}$B$K<($9$h$&$K!"(B
foozy@708 313 MQ $B$O$3$l$r(B \sdirname{.hg/patches}
foozy@708 314 $B%G%#%l%/%H%jCf$N<B%U%!%$%k$NL>A0$H$_$J$7$^$9!#(B
foozy@708 315
foozy@708 316 \sdirname{.hg/patches} $B%G%#%l%/%H%jG[2<$K$O$=$l0J30$K$b!"(B
foozy@708 317 \sfilename{series} $B$H(B \sfilename{status}
foozy@708 318 $B$H$$$&#2$D$N?7$7$$%U%!%$%k$,:n@.$5$l$^$9!#(B
foozy@708 319 \sfilename{series} $B$O!"(B
foozy@708 320 $B$=$N%j%]%8%H%j$K$*$$$F(B MQ $B$,4IM}$9$kA4$F$N%Q%C%A$N0lMw$r!"(B
foozy@708 321 $B#19T#1%Q%C%A$GJ];}$7$F$$$^$9!#(B
foozy@708 322 \sfilename{status} $B$O(B
foozy@708 323 $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 324 $BFbItD"JmE*$JMQES$K;HMQ$5$l$^$9!#(B
foozy@708 325
foozy@708 326 \begin{note}
foozy@708 327 $BNc$($P!"%Q%C%A$NE,MQ=g=x$rJQ99$7$?$$$h$&$J>l9g!"(B
foozy@708 328 \sfilename{series} $B$r<jF0$GJQ99$7$?$$>l9g$,$"$k$+$b$7$l$^$;$s!#(B
foozy@708 329 $B$7$+$7!"(BMQ $B$NG'<1>u67$rMF0W$KB;$J$&$3$H$+$i!"(B
foozy@708 330 $B<jF0$G$N(B \sfilename{status} $BJT=8$OKX$IA4$F$N>l9g$K$*$$$FITE,@Z$G$9!#(B
foozy@708 331 \end{note}
foozy@708 332
foozy@708 333 $B?7$7$$%Q%C%A$r:n@.$7$?$J$i$P!"(B
foozy@708 334 $BIaCJ$HF1$8$h$&$K:n6HNN0h%G%#%l%/%H%j$N%U%!%$%k$rJT=8$G$-$^$9!#(B
foozy@708 335 \hgcmd{diff} $B$d(B \hgcmd{annotate} $B$H$$$C$?!"(B
foozy@708 336 Mercurial $B$NA4$F$NDL>o%3%^%s%I$O$=$l0JA0$HA4$/F1MM$K5!G=$7$^$9!#(B
foozy@708 337
foozy@708 338 \subsection{$B%Q%C%A$N(B refresh}
foozy@708 339
foozy@708 340 $B:n6HFbMF$rJ]B8$9$kCJ3,$K$J$C$?$J$i!"(B
foozy@708 341 $B:n6HCf$N%Q%C%A$r99?7$9$k$?$a$K(B \hgxcmd{mq}{qrefresh} $B$r;HMQ$7$^$9(B
foozy@708 342 $B!J?^(B~\ref{ex:mq:qnew}$B;2>H!K!#(B
foozy@708 343 $B$3$N%3%^%s%I$O!"(B
foozy@708 344 $B:n6HNN0h%G%#%l%/%H%j$G$NJQ99FbMF$r%Q%C%A$X$H3JG<$7!"(B
foozy@708 345 $BBP1~$9$k%A%'%s%8%;%C%H$r!"$=$l$i$NJQ99FbMF$rJ];}$9$k$h$&$K99?7$7$^$9!#(B
foozy@708 346
foozy@708 347 \begin{figure}[ht]
foozy@708 348 \interaction{mq.tutorial.qrefresh}
foozy@708 349 \caption{$B%Q%C%A$N(B refresh}
foozy@708 350 \label{ex:mq:qrefresh}
foozy@708 351 \end{figure}
foozy@708 352
foozy@708 353 \hgxcmd{mq}{qrefresh} $B%3%^%s%I$O$$$D$G$b2?EY$G$b<B9T$G$-$k$N$G!"(B
foozy@708 354 $B:n6H$N(B``$B%A%'%C%/%]%$%s%H(B''$B$H$7$FMxMQ$9$k$N$bNI$$$G$7$g$&!#(B
foozy@708 355 $BET9g$NNI$$;~$K%Q%C%A$N(B refresh $B$r<B;\$9$k$3$H$G!"(B
foozy@708 356 $B<B83E*$J:n6H$r9T$C$F$_$F!"$=$l$,$&$^$/5!G=$7$J$$>l9g$K$O!"(B
foozy@708 357 $BD>6a$N(B refresh $B;~E@$^$G$NJQ99$r!"(B
foozy@708 358 \hgcmd{revert} $B%3%^%s%I$K$h$j<h$j>C$9$3$H$,$G$-$^$9!#(B
foozy@708 359
foozy@708 360 \begin{figure}[ht]
foozy@708 361 \interaction{mq.tutorial.qrefresh2}
foozy@708 362 \caption{$BJ#?t2s$N%Q%C%A(B refresh $B$K$h$kJQ99$NC_@Q(B}
foozy@708 363 \label{ex:mq:qrefresh2}
foozy@708 364 \end{figure}
foozy@708 365
foozy@708 366 \subsection{$B%Q%C%A$N@Q$_=E$M$HDI@W(B}
foozy@708 367
foozy@708 368 $B%Q%C%A$KBP$9$k:n6H$r=*$($k$+!"(B
foozy@708 369 $BB>$N%Q%C%A$KBP$9$k:n6H$,I,MW$K$J$C$?$J$i!"(B
foozy@708 370 $B:FEY(B \hgxcmd{mq}{qnew} $B%3%^%s%I$r<B9T$9$k$3$H$G!"(B
foozy@708 371 $B?7$7$$%Q%C%A$r:n@.$7$^$9!#(B
foozy@708 372 Mercurial $B$O!"?75,$K:n@.$7$?$3$N%Q%C%A$r!"(B
foozy@708 373 $B4{B8$N%Q%C%A$N:G>e0L$KE,MQ$7$^$9!#(B
foozy@708 374 $B?^(B~\ref{ex:mq:qnew2}$B$r;2>H$7$F$/$@$5$$!#(B
foozy@708 375 $B@h$K:n6H$7$F$$$?%Q%C%A$K4^$^$l$kJQ99$O!"(B
foozy@708 376 $B$3$N?7$7$$%Q%C%A$NJ8L.$N0lIt$H$7$F4^$^$l$^$9(B
foozy@708 377 $B!J(B\hgcmd{annotate} $B=PNO$r8+$l$P!"$3$N$3$H$OL@$i$+$G$9!K!#(B
foozy@708 378
foozy@708 379 \begin{figure}[ht]
foozy@708 380 \interaction{mq.tutorial.qnew2}
foozy@708 381 \caption{$B#1$DL\$N>e$K@Q$_=E$M$i$l$k#2$DL\$N%Q%C%A(B}
foozy@708 382 \label{ex:mq:qnew2}
foozy@708 383 \end{figure}
foozy@708 384
foozy@708 385 $B$3$l$^$G$O!"(B
foozy@708 386 \hgxcmd{mq}{qnew} $B$H(B \hgxcmd{mq}{qrefresh} $B$r=|$$$F!"(B
foozy@708 387 Mercurial $B$NDL>o%3%^%s%I$N$_$r;HMQ$9$k$h$&$KCm0U$7$F$-$^$7$?!#(B
foozy@708 388 $B$7$+$7!"(B
foozy@708 389 $B?^(B~\ref{ex:mq:qseries} $B$K<($9$h$&$K!"(B
foozy@708 390 $B%Q%C%A$K4X$9$k:n6H$r9T$&:]$K$h$jJXMx$JB?$/$N%3%^%s%I$r!"(B
foozy@708 391 MQ $B$ODs6!$7$F$$$^$9!#(B
foozy@708 392
foozy@708 393 \begin{itemize}
foozy@708 394 \item \hgxcmd{mq}{qseries} $B%3%^%s%I$O(B
foozy@708 395 MQ $B$,Ev3:%j%]%8%H%jCf$G4IM}$7$F$$$kA4$F$N%Q%C%A$N0lMw$r!"(B
foozy@708 396 $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 397 $B$N=g=x$G0lMwI=<($7$^$9!#(B
foozy@708 398
foozy@708 399 \item \hgxcmd{mq}{qapplied} $B%3%^%s%I$O!"(B
foozy@708 400 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 401 $B8E$$$b$N$+$i?7$7$$$b$N!J:G$b:G6aE,MQ$5$l$?$b$N!K(B
foozy@708 402 $B$N=g=x$G0lMwI=<($7$^$9!#(B
foozy@708 403 \end{itemize}
foozy@708 404
foozy@708 405 \begin{figure}[ht]
foozy@708 406 \interaction{mq.tutorial.qseries}
foozy@708 407 \label{ex:mq:qseries}
foozy@708 408 \caption{\hgxcmd{mq}{qseries} $B$*$h$S(B
foozy@708 409 \hgxcmd{mq}{qapplied} $B$K$h$k%Q%C%A$N@Q$_=E$M$N=,F@(B}
foozy@708 410 \end{figure}
foozy@708 411
foozy@708 412 \subsection{$B%Q%C%A$N@Q$_=E$M$NA`:n(B}
foozy@708 413
foozy@708 414 ``$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 415 $B@h$N5-=R$G$O0E$K<($7$F$$$^$9$,!"(B
foozy@708 416 $B<B:]$KN><T$N4V$K$O0c$$$,$"$j$^$9!#(B
foozy@708 417 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 418
foozy@708 419 \emph{$BE,MQ$5$l$?(B}$B%Q%C%A$O!"(B
foozy@708 420 $B%j%]%8%H%jCf$KBP1~$9$k%A%'%s%8%;%C%H$r;}$A!"(B
foozy@708 421 $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 422 \hgxcmd{mq}{qpop} $B%3%^%s%I$r;HMQ$7$F!"(B
foozy@708 423 $B%Q%C%A$NE,MQ$r<h$j>C$9$3$H$b$G$-$^$9!#(B
foozy@708 424
foozy@708 425 MQ $B$O<h$j=|$+$l$?%Q%C%A$r(B\emph{$B4IM}(B}$B$7B3$1$^$9$,!"(B
foozy@708 426 $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 427 $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 428 $B?^(B~\ref{fig:mq:stack}$B$K!"(B
foozy@708 429 $BE,MQ$5$l$?%Q%C%A$HDI@W$5$l$F$$$k$=$l$N0c$$$r<($7$^$9!#(B
foozy@708 430
foozy@708 431 \begin{figure}[ht]
foozy@708 432 \centering
foozy@708 433 \grafix{mq-stack}
foozy@708 434 \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 435 \label{fig:mq:stack}
foozy@708 436 \end{figure}
foozy@708 437
foozy@708 438 \hgxcmd{mq}{qpush} $B%3%^%s%I$r;HMQ$9$k$3$H$G!"(B
foozy@708 439 $BL$E,MQ%Q%C%A$N:FE,MQ!"$J$$$7<h$j=|$-$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708 440 $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 441 $B%Q%C%A$K$h$kJQ99$O:F$S:n6HNN0h%G%#%l%/%H%j$K8=$l$^$9!#(B
foozy@708 442 $B?^(B~\ref{ex:mq:qpop}$B$K!"(B
foozy@708 443 \hgxcmd{mq}{qpop} $B$*$h$S(B \hgxcmd{mq}{qpush} $B$N<B;\Nc$r<($7$^$9!#(B
foozy@708 444 $B?^$N$h$&$K#1$D$J$$$7#2$D$N%Q%C%A$r0lEY<h$j=|$$$F$b!"(B
foozy@708 445 \hgxcmd{mq}{qseries} $B$N=PNO$OJQ2=$7$^$;$s$,!"(B
foozy@708 446 $B$=$N0lJ}$G(B \hgxcmd{mq}{qapplied} $B$N=PNO$OJQ2=$7$^$9!#(B
foozy@708 447
foozy@708 448 \begin{figure}[ht]
foozy@708 449 \interaction{mq.tutorial.qpop}
foozy@708 450 \caption{$BE,MQ%Q%C%A$N@Q$_=E$M$NJQ99(B}
foozy@708 451 \label{ex:mq:qpop}
foozy@708 452 \end{figure}
foozy@708 453
foozy@708 454 \subsection{$BJ#?t%Q%C%A$NE,MQ(B(push)$B$*$h$S<h$j>C$7(B(pop)}
foozy@708 455
foozy@708 456 \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N$=$l$>$l$,!"(B
foozy@708 457 $B%G%U%)%k%H$G$O0lEY$K0l$D$N%Q%C%A$KBP$7$F=hM}$r9T$&0lJ}$G!"(B
foozy@708 458 $B0lEY$KJ#?t$N%Q%C%A$NE,MQ$d<h$j>C$7$r9T$&$3$H$b$G$-$^$9!#(B
foozy@708 459 \hgxcmd{mq}{qpush} $B$K(B
foozy@708 460 \hgxopt{mq}{qpush}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
foozy@708 461 $BA4$F$NL$E,MQ%Q%C%A$NE,MQ$,!"(B
foozy@708 462 \hgxcmd{mq}{qpop} $B$K(B
foozy@708 463 \hgxopt{mq}{qpop}{-a} $B%*%W%7%g%s$r;XDj$9$k$3$H$K$h$j!"(B
foozy@708 464 $BA4$F$NE,MQ:Q$_%Q%C%A$N<h$j>C$7$r9T$&$3$H$,$G$-$^$9!#(B
foozy@708 465 $B!J$=$l0J30$NJ#?t%Q%C%A$NE,MQ!?<h$j>C$7$NJ}K!$K4X$7$F$O!"(B
foozy@708 466 ~\ref{sec:mq:perf} $B@a$r;2>H$7$F$/$@$5$$!#!K(B
foozy@708 467
foozy@708 468 \begin{figure}[ht]
foozy@708 469 \interaction{mq.tutorial.qpush-a}
foozy@708 470 \caption{$BA4$F$NL$E,MQ%Q%C%A$NE,MQ(B}
foozy@708 471 \label{ex:mq:qpush-a}
foozy@708 472 \end{figure}
foozy@708 473
foozy@708 474 \subsection{$B0BA43NG'$H$=$NL58z2=(B}
foozy@708 475
foozy@708 476 $B$$$/$D$+$N(B MQ $B%3%^%s%I$O!"(B
foozy@708 477 $B=hM}$NA0$K:n6HNN0h%G%#%l%/%H%j$N3NG'$r9T$$!"(B
foozy@708 478 $B2?$i$+$N2~JQ$,8!=P$5$l$?>l9g$K$O=hM}$rCfCG$7$^$9!#(B
foozy@708 479 $B$3$N3NG'$O!"(B
foozy@708 480 $B%Q%C%A$K<h$j9~$^$l$F$$$J$$JQ99FbMF$r<:$o$J$$$?$a$K9T$o$l$^$9!#(B
foozy@708 481 $B?^(B~\ref{ex:mq:add} $B$KNc$r<($7$^$9!#(B
foozy@708 482 \hgxcmd{mq}{qnew} $B%3%^%s%I$OL$<h$j9~$_$NJQ99(B
foozy@708 483 $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 484 $B?7$7$$%Q%C%A$r@8@.$7$^$;$s!#(B
foozy@708 485
foozy@708 486 \begin{figure}[ht]
foozy@708 487 \interaction{mq.tutorial.add}
foozy@708 488 \caption{$B6/@)E*$J%Q%C%A$N@8@.(B}
foozy@708 489 \label{ex:mq:add}
foozy@708 490 \end{figure}
foozy@708 491
foozy@708 492 $B:n6HNN0h%G%#%l%/%H%j$r3NG'$9$k%3%^%s%I$O!"(B
foozy@708 493 $B$9$Y$F(B``$BN;2r:Q$_(B''$B%*%W%7%g%s$r<h$k$3$H$,$G$-!"(B
foozy@708 494 $B$=$N%*%W%7%g%s$O>o$K(B \option{-f} $B$HL>$E$1$i$l$F$$$^$9!#(B
foozy@708 495 \option{-f} $B%*%W%7%g%s$N87L)$J0UL#$O%3%^%s%I$4$H$K0[$J$j$^$9!#(B
foozy@708 496 $BNc$($P!"(B
foozy@708 497 \hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}}
foozy@708 498 $B$O?7$?$K@8@.$5$l$k%Q%C%A$KL$<h$j9~$_$NJQ99$rA4$F<h$j9~$_$^$9$,!"(B
foozy@708 499 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}}
foozy@708 500 $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 501 \footnote{$BLuCm(B:
foozy@708 502 $B!V%Q%C%A$N1F6A$r85$KLa$9!W$N$G$O$J$/!"(B
foozy@708 503 $B!V%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k!W$rA4$F85$KLa$9!"$N0U(B}$B!#(B
foozy@708 504 $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 505
foozy@708 506 \subsection{$BJ#?t%Q%C%A$N0l3g=hM}(B}
foozy@708 507
foozy@708 508 \hgxcmd{mq}{qrefresh} $B%3%^%s%I$O!"(B
foozy@708 509 $B>o$K(B\emph{$B:G>e0L$N(B}$BE,MQ:Q$_%Q%C%A$r99?7$7$^$9!#(B
foozy@708 510 $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 511 $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 512 $B$=$N%Q%C%A$KBP$7$F:n6H$9$k$3$H$,$G$-$k$3$H$r0UL#$7$^$9!#(B
foozy@708 513
foozy@708 514 $B$3$N5!G=$K$h$C$F2DG=$K$J$k$3$H$rNc$K$h$C$F<($7$^$9!#(B
foozy@708 515 $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 516 $B#1$DL\$N%Q%C%A$O%=%U%H%&%'%"$NCf3K5!G=$NJQ99$r!"(B
foozy@708 517 $B$=$7$F#2$DL\$N%Q%C%A$O(B --- $B#1$DL\$N%Q%C%A$N>e$G(B ---
foozy@708 518 $BCf3K5!G=$NJQ99$r;HMQ$9$k$?$a$N%f!<%6!<%$%s%?%U%'!<%9(B(UI)$B$NJQ99$r9T$$$^$9!#(B
foozy@708 519 UI $B$X$N%Q%C%A$N:n6HCf$K!"(B
foozy@708 520 $BCf3K5!G=$X$N%Q%C%A$K%P%0$r8+$D$1$?$H$7$F$b!"(B
foozy@708 521 $B$=$l$r=$@5$9$k$N$O4JC1$J$3$H$G$9!#(B
foozy@708 522 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 523 \hgxcmd{mq}{qpop} $B$K$h$jA`:nBP>]%Q%C%A$rCf3K5!G=$X$N$=$l$KJQ99$7$^$9(B
foozy@708 524 $B!J%Q%C%A%9%?%C%/$r2<$X$H0\F0$7$^$9!K!#(B
foozy@708 525 $BCf3K5!G=$X$N%Q%C%A$N%P%0$r=$@5$7!"(B
foozy@708 526 \hgxcmd{mq}{qrefresh} $B$K$h$C$F%Q%C%A$X$NH?1G$r9T$C$?8e$K!"(B
foozy@708 527 \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 528 $B$d$j$+$1$N:n6H$r7QB3$9$k$3$H$,$G$-$^$9!#(B
foozy@708 529
foozy@708 530 \section{$B%Q%C%A$K4X$7$F99$K>\$7$/(B}
foozy@708 531 \label{sec:mq:adv-patch}
foozy@708 532
foozy@708 533 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 534 \command{patch} $B%3%^%s%I$NF0:n$H%Q%C%A$=$N$b$N$K4X$7$F!"(B
foozy@708 535 $B$h$j>\:Y$J>pJs$rCN$k$3$H$OM-MQ$G$9!#(B
foozy@708 536
foozy@708 537 \subsection{$B=|5n?t(B}
foozy@708 538
foozy@708 539 $B%Q%C%A$N%U%!%$%k%X%C%@$r8+$k$H!"(B
foozy@708 540 $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 541 $B$3$l$O0JA0$K%Q%C%A$,@8@.$5$l$F$$$?J}K!$NL>;D$G$9(B
foozy@708 542 $B!J:#$G$b$3$NJ}K!$rMQ$$$F$$$^$9$,!"(B
foozy@708 543 $B6aG/$N9=@.4IM}%D!<%k$G$O5)$G$9!K!#(B
foozy@708 544
foozy@708 545 Alice $B$,(B tarball $B$rE83+$7$F%U%!%$%k$rJT=8$7$?8e$G!"(B
foozy@708 546 $B%Q%C%A$r:n@.$7$h$&$H9M$($?$H$7$^$9!#(B
foozy@708 547 $B:n6HNN0h%G%#%l%/%H%j$r2~L>$7!"(B
foozy@708 548 $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 549 \command{diff} $B%3%^%s%I$K(B
foozy@708 550 \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 551 $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 552 $B0lJ}$K$O2~JQA0$N%G%#%l%/%H%jL>$,A4$F$N%U%!%$%k$N%Q%9KAF,$KIU2C$5$l!"(B
foozy@708 553 $BB>J}$K$O2~JQ8e$N%G%#%l%/%H%jL>$,F1MM$KIU2C$5$l$^$9!#(B
foozy@708 554
foozy@708 555 Alices $B$+$i%Q%C%A$r<u$1<h$C$??MJ*$N4D6-$K!"(B
foozy@708 556 $B2~JQA0$H2~JQ8e%G%#%l%/%H%j$NN>J}$H87L)$K0lCW$9$kL>A0$N%G%#%l%/%H%j$,$"$k!"(B
foozy@708 557 $B$H$$$&$N$O$"$j$=$&$b$J$$;v$G$9$+$i!"(B
foozy@708 558 \command{patch} $B%3%^%s%I$O!"(B
foozy@708 559 $B%Q%C%AE,MQ;~$K%Q%9L>MWAG$N2?HVL\$^$G$r<h$j=|$/$+$r;X$9(B
foozy@708 560 \cmdopt{patch}{-p} $B%*%W%7%g%s$r;}$C$F$$$^$9!#(B
foozy@708 561 $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 562
foozy@708 563 ``\texttt{-p1}'' $B%*%W%7%g%s$O!"(B
foozy@708 564 ``$B=|5n?t$r#1$H$_$J$9(B''$B$3$H$r0UL#$7$^$9!#(B
foozy@708 565 \command{patch} $B%3%^%s%I$,!"(B
foozy@708 566 $B%U%!%$%k%X%C%@$K$*$$$F%U%!%$%kL>(B \filename{foo/bar/baz} $B$r8!CN$7$?>l9g!"(B
foozy@708 567 \filename{foo} $BItJ,$r=|5n$7$?(B
foozy@708 568 \filename{bar/baz} $B$H$$$&%U%!%$%k$KBP$7$F%Q%C%A$r$"$F$^$9(B
foozy@708 569 $B!J87L)$J$3$H$r8@$($P!"(B
foozy@708 570 $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 571 $B=|5n?t#1$O!"(B\filename{foo/bar} $B$r(B \filename{bar} $B$K$7$^$9$,!"(B
foozy@708 572 \filename{/foo/bar}$B!J@hF,$N%9%i%C%7%e$KCm0U!K$O(B
foozy@708 573 \filename{foo/bar} $B$K$J$j$^$9!K!#(B
foozy@708 574
foozy@708 575 $B%Q%C%A$K$*$1$k(B``$BI8=`$N(B''$B=|5n?t$O#1$G$9$N$G!"(B
foozy@708 576 $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 577 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 578 \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 579
foozy@708 580 $B=|5n?t$,#1$G$O$J$$%Q%C%A$r%Q%C%A%-%e!<$KDI2C$7$h$&$H$7$?>l9g!"(B
foozy@708 581 $B8=;~E@$G(B \texttt{-p} $B%*%W%7%g%s$r;}$C$F$$$J$$(B
foozy@708 582 \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 583 $B$=$N>l9g!"(B
foozy@708 584 \hgxcmd{mq}{qnew} $B$G?75,%Q%C%A$r(B MQ $B>e$K:n@.$7!"(B
foozy@708 585 \cmdargs{patch}{-p\emph{N}} $B$K$h$j%Q%C%A$rE,MQ!"(B
foozy@708 586 \hgcmd{addremove} $B$G%Q%C%A$K$h$jDI2C!?:o=|$5$l$?%U%!%$%k$rFCDj$7!"(B
foozy@708 587 \hgxcmd{mq}{qrefresh} $B$r9T$&$N$,:GA1$NJ}K!$G$9!#(B
foozy@708 588 $B$3$N$h$&$JLLE]$J<j=g$O$$$:$lITMW$K$J$k$+$b$7$l$^$;$s!#(B
foozy@708 589 $B>\:Y$O(B ~\bug{311} $B$r;2>H$7$F$/$@$5$$!#(B
foozy@708 590
foozy@708 591 \subsection{$B%Q%C%AE,MQ<j=g(B}
foozy@708 592
foozy@708 593 \command{patch} $B$,(B hunk $B$rE,MQ$9$k:]$K$O!"(B
foozy@708 594 it tries a handful of
foozy@708 595 (successively $B$O$I$3$K3]$+$k!)(B)
foozy@708 596 successively less accurate strategies to try to make the hunk apply XXXXX
foozy@708 597 $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 598 $B?7$7$$HG$N%U%!%$%k$KE,MQ$9$k$3$H$,!"B?$/$N>l9g$G2DG=$H$J$j$^$9!#(B
foozy@708 599
foozy@708 600 \command{patch} $B%3%^%s%I$O!"(B
foozy@708 601 $B:G=i$O(B hunk $B$K$*$1$k9THV9f!"(B
foozy@708 602 $B%3%s%F%-%9%H$*$h$SJQ99BP>]%F%-%9%H$N87L)0lCW$r;n$_$^$9!#(B
foozy@708 603 $B87L)0lCW$,$G$-$J$$>l9g!"(B
foozy@708 604 $B9THV9f$K4X$9$k>pJs$rL5;k$7!"(B
foozy@708 605 $B%3%s%F%-%9%H$N$_$N87L)0lCW$r;n$_$^$9!#(B
foozy@708 606 $B$3$l$,@.8y$7$?>l9g!"(B
foozy@708 607 \command{patch} $B%3%^%s%I$O!"(B
foozy@708 608 hunk $B$,E,MQ$5$l$?$3$H$H!"(B
foozy@708 609 $B85$N9THV9f$+$i(B\emph{$B%*%U%;%C%HJ,(B}$B$:$l$F$$$k$3$H$rI=<($7$^$9!#(B
foozy@708 610
foozy@708 611 $B%3%s%F%-%9%H$N$_$K$h$k0lCW$,<:GT$7$?>l9g!"(B
foozy@708 612 \command{patch} $B$OKAF,$*$h$SKvHx9T$r<h$j=|$$$?%3%s%F%-%9%H$rMQ$$$F!"(B
foozy@708 613 \emph{$B=L>.(B}$B%3%s%F%-%9%H$N$_$K$h$k0lCW$r;n$_$^$9!#(B
foozy@708 614 $B=L>.%3%s%F%-%9%H$K$h$k(B hunk $BE,MQ$,@.8y$7$?>l9g!"(B
foozy@708 615 \emph{$B$"$$$^$$$JMW0x(B}$B$r85$K(B hunk $B$,E,MQ$5$l$?$3$H$rI=<($7$^$9(B
foozy@708 616 $B!J$3$N;~<($5$l$k?tCM$O!"(B
foozy@708 617 \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 618
foozy@708 619 $B$3$l$i$N$I$N5;K!$G$bE,MQ$G$-$J$$>l9g!"(B
foozy@708 620 \command{patch} $B%3%^%s%I$OAhE@$H$J$C$F$$$k(B hunk $B$,5Q2<$5$l$?;]$rI=<($7$^$9!#(B
foozy@708 621 \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 622 $B$rF1L>$G(B \sfilename{.rej} $B3HD%;R$r;}$D%U%!%$%k$KJ]B8$7$^$9!#(B
foozy@708 623 $B99$K$=$N>e$G!"(B
foozy@708 624 $B%Q%C%AE,MQA0$N%U%!%$%k$N%3%T!<$r(B \sfilename{.orig} $B3HD%;RIU$-$GJ]B8$7$^$9!#(B
foozy@708 625 $B3HD%;RL5$7$N%U%!%$%k$O!"(B
foozy@708 626 $BE,@Z$K$NE,MQ(B\emph{$B$5$l$?(B} hunk $B$K$h$kJQ99$r4^$s$G$$$^$9!#(B
foozy@708 627 $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 628 $B$=$N$&$A$N#1$D$,E,MQ$G$-$J$+$C$?>l9g!"(B
foozy@708 629 $BJQ99A0$NFbMF$r;}$D(B \filename{foo.orig}$B!"(B
foozy@708 630 $BE,MQ$G$-$J$+$C$?(B hunk $B$r#1$D;}$D(B \filename{foo.rej} $B$*$h$S(B
foozy@708 631 $BE,MQ$G$-$?#5$D$N(B hynk $B$K$h$kJQ99$r4^$`(B \filename{foo}
foozy@708 632 $B$N#3$D$N%U%!%$%k$,$G$-$^$9!#(B
foozy@708 633
foozy@708 634 \subsection{$B%Q%C%A$N<B8=>e$NJJ(B}
foozy@708 635
foozy@708 636 \command{patch} $B%3%^%s%I$N%U%!%$%k$X$N:nMQ$rCN$k>e$G!"(B
foozy@708 637 $BM-MQ$J;v$,$$$/$D$+$"$j$^$9!#(B
foozy@708 638
foozy@708 639 \begin{itemize}
foozy@708 640 \item $B$o$+$j$-$C$?;v$G$9$,!"(B\command{patch} $B$O%P%$%J%j%U%!%$%k$r07$($^$;$s!#(B
foozy@708 641
foozy@708 642 \item $B<B9T%S%C%H$b07$($^$;$s$N$G!"?7$7$$%U%!%$%k$r:n@.$9$k:]$K$O!"(B
foozy@708 643 $BFI$_<h$j2DG=$K$O$7$^$9$,!"<B9T2DG=$K$O$7$^$;$s!#(B
foozy@708 644
foozy@708 645 \item \command{patch} $B$O!":o=|BP>]%U%!%$%k$H6u%U%!%$%k$N:9J,$r$b$C$F!"(B
foozy@708 646 $B%U%!%$%k$N:o=|$rI=$7$^$9!#(B
foozy@708 647 $B$=$N$?$a!"(B``$B%U%!%$%k$r:o=|$9$k(B''$B$3$H$O!"(B
foozy@708 648 $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,:o=|$5$l$k(B''$B$h$&$K8+$($^$9!#(B
foozy@708 649
foozy@708 650 \item $B6u$N%U%!%$%k$HDI2CBP>]%U%!%$%k$N:9J,$r$b$C$F!"(B
foozy@708 651 $B%U%!%$%k$NDI2C$rI=$7$^$9!#(B
foozy@708 652 $B$=$N$?$a!"(B``$B%U%!%$%k$rDI2C$9$k(B''$B$3$H$O!"(B
foozy@708 653 $B%Q%C%A$K$*$$$F$O(B``$BA4$F$N9T$,DI2C$5$l$k(B''$B$h$&$K8+$($^$9!#(B
foozy@708 654
foozy@708 655 \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 656 $B%U%!%$%k$N2~L>$rI=$7$^$9!#(B
foozy@708 657 $B$3$l$O!"%U%!%$%k$N2~L>$r9T$&%Q%C%A$N%5%$%:(B
foozy@708 658 $B!J(Bfootprint$B!K$,Bg$-$/$J$k$3$H$r0UL#$7$^$9(B
foozy@708 659 $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 660 $B8=>u$G$O9T$o$l$J$$$3$H$K$bN10U$7$F$/$@$5$$!K(B $B!#(B
foozy@708 661
foozy@708 662 \item \command{patch} $B$O6u$N%U%!%$%k$rI=8=$G$-$^$;$s$N$G!"(B
foozy@708 663 ``$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 664
foozy@708 665 \end{itemize}
foozy@708 666
foozy@708 667 \subsection{$B$"$$$^$$$5$KCm0U(B}
foozy@708 668
foozy@708 669 $B%*%U%;%C%HIU$-$d!"$"$$$^$$$JMW0x$r85$K$7$F$$$k>l9g$G$"$C$F$b!"(B
foozy@708 670 $B%Q%C%A$NE,MQ$O40A4$K@.8y$9$k$3$H$,B?$$$N$G$9$,!"(B
foozy@708 671 $B0lJ}$G$3$N$h$&$J87L)@-$r7g$$$?E,MQ<jK!$O!"(B
foozy@708 672 $B$*$N$:$H%U%!%$%k$X$N%Q%C%AE,MQ$,IT40A4$G$"$k2DG=@-$r;D$7$F$7$^$$$^$9!#(B
foozy@708 673 $B:G$bE57?E*$J;vNc$O!"(B
foozy@708 674 $B%Q%C%A$r#2EYE,MQ$7$F$7$^$&$3$H$d!"(B
foozy@708 675 $BITE,@Z$J0LCV$KE,MQ$7$F$7$^$&$3$H$G$9!#(B
foozy@708 676 \command{patch} $B$d(B \hgxcmd{mq}{qpush}
foozy@708 677 $B$,%*%U%;%C%H$d$"$$$^$$MW0x$K4X$7$F8@5Z$7$?:]$K$O!"(B
foozy@708 678 $B%U%!%$%k$,E,@Z$KJQ99$5$l$F$$$k$3$H$r8e$+$i3NG'$7$F$/$@$5$$!#(B
foozy@708 679
foozy@708 680 $B%*%U%;%C%HIU$-$d!"$"$$$"$^$$$JMW0x$r85$KE,MQ$5$l$?%Q%C%A$r(B refresh $B$9$k$N$,!"(B
foozy@708 681 $BB?$/$N>l9g$K$*$$$F$*$9$9$a$J$N$O!"(B
foozy@708 682 $B%Q%C%A$N(B refresh $B$,!"(B
foozy@708 683 $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 684 $B$?$@$7!"%Q%C%A$r(B refresh $B$9$k$3$H$G!"(B
foozy@708 685 $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 686 ``$BB?$/$N>l9g(B''$B$*$9$9$a$G$9$,!"(B``$B>o$K(B''$B$G$O$"$j$^$;$s!#(B
foozy@708 687 $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 688 $B%Q%C%AE,MQ=hM}$N7k2L$r8!>Z$9$k5!2q$rF@$k$3$H$,=PMh$k$N$G!"(B
foozy@708 689 $B%Q%C%A$K$"$$$^$$MW0x$r;}$?$;$F$*$/$N$O5vMFHO0O$G$9!#(B
foozy@708 690
foozy@708 691 \subsection{$B5Q2<$5$l$?(B hunk $B$N<h$j07$$(B}
foozy@708 692
foozy@708 693 $B%Q%C%A$NE,MQ$K<:GT$9$k$H!"(B
foozy@708 694 \hgxcmd{mq}{qpush} $B$O%(%i!<%a%C%;!<%8$rI=<($7$F=*N;$7$^$9!#(B
foozy@708 695 \sfilename{.rej} $B%U%!%$%k$,;D$5$l$F$$$k>l9g!"(B
foozy@708 696 $B$=$l0J>e$N%Q%C%A$r(B push $B$7$?$jB>$N:n6H$r$9$kA0$K!"(B
foozy@708 697 $B5Q2<$5$l$?(B hunk $B$N=$@5$r9T$&$3$H$,0lHLE*$K$O:GA1$G$9!#(B
foozy@708 698
foozy@708 699 $B%Q%C%A$NE,MQBP>]$G$"$k%=!<%9$N99?7$K$h$j!"(B
foozy@708 700 \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 701 Mercurial Queues $B$N;H$$J}$N>\:Y$K4X$7$F$O!"(B
foozy@708 702 ~\ref{sec:mq:merge} $B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708 703
foozy@708 704 $B;DG0$J$3$H$K!"5Q2<$5$l$?(B hunk $B$r07$&$?$a$N7hDjE*$J5;K!$OB8:_$7$^$;$s!#(B
foozy@708 705 $BB?$/$N>l9g!"(B\sfilename{.rej} $B%U%!%$%k$r;2>H$7$J$,$i!"(B
foozy@708 706 $BBP>]%U%!%$%k$rJT=8$7!"(B
foozy@708 707 $B5Q2<$5$l$?(B hunk $B$r<jF0$GE,MQ$7$J$1$l$P$J$j$^$;$s!#(B
foozy@708 708
foozy@708 709 $B;W$$@Z$C$?;v$b<-$5$J$$$N$G$"$l$P!"(B
foozy@708 710 $B%Q%C%A$NE,MQ$K4X$7$F$O(B \command{patch} $B$h$j$b6/NO$J!"(B
foozy@708 711 \command{wiggle}~\cite{web:wiggle} $B$H8F$P$l$k%D!<%k$,!"(B
foozy@708 712 Linux $B%+!<%M%k%O%C%+!<$N(B Neil Brown $B$K$h$j=q$+$l$F$$$^$9!#(B
foozy@708 713
foozy@708 714 \command{patch} $B$K$h$j5Q2<$5$l$?(B hunk $B$NE,MQ$r<+F02=$9$k$?$a$K!"(B
foozy@708 715 $B4JJX$J<jK!$rMQ$$$k(B \command{mpatch}~\cite{web:mpatch} $B$H8F$P$l$k%D!<%k$b!"(B
foozy@708 716 $BJL$N(B Linux $B%+!<%M%k%O%C%+!<$N(B Chris Mason
foozy@708 717 $B!J(BMercurial Queues $B$N:n<T$G$9!K$K$h$j=q$+$l$F$$$^$9!#(B
foozy@708 718 \command{mpatch} $B$O!"(B
foozy@708 719 $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 720
foozy@708 721 \begin{itemize}
foozy@708 722 \item hunk $BCfDx$N%3%s%F%-%9%H$,JQ99$5$l$?!#(B
foozy@708 723 \item hunk $B$N%3%s%F%-%9%H$N!"@hF,$"$k$$$OKvHx$N0lJ}$,8+Ev$?$i$J$$!#(B
foozy@708 724 \item $BBg$-$J(B hunk $B$h$j$b(B---$BA4It$J$j0lIt$J$j$,(B---
foozy@708 725 $B>.$5$J(B hunk $B$KJ,3d$5$l$?J}$,E,MQ$7$d$9$$!#(B
foozy@708 726 \item $B8=;~E@$G$N%U%!%$%k$H$o$:$+$KFbMF$N0[$J$k9T$r(B
foozy@708 727 hunk $B$,:o=|$7$h$&$H$7$F$$$k!#(B
foozy@708 728 \end{itemize}
foozy@708 729
foozy@708 730 \command{wiggle} $B$J$$$7(B \command{mpatch} $B$r;HMQ$9$k:]$K$O!"(B
foozy@708 731 $B<B;\7k2L$KBP$7$FFs=E$KCm0U$rJ'$&I,MW$,$"$j$^$9!#(B
foozy@708 732 $B<B$N$H$3$m(B \command{mpatch} $B$O!"(B
foozy@708 733 $B=hM}$N40N;;~$K<+F0E*$K%^!<%8%W%m%0%i%`$X$HM6F3$9$k$3$H$G!"(B
foozy@708 734 $B%D!<%k=PNO$NFs=E3NG'$N<jK!$r6/MW$7$F$$$^$9$N$G!"(B
foozy@708 735 \command{mpatch} $B$N<B9T7k2L$r3NG'$7!"(B
foozy@708 736 $B;D$5$l$?%^!<%8=hM}$r40N;$5$;$k$3$H$,=PMh$^$9!#(B
foozy@708 737
foozy@708 738 \section{MQ $B$G:G9b@-G=$r=P$9$?$a$K(B}
foozy@708 739 \label{sec:mq:perf}
foozy@708 740
foozy@708 741 MQ $B$OBgNL$N%Q%C%A$N<h$j07$$$r8zN($h$/<B;\$7$^$9!#(B
foozy@708 742 2006 EuroPython conference~\cite{web:europython} $B$G$N9V1i$N$?$a$K!"(B
foozy@708 743 2006 $BG/Cf=\$K@-G=<B83$r<B;\$7$^$7$?!#(B
foozy@708 744 $BE,MQ%Q%C%A$H$7$F!"(B
foozy@708 745 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 746 Linux 2.6.12-rc2 $B$+$i(B Linux 2.6.17 $B$K$+$1$F$N!"(B
foozy@708 747 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 748 $B$3$l$i$N%Q%C%A$rE,MQ$7$?$N$G$9!#(B
foozy@708 749
foozy@708 750 $B5l<0$NCY$$%i%C%W%H%C%W(B PC $B>e$G!"(B
foozy@708 751 1,738 $B8D$N%Q%C%AA4$F$r(B
foozy@708 752 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$9$k$N$K(B 3.5 $BJ,!"(B
foozy@708 753 $B$=$l$i$r(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$9$k$N$K(B 30 $BIC$+$+$j$^$7$?(B
foozy@708 754 $B!J?7$7$$%i%C%W%H%C%W$J$i!"(B
foozy@708 755 $BA4$F$N%Q%C%A$r(B push $B$9$k;~4V$O#2J,$^$G2<$,$j$^$7$?!K!#(B
foozy@708 756 $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 757 $B$r(B 6.6 $BIC$G(B \hgxcmd{mq}{qrefresh} $B$G$-$F$$$^$9!#(B
foozy@708 758
foozy@708 759 MQ $B$,5pBg$J%=!<%9%D%j!<$G:n6H$9$k$N$KE,$7$F$$$k$N$OL@$i$+$G$9$,!"(B
foozy@708 760 $B:G9b$N@-G=$r=P$9$?$a$KCN$C$F$*$$$?$[$&$,NI$$4v$D$+$N%3%D$,$"$j$^$9!#(B
foozy@708 761
foozy@708 762 $B:G=i$N%3%D$O!"(B``$B0l3g(B''$BA`:n$r9T$&$3$H$G$9!#(B
foozy@708 763 \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B$N<B9T$N:]$K$O!"(B
foozy@708 764 $B2?$iJQ99$,$5$l$F$$$J$$$3$H$H!"(B
foozy@708 765 \hgxcmd{mq}{qrefresh} $B$7K:$l$,$J$$$3$H$r3NG'$9$k$?$a$K!"(B
foozy@708 766 $B>o$K:n6HNN0h%G%#%l%/%H%j$rAv::$7$F$$$^$9!#(B
foozy@708 767 $B>.$5$J%=!<%9%D%j!<$N>l9g$O!"(B
foozy@708 768 $B$3$NAv::$KMW$9$k;~4V$O5$$K$J$j$^$;$s!#(B
foozy@708 769 $B$7$+$7!"CfDxEY!J(B10,000 $B%U%!%$%kDxEY!K$N%=!<%9%D%j!<$G$O!"(B
foozy@708 770 $B#1IC$+$i$=$l0J>e$N;~4V$,I,MW$G$9!#(B
foozy@708 771
foozy@708 772 \hgxcmd{mq}{qpush} $B$*$h$S(B \hgxcmd{mq}{qpop} $B%3%^%s%I$G$O!"(B
foozy@708 773 $BJ#?t%Q%C%A$r0l3g$7$F(B push $B$*$h$S(B pop $B$9$k:]$K!"(B
foozy@708 774 $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 775 $BE~C#%Q%C%A;XDjIU$-$G<B9T$9$k$3$H$G!"(B
foozy@708 776 \hgxcmd{mq}{qpush}
foozy@708 777 $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 778 \hgxcmd{mq}{qpop} $B$N>l9g$O!"(B
foozy@708 779 $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 780
foozy@708 781 $BE~C#%Q%C%A$N;XDj$K$O!"%Q%C%A$NL>A0$+?tCM$,;HMQ$G$-$^$9!#(B
foozy@708 782 $B?tCM;XDj$N>l9g!"%Q%C%A$O#0$+$i?t$(;O$a$k$?$a!"(B
foozy@708 783 $B:G=i$N%Q%C%A$O#0!"<!$N%Q%C%A$N#1$H$J$j$^$9!#(B
foozy@708 784
foozy@708 785 \section{$B85%=!<%9JQ99;~$N%Q%C%A$N99?7(B}
foozy@708 786 \label{sec:mq:merge}
foozy@708 787
foozy@708 788 $BD>@\JQ99$9$k$3$H$N$G$-$J$$%j%]%8%H%j$KBP$7$F!"(B
foozy@708 789 $B%Q%C%A%9%?%C%/$r;}$D$3$H$O$h$/$"$k;v$G$9!#(B
foozy@708 790 $BBh;0<T$N%=!<%9$KBP$9$kJQ99$d!"(B
foozy@708 791 $B85%=!<%9$N99?7IQEY$h$j$b3+H/$K;~4V$N3]$+$k5!G=$r<BAu$7$F$$$k>l9g!"(B
foozy@708 792 $B85%=!<%9$N99?7$H$NF14|$d!"(B
foozy@708 793 $BE,MQ$G$-$J$/$J$C$?%Q%C%A$N(B hunk $B$r=$@5$9$kI,MW$,$"$j$^$9!#(B
foozy@708 794 $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 795
foozy@708 796 $B%j%Y!<%9$N0lHVC1=c$JJ}K!$O!"(B
foozy@708 797 $B%Q%C%A$KBP$7$F(B \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$r9T$$!"(B
foozy@708 798 \hgcmd{pull} $B$G85%=!<%9$NJQ99$r%j%]%8%H%j$K<h$j9~$_!"(B
foozy@708 799 $B:G8e$K(B \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} $B$G%Q%C%A$r:FE,MQ$7$^$9!#(B
foozy@708 800 MQ $B$K$h$k%Q%C%AE,MQ$G$O!"(B
foozy@708 801 $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 802 $B>WFM$N2r>C$H%Q%C%A$N(B \hgxcmd{mq}{qrefresh} $B$r9T$&5!2q$r@_$1$D$D!"(B
foozy@708 803 $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 804
foozy@708 805 $B85%=!<%9$NJQ99$,%Q%C%A$NE,MQ6q9g$K0-1F6A$r5Z$\$9?4G[$,L5$$$N$G$"$l$P!"(B
foozy@708 806 $B$3$N<jK!$O<j7Z$G3n$D>e<j$/5!G=$9$k$G$7$g$&!#(B
foozy@708 807 $B$7$+$7$J$,$i!"(B
foozy@708 808 $B85%=!<%9$GIQHK$K99?7$5$l$kItJ,$K?($l$k$h$&$J%Q%C%A%9%?%C%/$N>l9g!"(B
foozy@708 809 $B5Q2<$5$l$?(B hunk $B$N<jF0$G$N=$@5$O!"(B
foozy@708 810 $B$9$0$K$G$bLLE]$J:n6H$H2=$9$G$7$g$&!#(B
foozy@708 811
foozy@708 812 $B%j%Y!<%9=hM}$rItJ,E*$K<+F02=$9$k;v$O2DG=$G$9!#(B
foozy@708 813 $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 814 $B0[$J$k%j%S%8%g%s$H%Q%C%A$H$N4V$G$N>WFM$KBP$7$F!"(B
foozy@708 815 $B;vA0$NE,MQ>pJs$rMQ$$$?2r>C$r(B MQ $B$K$h$j9T$&$3$H$,$G$-$^$9!#(B
foozy@708 816
foozy@708 817 $B<j=g$O>/!99~$_F~$C$F$$$^$9!#(B
foozy@708 818
foozy@708 819 \begin{enumerate}
foozy@708 820 \item $B3+;O$KEv$?$C$F!"(B
foozy@708 821 $B%Q%C%A$,$-$A$s$HE,MQ$G$-$F$$$k:G>e0L%j%S%8%g%s$KBP$7$F(B
foozy@708 822 \hgcmdargs{qpush}{-a} $B$K$h$jA4$F$N%Q%C%A$rE,MQ$7$^$9!#(B
foozy@708 823
foozy@708 824 \item \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}}
foozy@708 825 $B$rMQ$$$F%Q%C%A%G%#%l%/%H%j$N%P%C%/%"%C%W$rJ]B8$7$^$9!#(B
foozy@708 826 $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 827 \texttt{\emph{N}} $B$r>.$5$$@0?t$H$7$?>l9g!"(B
foozy@708 828 \sdirname{.hg/patches.\emph{N}}
foozy@708 829 $B$H$$$&7A<0$NL>A0$N%G%#%l%/%H%j$K%Q%C%A$,J]B8$5$l$^$9!#(B
foozy@708 830 $BE,MQ$5$l$?%Q%C%A0J30$K!"(B
foozy@708 831 ``$BJ]B8$5$l$?%A%'%s%8%;%C%H(B''$B$b%3%_%C%H$7$^$9$,!"(B
foozy@708 832 $B$3$l$OFbItE*$J>pJs$H!"(B
foozy@708 833 \sfilename{series} $B$*$h$S(B \sfilename{status} $B$N>uBV$r5-O?$9$k$?$a$G$9!#(B
foozy@708 834
foozy@708 835 \item hgcmd{pull} $B$K$h$j!"99?7$r%j%]%8%H%j$K<h$j9~$_$^$9(B
foozy@708 836 $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 837
foozy@708 838 \item \hgcmdargs{update}{\hgopt{update}{-C}} $B$rMQ$$$F:G?7$N(B
foozy@708 839 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 840
foozy@708 841 \item \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}
foozy@708 842 \hgxopt{mq}{qpush}{-a}} $B$rMQ$$$FA4$F$N%Q%C%A$r%^!<%8$7$^$9!#(B
foozy@708 843 \hgxcmd{mq}{qpush} $B$X$N(B \hgxopt{mq}{qpush}{-m} $B%*%W%7%g%s;XDj$K$h$j!"(B
foozy@708 844 $B%Q%C%AE,MQ$K<:GT$7$?:]$K!"(BMQ $B$O(B 3-way $B%^!<%8$r<B;\$7$^$9!#(B
foozy@708 845
foozy@708 846 \end{enumerate}
foozy@708 847
foozy@708 848 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}} $B<B;\$N:]$K$O!"(B
foozy@708 849 \sfilename{series}
foozy@708 850 $B%U%!%$%k$KNs5s$5$l$?$=$l$>$l$N%Q%C%A$ODL>oDL$jE,MQ$5$l$^$9!#(B
foozy@708 851 $B$"$$$^$$MW0x$r85$K%Q%C%A$,E,MQ$5$l$?$j!"%Q%C%A$NE,MQ$,5Q2<$5$l$?>l9g!"(B
foozy@708 852 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 853 $B%Q%C%A$KBP1~$9$k%A%'%s%8%;%C%H$rMQ$$$?(B 3-way $B%^!<%8$r9T$$$^$9!#(B
foozy@708 854 $B$3$N%^!<%8=hM}$K$O(B Mercurial $B$NDL>o$N%^!<%85!9=$,MxMQ$5$l$^$9$N$G!"(B
foozy@708 855 $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 856
foozy@708 857 $B%Q%C%A$N1F6A$r2r>C$7=*$($k$H!"(B
foozy@708 858 $B%^!<%87k2L$r85$K(B MQ $B$K$h$k%Q%C%A$N(B refresh $B$,9T$o$l$^$9!#(B
foozy@708 859
foozy@708 860 $B$3$N<j=g$r=*$($?%j%]%8%H%j$K$O!"(B
foozy@708 861 $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 862 \sdirname{.hg/patches.\emph{N}} $B$KJ]B8$5$l$?8E$$%Q%C%A%-%e!<$,;D$j$^$9!#(B
foozy@708 863 $BM>J,$J(B head $B$N:o=|$O!"(B
foozy@708 864 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}}
foozy@708 865 $B$J$$$7(B \hgcmd{strip} $B$G9T$&$3$H$,$G$-$^$9!#(B
foozy@708 866 $B%P%C%/%"%C%W$H$7$F$NI,MW@-$,$J$/$J$C$?$J$i!"(B
foozy@708 867 \sdirname{.hg/patches.\emph{N}} $B$b:o=|$7$F$7$^$C$F9=$$$^$;$s!#(B
foozy@708 868
foozy@708 869 \section{$B%Q%C%A$N;XDj(B}
foozy@708 870
foozy@708 871 $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 872 $B%Q%C%A$NL>A0$+?tCM$G9T$$$^$9!#(B
foozy@708 873 $BL>A0$K$h$k;XDj$OHs>o$K$o$+$j$d$9$$$G$7$g$&!#(B
foozy@708 874 $BNc$($P!"(B\hgxcmd{mq}{qpush} $B%3%^%s%I$X$N(B
foozy@708 875 \filename{foo.patch} $B$N;XDj$K$h$j!"(B
foozy@708 876 \filename{foo.patch} $B$,E,MQ$5$l$k$^$G%Q%C%A$NE,MQ$,7+$jJV$5$l$^$9!#(B
foozy@708 877
foozy@708 878 $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 879 \texttt{foo.patch-2} $B$O(B
foozy@708 880 ``\texttt{foo.patch} $B%Q%C%A$N#2$DA0(B''$B$r!"(B
foozy@708 881 \texttt{bar.patch+4} $B$O(B
foozy@708 882 ``\texttt{bar.patch} $B%Q%C%A$N#4$D8e$m(B''$B$r0UL#$7$^$9!#(B
foozy@708 883
foozy@708 884 $B?tCM$K$h$k%Q%C%A$N;XDj$O$=$l$[$IFq$7$/$"$j$^$;$s!#(B
foozy@708 885 \hgxcmd{mq}{qseries} $B$K$h$j:G=i$KI=<($5$l$k%Q%C%A$O#0!"(B
foozy@708 886 $B#2HVL\$O#1!"$H$J$C$F$$$^$9(B
foozy@708 887 $B!J$=$&!"#0$+$i?t$(;O$a$k;EAH$_$G$9!K!#(B
foozy@708 888
foozy@708 889 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 890 $B%A%'%s%8%;%C%H<1JL;R$r<u$1IU$1$kA4$F$N%3%^%s%I$O!"(B
foozy@708 891 $BE,MQ:Q$_$N%Q%C%AL>$b<u$1IU$1$^$9!#(B
foozy@708 892 $B%j%]%8%H%jCf$K85!9$"$C$?DL>o$N%?%0$K2C$($F!"(B
foozy@708 893 $B%Q%C%AE,MQ$N:]$N5/E@$H$J$k%j%S%8%g%s$K%?%0(B\footnote{
foozy@708 894 \index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qparent}
foozy@708 895 }$B$,IUM?$5$l$^$9!#(B
foozy@708 896 $B$=$l$K2C$($F!"(B
foozy@708 897 \index{tags!$BFC<l%?%0L>(B!\texttt{qbase}}\texttt{qbase} $B$*$h$S(B
foozy@708 898 \index{tags!$BFC<l%?%0L>(B!\texttt{qtip}}\texttt{qtip} $B%?%0$K$h$j!"(B
foozy@708 899 $B:G2<0L$*$h$S:G>e0L$NE,MQ$:$_%Q%C%A$r$=$l$>$l;XDj$G$-$^$9!#(B
foozy@708 900
foozy@708 901 Mercurial $B$NDL>o%?%0$KBP$9$k$3$l$i$N3HD%$O!"(B
foozy@708 902 $B%Q%C%A$N<h$j07$$$r$h$j4JJX$K$7$^$9!#(B
foozy@708 903
foozy@708 904 \begin{itemize}
foozy@708 905
foozy@708 906 \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 907 $B$rEj9F$7$?$$>l9g$K$O!)(B
foozy@708 908 \begin{codesample4}
foozy@708 909 hg email qbase:qtip
foozy@708 910 \end{codesample4}
foozy@708 911 $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 912
foozy@708 913 \item \texttt{foo.patch} $B0J9_$N%Q%C%A$G!"(B
foozy@708 914 $BFCDj$N%G%#%l%/%H%jG[2<$N%U%!%$%k$K4XM?$7$F$$$k$b$N$r!"(B
foozy@708 915 $BA4$FCN$j$?$$>l9g$K$O!)(B
foozy@708 916 \begin{codesample4}
foozy@708 917 hg log -r foo.patch:qtip \emph{subdir}
foozy@708 918 \end{codesample4}
foozy@708 919
foozy@708 920 \end{itemize}
foozy@708 921
foozy@708 922 $B%Q%C%A$NL>A0$rMxMQ2DG=$K$9$k$?$a$K!"(B
foozy@708 923 MQ $B$O(B Mercurial $B$N;}$DFbIt%?%05!G=$r;HMQ$7$F$$$k$N$G!"(B
foozy@708 924 $B%Q%C%A$rL>A0$G;XDj$9$k>l9g$K$O!"(B
foozy@708 925 $B$=$NL>A0$rA4$FF~NO$9$kI,MW$O$"$j$^$;$s!#(B
foozy@708 926
foozy@708 927 \begin{figure}[ht]
foozy@708 928 \interaction{mq.id.output}
foozy@708 929 \caption{MQ $B$N%?%05!G=$r;HMQ$7$?%Q%C%A$NA`:n(B}
foozy@708 930 \label{ex:mq:id}
foozy@708 931 \end{figure}
foozy@708 932
foozy@708 933 $B%Q%C%A$NL>A0$r%?%0$G<B8=$9$k$3$H$G!"(B
foozy@708 934 \hgcmd{log} $B%3%^%s%I$N<B9T;~$K!"(B
foozy@708 935 $B$=$N=PNO$N0lIt$H$7$F%?%0$H$7$F$N%Q%C%AL>$,I=<($5$l$k!"(B
foozy@708 936 $B$H$$$&I{:nMQ$bF@$i$l$^$9!#(B
foozy@708 937 $B$3$N$3$H$K$h$j!"(B
foozy@708 938 $BE,MQ:Q$_$N%Q%C%A$H(B``$BDL>o$N(B''$B%j%S%8%g%s$r!"(B
foozy@708 939 $B;k3PE*$K<1JL$9$k$3$H$rMF0W$K$7$^$9!#(B
foozy@708 940 $BE,MQ:Q$_%Q%C%A$HO"7H$9$k(B Mercurial $B$NDL>o%3%^%s%I$N<B9TNc$r(B
foozy@708 941 $B?^(B ~\ref{ex:mq:id} $B$K<($7$^$9!#(B
foozy@708 942
foozy@708 943 \section{$BCN$C$F$*$/$HJXMx$J;vJA(B}
foozy@708 944
foozy@708 945 MQ $B$NMxMQ$K4X$7$F!"FHN)$7$?@a$r@_$1$kDx$G$O$J$$$b$N$N!"(B
foozy@708 946 $BCN$C$F$*$$$?$[$&$,NI$$;vJA$,4v$D$+$"$j$^$9!#(B
foozy@708 947 $B$3$3$G$O!"$=$&$$$C$?;vJA$r=8$a$F$_$^$7$?!#(B
foozy@708 948
foozy@708 949 \begin{itemize}
foozy@708 950 \item \hgxcmd{mq}{qpop} $B$G%Q%C%A$r<h$j>C$7$?8e$K!"(B
foozy@708 951 \hgxcmd{mq}{qpush} $B$G:FEYE,MQ$7$?>l9g!"(B
foozy@708 952 $B$=$N;~E@$G$NE,MQ:Q$_%Q%C%A$KAjEv$9$k%A%'%s%8%;%C%H$O!"(B
foozy@708 953 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 954 $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 955
foozy@708 956 \item $B>/$J$/$H$b!"(B
foozy@708 957 $B%Q%C%A%9%?%C%/>e$N%Q%C%A$K$h$k%A%'%s%8%;%C%H72$N(B
foozy@708 958 ``$B%Q%C%A@-(B''$B$rJ]$A$?$$$N$G$"$l$P!"(B
foozy@708 959 $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 960 \hgcmd{$B%^!<%8(B}$B$7$?>l9g!"$=$l<+BN$O@.8y$9$k$G$7$g$&$,!"(B
foozy@708 961 $B7k2L$H$7$F(B MQ $B$,:.Mp$7$F$7$^$&$G$7$g$&!#(B
foozy@708 962 \end{itemize}
foozy@708 963
foozy@708 964 \section{$B%j%]%8%H%j$K$*$1$k%Q%C%A$N4IM}(B}
foozy@708 965 \label{sec:mq:repo}
foozy@708 966
foozy@708 967 MQ $B$,MxMQ$9$k(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$,(B
foozy@708 968 Mercurial $B$N:n6HNN0h%G%#%l%/%H%j$N30$K$"$k$?$a!"(B
foozy@708 969 MQ $B$N(B``$B2<$K$"$k(B''Mercurial $B$N%j%]%8%H%j$O!"(B
foozy@708 970 $B%Q%C%A$N4IM}$dB8:_$K4X$7$F2?$bG'<1$7$F$$$^$;$s!#(B
foozy@708 971
foozy@708 972 $B$3$N$3$H$O!"(B
foozy@708 973 $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 974 $B$H$$$&6=L#?<$$2DG=@-$r$b$?$i$7$^$9!#(B
foozy@708 975 $BNc$($P!"(B
foozy@708 976 $B%Q%C%A$K4X$9$k:n6H$r9T$$!"(B\hgxcmd{mq}{qrefresh} $B$r$7$?8e$G!"(B
foozy@708 977 $B%Q%C%A$N8=>u$r(B \hgcmd{commit} $B$9$k$3$H$G!"(B
foozy@708 978 $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 979 $BM-MQ$J5!G=$rDs6!$7$^$9!#(B
foozy@708 980
foozy@708 981 $BJ#?t$N%j%]%8%H%j$N4V$G!"(B
foozy@708 982 $BF10l%Q%C%A%9%?%C%/$N0[$J$kHG$r6&M-$9$k$3$H$b=PMh$^$9!#(B
foozy@708 983 $BI.<T$O(B Linux $B%+!<%M%k5!G=$N3+H/$N:]$K$3$N<jK!$r;HMQ$7$F$$$^$9!#(B
foozy@708 984 $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 985 $B$=$l$>$l$K:n6HCf$N%Q%C%A$r4^$`%j%]%8%H%j$rJ#@=$7$^$9!#(B
foozy@708 986 $BJL$J%"!<%-%F%/%A%c$GJQ99FbMF$N;n83$r9T$&:]$K$O!"(B
foozy@708 987 $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 988 $BA4$F$N%Q%C%A$r:GE,MQ!J(Bpop $B8e$K(B push$B!K$7$?8e$K!"(B
foozy@708 989 $B$=$N%+!<%M%k$N%S%k%I$*$h$S;n83$r9T$$$^$9!#(B
foozy@708 990
foozy@708 991 $B%j%]%8%H%j7A<0$N>e$G%Q%C%A$r4IM}$9$k$3$H$G!"(B
foozy@708 992 $BE,MQBP>]$N%=!<%9$KBP$9$k@)8f$N2DH]$K4X$o$jL5$/!"(B
foozy@708 993 $B3+H/<TF1;N$G$*8_$$$K>WFM$9$k$3$HL5$7$K!"(B
foozy@708 994 $BF1$8%Q%C%A7ONs$KBP$9$k:n6H$r<B;\$G$-$^$9(B
foozy@708 995
foozy@708 996 \subsection{MQ $B$N%Q%C%A%j%]%8%H%j%5%]!<%H(B}
foozy@708 997
foozy@708 998 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 999 $B%Q%C%AA`:n$rJd=u$7$^$9$,!"(B
foozy@708 1000 \hgxcmd{mq}{qinit} $B$G$N=i4|2=$N:]$K(B
foozy@708 1001 \hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$r;XDj$9$k$3$H$G!"(B
foozy@708 1002 \sdirname{.hg/patches} $B%G%#%l%/%H%j$r(B
foozy@708 1003 Mercurial $B%j%]%8%H%j$H$7$F:n@.$9$k$3$H$,=PMh$^$9!#(B
foozy@708 1004
foozy@708 1005 \begin{note}
foozy@708 1006 \hgxopt{mq}{qinit}{-c} $B%*%W%7%g%s$N;XDj$rK:$l$?>l9g!"(B
foozy@708 1007 $BG$0U$N;~E@$G(B \sdirname{.hg/patches} $B%G%#%l%/%H%j$G(B
foozy@708 1008 \hgcmd{init} $B$r<B9T$7$F$/$@$5$$!#(B
foozy@708 1009 \sfilename{status} $B$rMzNr4IM}$7$h$&$H;W$&$3$H$O(B\emph{$BK\Ev$K(B}$B$"$j$^$;$s$+$i!"(B
foozy@708 1010 \sfilename{.hgignore} $B%U%!%$%k$K(B
foozy@708 1011 \sfilename{status} $B$rDI2C$9$k$N$rK:$l$J$$$G$/$@$5$$(B
foozy@708 1012 $B!J(B\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} $B$O!"(B
foozy@708 1013 $B$3$N:n6H$r<+F0E*$K9T$$$^$9!K!#(B
foozy@708 1014 \end{note}
foozy@708 1015
foozy@708 1016 $BMxJX@->e!"(B
foozy@708 1017 \dirname{.hg/patches} $B%G%#%l%/%H%j$,(B
foozy@708 1018 Mercurial $B%j%]%8%H%j$G$"$k>l9g!"(B
foozy@708 1019 MQ $B$O:n@.!&<h$j9~$_$r9T$C$?%Q%C%A$NA4$F$r<+F0E*$K(B
foozy@708 1020 \hgcmd{add} $B$7$^$9!#(B
foozy@708 1021
foozy@708 1022 $B:G8e$K$J$j$^$9$,!"(B
foozy@708 1023 MQ $B$O(B \sdirname{.hg/patches} $B$K$*$$$F(B
foozy@708 1024 \hgcmd{commit} $B$r<B9T$9$kC;=L%3%^%s%I(B
foozy@708 1025 \hgxcmd{mq}{qcommit} $B$rDs6!$7$F$$$^$9$N$G!"(B
foozy@708 1026 $B!J%G%#%l%/%H%j0\F0Ey$N!KHQ$o$7$$%-!<F~NO$,>JN,$G$-$^$9!#(B
foozy@708 1027
foozy@708 1028 \subsection{$B4v$D$+$NCm0UE@(B}
foozy@708 1029
foozy@708 1030 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 1031
foozy@708 1032 MQ $B$O!"%Q%C%A%G%#%l%/%H%j$KBP$7$F9T$o$l$?JQ99$r!"(B
foozy@708 1033 $B<+F0E*$K8!=P$9$k$3$H$O$G$-$^$;$s!#(B
foozy@708 1034 \hgcmd{pull} $B$N<B9T$d!"<jF0$G$NJT=8!"(B
foozy@708 1035 $B$"$k$$$O(B \hgcmd{update} $B$N<B9T$K$h$k%Q%C%A$d(B
foozy@708 1036 \sfilename{series} $B$NJQ99$r9T$C$?>l9g!"(B
foozy@708 1037 $B%Q%C%AE,MQBP>]$N%j%]%8%H%j$K$*$$$F(B
foozy@708 1038 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} $B$N8e$K(B
foozy@708 1039 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} $B$r9T$C$F!"(B
foozy@708 1040 $B$=$l$i$NJQ99$rM-8z$K$9$kI,MW$,$"$j$^$9!#(B
foozy@708 1041 $B$3$N:n6H$rK:$l$?>l9g!"(B
foozy@708 1042 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 1043
foozy@708 1044 \section{$B%Q%C%AA`:n$N$?$a$N%5!<%I%Q!<%F%#!<@=%D!<%k(B}
foozy@708 1045 \label{sec:mq:tools}
foozy@708 1046
foozy@708 1047 $B;C$/$N4V!"%Q%C%A$r;H$C$?:n6H$r$7$F$$$k$H!"(B
foozy@708 1048 $B07$C$F$$$k%Q%C%A$N2r<a$dA`:n$rJd=u$9$k%D!<%k$,!"(B
foozy@708 1049 $BM_$7$/$F$?$^$i$J$/$J$C$F$$$k$K0c$$$"$j$^$;$s!#(B
foozy@708 1050
foozy@708 1051 \command{diffstat} $B%3%^%s%I(B ~\cite{web:diffstat} $B$O!"(B
foozy@708 1052 $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 1053 $B$I$N%U%!%$%k$,!"$I$NDxEY$N1F6A$r<u$1$k$N$+!"(B
foozy@708 1054 $B$H$$$C$?A4BNE*$J(B``$B463P$rDO$`(B''$B$K$ONI$$J}K!$G$9(B
foozy@708 1055 $B!J(B\command{diffstat} $B$N(B
foozy@708 1056 \cmdopt{diffstat}{-p} $B%*%W%7%g%sMxMQ$OL^O@NI$$$N$G$9$,!"(B
foozy@708 1057 $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 1058 $B>/$J$/$H$bI.<T$K$H$C$F$O$o$+$j$K$/$$$G$9!K!#(B
foozy@708 1059
foozy@708 1060 \begin{figure}[ht]
foozy@708 1061 \interaction{mq.tools.tools}
foozy@708 1062 \label{ex:mq:tools}
foozy@708 1063 \caption{\command{diffstat}$B!"(B\command{filterdiff} $B$*$h$S(B \command{lsdiff} $B%3%^%s%I(B}
foozy@708 1064 \end{figure}
foozy@708 1065
foozy@708 1066 \package{patchutils} $B%Q%C%1!<%8(B ~\cite{web:patchutils} $B$O5.=E$JB8:_$G$9!#(B
foozy@708 1067 $B$3$N%Q%C%1!<%8$O!"(B
foozy@708 1068 ``Unix $B$NM}G0(B''$B$K=>$C$F!"(B
foozy@708 1069 $B$=$l$>$l$,%Q%C%A$KBP$7$FC10l$N=hM}$r9T$&>.$5$J%D!<%k$N=8$^$j$G$9!#(B
foozy@708 1070 \package{patchutils} $B$NCf$GI.<T$,:G$bMxMQ$7$F$$$k$N$O!"(B
foozy@708 1071 $B%Q%C%A%U%!%$%k$+$i0lIt$rE83+$9$k(B \command{filterdiff} $B$G$9!#(B
foozy@708 1072 $BNc$($P!"(B
foozy@708 1073 $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 1074 \command{filterdiff} $B$r5/F0$9$k$3$H$G!"(B
foozy@708 1075 $B;XDj$7$?%Q%?!<%s$KL>A0$,9gCW$9$k%U%!%$%k$K$@$1JQ99$r9T$&!"(B
foozy@708 1076 $B>.$5$J%Q%C%A$r@8@.$9$k$3$H$,=PMh$^$9!#(B
foozy@708 1077 $B$=$l0J30$NNc$K$D$$$F$O!"(B
foozy@708 1078 ~\ref{mq-collab:tips:interdiff} $B@a$r;2>H$7$F$/$@$5$$!#(B
foozy@708 1079
foozy@708 1080 \section{$B%Q%C%A$r07$&NI$$J}K!(B}
foozy@708 1081
foozy@708 1082 $B0lO"$N%Q%C%A$,!"(B
foozy@708 1083 $B%U%j!<%=%U%H%&%'%"$d%*!<%W%s%=!<%9%W%m%8%'%/%H$XAwIU$9$k$b$N$G$"$m$&$H!"(B
foozy@708 1084 $B$"$J$?$N:n6H$K$*$1$kDj4|E*$JJQ99<jB3$-$H$_$J$5$l$k$b$N$G$"$m$&$H$b!"(B
foozy@708 1085 $B$h$jNI$/:n6H$9$k$?$a$N!"(B
foozy@708 1086 $B4JC1$KMxMQ$G$-$k<jK!$,$"$j$^$9!#(B
foozy@708 1087
foozy@708 1088 $B$^$:$O!"%Q%C%A$K@bL@E*$JL>A0$r$D$1$^$7$g$&!#(B
foozy@708 1089 $BNc$($P(B \filename{rework-device-alloc.patch} $B$H$$$C$?L>A0$O!"(B
foozy@708 1090 $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 1091 $BNI$$L>A0$H8@$($k$G$7$g$&!#(B
foozy@708 1092 $BL>A0$OD9$/$F$bLdBj$K$O$J$j$^$;$s!#(B
foozy@708 1093 $BL>A0$rF~NO$9$k$3$H$O$=$l$[$IB?$/$O$J$$$G$7$g$&$,!"(B
foozy@708 1094 \hgxcmd{mq}{qapplied} $B$d(B \hgxcmd{mq}{qtop} $B$H$$$C$?%3%^%s%I$O!"(B
foozy@708 1095 $B2?EY$b2?EY$b<B9T$9$k$b$N$G$9$+$i!#(B
foozy@708 1096 $BB?$/$N%Q%C%A$r07$&>l9g$d!"(B
foozy@708 1097 $BB?$/$N0[$J$k%?%9%/$K<j0lGU$G%Q%C%A$KB?$/$NCm0U$r3d$1$J$$$h$&$J>l9g!"(B
foozy@708 1098 $BL>A0$NE,@Z$5$O$H$j$o$1=EMW$G$9!#(B
foozy@708 1099
foozy@708 1100 $B<!$K!"$I$N%Q%C%A$KBP$7$F:n6H$7$F$$$k$N$+$KCm0U$7$^$7$g$&!#(B
foozy@708 1101 \hgxcmd{mq}{qtop} $B%3%^%s%I$r(B
foozy@708 1102 ---$BNc$($P!"(B\hgcmdargs{tip}{\hgopt{tip}{-p}} $B$r;XDj$7$D$D(B---
foozy@708 1103 $B;HMQ$7$FIQHK$K%Q%C%A$NL>A0$r8+$k$3$H$G!"(B
foozy@708 1104 $B$I$s$J:n6H$r$7$F$$$k$N$+$r3NG'$7$^$7$g$&!#(B
foozy@708 1105 $BI.<T$O:n6HCf$K2?EY$b0U?^$7$J$$%Q%C%A$KBP$7$F(B
foozy@708 1106 \hgxcmd{mq}{qrefresh} $B$r<B9T$7$F$7$^$C$?$3$H$,$"$j$^$9$,!"(B
foozy@708 1107 $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 1108 $B1}!9$K$7$F<j$N$+$+$k$b$N$G$9!#(B
foozy@708 1109
foozy@708 1110 $B>e5-$NM}M3$+$i!"(B
foozy@708 1111 ~\ref{sec:mq:tools} $B@a$G>R2p$7$F$$$k(B
foozy@708 1112 \command{diffstat} $B$d(B \command{filterdiff}
foozy@708 1113 $B$N$h$&$J%5!<%I%Q!<%F%#!<@=%D!<%k$N3X=,$K!"(B
foozy@708 1114 $B>/$7$G$bNI$$$N$G;~4V$rHq$d$9$Y$-$G$9!#(B
foozy@708 1115 $BA0<T$O%Q%C%A$N5Z$\$9JQ99$K4X$7$F$9$P$d$$8+2r$rF@$k$3$H$,!"(B
foozy@708 1116 $B8e<T$O%Q%C%ACf$N(B hunk
foozy@708 1117 $B$rA*BrE*$K7Q$.9g$o$;$F0[$J$k%Q%C%A$KAH$_>e$2$k$3$H$,$G$-$^$9!#(B
foozy@708 1118
foozy@708 1119 \section{MQ $B%/%C%/%V%C%/(B}
foozy@708 1120
foozy@708 1121 \subsection{``$B:3:Y$J(B''$B%Q%C%A$N4IM}(B}
foozy@708 1122
foozy@708 1123 $B???7$7$$(B Mercurial $B%j%]%8%H%j$K%U%!%$%k$rEjF~$9$k$N$O!"(B
foozy@708 1124 $BHs>o$K%*!<%P!<%X%C%I$,Dc$$$N$G!"(B
foozy@708 1125 $BC1$K%@%&%s%m!<%I$7$?%=!<%9(B tarball $B$KBP$7$FJQ99$r2C$($k$N$@$H$7$F$b!"(B
foozy@708 1126 MQ $B$K$h$j%Q%C%A4IM}$r9T$&$3$H$OHs>o$KM}$K$+$J$C$F$$$^$9!#(B
foozy@708 1127
foozy@708 1128 $B$^$:$O%=!<%9(B tarball $B$N%@%&%s%m!<%I$HE83+$r9T$$!"(B
foozy@708 1129 Mercurial $B%j%]%8%H%j$KEjF~$7$^$9!#(B
foozy@708 1130
foozy@708 1131 \interaction{mq.tarball.download}
foozy@708 1132
foozy@708 1133 $B<!$K%Q%C%A%9%?%C%/$r:n@.$7!"JQ99$r9T$$$^$9!#(B
foozy@708 1134
foozy@708 1135 \interaction{mq.tarball.qinit}
foozy@708 1136
foozy@708 1137 $B?t=54V$+$i?t%u7n7P$C$F$+$i!"(B
foozy@708 1138 $B$=$N%Q%C%1!<%8$NCx<T$,?7$7$$HG$r%j%j!<%9$7$?$H$7$^$9!#(B
foozy@708 1139 $B$^$:$O%j%]%8%H%j$KJQ99$r<h$j9~$_$^$9!#(B
foozy@708 1140
foozy@708 1141 \interaction{mq.tarball.newsource}
foozy@708 1142
foozy@708 1143 $B>e5-<j=g$G(B \hgcmd{locate} $B$K$h$j;O$^$k%Q%$%W%i%$%s$O!"(B
foozy@708 1144 $B:n6HNN0h%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$r:o=|$7$^$9$N$G!"(B
foozy@708 1145 \hgcmd{commit} $B$N(B \hgopt{commit}{--addremove} $B%*%W%7%g%s$O!"(B
foozy@708 1146 $B?7$7$$HG$K$*$$$F$I$N%U%!%$%k$,K\Ev$KDI2C!?:o=|$5$l$?$N$+$rH=Dj$G$-$^$9!#(B
foozy@708 1147
foozy@708 1148 $B:G8e$K!"?7$7$/$J$C$?%=!<%9%D%j!<$N:G>e0L$G%Q%C%A$rE,MQ$7$^$9!#(B
foozy@708 1149
foozy@708 1150 \interaction{mq.tarball.repush}
foozy@708 1151
foozy@708 1152 \subsection{$B%Q%C%AA4BN$N7k9g(B}
foozy@708 1153 \label{sec:mq:combine}
foozy@708 1154
foozy@708 1155 MQ $B$O%Q%C%AA4BN$r7k9g$9$k(B
foozy@708 1156 \hgxcmd{mq}{qfold} $B%3%^%s%I$rDs6!$7$F$$$^$9!#(B
foozy@708 1157 $B$3$N%3%^%s%I$O!"(B
foozy@708 1158 $BL>A0$r;XDj$7$?%Q%C%A$r;XDj$7$?=g=x$G!"(B
foozy@708 1159 $B:G>e0L$NE,MQ:Q$_%Q%C%A$X$H(B``$B7k9g(B''$B$7!"(B
foozy@708 1160 $B$=$l$i$N@bL@J8$r:G>e0L%Q%C%A$N@bL@J8KvHx$XDI2C$7$^$9!#(B
foozy@708 1161 $B7k9gBP>]$N%Q%C%A$O!"7k9g$N;~E@$GL$E,MQ$G$J$1$l$P$J$j$^$;$s!#(B
foozy@708 1162
foozy@708 1163 $B%Q%C%A$N7k9g=g=x$O=EMW$G$9!#(B
foozy@708 1164 $B:G>e0L$NE,MQ:Q$_%Q%C%A$,(B \texttt{foo} $B$G!"(B
foozy@708 1165 $B$=$3$K(B \hgxcmd{mq}{qfold} $B$H(B \texttt{quux} $B$r(B
foozy@708 1166 \hgxcmd{mq}{qfold} $B$9$k>l9g!"(B
foozy@708 1167 $B=g$K(B \texttt{foo}$B!"(B\texttt{bar} $B$=$7$F(B \texttt{quux}
foozy@708 1168 $B$HE,MQ$9$k$N$HF1$88z2L$r;}$D%Q%C%A$,$G$-$"$,$j$^$9!#(B
foozy@708 1169
foozy@708 1170 \subsection{$B%Q%C%A$N0lIt$NB>$N%Q%C%A$X$NJ;9g(B}
foozy@708 1171
foozy@708 1172 $B%Q%C%A$N(B\emph{$B0lIt(B}$B$rB>$N%Q%C$XJ;9g$9$k$N$O!"(B
foozy@708 1173 $B%Q%C%AA4BN$r7k9g$9$k$h$j$bLLE]$G$9!#(B
foozy@708 1174
foozy@708 1175 $B$"$k%U%!%$%k!J72!K$KBP$9$kJQ99A4BN$r0\F0$7$?$$>l9g!"(B
foozy@708 1176 \command{filterdiff} $B$N(B \cmdopt{filterdiff}{-i} $B$*$h$S(B
foozy@708 1177 \cmdopt{filterdiff}{-x} $B%*%W%7%g%s$rMQ$$$k$3$H$G!"(B
foozy@708 1178 $B%Q%C%A$+$i@Z$j=P$9JQ99E@$rA*Br$7$F!"(B
foozy@708 1179 $B$=$N7k2L$rJ;9g@h%Q%C%A$X$H<h$j9~$`$3$H$G$,$G$-$^$9!#(B
foozy@708 1180 $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 1181 $B$=$3$G!"(B
foozy@708 1182 MQ $B$O<h$j9~$_85%Q%C%A$r(B \hgxcmd{mq}{qpush} $B$9$k:]$K!"(B
foozy@708 1183 $B<h$j9~$^$l$?J,$N(B hunk $B$,5qH]$5$l$?$3$H$,Js9p$5$l$^$9$+$i!"(B
foozy@708 1184 \hgxcmd{mq}{qrefresh} $B$G%Q%C%A$r99?7$9$k$3$H$G!"(B
foozy@708 1185 $B=EJ#$7$?(B hunk $B$r<h$j=|$/$3$H$,$G$-$^$9!#(B
foozy@708 1186
foozy@708 1187 $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 1188 $B;vBV$O$b$&>/$7Lq2p$G$9$,!"(B
foozy@708 1189 $B$=$l$G$bItJ,E*$K<+F02=$9$k$3$H$,$G$-$^$9!#(B
foozy@708 1190 \cmdargs{lsdiff}{-nvv} $B$r;H$&$3$H$G!"(B
foozy@708 1191 $B%Q%C%A$K4X$9$k%a%?%G!<%?$rI=<($5$;$^$9!#(B
foozy@708 1192
foozy@708 1193 \interaction{mq.tools.lsdiff}
foozy@708 1194
foozy@708 1195 $B$3$N%3%^%s%I$O!"#3$D$N0[$J$k?tCM$NN`$rI=<($7$^$9!#(B
foozy@708 1196
foozy@708 1197 \begin{itemize}
foozy@708 1198 \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 1199 \emph{$B%U%!%$%kHV9f(B}$B$G!"(B
foozy@708 1200
foozy@708 1201 \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 1202
foozy@708 1203 \item $B!JF1$89T$K!K(Bhunk $B$r<1JL$9$k$?$a$N(B \emph{hunk $BHV9f(B}
foozy@708 1204
foozy@708 1205 \end{itemize}
foozy@708 1206
foozy@708 1207 $BI,MW$J%U%!%$%kHV9f$d(B hunk $BHV9f$rFCDj$9$k$?$a$K$O!"(B
foozy@708 1208 $B;k3PE*$J@:::$d%Q%C%A$NFI2r$,I,MW$H$5$l$^$9$,!"(B
foozy@708 1209 $B$=$l$i$N?tCM$r(B \command{filterdiff} $B$N(B
foozy@708 1210 \cmdopt{filterdiff}{--files} $B$d(B
foozy@708 1211 \cmdopt{filterdiff}{--hunks} $B$H$$$C$?%*%W%7%g%s$K;XDj$9$k$3$H$G!"(B
foozy@708 1212 $B%U%!%$%k$d(B hunk $B$r@53N$KA*Br$9$k$3$H$,$G$-$^$9!#(B
foozy@708 1213
foozy@708 1214 $B0lEY(B hunk $B$r<h$j=P$7$F$7$^$($P!"(B
foozy@708 1215 $B7k9g@h%Q%C%A$NKvHx$K7k9g$7$F(B
foozy@708 1216 ~\ref{sec:mq:combine} $B@a$N;D$j$N:n6H$r:F3+$9$k$3$H$,$G$-$^$9!#(B
foozy@708 1217
foozy@708 1218 \section{quilt $B$H(B MQ $B$N0c$$(B}
foozy@708 1219
foozy@708 1220 $B4{$K(B quilt $B$r=OCN$7$F$$$k$N$G$"$l$P!"(B
foozy@708 1221 MQ $B$OF1MM$N%3%^%s%I72$r;}$C$F$$$^$9$,!"(B
foozy@708 1222 $B$=$NF/$-$K$O$$$/$i$+$N0c$$$,$"$j$^$9!#(B
foozy@708 1223
foozy@708 1224 $BKX$I$N(B quilt $B%3%^%s%I$KBP$7$F!"(B
foozy@708 1225 ``\texttt{q}'' $B$G;O$^$kBP1~$9$k(B
foozy@708 1226 MQ $B$N%3%^%s%I$,$"$k$3$H$K5$IU$/$3$H$G$7$g$&!#(B
foozy@708 1227 $BC"$7!"(B
foozy@708 1228 quilt $B$N(B \texttt{add} $B$*$h$S(B \texttt{remove} $B%3%^%s%I$KBP1~$9$k$N$,!"(B
foozy@708 1229 Mercurial $B$NDL>o$N(B \hgcmd{add} $B$*$h$S(B \hgcmd{remove} $B$G$"$k$N$,Nc30$G$9!#(B
foozy@708 1230 $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 1231
foozy@708 1232 %%% Local Variables:
foozy@708 1233 %%% mode: latex
foozy@708 1234 %%% TeX-master: "00book"
foozy@708 1235 %%% End: