From 69b30a3f6c6179c6868493aebeeb035d493dcb43 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 7 Nov 2014 16:42:10 -0500 Subject: [PATCH] Add out-of-bounds revision check. --- src | 2 ++ srctest | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src b/src index 295eefe..8068be5 100755 --- a/src +++ b/src @@ -232,6 +232,8 @@ class RCSLog: end = self.symbols[end] else: croak("can't resolve symbol {0} in {1}".format(end, self.name)) + if end > len(self): + croak("{0} has no {1} revision".format(self.name, end)) return range(start, end+1) def help_method(*args): diff --git a/srctest b/srctest index 5ab05b9..781ae37 100755 --- a/srctest +++ b/srctest @@ -97,6 +97,8 @@ src $TESTOPTS log testfile1 >testfile5 diff testfile4 testfile5 check "3-commit log test" -# to do: checkout, tag, fast-export, out-of-bounds revisions. +#src list 5 testfile1 + +# to do: checkout, tag, fast-export # end -- 2.43.0