comparison ja/mq.tex @ 835:8a3041e6f3cb

reflect comments by Hiroshi Someya.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 11 Jul 2009 19:25:35 +0900
parents de4142983445
children d1f676a6a4b3
comparison
equal deleted inserted replaced
834:896ab6eaf1c6 835:8a3041e6f3cb
177 $B%A$=$l<+BN$r$$$D$G$b99?7$G$-$k$H$$$&$3$H$G$"$k!%(B 177 $B%A$=$l<+BN$r$$$D$G$b99?7$G$-$k$H$$$&$3$H$G$"$k!%(B
178 178
179 %Quilt knows nothing about revision control tools, so it works equally 179 %Quilt knows nothing about revision control tools, so it works equally
180 %well on top of an unpacked tarball or a Subversion working copy. 180 %well on top of an unpacked tarball or a Subversion working copy.
181 181
182 quilt$B$O%j%S%8%g%s4IM}%D!<%k$K$D$$$F$OA4$/4XCN$7$J$$$?$a!$E83+$5$l$?(Btar$B%\!<(B 182 quilt$B$O%j%S%8%g%s4IM}%D!<%k$K$D$$$F$OA4$/4XCN$7$J$$$?$a!$E83+$5$l$?(Btar$B%"!<(B
183 $B%k>e$G$b!$(BSubversion$B$N%o!<%-%s%0%3%T!<>e$G$bF1MM$KF0:n$9$k!%(B 183 $B%+%$%V>e$G$b!$(BSubversion$B$N%o!<%-%s%0%3%T!<>e$G$bF1MM$KF0:n$9$k!%(B
184 184
185 %\subsection{From patchwork quilt to Mercurial Queues} 185 %\subsection{From patchwork quilt to Mercurial Queues}
186 \subsection{patchwork quilt$B$+$i(BMercurial Queues$B$X(B} 186 \subsection{patchwork quilt$B$+$i(BMercurial Queues$B$X(B}
187 \label{sec:mq:quilt-mq} 187 \label{sec:mq:quilt-mq}
188 188
234 %also somewhat stifling. If you want to perform a wild-eyed 234 %also somewhat stifling. If you want to perform a wild-eyed
235 %experiment, you have to be careful in how you go about it, or you risk 235 %experiment, you have to be careful in how you go about it, or you risk
236 %leaving unneeded---or worse, misleading or destabilising---traces of 236 %leaving unneeded---or worse, misleading or destabilising---traces of
237 %your missteps and errors in the permanent revision record.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filename{status} file for internal book-keeping; it tracks all of the 464 %\sfilename{status} file for internal book-keeping; it tracks all of the
465 %patches that MQ has \emph{applied} in this repository. 465 %patches that MQ has \emph{applied} in this repository.
466 466
467 \sdirname{.hg/patches}$B%G%#%l%/%H%j$NCf$K$O!$(B\sfilename{series}$B$H(B 467 \sdirname{.hg/patches}$B%G%#%l%/%H%j$NCf$K$O!$(B\sfilename{series}$B$H(B
468 \sfilename{status}$B$H$$$&(B2$B$D$N%U%!%$%k$b?7$7$/:n$i$l$k!%(B 468 \sfilename{status}$B$H$$$&(B2$B$D$N%U%!%$%k$b?7$7$/:n$i$l$k!%(B
469 \sfilename{series}$B$U$!$$$k$O(BMQ$B$,4XCN$9$k!$$3$N%j%]%8%H%jFb$NA4$F$N%Q%C%A(B 469 \sfilename{series}$B%U%!%$%k$O(BMQ$B$,4XCN$9$k!$$3$N%j%]%8%H%jFb$NA4$F$N%Q%C%A(B
470 $B$N%j%9%H$,$"$j!$0l9T$K0l$D$N%Q%C%A$,5-=R$5$l$F$$$k!%(BMercurial$B$O(B 470 $B$N%j%9%H$,$"$j!$(B1$B9T$K(B1$B$D$N%Q%C%A$,5-=R$5$l$F$$$k!%(BMercurial$B$O(B
471 \sfilename{status}$B%U%!%$%k$rFbIt$N4IM}$KMQ$$$k!%$3$N%U%!%$%k$O%j%]%8%H%j(B 471 \sfilename{status}$B%U%!%$%k$rFbIt$N4IM}$KMQ$$$k!%$3$N%U%!%$%k$O%j%]%8%H%j(B
472 $BFb$G(BMQ$B$,E,MQ$7$?A4$F$N%Q%C%A$,5-O?$5$l$F$$$k!%(B 472 $BFb$G(BMQ$B$,E,MQ$7$?A4$F$N%Q%C%A$,5-O?$5$l$F$$$k!%(B
473 473
474 %\begin{note} 474 %\begin{note}
475 % You may sometimes want to edit the \sfilename{series} file by hand; 475 % You may sometimes want to edit the \sfilename{series} file by hand;
706 %changes into the new patch it creates, but 706 %changes into the new patch it creates, but
707 %\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} will revert modifications to any 707 %\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} will revert modifications to any
708 %files affected by the patch that it is popping. Be sure to read the 708 %files affected by the patch that it is popping. Be sure to read the
709 %documentation for a command's \option{-f} option before you use it! 709 %documentation for a command's \option{-f} option before you use it!
710 710
711 $B%o!<%-%s%0%G%#%l%/%H%j$N%A%'%C%/$r9T$J$&%3%^%s%I$OA4$F!$>e5i<T8~$1$N6/@)(B 711 $B%o!<%-%s%0%G%#%l%/%H%j$N%A%'%C%/$r9T$&%3%^%s%I$OA4$F!$>e5i<T8~$1$N6/@)(B
712 $B%*%W%7%g%s(B\option{-f}$B$r;}$C$F$$$k!%(B\option{-f}$B$N87L)$J0UL#$O!$%3%^%s%I$K(B 712 $B%*%W%7%g%s(B\option{-f}$B$r;}$C$F$$$k!%(B\option{-f}$B$N87L)$J0UL#$O!$%3%^%s%I$K(B
713 $B$h$C$F0[$J$k!%Nc$($P(B\hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}}$B$O8IN)$7$?JQ(B 713 $B$h$C$F0[$J$k!%Nc$($P(B\hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}}$B$O8IN)$7$?JQ(B
714 $B99$r?7$7$$%Q%C%A$K<h$j9~$`$H$$$&0UL#$@$,!$(B 714 $B99$r?7$7$$%Q%C%A$K<h$j9~$`$H$$$&0UL#$@$,!$(B
715 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}}$B$O!$%]%C%W$9$k%Q%C%A$K$h$k$"$i$f(B 715 \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}}$B$O!$%]%C%W$9$k%Q%C%A$K$h$k$"$i$f(B
716 $B$k%U%!%$%k$X$NJQ99$r<h$j>C$9$H$$$&0UL#$K$J$k!%(B\option{-f}$B%*%W%7%g%s$r;H(B 716 $B$k%U%!%$%k$X$NJQ99$r<h$j>C$9$H$$$&0UL#$K$J$k!%(B\option{-f}$B%*%W%7%g%s$r;H(B
723 %applied patch. This means that you can suspend work on one patch (by 723 %applied patch. This means that you can suspend work on one patch (by
724 %refreshing it), pop or push to make a different patch the top, and 724 %refreshing it), pop or push to make a different patch the top, and
725 %work on \emph{that} patch for a while. 725 %work on \emph{that} patch for a while.
726 726
727 \hgxcmd{mq}{qrefresh}$B%3%^%s%I$O(B\emph{$B:G$b>e(B}$B$KE,MQ$5$l$?%Q%C%A$KBP$7$F%j(B 727 \hgxcmd{mq}{qrefresh}$B%3%^%s%I$O(B\emph{$B:G$b>e(B}$B$KE,MQ$5$l$?%Q%C%A$KBP$7$F%j(B
728 $B%U%l%C%7%e$r9T$J$&!%$3$l$O%j%U%l%C%7%e$K$h$C$F(B1$B$D$N%Q%C%A$K8=:_$N:n6H$r%5(B 728 $B%U%l%C%7%e$r9T$&!%$3$l$O%j%U%l%C%7%e$K$h$C$F(B1$B$D$N%Q%C%A$K8=:_$N:n6H$r%5(B
729 $B%9%Z%s%I$7$?$j!$JL$N%H%C%W%Q%C%A$d0l;~E*$K:n6H$9$k$?$a%Q%C%A$r:n$k$?$a$K(B 729 $B%9%Z%s%I$7$?$j!$JL$N%H%C%W%Q%C%A$d0l;~E*$K:n6H$9$k$?$a%Q%C%A$r:n$k$?$a$K(B
730 $B%]%C%W$d%W%C%7%e$,$G$-$k$H$$$&$3$H$r0UL#$9$k!%(B 730 $B%]%C%W$d%W%C%7%e$,$G$-$k$H$$$&$3$H$r0UL#$9$k!%(B
731 731
732 %Here's an example that illustrates how you can use this ability. 732 %Here's an example that illustrates how you can use this ability.
733 %Let's say you're developing a new feature as two patches. The first 733 %Let's say you're developing a new feature as two patches. The first
742 742
743 $B$3$N5!G=$N;H$$J}$r<($9Nc$r<($9!%(B2$B$D$N%Q%C%A$H$7$F?7$7$$5!G=$r3+H/$7$F$$$k(B 743 $B$3$N5!G=$N;H$$J}$r<($9Nc$r<($9!%(B2$B$D$N%Q%C%A$H$7$F?7$7$$5!G=$r3+H/$7$F$$$k(B
744 $B$H$9$k!%:G=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%C%A$KLa$C$F:n6H$rB3$1$k!%(B
751 751
752 %\section{More about patches} 752 %\section{More about patches}
753 \section{$B$5$i$K%Q%C%A$K$D$$$F(B} 753 \section{$B$5$i$K%Q%C%A$K$D$$$F(B}
754 \label{sec:mq:adv-patch} 754 \label{sec:mq:adv-patch}
766 766
767 %If you look at the file headers in a patch, you will notice that the 767 %If you look at the file headers in a patch, you will notice that the
768 %pathnames usually have an extra component on the front that isn't 768 %pathnames usually have an extra component on the front that isn't
769 %present in the actual path name. This is a holdover from the way that 769 %present in the actual path name. This is a holdover from the way that
770 %people used to generate patches (people still do this, but it's 770 %people used to generate patches (people still do this, but it's
771 %somewhat rare with modern revision control tools). 771 %somewhat rare with modern revision control tools).
772 772
773 $B%Q%C%A$N%U%!%$%k%X%C%@$r8+$k$H!$%Q%9%M!<%`$N:G=i$KDI2C$NItJ,$,$D$$$F$$$k(B 773 $B%Q%C%A$N%U%!%$%k%X%C%@$r8+$k$H!$%Q%9%M!<%`$N:G=i$KDI2C$NItJ,$,$D$$$F$$$k(B
774 $B$N$K5$$E$/$O$:$@!%$3$l$O<B:]$N%Q%9%M!<%`$K$OB8:_$7$J$$$b$N$G!$%Q%C%A$r@8(B 774 $B$N$K5$$E$/$O$:$@!%$3$l$O<B:]$N%Q%9%M!<%`$K$OB8:_$7$J$$$b$N$G!$%Q%C%A$r@8(B
775 $B@.$9$k;~$N=,47$+$i$N0dJ*$G$"$k!%!JB?$/$N?M$,$$$^$@$3$NJ}K!$r;H$C$F$$$k$,!$(B 775 $B@.$9$k;~$N=,47$+$i$N0dJ*$G$"$k!%!JB?$/$N?M$,$$$^$@$3$NJ}K!$r;H$C$F$$$k$,!$(B
776 $B6aBeE*$J%j%S%8%g%s%3%s%H%m!<%k%D!<%k$G$O$[$H$s$I8+$i$l$J$$!%!K(B 776 $B6aBeE*$J%j%S%8%g%s%3%s%H%m!<%k%D!<%k$G$O$[$H$s$I8+$i$l$J$$!%!K(B
778 %Alice would unpack a tarball, edit her files, then decide that she 778 %Alice would unpack a tarball, edit her files, then decide that she
779 %wanted to create a patch. So she'd rename her working directory, 779 %wanted to create a patch. So she'd rename her working directory,
780 %unpack the tarball again (hence the need for the rename), and use the 780 %unpack the tarball again (hence the need for the rename), and use the
781 %\cmdopt{diff}{-r} and \cmdopt{diff}{-N} options to \command{diff} to 781 %\cmdopt{diff}{-r} and \cmdopt{diff}{-N} options to \command{diff} to
782 %recursively generate a patch between the unmodified directory and the 782 %recursively generate a patch between the unmodified directory and the
783 %modified one. 783 %modified one.
784 %The result would be that the name of the unmodified 784 %The result would be that the name of the unmodified
785 %directory would be at the front of the left-hand path in every file 785 %directory would be at the front of the left-hand path in every file
786 %header, and the name of the modified directory would be at the front 786 %header, and the name of the modified directory would be at the front
787 %of the right-hand path. 787 %of the right-hand path.
788 788
789 $B%"%j%9$,(Btar$B%\!<%k$r2rE`$7!$%U%!%$%k$rJT=8$7!$%Q%C%A$r:n$j$?$$$H;W$C$F$$$k(B 789 $B%"%j%9$,(Btar$B%"!<%+%$%V$rE83+$7!$%U%!%$%k$rJT=8$7!$%Q%C%A$r:n$j$?$$$H;W$C$F(B
790 $B$H$9$k!%H`=w$O%o!<%-%s%0%G%#%l%/%H%j$r%j%M!<%`$7$F(Btar$B%\!<%k$r$b$&0lEY2rE`(B 790 $B$$$k$H$9$k!%H`=w$O:9J,$r<h$k$?$a$K$^$::n6H$7$F$$$k%G%#%l%/%H%j$r%j%M!<%`(B
791 $B$7!J$3$N$?$a$K%j%M!<%`$,I,MW$@$C$?!K!$(B\command{diff}$B$K(B\cmdopt{diff}{-r}$B$H(B 791 $B$7!$(B tar$B%"!<%+%$%V$r$b$&0lEYE83+$9$k!%$=$7$F%*%j%8%J%k$N$^$^$N%G%#%l%/%H(B
792 \cmdopt{diff}{-N}$B%*%W%7%g%s$r$D$1$F!$85$N$^$^$N%G%#%l%/%H%j$HJQ99$7$?%G%#(B 792 $B%j$H!$JQ99$r9T$J$C$?%G%#%l%/%H%j$N4V$G!$$=$7$F(B\command{diff}$B$K(B
793 $B%l%/%H%j$N4V$G:F5"E*$K%Q%C%A$r@8@.$9$k$@$m$&!%@8@.$5$l$?%Q%C%A$G$O!$A4$F(B 793 \cmdopt{diff}{-r}$B$H(B\cmdopt{diff}{-N}$B%*%W%7%g%s$rIU$1$F!$:F5"E*$J:9J,$r<h(B
794 $B$N%U%!%$%k%X%C%@$G85$N$^$^$N%G%#%l%/%H%j$NL>A0$,:8B&$N%Q%9$N@hF,$K!$JQ99(B 794 $B$j!$%Q%C%A$r@8@.$9$k$@$m$&!%@8@.$5$l$?%Q%C%A%U%!%$%k$r8+$k$H!$3F%U%!%$%k(B
795 $B$5$l$?%G%#%l%/%H%j$NL>A0$,1&B&$N%Q%9$N@hF,$K8=$l$k!%(B 795 $B$N%X%C%@ItJ,$G:8JUCM$N@hF,$K%*%j%8%J%k$NJ}$N%G%#%l%/%H%jL>$,8=$l!$1&JUCM(B
796 $B$N@hF,$KJQ99$7$?J}$N%G%#%l%/%H%jL>$,8=$l$F$$$k$O$:$G$"$k!%(B
796 797
797 %Since someone receiving a patch from the Alices of the net would be 798 %Since someone receiving a patch from the Alices of the net would be
798 %unlikely to have unmodified and modified directories with exactly the 799 %unlikely to have unmodified and modified directories with exactly the
799 %same names, the \command{patch} command has a \cmdopt{patch}{-p} 800 %same names, the \command{patch} command has a \cmdopt{patch}{-p}
800 %option that indicates the number of leading path name components to 801 %option that indicates the number of leading path name components to
801 %strip when trying to apply a patch. This number is called the 802 %strip when trying to apply a patch. This number is called the
802 %\emph{strip count}. 803 %\emph{strip count}.
803 804
804 $B%M%C%H>e$N%"%j%9$?$A$+$i%Q%C%A$r<u$1<h$C$??M$O!$JQ99$J$7$N%G%#%l%/%H%j$H(B 805 $B%M%C%H>e$NB??t$N%"%j%9$?$A$+$i%Q%C%A$r<u$1<h$C$??M$O!$JQ99$J$7$N%G%#%l%/(B
805 $BJQ99$5$l$?%G%#%l%/%H%j$NN>J}$r%"%j%9$HF1$8L>A0$G;}$C$F$$$k2DG=@-$O$^$:$J(B 806 $B%H%j$HJQ99$5$l$?%G%#%l%/%H%j$NN>J}$r%"%j%9$HF1$8L>A0$G;}$C$F$$$k2DG=@-$O(B
806 $B$$!%(B\command{patch}$B%3%^%s%I$K$O(B\cmdopt{patch}{-p}$B%*%W%7%g%s$,$"$j!$%Q%C(B 807 $B$^$:$J$$!%(B\command{patch}$B%3%^%s%I$K$O(B\cmdopt{patch}{-p}$B%*%W%7%g%s$,$"$j!$(B
807 $B%A$rE,MQ$9$k;~$K%Q%9$NMWAG$r@hF,$+$i$$$/$D:o$k$+$r;XDj$G$-$k!%$3$N?t$O(B 808 $B%Q%C%A$rE,MQ$9$k;~$K%Q%9$NMWAG$r@hF,$+$i$$$/$D:o$k$+$r;XDj$G$-$k!%$3$N?t(B
808 \emph{$B%9%H%j%C%W%+%&%s%H(B}$B$H8F$P$l$k!%(B 809 $B$O(B\emph{$B%9%H%j%C%W%+%&%s%H(B}$B$H8F$P$l$k!%(B
809 810
810 %An option of ``\texttt{-p1}'' means ``use a strip count of one''. If 811 %An option of ``\texttt{-p1}'' means ``use a strip count of one''. If
811 %\command{patch} sees a file name \filename{foo/bar/baz} in a file 812 %\command{patch} sees a file name \filename{foo/bar/baz} in a file
812 %header, it will strip \filename{foo} and try to patch a file named 813 %header, it will strip \filename{foo} and try to patch a file named
813 %\filename{bar/baz}. (Strictly speaking, the strip count refers to the 814 %\filename{bar/baz}. (Strictly speaking, the strip count refers to the
947 \item $B$9$G$KL@Gr$@$,!$(B\command{patch}$B$O%P%$%J%j%U%!%$%k$r07$&$3$H$O$G$-(B 948 \item $B$9$G$KL@Gr$@$,!$(B\command{patch}$B$O%P%$%J%j%U%!%$%k$r07$&$3$H$O$G$-(B
948 $B$J$$!%(B 949 $B$J$$!%(B
949 \item $B<B9T%S%C%H$r9MN8$7$J$$$@$1$G$J$/!$?7$7$$%U%!%$%k$rFI$_<h$j2DG=B0(B 950 \item $B<B9T%S%C%H$r9MN8$7$J$$$@$1$G$J$/!$?7$7$$%U%!%$%k$rFI$_<h$j2DG=B0(B
950 $B@-$G:n@.$7!$<B9T2DG=B0@-$OIU$1$J$$!%(B 951 $B@-$G:n@.$7!$<B9T2DG=B0@-$OIU$1$J$$!%(B
951 \item \command{patch}$B%3%^%s%I$O%U%!%$%k$N:o=|$r:o=|$5$l$k%U%!%$%k$HCf?H(B 952 \item \command{patch}$B%3%^%s%I$O%U%!%$%k$N:o=|$r:o=|$5$l$k%U%!%$%k$HCf?H(B
952 $B$,$+$i$N%U%!%$%k$H$N:9J,$H$7$F07$&!%=>$C$F!$%U%!%$%k$r:o=|$9$k$H$$(B 953 $B$,6u$N%U%!%$%k$H$N:9J,$H$7$F07$&!%=>$C$F!$%U%!%$%k$r:o=|$9$k$H$$(B
953 $B$&$3$H$O!$%Q%C%A%U%!%$%k$NCf$G$O%U%!%$%k$NCf$NA4$F$N9T$r:o=|$9$k$3(B 954 $B$&$3$H$O!$%Q%C%A%U%!%$%k$NCf$G$O%U%!%$%k$NCf$NA4$F$N9T$r:o=|$9$k$3(B
954 $B$H$HEy2A$G$"$k!%(B 955 $B$H$HEy2A$G$"$k!%(B
955 \item \command{patch}$B%3%^%s%I$O%U%!%$%k$NDI2C$r6u$N%U%!%$%k$HDI2C$5$l$k(B 956 \item \command{patch}$B%3%^%s%I$O%U%!%$%k$NDI2C$r6u$N%U%!%$%k$HDI2C$5$l$k(B
956 $B%U%!%$%k$N:9J,$H$7$F07$&!%=>$C$F%U%!%$%k$NDI2C$O%Q%C%A%U%!%$%k$NCf(B 957 $B%U%!%$%k$N:9J,$H$7$F07$&!%=>$C$F%U%!%$%k$NDI2C$O%Q%C%A%U%!%$%k$NCf(B
957 $B$G$O%U%!%$%k$KA4$F$N9T$rDI2C$9$k$3$H$HEy2A$G$"$k!%(B 958 $B$G$O%U%!%$%k$KA4$F$N9T$rDI2C$9$k$3$H$HEy2A$G$"$k!%(B
993 %apply with some fuzz, provided you've verified the results of the 994 %apply with some fuzz, provided you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2L$r8!>Z$7$F$"$k$N$G$"$l$P(Bfuzz$B$N=P$k%Q%C%A$b5vMF$5$lF@$k!%(B 1003 $B%A$N7k2L$r8!>Z$7$F$"$k$N$G$"$l$P(Bfuzz$B$N=P$k%Q%C%A$b5vMF$5$lF@$k!%(B
1003 1004
1004 %\subsection{Handling rejection} 1005 %\subsection{Handling rejection}
1005 \subsection{$B%j%8%'%/%H$N<h$j07$$(B} 1006 \subsection{$B%j%8%'%/%H$N<h$j07$$(B}
1006 1007
1007 %If \hgxcmd{mq}{qpush} fails to apply a patch, it will print an error 1008 %If \hgxcmd{mq}{qpush} fails to apply a patch, it will print an error
1437 %Mercurial repository's working directory, the ``underlying'' Mercurial 1438 %Mercurial repository's working directory, the ``underlying'' Mercurial
1438 %repository knows nothing about the management or presence of patches. 1439 %repository knows nothing about the management or presence of patches.
1439 1440
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 1441 MQ$B$N(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$O(BMercurial$B%j%]%8%H%j$N%o!<%-%s%0(B
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 1442 $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
1442 $B$d!$$=$NB;0&;yBP$K$D$$$F2?$bCN$i$J$$!%(B 1443 $B$d!$$=$NB8:_<+BN$K$D$$$F2?$bCN$i$J$$!%(B
1443 1444
1444 %This presents the interesting possibility of managing the contents of 1445 %This presents the interesting possibility of managing the contents of
1445 %the patch directory as a Mercurial repository in its own right. This 1446 %the patch directory as a Mercurial repository in its own right. This
1446 %can be a useful way to work. For example, you can work on a patch for 1447 %can be a useful way to work. For example, you can work on a patch for
1447 %a while, \hgxcmd{mq}{qrefresh} it, then \hgcmd{commit} the current state of 1448 %a while, \hgxcmd{mq}{qrefresh} it, then \hgcmd{commit} the current state of
1476 %developers to work on the same patch series without colliding with 1477 %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 %each other, all on top of an underlying source base that they may or
1478 %may not control. 1479 %may not control.
1479 1480
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%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%3%s%U%j%/%H$9$k$3$H$J$/:n6H$G$-$k$h$&$K$J$k!%$3$l$OH`$i$,2<0L$N%=!<%9%Y!<(B
1482 $B%s%H%m!<%k$G$-$k$+H]$+$K4X$o$j$,$J$$!%(B 1483 $B%9$r%3%s%H%m!<%k$G$-$k$+H]$+$K4X$o$j$,$J$$!%(B
1483 1484
1484 %\subsection{MQ support for patch repositories} 1485 %\subsection{MQ support for patch repositories}
1485 \subsection{MQ$B$K$h$k%Q%C%A%j%]%8%H%j%5%]!<%H(B} 1486 \subsection{MQ$B$K$h$k%Q%C%A%j%]%8%H%j%5%]!<%H(B}
1486 1487
1487 %MQ helps you to work with the \sdirname{.hg/patches} directory as a 1488 %MQ helps you to work with the \sdirname{.hg/patches} directory as a
1635 %or open source project, or a series that you intend to treat as a 1636 %or open source project, or a series that you intend to treat as a
1636 %sequence of regular changesets when you're done, you can use some 1637 %sequence of regular changesets when you're done, you can use some
1637 %simple techniques to keep your work well organized. 1638 %simple techniques to keep your work well organized.
1638 1639
1639 $B%U%j!<%=%U%H$d%*!<%W%s%=!<%9%W%m%8%'%/%H$KDs=P$9$k$?$a$N%Q%C%A%7%j!<%:$K(B 1640 $B%U%j!<%=%U%H$d%*!<%W%s%=!<%9%W%m%8%'%/%H$KDs=P$9$k$?$a$N%Q%C%A%7%j!<%:$K(B
1640 $BBP$7$F:n6H$7$F$$$k$H$-$d!$:n6H$,=*$C$?$H$-$KDL>o$N%A%'%s%8%;%C%H$H$7$F<h(B 1641 $BBP$7$F:n6H$7$F$$$k$H$-$d!$%Q%C%A$H$7$F$N:n6H$,=*$C$?:]$KDL>o$N%A%'%s%8%;%C(B
1641 $B$j9~$^$l$kM=Dj$N%Q%C%A%7%j!<%:$KBP$7$F$@9T$7$F$$$k$H$-$O!$:n6H$r$&$^$/7O(B 1642 $B%H$H$7$F<h$j9~$`M=Dj$N%Q%C%A%7%j!<%:$KBP$7$F:n6H$7$F$$$k$H$-$O!$:n6H$r$&(B
1642 $BE}$E$1$k$?$a$NC1=c$J%F%/%K%C%/$,$"$k!%(B 1643 $B$^$/9T$J$&$?$a$N%7%s%W%k$J%F%/%K%C%/$,$"$k!%(B
1643 1644
1644 %Give your patches descriptive names. A good name for a patch might be 1645 %Give your patches descriptive names. A good name for a patch might be
1645 %\filename{rework-device-alloc.patch}, because it will immediately give 1646 %\filename{rework-device-alloc.patch}, because it will immediately give
1646 %you a hint what the purpose of the patch is. Long names shouldn't be a 1647 %you a hint what the purpose of the patch is. Long names shouldn't be a
1647 %problem; you won't be typing the names often, but you \emph{will} be 1648 %problem; you won't be typing the names often, but you \emph{will} be