Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 36568:0c2eeaca0577
util: use pycompat.bytestr() on repr() in date parse abort
Avoids the b'' prefix.
Differential Revision: https://phab.mercurial-scm.org/D2438
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 25 Feb 2018 22:31:13 -0500 |
parents | 3158052720ae |
children | 98d4c642d7f2 |
comparison
equal
deleted
inserted
replaced
36567:81d4a11549ec | 36568:0c2eeaca0577 |
---|---|
2477 except (ValueError, OverflowError): | 2477 except (ValueError, OverflowError): |
2478 pass | 2478 pass |
2479 else: | 2479 else: |
2480 break | 2480 break |
2481 else: | 2481 else: |
2482 raise error.ParseError(_('invalid date: %r') % date) | 2482 raise error.ParseError( |
2483 _('invalid date: %r') % pycompat.bytestr(date)) | |
2483 # validate explicit (probably user-specified) date and | 2484 # validate explicit (probably user-specified) date and |
2484 # time zone offset. values must fit in signed 32 bits for | 2485 # time zone offset. values must fit in signed 32 bits for |
2485 # current 32-bit linux runtimes. timezones go from UTC-12 | 2486 # current 32-bit linux runtimes. timezones go from UTC-12 |
2486 # to UTC+14 | 2487 # to UTC+14 |
2487 if when < -0x80000000 or when > 0x7fffffff: | 2488 if when < -0x80000000 or when > 0x7fffffff: |