comparison revset-talk.tex @ 301:027862d2fec9

Slide on quoting
author Martin Geisler <mg@lazybytes.net>
date Wed, 08 Jun 2011 14:00:24 +0200
parents 6420e2bdb651
children 78a5a27609a5
comparison
equal deleted inserted replaced
300:dc1bbb0452a8 301:027862d2fec9
19 \begin{frame}{Outline} 19 \begin{frame}{Outline}
20 \tableofcontents 20 \tableofcontents
21 \end{frame} 21 \end{frame}
22 22
23 \section{Introduction} 23 \section{Introduction}
24
25 \begin{frame}[fragile]{Quoting}
26 How to handle special characters:
27 \begin{itemize}[<+->]
28 \item You will need to quote your revsets on the command line:
29 \begin{lstlisting}
30 $ hg log -r parents()
31 zsh: parse error near `()'
32 \end{lstlisting}
33
34 \item Strings in revsets can be in single- or double-quotes:
35 \begin{lstlisting}
36 $ hg log -r "user('Martin')"
37 \end{lstlisting}
38
39 \item Escape characters are supported
40 \begin{lstlisting}
41 $ hg log -r "keyword('first line\nsecond line')"
42 \end{lstlisting}
43
44 \item Use a raw string to disable the escape characters:
45 \begin{lstlisting}
46 $ hg log -r "grep(r'Bug\s*\d+')"
47 \end{lstlisting}
48
49 \end{itemize}
50 \end{frame}
24 51
25 \section{Revision Sets} 52 \section{Revision Sets}
26 53
27 \subsection{Predicates} 54 \subsection{Predicates}
28 55