From aaf4ae403c5acff9127e81446bb858719d3b120f Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 15 May 2020 17:58:17 -0400 Subject: 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 --- b4/diff.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3