aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py2
-rw-r--r--b4/command.py2
-rw-r--r--b4/mbox.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index cc93adc..a6b683e 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -585,7 +585,7 @@ class LoreSeries:
mismatches = 0
seenfiles = set()
for lmsg in self.patches[1:]:
- if lmsg.blob_indexes is None:
+ if lmsg is None or lmsg.blob_indexes is None:
continue
for fn, bh in lmsg.blob_indexes:
if fn in seenfiles:
diff --git a/b4/command.py b/b4/command.py
index 39ad3e5..54b79f5 100644
--- a/b4/command.py
+++ b/b4/command.py
@@ -61,7 +61,9 @@ def cmd_ty(cmdargs):
def cmd():
+ # noinspection PyTypeChecker
parser = argparse.ArgumentParser(
+ prog='b4',
description='A tool to work with public-inbox patches',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
diff --git a/b4/mbox.py b/b4/mbox.py
index 5494cab..a859c21 100644
--- a/b4/mbox.py
+++ b/b4/mbox.py
@@ -151,7 +151,7 @@ def mbox_to_am(mboxfile, cmdargs):
else:
best_matches = None
# sort the tags by authordate
- gitargs = ['tag', '-l', '--sort=-creatordate']
+ gitargs = ['tag', '-l', '--sort=-taggerdate']
lines = b4.git_get_command_lines(None, gitargs)
if lines:
# Check last 10 tags
@@ -159,7 +159,7 @@ def mbox_to_am(mboxfile, cmdargs):
logger.debug('Checking base-commit possibility for %s', tag)
checked, mismatches = lser.check_applies_clean(topdir, tag)
if mismatches == 0 and checked != mismatches:
- base_commit = tag
+ cleanmsg = ' (applies clean to: %s)' % tag
break
# did they all mismatch?
if checked == mismatches: