diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -661,13 +661,13 @@ exactneg = [g for g in patchguards if g.startswith('-') and g[1:] in guards] if exactneg: - return False, repr(exactneg[0]) + return False, pycompat.bytestr(repr(exactneg[0])) pos = [g for g in patchguards if g.startswith('+')] exactpos = [g for g in pos if g[1:] in guards] if pos: if exactpos: - return True, repr(exactpos[0]) - return False, ' '.join(map(repr, pos)) + return True, pycompat.bytestr(repr(exactpos[0])) + return False, ' '.join([pycompat.bytestr(repr(p)) for p in pos]) return True, '' def explainpushable(self, idx, all_patches=False): @@ -1156,7 +1156,7 @@ for c in ('#', ':', '\r', '\n'): if c in name: raise error.Abort(_('%r cannot be used in the name of a patch') - % c) + % pycompat.bytestr(c)) def checkpatchname(self, name, force=False): self.checkreservedname(name)