summaryrefslogtreecommitdiff
path: root/linux-basics/quilt/pres_quilt_en.tex
blob: 6bed0b216c0e3ebb5b314bf01c8163a8ca93e672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
% 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}