For some error, mercurial displays the type of a variable. However the
formatting string used was "%s" which is not compatible with type and lead
to an excpetion `TypeError: %b requires a bytes-like object, or an object that
implements bytes, not 'type'`.
Per pep-046, we replace "%s" with "%r" which stay compatible with python2 and