diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -618,6 +618,7 @@ def _getcompblockgen(context, leftlines, rightlines, opcodes): for type, llo, lhi, rlo, rhi in opcodes: + type = pycompat.sysbytes(type) len1 = lhi - llo len2 = rhi - rlo count = min(len1, len2)