diff mercurial/patch.py @ 44247:c443b9ba6f63 stable

py3: __repr__ needs to return str, not bytes Differential Revision: https://phab.mercurial-scm.org/D8089
author Kyle Lippincott <spectral@google.com>
date Thu, 02 Jan 2020 11:04:18 -0800
parents a61287a95dc3
children 9d2b2df2c2ba
line wrap: on
line diff
--- a/mercurial/patch.py	Tue Feb 04 12:07:37 2020 +0100
+++ b/mercurial/patch.py	Thu Jan 02 11:04:18 2020 -0800
@@ -1090,6 +1090,7 @@
     def filename(self):
         return self.header.filename()
 
+    @encoding.strmethod
     def __repr__(self):
         return b'<hunk %r@%d>' % (self.filename(), self.fromline)