diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -963,7 +963,7 @@
         return self.files()[-1]
 
     def __repr__(self):
-        return b'<header %s>' % (b' '.join(map(repr, self.files())))
+        return '<header %s>' % (' '.join(map(repr, self.files())))
 
     def isnewfile(self):
         return any(self.newfile_re.match(h) for h in self.header)