diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-03-02 13:10:16 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2014-03-02 13:10:16 +0100 |
commit | 6c9a83e0cb98eb6023269c620c528466796e1c25 (patch) | |
tree | 80ae3c1e1ce0b7e14656adf94258635feb93e159 /test/duplicate-patch-in-series.test | |
parent | cd6a71266d913d7b7399baeffa0fefc88a274c6c (diff) | |
download | quilt-6c9a83e0cb98eb6023269c620c528466796e1c25.tar.gz |
push: Check for duplicate patch in series
In the case of a generated or manually tweaked series file, it can
happen that the same patch shows up twice in the series file. Check
for this before pushing any patch, otherwise we would corrupt quilt's
internal database.
This fixes bug #20628:
https://savannah.nongnu.org/bugs/?20628
Diffstat (limited to 'test/duplicate-patch-in-series.test')
-rw-r--r-- | test/duplicate-patch-in-series.test | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/duplicate-patch-in-series.test b/test/duplicate-patch-in-series.test new file mode 100644 index 0000000..98591b2 --- /dev/null +++ b/test/duplicate-patch-in-series.test @@ -0,0 +1,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 |