##// END OF EJS Templates
errors: raise InputError when line range to followlines() is out of bounds...
Martin von Zweigbergk -
r46485:c8860a21 default
parent child Browse files
Show More
@@ -199,7 +199,7 b' def blocksinrange(blocks, rangeb):'
199 if hunkinrange((b1, (b2 - b1)), rangeb):
199 if hunkinrange((b1, (b2 - b1)), rangeb):
200 filteredblocks.append(block)
200 filteredblocks.append(block)
201 if lba is None or uba is None or uba < lba:
201 if lba is None or uba is None or uba < lba:
202 raise error.Abort(_(b'line range exceeds file size'))
202 raise error.InputError(_(b'line range exceeds file size'))
203 return filteredblocks, (lba, uba)
203 return filteredblocks, (lba, uba)
204
204
205
205
@@ -960,7 +960,7 b' check error cases'
960 [255]
960 [255]
961 $ hg log -r 'followlines(baz, 2:40)'
961 $ hg log -r 'followlines(baz, 2:40)'
962 abort: line range exceeds file size
962 abort: line range exceeds file size
963 [255]
963 [10]
964 $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])'
964 $ hg log -r 'followlines(baz, 2:4, startrev=20, descend=[1])'
965 hg: parse error at 43: not a prefix: [
965 hg: parse error at 43: not a prefix: [
966 (followlines(baz, 2:4, startrev=20, descend=[1])
966 (followlines(baz, 2:4, startrev=20, descend=[1])
General Comments 0
You need to be logged in to leave comments. Login now