D3618: pathencode: remove unused variable
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Mon May 21 14:39:19 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf9eaa5cd9ee9: pathencode: remove unused variable (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3618?vs=8790&id=8861
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, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list