--- a/mercurial/parsers.c Mon Dec 14 10:47:26 2015 -0800 +++ b/mercurial/parsers.c Mon Dec 14 10:47:27 2015 -0800 @@ -1411,8 +1411,10 @@ } nothead = calloc(len, 1); - if (nothead == NULL) + if (nothead == NULL) { + PyErr_NoMemory(); goto bail; + } for (i = 0; i < len; i++) { int isfiltered;