summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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