[PATCH 6 of 9] py3: use pycompat.bytestr to convert str(unicode) to bytes
Pulkit Goyal
7895pulkit at gmail.com
Fri Jun 23 15:55:00 EDT 2017
# 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())
self._repo.vfs.write('merge/' + hash, fcl.data())
self._state[fd] = ['u', hash, fcl.path(),
fca.path(), hex(fca.filenode()),
More information about the Mercurial-devel
mailing list