changeset 40756:c85964d715fd

sparse: raise a move verbose index error from the C code If we don't like a value we should print it.
author Boris Feld <boris.feld@octobus.net>
date Tue, 27 Nov 2018 02:10:14 +0100
parents e3792741e3fb
children 2f14d1bbc9a7
files mercurial/cext/revlog.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Fri Oct 05 23:10:56 2018 +0300
+++ b/mercurial/cext/revlog.c	Tue Nov 27 02:10:14 2018 +0100
@@ -1189,7 +1189,8 @@
 			goto bail;
 		}
 		if (revnum < 0 || revnum >= idxlen) {
-			PyErr_SetString(PyExc_IndexError, "index out of range");
+			PyErr_Format(PyExc_IndexError,
+			             "index out of range: %zd", revnum);
 			goto bail;
 		}
 		revs[i] = revnum;