Mercurial > hg > mercurial-source
changeset 13780:bc7b5d1c1999
util: dates cannot consist entirely of whitespace (issue2732)
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Sun, 27 Mar 2011 23:48:58 +0200 (2011-03-27) |
parents | c13bfa451656 |
children | 66c54d2ebe72 |
files | mercurial/util.py tests/test-log.t |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -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] == ">":