D3588: pathencode: hashlib.sha1() takes bytes not str on Python 3

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4fccc73ce2f6: pathencode: hashlib.sha1() takes bytes not str on Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3588?vs=8750&id=8759

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

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
@@ -678,7 +678,7 @@
 		}
 	}
 
-	shaobj = PyObject_CallFunction(shafunc, "s#", str, len);
+	shaobj = PyObject_CallFunction(shafunc, PY23("s#", "y#"), str, len);
 
 	if (shaobj == NULL)
 		return -1;



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


More information about the Mercurial-devel mailing list