From 47cf4c686008558403f299c9b065efc47ee2e3d5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 12 Aug 2018 01:42:42 +0100 Subject: pq import: Always put DEP-3 headers as pseudo-headers If there are any non-git DEP-3 header fields, put them at the top of the body text, regardless of whether Description or Subject is used. Also put a blank line between them and the rest of the message body. --- gbp/patch_series.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gbp/patch_series.py') diff --git a/gbp/patch_series.py b/gbp/patch_series.py index c66ee9d2..3d272fd9 100644 --- a/gbp/patch_series.py +++ b/gbp/patch_series.py @@ -218,6 +218,7 @@ class Dep3Patch(Patch): return 1 changes = 0 + pseudo_headers = '' long_desc = self._dep3_get_value(headers.get('long_desc', list())) for k, v in headers.items(): @@ -230,10 +231,12 @@ class Dep3Patch(Patch): elif k == 'long_desc': pass else: - long_desc += ''.join(v) + pseudo_headers += ''.join(v) changes += 1 if changes: - self.long_desc = long_desc + self.long_desc + self.long_desc = (pseudo_headers + + ('\n' if pseudo_headers else '') + + long_desc + self.long_desc) def _check_dep3(self): """ -- cgit v1.2.3