Mercurial > hgbook
annotate ja/mq-ref.tex @ 340:48ebf2d7dafe
more mq-ref.tex
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Tue, 03 Jun 2008 20:11:46 +0900 |
parents | 12dde4918d24 |
children | 701429159ba8 |
rev | line source |
---|---|
339 | 1 %\chapter{Mercurial Queues reference} |
2 \chapter{Mercurial Queues $B%j%U%!%l%s%9(B} | |
224
34943a3d50d6
Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents:
104
diff
changeset
|
3 \label{chap:mqref} |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 |
339 | 5 %\section{MQ command reference} |
6 \section{MQ $B%3%^%s%I%j%U%!%l%s%9(B} | |
224
34943a3d50d6
Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents:
104
diff
changeset
|
7 \label{sec:mqref:cmdref} |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 |
339 | 9 %For an overview of the commands provided by MQ, use the command |
10 %\hgcmdargs{help}{mq}. | |
11 | |
12 MQ$B$K$h$C$FDs6!$5$l$k%3%^%s%I$N35MW$K$D$$$F$O(B\hgcmdargs{help}{mq}$B$rMxMQ$5(B | |
13 $B$l$?$$!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 |
339 | 15 %\subsection{\hgxcmd{mq}{qapplied}---print applied patches} |
16 \subsection{\hgxcmd{mq}{qapplied}---$BE,MQ$5$l$?%Q%C%A$NI=<((B} | |
17 | |
18 %The \hgxcmd{mq}{qapplied} command prints the current stack of applied | |
19 %patches. Patches are printed in oldest-to-newest order, so the last | |
20 %patch in the list is the ``top'' patch. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 |
339 | 22 \hgxcmd{mq}{qapplied}$B%3%^%s%I$O!$E,MQ$5$l$?%Q%C%A$N8=:_$N%9%?%C%/$rI=<((B |
23 $B$9$k!%%Q%C%A$O8E$$$b$N$+$i?7$7$$$b$N$N=g$KI=<($5$l$k!%$=$N$?$a!$%j%9%H$N(B | |
24 $B:G8e$N%Q%C%A$O(B``top''$B%Q%C%A$H$J$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 |
339 | 26 %\subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue |
27 %repository} | |
28 \subsection{\hgxcmd{mq}{qcommit}---$B%-%e!<$NCf$NJQ99$r%3%_%C%H$9$k(B | |
29 | |
30 %The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the | |
31 %\sdirname{.hg/patches} repository. This command only works if the | |
32 %\sdirname{.hg/patches} directory is a repository, i.e.~you created the | |
33 %directory using \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} or ran | |
34 %\hgcmd{init} in the directory after running \hgxcmd{mq}{qinit}. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 |
339 | 36 \hgxcmd{mq}{qcommit}$B%3%^%s%I$O!$(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$K$"$k(B |
37 $BV(N)$7$?JQ99$r%3%_%C%H$9$k!%$3$N%3%^%s%I$O(B\sdirname{.hg/patches}$B%G%#%l%/(B | |
38 $B%H%j$,%j%]%8%H%j$N>l9g$K$N$_F0:n$9$k!%Nc$($P(B | |
39 \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}}$B%3%^%s%I$K$h$C$F%G%#%l%/%H%j$r:n$C(B | |
40 $B$?$j!$(B\hgxcmd{mq}{qinit}$B%3%^%s%I$N8e$K(B\hgcmd{init}$B$r<B9T$7$?>l9g$,AjEv$9(B | |
41 $B$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
42 |
339 | 43 %This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}. |
44 | |
45 $B$3$N%3%^%s%I$O(B\hgcmdargs{commit}{--cwd .hg/patches}$B$NC;=L7A$G$"$k!%(B | |
46 | |
47 %\subsection{\hgxcmd{mq}{qdelete}---delete a patch from the | |
48 % \sfilename{series} file} | |
49 \subsection{\hgxcmd{mq}{qdelete}---\sfilename{series}$B%U%!%$%k$+$i%Q%C%A(B | |
50 $B$r>C5n$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
51 |
339 | 52 %The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the |
53 %\sfilename{series} file in the \sdirname{.hg/patches} directory. It | |
54 %does not pop the patch if the patch is already applied. By default, | |
55 %it does not delete the patch file; use the \hgxopt{mq}{qdel}{-f} option to | |
56 %do that. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
57 |
339 | 58 \hgxcmd{mq}{qdelete}$B%3%^%s%I$O(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$N(B |
59 \sfilename{series}$B%U%!%$%k$+$i%Q%C%A$r>C5n$9$k!%%Q%C%A$,4{$KE,MQ$5$l$F$$(B | |
60 $B$k>l9g$O%Q%C%A$r%]%C%W$7$J$$!%%G%U%)%k%H$G$O%Q%C%A%U%!%$%k$r>C5n$7$J$$$?(B | |
61 $B$a!$$=$NMQES$G$O(B\hgxopt{mq}{qdel}{-f}$B%*%W%7%g%s$r;H$&!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
62 |
339 | 63 %Options: |
64 $B%*%W%7%g%s(B: | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
65 \begin{itemize} |
339 | 66 %\item[\hgxopt{mq}{qdel}{-f}] Delete the patch file. |
67 \item[\hgxopt{mq}{qdel}{-f}] $B%Q%C%A$r>C5n$9$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
68 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
69 |
339 | 70 %\subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied |
71 %patch} | |
72 \subsection{\hgxcmd{mq}{qdiff}---$B:G>e0L$NE,MQ$5$l$?%Q%C%A$N(Bdiff$B$r=PNO$9(B | |
73 $B$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
74 |
339 | 75 %The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch. |
76 %It is equivalent to \hgcmdargs{diff}{-r-2:-1}. | |
77 | |
78 \hgxcmd{mq}{qdiff}$B%3%^%s%I$O:G>e0L$NE,MQ$5$l$?%Q%C%A$N(Bdiff$B$r=PNO$9$k!%$3(B | |
79 $B$l$O(B\hgcmdargs{diff}{-r-2:-1}$B$HEy2A$G$"$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
80 |
339 | 81 %\subsection{\hgxcmd{mq}{qfold}---merge (``fold'') several patches into |
82 %one} | |
83 \subsection{\hgxcmd{mq}{qfold}---$B$$$/$D$+$N%Q%C%A$r0l$D$K%^!<%8(B($B$^$?$O(B``fold'')$B$9$k(B} | |
84 | |
85 %The \hgxcmd{mq}{qfold} command merges multiple patches into the topmost | |
86 %applied patch, so that the topmost applied patch makes the union of | |
87 %all of the changes in the patches in question. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
88 |
339 | 89 \hgxcmd{mq}{qfold}$B%3%^%s%I$OJ#?t$N%Q%C%A$rE,MQ$5$l$?:F>e0L$N%Q%C%A$K%^!<(B |
90 $B%8$9$k!%:F>e0L$N%Q%C%A$O4X?4$N$"$k%Q%C%AA4$F$NJQ99$N=89g$K$J$k!%(B | |
91 | |
92 %The patches to fold must not be applied; \hgxcmd{mq}{qfold} will exit with | |
93 %an error if any is. The order in which patches are folded is | |
94 %significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost | |
95 %patch, followed by \texttt{a}, followed by \texttt{b}''. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
96 |
339 | 97 fold$B$9$k%Q%C%A$OE,MQ$5$l$F$$$F$O$J$i$J$$!%(B\hgxcmd{mq}{qfold}$B$O!$$I$l$+$,(B |
98 $BE,MQ$5$l$F$$$k>l9g$O%(%i!<$rJV$7$F=*N;$9$k!%(Bfold$B$5$l$k%Q%C%A$N=g=x$O=EMW(B | |
99 $B$G!$(B\hgcmdargs{qfold}{a b}$B$O!$(B``\texttt{a}, \texttt{b}$B$,B3$$$F$$$k8=:_$N(B | |
100 $B:F>e0L$N%Q%C%A$rE,MQ$9$k(B''$B$H$$$&0UL#$K$J$k!%(B | |
101 | |
102 %The comments from the folded patches are appended to the comments of | |
103 %the destination patch, with each block of comments separated by three | |
104 %asterisk (``\texttt{*}'') characters. Use the \hgxopt{mq}{qfold}{-e} | |
105 %option to edit the commit message for the combined patch/changeset | |
106 %after the folding has completed. | |
107 | |
108 $B%U%)!<%k%I$5$l$?%Q%C%A$N%3%a%s%H$O!$L\E*$N%Q%C%A$N%3%a%s%H$KDI2C$5$l$k!%(B | |
109 $B3F!9$N%3%a%s%H%V%m%C%/$O(B3$B$D$N%"%9%?%j%9%/$K$h$C$FJ,N%$5$l$F$$$k!%(B | |
110 \hgxopt{mq}{qfold}{-e}$B%*%W%7%g%s$K$h$C$F!$%U%)!<%k%I$,40N;$7$?8e$K7k9g$7(B | |
111 $B$?%Q%C%A!?%A%'%s%8%;%C%H$N%3%_%C%H%a%C%;!<%8$rJT=8$9$k$3$H$,$G$-$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
112 |
339 | 113 %Options: |
114 $B%*%W%7%g%s(B: | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
115 \begin{itemize} |
339 | 116 %\item[\hgxopt{mq}{qfold}{-e}] Edit the commit message and patch description |
117 % for the newly folded patch. | |
118 \item[\hgxopt{mq}{qfold}{-e}] $B?7$?$K%U%)!<%k%I$5$l$k%Q%C%A$N%3%_%C%H%a%C(B | |
119 $B%;!<%8$H%Q%C%A$N@bL@$rJT=8$9$k!%(B | |
120 %\item[\hgxopt{mq}{qfold}{-l}] Use the contents of the given file as the new | |
121 % commit message and patch description for the folded patch. | |
122 \item[\hgxopt{mq}{qfold}{-l}] $B%U%)!<%k%I$5$l$?%Q%C%A$N?7$7$$%3%_%C%H%a%C(B | |
123 $B%;!<%85Z$S%Q%C%A$N@bL@$H$7$F!$M?$($i$l$?%U%!(B | |
124 $B%$%k$r;HMQ$9$k!%(B | |
125 %\item[\hgxopt{mq}{qfold}{-m}] Use the given text as the new commit message | |
126 % and patch description for the folded patch. | |
127 \item[\hgxopt{mq}{qfold}{-m}] $B%U%)!<%k%I$5$l$?%Q%C%A$N?7$7$$%3%_%C%H%a%C(B | |
128 $B%;!<%85Z$S%Q%C%A$N@bL@$H$7$F!$M?$($i$l$?%F(B | |
129 $B%-%9%H$rMQ$$$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
130 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
131 |
339 | 132 %\subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch} |
133 \subsection{\hgxcmd{mq}{qheader}---$B%Q%C%A$N%X%C%@!?@bL@$rI=<((B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
134 |
339 | 135 %The \hgxcmd{mq}{qheader} command prints the header, or description, of a |
136 %patch. By default, it prints the header of the topmost applied patch. | |
137 %Given an argument, it prints the header of the named patch. | |
138 | |
139 \hgxcmd{mq}{qheader}$B%3%^%s%I$O%Q%C%A$N%X%C%@$^$?$O@bL@$rI=<($9$k!%%G%U%)(B | |
140 $B%k%H$G$O:F>e0L$KE,MQ$5$l$?%Q%C%A$N%X%C%@$rI=<($9$k!%0z?t$,EO$5$l$k$H!$;X(B | |
141 $BDj$5$l$?%Q%C%A$N%X%C%@$rI=<($9$k(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
142 |
339 | 143 %\subsection{\hgxcmd{mq}{qimport}---import a third-party patch into the |
144 %queue} | |
145 \subsection{\hgxcmd{mq}{qimport}---$B%5!<%I%Q!<%F%#$N%Q%C%A$r%-%e!<$X%$%s(B | |
146 $B%]!<%H$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
147 |
339 | 148 %The \hgxcmd{mq}{qimport} command adds an entry for an external patch to the |
149 %\sfilename{series} file, and copies the patch into the | |
150 %\sdirname{.hg/patches} directory. It adds the entry immediately after | |
151 %the topmost applied patch, but does not push the patch. | |
152 | |
153 \hgxcmd{mq}{qimport}$B%3%^%s%I$O!$(B\sfilename{series}$B%U%!%$%k$K30It$N%Q%C%A(B | |
154 $B$N$?$a$N%(%s%H%j$rDI2C$7!$%Q%C%A$r(B\sdirname{.hg/patches}$B%G%#%l%/%H%j$K%3(B | |
155 $B%T!<$9$k!%DI2C$O:F>e0L$NE,MQ:Q$_%Q%C%A$ND>8e$K9T$o$l!$%Q%C%A$N%W%C%7%e$O(B | |
156 $B9T$o$J$$!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
157 |
339 | 158 %If the \sdirname{.hg/patches} directory is a repository, |
159 %\hgxcmd{mq}{qimport} automatically does an \hgcmd{add} of the imported | |
160 %patch. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
161 |
339 | 162 \sdirname{.hg/patches}$B%G%#%l%/%H%j$,%j%]%8%H%j$N>l(B |
163 $B9g!$(B\hgxcmd{mq}{qimport}$B$O<+F0E*$K%$%s%]!<%H$5$l$?%Q%C%A$KBP$7$F(B | |
164 \hgcmd{add}$B$r9T$&!%(B | |
165 | |
166 %\subsection{\hgxcmd{mq}{qinit}---prepare a repository to work with MQ} | |
167 \subsection{\hgxcmd{mq}{qinit}---MQ$B$G;HMQ$9$k%j%]%8%H%j$rMQ0U$9$k(B} | |
168 | |
169 %The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ. It | |
170 %creates a directory called \sdirname{.hg/patches}. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
171 |
339 | 172 \hgxcmd{mq}{qinit}$B%3%^%s%I$O(BMQ$B$G;HMQ$9$k%j%]%8%H%j$rMQ0U$9(B |
173 $B$k!%(B\sdirname{.hg/patches}$B$H$$$&%G%#%l%/%H%j$,:n$i$l$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
174 |
339 | 175 %Options: |
176 $B%*%W%7%g%s(B: | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
177 \begin{itemize} |
339 | 178 %\item[\hgxopt{mq}{qinit}{-c}] Create \sdirname{.hg/patches} as a repository |
179 % in its own right. Also creates a \sfilename{.hgignore} file that | |
180 % will ignore the \sfilename{status} file. | |
181 \item[\hgxopt{mq}{qinit}{-c}] \sdirname{.hg/patches}$B$r%j%]%8%H%j$H$7$F!$(B | |
182 $B%3%^%s%I<B9T;~$N8"8B$G:n@.$9$k!%F1;~$K(B | |
183 \sfilename{status}$B%U%!%$%k$rL5;k$9$k$?$a$K(B | |
184 \sfilename{.hgignore}$B%U%!%$%k$r:n@.$9$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
185 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
186 |
339 | 187 %When the \sdirname{.hg/patches} directory is a repository, the |
188 %\hgxcmd{mq}{qimport} and \hgxcmd{mq}{qnew} commands automatically \hgcmd{add} | |
189 %new patches. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
190 |
339 | 191 \sdirname{.hg/patches}$B%G%#%l%/%H%j$,%j%]%8%H%j$N>l(B |
192 $B9g!$(B\hgxcmd{mq}{qimport}$B%3%^%s%I$H(B\hgxcmd{mq}{qnew}$B%3%^%s%I$O?7$7$$%Q%C(B | |
193 $B%A$r<+F0E*$K(B\hgcmd{add}$B$9$k!%(B | |
194 | |
195 %\subsection{\hgxcmd{mq}{qnew}---create a new patch} | |
196 \subsection{\hgxcmd{mq}{qnew}---$B?7$7$$%Q%C%A$r:n@.$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
197 |
339 | 198 %The \hgxcmd{mq}{qnew} command creates a new patch. It takes one mandatory |
199 %argument, the name to use for the patch file. The newly created patch | |
200 %is created empty by default. It is added to the \sfilename{series} | |
201 %file after the current topmost applied patch, and is immediately | |
202 %pushed on top of that patch. | |
203 | |
204 \hgxcmd{mq}{qnew}$B%3%^%s%I$O?7$7$$%Q%C%A$r:n@.$9$k!%$3$N%3%^%s%I$OI,?\$N0z(B | |
205 $B?t$H$7$F%Q%C%A%U%!%$%k$H$7$F;HMQ$9$kL>A0$r<h$k!%?75,$K:n@.$5$l$?%Q%C%A(B | |
206 $B$O!$%G%U%)%k%H$G$O6u$G$"$j!$(B\sfilename{series}$B%U%!%$%k$K!$8=:_$N:F>e0L$N(B | |
207 $BE,MQ$5$l$?%Q%C%A$ND>8e$KDI2C$5$l!$D>$A$K$=$N%Q%C%A$N>e$K%W%C%7%e$5$l$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
208 |
339 | 209 %If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will |
210 %refuse to create a new patch unless the \hgxopt{mq}{qnew}{-f} option is | |
211 %used (see below). This behaviour allows you to \hgxcmd{mq}{qrefresh} your | |
212 %topmost applied patch before you apply a new patch on top of it. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
213 |
339 | 214 \hgxcmd{mq}{qnew}$B$O!$%o!<%-%s%0%G%#%l%/%H%j$+$iJQ99$5$l$?%U%!%$%k$r8+$D$1(B |
215 $B$k$H!$(B\hgxopt{mq}{qnew}{-f}$B%*%W%7%g%s!J2<5-$r;2>H!K$,;H$o$l$J$$8B$j?7$7$$(B | |
216 $B%Q%C%A$N:n@.$r5qH]$9$k!%$3$N5sF0$N$?$a!$:F>e0L$NE,MQ$5$l$?%Q%C%A$N>e$K?7(B | |
217 $B$?$J%Q%C%A$rE,MQ$9$kA0$K!$(B\hgxcmd{mq}{qrefresh}$B$9$k$3$H$,$G$-$k!%(B | |
218 | |
219 %Options: | |
220 $B%*%W%7%g%s(B: | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
221 \begin{itemize} |
339 | 222 %\item[\hgxopt{mq}{qnew}{-f}] Create a new patch if the contents of the |
223 % working directory are modified. Any outstanding modifications are | |
224 % added to the newly created patch, so after this command completes, | |
225 % the working directory will no longer be modified. | |
226 \item[\hgxopt{mq}{qnew}{-f}] $B%+%l%s%H%G%#%l%/%H%j$NFbMF$,99?7$5$l$F$$$k(B | |
227 $B>l9g!$?7$7$$%Q%C%A$r:n@.$9$k!%8IN)$7$?JQ2&(B | |
228 $B$O?75,$K:n@.$7$?%Q%C%A$KDI2C$5$l!$$3$N%3%^(B | |
229 $B%s%I$,=*N;$9$k$H%o!<%-%s%0%G%#%l%/%H%j$OJQ(B | |
230 $B99$J$7$N>uBV$K$J$k!%(B | |
231 %\item[\hgxopt{mq}{qnew}{-m}] Use the given text as the commit message. | |
232 % This text will be stored at the beginning of the patch file, before | |
233 % the patch data. | |
234 \item[\hgxopt{mq}{qnew}{-m}] $BM?$($i$l$?%F%-%9%H$r%3%_%C%H%a%C%;!<%8$H$7(B | |
235 $B$FMQ$$$k!%$3$N%F%-%9%H$O%Q%C%A%U%!%$%k$N@h(B | |
236 $BF,$G%G!<%?$NA0$K5-O?$5$l$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
237 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
238 |
339 | 239 %\subsection{\hgxcmd{mq}{qnext}---print the name of the next patch} |
240 \subsection{\hgxcmd{mq}{qnext}---$B<!$N%Q%C%A$NL>A0$rI=<($9$k(B} | |
241 | |
242 %The \hgxcmd{mq}{qnext} command prints the name of the next patch in | |
243 %the \sfilename{series} file after the topmost applied patch. This | |
244 %patch will become the topmost applied patch if you run \hgxcmd{mq}{qpush}. | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
245 |
339 | 246 \hgxcmd{mq}{qnext}$B%3%^%s%I$O(B\sfilename{series}$B%U%!%$%k$N<!$N%Q%C%A$NL>A0(B |
247 $B$rI=<($9$k!%$3$N%Q%C%A$O!$(B\hgxcmd{mq}{qpush}$B$r<B9T$9$k$H:G>e0L$NE,MQ:Q$_(B | |
248 $B%Q%C%A$H$J$k(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
249 |
339 | 250 %\subsection{\hgxcmd{mq}{qpop}---pop patches off the stack} |
251 \subsection{\hgxcmd{mq}{qpop}---$B%9%?%C%/$+$i%Q%C%A$r%]%C%W$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
252 |
340 | 253 %The \hgxcmd{mq}{qpop} command removes applied patches from the top of the |
254 %stack of applied patches. By default, it removes only one patch. | |
255 | |
256 \hgxcmd{mq}{qpop}$B%3%^%s%I$OE,MQ$5$l$?%Q%C%A$N%9%?%C%/$N%H%C%W$+$i%Q%C%A(B | |
257 $B$r=|5n$9$k!%%G%U%)%k%H$G$O%Q%C%A$r(B1$B$D=|5n$9$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
258 |
340 | 259 %This command removes the changesets that represent the popped patches |
260 %from the repository, and updates the working directory to undo the | |
261 %effects of the patches. | |
262 | |
263 $B$3$N%3%^%s%I$O%j%]%8%H%j$+$i%]%C%W$5$l$?%Q%C%A$rI=$9%A%'%s%8%;%C%H$r=|5n(B | |
264 $B$7!$%o!<%-%s%0%G%#%l%/%H%j$r%Q%C%A$N8z2L$r=|5n$9$k$h$&$K99?7$9$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
265 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
266 This command takes an optional argument, which it uses as the name or |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
267 index of the patch to pop to. If given a name, it will pop patches |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
268 until the named patch is the topmost applied patch. If given a |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
269 number, \hgxcmd{mq}{qpop} treats the number as an index into the entries in |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
270 the series file, counting from zero (empty lines and lines containing |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
271 only comments do not count). It pops patches until the patch |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
272 identified by the given index is the topmost applied patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
273 |
340 | 274 $B$3$N%3%^%s%I$O%*%W%7%g%s$N0z?t$r<h$j!$(B |
275 | |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
276 The \hgxcmd{mq}{qpop} command does not read or write patches or the |
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
277 \sfilename{series} file. It is thus safe to \hgxcmd{mq}{qpop} a patch that |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
278 you have removed from the \sfilename{series} file, or a patch that you |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
279 have renamed or deleted entirely. In the latter two cases, use the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
280 name of the patch as it was when you applied it. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
281 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
282 By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
283 working directory has been modified. You can override this behaviour |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
284 using the \hgxopt{mq}{qpop}{-f} option, which reverts all modifications in |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
285 the working directory. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
286 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
287 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
288 \begin{itemize} |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
289 \item[\hgxopt{mq}{qpop}{-a}] Pop all applied patches. This returns the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
290 repository to its state before you applied any patches. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
291 \item[\hgxopt{mq}{qpop}{-f}] Forcibly revert any modifications to the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
292 working directory when popping. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
293 \item[\hgxopt{mq}{qpop}{-n}] Pop a patch from the named queue. |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
294 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
295 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
296 The \hgxcmd{mq}{qpop} command removes one line from the end of the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
297 \sfilename{status} file for each patch that it pops. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
298 |
339 | 299 %\subsection{\hgxcmd{mq}{qprev}---print the name of the previous patch} |
300 \subsection{\hgxcmd{mq}{qprev}---$B0JA0$N%Q%C%A$NL>A0$rI=<($9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
301 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
302 The \hgxcmd{mq}{qprev} command prints the name of the patch in the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
303 \sfilename{series} file that comes before the topmost applied patch. |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
304 This will become the topmost applied patch if you run \hgxcmd{mq}{qpop}. |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
305 |
339 | 306 %\subsection{\hgxcmd{mq}{qpush}---push patches onto the stack} |
307 \subsection{\hgxcmd{mq}{qpush}---$B%Q%C%A$r%9%?%C%/$K%W%C%7%e$9$k(B} | |
224
34943a3d50d6
Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents:
104
diff
changeset
|
308 \label{sec:mqref:cmd:qpush} |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
309 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
310 The \hgxcmd{mq}{qpush} command adds patches onto the applied stack. By |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
311 default, it adds only one patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
312 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
313 This command creates a new changeset to represent each applied patch, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
314 and updates the working directory to apply the effects of the patches. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
315 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
316 The default data used when creating a changeset are as follows: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
317 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
318 \item The commit date and time zone are the current date and time |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
319 zone. Because these data are used to compute the identity of a |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
320 changeset, this means that if you \hgxcmd{mq}{qpop} a patch and |
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
321 \hgxcmd{mq}{qpush} it again, the changeset that you push will have a |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
322 different identity than the changeset you popped. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
323 \item The author is the same as the default used by the \hgcmd{commit} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
324 command. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
325 \item The commit message is any text from the patch file that comes |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
326 before the first diff header. If there is no such text, a default |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
327 commit message is used that identifies the name of the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
328 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
329 If a patch contains a Mercurial patch header (XXX add link), the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
330 information in the patch header overrides these defaults. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
331 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
332 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
333 \begin{itemize} |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
334 \item[\hgxopt{mq}{qpush}{-a}] Push all unapplied patches from the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
335 \sfilename{series} file until there are none left to push. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
336 \item[\hgxopt{mq}{qpush}{-l}] Add the name of the patch to the end |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
337 of the commit message. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
338 \item[\hgxopt{mq}{qpush}{-m}] If a patch fails to apply cleanly, use the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
339 entry for the patch in another saved queue to compute the parameters |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
340 for a three-way merge, and perform a three-way merge using the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
341 normal Mercurial merge machinery. Use the resolution of the merge |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
342 as the new patch content. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
343 \item[\hgxopt{mq}{qpush}{-n}] Use the named queue if merging while pushing. |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
344 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
345 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
346 The \hgxcmd{mq}{qpush} command reads, but does not modify, the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
347 \sfilename{series} file. It appends one line to the \hgcmd{status} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
348 file for each patch that it pushes. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
349 |
339 | 350 %\subsection{\hgxcmd{mq}{qrefresh}---update the topmost applied patch} |
351 \subsection{\hgxcmd{mq}{qrefresh}---$B:F>e0L$NE,MQ:Q$_%Q%C%A$r99?7$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
352 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
353 The \hgxcmd{mq}{qrefresh} command updates the topmost applied patch. It |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
354 modifies the patch, removes the old changeset that represented the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
355 patch, and creates a new changeset to represent the modified patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
356 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
357 The \hgxcmd{mq}{qrefresh} command looks for the following modifications: |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
358 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
359 \item Changes to the commit message, i.e.~the text before the first |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
360 diff header in the patch file, are reflected in the new changeset |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
361 that represents the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
362 \item Modifications to tracked files in the working directory are |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
363 added to the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
364 \item Changes to the files tracked using \hgcmd{add}, \hgcmd{copy}, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
365 \hgcmd{remove}, or \hgcmd{rename}. Added files and copy and rename |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
366 destinations are added to the patch, while removed files and rename |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
367 sources are removed. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
368 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
369 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
370 Even if \hgxcmd{mq}{qrefresh} detects no changes, it still recreates the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
371 changeset that represents the patch. This causes the identity of the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
372 changeset to differ from the previous changeset that identified the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
373 patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
374 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
375 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
376 \begin{itemize} |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
377 \item[\hgxopt{mq}{qrefresh}{-e}] Modify the commit and patch description, |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
378 using the preferred text editor. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
379 \item[\hgxopt{mq}{qrefresh}{-m}] Modify the commit message and patch |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
380 description, using the given text. |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
381 \item[\hgxopt{mq}{qrefresh}{-l}] Modify the commit message and patch |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
382 description, using text from the given file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
383 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
384 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
385 \subsection{\hgxcmd{mq}{qrename}---rename a patch} |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
386 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
387 The \hgxcmd{mq}{qrename} command renames a patch, and changes the entry for |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
388 the patch in the \sfilename{series} file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
389 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
390 With a single argument, \hgxcmd{mq}{qrename} renames the topmost applied |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
391 patch. With two arguments, it renames its first argument to its |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
392 second. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
393 |
339 | 394 %\subsection{\hgxcmd{mq}{qrestore}---restore saved queue state} |
395 \subsection{\hgxcmd{mq}{qrestore}---$B%;!<%V$5$l$?%-%e!<>uBV$KI|85$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
396 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
397 XXX No idea what this does. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
398 |
339 | 399 %\subsection{\hgxcmd{mq}{qsave}---save current queue state} |
400 \subsection{\hgxcmd{mq}{qsave}---$B8=:_$N%-%e!<>uBV$r%;!<%V$9$k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
401 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
402 XXX Likewise. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
403 |
339 | 404 %\subsection{\hgxcmd{mq}{qseries}---print the entire patch series} |
405 \subsection{\hgxcmd{mq}{qseries}---$B%Q%C%A7ONs$rA4$FI=<((B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
406 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
407 The \hgxcmd{mq}{qseries} command prints the entire patch series from the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
408 \sfilename{series} file. It prints only patch names, not empty lines |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
409 or comments. It prints in order from first to be applied to last. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
410 |
339 | 411 %\subsection{\hgxcmd{mq}{qtop}---print the name of the current patch} |
412 \subsection{\hgxcmd{mq}{qtop}---$B8=:_$N%Q%C%A$NL>A0$rI=<((B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
413 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
414 The \hgxcmd{mq}{qtop} prints the name of the topmost currently applied |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
415 patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
416 |
339 | 417 %\subsection{\hgxcmd{mq}{qunapplied}---print patches not yet applied} |
418 \subsection{\hgxcmd{mq}{qunapplied}---$BL$E,MQ$N%Q%C%A$rI=<((B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
419 |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
420 The \hgxcmd{mq}{qunapplied} command prints the names of patches from the |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
421 \sfilename{series} file that are not yet applied. It prints them in |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
422 order from the next patch that will be pushed to the last. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
423 |
339 | 424 %\subsection{\hgcmd{strip}---remove a revision and descendants} |
425 \subsection{\hgcmd{strip}---$B%j%S%8%g%s$H$=$N;RB9$r:o=|(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
426 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
427 The \hgcmd{strip} command removes a revision, and all of its |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
428 descendants, from the repository. It undoes the effects of the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
429 removed revisions from the repository, and updates the working |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
430 directory to the first parent of the removed revision. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
431 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
432 The \hgcmd{strip} command saves a backup of the removed changesets in |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
433 a bundle, so that they can be reapplied if removed in error. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
434 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
435 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
436 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
437 \item[\hgopt{strip}{-b}] Save unrelated changesets that are intermixed |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
438 with the stripped changesets in the backup bundle. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
439 \item[\hgopt{strip}{-f}] If a branch has multiple heads, remove all |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
440 heads. XXX This should be renamed, and use \texttt{-f} to strip revs |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
441 when there are pending changes. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
442 \item[\hgopt{strip}{-n}] Do not save a backup bundle. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
443 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
444 |
339 | 445 %\section{MQ file reference} |
446 \section{MQ $B%U%!%$%k%j%U%!%l%s%9(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
447 |
339 | 448 %\subsection{The \sfilename{series} file} |
449 \subsection{\sfilename{series}$B%U%!%$%k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
450 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
451 The \sfilename{series} file contains a list of the names of all |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
452 patches that MQ can apply. It is represented as a list of names, with |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
453 one name saved per line. Leading and trailing white space in each |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
454 line are ignored. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
455 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
456 Lines may contain comments. A comment begins with the ``\texttt{\#}'' |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
457 character, and extends to the end of the line. Empty lines, and lines |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
458 that contain only comments, are ignored. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
459 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
460 You will often need to edit the \sfilename{series} file by hand, hence |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
461 the support for comments and empty lines noted above. For example, |
233
696b1e0c01df
Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
224
diff
changeset
|
462 you can comment out a patch temporarily, and \hgxcmd{mq}{qpush} will skip |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
463 over that patch when applying patches. You can also change the order |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
464 in which patches are applied by reordering their entries in the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
465 \sfilename{series} file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
466 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
467 Placing the \sfilename{series} file under revision control is also |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
468 supported; it is a good idea to place all of the patches that it |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
469 refers to under revision control, as well. If you create a patch |
234
30e97616d808
Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents:
233
diff
changeset
|
470 directory using the \hgxopt{mq}{qinit}{-c} option to \hgxcmd{mq}{qinit}, this |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
471 will be done for you automatically. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
472 |
339 | 473 %\subsection{The \sfilename{status} file} |
474 \subsection{\sfilename{status}$B%U%!%$%k(B} | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
475 |
340 | 476 %The \sfilename{status} file contains the names and changeset hashes of |
477 %all patches that MQ currently has applied. Unlike the | |
478 %\sfilename{series} file, this file is not intended for editing. You | |
479 %should not place this file under revision control, or modify it in any | |
480 %way. It is used by MQ strictly for internal book-keeping. | |
481 | |
482 \sfilename{status}$B%U%!%$%k$O(BMQ$B$,8=:_E,MQ$7$F$$$k$9$Y$F$N%Q%C%A$NL>A0$H%A%'(B | |
483 $B%s%8%;%C%H%O%C%7%e$r;}$D!%(B\sfilename{series}$B%U%!%$%k$H0c$C$F!$$3$N%U%!%$(B | |
484 $B%k$OJT=8$5$l$k$3$H$r0U?^$7$F$$$J$$!%$3$N%U%!%$%k$O%j%S%8%g%s4IM}$7$?$j!$(B | |
485 $BJT=8$7$?$j$9$Y$-$G$O$J$$!%$3$l$O(BMQ$B$K$h$C$FFbIt$N4IM}$KMQ$$$i$l$k$Y$-$b$N(B | |
486 $B$G$"$k!%(B | |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
487 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
488 %%% Local Variables: |
293
3b1291f24c0d
- replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
290
diff
changeset
|
489 %%% mode: yatex |
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
490 %%% TeX-master: "00book" |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
491 %%% End: |