mercurial/util.py
changeset 13780 bc7b5d1c1999
parent 13734 16118b4859a1
child 13795 43b5fe18ea6c
--- a/mercurial/util.py	Fri Mar 25 15:49:43 2011 -0400
+++ b/mercurial/util.py	Sun Mar 27 23:48:58 2011 +0200
@@ -1215,7 +1215,10 @@
         return parsedate(date, extendeddateformats, d)[0]
 
     date = date.strip()
-    if date[0] == "<":
+
+    if not date:
+        raise Abort(_("dates cannot consist entirely of whitespace"))
+    elif date[0] == "<":
         when = upper(date[1:])
         return lambda x: x <= when
     elif date[0] == ">":