# HG changeset patch # User Martin von Zweigbergk # Date 1533448105 25200 # Node ID 4c0fd3f0a15d08fbe2951fd19813a8e7ec430415 # Parent aa33988ad8ab4497e656d184ff322dddb506b0fc index: drop support for nullid at position len(index) in index_node I think no callers exist since at least a3dacabd476b (index: don't allow index[len(index)] to mean nullid, 2018-07-20). Differential Revision: https://phab.mercurial-scm.org/D4105 diff -r aa33988ad8ab -r 4c0fd3f0a15d mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c Sat Aug 04 23:15:03 2018 -0700 +++ b/mercurial/cext/revlog.c Sat Aug 04 22:48:25 2018 -0700 @@ -228,10 +228,10 @@ Py_ssize_t length = index_length(self) + 1; const char *data; - if (pos == length - 1 || pos == -1) + if (pos == -1) return nullid; - if (pos >= length) + if (pos >= length - 1) return NULL; if (pos >= self->length - 1) {