mercurial/parsers.c
branchstable
changeset 19504 2fa303619b4d
parent 19503 f2dfda6ac152
child 19652 187bf2dde7c1
equal deleted inserted replaced
19503:f2dfda6ac152 19504:2fa303619b4d
  1386 
  1386 
  1387 	dict = PyDict_New();
  1387 	dict = PyDict_New();
  1388 	if (dict == NULL)
  1388 	if (dict == NULL)
  1389 		goto bail;
  1389 		goto bail;
  1390 
  1390 
  1391 	j = ninteresting;
  1391 	for (i = 0; i < revcount; i++) {
  1392 	for (i = 0; i < revcount && j > 0; i++) {
       
  1393 		PyObject *key;
  1392 		PyObject *key;
  1394 
  1393 
  1395 		if ((final & (1 << i)) == 0)
  1394 		if ((final & (1 << i)) == 0)
  1396 			continue;
  1395 			continue;
  1397 
  1396 
  1401 		if (PyDict_SetItem(dict, key, Py_None) == -1) {
  1400 		if (PyDict_SetItem(dict, key, Py_None) == -1) {
  1402 			Py_DECREF(key);
  1401 			Py_DECREF(key);
  1403 			Py_DECREF(Py_None);
  1402 			Py_DECREF(Py_None);
  1404 			goto bail;
  1403 			goto bail;
  1405 		}
  1404 		}
  1406 		j -= 1;
       
  1407 	}
  1405 	}
  1408 
  1406 
  1409 	keys = PyDict_Keys(dict);
  1407 	keys = PyDict_Keys(dict);
  1410 
  1408 
  1411 	free(depth);
  1409 	free(depth);