comparison mercurial/patch.py @ 43943:0671f0a19d93

patch: fix header.__repr__() to not have `b''` prefixes in file names Spotted by Denis Laxalde. Differential Revision: https://phab.mercurial-scm.org/D7695
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 17 Dec 2019 23:33:35 -0500
parents 727cf6acadfe
children a61287a95dc3
comparison
equal deleted inserted replaced
43942:6c8108274dc5 43943:0671f0a19d93
961 961
962 def filename(self): 962 def filename(self):
963 return self.files()[-1] 963 return self.files()[-1]
964 964
965 def __repr__(self): 965 def __repr__(self):
966 return '<header %s>' % (' '.join(map(repr, self.files()))) 966 return '<header %s>' % (
967 ' '.join(pycompat.rapply(pycompat.fsdecode, self.files()))
968 )
967 969
968 def isnewfile(self): 970 def isnewfile(self):
969 return any(self.newfile_re.match(h) for h in self.header) 971 return any(self.newfile_re.match(h) for h in self.header)
970 972
971 def special(self): 973 def special(self):