# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1544804684 -3600 # Fri Dec 14 17:24:44 2018 +0100 # Node ID 36c68746763d6b93b00c19387e79bd9cb623da72 # Parent 216e6d5c773cd51c18e351b11a8105165d2ad2d7 # EXP-Topic sparse-followup # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 36c68746763d sparse-revlog: handle nullrev in index_get_length
The more generic index_get method handle nullrev fine, we apply the same logic here. diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -227,6 +227,9 @@ static inline int64_t index_get_start(in static inline int index_get_length(indexObject *self, Py_ssize_t rev) { + if (rev == nullrev) { + return 0; + } if (rev >= self->length) { PyObject *tuple; PyObject *pylong; _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel