diff mercurial/mpatch.c @ 28782:f736f98e16ca

mpatch: unify mpatchError (issue5182) The pure version was mpatch was throwing struct.error or ValueError for errors, whereas the C version was throwing an "mpatch.mpatchError". Introducing an mpatch.mpatchError into pure and using it consistently is fairly easy, but the actual form for it is mercurial.mpatch.mpatchError, so with this commit, we change the C implementation to match the naming convention too.
author timeless <timeless@mozdev.org>
date Thu, 31 Mar 2016 02:05:28 +0000
parents b9714d958e89
children 284d742e5611
line wrap: on
line diff
--- a/mercurial/mpatch.c	Wed Mar 30 22:01:47 2016 +0000
+++ b/mercurial/mpatch.c	Thu Mar 31 02:05:28 2016 +0000
@@ -404,7 +404,8 @@
 	if (m == NULL)
 		return NULL;
 
-	mpatch_Error = PyErr_NewException("mpatch.mpatchError", NULL, NULL);
+	mpatch_Error = PyErr_NewException("mercurial.mpatch.mpatchError",
+					  NULL, NULL);
 	Py_INCREF(mpatch_Error);
 	PyModule_AddObject(m, "mpatchError", mpatch_Error);
 
@@ -415,6 +416,7 @@
 initmpatch(void)
 {
 	Py_InitModule3("mpatch", methods, mpatch_doc);
-	mpatch_Error = PyErr_NewException("mpatch.mpatchError", NULL, NULL);
+	mpatch_Error = PyErr_NewException("mercurial.mpatch.mpatchError",
+					  NULL, NULL);
 }
 #endif