[PATCH 6 of 9] py3: use pycompat.bytestr to convert str(unicode) to bytes
Yuya Nishihara
yuya at tcha.org
Sat Jun 24 03:29:02 UTC 2017
On Sat, 24 Jun 2017 01:25:00 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1498081876 -19800
> # Thu Jun 22 03:21:16 2017 +0530
> # Node ID a1a4111876b69cb34fefcdf50c0ac70ea5ef704b
> # Parent 98d32035dd10311980576a1007ca0ba1cf98240f
> py3: use pycompat.bytestr to convert str(unicode) to bytes
>
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -414,7 +414,7 @@
> if fcl.isabsent():
> hash = nullhex
> else:
> - hash = hashlib.sha1(fcl.path()).hexdigest()
> + hash = pycompat.bytestr(hashlib.sha1(fcl.path()).hexdigest())
This can be hex(sha1(...).digest()).
More information about the Mercurial-devel
mailing list