Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 3806:92a3532a01d9
parsedate: use Abort rather than ValueError
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 06 Dec 2006 13:13:26 -0600 |
parents | 1427949b8f80 |
children | e43b48f0f718 |
line wrap: on
line diff
--- a/mercurial/util.py Wed Dec 06 13:13:25 2006 -0600 +++ b/mercurial/util.py Wed Dec 06 13:13:26 2006 -0600 @@ -1079,17 +1079,15 @@ else: break else: - raise ValueError(_('invalid date: %r ' - 'see hg(1) manual page for details') - % string) + raise Abort(_('invalid date: %r ') % string) # 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 UTC+14 if abs(when) > 0x7fffffff: - raise ValueError(_('date exceeds 32 bits: %d') % when) + raise Abort(_('date exceeds 32 bits: %d') % when) if offset < -50400 or offset > 43200: - raise ValueError(_('impossible time zone offset: %d') % offset) + raise Abort(_('impossible time zone offset: %d') % offset) return when, offset def shortuser(user):