changeset 38055:4fccc73ce2f6

pathencode: hashlib.sha1() takes bytes not str on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3588
author Augie Fackler <augie@google.com>
date Fri, 18 May 2018 20:42:31 -0400
parents 92ac9cf78dba
children 9aaa74f9eb87
files mercurial/cext/pathencode.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/pathencode.c	Fri May 18 20:42:04 2018 -0400
+++ b/mercurial/cext/pathencode.c	Fri May 18 20:42:31 2018 -0400
@@ -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;