D3589: pathencode: improve error messages slightly

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri May 18 22:37:55 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9aaa74f9eb87: pathencode: improve error messages slightly (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3589?vs=8751&id=8760

REVISION DETAIL
  https://phab.mercurial-scm.org/D3589

AFFECTED FILES
  mercurial/cext/pathencode.c

CHANGE DETAILS

diff --git a/mercurial/cext/pathencode.c b/mercurial/cext/pathencode.c
--- a/mercurial/cext/pathencode.c
+++ b/mercurial/cext/pathencode.c
@@ -664,16 +664,17 @@
 		Py_DECREF(name);
 
 		if (hashlib == NULL) {
-			PyErr_SetString(PyExc_ImportError, "hashlib");
+			PyErr_SetString(PyExc_ImportError,
+			                "pathencode failed to find hashlib");
 			return -1;
 		}
 		shafunc = PyObject_GetAttrString(hashlib, "sha1");
 		Py_DECREF(hashlib);
 
 		if (shafunc == NULL) {
 			PyErr_SetString(PyExc_AttributeError,
 			                "module 'hashlib' has no "
-			                "attribute 'sha1'");
+			                "attribute 'sha1' in pathencode");
 			return -1;
 		}
 	}



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list