Patchwork D2652: py3: make sure __repr__ returns a str

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 6:01 p.m.
Message ID <d922c6b268eee30c4da9be89e29fc185@localhost.localdomain>
Download mbox | patch
Permalink /patch/28946/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2018, 6:01 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc6901665cd5b: py3: make sure __repr__ returns a str (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2652?vs=6566&id=6571

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -748,7 +748,7 @@ 
     __str__ = encoding.strmethod(__bytes__)
 
     def __repr__(self):
-        return "<%s %s>" % (type(self).__name__, str(self))
+        return r"<%s %s>" % (type(self).__name__, str(self))
 
     def __hash__(self):
         try: