comparison ja/mq.tex @ 345:6da6c5741e90

more mq.tex
author Yoshiki Yazawa <yaz@honeyplnaet.jp>
date Sun, 13 Jul 2008 04:11:36 +0900
parents cea705a64649
children 0b99bf82b573
comparison
equal deleted inserted replaced
344:cea705a64649 345:6da6c5741e90
1296 $B>C5n$7$F$b9=$o$J$$!%(B 1296 $B>C5n$7$F$b9=$o$J$$!%(B
1297 1297
1298 %\section{Identifying patches} 1298 %\section{Identifying patches}
1299 \section{$B%Q%C%A$N<1JL(B} 1299 \section{$B%Q%C%A$N<1JL(B}
1300 1300
1301 MQ commands that work with patches let you refer to a patch either by 1301 %MQ commands that work with patches let you refer to a patch either by
1302 using its name or by a number. By name is obvious enough; pass the 1302 %using its name or by a number. By name is obvious enough; pass the
1303 name \filename{foo.patch} to \hgxcmd{mq}{qpush}, for example, and it will 1303 %name \filename{foo.patch} to \hgxcmd{mq}{qpush}, for example, and it will
1304 push patches until \filename{foo.patch} is applied. 1304 %push patches until \filename{foo.patch} is applied.
1305 1305
1306 As a shortcut, you can refer to a patch using both a name and a 1306 $B%Q%C%A$r07$&(BMQ$B%3%^%s%I$O!$%Q%C%A$r%Q%C%AL>$^$?$OHV9f$G;2>H$9$k!%L>A0$N>l(B
1307 numeric offset; \texttt{foo.patch-2} means ``two patches before 1307 $B9g$ONc$($P%U%!%$%kL>(B\filename{foo.patch}$B$r(B\hgxcmd{mq}{qpush}$B$KEO$9!%$3$N(B
1308 \texttt{foo.patch}'', while \texttt{bar.patch+4} means ``four patches 1308 $B>l9g!$%3%^%s%I$O(B\filename{foo.patch}$B$^$G$N%U%!%$%k$r%W%C%7%e$9$k!%(B
1309 after \texttt{bar.patch}''. 1309
1310 1310 %As a shortcut, you can refer to a patch using both a name and a
1311 Referring to a patch by index isn't much different. The first patch 1311 %numeric offset; \texttt{foo.patch-2} means ``two patches before
1312 printed in the output of \hgxcmd{mq}{qseries} is patch zero (yes, it's one 1312 %\texttt{foo.patch}'', while \texttt{bar.patch+4} means ``four patches
1313 of those start-at-zero counting systems); the second is patch one; and 1313 %after \texttt{bar.patch}''.
1314 so on 1314
1315 $B%7%g!<%H%+%C%H$H$7$F!$%Q%C%A$KL>A0$H?t;z$K$h$k%*%U%;%C%HN>J}$rMQ$$$F;2>H(B
1316 $B$9$k$3$H$,$G$-$k!%(B\texttt{foo.patch-2}$B$O(B``\texttt{foo.patch}$B$N(B2$B$DA0$N%Q%C(B
1317 $B%A(B''$B$H2r<a$5$l$k!%$^$?!$(B\texttt{bar.patch+4}$B$O(B``\texttt{bar.patch}$B$N(B4$B$D(B
1318 $B8e$N%Q%C%A(B''$B$H2r<a$5$l$k!%(B
1319
1320 %Referring to a patch by index isn't much different. The first patch
1321 %printed in the output of \hgxcmd{mq}{qseries} is patch zero (yes, it's one
1322 %of those start-at-zero counting systems); the second is patch one; and
1323 %so on
1324
1325 $B%$%s%G%C%/%9$,$=$l$[$I0c$o$J$$%Q%C%A$X$N;2>H$O(B
1315 1326
1316 MQ also makes it easy to work with patches when you are using normal 1327 MQ also makes it easy to work with patches when you are using normal
1317 Mercurial commands. Every command that accepts a changeset ID will 1328 Mercurial commands. Every command that accepts a changeset ID will
1318 also accept the name of an applied patch. MQ augments the tags 1329 also accept the name of an applied patch. MQ augments the tags
1319 normally in the repository with an eponymous one for each applied 1330 normally in the repository with an eponymous one for each applied
1320 patch. In addition, the special tags \index{tags!special tag 1331 patch. In addition, the special tags \index{tags!special tag
1321 names!\texttt{qbase}}\texttt{qbase} and \index{tags!special tag 1332 names!\texttt{qbase}}\texttt{qbase} and \index{tags!special tag
1322 names!\texttt{qtip}}\texttt{qtip} identify the ``bottom-most'' and 1333 names!\texttt{qtip}}\texttt{qtip} identify the ``bottom-most'' and
1323 topmost applied patches, respectively. 1334 topmost applied patches, respectively.
1324 1335
1325 These additions to Mercurial's normal tagging capabilities make 1336 %These additions to Mercurial's normal tagging capabilities make
1326 dealing with patches even more of a breeze. 1337 %dealing with patches even more of a breeze.
1338 Mercurial$B$NDL>o$N%?%05!G=$X$N$3$l$i$NDI2C$O!$%Q%C%A$N<h$j07$$$K$*$$$FBg$-(B
1339 $B$J0UL#$r;}$D!%(B
1327 \begin{itemize} 1340 \begin{itemize}
1328 \item Want to patchbomb a mailing list with your latest series of 1341 %\item Want to patchbomb a mailing list with your latest series of
1329 changes? 1342 % changes?
1343 \item $B0lO"$N:G?7$NJQ99$r%Q%C%AGzCF$H$7$F%a!<%j%s%0%j%9%H$X$KEj$29~$_$?$$(B
1344 $B$@$m$&$+!)(B
1330 \begin{codesample4} 1345 \begin{codesample4}
1331 hg email qbase:qtip 1346 hg email qbase:qtip
1332 \end{codesample4} 1347 \end{codesample4}
1333 (Don't know what ``patchbombing'' is? See 1348 % (Don't know what ``patchbombing'' is? See
1334 section~\ref{sec:hgext:patchbomb}.) 1349 % section~\ref{sec:hgext:patchbomb}.)
1335 \item Need to see all of the patches since \texttt{foo.patch} that 1350 (``patchbombing''$B$,2?$+J,$+$i$J$1$l$P(Bsection~\ref{sec:hgext:patchbomb}$B$r(B
1336 have touched files in a subdirectory of your tree? 1351 $B;2>H$N$3$H!%(B)
1352 %\item Need to see all of the patches since \texttt{foo.patch} that
1353 % have touched files in a subdirectory of your tree?
1354 \item \texttt{foo.patch}$B0J9_$N$9$Y$F$N%Q%C%A$r8+$?$$$+!)(B
1355
1356 $B%D%j!<$NCf$N%5%V%D%j!<(B
1357
1337 \begin{codesample4} 1358 \begin{codesample4}
1338 hg log -r foo.patch:qtip \emph{subdir} 1359 hg log -r foo.patch:qtip \emph{subdir}
1339 \end{codesample4} 1360 \end{codesample4}
1340 \end{itemize} 1361 \end{itemize}
1341 1362