changeset 45175:211063648b29

phases: fix error return with no exception from computephases() PySet_Check() does not set an exception.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 18 Jul 2020 18:13:41 +0900
parents f93a4e3d35ab
children 3264d58e8b06
files mercurial/cext/revlog.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Sun Jul 19 17:35:41 2020 +0900
+++ b/mercurial/cext/revlog.c	Sat Jul 18 18:13:41 2020 +0900
@@ -757,8 +757,11 @@
 	int rev, minrev = -1;
 	char *node;
 
-	if (!PySet_Check(roots))
+	if (!PySet_Check(roots)) {
+		PyErr_SetString(PyExc_TypeError,
+		                "roots must be a set of nodes");
 		return -2;
+	}
 	iterator = PyObject_GetIter(roots);
 	if (iterator == NULL)
 		return -2;