pq: Generate new style Gbp-Pq: Topic <topic> entries
authorGuido Günther <agx@sigxcpu.org>
Thu, 29 Jan 2015 09:04:27 +0000 (10:04 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 8 Feb 2015 15:15:03 +0000 (16:15 +0100)
We shouldn't generate the deprecated ones

gbp/scripts/common/pq.py
tests/13_test_gbp_pq.py

index 04bb712237b81f5c711ec4b967f100323b9c6989..a82e462f3ab9f27d32d50114740b62e74e872d65 100644 (file)
@@ -275,7 +275,7 @@ def apply_and_commit_patch(repo, patch, fallback_author, topic=None):
     tree = repo.write_tree()
     msg = "%s\n\n%s" % (patch.subject, patch.long_desc)
     if topic:
-        msg += "\nGbp-Pq-Topic: %s" % topic
+        msg += "\nGbp-Pq: Topic %s" % topic
     commit = repo.commit_tree(tree, msg, [repo.head], author=author)
     repo.update_ref('HEAD', commit, msg="gbp-pq import %s" % patch.path)
 
index d88f7aedf1b0f5b1c449b9803209464d53137230..c17b7151dcbeb2fd5ea3a53c3fe9913c6605c0b5 100644 (file)
@@ -47,7 +47,7 @@ class TestApplyAndCommit(testutils.DebianGitTestRepo):
 
         pq.apply_and_commit_patch(self.repo, patch, None, topic='foobar')
         info = self.repo.get_commit_info('HEAD')
-        self.assertIn('Gbp-Pq-Topic: foobar', info['body'])
+        self.assertIn('Gbp-Pq: Topic foobar', info['body'])
 
     @unittest.skipIf(not os.path.exists('/usr/bin/dpkg'), 'Dpkg not found')
     def test_debian_missing_author(self):
@@ -111,7 +111,7 @@ class TestWritePatch(testutils.DebianGitTestRepo):
 
         # Add test file with topic:
         msg = ("added foo\n\n"
-               "Gbp-Pq-Topic: gbptest")
+               "Gbp-Pq: Topic gbptest")
         self.add_file('foo', 'foo', msg)
 
         # Write it out as patch and check it's existence