diff mercurial/parsers.c @ 19504:2fa303619b4d stable

ancestor.deepest: ignore ninteresting while building result (issue3984) ninteresting indicates the number of non-zero elements in the interesting array, not the number of elements in the final list. Since elements in interesting can stand for more than one gca, limiting the number of results to ninteresting is an error. Tests for issue3984 are included.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 25 Jul 2013 14:43:15 -0700
parents f2dfda6ac152
children 187bf2dde7c1
line wrap: on
line diff
--- a/mercurial/parsers.c	Thu Jul 25 17:35:53 2013 +0800
+++ b/mercurial/parsers.c	Thu Jul 25 14:43:15 2013 -0700
@@ -1388,8 +1388,7 @@
 	if (dict == NULL)
 		goto bail;
 
-	j = ninteresting;
-	for (i = 0; i < revcount && j > 0; i++) {
+	for (i = 0; i < revcount; i++) {
 		PyObject *key;
 
 		if ((final & (1 << i)) == 0)
@@ -1403,7 +1402,6 @@
 			Py_DECREF(Py_None);
 			goto bail;
 		}
-		j -= 1;
 	}
 
 	keys = PyDict_Keys(dict);