sparse: raise a move verbose index error from the C code
authorBoris Feld <boris.feld@octobus.net>
Tue, 27 Nov 2018 02:10:14 +0100
changeset 40756 c85964d715fd
parent 40755 e3792741e3fb
child 40757 2f14d1bbc9a7
sparse: raise a move verbose index error from the C code If we don't like a value we should print it.
mercurial/cext/revlog.c
--- 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;