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

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

Comments

phabricator - March 1, 2018, 7:11 p.m.
durin42 updated this revision to Diff 6267.
durin42 edited the summary of this revision.
durin42 retitled this revision from "util: use util.shellquote() instead of repr() in date parse abort" to "util: use pycompat.bytestr() on repr() in date parse abort".

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -2196,7 +2196,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