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
|
Test the delete command.
$ mkdir patches
$ cat > test.txt
< Calling pci_match_id() would be more feasible.
$ quilt new test1
> Patch %{P}test1 is now on top
$ quilt add test.txt
> File test.txt added to patch %{P}test1
$ cat > test.txt
< Try the following patch instead.
$ quilt refresh
> Refreshed patch %{P}test1
$ quilt new test2
> Patch %{P}test2 is now on top
$ quilt add test.txt
> File test.txt added to patch %{P}test2
$ cat > test.txt
< Ok, that's fine with me if you want to do that instead.
$ quilt refresh
> Refreshed patch %{P}test2
$ quilt delete test1
> Patch %{P}test1 is currently applied
$ quilt pop
> Removing patch %{P}test2
> Restoring test.txt
>
> Now at patch %{P}test1
$ quilt series
> %{P}test1
> %{P}test2
$ quilt delete -n
> Removed patch %{P}test2
$ quilt series
> %{P}test1
$ quilt pop
> Removing patch %{P}test1
> Restoring test.txt
>
> No patches applied
$ quilt delete test1
> Removed patch %{P}test1
$ quilt series
$ echo "test1" > patches/series
$ quilt delete -n
> Removed patch %{P}test1
$ quilt series
# Force the pop operaton to fail
$ echo "test3" > patches/series
$ echo "test3" > %{QUILT_PC}/applied-patches
$ mkdir -p %{QUILT_PC}/test3/dir
$ touch %{QUILT_PC}/test3/dir/file
$ chmod a-rx %{QUILT_PC}/test3/dir
# Note that this will succeed (instead of the expected failure) if
# running as root, but you shouldn't do that anyway.
$ quilt delete "test3"
> Removing patch %{P}test3
>~ .*find: [`']?\./dir'?: Permission denied
$ chmod a+rx %{QUILT_PC}/test3/dir
$ find %{QUILT_PC}/test3
> %{QUILT_PC}/test3
> %{QUILT_PC}/test3/dir
> %{QUILT_PC}/test3/dir/file
$ quilt applied
> No patches applied
$ quilt series
> %{P}test3
$ quilt delete
> No patches applied
$ quilt delete test3
> Removed patch %{P}test3
|