diff mercurial/util.py @ 13867:28f557e8b419

log: abort for -d '>' or -d '<' (issue2749)
author Yun Lee <yunlee.bj@gmail.com>
date Mon, 04 Apr 2011 00:23:21 +0800
parents e574207e3bcd
children b470894c33f8
line wrap: on
line diff
--- a/mercurial/util.py	Mon Apr 04 00:05:41 2011 +0200
+++ b/mercurial/util.py	Mon Apr 04 00:23:21 2011 +0800
@@ -1222,9 +1222,13 @@
     if not date:
         raise Abort(_("dates cannot consist entirely of whitespace"))
     elif date[0] == "<":
+	if not date[1:]:
+            raise Abort(_("invalid day spec. use '<{datetime}' "))
         when = upper(date[1:])
         return lambda x: x <= when
     elif date[0] == ">":
+	if not date[1:]:
+            raise Abort(_("invalid day spec. use '>{datetime}' "))
         when = lower(date[1:])
         return lambda x: x >= when
     elif date[0] == "-":