From cbcc79012d44e6b7e79583d078409628b8834a69 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Mon, 20 Apr 2020 19:09:32 -0400 Subject: Use the cover for backfills when available When we have a cover letter, use that for backfill purposes, instead of finding the first non-None patch. Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/b4/__init__.py b/b4/__init__.py index 0a250ef..e7f655f 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -149,12 +149,15 @@ class LoreMailbox: return None def backfill(self, revision): - # Find first non-None member in patches - lser = self.series[revision] - patch = None - for patch in lser.patches: - if patch is not None: - break + if revision in self.covers and self.covers[revision] is not None: + patch = self.covers[revision] + else: + # Find first non-None member in patches + lser = self.series[revision] + patch = None + for patch in lser.patches: + if patch is not None: + break logger.info('---') logger.info('Thread incomplete, attempting to backfill') cachedir = get_cache_dir() -- cgit v1.2.3