]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/oe-build-perf-report: fix handling of --history-length
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 15 Sep 2017 12:54:51 +0000 (15:54 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Sep 2017 10:07:23 +0000 (11:07 +0100)
Don't crash if 'left' revision is older than the range of commits
specified with '--history-length'. In this case the 'left' revision
takes precedence.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-build-perf-report

index 3a76ab621d755d39d808e802855d191aea69b848..defd930b04cf99f0a8a087ffabf645fd092a73d5 100755 (executable)
@@ -563,7 +563,7 @@ def main(argv=None):
     xml = is_xml_format(repo, revs[index_r].tags[-1])
 
     if args.html:
-        index_0 = max(0, index_r - args.history_length)
+        index_0 = max(0, min(index_l, index_r - args.history_length))
         rev_range = range(index_0, index_r + 1)
     else:
         # We do not need range of commits for text report (no graphs)