diff -r 1ebf4ac07582 -r 59d57ea69ae6 mercurial/parsers.c --- a/mercurial/parsers.c Tue Aug 11 14:49:40 2015 -0400 +++ b/mercurial/parsers.c Tue Aug 11 14:50:39 2015 -0400 @@ -1151,13 +1151,13 @@ /* Initialize internal datastructures */ tovisit = (int *)malloc((len + 1) * sizeof(int)); if (tovisit == NULL) { - PyErr_SetNone(PyExc_MemoryError); + PyErr_NoMemory(); goto release_reachable; } seen = (char *)calloc(len+1, 1); if (seen == NULL) { - PyErr_SetNone(PyExc_MemoryError); + PyErr_NoMemory(); goto release_seen_and_tovisit; }