hgbook

changeset 283:4ed483f08e33

Mention how to define mq alias.
author Faheem Mitha <faheem@email.unc.edu>
date Mon Dec 31 20:13:11 2007 -0800 (2007-12-31)
parents 7a6bd93174bd
children 075636650520
files en/99defs.tex en/mq.tex
line diff
     1.1 --- a/en/99defs.tex	Mon Dec 31 20:06:58 2007 -0800
     1.2 +++ b/en/99defs.tex	Mon Dec 31 20:13:11 2007 -0800
     1.3 @@ -47,7 +47,7 @@
     1.4  \newcommand{\command}[1]{\index{\texttt{#1} system command}\texttt{#1}}
     1.5  
     1.6  % Shell/system command, with arguments.
     1.7 -\newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''}
     1.8 +\newcommand{\cmdargs}[2]{\index{\texttt{#1} system command}``\texttt{#1 #2}''}
     1.9  
    1.10  % Mercurial command option.
    1.11  \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
     2.1 --- a/en/mq.tex	Mon Dec 31 20:06:58 2007 -0800
     2.2 +++ b/en/mq.tex	Mon Dec 31 20:13:11 2007 -0800
     2.3 @@ -852,9 +852,21 @@
     2.4  directory is a repository, it will automatically \hgcmd{add} every
     2.5  patch that you create and import.
     2.6  
     2.7 -Finally, MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs
     2.8 +MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs
     2.9  \hgcmd{commit} in the \sdirname{.hg/patches} directory.  This saves
    2.10 -some cumbersome typing.
    2.11 +some bothersome typing.
    2.12 +
    2.13 +Finally, as a convenience to manage the patch directory, you can
    2.14 +define the alias \command{mq} on Unix systems. For example, on Linux
    2.15 +systems using the \command{bash} shell, you can include the following
    2.16 +snippet in your \tildefile{.bashrc}.
    2.17 +
    2.18 +\begin{codesample2}
    2.19 +  alias mq=`hg -R \$(hg root)/.hg/patches'
    2.20 +\end{codesample2}
    2.21 +
    2.22 +You can then issue commands of the form \cmdargs{mq}{pull} from
    2.23 +the main repository.
    2.24  
    2.25  \subsection{A few things to watch out for}
    2.26