mercurial/parsers.c
changeset 26080 83c9edcac05c
parent 26079 cefd5c8bab5d
child 26098 ce26928cbe41
equal deleted inserted replaced
26079:cefd5c8bab5d 26080:83c9edcac05c
  1185 		if (revnum + 1 < 0 || revnum + 1 >= len + 1) {
  1185 		if (revnum + 1 < 0 || revnum + 1 >= len + 1) {
  1186 			PyErr_SetString(PyExc_IndexError, "head out of range");
  1186 			PyErr_SetString(PyExc_IndexError, "head out of range");
  1187 			goto bail;
  1187 			goto bail;
  1188 		}
  1188 		}
  1189 		if (!(revstates[revnum + 1] & RS_SEEN)) {
  1189 		if (!(revstates[revnum + 1] & RS_SEEN)) {
  1190 			tovisit[lentovisit++] = revnum;
  1190 			tovisit[lentovisit++] = (int)revnum;
  1191 			revstates[revnum + 1] |= RS_SEEN;
  1191 			revstates[revnum + 1] |= RS_SEEN;
  1192 		}
  1192 		}
  1193 	}
  1193 	}
  1194 
  1194 
  1195 	/* Visit the tovisit list and find the reachable roots */
  1195 	/* Visit the tovisit list and find the reachable roots */
  1226 	}
  1226 	}
  1227 
  1227 
  1228 	/* Find all the nodes in between the roots we found and the heads
  1228 	/* Find all the nodes in between the roots we found and the heads
  1229 	 * and add them to the reachable set */
  1229 	 * and add them to the reachable set */
  1230 	if (includepath == 1) {
  1230 	if (includepath == 1) {
  1231 		int minidx = minroot;
  1231 		long minidx = minroot;
  1232 		if (minidx < 0)
  1232 		if (minidx < 0)
  1233 			minidx = 0;
  1233 			minidx = 0;
  1234 		for (i = minidx; i < len; i++) {
  1234 		for (i = minidx; i < len; i++) {
  1235 			if (!(revstates[i + 1] & RS_SEEN))
  1235 			if (!(revstates[i + 1] & RS_SEEN))
  1236 				continue;
  1236 				continue;