diff options
author | Simon Glass <sjg@chromium.org> | 2025-05-10 13:05:10 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-27 10:07:42 +0100 |
commit | dcf630b3beb8b75ef2ce009de3515075173f653b (patch) | |
tree | 4ab9cb4fe0c2189d81fabc9ac7b4131330f2b777 | |
parent | dff62ec8b4034ff97e21739e6c2eb8f2b4312b5f (diff) |
patman: Introduce basic database support in Series
This class manages a series, i.e. a group of patches with a possible
cover letter. Add some properties for recording basic patchwork info,
including the database ID.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/patman/series.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py index 97bb048c4b7..3d48836e90a 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -39,6 +39,10 @@ class Series(dict): allow_overwrite (bool): Allow tags to overwrite an existing tag base_commit (Commit): Commit object at the base of this series branch (str): Branch name of this series + desc (str): Description of the series (cover-letter title) + idnum (int or None): Database rowid + name (str): Series name, typically the branch name without any numeric + suffix _generated_cc (dict) written in MakeCcFile() key: name of patch file value: list of email addresses @@ -54,6 +58,9 @@ class Series(dict): self.allow_overwrite = False self.base_commit = None self.branch = None + self.desc = '' + self.idnum = None + self.name = None self._generated_cc = {} # These make us more like a dictionary @@ -63,6 +70,14 @@ class Series(dict): def __getattr__(self, name): return self[name] + @staticmethod + def from_fields(idnum, name, desc): + ser = Series() + ser.idnum = idnum + ser.name = name + ser.desc = desc + return ser + def AddTag(self, commit, line, name, value): """Add a new Series-xxx tag along with its value. |