aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-15 17:58:17 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-05-15 17:58:17 -0400
commitaaf4ae403c5acff9127e81446bb858719d3b120f (patch)
tree8da49d257efae6223529fce17cdaee6eb8ea5022
parente4e1f6e35d147bb567e3c2d996e628fe1ca6467a (diff)
downloadb4-aaf4ae403c5acff9127e81446bb858719d3b120f.tar.gz
Don't try to compare version to itself
Need to figure this out earlier, but at least don't try to compare two versions to itself. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/diff.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/b4/diff.py b/b4/diff.py
index 2d9ebe0..0ce2283 100644
--- a/b4/diff.py
+++ b/b4/diff.py
@@ -107,11 +107,18 @@ def main(cmdargs):
upper = max(lmbx.series.keys())
lower = min(lmbx.series.keys())
+ if upper == lower:
+ logger.critical('Could not find previous revision')
+ os.unlink(mboxfile)
+ sys.exit(1)
+
if upper not in lmbx.series:
logger.critical('Could not find revision %s', upper)
+ os.unlink(mboxfile)
sys.exit(1)
if lower not in lmbx.series:
logger.critical('Could not find revision %s', lower)
+ os.unlink(mboxfile)
sys.exit(1)
# Prepare the lower fake-am range