Mercurial > hgbook
diff ja/mq.tex @ 838:d1f676a6a4b3 default tip
update mq chapter.
propagate ef53d025f410.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 03 Dec 2009 01:26:08 +0900 |
parents | 8a3041e6f3cb |
children |
line wrap: on
line diff
--- a/ja/mq.tex Tue Sep 15 22:32:03 2009 +0900 +++ b/ja/mq.tex Thu Dec 03 01:26:08 2009 +0900 @@ -190,8 +190,8 @@ %extension that he called Mercurial Queues, which added quilt-like %behaviour to Mercurial. -2005$BG/$NCf:"(BChris Mason$B$O!$(Bquilt$B$N5!G=$r<h$jF~$l$F!$(BMercurial$B$K(Bquilt$B$N$h(B -$B$&$JF0:n$rDI2C$9$k(BMercurial Queues$B$H$$$&%(%/%9%F%s%7%g%s$r=q$$$?!%(B +2005$BG/$NCf:"!$(BChris Mason$B$O!$(Bquilt$B$N5!G=$r<h$jF~$l$F!$(BMercurial$B$K(Bquilt$B$N(B +$B$h$&$JF0:n$rDI2C$9$k(BMercurial Queues$B$H$$$&%(%/%9%F%s%7%g%s$r=q$$$?!%(B %The key difference between quilt and MQ is that quilt knows nothing %about revision control systems, while MQ is \emph{integrated} into @@ -1031,22 +1031,13 @@ $B$$!%BgDq$N>l9g!$(B\sfilename{.rej}$B%U%!%$%k$r8+$F%?!<%2%C%H%U%!%$%k$rJT=8(B $B$7!$%j%8%'%/%H$5$l$?(Bhunk$B$r<j$GE,MQ$9$k$3$H$K$J$k!%(B -%If you're feeling adventurous, Neil Brown, a Linux kernel hacker, -%wrote a tool called \command{wiggle}~\cite{web:wiggle}, which is more -%vigorous than \command{patch} in its attempts to make a patch apply. - -$BKA81$,9%$-$J$i!$(BLinux kerner$B%O%C%+!<$N(BNeil Brown$B$,=q$$$?(B -\command{wiggle}~\cite{web:wiggle}$B$r;n$7$F$_$k$HNI$$!%$3$N%3%^%s%I$O(B -\command{patch}$B$h$j$b@:NOE*$K%Q%C%A$NE,MQ$r;n$_$k!%(B +%A Linux kernel hacker, Chris Mason (the author of Mercurial Queues), +%wrote a tool called \command{mpatch}~\cite{web:mpatch}, which takes a +%simple approach to automating the application of hunks rejected by +%\command{patch}. The \command{mpatch} command can help with four common +%reasons that a hunk may be rejected: -%Another Linux kernel hacker, Chris Mason (the author of Mercurial -%Queues), wrote a similar tool called -%\command{mpatch}~\cite{web:mpatch}, which takes a simple approach to -%automating the application of hunks rejected by \command{patch}. The -%\command{mpatch} command can help with four common reasons that a hunk -%may be rejected: - -$BJL$N(BLinux kerner$B%O%C%+!<(B Chris Mason$B!J(BMercurial Queues$B$N:n<T$G$b$"$k!%!K(B +Linux kerner$B%O%C%+!<(B Chris Mason$B!J(BMercurial Queues$B$N:n<T$G$b$"$k!%!K(B $B$O(B\command{mpatch}~\cite{web:mpatch}$B$H$$$&%D!<%k$r=q$$$?!%$3$N%3%^%s%I$O(B \command{patch}$B%3%^%s%I$G%j%8%'%/%H$5$l$?(Bhunk$B$NE,MQ$r<+F02=$9(B $B$k!%(B\command{mpatch}$B%3%^%s%I$O!$(Bhunk$B$,%j%8%'%/%H$5$l$k<g$J860x(B4$B$D$KBP1~(B @@ -1067,17 +1058,79 @@ $B$9$k(B \end{itemize} -%If you use \command{wiggle} or \command{mpatch}, you should be doubly -%careful to check your results when you're done. In fact, -%\command{mpatch} enforces this method of double-checking the tool's +%If you use \command{mpatch}, you should be doubly careful to +%check your results when you're done. In fact, \command{mpatch} +%enforces this method of double-checking the tool's %output, by automatically dropping you into a merge program when it has %done its job, so that you can verify its work and finish off any %remaining merges. -\command{wiggle}$B$^$?$O(B\command{mpatch}$B$r;HMQ$7$?>l9g$O!$7k2L$K:Y?4$NCm0U(B -$B$,I,MW$G$"$k!%<B:]$K$O(B\command{mpatch}$B$O%D!<%k$N=PNO$GFs=E%A%'%C%/$r6/@)(B -$B$7!$F0:n$,=*$k$H<+F0E*$K%^!<%8%W%m%0%i%`$r5/F0$9$k!%$3$l$K$h$C$F:n6H$r3N(B -$BG'$7!$%^!<%8$r40N;$9$k$3$H$,$G$-$k!%(B +\command{mpatch}$B$r;HMQ$7$?>l9g$O!$7k2L$K:Y?4$NCm0U$,I,MW$G$"$k!%<B:]$K$O(B +\command{mpatch}$B$O%D!<%k$N=PNO$GFs=E%A%'%C%/$r6/@)$7!$F0:n$,=*$k$H<+F0E*(B +$B$K%^!<%8%W%m%0%i%`$r5/F0$9$k!%$3$l$K$h$C$F:n6H$r3NG'$7!$I,MW$J%^!<%8$r40(B +$BN;$9$k$3$H$,$G$-$k!%(B + + +%\section{More on patch management} +\section{$B$5$i$J$k%Q%C%A4IM}(B} + +%As you grow familiar with MQ, you will find yourself wanting +%to perform other kinds of patch management operations. + +MQ$B$K47$l$k$K=>$C$F!$JL$NJ}K!$G$b%Q%C%A4IM}$r$7$?$/$J$k$@$m$&!%(B + +%\subsection{Deleting unwanted patches} +\subsection{$BITMW$J%Q%C%A$r>C5n$9$k(B} + +%If you want to get rid of a patch, use the \command{qdelete} command to +%delete the patch file and remove its entry from the patch series. If +%you try to delete a patch that is still applied, \command{qdelete} will +%refuse. + +$B%Q%C%A$r>C5n$9$k$K$O!$(B\command{qdelete}$B%3%^%s%I$rMQ$$$F!$%Q%C%A%U%!%$%k$N(B +$B>C5n$H%Q%C%A%(%s%H%j$N%Q%C%A%7%j!<%:$+$i$NKu>C$r9T$&!%(B\command{qdelete}$B$O(B +$BE,MQCf$N%Q%C%A$O>C5n$7$J$$!%(B + +% &interaction.ch11-qdelete.go; +\interaction{ch11-qdelete.go} + +%\subsection{Converting to and from permanent revisions} +\subsection{$B1JB3E*$J%j%S%8%g%s$H$NAj8_JQ49(B} + +%Once you're done working on a patch and want to turn it into a permanent +%changeset, use the \hgxopt{mq}{qdelete}{-r} command. Pass a revision to +%the \option{-r} option to identify the patch that you want to turn into +%a regular changeset; this patch must already be applied. + +$B%Q%C%A$G$N:n6H$,=*$j!$$3$l$r1JB3E*$J%A%'%s%8%;%C%H$XJQ49$7$?$$>l9g$O!$(B +\hgxopt{mq}{qdelete}{-r}$B%3%^%s%I$rMQ$$$k!%(B\option{-r}$B%*%W%7%g%s$K%j%S%8%g(B +$B%s$rEO$7!$$I$N%Q%C%A$rDL>o$N%A%'%s%8%;%C%H$KJQ49$7$?$$$N$+;XDj$9$k!%JQ49(B +$BBP>]$N%Q%C%A$O$9$G$KE,MQ$5$l$F$$$J$1$l$P$J$i$J$$!%(B + +%&interaction.ch11-qdelete.convert; +\interaction{ch11-qdelete.convert} + +%It is also possible to turn an existing changeset into a patch, by +%passing the \option{-r} option to \command{qimport}. + +\command{qimport}$B%3%^%s%I$K(B\option{-r}$B%*%W%7%g%s$rEO$7$F!$$9$G$KB8:_$9$k(B +$B%A%'%s%8%;%C%H$r%Q%C%A$KJQ49$9$k$3$H$b$G$-$k!%(B + +%&interaction.ch11-qdelete.import; +\interaction{ch11-qdelete.import} + +%Note that it only makes sense to convert a changeset into a patch if you +%have not propagated that changeset into any other repositories. The +%imported changeset's ID will change every time you refresh the patch, +%which will make Mercurial treat it as unrelated to the original +%changeset if you have pushed it somewhere else. + +$B%A%'%s%8%;%C%H$+$i%Q%C%A$X$NJQ49$,0UL#$r;}$D$N$O!$%A%'%s%8%;%C%H$r$^$@B>(B +$B$N%j%]%8%H%j$KGH5Z$5$;$F$$$J$$>l9g$K8B$i$l$k!%(BMercurial$B$O%Q%C%A$KJQ49$7$?(B +$B%A%'%s%8%;%C%H$r85$N%A%'%s%8%;%C%H$H$OL54X78$J$b$N$H$7$F07$&$?$a!$%Q%C%A(B +$B$r%j%U%l%C%7%e$9$kEY$K%A%'%s%8%;%C%H(BID$B$OJQ$o$k!%$9$G$KJL$N%j%]%8%H%j$K%A%'(B +$B%s%8%;%C%H$r%W%C%7%e$7$F$$$k$J$i$P!$$3$l$i$N(BID$B$OAj0c$7$F$7$^$&!%(B + %\section{Getting the best performance out of MQ} \section{MQ$B$r:GBg8B$K3hMQ$9$k(B} @@ -1085,7 +1138,7 @@ %MQ is very efficient at handling a large number of patches. I ran %some performance experiments in mid-2006 for a talk that I gave at the -%2006 EuroPython conference~\cite{web:europython}. I used as my data +%2006 EuroPython conference. I used as my data %set the Linux 2.6.17-mm1 patch series, which consists of 1,738 %patches. I applied these on top of a Linux kernel repository %containing all 27,472 revisions between Linux 2.6.12-rc2 and Linux