Mercurial > hg
comparison mercurial/cext/revlog.c @ 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 | 8edca70dc951 |
children | cb372d09d30a |
comparison
equal
deleted
inserted
replaced
40755:e3792741e3fb | 40756:c85964d715fd |
---|---|
1187 Py_ssize_t revnum = PyInt_AsLong(PyList_GET_ITEM(list_revs, i)); | 1187 Py_ssize_t revnum = PyInt_AsLong(PyList_GET_ITEM(list_revs, i)); |
1188 if (revnum == -1 && PyErr_Occurred()) { | 1188 if (revnum == -1 && PyErr_Occurred()) { |
1189 goto bail; | 1189 goto bail; |
1190 } | 1190 } |
1191 if (revnum < 0 || revnum >= idxlen) { | 1191 if (revnum < 0 || revnum >= idxlen) { |
1192 PyErr_SetString(PyExc_IndexError, "index out of range"); | 1192 PyErr_Format(PyExc_IndexError, |
1193 "index out of range: %zd", revnum); | |
1193 goto bail; | 1194 goto bail; |
1194 } | 1195 } |
1195 revs[i] = revnum; | 1196 revs[i] = revnum; |
1196 } | 1197 } |
1197 | 1198 |