summaryrefslogtreecommitdiffstats
path: root/test/altered-series.test
blob: 68e55cf7463e9c3b7d6afdb5f2dae6f89feb2826 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Check that manual changes to the series file are detected

$ mkdir patches
$ cat > patches/series
< 01.patch
< 02.patch
< 03.patch

$ quilt push -q 2
> Applying patch %{P}01.patch
> Patch %{P}01.patch does not exist; applied empty patch
> Applying patch %{P}02.patch
> Patch %{P}02.patch does not exist; applied empty patch
> Now at patch %{P}02.patch

$ quilt series -v
> + %{P}01.patch
> = %{P}02.patch
>   %{P}03.patch

# Touch the series file but preserve the order -> OK
$ touch patches/series

$ quilt series -v
> + %{P}01.patch
> = %{P}02.patch
>   %{P}03.patch

# Change the order of the patch series -> complain
$ cat > patches/series
< 03.patch
< 01.patch
< 02.patch

$ quilt series -v
> The series file no longer matches the applied patches. Please run 'quilt pop -a'.

$ quilt pop
> Patch %{P}02.patch appears to be empty, removing
>
> Now at patch %{P}01.patch

# That wasn't enough, keep complaining
$ quilt series -v
> The series file no longer matches the applied patches. Please run 'quilt pop -a'.

$ quilt pop -a
> Patch %{P}01.patch appears to be empty, removing
>
> No patches applied

$ quilt series -v
>   %{P}03.patch
>   %{P}01.patch
>   %{P}02.patch