D7695: patch: fix header.__repr__() to not have `b''` prefixes in file names

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Tue Dec 17 23:34:22 EST 2019


mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Spotted by Denis Laxalde.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7695

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS

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



To: mharbison72, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list