D3618: pathencode: remove unused variable
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat May 19 19:16:11 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Caught by Yuya during review of https://phab.mercurial-scm.org/rHG92ac9cf78dba7765b39e32e1380bfa5e51a44ff5.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3618
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
@@ -655,14 +655,7 @@
PyObject *shaobj, *hashobj;
if (shafunc == NULL) {
- PyObject *hashlib, *name = PyBytes_FromString("hashlib");
-
- if (name == NULL)
- return -1;
-
- hashlib = PyImport_ImportModule("hashlib");
- Py_DECREF(name);
-
+ PyObject *hashlib = PyImport_ImportModule("hashlib");
if (hashlib == NULL) {
PyErr_SetString(PyExc_ImportError,
"pathencode failed to find hashlib");
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list