hgbook
diff en/mq.tex @ 234:30e97616d808
Tag all MQ command options as belonging to the mq extension.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun May 27 09:43:16 2007 -0700 (2007-05-27) |
parents | 696b1e0c01df |
children | 80f387d13bfe |
line diff
1.1 --- a/en/mq.tex Sun May 27 09:41:55 2007 -0700 1.2 +++ b/en/mq.tex Sun May 27 09:43:16 2007 -0700 1.3 @@ -384,8 +384,8 @@ 1.4 1.5 While \hgxcmd{mq}{qpush} and \hgxcmd{mq}{qpop} each operate on a single patch at 1.6 a time by default, you can push and pop many patches in one go. The 1.7 -\hgopt{qpush}{-a} option to \hgxcmd{mq}{qpush} causes it to push all 1.8 -unapplied patches, while the \hgopt{qpop}{-a} option to \hgxcmd{mq}{qpop} 1.9 +\hgxopt{mq}{qpush}{-a} option to \hgxcmd{mq}{qpush} causes it to push all 1.10 +unapplied patches, while the \hgxopt{mq}{qpop}{-a} option to \hgxcmd{mq}{qpop} 1.11 causes it to pop all applied patches. (For some more ways to push and 1.12 pop many patches, see section~\ref{sec:mq:perf} below.) 1.13 1.14 @@ -414,9 +414,9 @@ 1.15 Commands that check the working directory all take an ``I know what 1.16 I'm doing'' option, which is always named \option{-f}. The exact 1.17 meaning of \option{-f} depends on the command. For example, 1.18 -\hgcmdargs{qnew}{\hgopt{qnew}{-f}} will incorporate any outstanding 1.19 +\hgcmdargs{qnew}{\hgxopt{mq}{qnew}{-f}} will incorporate any outstanding 1.20 changes into the new patch it creates, but 1.21 -\hgcmdargs{qpop}{\hgopt{qpop}{-f}} will revert modifications to any 1.22 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-f}} will revert modifications to any 1.23 files affected by the patch that it is popping. Be sure to read the 1.24 documentation for a command's \option{-f} option before you use it! 1.25 1.26 @@ -624,8 +624,8 @@ 1.27 2.6.17. 1.28 1.29 On my old, slow laptop, I was able to 1.30 -\hgcmdargs{qpush}{\hgopt{qpush}{-a}} all 1,738 patches in 3.5 minutes, 1.31 -and \hgcmdargs{qpop}{\hgopt{qpop}{-a}} them all in 30 seconds. (On a 1.32 +\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} all 1,738 patches in 3.5 minutes, 1.33 +and \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} them all in 30 seconds. (On a 1.34 newer laptop, the time to push all patches dropped to two minutes.) I 1.35 could \hgxcmd{mq}{qrefresh} one of the biggest patches (which made 22,779 1.36 lines of changes to 287 files) in 6.6 seconds. 1.37 @@ -663,9 +663,9 @@ 1.38 patches that no longer apply. This is called \emph{rebasing} your 1.39 patch series. 1.40 1.41 -The simplest way to do this is to \hgcmdargs{qpop}{\hgopt{qpop}{-a}} 1.42 +The simplest way to do this is to \hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} 1.43 your patches, then \hgcmd{pull} changes into the underlying 1.44 -repository, and finally \hgcmdargs{qpush}{\hgopt{qpop}{-a}} your 1.45 +repository, and finally \hgcmdargs{qpush}{\hgxopt{mq}{qpop}{-a}} your 1.46 patches again. MQ will stop pushing any time it runs across a patch 1.47 that fails to apply during conflicts, allowing you to fix your 1.48 conflicts, \hgxcmd{mq}{qrefresh} the affected patch, and continue pushing 1.49 @@ -687,7 +687,7 @@ 1.50 \item To begin, \hgcmdargs{qpush}{-a} all of your patches on top of 1.51 the revision where you know that they apply cleanly. 1.52 \item Save a backup copy of your patch directory using 1.53 - \hgcmdargs{qsave}{\hgopt{qsave}{-e} \hgopt{qsave}{-c}}. This prints 1.54 + \hgcmdargs{qsave}{\hgxopt{mq}{qsave}{-e} \hgxopt{mq}{qsave}{-c}}. This prints 1.55 the name of the directory that it has saved the patches in. It will 1.56 save the patches to a directory called 1.57 \sdirname{.hg/patches.\emph{N}}, where \texttt{\emph{N}} is a small 1.58 @@ -699,12 +699,12 @@ 1.59 \item Update to the new tip revision, using 1.60 \hgcmdargs{update}{\hgopt{update}{-C}} to override the patches you 1.61 have pushed. 1.62 -\item Merge all patches using \hgcmdargs{qpush}{\hgopt{qpush}{-m} 1.63 - \hgopt{qpush}{-a}}. The \hgopt{qpush}{-m} option to \hgxcmd{mq}{qpush} 1.64 +\item Merge all patches using \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m} 1.65 + \hgxopt{mq}{qpush}{-a}}. The \hgxopt{mq}{qpush}{-m} option to \hgxcmd{mq}{qpush} 1.66 tells MQ to perform a three-way merge if the patch fails to apply. 1.67 \end{enumerate} 1.68 1.69 -During the \hgcmdargs{qpush}{\hgopt{qpush}{-m}}, each patch in the 1.70 +During the \hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-m}}, each patch in the 1.71 \sfilename{series} file is applied normally. If a patch applies with 1.72 fuzz or rejects, MQ looks at the queue you \hgxcmd{mq}{qsave}d, and 1.73 performs a three-way merge with the corresponding changeset. This 1.74 @@ -717,7 +717,7 @@ 1.75 At the end of this process, your repository will have one extra head 1.76 from the old patch queue, and a copy of the old patch queue will be in 1.77 \sdirname{.hg/patches.\emph{N}}. You can remove the extra head using 1.78 -\hgcmdargs{qpop}{\hgopt{qpop}{-a} \hgopt{qpop}{-n} patches.\emph{N}} 1.79 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a} \hgxopt{mq}{qpop}{-n} patches.\emph{N}} 1.80 or \hgcmd{strip}. You can delete \sdirname{.hg/patches.\emph{N}} once 1.81 you are sure that you no longer need it as a backup. 1.82 1.83 @@ -833,16 +833,16 @@ 1.84 1.85 MQ helps you to work with the \sdirname{.hg/patches} directory as a 1.86 repository; when you prepare a repository for working with patches 1.87 -using \hgxcmd{mq}{qinit}, you can pass the \hgopt{qinit}{-c} option to 1.88 +using \hgxcmd{mq}{qinit}, you can pass the \hgxopt{mq}{qinit}{-c} option to 1.89 create the \sdirname{.hg/patches} directory as a Mercurial repository. 1.90 1.91 \begin{note} 1.92 - If you forget to use the \hgopt{qinit}{-c} option, you can simply go 1.93 + If you forget to use the \hgxopt{mq}{qinit}{-c} option, you can simply go 1.94 into the \sdirname{.hg/patches} directory at any time and run 1.95 \hgcmd{init}. Don't forget to add an entry for the 1.96 \sfilename{status} file to the \sfilename{.hgignore} file, though 1.97 1.98 - (\hgcmdargs{qinit}{\hgopt{qinit}{-c}} does this for you 1.99 + (\hgcmdargs{qinit}{\hgxopt{mq}{qinit}{-c}} does this for you 1.100 automatically); you \emph{really} don't want to manage the 1.101 \sfilename{status} file. 1.102 \end{note} 1.103 @@ -863,8 +863,8 @@ 1.104 MQ cannot automatically detect changes that you make to the patch 1.105 directory. If you \hgcmd{pull}, manually edit, or \hgcmd{update} 1.106 changes to patches or the \sfilename{series} file, you will have to 1.107 -\hgcmdargs{qpop}{\hgopt{qpop}{-a}} and then 1.108 -\hgcmdargs{qpush}{\hgopt{qpush}{-a}} in the underlying repository to 1.109 +\hgcmdargs{qpop}{\hgxopt{mq}{qpop}{-a}} and then 1.110 +\hgcmdargs{qpush}{\hgxopt{mq}{qpush}{-a}} in the underlying repository to 1.111 see those changes show up there. If you forget to do this, you can 1.112 confuse MQ's idea of which patches are applied. 1.113