% on the following slides, include icon in the left sidebar
\def\lximg{/usr/share/lx/icons/fueller.png}

\input{configpres}

\section{Managing patches with quilt}

\title{Quilt - Organize your patches!}
\maketitle

% stop displaying 'fueller.png' on the following slides
\def\lximg{none}

\begin{frame}
\frametitle{What is quilt?}
Quilt is a commandline tool for creating and managing ''patch queues''
\end{frame}

\begin{frame}
\frametitle{Why do I need quilt?}
\begin{itemize}
\item usually changes are split into separate patches
\item so, using a patch series is quite common
\item using quilt, it's quite easy to add and remove patches
\item using quilt, it's quite easy to create patches
\end{itemize}
\end{frame}


\begin{frame}
\frametitle{How does quilt work?}
\begin{itemize}
\item It manages your patches in a stack
\item The patches are placed in a sub-directory called patches/
\item All changes are tracked in a sub-directory called .pc/
\item The control file patches/series contains all patches and the order in which they should be applied
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt push}
Apply the next patch in the stack
\begin{verbatim}
$ quilt push
\end{verbatim}
Apply all patches
\begin{verbatim}
$ quilt push -a
\end{verbatim}
Apply even if there is a merge conflict
\begin{verbatim}
$ quilt push -f
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt pop}
Remove the topmost patch
\begin{verbatim}
$ quilt pop
\end{verbatim}
Remove all patches
\begin{verbatim}
$ quilt pop -a
\end{verbatim}
Remove even if it can't be removed cleanly
\begin{verbatim}
$ quilt pop -f
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt top}
Show the name of the topmost patch, the current stack position:
\begin{verbatim}
$ quilt top
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt series}
Show which patches are available in the series file:
\begin{verbatim}
$ quilt series
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt applied}
Show which patches are currently applied:
\begin{verbatim}
$ quilt applied
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt new / quild add}
Create a new patch and place it at the current stack position:
\begin{verbatim}
$ quilt new mypatch.diff
\end{verbatim}
Add files which should be tracked by that patch
\begin{verbatim}
$ quilt add filename(s)
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt edit}
Add a file to the topmost patch and open it in the default editor:
\begin{verbatim}
$ quilt edit filename
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt refresh}
Note: All changes are tracked for each patch in the .pc/ directory. Changes are written to the patch with quilt refresh. This will rewrite the topmost patch:
\begin{verbatim}
$ quilt refresh
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt diff}
Review all changes of the topmost patch since the last refresh
\begin{verbatim}
$ quilt diff -z
\end{verbatim}
See all changes which are introduced by a patch
\begin{verbatim}
$ quilt diff
\end{verbatim}
See the changes on a specific file introduced by the topmost patch
\begin{verbatim}
$ quilt diff filename
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{Important quilt commands: quilt import}
Import a pre-existing patch at the current stack position:
\begin{verbatim}
$ quilt import mypatch.diff
\end{verbatim}
And then apply it using the push command:
\begin{verbatim}
$ quilt push
\end{verbatim}
\end{frame}

\begin{frame}[fragile]
\frametitle{How quilt can influence your workflow?}
If you don't do frequent changes on your kernel or your kernel changes
are pretty small, you can use quilt to manage your changes. So, instead of
having the whole kernel tree under version control:
\begin{itemize}
\item put your changes into a quilt queue
\item and put that quilt queue under version control
\end{itemize}
\end{frame}

\input{tailpres}
