Mercurial > hgbook
comparison ja/mq.tex @ 346:0b99bf82b573
more mq.tex
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 01 Aug 2008 12:38:25 +0900 |
parents | 6da6c5741e90 |
children | b3e736000aef |
comparison
equal
deleted
inserted
replaced
345:6da6c5741e90 | 346:0b99bf82b573 |
---|---|
1320 %Referring to a patch by index isn't much different. The first patch | 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 | 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 | 1322 %of those start-at-zero counting systems); the second is patch one; and |
1323 %so on | 1323 %so on |
1324 | 1324 |
1325 $B%$%s%G%C%/%9$,$=$l$[$I0c$o$J$$%Q%C%A$X$N;2>H$O(B | 1325 $B%$%s%G%C%/%9$,$"$^$j0c$o$J$$%Q%C%A$N;2>H!%(B\hgxcmd{mq}{qseries}$B$G:G=i$KI=(B |
1326 | 1326 $B<($5$l$k%Q%C%A$O%Q%C%A(B0($B$3$l$b(B0$B$+$i?t$(;O$a$k(B)$B$G!$(B2$BHVL\$O%Q%C%A(B1$B$N$h$&$K(B |
1327 MQ also makes it easy to work with patches when you are using normal | 1327 $BB3$/!%(B |
1328 Mercurial commands. Every command that accepts a changeset ID will | 1328 |
1329 also accept the name of an applied patch. MQ augments the tags | 1329 %MQ also makes it easy to work with patches when you are using normal |
1330 normally in the repository with an eponymous one for each applied | 1330 %Mercurial commands. Every command that accepts a changeset ID will |
1331 patch. In addition, the special tags \index{tags!special tag | 1331 %also accept the name of an applied patch. MQ augments the tags |
1332 names!\texttt{qbase}}\texttt{qbase} and \index{tags!special tag | 1332 %normally in the repository with an eponymous one for each applied |
1333 names!\texttt{qtip}}\texttt{qtip} identify the ``bottom-most'' and | 1333 %patch. In addition, the special tags \index{tags!special tag |
1334 topmost applied patches, respectively. | 1334 % names!\texttt{qbase}}\texttt{qbase} and \index{tags!special tag |
1335 % names!\texttt{qtip}}\texttt{qtip} identify the ``bottom-most'' and | |
1336 %topmost applied patches, respectively. | |
1337 | |
1338 MQ$B$O!$DL>o$N(BMercurial$B%3%^%s%I$r;H$&;~$N$b4JC1$K$7$F$$$k!%A4$F$N%3%^%s%I$O(B | |
1339 $B%A%'%s%8%;%C%H(BID$B$HE,MQ$5$l$?%Q%C%A$NHV9f$r<u$1IU$1$k!%(BMQ$B$O!$%j%]%8%H%j$K(B | |
1340 $BE,MQ$5$l$?%Q%C%A$NL>A0$N$D$$$?%?%0$r<u$1IU$1$k!%$5$i$K!$:G2<0L$NE,MQ$5$l(B | |
1341 $B$?%Q%C%A$rI=$9FCJL$J%?%0(B\index{tags!special tag | |
1342 names!\texttt{qbase}}\texttt{qbase}$B$H!$:G>e0L$rI=$9FCJL$J%?%0(B | |
1343 \index{tags!special tag names!\texttt{qtip}}\texttt{qtip}$B$b<u$1IU$1$k!%(B | |
1335 | 1344 |
1336 %These additions to Mercurial's normal tagging capabilities make | 1345 %These additions to Mercurial's normal tagging capabilities make |
1337 %dealing with patches even more of a breeze. | 1346 %dealing with patches even more of a breeze. |
1347 | |
1338 Mercurial$B$NDL>o$N%?%05!G=$X$N$3$l$i$NDI2C$O!$%Q%C%A$N<h$j07$$$K$*$$$FBg$-(B | 1348 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 | 1349 $B$J0UL#$r;}$D!%(B |
1350 | |
1340 \begin{itemize} | 1351 \begin{itemize} |
1341 %\item Want to patchbomb a mailing list with your latest series of | 1352 %\item Want to patchbomb a mailing list with your latest series of |
1342 % changes? | 1353 % 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 | 1354 \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 | 1355 $B$@$m$&$+!)(B |
1349 % section~\ref{sec:hgext:patchbomb}.) | 1360 % section~\ref{sec:hgext:patchbomb}.) |
1350 (``patchbombing''$B$,2?$+J,$+$i$J$1$l$P(Bsection~\ref{sec:hgext:patchbomb}$B$r(B | 1361 (``patchbombing''$B$,2?$+J,$+$i$J$1$l$P(Bsection~\ref{sec:hgext:patchbomb}$B$r(B |
1351 $B;2>H$N$3$H!%(B) | 1362 $B;2>H$N$3$H!%(B) |
1352 %\item Need to see all of the patches since \texttt{foo.patch} that | 1363 %\item Need to see all of the patches since \texttt{foo.patch} that |
1353 % have touched files in a subdirectory of your tree? | 1364 % 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 | 1365 \item $B%D%j!<Cf$N%5%V%G%#%l%/%H%j$K4^$^$l$k%U%!%$%k$K?($l$?(B |
1355 | 1366 \texttt{foo.patch}$B0J9_$N%Q%C%A$rA4$F8+$?$$$+!)(B |
1356 $B%D%j!<$NCf$N%5%V%D%j!<(B | |
1357 | |
1358 \begin{codesample4} | 1367 \begin{codesample4} |
1359 hg log -r foo.patch:qtip \emph{subdir} | 1368 hg log -r foo.patch:qtip \emph{subdir} |
1360 \end{codesample4} | 1369 \end{codesample4} |
1361 \end{itemize} | 1370 \end{itemize} |
1362 | 1371 |
1363 Because MQ makes the names of patches available to the rest of | 1372 %Because MQ makes the names of patches available to the rest of |
1364 Mercurial through its normal internal tag machinery, you don't need to | 1373 %Mercurial through its normal internal tag machinery, you don't need to |
1365 type in the entire name of a patch when you want to identify it by | 1374 %type in the entire name of a patch when you want to identify it by |
1366 name. | 1375 %name. |
1376 | |
1377 MQ$B$G$N%Q%C%A$NL>>N$O!$FbIt$N%?%05!9=$rMQ$$$F$$$k$?$a!$(BMercurial$B$NB>$NItJ,(B | |
1378 $B$G$bMxMQ2DG=$G$"$k!%L>>N$r;XDj$9$k;~!$L>>NA4$F$rF~NO$9$kI,MW$O$J$$!%(B | |
1367 | 1379 |
1368 \begin{figure}[ht] | 1380 \begin{figure}[ht] |
1369 \interaction{mq.id.output} | 1381 \interaction{mq.id.output} |
1370 \caption{Using MQ's tag features to work with patches} | 1382 % \caption{Using MQ's tag features to work with patches} |
1383 \caption{$B%Q%C%A$r07$&$?$a(BMQ$B$N%?%05!G=$rMxMQ$9$k(B} | |
1371 \label{ex:mq:id} | 1384 \label{ex:mq:id} |
1372 \end{figure} | 1385 \end{figure} |
1373 | 1386 |
1374 Another nice consequence of representing patch names as tags is that | 1387 %Another nice consequence of representing patch names as tags is that |
1375 when you run the \hgcmd{log} command, it will display a patch's name | 1388 %when you run the \hgcmd{log} command, it will display a patch's name |
1376 as a tag, simply as part of its normal output. This makes it easy to | 1389 %as a tag, simply as part of its normal output. This makes it easy to |
1377 visually distinguish applied patches from underlying ``normal'' | 1390 %visually distinguish applied patches from underlying ``normal'' |
1378 revisions. Figure~\ref{ex:mq:id} shows a few normal Mercurial | 1391 %revisions. Figure~\ref{ex:mq:id} shows a few normal Mercurial |
1379 commands in use with applied patches. | 1392 %commands in use with applied patches. |
1393 | |
1394 $B%Q%C%AL>$r%?%0$H$7$F<h$j07$&$3$H$N$b$&0l$D$NMxE@$O!$(B\hgcmd{log}$B%3%^%s%I(B | |
1395 $B$r<B9T$7$?;~!$DL>o=PNO$N0lIt$K%Q%C%AL>$r%?%0$H$7$FI=<($9$kE@$G$"$k!%$3$N(B | |
1396 $B$?$a!$E,MQ$7$?%Q%C%A$O2<0L$N(B``$BDL>o$N(B''$B%j%S%8%g%s$H;k3PE*$K6hJL$70W$/$J$k!%(B | |
1397 $B?^(B~\ref{ex:mq:id}$B$K$$$/$D$+$NDL>o$N(BMercurial$B%3%^%s%I$rE,MQ:Q$_%Q%C%A$H6&(B | |
1398 $B$K;HMQ$7$?>l9g$r<($9!%(B | |
1380 | 1399 |
1381 %\section{Useful things to know about} | 1400 %\section{Useful things to know about} |
1382 \section{$BCN$C$F$*$/$Y$-$$$/$D$+$NE@(B} | 1401 \section{$BCN$C$F$*$/$Y$-$$$/$D$+$NE@(B} |
1383 | 1402 |
1384 There are a number of aspects of MQ usage that don't fit tidily into | 1403 %There are a number of aspects of MQ usage that don't fit tidily into |
1385 sections of their own, but that are good to know. Here they are, in | 1404 %sections of their own, but that are good to know. Here they are, in |
1386 one place. | 1405 %one place. |
1406 | |
1407 MQ$B$N;HMQK!$K$O8DJL$K<h$j>e$2$k$[$I$G$O$J$$$,!$CN$C$F$*$/$HNI$$$$$/$D$+$N(B | |
1408 $BE@$,$"$k!%$3$3$G$O$=$l$i$r$^$H$a$F<h$j>e$2$k!%(B | |
1387 | 1409 |
1388 \begin{itemize} | 1410 \begin{itemize} |
1389 \item Normally, when you \hgxcmd{mq}{qpop} a patch and \hgxcmd{mq}{qpush} it | 1411 %\item Normally, when you \hgxcmd{mq}{qpop} a patch and \hgxcmd{mq}{qpush} it |
1390 again, the changeset that represents the patch after the pop/push | 1412 % again, the changeset that represents the patch after the pop/push |
1391 will have a \emph{different identity} than the changeset that | 1413 % will have a \emph{different identity} than the changeset that |
1392 represented the hash beforehand. See | 1414 % represented the hash beforehand. See |
1393 section~\ref{sec:mqref:cmd:qpush} for information as to why this is. | 1415 % section~\ref{sec:mqref:cmd:qpush} for information as to why this is. |
1394 \item It's not a good idea to \hgcmd{merge} changes from another | 1416 \item $B%Q%C%A$r(B\hgxcmd{mq}{qpop}$B$7$?8e$G:F$S(B\hgxcmd{mq}{qpush}$B$9$k(B |
1395 branch with a patch changeset, at least if you want to maintain the | 1417 $B$H!$(Bpop/push$B$7$?8e$N%A%'%s%8%;%C%H$O!$0JA0$N%A%'%s%8%;%C%H$H0[$J$k(B |
1396 ``patchiness'' of that changeset and changesets below it on the | 1418 $B%"%$%G%s%F%#%F%#$r;}$A!$%O%C%7%eCM$,0[$J$k!%$3$NM}M3$K$D$$$F$O%;%/(B |
1397 patch stack. If you try to do this, it will appear to succeed, but | 1419 $B%7%g%s(B~\ref{sec:mqref:cmd:qpush}$B$r;2>H$5$l$?$$!%(B |
1398 MQ will become confused. | 1420 %\item It's not a good idea to \hgcmd{merge} changes from another |
1421 % branch with a patch changeset, at least if you want to maintain the | |
1422 % ``patchiness'' of that changeset and changesets below it on the | |
1423 % patch stack. If you try to do this, it will appear to succeed, but | |
1424 % MQ will become confused. | |
1425 \item \hgcmd{merge}$B$,B>$N%V%i%s%A$N%Q%C%A%A%'%s%8%;%C%H$r%^!<%8$9$k$3$H(B | |
1426 $B$O!$$=$N%A%'%s%8%;%C%H$H%Q%C%A%9%?%C%/$K@Q$_9~$^$l$?B>$N%A%'%s%8%;%C(B | |
1427 $B%H$H$N4V$G0l4S@-$r0];}$7$h$&$H$9$k$N$G$"$l$PHr$1$k$Y$-$G$"$k!%$3$l(B | |
1428 $B$r;n$_$?>l9g!$0l8+@.8y$7$?$h$&$K8+$($F$b(BMQ$B$O:.Mp>uBV$K4Y$C$F$7$^(B | |
1429 $B$&!%(B | |
1399 \end{itemize} | 1430 \end{itemize} |
1400 | 1431 |
1401 %\section{Managing patches in a repository} | 1432 %\section{Managing patches in a repository} |
1402 \section{$B%j%]%8%H%jFb$G$N%Q%C%A$N4IM}(B} | 1433 \section{$B%j%]%8%H%jFb$G$N%Q%C%A$N4IM}(B} |
1403 \label{sec:mq:repo} | 1434 \label{sec:mq:repo} |
1404 | 1435 |
1405 Because MQ's \sdirname{.hg/patches} directory resides outside a | 1436 %Because MQ's \sdirname{.hg/patches} directory resides outside a |
1406 Mercurial repository's working directory, the ``underlying'' Mercurial | 1437 %Mercurial repository's working directory, the ``underlying'' Mercurial |
1407 repository knows nothing about the management or presence of patches. | 1438 %repository knows nothing about the management or presence of patches. |
1408 | 1439 |
1409 This presents the interesting possibility of managing the contents of | 1440 MQ$B$N(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$O(BMercurial$B%j%]%8%H%j$N%o!<%-%s%0(B |
1410 the patch directory as a Mercurial repository in its own right. This | 1441 $B%G%#%l%/%H%j$N30$K$"$k$N$G!$(B``$B2<0L$N(B''Mercurial$B%j%]%8%H%j$O%Q%C%A$N4IM}(B |
1411 can be a useful way to work. For example, you can work on a patch for | 1442 $B$d!$$=$NB;0&;yBP$K$D$$$F2?$bCN$i$J$$!%(B |
1412 a while, \hgxcmd{mq}{qrefresh} it, then \hgcmd{commit} the current state of | 1443 |
1413 the patch. This lets you ``roll back'' to that version of the patch | 1444 %This presents the interesting possibility of managing the contents of |
1414 later on. | 1445 %the patch directory as a Mercurial repository in its own right. This |
1415 | 1446 %can be a useful way to work. For example, you can work on a patch for |
1416 You can then share different versions of the same patch stack among | 1447 %a while, \hgxcmd{mq}{qrefresh} it, then \hgcmd{commit} the current state of |
1417 multiple underlying repositories. I use this when I am developing a | 1448 %the patch. This lets you ``roll back'' to that version of the patch |
1418 Linux kernel feature. I have a pristine copy of my kernel sources for | 1449 %later on. |
1419 each of several CPU architectures, and a cloned repository under each | 1450 |
1420 that contains the patches I am working on. When I want to test a | 1451 $B$3$N$3$H$+$i!$%Q%C%A%G%#%l%/%H%j$N4IM}$rFHN)$7$?(BMercurial$B%j%]%8%H%j$H$7$F(B |
1421 change on a different architecture, I push my current patches to the | 1452 $B9T$&$3$H$,$G$-$k$N$G$O$J$$$+$H$$$&6=L#$,@8$^$l$k!%<B:]$3$NJ}K!$OM-8z$JJ}(B |
1422 patch repository associated with that kernel tree, pop and push all of | 1453 $BK!$H$J$jF@$k!%Nc$($P!$$7$P$i$/$N4V(B1$B$D$N%Q%C%A$K$D$$$F:n6H$r9T$C$?8e(B |
1423 my patches, and build and test that kernel. | 1454 $B$G!$(B\hgxcmd{mq}{qrefresh}$B$r9T$$!$%Q%C%A$N8=:_$N>uBV$r(B\hgcmd{commit}$B$9$k(B |
1424 | 1455 $B$3$H$,$G$-$k!%$3$l$K$h$C$F!$8e$G$3$N%Q%C%A$r(B``$B%m!<%k%P%C%/(B''$B$9$k$3$H$,2D(B |
1425 Managing patches in a repository makes it possible for multiple | 1456 $BG=$H$J$k!%(B |
1426 developers to work on the same patch series without colliding with | 1457 |
1427 each other, all on top of an underlying source base that they may or | 1458 %You can then share different versions of the same patch stack among |
1428 may not control. | 1459 %multiple underlying repositories. I use this when I am developing a |
1460 %Linux kernel feature. I have a pristine copy of my kernel sources for | |
1461 %each of several CPU architectures, and a cloned repository under each | |
1462 %that contains the patches I am working on. When I want to test a | |
1463 %change on a different architecture, I push my current patches to the | |
1464 %patch repository associated with that kernel tree, pop and push all of | |
1465 %my patches, and build and test that kernel. | |
1466 | |
1467 $BJ#?t$N2<0L%j%]%8%H%j$N4V$G!$F1$8%Q%C%A%9%?%C%/$N0[$J$k%P!<%8%g%s$r6&M-$9(B | |
1468 $B$k$3$H$,$G$-$k!%I.<T$O$3$l$r(BLinux$B%+!<%M%k$N5!G=$r3+H/$9$k;~$KMxMQ$7$F$$(B | |
1469 $B$k!%$$$/$D$+$N(BCPU$B%"!<%-%F%/%A%c$N3F!9$KBP$7$F$^$C$5$i$J%+!<%M%k%=!<%9$N%j(B | |
1470 $B%]%8%H%j$rMQ0U$7!$:n6HCf$N%Q%C%A$r4^$`%j%]%8%H%j$r$=$l$i$N4V$G%/%m!<%s$7(B | |
1471 $B$F$$$k!%JQ99$r0[$J$k%"!<%-%F%/%A%c$G%F%9%H$7$?$$;~$O!$8=:_$N%Q%C%A$r$=$N(B | |
1472 $B%"!<%-%F%/%A%cMQ$N%+!<%M%k%D%j!<$H7k$SIU$$$?%Q%C%A$N%j%]%8%H%j$X%W%C%7%e(B | |
1473 $B$7!$$9$Y$F$N%Q%C%A$r(Bpop$B!$(Bpush$B$7$F%+!<%M%k$N%S%k%I$H%F%9%H$r9T$C$F$$$k!%(B | |
1474 | |
1475 %Managing patches in a repository makes it possible for multiple | |
1476 %developers to work on the same patch series without colliding with | |
1477 %each other, all on top of an underlying source base that they may or | |
1478 %may not control. | |
1479 | |
1480 $B%j%]%8%H%jFb$G%Q%C%A$r4IM}$9$k$H!$J#?t$N3+H/<T$,F1$8%Q%C%A%7%j!<%:$N>e$G(B | |
1481 $B>WFM$9$k$3$H$J$/:n6H$G$-$k$h$&$K$J$k!%$3$l$OH`$i$,2<0L$N%=!<%9%Y!<%9$r%3(B | |
1482 $B%s%H%m!<%k$G$-$k$+H]$+$K4X$o$j$,$J$$!%(B | |
1429 | 1483 |
1430 %\subsection{MQ support for patch repositories} | 1484 %\subsection{MQ support for patch repositories} |
1431 \subsection{MQ$B$K$h$k%Q%C%A%j%]%8%H%j%5%]!<%H(B} | 1485 \subsection{MQ$B$K$h$k%Q%C%A%j%]%8%H%j%5%]!<%H(B} |
1432 | 1486 |
1433 MQ helps you to work with the \sdirname{.hg/patches} directory as a | 1487 %MQ helps you to work with the \sdirname{.hg/patches} directory as a |
1434 repository; when you prepare a repository for working with patches | 1488 %repository; when you prepare a repository for working with patches |
1435 using \hgxcmd{mq}{qinit}, you can pass the \hgxopt{mq}{qinit}{-c} option to | 1489 %using \hgxcmd{mq}{qinit}, you can pass the \hgxopt{mq}{qinit}{-c} option to |
1436 create the \sdirname{.hg/patches} directory as a Mercurial repository. | 1490 %create the \sdirname{.hg/patches} directory as a Mercurial repository. |
1491 | |
1492 MQ$B$O(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$r%j%]%8%H%j$H$7$F;H$$$J$,$i:n6H$9(B | |
1493 $B$k$3$H$r%5%]!<%H$7$F$$$k!%%Q%C%A$r07$&:n6HMQ$N%j%]%8%H%j$r(B | |
1494 \hgxcmd{mq}{qinit}$B$G:n@.$9$k;~!$(B\hgxopt{mq}{qinit}{-c}$B$rEO$7$F(B | |
1495 \sdirname{.hg/patches}$B%G%#%l%/%H%j$r(BMercurial$B%j%]%8%H%j$K$9$k$3$H$,$G$-$k!%(B | |
1437 | 1496 |
1438 \begin{note} | 1497 \begin{note} |
1439 If you forget to use the \hgxopt{mq}{qinit}{-c} option, you can simply go | 1498 % If you forget to use the \hgxopt{mq}{qinit}{-c} option, you can simply go |
1440 into the \sdirname{.hg/patches} directory at any time and run | 1499 % into the \sdirname{.hg/patches} directory at any time and run |
1441 \hgcmd{init}. Don't forget to add an entry for the | 1500 % \hgcmd{init}. Don't forget to add an entry for the |
1442 \sfilename{status} file to the \sfilename{.hgignore} file, though | 1501 % \sfilename{status} file to the \sfilename{.hgignore} file, though |
1443 | 1502 % (\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} does this for you |
1444 (\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} does this for you | 1503 % automatically); you \emph{really} don't want to manage the |
1445 automatically); you \emph{really} don't want to manage the | 1504 % \sfilename{status} file. |
1446 \sfilename{status} file. | 1505 |
1506 \hgxopt{mq}{qinit}{-c}$B%*%W%7%g%s$rK:$l$?>l9g$O$$$D$G$b(B | |
1507 \sdirname{.hg/patches}$B$KF~$C$F(B\hgcmd{init}$B$r<B9T$9$l$P$h(B | |
1508 $B$$!%(B\sfilename{status}$B%U%!%$%k$r(B\sfilename{.hgignore}$B%U%!%$%k$KDI2C$9$k(B | |
1509 $B$N$rK:$l$J$$$3$H!%(B(\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}}$B$O$3$l$r<+F0(B | |
1510 $BE*$K9T$&!%!K(B\sfilename{status}$B$r%P!<%8%g%s4IM}$9$kI,MW$O(B\emph{$BA4$/$J$$(B}$B!%(B | |
1447 \end{note} | 1511 \end{note} |
1448 | 1512 |
1449 As a convenience, if MQ notices that the \dirname{.hg/patches} | 1513 %As a convenience, if MQ notices that the \dirname{.hg/patches} |
1450 directory is a repository, it will automatically \hgcmd{add} every | 1514 %directory is a repository, it will automatically \hgcmd{add} every |
1451 patch that you create and import. | 1515 %patch that you create and import. |
1452 | 1516 |
1453 MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs | 1517 \dirname{.hg/patches}$B$,%j%]%8%H%j$N;~$O!$(BMQ$B$OJXMx$N$?$a$K$3$l$^$G:n@.$7!$(B |
1454 \hgcmd{commit} in the \sdirname{.hg/patches} directory. This saves | 1518 $B%$%s%]!<%H$7$?$9$Y$F$N%Q%C%A$r<+F0E*$K(B\hgcmd{add}$B$9$k!%(B |
1455 some bothersome typing. | 1519 |
1456 | 1520 %MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs |
1457 Finally, as a convenience to manage the patch directory, you can | 1521 %\hgcmd{commit} in the \sdirname{.hg/patches} directory. This saves |
1458 define the alias \command{mq} on Unix systems. For example, on Linux | 1522 %some bothersome typing. |
1459 systems using the \command{bash} shell, you can include the following | 1523 |
1460 snippet in your \tildefile{.bashrc}. | 1524 MQ$B$O%7%g!<%H%+%C%H%3%^%s%I(B\hgxcmd{mq}{qcommit}$B$r;}$D!%$3$N%3%^%s%I$O(B |
1525 \hgcmd{commit}$B%3%^%s%I$r(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$NCf$G<B9T$9(B | |
1526 $B$k!%$3$l$K$h$C$FHK;($JF~NO$r>J$/$3$H$,$G$-$k!%(B | |
1527 | |
1528 %Finally, as a convenience to manage the patch directory, you can | |
1529 %define the alias \command{mq} on Unix systems. For example, on Linux | |
1530 %systems using the \command{bash} shell, you can include the following | |
1531 %snippet in your \tildefile{.bashrc}. | |
1532 | |
1533 $B%Q%C%A%G%#%l%/%H%j$N4IM}$N$?$a$K(BUNIX$B4D6-$J$i(B\command{mq}$B$H$$$&%(%$%j%"%9(B | |
1534 $B$r:n$C$F$*$/$HJXMx$@!%(BLinux$B$G$O(B\command{bash}$B%7%'%k$N@_Dj%U%!%$%k(B | |
1535 \tildefile{.bashrc}$B$K$3$l$rDj5A$7$F$*$/!%(B | |
1461 | 1536 |
1462 \begin{codesample2} | 1537 \begin{codesample2} |
1463 alias mq=`hg -R \$(hg root)/.hg/patches' | 1538 alias mq=`hg -R \$(hg root)/.hg/patches' |
1464 \end{codesample2} | 1539 \end{codesample2} |
1465 | 1540 |
1466 You can then issue commands of the form \cmdargs{mq}{pull} from | 1541 %You can then issue commands of the form \cmdargs{mq}{pull} from |
1467 the main repository. | 1542 %the main repository. |
1543 | |
1544 $B%a%$%s%j%]%8%H%j$+$i(B\cmdargs{mq}{pull}$B$r<B9T$9$k$3$H$,$G$-$k(B | |
1468 | 1545 |
1469 %\subsection{A few things to watch out for} | 1546 %\subsection{A few things to watch out for} |
1470 \subsection{$BCm0U$7$F$*$/$Y$-$$$/$D$+$NE@(B} | 1547 \subsection{$BCm0U$7$F$*$/$Y$-$$$/$D$+$NE@(B} |
1471 | 1548 |
1472 MQ's support for working with a repository full of patches is limited | 1549 %MQ's support for working with a repository full of patches is limited |
1473 in a few small respects. | 1550 %in a few small respects. |
1474 | 1551 |
1475 MQ cannot automatically detect changes that you make to the patch | 1552 MQ$B$,BgNL$N%Q%C%A$N$"$k%j%]%8%H%j$r07$&:]$K!$$$$/$D$+$N>.$5$JE@$+$i@)8B$,(B |
1476 directory. If you \hgcmd{pull}, manually edit, or \hgcmd{update} | 1553 $B$"$k!%(B |
1477 changes to patches or the \sfilename{series} file, you will have to | 1554 |
1478 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} and then | 1555 %MQ cannot automatically detect changes that you make to the patch |
1479 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} in the underlying repository to | 1556 %directory. If you \hgcmd{pull}, manually edit, or \hgcmd{update} |
1480 see those changes show up there. If you forget to do this, you can | 1557 %changes to patches or the \sfilename{series} file, you will have to |
1481 confuse MQ's idea of which patches are applied. | 1558 %\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} and then |
1559 %\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} in the underlying repository to | |
1560 %see those changes show up there. If you forget to do this, you can | |
1561 %confuse MQ's idea of which patches are applied. | |
1562 | |
1563 MQ$B$O!$%Q%C%A%G%#%l%/%H%j$KBP$7$F9T$o$l$?JQ99$r<+F0E*$K8!=P$9$k$3$H$O$G$-(B | |
1564 $B$J$$!%%Q%C%A%U%!%$%k$d(B\sfilename{series}$B$KBP$7$F(B\hgcmd{pull}$B$r9T$C$?$j!$(B | |
1565 $B<j$GJT=8$7$?$j!$(B\hgcmd{update}$B$r9T$C$?>l9g(B | |
1566 $B$O!$2<0L$N%j%]%8%H%j$KBP$7$F(B\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}}$B$H(B | |
1567 \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}}$B$r9T$$!$JQ99$rCN$i$;$kI,MW$,$"(B | |
1568 $B$k!%$3$l$rK:$l$k$H(BMQ$B$O$I$N%Q%C%A$,E,MQ$5$l$?$N$+GD0.$G$-$J$/$J$C$F$7$^$&!%(B | |
1569 | |
1482 | 1570 |
1483 %\section{Third party tools for working with patches} | 1571 %\section{Third party tools for working with patches} |
1484 \section{$B%Q%C%A8~$1%5!<%I%Q!<%F%#%D!<%k(B} | 1572 \section{$B%Q%C%A8~$1%5!<%I%Q!<%F%#%D!<%k(B} |
1485 \label{sec:mq:tools} | 1573 \label{sec:mq:tools} |
1486 | 1574 |
1487 Once you've been working with patches for a while, you'll find | 1575 %Once you've been working with patches for a while, you'll find |
1488 yourself hungry for tools that will help you to understand and | 1576 %yourself hungry for tools that will help you to understand and |
1489 manipulate the patches you're dealing with. | 1577 %manipulate the patches you're dealing with. |
1490 | 1578 |
1491 The \command{diffstat} command~\cite{web:diffstat} generates a | 1579 $B$7$P$i$/%Q%C%A$r;H$C$?:n6H$r$7$F$$$k$H!$%Q%C%A$r<h$j07$&=u$1$H$J$k$h$&$J(B |
1492 histogram of the modifications made to each file in a patch. It | 1580 $B%D!<%k$,M_$7$/$J$k$K0c$$$J$$!%(B |
1493 provides a good way to ``get a sense of'' a patch---which files it | 1581 |
1494 affects, and how much change it introduces to each file and as a | 1582 %The \command{diffstat} command~\cite{web:diffstat} generates a |
1495 whole. (I find that it's a good idea to use \command{diffstat}'s | 1583 %histogram of the modifications made to each file in a patch. It |
1496 \cmdopt{diffstat}{-p} option as a matter of course, as otherwise it | 1584 %provides a good way to ``get a sense of'' a patch---which files it |
1497 will try to do clever things with prefixes of file names that | 1585 %affects, and how much change it introduces to each file and as a |
1498 inevitably confuse at least me.) | 1586 |
1587 %whole. (I find that it's a good idea to use \command{diffstat}'s | |
1588 %\cmdopt{diffstat}{-p} option as a matter of course, as otherwise it | |
1589 %will try to do clever things with prefixes of file names that | |
1590 %inevitably confuse at least me.) | |
1591 | |
1592 \command{diffstat}$B%3%^%s%I(B~\cite{web:diffstat}$B$O%Q%C%AFb$N$=$l$>$l$N%U%!(B | |
1593 $B%$%k$X$NJQ99$N%R%9%H%0%i%`$r@8@.$9$k!%(B | |
1594 | |
1595 $B$3$l$O!$%Q%C%A$,1F6A$r5Z$\$9%U%!%$%k$rGD0.$7$?$j!$A4BN$G$=$l$>$l$N%U%!%$(B | |
1596 $B%k$X$I$NDxEYJQ99$r2C$($k$N$+GD0.$9$k$N$KLrN)$D!%(B | |
1597 (\command{diffstat}$B%3%^%s%I$N(B\cmdopt{diffstat}{-p}$B%*%W%7%g%s$,(B | |
1598 | |
1599 | |
1600 ) | |
1601 | |
1499 | 1602 |
1500 \begin{figure}[ht] | 1603 \begin{figure}[ht] |
1501 \interaction{mq.tools.tools} | 1604 \interaction{mq.tools.tools} |
1502 \caption{The \command{diffstat}, \command{filterdiff}, and \command{lsdiff} commands} | 1605 \caption{The \command{diffstat}, \command{filterdiff}, and \command{lsdiff} commands} |
1503 \label{ex:mq:tools} | 1606 \label{ex:mq:tools} |
1548 \section{MQ$B%/%C%/%V%C%/(B} | 1651 \section{MQ$B%/%C%/%V%C%/(B} |
1549 | 1652 |
1550 %\subsection{Manage ``trivial'' patches} | 1653 %\subsection{Manage ``trivial'' patches} |
1551 \subsection{``$B%H%j%S%"%k(B''$B$J%Q%C%A$N4IM}(B} | 1654 \subsection{``$B%H%j%S%"%k(B''$B$J%Q%C%A$N4IM}(B} |
1552 | 1655 |
1553 Because the overhead of dropping files into a new Mercurial repository | 1656 %Because the overhead of dropping files into a new Mercurial repository |
1554 is so low, it makes a lot of sense to manage patches this way even if | 1657 %is so low, it makes a lot of sense to manage patches this way even if |
1555 you simply want to make a few changes to a source tarball that you | 1658 %you simply want to make a few changes to a source tarball that you |
1556 downloaded. | 1659 %downloaded. |
1557 | 1660 |
1558 Begin by downloading and unpacking the source tarball, | 1661 $B%U%!%$%k$r(BMercurial$B%j%]%8%H%j$KDI2C$9$k%*!<%P%X%C%I$O>.$5$$!%$3$N$?$a!$$?(B |
1559 and turning it into a Mercurial repository. | 1662 $B$H$(%=!<%9$N(Btar$B%"!<%+%$%V$X>/?t$NJQ99$r2C$($k$@$1$@$H$7$F$b!$%Q%C%A$r%j%](B |
1663 $B%8%H%j$G4IM}$9$k$N$ONI$$J}K!$G$"$k!%(B | |
1664 | |
1665 %Begin by downloading and unpacking the source tarball, | |
1666 %and turning it into a Mercurial repository. | |
1667 %\interaction{mq.tarball.download} | |
1668 | |
1669 $B%=!<%9(Btarball$B$r%@%&%s%m!<%I$7$FE83+$7!$$3$l$r(BMercurial$B%j%]%8%H%j$KJQ49$9(B | |
1670 $B$k!%(B | |
1560 \interaction{mq.tarball.download} | 1671 \interaction{mq.tarball.download} |
1561 | 1672 |
1562 Continue by creating a patch stack and making your changes. | 1673 %Continue by creating a patch stack and making your changes. |
1674 %\interaction{mq.tarball.qinit} | |
1675 | |
1676 $B%Q%C%A%9%?%C%/$r:n$jJQ99$r9T$&!%(B | |
1563 \interaction{mq.tarball.qinit} | 1677 \interaction{mq.tarball.qinit} |
1564 | 1678 |
1565 Let's say a few weeks or months pass, and your package author releases | 1679 %Let's say a few weeks or months pass, and your package author releases |
1566 a new version. First, bring their changes into the repository. | 1680 %a new version. First, bring their changes into the repository. |
1681 %\interaction{mq.tarball.newsource} | |
1682 %The pipeline starting with \hgcmd{locate} above deletes all files in | |
1683 %the working directory, so that \hgcmd{commit}'s | |
1684 %\hgopt{commit}{--addremove} option can actually tell which files have | |
1685 %really been removed in the newer version of the source. | |
1686 | |
1687 $B?t=54V$+$i?t%+7n7P$C$?;~!$%Q%C%1!<%8$N:n<T$,?7$7$$%P!<%8%g%s$r%j%j!<%9$7(B | |
1688 $B$?$H$7$h$&!%$=$N>l9g!$$^$:?7$7$$%P!<%8%g%s$H$N:9J,$r%j%]%8%H%j$K<h$j9~$`!%(B | |
1567 \interaction{mq.tarball.newsource} | 1689 \interaction{mq.tarball.newsource} |
1568 The pipeline starting with \hgcmd{locate} above deletes all files in | 1690 \hgcmd{locate}$B$N=PNO$r%Q%$%W$G7R$$$G%o!<%-%s%0%G%#%l%/%H%j$N$9$Y$F$N%U%!(B |
1569 the working directory, so that \hgcmd{commit}'s | 1691 $B%$%k$r>C5n$7!$(B\hgcmd{commit}$B%3%^%s%I$N(B\hgopt{commit}{--addremove}$B%*%W%7%g(B |
1570 \hgopt{commit}{--addremove} option can actually tell which files have | 1692 $B%s$r;H$C$F<B:]$K$I$N%U%!%$%k$,?7$7$$%P!<%8%g%s$N%=!<%9$G:o=|$5$l$?$N$+;X(B |
1571 really been removed in the newer version of the source. | 1693 $BDj$9$k!%(B |
1572 | 1694 |
1573 Finally, you can apply your patches on top of the new tree. | 1695 %Finally, you can apply your patches on top of the new tree. |
1696 %\interaction{mq.tarball.repush} | |
1697 | |
1698 $B:G8e$K%Q%C%A$r?7$7$$%D%j!<$KE,MQ$9$k!%(B | |
1574 \interaction{mq.tarball.repush} | 1699 \interaction{mq.tarball.repush} |
1575 | 1700 |
1576 %\subsection{Combining entire patches} | 1701 %\subsection{Combining entire patches} |
1577 \subsection{$B%Q%C%AF1;N$r7k9g$9$k(B} | 1702 \subsection{$B%Q%C%AF1;N$r7k9g$9$k(B} |
1578 \label{sec:mq:combine} | 1703 \label{sec:mq:combine} |
1579 | 1704 |
1580 MQ provides a command, \hgxcmd{mq}{qfold} that lets you combine entire | 1705 %MQ provides a command, \hgxcmd{mq}{qfold} that lets you combine entire |
1581 patches. This ``folds'' the patches you name, in the order you name | 1706 %patches. This ``folds'' the patches you name, in the order you name |
1582 them, into the topmost applied patch, and concatenates their | 1707 %them, into the topmost applied patch, and concatenates their |
1583 descriptions onto the end of its description. The patches that you | 1708 %descriptions onto the end of its description. The patches that you |
1584 fold must be unapplied before you fold them. | 1709 %fold must be unapplied before you fold them. |
1585 | 1710 |
1586 The order in which you fold patches matters. If your topmost applied | 1711 MQ$B$K$O%Q%C%AA4BN$r7k9g$9$k(B\hgxcmd{mq}{qfold}$B$H$$$&%3%^%s%I$,$"$k!%$3$N%3(B |
1587 patch is \texttt{foo}, and you \hgxcmd{mq}{qfold} \texttt{bar} and | 1712 $B%^%s%I$OL>A0$r$D$1$?%Q%C%A$rL>IU$1$?=gHV$G:F>e0L$NE,MQ:Q$_%Q%C%A$K>v$_9~(B |
1588 \texttt{quux} into it, you will end up with a patch that has the same | 1713 $B$`!%3F!9$N%Q%C%A$N@bL@$O7k9g$5$l$F%Q%C%A$N@bL@$NKvHx$KDI2C$5$l$k!%>v$_9~(B |
1589 effect as if you applied first \texttt{foo}, then \texttt{bar}, | 1714 $B$`%Q%C%A$O$9$G$KE,MQ$5$l$F$$$F$O$J$i$J$$!%(B |
1590 followed by \texttt{quux}. | 1715 |
1716 %The order in which you fold patches matters. If your topmost applied | |
1717 %patch is \texttt{foo}, and you \hgxcmd{mq}{qfold} \texttt{bar} and | |
1718 %\texttt{quux} into it, you will end up with a patch that has the same | |
1719 %effect as if you applied first \texttt{foo}, then \texttt{bar}, | |
1720 %followed by \texttt{quux}. | |
1721 | |
1722 $B%Q%C%A$r>v$_9~$`=gHV$O=EMW$G$"$k!%:#!$:F>e0L$NE,MQ:Q$_%Q%C%A$,(B | |
1723 \texttt{foo}$B$@$H$7$F!$(B\hgxcmd{mq}{qfold} \texttt{bar}$B$H(B\texttt{quux}$B$r9T(B | |
1724 $B$&$H!$%Q%C%A$O(B\texttt{foo}, then \texttt{bar}, \texttt{quux}$B$N=gHV$G%Q%C(B | |
1725 $B%A$rE,MQ$7$?$N$HF1$88z2L$r;}$D$3$H$K$J$k!%(B | |
1591 | 1726 |
1592 %\subsection{Merging part of one patch into another} | 1727 %\subsection{Merging part of one patch into another} |
1593 \subsection{$B%Q%C%A$N0lItJ,$rJL$N%Q%C%A$X%^!<%8$9$k(B} | 1728 \subsection{$B%Q%C%A$N0lItJ,$rJL$N%Q%C%A$X%^!<%8$9$k(B} |
1594 | 1729 |
1595 %Merging \emph{part} of one patch into another is more difficult than | 1730 %Merging \emph{part} of one patch into another is more difficult than |
1596 %combining entire patches. | 1731 %combining entire patches. |
1597 | 1732 |
1598 $B%Q%C%A$N(B\emph{$B0lIt(B}$B$rJL$N%Q%C%A$X%^!<%8$9$k$3$H$O!$%Q%C%A$r7k9g$9$k$h$j(B | 1733 $B%Q%C%A$N(B\emph{$B0lIt(B}$B$rJL$N%Q%C%A$X%^!<%8$9$k$3$H$O!$%Q%C%A$r7k9g$9$k$h$j$O(B |
1599 $B$OFq$7$$!%(B | 1734 $BFq$7$$!%(B |
1600 | 1735 |
1601 If you want to move changes to entire files, you can use | 1736 %If you want to move changes to entire files, you can use |
1602 \command{filterdiff}'s \cmdopt{filterdiff}{-i} and | 1737 %\command{filterdiff}'s \cmdopt{filterdiff}{-i} and |
1603 \cmdopt{filterdiff}{-x} options to choose the modifications to snip | 1738 %\cmdopt{filterdiff}{-x} options to choose the modifications to snip |
1604 out of one patch, concatenating its output onto the end of the patch | 1739 %out of one patch, concatenating its output onto the end of the patch |
1605 you want to merge into. You usually won't need to modify the patch | 1740 %you want to merge into.You usually won't need to modify the patch |
1606 you've merged the changes from. Instead, MQ will report some rejected | 1741 %you've merged the changes from. Instead, MQ will report some rejected |
1607 hunks when you \hgxcmd{mq}{qpush} it (from the hunks you moved into the | 1742 %hunks when you \hgxcmd{mq}{qpush} it (from the hunks you moved into the |
1608 other patch), and you can simply \hgxcmd{mq}{qrefresh} the patch to drop | 1743 %other patch), and you can simply \hgxcmd{mq}{qrefresh} the patch to drop |
1609 the duplicate hunks. | 1744 %the duplicate hunks. |
1610 | 1745 |
1611 | 1746 $BJQ99$r%U%!%$%k$N=89gA4BN$K0\F0$9$k>l9g!$(B\command{filterdiff}$B$K(B |
1612 | 1747 \cmdopt{filterdiff}{-i}$B$H(B\cmdopt{filterdiff}{-x}$B$rIU$1!$(B |
1613 | 1748 $B0l$D$N%Q%C%A$+$i<h$k5n$kJQ99!$%Q%C%A$NKvHx$K7k9g$9$kJQ99$rA*$V!%(B |
1614 If you have a patch that has multiple hunks modifying a file, and you | 1749 $BDL>o$N>l9g!$JQ99$r<h$j=P$7$?%Q%C%A$rJQ99$9$kI,MW$O$J$$!%$=$NBe$o$j!$(BMQ$B$O(B |
1615 only want to move a few of those hunks, the job becomes more messy, | 1750 ($BB>$N%Q%C%A$K0\F0$7$?(Bhunk$B$+$i(B)\hgxcmd{mq}{qpush}$B$7$?;~$K%j%8%'%/%H$5$l$?(B |
1616 but you can still partly automate it. Use \cmdargs{lsdiff}{-nvv} to | 1751 hunk$B$rJs9p$9$k!%(B |
1617 print some metadata about the patch. | 1752 |
1618 \interaction{mq.tools.lsdiff} | 1753 %If you have a patch that has multiple hunks modifying a file, and you |
1619 | 1754 %only want to move a few of those hunks, the job becomes more messy, |
1620 This command prints three different kinds of number: | 1755 %but you can still partly automate it. Use \cmdargs{lsdiff}{-nvv} to |
1756 %print some metadata about the patch. | |
1757 %\interaction{mq.tools.lsdiff} | |
1758 | |
1759 $B%Q%C%A$K0l$D$N%U%!%$%k$rJQ99$9$kJ#?t$N(Bhunk$B$,$"$j!$$=$NCf$N0lIt$r0\F0$7$?(B | |
1760 $B$$>l9g$O!$:n6H$O$b$C$H$d$d$3$7$$$b$N$K$J$k$,!$0MA3$H$7$F0lIt$O<+F02=$9$k(B | |
1761 $B$3$H$,$G$-$k!%(B\cmdargs{lsdiff}{-nvv}$B%3%^%s%I$G%Q%C%A$N%a%?%G!<%?$rI=<($9(B | |
1762 $B$k!%(B\interaction{mq.tools.lsdiff} | |
1763 | |
1764 %This command prints three different kinds of number: | |
1765 $B$3$N%3%^%s%I$O(B3$B$D$N0[$J$kHV9f$r=PNO$9$k(B: | |
1621 \begin{itemize} | 1766 \begin{itemize} |
1622 \item (in the first column) a \emph{file number} to identify each file | 1767 %\item (in the first column) a \emph{file number} to identify each file |
1623 modified in the patch; | 1768 % modified in the patch; |
1624 \item (on the next line, indented) the line number within a modified | 1769 \item ($B:G=i$NNs(B) $B$3$N%Q%C%A$GJQ99$5$l$k%U%!%$%k$r<1JL$9$k$?$a$N(B\emph{$B%U%!(B |
1625 file where a hunk starts; and | 1770 $B%$%kHV9f(B} |
1626 \item (on the same line) a \emph{hunk number} to identify that hunk. | 1771 %\item (on the next line, indented) the line number within a modified |
1772 % file where a hunk starts; and | |
1773 \item ($B<!$N9T$G%$%s%G%s%H$5$l$F$$$k(B) $BJQ99$5$l$?%U%!%$%k$NCf$G(Bhun$B$,;O$^$k(B | |
1774 $B9THV9f(B | |
1775 %\item (on the same line) a \emph{hunk number} to identify that hunk. | |
1776 \item ($B$=$l$HF1$89T(B) $BEv3:(Bhunk$B$r<1JL$9$k(B\emph{hunk$BHV9f(B} | |
1627 \end{itemize} | 1777 \end{itemize} |
1628 | 1778 |
1629 You'll have to use some visual inspection, and reading of the patch, | 1779 %You'll have to use some visual inspection, and reading of the patch, |
1630 to identify the file and hunk numbers you'll want, but you can then | 1780 %to identify the file and hunk numbers you'll want, but you can then |
1631 pass them to to \command{filterdiff}'s \cmdopt{filterdiff}{--files} | 1781 %pass them to to \command{filterdiff}'s \cmdopt{filterdiff}{--files} |
1632 and \cmdopt{filterdiff}{--hunks} options, to select exactly the file | 1782 %and \cmdopt{filterdiff}{--hunks} options, to select exactly the file |
1633 and hunk you want to extract. | 1783 %and hunk you want to extract. |
1634 | 1784 |
1635 Once you have this hunk, you can concatenate it onto the end of your | 1785 $BI,MW$J%U%!%$%k$H(Bhunk$BHV9f$r8+$D$1$k$?$a$K!$%Q%C%A$rFI$`$J$I$7$FL\;k$G3NG'(B |
1636 destination patch and continue with the remainder of | 1786 $B$9$kI,MW$,$"$k!%$=$NHV9f$O!$(Bextract$B$9$k%U%!%$%k$H(Bhunk$B$rA*$V$?$a$K(B |
1637 section~\ref{sec:mq:combine}. | 1787 \command{filterdiff}$B%3%^%s%I$N(B\cmdopt{filterdiff}{--files}$B$H(B |
1788 \cmdopt{filterdiff}{--hunks}$B%*%W%7%g%s$G;H$($k!%(B | |
1789 | |
1790 %Once you have this hunk, you can concatenate it onto the end of your | |
1791 %destination patch and continue with the remainder of | |
1792 %section~\ref{sec:mq:combine}. | |
1793 | |
1794 $B$3$N(Bhunk$B$,$G$-$?$i!$L\E*$N%Q%C%A$NKvHx$K7k9g$7!$%;%/%7%g%s$N;D$j$NItJ,$r(B | |
1795 $BB3$1$k$3$H$,$G$-$k(B~\ref{sec:mq:combine}$B!%(B | |
1638 | 1796 |
1639 %\section{Differences between quilt and MQ} | 1797 %\section{Differences between quilt and MQ} |
1640 \section{quilt$B$H(BMQ$B$N0c$$(B} | 1798 \section{quilt$B$H(BMQ$B$N0c$$(B} |
1641 | 1799 |
1642 %If you are already familiar with quilt, MQ provides a similar command | 1800 %If you are already familiar with quilt, MQ provides a similar command |
1656 $B%I$,$"$k$3$H$K5$$E$$$F$$$k$3$H$H;W$&!%Nc30$O!$(Bquilt$B$N(B\texttt{add}$B%3%^%s%I(B | 1814 $B%I$,$"$k$3$H$K5$$E$$$F$$$k$3$H$H;W$&!%Nc30$O!$(Bquilt$B$N(B\texttt{add}$B%3%^%s%I(B |
1657 $B$H(B\texttt{remove}$B%3%^%s%I$G!$$3$l$i$K$O$=$l$>$lDL>o$N(BMercurial$B%3%^%s%I$N(B | 1815 $B$H(B\texttt{remove}$B%3%^%s%I$G!$$3$l$i$K$O$=$l$>$lDL>o$N(BMercurial$B%3%^%s%I$N(B |
1658 \hgcmd{add}$B$H(B\hgcmd{remove}$B$,BP1~$9$k!%$^$?!$(Bquilt$B$N(B\texttt{edit}$B%3%^%s%I(B | 1816 \hgcmd{add}$B$H(B\hgcmd{remove}$B$,BP1~$9$k!%$^$?!$(Bquilt$B$N(B\texttt{edit}$B%3%^%s%I(B |
1659 $B$KBP1~$9$k(BMQ$B%3%^%s%I$O$J$$!%(B | 1817 $B$KBP1~$9$k(BMQ$B%3%^%s%I$O$J$$!%(B |
1660 | 1818 |
1661 | |
1662 %%% Local Variables: | 1819 %%% Local Variables: |
1663 %%% mode: yatex | 1820 %%% mode: yatex |
1664 %%% TeX-master: "00book" | 1821 %%% TeX-master: "00book" |
1665 %%% End: | 1822 %%% End: |