##// END OF EJS Templates
reachableroots: return list of revisions instead of set...
Yuya Nishihara -
r26055:607868ec default
parent child Browse files
Show More
@@ -1148,11 +1148,9 b' static PyObject *reachableroots2(indexOb'
1148 1148 includepath = 1;
1149 1149
1150 1150 /* Initialize return set */
1151 reachable = PySet_New(NULL);
1152 if (reachable == NULL) {
1153 PyErr_NoMemory();
1151 reachable = PyList_New(0);
1152 if (reachable == NULL)
1154 1153 goto bail;
1155 }
1156 1154
1157 1155 /* Initialize internal datastructures */
1158 1156 tovisit = (int *)malloc((len + 1) * sizeof(int));
@@ -1205,7 +1203,7 b' static PyObject *reachableroots2(indexOb'
1205 1203 val = PyInt_FromLong(revnum);
1206 1204 if (val == NULL)
1207 1205 goto bail;
1208 PySet_Add(reachable, val);
1206 PyList_Append(reachable, val);
1209 1207 Py_DECREF(val);
1210 1208 if (includepath == 0)
1211 1209 continue;
@@ -1241,12 +1239,13 b' static PyObject *reachableroots2(indexOb'
1241 1239 if (r < 0)
1242 1240 goto bail;
1243 1241 for (k = 0; k < 2; k++) {
1244 if (revstates[parents[k] + 1] & RS_REACHABLE) {
1242 if ((revstates[parents[k] + 1] & RS_REACHABLE)
1243 && !(revstates[i + 1] & RS_REACHABLE)) {
1245 1244 revstates[i + 1] |= RS_REACHABLE;
1246 1245 val = PyInt_FromLong(i);
1247 1246 if (val == NULL)
1248 1247 goto bail;
1249 PySet_Add(reachable, val);
1248 PyList_Append(reachable, val);
1250 1249 Py_DECREF(val);
1251 1250 }
1252 1251 }
General Comments 0
You need to be logged in to leave comments. Login now