hgbook

diff en/mq-ref.tex @ 233:696b1e0c01df

Tag all MQ commands as belonging to the mq extension.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun May 27 09:41:55 2007 -0700 (2007-05-27)
parents 34943a3d50d6
children 30e97616d808
line diff
     1.1 --- a/en/mq-ref.tex	Tue May 15 16:24:20 2007 -0700
     1.2 +++ b/en/mq-ref.tex	Sun May 27 09:41:55 2007 -0700
     1.3 @@ -7,26 +7,26 @@
     1.4  For an overview of the commands provided by MQ, use the command
     1.5  \hgcmdargs{help}{mq}.
     1.6  
     1.7 -\subsection{\hgcmd{qapplied}---print applied patches}
     1.8 -
     1.9 -The \hgcmd{qapplied} command prints the current stack of applied
    1.10 +\subsection{\hgxcmd{mq}{qapplied}---print applied patches}
    1.11 +
    1.12 +The \hgxcmd{mq}{qapplied} command prints the current stack of applied
    1.13  patches.  Patches are printed in oldest-to-newest order, so the last
    1.14  patch in the list is the ``top'' patch.
    1.15  
    1.16 -\subsection{\hgcmd{qcommit}---commit changes in the queue repository}
    1.17 -
    1.18 -The \hgcmd{qcommit} command commits any outstanding changes in the
    1.19 +\subsection{\hgxcmd{mq}{qcommit}---commit changes in the queue repository}
    1.20 +
    1.21 +The \hgxcmd{mq}{qcommit} command commits any outstanding changes in the
    1.22  \sdirname{.hg/patches} repository.  This command only works if the
    1.23  \sdirname{.hg/patches} directory is a repository, i.e.~you created the
    1.24  directory using \hgcmdargs{qinit}{\hgopt{qinit}{-c}} or ran
    1.25 -\hgcmd{init} in the directory after running \hgcmd{qinit}.
    1.26 +\hgcmd{init} in the directory after running \hgxcmd{mq}{qinit}.
    1.27  
    1.28  This command is shorthand for \hgcmdargs{commit}{--cwd .hg/patches}.
    1.29  
    1.30 -\subsection{\hgcmd{qdelete}---delete a patch from the
    1.31 +\subsection{\hgxcmd{mq}{qdelete}---delete a patch from the
    1.32    \sfilename{series} file}
    1.33  
    1.34 -The \hgcmd{qdelete} command removes the entry for a patch from the
    1.35 +The \hgxcmd{mq}{qdelete} command removes the entry for a patch from the
    1.36  \sfilename{series} file in the \sdirname{.hg/patches} directory.  It
    1.37  does not pop the patch if the patch is already applied.  By default,
    1.38  it does not delete the patch file; use the \hgopt{qdel}{-f} option to
    1.39 @@ -37,18 +37,18 @@
    1.40  \item[\hgopt{qdel}{-f}] Delete the patch file.
    1.41  \end{itemize}
    1.42  
    1.43 -\subsection{\hgcmd{qdiff}---print a diff of the topmost applied patch}
    1.44 -
    1.45 -The \hgcmd{qdiff} command prints a diff of the topmost applied patch.
    1.46 +\subsection{\hgxcmd{mq}{qdiff}---print a diff of the topmost applied patch}
    1.47 +
    1.48 +The \hgxcmd{mq}{qdiff} command prints a diff of the topmost applied patch.
    1.49  It is equivalent to \hgcmdargs{diff}{-r-2:-1}.
    1.50  
    1.51 -\subsection{\hgcmd{qfold}---merge (``fold'') several patches into one}
    1.52 -
    1.53 -The \hgcmd{qfold} command merges multiple patches into the topmost
    1.54 +\subsection{\hgxcmd{mq}{qfold}---merge (``fold'') several patches into one}
    1.55 +
    1.56 +The \hgxcmd{mq}{qfold} command merges multiple patches into the topmost
    1.57  applied patch, so that the topmost applied patch makes the union of
    1.58  all of the changes in the patches in question.
    1.59  
    1.60 -The patches to fold must not be applied; \hgcmd{qfold} will exit with
    1.61 +The patches to fold must not be applied; \hgxcmd{mq}{qfold} will exit with
    1.62  an error if any is.  The order in which patches are folded is
    1.63  significant; \hgcmdargs{qfold}{a b} means ``apply the current topmost
    1.64  patch, followed by \texttt{a}, followed by \texttt{b}''.
    1.65 @@ -69,26 +69,26 @@
    1.66    and patch description for the folded patch.
    1.67  \end{itemize}
    1.68  
    1.69 -\subsection{\hgcmd{qheader}---display the header/description of a patch}
    1.70 -
    1.71 -The \hgcmd{qheader} command prints the header, or description, of a
    1.72 +\subsection{\hgxcmd{mq}{qheader}---display the header/description of a patch}
    1.73 +
    1.74 +The \hgxcmd{mq}{qheader} command prints the header, or description, of a
    1.75  patch.  By default, it prints the header of the topmost applied patch.
    1.76  Given an argument, it prints the header of the named patch.
    1.77  
    1.78 -\subsection{\hgcmd{qimport}---import a third-party patch into the queue}
    1.79 -
    1.80 -The \hgcmd{qimport} command adds an entry for an external patch to the
    1.81 +\subsection{\hgxcmd{mq}{qimport}---import a third-party patch into the queue}
    1.82 +
    1.83 +The \hgxcmd{mq}{qimport} command adds an entry for an external patch to the
    1.84  \sfilename{series} file, and copies the patch into the
    1.85  \sdirname{.hg/patches} directory.  It adds the entry immediately after
    1.86  the topmost applied patch, but does not push the patch.
    1.87  
    1.88  If the \sdirname{.hg/patches} directory is a repository,
    1.89 -\hgcmd{qimport} automatically does an \hgcmd{add} of the imported
    1.90 +\hgxcmd{mq}{qimport} automatically does an \hgcmd{add} of the imported
    1.91  patch.
    1.92  
    1.93 -\subsection{\hgcmd{qinit}---prepare a repository to work with MQ}
    1.94 -
    1.95 -The \hgcmd{qinit} command prepares a repository to work with MQ.  It
    1.96 +\subsection{\hgxcmd{mq}{qinit}---prepare a repository to work with MQ}
    1.97 +
    1.98 +The \hgxcmd{mq}{qinit} command prepares a repository to work with MQ.  It
    1.99  creates a directory called \sdirname{.hg/patches}.
   1.100  
   1.101  Options:
   1.102 @@ -99,20 +99,20 @@
   1.103  \end{itemize}
   1.104  
   1.105  When the \sdirname{.hg/patches} directory is a repository, the
   1.106 -\hgcmd{qimport} and \hgcmd{qnew} commands automatically \hgcmd{add}
   1.107 +\hgxcmd{mq}{qimport} and \hgxcmd{mq}{qnew} commands automatically \hgcmd{add}
   1.108  new patches.
   1.109  
   1.110 -\subsection{\hgcmd{qnew}---create a new patch}
   1.111 -
   1.112 -The \hgcmd{qnew} command creates a new patch.  It takes one mandatory
   1.113 +\subsection{\hgxcmd{mq}{qnew}---create a new patch}
   1.114 +
   1.115 +The \hgxcmd{mq}{qnew} command creates a new patch.  It takes one mandatory
   1.116  argument, the name to use for the patch file.  The newly created patch
   1.117  is created empty by default.  It is added to the \sfilename{series}
   1.118  file after the current topmost applied patch, and is immediately
   1.119  pushed on top of that patch.
   1.120  
   1.121 -If \hgcmd{qnew} finds modified files in the working directory, it will
   1.122 +If \hgxcmd{mq}{qnew} finds modified files in the working directory, it will
   1.123  refuse to create a new patch unless the \hgopt{qnew}{-f} option is
   1.124 -used (see below).  This behaviour allows you to \hgcmd{qrefresh} your
   1.125 +used (see below).  This behaviour allows you to \hgxcmd{mq}{qrefresh} your
   1.126  topmost applied patch before you apply a new patch on top of it.
   1.127  
   1.128  Options:
   1.129 @@ -126,15 +126,15 @@
   1.130    the patch data.
   1.131  \end{itemize}
   1.132  
   1.133 -\subsection{\hgcmd{qnext}---print the name of the next patch}
   1.134 -
   1.135 -The \hgcmd{qnext} command prints the name name of the next patch in
   1.136 +\subsection{\hgxcmd{mq}{qnext}---print the name of the next patch}
   1.137 +
   1.138 +The \hgxcmd{mq}{qnext} command prints the name name of the next patch in
   1.139  the \sfilename{series} file after the topmost applied patch.  This
   1.140 -patch will become the topmost applied patch if you run \hgcmd{qpush}.
   1.141 -
   1.142 -\subsection{\hgcmd{qpop}---pop patches off the stack}
   1.143 -
   1.144 -The \hgcmd{qpop} command removes applied patches from the top of the
   1.145 +patch will become the topmost applied patch if you run \hgxcmd{mq}{qpush}.
   1.146 +
   1.147 +\subsection{\hgxcmd{mq}{qpop}---pop patches off the stack}
   1.148 +
   1.149 +The \hgxcmd{mq}{qpop} command removes applied patches from the top of the
   1.150  stack of applied patches.  By default, it removes only one patch.
   1.151  
   1.152  This command removes the changesets that represent the popped patches
   1.153 @@ -144,18 +144,18 @@
   1.154  This command takes an optional argument, which it uses as the name or
   1.155  index of the patch to pop to.  If given a name, it will pop patches
   1.156  until the named patch is the topmost applied patch.  If given a
   1.157 -number, \hgcmd{qpop} treats the number as an index into the entries in
   1.158 +number, \hgxcmd{mq}{qpop} treats the number as an index into the entries in
   1.159  the series file, counting from zero (empty lines and lines containing
   1.160  only comments do not count).  It pops patches until the patch
   1.161  identified by the given index is the topmost applied patch.
   1.162  
   1.163 -The \hgcmd{qpop} command does not read or write patches or the
   1.164 -\sfilename{series} file.  It is thus safe to \hgcmd{qpop} a patch that
   1.165 +The \hgxcmd{mq}{qpop} command does not read or write patches or the
   1.166 +\sfilename{series} file.  It is thus safe to \hgxcmd{mq}{qpop} a patch that
   1.167  you have removed from the \sfilename{series} file, or a patch that you
   1.168  have renamed or deleted entirely.  In the latter two cases, use the
   1.169  name of the patch as it was when you applied it.
   1.170  
   1.171 -By default, the \hgcmd{qpop} command will not pop any patches if the
   1.172 +By default, the \hgxcmd{mq}{qpop} command will not pop any patches if the
   1.173  working directory has been modified.  You can override this behaviour
   1.174  using the \hgopt{qpop}{-f} option, which reverts all modifications in
   1.175  the working directory.
   1.176 @@ -169,19 +169,19 @@
   1.177  \item[\hgopt{qpop}{-n}] Pop a patch from the named queue.
   1.178  \end{itemize}
   1.179  
   1.180 -The \hgcmd{qpop} command removes one line from the end of the
   1.181 +The \hgxcmd{mq}{qpop} command removes one line from the end of the
   1.182  \sfilename{status} file for each patch that it pops.
   1.183  
   1.184 -\subsection{\hgcmd{qprev}---print the name of the previous patch}
   1.185 -
   1.186 -The \hgcmd{qprev} command prints the name of the patch in the
   1.187 +\subsection{\hgxcmd{mq}{qprev}---print the name of the previous patch}
   1.188 +
   1.189 +The \hgxcmd{mq}{qprev} command prints the name of the patch in the
   1.190  \sfilename{series} file that comes before the topmost applied patch.
   1.191 -This will become the topmost applied patch if you run \hgcmd{qpop}.
   1.192 -
   1.193 -\subsection{\hgcmd{qpush}---push patches onto the stack}
   1.194 +This will become the topmost applied patch if you run \hgxcmd{mq}{qpop}.
   1.195 +
   1.196 +\subsection{\hgxcmd{mq}{qpush}---push patches onto the stack}
   1.197  \label{sec:mqref:cmd:qpush}
   1.198  
   1.199 -The \hgcmd{qpush} command adds patches onto the applied stack.  By
   1.200 +The \hgxcmd{mq}{qpush} command adds patches onto the applied stack.  By
   1.201  default, it adds only one patch.
   1.202  
   1.203  This command creates a new changeset to represent each applied patch,
   1.204 @@ -191,8 +191,8 @@
   1.205  \begin{itemize}
   1.206  \item The commit date and time zone are the current date and time
   1.207    zone.  Because these data are used to compute the identity of a
   1.208 -  changeset, this means that if you \hgcmd{qpop} a patch and
   1.209 -  \hgcmd{qpush} it again, the changeset that you push will have a
   1.210 +  changeset, this means that if you \hgxcmd{mq}{qpop} a patch and
   1.211 +  \hgxcmd{mq}{qpush} it again, the changeset that you push will have a
   1.212    different identity than the changeset you popped.
   1.213  \item The author is the same as the default used by the \hgcmd{commit}
   1.214    command.
   1.215 @@ -217,17 +217,17 @@
   1.216  \item[\hgopt{qpush}{-n}] Use the named queue if merging while pushing.
   1.217  \end{itemize}
   1.218  
   1.219 -The \hgcmd{qpush} command reads, but does not modify, the
   1.220 +The \hgxcmd{mq}{qpush} command reads, but does not modify, the
   1.221  \sfilename{series} file.  It appends one line to the \hgcmd{status}
   1.222  file for each patch that it pushes.
   1.223  
   1.224 -\subsection{\hgcmd{qrefresh}---update the topmost applied patch}
   1.225 -
   1.226 -The \hgcmd{qrefresh} command updates the topmost applied patch.  It
   1.227 +\subsection{\hgxcmd{mq}{qrefresh}---update the topmost applied patch}
   1.228 +
   1.229 +The \hgxcmd{mq}{qrefresh} command updates the topmost applied patch.  It
   1.230  modifies the patch, removes the old changeset that represented the
   1.231  patch, and creates a new changeset to represent the modified patch.
   1.232  
   1.233 -The \hgcmd{qrefresh} command looks for the following modifications:
   1.234 +The \hgxcmd{mq}{qrefresh} command looks for the following modifications:
   1.235  \begin{itemize}
   1.236  \item Changes to the commit message, i.e.~the text before the first
   1.237    diff header in the patch file, are reflected in the new changeset
   1.238 @@ -240,7 +240,7 @@
   1.239    sources are removed.
   1.240  \end{itemize}
   1.241  
   1.242 -Even if \hgcmd{qrefresh} detects no changes, it still recreates the
   1.243 +Even if \hgxcmd{mq}{qrefresh} detects no changes, it still recreates the
   1.244  changeset that represents the patch.  This causes the identity of the
   1.245  changeset to differ from the previous changeset that identified the
   1.246  patch.
   1.247 @@ -255,43 +255,43 @@
   1.248    description, using text from the given file.
   1.249  \end{itemize}
   1.250  
   1.251 -\subsection{\hgcmd{qrename}---rename a patch}
   1.252 -
   1.253 -The \hgcmd{qrename} command renames a patch, and changes the entry for
   1.254 +\subsection{\hgxcmd{mq}{qrename}---rename a patch}
   1.255 +
   1.256 +The \hgxcmd{mq}{qrename} command renames a patch, and changes the entry for
   1.257  the patch in the \sfilename{series} file.
   1.258  
   1.259 -With a single argument, \hgcmd{qrename} renames the topmost applied
   1.260 +With a single argument, \hgxcmd{mq}{qrename} renames the topmost applied
   1.261  patch.  With two arguments, it renames its first argument to its
   1.262  second.
   1.263  
   1.264 -\subsection{\hgcmd{qrestore}---restore saved queue state}
   1.265 +\subsection{\hgxcmd{mq}{qrestore}---restore saved queue state}
   1.266  
   1.267  XXX No idea what this does.
   1.268  
   1.269 -\subsection{\hgcmd{qsave}---save current queue state}
   1.270 +\subsection{\hgxcmd{mq}{qsave}---save current queue state}
   1.271  
   1.272  XXX Likewise.
   1.273  
   1.274 -\subsection{\hgcmd{qseries}---print the entire patch series}
   1.275 -
   1.276 -The \hgcmd{qseries} command prints the entire patch series from the
   1.277 +\subsection{\hgxcmd{mq}{qseries}---print the entire patch series}
   1.278 +
   1.279 +The \hgxcmd{mq}{qseries} command prints the entire patch series from the
   1.280  \sfilename{series} file.  It prints only patch names, not empty lines
   1.281  or comments.  It prints in order from first to be applied to last.
   1.282  
   1.283 -\subsection{\hgcmd{qtop}---print the name of the current patch}
   1.284 -
   1.285 -The \hgcmd{qtop} prints the name of the topmost currently applied
   1.286 +\subsection{\hgxcmd{mq}{qtop}---print the name of the current patch}
   1.287 +
   1.288 +The \hgxcmd{mq}{qtop} prints the name of the topmost currently applied
   1.289  patch.
   1.290  
   1.291 -\subsection{\hgcmd{qunapplied}---print patches not yet applied}
   1.292 -
   1.293 -The \hgcmd{qunapplied} command prints the names of patches from the
   1.294 +\subsection{\hgxcmd{mq}{qunapplied}---print patches not yet applied}
   1.295 +
   1.296 +The \hgxcmd{mq}{qunapplied} command prints the names of patches from the
   1.297  \sfilename{series} file that are not yet applied.  It prints them in
   1.298  order from the next patch that will be pushed to the last.
   1.299  
   1.300 -\subsection{\hgcmd{qversion}}
   1.301 -
   1.302 -The \hgcmd{qversion} command prints the version of MQ that is in use.
   1.303 +\subsection{\hgxcmd{mq}{qversion}}
   1.304 +
   1.305 +The \hgxcmd{mq}{qversion} command prints the version of MQ that is in use.
   1.306  
   1.307  \subsection{\hgcmd{strip}---remove a revision and descendants}
   1.308  
   1.309 @@ -328,7 +328,7 @@
   1.310  
   1.311  You will often need to edit the \sfilename{series} file by hand, hence
   1.312  the support for comments and empty lines noted above.  For example,
   1.313 -you can comment out a patch temporarily, and \hgcmd{qpush} will skip
   1.314 +you can comment out a patch temporarily, and \hgxcmd{mq}{qpush} will skip
   1.315  over that patch when applying patches.  You can also change the order
   1.316  in which patches are applied by reordering their entries in the
   1.317  \sfilename{series} file.
   1.318 @@ -336,7 +336,7 @@
   1.319  Placing the \sfilename{series} file under revision control is also
   1.320  supported; it is a good idea to place all of the patches that it
   1.321  refers to under revision control, as well.  If you create a patch
   1.322 -directory using the \hgopt{qinit}{-c} option to \hgcmd{qinit}, this
   1.323 +directory using the \hgopt{qinit}{-c} option to \hgxcmd{mq}{qinit}, this
   1.324  will be done for you automatically.
   1.325  
   1.326  \subsection{The \sfilename{status} file}