crecord: always return a str from uihunk.__repr__
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 26 Jan 2019 16:45:25 -0800
changeset 41417 5c73441a47e5
parent 41416 1d99c9a5ccb0
child 41418 26761665bdfe
crecord: always return a str from uihunk.__repr__ Otherwise Python 3 complains about it returning bytes. Differential Revision: https://phab.mercurial-scm.org/D5728
mercurial/crecord.py
--- a/mercurial/crecord.py	Sat Jan 26 15:52:37 2019 -0800
+++ b/mercurial/crecord.py	Sat Jan 26 16:45:25 2019 -0800
@@ -487,7 +487,7 @@
         return getattr(self._hunk, name)
 
     def __repr__(self):
-        return '<hunk %r@%d>' % (self.filename(), self.fromline)
+        return r'<hunk %r@%d>' % (self.filename(), self.fromline)
 
 def filterpatch(ui, chunks, chunkselector, operation=None):
     """interactively filter patch chunks into applied-only chunks"""