annotate ja/mq-ref.tex @ 303:268c49158a81

more undo.tex
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sat, 09 Feb 2008 00:13:30 +0900
parents 3b1291f24c0d
children 5b5aeb1c5f2f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 \chapter{Mercurial Queues reference}
224
34943a3d50d6 Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents: 104
diff changeset
2 \label{chap:mqref}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4 \section{MQ command reference}
224
34943a3d50d6 Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents: 104
diff changeset
5 \label{sec:mqref:cmdref}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7 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
8 \hgcmdargs{help}{mq}.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
10 \subsection{\hgxcmd{mq}{qapplied}---print applied patches}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
12 The \hgxcmd{mq}{qapplied} command prints the current stack of applied
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13 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
14 patch in the list is the ``top'' patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
16 \subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue repository}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
18 The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 \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
20 \sdirname{.hg/patches} directory is a repository, i.e.~you created the
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
21 directory using \hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} or ran
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
22 \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
23
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
24 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
25
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
26 \subsection{\hgxcmd{mq}{qdelete}---delete a patch from the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
27 \sfilename{series} file}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
28
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
29 The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
30 \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
31 does not pop the patch if the patch is already applied. By default,
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
32 it does not delete the patch file; use the \hgxopt{mq}{qdel}{-f} option to
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
33 do that.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
34
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
35 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
36 \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
37 \item[\hgxopt{mq}{qdel}{-f}] Delete the patch file.
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
38 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
39
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
40 \subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
41
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
42 The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch.
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
43 It is equivalent to \hgcmdargs{diff}{-r-2:-1}.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
44
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
45 \subsection{\hgxcmd{mq}{qfold}---merge (``fold'') several patches into one}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
46
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
47 The \hgxcmd{mq}{qfold} command merges multiple patches into the topmost
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
48 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
49 all of the changes in the patches in question.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
50
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
51 The patches to fold must not be applied; \hgxcmd{mq}{qfold} will exit with
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
52 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
53 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
54 patch, followed by \texttt{a}, followed by \texttt{b}''.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
55
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
56 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
57 the destination patch, with each block of comments separated by three
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
58 asterisk (``\texttt{*}'') characters. Use the \hgxopt{mq}{qfold}{-e}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
59 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
60 after the folding has completed.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
61
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
62 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
63 \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
64 \item[\hgxopt{mq}{qfold}{-e}] Edit the commit message and patch description
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
65 for the newly folded patch.
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
66 \item[\hgxopt{mq}{qfold}{-l}] Use the contents of the given file as the new
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
67 commit message and patch description for the folded patch.
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
68 \item[\hgxopt{mq}{qfold}{-m}] Use the given text as the new commit message
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
69 and patch description for the folded patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
70 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
71
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
72 \subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
73
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
74 The \hgxcmd{mq}{qheader} command prints the header, or description, of a
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
75 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
76 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
77
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
78 \subsection{\hgxcmd{mq}{qimport}---import a third-party patch into the queue}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
79
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
80 The \hgxcmd{mq}{qimport} command adds an entry for an external patch to the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
81 \sfilename{series} file, and copies the patch into the
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
82 \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
83 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
84
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
85 If the \sdirname{.hg/patches} directory is a repository,
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
86 \hgxcmd{mq}{qimport} automatically does an \hgcmd{add} of the imported
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
87 patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
88
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
89 \subsection{\hgxcmd{mq}{qinit}---prepare a repository to work with MQ}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
90
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
91 The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ. It
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
92 creates a directory called \sdirname{.hg/patches}.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
93
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
94 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
95 \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
96 \item[\hgxopt{mq}{qinit}{-c}] Create \sdirname{.hg/patches} as a repository
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
97 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
98 will ignore the \sfilename{status} file.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
99 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
100
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
101 When the \sdirname{.hg/patches} directory is a repository, the
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
102 \hgxcmd{mq}{qimport} and \hgxcmd{mq}{qnew} commands automatically \hgcmd{add}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
103 new patches.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
104
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
105 \subsection{\hgxcmd{mq}{qnew}---create a new patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
106
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
107 The \hgxcmd{mq}{qnew} command creates a new patch. It takes one mandatory
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
108 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
109 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
110 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
111 pushed on top of that patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
112
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
113 If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
114 refuse to create a new patch unless the \hgxopt{mq}{qnew}{-f} option is
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
115 used (see below). This behaviour allows you to \hgxcmd{mq}{qrefresh} your
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
116 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
117
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
118 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
119 \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
120 \item[\hgxopt{mq}{qnew}{-f}] Create a new patch if the contents of the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
121 working directory are modified. Any outstanding modifications are
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
122 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
123 the working directory will no longer be modified.
234
30e97616d808 Tag all MQ command options as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 233
diff changeset
124 \item[\hgxopt{mq}{qnew}{-m}] Use the given text as the commit message.
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
125 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
126 the patch data.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
127 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
128
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
129 \subsection{\hgxcmd{mq}{qnext}---print the name of the next patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
130
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
131 The \hgxcmd{mq}{qnext} command prints the name name of the next patch in
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
132 the \sfilename{series} file after the topmost applied patch. This
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
133 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
134
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
135 \subsection{\hgxcmd{mq}{qpop}---pop patches off the stack}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
136
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
137 The \hgxcmd{mq}{qpop} command removes applied patches from the top of the
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
138 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
139
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
140 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
141 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
142 effects of the patches.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
143
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
144 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
145 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
146 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
147 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
148 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
149 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
150 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
151
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
152 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
153 \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
154 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
155 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
156 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
157
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
158 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
159 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
160 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
161 the working directory.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
162
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
163 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
164 \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
165 \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
166 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
167 \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
168 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
169 \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
170 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
171
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
172 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
173 \sfilename{status} file for each patch that it pops.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
174
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
175 \subsection{\hgxcmd{mq}{qprev}---print the name of the previous patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
176
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
177 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
178 \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
179 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
180
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
181 \subsection{\hgxcmd{mq}{qpush}---push patches onto the stack}
224
34943a3d50d6 Start writing up extensions. Begin with inotify.
Bryan O'Sullivan <bos@serpentine.com>
parents: 104
diff changeset
182 \label{sec:mqref:cmd:qpush}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
183
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
184 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
185 default, it adds only one patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
186
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
187 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
188 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
189
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
190 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
191 \begin{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
192 \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
193 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
194 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
195 \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
196 different identity than the changeset you popped.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
197 \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
198 command.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
199 \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
200 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
201 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
202 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
203 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
204 information in the patch header overrides these defaults.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
205
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
206 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
207 \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
208 \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
209 \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
210 \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
211 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
212 \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
213 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
214 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
215 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
216 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
217 \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
218 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
219
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
220 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
221 \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
222 file for each patch that it pushes.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
223
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
224 \subsection{\hgxcmd{mq}{qrefresh}---update the topmost applied patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
225
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
226 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
227 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
228 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
229
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
230 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
231 \begin{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
232 \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
233 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
234 that represents the patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
235 \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
236 added to the patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
237 \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
238 \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
239 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
240 sources are removed.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
241 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
242
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
243 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
244 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
245 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
246 patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
247
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
248 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
249 \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
250 \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
251 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
252 \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
253 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
254 \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
255 description, using text from the given file.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
256 \end{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
257
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
258 \subsection{\hgxcmd{mq}{qrename}---rename a patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
259
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
260 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
261 the patch in the \sfilename{series} file.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
262
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
263 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
264 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
265 second.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
266
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
267 \subsection{\hgxcmd{mq}{qrestore}---restore saved queue state}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
268
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
269 XXX No idea what this does.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
270
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
271 \subsection{\hgxcmd{mq}{qsave}---save current queue state}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
272
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
273 XXX Likewise.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
274
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
275 \subsection{\hgxcmd{mq}{qseries}---print the entire patch series}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
276
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
277 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
278 \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
279 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
280
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
281 \subsection{\hgxcmd{mq}{qtop}---print the name of the current patch}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
282
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
283 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
284 patch.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
285
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
286 \subsection{\hgxcmd{mq}{qunapplied}---print patches not yet applied}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
287
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
288 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
289 \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
290 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
291
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
292 \subsection{\hgxcmd{mq}{qversion}}
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
293
233
696b1e0c01df Tag all MQ commands as belonging to the mq extension.
Bryan O'Sullivan <bos@serpentine.com>
parents: 224
diff changeset
294 The \hgxcmd{mq}{qversion} command prints the version of MQ that is in use.
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
295
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
296 \subsection{\hgcmd{strip}---remove a revision and descendants}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
297
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
298 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
299 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
300 removed revisions from the repository, and updates the working
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
301 directory to the first parent of the removed revision.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
302
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
303 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
304 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
305
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
306 Options:
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
307 \begin{itemize}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
308 \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
309 with the stripped changesets in the backup bundle.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
310 \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
311 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
312 when there are pending changes.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
313 \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
314 \end{itemize}
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 \section{MQ file reference}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
317
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
318 \subsection{The \sfilename{series} file}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
319
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
320 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
321 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
322 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
323 line are ignored.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
324
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
325 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
326 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
327 that contain only comments, are ignored.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
328
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
329 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
330 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
331 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
332 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
333 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
334 \sfilename{series} file.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
335
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
336 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
337 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
338 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
339 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
340 will be done for you automatically.
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
341
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
342 \subsection{The \sfilename{status} file}
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
343
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
344 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
345 all patches that MQ currently has applied. Unlike the
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
346 \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
347 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
348 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
349
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
350 %%% Local Variables:
293
3b1291f24c0d - replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
351 %%% mode: yatex
104
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
352 %%% TeX-master: "00book"
32bf9a5f22c0 Refactor MQ chapter into three.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
353 %%% End: