From: Simon Glass <sjg@chromium.org> When scanning a branch, check if the cover letter title has changed and update the series description in the database. This keeps the description in sync when the cover letter is edited between scans. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- tools/patman/cseries.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 0b4ce91b024..716d3c7aa88 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -932,6 +932,13 @@ class Cseries(cser_helper.CseriesHelper): self.db.pcommit_delete(svid) self._add_series_commits(ser, svid) + + # Update series description if the cover letter has changed + branch_desc = ser.cover[0] if ser.cover else None # pylint: disable=E1136 + if branch_desc and branch_desc != ser.desc: + self.db.series_set_desc(ser.idnum, branch_desc) + tout.notice(f"Updated description to '{branch_desc}'") + if not dry_run: self.commit() seq = len(ser.commits) -- 2.43.0