--- 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):
--- a/tests/test-parse-date.out Wed Dec 06 13:13:25 2006 -0600
+++ b/tests/test-parse-date.out Wed Dec 06 13:13:26 2006 -0600
@@ -3,7 +3,7 @@
merging with changeset 2:e6c3abc120e7
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
-abort: invalid date: 'should fail' see hg(1) manual page for details
+abort: invalid date: 'should fail'
transaction abort!
rollback completed
abort: date exceeds 32 bits: 100000000000000000