From f9e428489b46ec727b716317bc5b4e4c7a0a11cc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 29 Oct 2020 21:46:16 -0600 Subject: patman: Allow linking a series with patchwork Add a new Series-links tag to tell patman how to find the series in patchwork. Each item is the series ID optionally preceded by the series version that the link refers to. An empty version indicates this is the latest series. For example: Series-links: 209816 1:203302 Documentation is added in a later patch. Signed-off-by: Simon Glass --- tools/patman/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 9f885c89873..393a44241bd 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -16,7 +16,7 @@ from patman import tools # Series-xxx tags that we understand valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name', - 'cover_cc', 'process_log'] + 'cover_cc', 'process_log', 'links'] class Series(dict): """Holds information about a patch series, including all tags. -- cgit v1.2.3 From dffa42c3ef98a8f9bc26a221cdfc3fcfb9f0fa40 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 29 Oct 2020 21:46:25 -0600 Subject: patman: Convert 'Series-xxx' tag errors into warnings If the Series-xxx tag is not recognised patman currently reports a fatal error. This is inconvenient if a new feature is later added to patman that an earlier version does not support. Report a warning instead, to allow the user to take action if needed, but still allow operation to proceed. Signed-off-by: Simon Glass --- tools/patman/series.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 393a44241bd..4457719f2ef 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -59,6 +59,9 @@ class Series(dict): line: Source line containing tag (useful for debug/error messages) name: Tag name (part after 'Series-') value: Tag value (part after 'Series-xxx: ') + + Returns: + String warning if something went wrong, else None """ # If we already have it, then add to our list name = name.replace('-', '_') @@ -78,9 +81,10 @@ class Series(dict): else: self[name] = value else: - raise ValueError("In %s: line '%s': Unknown 'Series-%s': valid " + return ("In %s: line '%s': Unknown 'Series-%s': valid " "options are %s" % (commit.hash, line, name, ', '.join(valid_series))) + return None def AddCommit(self, commit): """Add a commit into our list of commits -- cgit v1.2.3