Introduction

Starting Quilt

$ quilt new first
Patch patches/first is now on top
$ ls -l patches/
total 4
-rw-r--r--. 1 rjc rjc 6 Mar  6 15:49 series
$ cat patches/series
first
$ quilt edit policy/modules/system/systemd.te
File policy/modules/system/systemd.te added to patch patches/first
$ quilt refresh
Refreshed patch patches/first
$ ls -l patches/
total 8
-rw-r--r--. 1 rjc rjc 359 Mar  6 15:51 first
-rw-r--r--. 1 rjc rjc   6 Mar  6 15:49 series
$ cat patches/first
Index: pol-git/policy/modules/system/systemd.te
===================================================================
--- pol-git.orig/policy/modules/system/systemd.te
+++ pol-git/policy/modules/system/systemd.te
@@ -1,5 +1,7 @@
 policy_module(systemd, 1.3.9)
 
+# the SE Linux policy for systemd
+
 #########################################
 #
 # Declarations

Adding Another Patch

$ quilt new second
Patch patches/second is now on top
$ quilt edit policy/modules/system/systemd.te
File policy/modules/system/systemd.te added to patch patches/second
$ quilt refresh
Refreshed patch patches/second
$ ls -l patches/
total 12
-rw-r--r--. 1 rjc rjc 359 Mar  6 15:51 first
-rw-r--r--. 1 rjc rjc 362 Mar  6 15:55 second
-rw-r--r--. 1 rjc rjc  13 Mar  6 15:54 series
$ cat patches/series 
first
second
$ cat patches/second
Index: pol-git/policy/modules/system/systemd.te
===================================================================
--- pol-git.orig/policy/modules/system/systemd.te
+++ pol-git/policy/modules/system/systemd.te
@@ -1,6 +1,7 @@
 policy_module(systemd, 1.3.9)
 
 # the SE Linux policy for systemd
+# another comment
 
 #########################################
 #

Patch Apply/Remove

$ head -5 policy/modules/system/systemd.te
policy_module(systemd, 1.3.9)

# the SE Linux policy for systemd
# another comment

$ quilt pop
Removing patch patches/second
Restoring policy/modules/system/systemd.te

Now at patch patches/first
$ head -5 policy/modules/system/systemd.te
policy_module(systemd, 1.3.9)

# the SE Linux policy for systemd

#########################################
$ quilt pop
Removing patch patches/first
Restoring policy/modules/system/systemd.te

No patches applied
$ head -5 policy/modules/system/systemd.te
policy_module(systemd, 1.3.9)

#########################################
#
# Declarations
$ quilt push -a
Applying patch patches/first
patching file policy/modules/system/systemd.te

Applying patch patches/second
patching file policy/modules/system/systemd.te

Now at patch patches/second
$ quilt applied
patches/first
patches/second