This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit b1973da3 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk

errors: raise InputError when line range to followlines() is out of bounds

Differential Revision:
parent ec73a6a75985
......@@ -199,7 +199,7 @@ def blocksinrange(blocks, rangeb):
if hunkinrange((b1, (b2 - b1)), rangeb):
if lba is None or uba is None or uba < lba:
raise error.Abort(_(b'line range exceeds file size'))
raise error.InputError(_(b'line range exceeds file size'))
return filteredblocks, (lba, uba)
......@@ -960,7 +960,7 @@ check error cases
$ hg log -r 'followlines(baz, 2:40)'
abort: line range exceeds file size
$ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])'
hg: parse error at 43: not a prefix: [
(followlines(baz, 2:4, startrev=20, descend=[1])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment