Patchwork D3131: py3: fix error string with bytestr() on repr()d value

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:32 p.m.
Message ID <differential-rev-PHID-DREV-yfbzs4ft6rmmprudue6x-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30358/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 12:32 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/mdiff.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -78,7 +78,8 @@ 
             self.context = int(self.context)
         except ValueError:
             raise error.Abort(_('diff context lines count must be '
-                               'an integer, not %r') % self.context)
+                                'an integer, not %r') %
+                              pycompat.bytestr(self.context))
 
     def copy(self, **kwargs):
         opts = dict((k, getattr(self, k)) for k in self.defaults)