durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY This results in slight output changes. I'm not thrilled with seeing a literal tab instead of \t in the output, but this is, to my memory, consistent with how we've handled this in other places for Python 3 porting. The loss of quotes in test-revset.t is also vaguely upsetting to me, but I don't view it as a BC problem since it's an error message, so let's roll with it for now. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2438 AFFECTED FILES mercurial/util.py tests/test-commit.t tests/test-revset.t CHANGE DETAILS diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -413,7 +413,7 @@ hg: parse error: invalid \x escape [255] $ log 'date(tip)' - hg: parse error: invalid date: 'tip' + hg: parse error: invalid date: tip [255] $ log '0:date' abort: unknown revision 'date'! diff --git a/tests/test-commit.t b/tests/test-commit.t --- a/tests/test-commit.t +++ b/tests/test-commit.t @@ -18,7 +18,7 @@ hg: parse error: impossible time zone offset: 4444444 [255] $ hg commit -d '1 15.1' -m commit-4 - hg: parse error: invalid date: '1\t15.1' + hg: parse error: invalid date: '1 15.1' [255] $ hg commit -d 'foo bar' -m commit-5 hg: parse error: invalid date: 'foo bar' diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -2191,7 +2191,7 @@ else: break else: - raise error.ParseError(_('invalid date: %r') % date) + raise error.ParseError(_('invalid date: %s') % shellquote(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 To: durin42, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel