aboutsummaryrefslogtreecommitdiff
path: root/b4/__init__.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-20 17:36:05 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-20 17:36:05 -0400
commit25d22726f626a9957d0a420fe46c530cbcb0dd60 (patch)
treeaf2012af09a520e5d85faa30232f6595cbe0134c /b4/__init__.py
parent8ca2d7f96a4179015b4f4c30d7b906c1b23abf24 (diff)
downloadb4-25d22726f626a9957d0a420fe46c530cbcb0dd60.tar.gz
Initial support for Obsoleted-by: trailer
Per discussion on the users list, add initial support for the "Obsoleted-by" trailer that points at the new revision for the series instead of doing a blind match by subject+from. Probably buggy and needs better support for series number collisions (right now we don't check if the newly retrieved series has a revision number greater than the revision we already have). Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r--b4/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index dad93e8..0053b9c 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -962,7 +962,7 @@ class LoreMessage:
trailers = list()
for tname, tvalue, extdata in self.trailers:
- if tname.lower() in ('fixes',):
+ if tname.lower() in ('fixes', 'obsoleted-by'):
trailers.append((tname, tvalue, extdata, self))
continue
@@ -1273,7 +1273,7 @@ class LoreMessage:
@staticmethod
def find_trailers(body, followup=False):
headers = ('subject', 'date', 'from')
- nonperson = ('fixes', 'subject', 'date', 'link', 'buglink')
+ nonperson = ('fixes', 'subject', 'date', 'link', 'buglink', 'obsoleted-by')
# Fix some more common copypasta trailer wrapping
# Fixes: abcd0123 (foo bar
# baz quux)