# HG changeset patch # User Siddharth Agarwal # Date 2013-07-25 21:20:37 # Node ID 8704477ad3b6b6ffd93f0ab33cfb4b7c8ce81247 # Parent 725507cd52169b979ecb67b51a177d6e99ae4616 ancestor.deepest: sort revs in C version This isn't strictly necessary, but it makes the code more consistent with the Python version. diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -1311,6 +1311,9 @@ static PyObject *find_deepest(indexObjec goto bail; } + if (PyList_Sort(revs) == -1) + goto bail; + for (i = 0; i < revcount; i++) { int n = (int)PyInt_AsLong(PyList_GET_ITEM(revs, i)); long b = 1l << i;