aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-20 19:09:32 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-20 19:11:05 -0400
commitcbcc79012d44e6b7e79583d078409628b8834a69 (patch)
tree866db99c89fb98f18e2ba7c1a45793add635bd7d
parenta857294bf5f40b1ca364a3901763429ff1bba926 (diff)
downloadb4-cbcc79012d44e6b7e79583d078409628b8834a69.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py15
1 files 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()