mercurial/changelog.py
changeset 1202 71111d796e40
parent 1197 8deb69818e4b
child 1321 b47f96a178a3
--- a/mercurial/changelog.py	Sun Sep 04 14:45:03 2005 -0700
+++ b/mercurial/changelog.py	Sun Sep 04 14:47:02 2005 -0700
@@ -35,7 +35,10 @@
             # validate explicit (probably user-specified) date and
             # time zone offset. values must fit in signed 32 bits for
             # current 32-bit linux runtimes.
-            when, offset = map(int, date.split(' '))
+            try:
+                when, offset = map(int, date.split(' '))
+            except ValueError:
+                raise ValueError('invalid date: %r' % date)
             if abs(when) > 0x7fffffff:
                 raise ValueError('date exceeds 32 bits: %d' % when)
             if abs(offset) >= 43200: