mercurial/parsers.c
changeset 19727 3d07b4a2f743
parent 19726 b3c8c6f2b5c1
child 19728 3daabd2da78b
equal deleted inserted replaced
19726:b3c8c6f2b5c1 19727:3d07b4a2f743
  1210 	int i, v, interesting, left;
  1210 	int i, v, interesting, left;
  1211 	int maxrev = -1;
  1211 	int maxrev = -1;
  1212 	long sp;
  1212 	long sp;
  1213 	bitmask *seen;
  1213 	bitmask *seen;
  1214 
  1214 
       
  1215 	if (gca == NULL)
       
  1216 		return PyErr_NoMemory();
       
  1217 
  1215 	for (i = 0; i < revcount; i++) {
  1218 	for (i = 0; i < revcount; i++) {
  1216 		if (revs[i] > maxrev)
  1219 		if (revs[i] > maxrev)
  1217 			maxrev = revs[i];
  1220 			maxrev = revs[i];
  1218 	}
  1221 	}
  1219 
  1222 
  1220 	seen = calloc(sizeof(*seen), maxrev + 1);
  1223 	seen = calloc(sizeof(*seen), maxrev + 1);
  1221 	if (seen == NULL)
  1224 	if (seen == NULL) {
       
  1225 		Py_DECREF(gca);
  1222 		return PyErr_NoMemory();
  1226 		return PyErr_NoMemory();
       
  1227 	}
  1223 
  1228 
  1224 	for (i = 0; i < revcount; i++)
  1229 	for (i = 0; i < revcount; i++)
  1225 		seen[revs[i]] = 1ull << i;
  1230 		seen[revs[i]] = 1ull << i;
  1226 
  1231 
  1227 	interesting = left = revcount;
  1232 	interesting = left = revcount;