changeset 283:4ed483f08e33

Mention how to define mq alias.
author Faheem Mitha <faheem@email.unc.edu>
date Mon, 31 Dec 2007 20:13:11 -0800
parents 7a6bd93174bd
children 075636650520
files en/99defs.tex en/mq.tex
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/en/99defs.tex	Mon Dec 31 20:06:58 2007 -0800
+++ b/en/99defs.tex	Mon Dec 31 20:13:11 2007 -0800
@@ -47,7 +47,7 @@
 \newcommand{\command}[1]{\index{\texttt{#1} system command}\texttt{#1}}
 
 % Shell/system command, with arguments.
-\newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''}
+\newcommand{\cmdargs}[2]{\index{\texttt{#1} system command}``\texttt{#1 #2}''}
 
 % Mercurial command option.
 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
--- a/en/mq.tex	Mon Dec 31 20:06:58 2007 -0800
+++ b/en/mq.tex	Mon Dec 31 20:13:11 2007 -0800
@@ -852,9 +852,21 @@
 directory is a repository, it will automatically \hgcmd{add} every
 patch that you create and import.
 
-Finally, MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs
+MQ provides a shortcut command, \hgxcmd{mq}{qcommit}, that runs
 \hgcmd{commit} in the \sdirname{.hg/patches} directory.  This saves
-some cumbersome typing.
+some bothersome typing.
+
+Finally, as a convenience to manage the patch directory, you can
+define the alias \command{mq} on Unix systems. For example, on Linux
+systems using the \command{bash} shell, you can include the following
+snippet in your \tildefile{.bashrc}.
+
+\begin{codesample2}
+  alias mq=`hg -R \$(hg root)/.hg/patches'
+\end{codesample2}
+
+You can then issue commands of the form \cmdargs{mq}{pull} from
+the main repository.
 
 \subsection{A few things to watch out for}