summaryrefslogtreecommitdiffstats
path: root/scripts/t/dpkg_mergechangelogs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:35:28 +0000
commitea314d2f45c40a006c0104157013ab4b857f665f (patch)
tree3ef2971cb3675c318b8d9effd987854ad3f6d3e8 /scripts/t/dpkg_mergechangelogs
parentInitial commit. (diff)
downloaddpkg-ea314d2f45c40a006c0104157013ab4b857f665f.tar.xz
dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.zip
Adding upstream version 1.22.4.upstream/1.22.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/t/dpkg_mergechangelogs')
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-a94
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-b89
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-badver-a5
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-badver-b11
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-badver-merged11
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-badver-old5
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-merged115
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-merged-basic138
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-merged-pr108
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-merged-pr-basic140
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-old87
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-unreleased-a12
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-unreleased-b12
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-unreleased-merged24
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-unreleased-merged-basic25
-rw-r--r--scripts/t/dpkg_mergechangelogs/ch-unreleased-old5
16 files changed, 881 insertions, 0 deletions
diff --git a/scripts/t/dpkg_mergechangelogs/ch-a b/scripts/t/dpkg_mergechangelogs/ch-a
new file mode 100644
index 0000000..ff5419d
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-a
@@ -0,0 +1,94 @@
+test (2.0-1) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+ * Line 4.
+ * Line 5.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Really no clouds in the sky
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+ * If I'm here it's because the changelog is not B (I should not appear
+ in the resulting changelog).
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+ * This entry has a conflict on the next line.
+ * I'm in changelog A.
+ * This line is the same in all 3 versions.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+test (1.1-1+conflict1) experimental; urgency=low
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:05:00 +0200
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm definitely in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=high
+
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm not in changelog B.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+a) experimental; urgency=low
+
+ * This entry is present in A only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:44:39 +0200
+
+test (1.0-2) unstable; urgency=low
+
+ * This entry is dropped in B only.
+ * Since it's in O and A, it should not appear in the result.
+ * Pi is 3.14.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:39:15 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-b b/scripts/t/dpkg_mergechangelogs/ch-b
new file mode 100644
index 0000000..a74145f
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-b
@@ -0,0 +1,89 @@
+test (2.0-1~exp3) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * I'm the added line mentioned below (B-only).
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+ * This entry has a conflict on the next line.
+ * I'm in changelog B.
+ * This line is the same in all 3 versions.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+test (1.1-1+conflict1) unstable; urgency=high
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:06:00 +0200
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm not in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm definitely in changelog B.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+b) experimental; urgency=low
+
+ * This entry is present in B only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:47:38 +0200
+
+test (1.0-3) unstable; urgency=low
+
+ * This entry is dropped in A only.
+ * Since it's in O and B, it should not appear in the result.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:41:31 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-badver-a b/scripts/t/dpkg_mergechangelogs/ch-badver-a
new file mode 100644
index 0000000..d544e64
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-badver-a
@@ -0,0 +1,5 @@
+egcs (ss-970814-1) experimental; urgency=low
+
+ * Initial packaging (of initial snapshot!)
+
+ -- Galen Hazelwood <galenh@micron.net> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-badver-b b/scripts/t/dpkg_mergechangelogs/ch-badver-b
new file mode 100644
index 0000000..609254e
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-badver-b
@@ -0,0 +1,11 @@
+egcs (970904-1) experimental; urgency=low
+
+ * New upstream snapshot
+
+ -- Galen Hazelwood <galenh@micron.net> Sun, 7 Sep 1997 18:25:06 -0600
+
+egcs (ss-970814-1) experimental; urgency=low
+
+ * Initial packaging (of initial snapshot!)
+
+ -- Galen Hazelwood <galenh@micron.net> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-badver-merged b/scripts/t/dpkg_mergechangelogs/ch-badver-merged
new file mode 100644
index 0000000..609254e
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-badver-merged
@@ -0,0 +1,11 @@
+egcs (970904-1) experimental; urgency=low
+
+ * New upstream snapshot
+
+ -- Galen Hazelwood <galenh@micron.net> Sun, 7 Sep 1997 18:25:06 -0600
+
+egcs (ss-970814-1) experimental; urgency=low
+
+ * Initial packaging (of initial snapshot!)
+
+ -- Galen Hazelwood <galenh@micron.net> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-badver-old b/scripts/t/dpkg_mergechangelogs/ch-badver-old
new file mode 100644
index 0000000..d544e64
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-badver-old
@@ -0,0 +1,5 @@
+egcs (ss-970814-1) experimental; urgency=low
+
+ * Initial packaging (of initial snapshot!)
+
+ -- Galen Hazelwood <galenh@micron.net> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-merged b/scripts/t/dpkg_mergechangelogs/ch-merged
new file mode 100644
index 0000000..29a985d
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-merged
@@ -0,0 +1,115 @@
+test (2.0-1) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+ * Line 4.
+ * Line 5.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (2.0-1~exp3) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * I'm the added line mentioned below (B-only).
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Really no clouds in the sky
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+ * This entry has a conflict on the next line.
+<<<<<<<
+ * I'm in changelog A.
+=======
+ * I'm in changelog B.
+>>>>>>>
+ * This line is the same in all 3 versions.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+<<<<<<<
+test (1.1-1+conflict1) experimental; urgency=low
+=======
+test (1.1-1+conflict1) unstable; urgency=high
+>>>>>>>
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+<<<<<<<
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:05:00 +0200
+=======
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:06:00 +0200
+>>>>>>>
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm definitely in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=high
+
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm definitely in changelog B.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+b) experimental; urgency=low
+
+ * This entry is present in B only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:47:38 +0200
+
+test (1.0-3+a) experimental; urgency=low
+
+ * This entry is present in A only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:44:39 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-merged-basic b/scripts/t/dpkg_mergechangelogs/ch-merged-basic
new file mode 100644
index 0000000..f89fe11
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-merged-basic
@@ -0,0 +1,138 @@
+test (2.0-1) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+ * Line 4.
+ * Line 5.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (2.0-1~exp3) unstable; urgency=low
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+<<<<<<<
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Really no clouds in the sky
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+ * If I'm here it's because the changelog is not B (I should not appear
+ in the resulting changelog).
+=======
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * I'm the added line mentioned below (B-only).
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+<<<<<<<
+ * This entry has a conflict on the next line.
+ * I'm in changelog A.
+ * This line is the same in all 3 versions.
+=======
+ * This entry has a conflict on the next line.
+ * I'm in changelog B.
+ * This line is the same in all 3 versions.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+<<<<<<<
+test (1.1-1+conflict1) experimental; urgency=low
+=======
+test (1.1-1+conflict1) unstable; urgency=high
+>>>>>>>
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+<<<<<<<
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:05:00 +0200
+=======
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:06:00 +0200
+>>>>>>>
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm definitely in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=high
+
+<<<<<<<
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm not in changelog B.
+=======
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm definitely in changelog B.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+b) experimental; urgency=low
+
+ * This entry is present in B only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:47:38 +0200
+
+test (1.0-3+a) experimental; urgency=low
+
+ * This entry is present in A only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:44:39 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-merged-pr b/scripts/t/dpkg_mergechangelogs/ch-merged-pr
new file mode 100644
index 0000000..a58f097
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-merged-pr
@@ -0,0 +1,108 @@
+<<<<<<<
+test (2.0-1) unstable; urgency=low
+=======
+test (2.0-1~exp3) unstable; urgency=low
+>>>>>>>
+
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+ * Line 4.
+ * Line 5.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * I'm the added line mentioned below (B-only).
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Really no clouds in the sky
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+ * This entry has a conflict on the next line.
+<<<<<<<
+ * I'm in changelog A.
+=======
+ * I'm in changelog B.
+>>>>>>>
+ * This line is the same in all 3 versions.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+<<<<<<<
+test (1.1-1+conflict1) experimental; urgency=low
+=======
+test (1.1-1+conflict1) unstable; urgency=high
+>>>>>>>
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+<<<<<<<
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:05:00 +0200
+=======
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:06:00 +0200
+>>>>>>>
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm definitely in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=high
+
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm definitely in changelog B.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+b) experimental; urgency=low
+
+ * This entry is present in B only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:47:38 +0200
+
+test (1.0-3+a) experimental; urgency=low
+
+ * This entry is present in A only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:44:39 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-merged-pr-basic b/scripts/t/dpkg_mergechangelogs/ch-merged-pr-basic
new file mode 100644
index 0000000..7733612
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-merged-pr-basic
@@ -0,0 +1,140 @@
+<<<<<<<
+test (2.0-1) unstable; urgency=low
+=======
+test (2.0-1~exp3) unstable; urgency=low
+>>>>>>>
+
+<<<<<<<
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+ * Line 4.
+ * Line 5.
+=======
+ * Version B with 2.0-1~exp3 contains only up to line 3 while version A
+ with 2.0-1 contains the 5 lines. The resulting version should have the
+ 5 lines without conflict with Algorithm::Merge and a conflict without.
+ * Line 1.
+ * Line 2.
+ * Line 3.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:23:09 +0200
+
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+<<<<<<<
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Really no clouds in the sky
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+ * If I'm here it's because the changelog is not B (I should not appear
+ in the resulting changelog).
+=======
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * I'm the added line mentioned below (B-only).
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+<<<<<<<
+ * This entry has a conflict on the next line.
+ * I'm in changelog A.
+ * This line is the same in all 3 versions.
+=======
+ * This entry has a conflict on the next line.
+ * I'm in changelog B.
+ * This line is the same in all 3 versions.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+<<<<<<<
+test (1.1-1+conflict1) experimental; urgency=low
+=======
+test (1.1-1+conflict1) unstable; urgency=high
+>>>>>>>
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+<<<<<<<
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:05:00 +0200
+=======
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:06:00 +0200
+>>>>>>>
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm definitely in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=high
+
+<<<<<<<
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm not in changelog B.
+=======
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm definitely in changelog B.
+>>>>>>>
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.0-3+b) experimental; urgency=low
+
+ * This entry is present in B only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:47:38 +0200
+
+test (1.0-3+a) experimental; urgency=low
+
+ * This entry is present in A only. It's considered new and should thus
+ be in the merged changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:44:39 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-old b/scripts/t/dpkg_mergechangelogs/ch-old
new file mode 100644
index 0000000..5ff7dd3
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-old
@@ -0,0 +1,87 @@
+test (1.2-2) unstable; urgency=low
+
+ * This is the last entry in changelog O.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:18:50 +0200
+
+test (1.2-1) unstable; urgency=low
+
+ * This entry should not have conflicts with Algorithm::Merge installed.
+ * Changelog B should a have supplementary line above this one.
+ * Pi is 3.14 is true for all changelogs.
+ * Changelog A should have a supplementary line
+ somewhere in this sub-list
+ - The weather is nice
+ - Yet I'm hacking on dpkg
+ - What does that mean about me?
+ * This line should be shared but the next one is dropped in B only.
+ * If I'm here it's because the changelog is not B (I should not appear
+ in the resulting changelog).
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:09:07 +0200
+
+test (1.1-1+conflict2) unstable; urgency=low
+
+ * This entry has a conflict on the next line.
+ * I'm in changelog O (old).
+ * This line is the same in all 3 versions.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:07:40 +0200
+
+test (1.1-1+conflict1) unstable; urgency=low
+
+ * This entry has conflicts on the header line: A wants distribution
+ experimental (instead of unstable) and B wants urgency=high (instead
+ of low).
+ * But it also has a conflict on the trailer line. A changed the
+ timestamp to 18:05:00 and B to 18:06:00.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 18:04:18 +0200
+
+test (1.1-1+change2) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in A. The
+ merged version should have what's in A. Furthermore the timestamp in
+ B is set to 17:55:00, it should also be picked up.
+ * I'm not in changelog A.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:54:52 +0200
+
+test (1.1-1+change1) unstable; urgency=low
+
+ * This entry is everywhere but the last line is different in B. The
+ merged version should have what's in B. Furthermore the urgency in
+ A is set to high, it should also be picked up.
+ * I'm not in changelog B.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:50:58 +0200
+
+test (1.1-0.1) stable; urgency=low
+
+ * This entry is present in O only, it should not appear in the merged
+ changelog.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:49:15 +0200
+
+test (1.0-3) unstable; urgency=low
+
+ * This entry is dropped in A only.
+ * Since it's in O and B, it should not appear in the result.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:41:31 +0200
+
+test (1.0-2) unstable; urgency=low
+
+ * This entry is dropped in B only.
+ * Since it's in O and A, it should not appear in the result.
+ * Pi is 3.14.
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:39:15 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #XXXXXX)
+
+ -- Raphaël Hertzog <hertzog@debian.org> Sun, 18 Apr 2010 17:37:46 +0200
+
+vim: et
diff --git a/scripts/t/dpkg_mergechangelogs/ch-unreleased-a b/scripts/t/dpkg_mergechangelogs/ch-unreleased-a
new file mode 100644
index 0000000..d86d3ff
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-unreleased-a
@@ -0,0 +1,12 @@
+test (1.2-0) UNRELEASED; urgency=low
+
+ * New upstream release.
+ - Adds a new feature.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Thu, 02 Sep 2021 05:26:30 +0200
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-unreleased-b b/scripts/t/dpkg_mergechangelogs/ch-unreleased-b
new file mode 100644
index 0000000..96263e3
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-unreleased-b
@@ -0,0 +1,12 @@
+test (1.1-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+ - Fixes a random bug.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 01 Sep 2021 05:27:48 +0200
+
+test (1.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged b/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged
new file mode 100644
index 0000000..5fbf866
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged
@@ -0,0 +1,24 @@
+<<<<<<<
+test (1.2-0) UNRELEASED; urgency=low
+=======
+test (1.1-1) UNRELEASED; urgency=low
+>>>>>>>
+
+ * New upstream release.
+<<<<<<<
+ - Adds a new feature.
+=======
+ - Fixes a random bug.
+>>>>>>>
+
+<<<<<<<
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Thu, 02 Sep 2021 05:26:30 +0200
+=======
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 01 Sep 2021 05:27:48 +0200
+>>>>>>>
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged-basic b/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged-basic
new file mode 100644
index 0000000..dd6938c
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-unreleased-merged-basic
@@ -0,0 +1,25 @@
+<<<<<<<
+test (1.2-0) UNRELEASED; urgency=low
+=======
+test (1.1-1) UNRELEASED; urgency=low
+>>>>>>>
+
+<<<<<<<
+ * New upstream release.
+ - Adds a new feature.
+=======
+ * New upstream release.
+ - Fixes a random bug.
+>>>>>>>
+
+<<<<<<<
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Thu, 02 Sep 2021 05:26:30 +0200
+=======
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 01 Sep 2021 05:27:48 +0200
+>>>>>>>
+
+test (1.0-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 20 Aug 1997 00:36:28 +0000
diff --git a/scripts/t/dpkg_mergechangelogs/ch-unreleased-old b/scripts/t/dpkg_mergechangelogs/ch-unreleased-old
new file mode 100644
index 0000000..e9377c3
--- /dev/null
+++ b/scripts/t/dpkg_mergechangelogs/ch-unreleased-old
@@ -0,0 +1,5 @@
+test (1.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Dpkg Developers <debian-dpkg@lists.debian.org> Wed, 20 Aug 1997 00:36:28 +0000