summaryrefslogtreecommitdiffstats
path: root/test/duplicate-patch-in-series.test
blob: 98591b2b5ff9a2fa063371a80249a0489c17a67b (plain) (blame)
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
# Check that duplicate patches in generated series files won't cause havoc
# See bug #20628 at https://savannah.nongnu.org/bugs/?20628

$ mkdir patches
$ echo "old line" > file.txt

$ cat > patches/first.patch
< --- file.txt
< +++ file.txt
< @@ -1 +1 @@
< -old line
< +new line

$ cat > patches/series
< first.patch -p0
< first.patch -p0

$ quilt push
> Applying patch %{P}first.patch
> patching file file.txt
>
> Now at patch %{P}first.patch

$ quilt push
> Patch %{P}first.patch is already applied; check your series file

$ quilt pop
> Removing patch %{P}first.patch
> Restoring file.txt
>
> No patches applied

$ quilt push -qa
> Patch %{P}first.patch is already applied; check your series file

$ quilt pop -q
> No patch removed