Patchwork D2652: py3: make sure __repr__ returns a str

login
register
mail settings
Submitter phabricator
Date March 4, 2018, 5:28 p.m.
Message ID <differential-rev-PHID-DREV-ptvdlfxxtmze7itqi5ui-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28940/
State Superseded
Headers show

Comments

phabricator - March 4, 2018, 5:28 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because just r'' prefix

REPOSITORY
  rHG Mercurial

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: