ancestor.deepest: sort revs in C version stable
authorSiddharth Agarwal <sid0@fb.com>
Thu, 25 Jul 2013 14:20:37 -0700
branchstable
changeset 19502 8704477ad3b6
parent 19501 725507cd5216
child 19503 f2dfda6ac152
ancestor.deepest: sort revs in C version This isn't strictly necessary, but it makes the code more consistent with the Python version.
mercurial/parsers.c
--- a/mercurial/parsers.c	Thu Jul 25 10:44:51 2013 -0400
+++ b/mercurial/parsers.c	Thu Jul 25 14:20:37 2013 -0700
@@ -1311,6 +1311,9 @@
 		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;