From patchwork Thu Mar 1 19:11:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2438: util: use pycompat.bytestr() on repr() in date parse abort From: phabricator X-Patchwork-Id: 28577 Message-Id: <858ec39ce9950e146cead53cbe8102fe@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Thu, 1 Mar 2018 19:11:22 +0000 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 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