aboutsummaryrefslogtreecommitdiff
path: root/b4/mbox.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-11-24 13:16:46 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-11-24 13:16:46 -0500
commit3c31185b4fd40b200aed014aec585a6cebee6816 (patch)
treedab8a50020052bbf6c3aa2067a185e7ea0ebad63 /b4/mbox.py
parentb14e4ac57e5e0876f9e3878a5227fb56b1d03580 (diff)
downloadb4-3c31185b4fd40b200aed014aec585a6cebee6816.tar.gz
Improve ty with cherrypicked subsets
Record patch counters when we start tracking series so we properly indicate in the thank-you note which ones got applied. Additionally, indicate in the subject when we're reporting on a subset of a larger series. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r--b4/mbox.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/b4/mbox.py b/b4/mbox.py
index a49624c..8521c0c 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -246,10 +246,6 @@ def mbox_to_am(mboxfile, cmdargs):
def thanks_record_am(lser, cherrypick=None):
- if not lser.complete:
- logger.debug('Incomplete series, not tracking for thanks')
- return
-
# Are we tracking this already?
datadir = b4.get_data_dir()
slug = lser.get_slug(extended=True)
@@ -257,6 +253,7 @@ def thanks_record_am(lser, cherrypick=None):
patches = list()
at = 0
+ padlen = len(str(lser.expected))
for pmsg in lser.patches[1:]:
at += 1
if pmsg is None:
@@ -270,7 +267,8 @@ def thanks_record_am(lser, cherrypick=None):
if pmsg.attestation is None:
logger.debug('Unable to get hashes for all patches, not tracking for thanks')
return
- patches.append((pmsg.subject, pmsg.pwhash, pmsg.msgid))
+ prefix = '%s/%s' % (str(pmsg.counter).zfill(padlen), pmsg.expected)
+ patches.append((pmsg.subject, pmsg.pwhash, pmsg.msgid, prefix))
lmsg = lser.patches[0]
if lmsg is None:
@@ -289,6 +287,7 @@ def thanks_record_am(lser, cherrypick=None):
'references': b4.LoreMessage.clean_header(lmsg.msg['References']),
'sentdate': b4.LoreMessage.clean_header(lmsg.msg['Date']),
'quote': b4.make_quote(lmsg.body, maxlines=5),
+ 'cherrypick': cherrypick is not None,
'patches': patches,
}
fullpath = os.path.join(datadir, filename)