Patchwork D8091: py3: fully fix bundlepart.__repr__ to return str not bytes

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2020, 8:41 p.m.
Message ID <dcc69719cc5ea975490e94a7b25b7d54@localhost.localdomain>
Download mbox | patch
Permalink /patch/45029/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2020, 8:41 p.m.
Closed by commit rHG74172a234dd3: py3: fully fix bundlepart.__repr__ to return str not bytes (authored by spectral).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8091?vs=19978&id=19994

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8091/new/

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

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS




To: spectral, #hg-reviewers, marmoute, pulkit
Cc: marmoute, mercurial-devel

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1013,10 +1013,9 @@ 
         self._generated = None
         self.mandatory = mandatory
 
-    @encoding.strmethod
     def __repr__(self):
-        cls = b"%s.%s" % (self.__class__.__module__, self.__class__.__name__)
-        return b'<%s object at %x; id: %s; type: %s; mandatory: %s>' % (
+        cls = "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
+        return '<%s object at %x; id: %s; type: %s; mandatory: %s>' % (
             cls,
             id(self),
             self.id,