summaryrefslogtreecommitdiffstats
path: root/test/altered-series.test
blob: 3c1bf715b280100588c5cf5b99917599271c6336 (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 patches/01.patch
> Patch patches/01.patch does not exist; applied empty patch
> Applying patch patches/02.patch
> Patch patches/02.patch does not exist; applied empty patch
> Now at patch patches/02.patch

$ quilt series -v
> + patches/01.patch
> = patches/02.patch
>   patches/03.patch

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

$ quilt series -v
> + patches/01.patch
> = patches/02.patch
>   patches/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 patches/02.patch appears to be empty, removing
>
> Now at patch patches/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 patches/01.patch appears to be empty, removing
>
> No patches applied

$ quilt series -v
>   patches/03.patch
>   patches/01.patch
>   patches/02.patch