Patchwork D2438: util: use pycompat.bytestr() on repr() in date parse abort

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 11:14 p.m.
Message ID <5a5e66325a253db65f977affd8a75bc4@localhost.localdomain>
Download mbox | patch
Permalink /patch/28615/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 11:14 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8346c0e2af92: util: use pycompat.bytestr() on repr() in date parse abort (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2438?vs=6296&id=6298

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2479,7 +2479,8 @@ 
             else:
                 break
         else:
-            raise error.ParseError(_('invalid date: %r') % date)
+            raise error.ParseError(
+                _('invalid date: %s') % pycompat.bytestr(repr(date)))
     # validate explicit (probably user-specified) date and
     # time zone offset. values must fit in signed 32 bits for
     # current 32-bit linux runtimes. timezones go from UTC-12