diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-22 17:55:05 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-22 17:55:05 -0400 |
commit | a73711ad65e0f5d9ad155713fea2e609cd7fc188 (patch) | |
tree | b4262a156dc28474b298a9b8bd8e547038d59228 /b4/__init__.py | |
parent | 6ab6ed4dacb2c238ab35087cae9dd8c72feb2304 (diff) | |
download | b4-a73711ad65e0f5d9ad155713fea2e609cd7fc188.tar.gz |
Add ability to diff arbitrary mbox files
Sometimes we are unable to properly look up previous series -- usually
because the cover letter title changes. For those cases, it is now
possible to diff two arbitrary mbox files prepared with "b4 am -T".
There's also a smattering of other fixes in there because I'm too
lazy to properly stage my patches.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r-- | b4/__init__.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index 414f669..b6f25fe 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -335,19 +335,19 @@ class LoreMailbox: logger.debug('Looking at: %s', lmsg.full_subject) self.msgid_map[lmsg.msgid] = lmsg - if lmsg.counter == 0 and lmsg.has_diffstat: - # Cover letter - # Add it to covers -- we'll deal with them later - logger.debug(' adding as v%s cover letter', lmsg.revision) - self.covers[lmsg.revision] = lmsg - return - if lmsg.reply: # We'll figure out where this belongs later logger.debug(' adding to followups') self.followups.append(lmsg) return + if lmsg.counter == 0 and (not lmsg.counters_inferred or lmsg.has_diffstat): + # Cover letter + # Add it to covers -- we'll deal with them later + logger.debug(' adding as v%s cover letter', lmsg.revision) + self.covers[lmsg.revision] = lmsg + return + if re.search(r'^Comment: att-fmt-ver:', lmsg.body, re.I | re.M): logger.debug('Found attestation message') LoreAttestationDocument.load_from_string(lmsg.msgid, lmsg.body) |