Mercurial > hgbook
annotate en/mq-ref.tex @ 153:cf24633b8de7
Set up simple distribution rules.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 12 Mar 2007 21:10:19 -0700 |
parents | 32bf9a5f22c0 |
children | 34943a3d50d6 |
rev | line source |
---|---|
104
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 \chapter{Mercurial Queues reference} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 \section{MQ command reference} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 \label{sec:mq:cmdref} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 For an overview of the commands provided by MQ, use the command |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 \hgcmdargs{help}{mq}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 \subsection{\hgcmd{qapplied}---print applied patches} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 The \hgcmd{qapplied} command prints the current stack of applied |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 patches. Patches are printed in oldest-to-newest order, so the last |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 patch in the list is the ``top'' patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
15 \subsection{\hgcmd{qcommit}---commit changes in the queue repository} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
16 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 The \hgcmd{qcommit} command commits any outstanding changes in the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 \sdirname{.hg/patches} repository. This command only works if the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 \sdirname{.hg/patches} directory is a repository, i.e.~you created the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 directory using \hgcmdargs{qinit}{\hgopt{qinit}{-c}} or ran |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 \hgcmd{init} in the directory after running \hgcmd{qinit}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
23 This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
24 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
25 \subsection{\hgcmd{qdelete}---delete a patch from the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
26 \sfilename{series} file} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
27 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
28 The \hgcmd{qdelete} command removes the entry for a patch from the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
29 \sfilename{series} file in the \sdirname{.hg/patches} directory. It |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
30 does not pop the patch if the patch is already applied. By default, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
31 it does not delete the patch file; use the \hgopt{qdel}{-f} option to |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
32 do that. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
33 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
34 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
35 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
36 \item[\hgopt{qdel}{-f}] Delete the patch file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
37 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
38 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
39 \subsection{\hgcmd{qdiff}---print a diff of the topmost applied patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
40 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
41 The \hgcmd{qdiff} command prints a diff of the topmost applied patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
42 It is equivalent to \hgcmdargs{diff}{-r-2:-1}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
43 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
44 \subsection{\hgcmd{qfold}---merge (``fold'') several patches into one} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
45 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
46 The \hgcmd{qfold} command merges multiple patches into the topmost |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
47 applied patch, so that the topmost applied patch makes the union of |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
48 all of the changes in the patches in question. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
49 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
50 The patches to fold must not be applied; \hgcmd{qfold} will exit with |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
51 an error if any is. The order in which patches are folded is |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
52 significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
53 patch, followed by \texttt{a}, followed by \texttt{b}''. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
54 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
55 The comments from the folded patches are appended to the comments of |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
56 the destination patch, with each block of comments separated by three |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
57 asterisk (``\texttt{*}'') characters. Use the \hgopt{qfold}{-e} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
58 option to edit the commit message for the combined patch/changeset |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
59 after the folding has completed. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
60 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
61 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
62 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
63 \item[\hgopt{qfold}{-e}] Edit the commit message and patch description |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
64 for the newly folded patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
65 \item[\hgopt{qfold}{-l}] Use the contents of the given file as the new |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
66 commit message and patch description for the folded patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
67 \item[\hgopt{qfold}{-m}] Use the given text as the new commit message |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
68 and patch description for the folded patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
69 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
70 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
71 \subsection{\hgcmd{qheader}---display the header/description of a patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
72 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
73 The \hgcmd{qheader} command prints the header, or description, of a |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
74 patch. By default, it prints the header of the topmost applied patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
75 Given an argument, it prints the header of the named patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
76 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
77 \subsection{\hgcmd{qimport}---import a third-party patch into the queue} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
78 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
79 The \hgcmd{qimport} command adds an entry for an external patch to the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
80 \sfilename{series} file, and copies the patch into the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
81 \sdirname{.hg/patches} directory. It adds the entry immediately after |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
82 the topmost applied patch, but does not push the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
83 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
84 If the \sdirname{.hg/patches} directory is a repository, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
85 \hgcmd{qimport} automatically does an \hgcmd{add} of the imported |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
86 patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
87 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
88 \subsection{\hgcmd{qinit}---prepare a repository to work with MQ} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
89 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
90 The \hgcmd{qinit} command prepares a repository to work with MQ. It |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
91 creates a directory called \sdirname{.hg/patches}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
92 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
93 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
94 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
95 \item[\hgopt{qinit}{-c}] Create \sdirname{.hg/patches} as a repository |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
96 in its own right. Also creates a \sfilename{.hgignore} file that |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
97 will ignore the \sfilename{status} file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
98 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
99 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
100 When the \sdirname{.hg/patches} directory is a repository, the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
101 \hgcmd{qimport} and \hgcmd{qnew} commands automatically \hgcmd{add} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
102 new patches. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
103 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
104 \subsection{\hgcmd{qnew}---create a new patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
105 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
106 The \hgcmd{qnew} command creates a new patch. It takes one mandatory |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
107 argument, the name to use for the patch file. The newly created patch |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
108 is created empty by default. It is added to the \sfilename{series} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
109 file after the current topmost applied patch, and is immediately |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
110 pushed on top of that patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
111 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
112 If \hgcmd{qnew} finds modified files in the working directory, it will |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
113 refuse to create a new patch unless the \hgopt{qnew}{-f} option is |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
114 used (see below). This behaviour allows you to \hgcmd{qrefresh} your |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
115 topmost applied patch before you apply a new patch on top of it. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
116 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
117 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
118 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
119 \item[\hgopt{qnew}{-f}] Create a new patch if the contents of the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
120 working directory are modified. Any outstanding modifications are |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
121 added to the newly created patch, so after this command completes, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
122 the working directory will no longer be modified. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
123 \item[\hgopt{qnew}{-m}] Use the given text as the commit message. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
124 This text will be stored at the beginning of the patch file, before |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
125 the patch data. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
126 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
127 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
128 \subsection{\hgcmd{qnext}---print the name of the next patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
129 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
130 The \hgcmd{qnext} command prints the name name of the next patch in |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
131 the \sfilename{series} file after the topmost applied patch. This |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
132 patch will become the topmost applied patch if you run \hgcmd{qpush}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
133 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
134 \subsection{\hgcmd{qpop}---pop patches off the stack} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
135 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
136 The \hgcmd{qpop} command removes applied patches from the top of the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
137 stack of applied patches. By default, it removes only one patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
138 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
139 This command removes the changesets that represent the popped patches |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
140 from the repository, and updates the working directory to undo the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
141 effects of the patches. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
142 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
143 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
|
144 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
|
145 until the named patch is the topmost applied patch. If given a |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
146 number, \hgcmd{qpop} treats the number as an index into the entries in |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
147 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
|
148 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
|
149 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
|
150 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
151 The \hgcmd{qpop} command does not read or write patches or the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
152 \sfilename{series} file. It is thus safe to \hgcmd{qpop} a patch that |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
153 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
|
154 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
|
155 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
|
156 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
157 By default, the \hgcmd{qpop} command will not pop any patches if the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
158 working directory has been modified. You can override this behaviour |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
159 using the \hgopt{qpop}{-f} option, which reverts all modifications in |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
160 the working directory. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
161 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
162 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
163 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
164 \item[\hgopt{qpop}{-a}] Pop all applied patches. This returns the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
165 repository to its state before you applied any patches. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
166 \item[\hgopt{qpop}{-f}] Forcibly revert any modifications to the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
167 working directory when popping. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
168 \item[\hgopt{qpop}{-n}] Pop a patch from the named queue. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
169 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
170 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
171 The \hgcmd{qpop} command removes one line from the end of the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
172 \sfilename{status} file for each patch that it pops. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
173 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
174 \subsection{\hgcmd{qprev}---print the name of the previous patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
175 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
176 The \hgcmd{qprev} command prints the name of the patch in the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
177 \sfilename{series} file that comes before the topmost applied patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
178 This will become the topmost applied patch if you run \hgcmd{qpop}. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
179 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
180 \subsection{\hgcmd{qpush}---push patches onto the stack} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
181 \label{sec:mq:cmd:qpush} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
182 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
183 The \hgcmd{qpush} command adds patches onto the applied stack. By |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
184 default, it adds only one patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
185 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
186 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
|
187 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
|
188 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
189 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
|
190 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
191 \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
|
192 zone. Because these data are used to compute the identity of a |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
193 changeset, this means that if you \hgcmd{qpop} a patch and |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
194 \hgcmd{qpush} it again, the changeset that you push will have a |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
195 different identity than the changeset you popped. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
196 \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
|
197 command. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
198 \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
|
199 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
|
200 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
|
201 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
202 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
|
203 information in the patch header overrides these defaults. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
204 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
205 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
206 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
207 \item[\hgopt{qpush}{-a}] Push all unapplied patches from the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
208 \sfilename{series} file until there are none left to push. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
209 \item[\hgopt{qpush}{-l}] Add the name of the patch to the end |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
210 of the commit message. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
211 \item[\hgopt{qpush}{-m}] If a patch fails to apply cleanly, use the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
212 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
|
213 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
|
214 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
|
215 as the new patch content. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
216 \item[\hgopt{qpush}{-n}] Use the named queue if merging while pushing. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
217 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
218 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
219 The \hgcmd{qpush} command reads, but does not modify, the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
220 \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
|
221 file for each patch that it pushes. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
222 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
223 \subsection{\hgcmd{qrefresh}---update the topmost applied patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
224 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
225 The \hgcmd{qrefresh} command updates the topmost applied patch. It |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
226 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
|
227 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
|
228 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
229 The \hgcmd{qrefresh} command looks for the following modifications: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
230 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
231 \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
|
232 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
|
233 that represents the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
234 \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
|
235 added to the patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
236 \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
|
237 \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
|
238 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
|
239 sources are removed. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
240 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
241 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
242 Even if \hgcmd{qrefresh} detects no changes, it still recreates the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
243 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
|
244 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
|
245 patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
246 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
247 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
248 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
249 \item[\hgopt{qrefresh}{-e}] Modify the commit and patch description, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
250 using the preferred text editor. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
251 \item[\hgopt{qrefresh}{-m}] Modify the commit message and patch |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
252 description, using the given text. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
253 \item[\hgopt{qrefresh}{-l}] Modify the commit message and patch |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
254 description, using text from the given file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
255 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
256 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
257 \subsection{\hgcmd{qrename}---rename a patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
258 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
259 The \hgcmd{qrename} command renames a patch, and changes the entry for |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
260 the patch in the \sfilename{series} file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
261 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
262 With a single argument, \hgcmd{qrename} renames the topmost applied |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
263 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
|
264 second. |
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 \subsection{\hgcmd{qrestore}---restore saved queue state} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
267 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
268 XXX No idea what this does. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
269 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
270 \subsection{\hgcmd{qsave}---save current queue state} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
271 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
272 XXX Likewise. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
273 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
274 \subsection{\hgcmd{qseries}---print the entire patch series} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
275 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
276 The \hgcmd{qseries} command prints the entire patch series from the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
277 \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
|
278 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
|
279 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
280 \subsection{\hgcmd{qtop}---print the name of the current patch} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
281 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
282 The \hgcmd{qtop} prints the name of the topmost currently applied |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
283 patch. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
284 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
285 \subsection{\hgcmd{qunapplied}---print patches not yet applied} |
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 The \hgcmd{qunapplied} command prints the names of patches from the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
288 \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
|
289 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
|
290 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
291 \subsection{\hgcmd{qversion}} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
292 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
293 The \hgcmd{qversion} command prints the version of MQ that is in use. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
294 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
295 \subsection{\hgcmd{strip}---remove a revision and descendants} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
296 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
297 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
|
298 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
|
299 removed revisions from the repository, and updates the working |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
300 directory to the first parent of the removed revision. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
301 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
302 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
|
303 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
|
304 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
305 Options: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
306 \begin{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
307 \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
|
308 with the stripped changesets in the backup bundle. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
309 \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
|
310 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
|
311 when there are pending changes. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
312 \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
|
313 \end{itemize} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
314 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
315 \section{MQ file reference} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
316 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
317 \subsection{The \sfilename{series} file} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
318 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
319 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
|
320 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
|
321 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
|
322 line are ignored. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
323 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
324 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
|
325 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
|
326 that contain only comments, are ignored. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
327 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
328 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
|
329 the support for comments and empty lines noted above. For example, |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
330 you can comment out a patch temporarily, and \hgcmd{qpush} will skip |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
331 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
|
332 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
|
333 \sfilename{series} file. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
334 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
335 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
|
336 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
|
337 refers to under revision control, as well. If you create a patch |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
338 directory using the \hgopt{qinit}{-c} option to \hgcmd{qinit}, this |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
339 will be done for you automatically. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
340 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
341 \subsection{The \sfilename{status} file} |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
342 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
343 The \sfilename{status} file contains the names and changeset hashes of |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
344 all patches that MQ currently has applied. Unlike the |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
345 \sfilename{series} file, this file is not intended for editing. You |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
346 should not place this file under revision control, or modify it in any |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
347 way. It is used by MQ strictly for internal book-keeping. |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
348 |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
349 %%% Local Variables: |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
350 %%% mode: latex |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
351 %%% TeX-master: "00book" |
32bf9a5f22c0
Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
352 %%% End: |