diff --git a/mercurial/sparse.py b/mercurial/sparse.py --- a/mercurial/sparse.py +++ b/mercurial/sparse.py @@ -173,12 +173,13 @@ tempsignature = '0' if signature is None or (includetemp and tempsignature is None): - signature = hashlib.sha1(repo.vfs.tryread('sparse')).hexdigest() + signature = pycompat.bytestr( + hashlib.sha1(repo.vfs.tryread('sparse')).hexdigest()) cache['signature'] = signature if includetemp: raw = repo.vfs.tryread('tempsparse') - tempsignature = hashlib.sha1(raw).hexdigest() + tempsignature = pycompat.bytestr(hashlib.sha1(raw).hexdigest()) cache['tempsignature'] = tempsignature return '%s %s' % (signature, tempsignature)