##// END OF EJS Templates
util: dates cannot consist entirely of whitespace (issue2732)
Idan Kamara -
r13780:bc7b5d1c default
parent child Browse files
Show More
@@ -1215,7 +1215,10 b' def matchdate(date):'
1215 return parsedate(date, extendeddateformats, d)[0]
1215 return parsedate(date, extendeddateformats, d)[0]
1216
1216
1217 date = date.strip()
1217 date = date.strip()
1218 if date[0] == "<":
1218
1219 if not date:
1220 raise Abort(_("dates cannot consist entirely of whitespace"))
1221 elif date[0] == "<":
1219 when = upper(date[1:])
1222 when = upper(date[1:])
1220 return lambda x: x <= when
1223 return lambda x: x <= when
1221 elif date[0] == ">":
1224 elif date[0] == ">":
@@ -512,7 +512,11 b' log -k r1'
512 date: Thu Jan 01 00:00:01 1970 +0000
512 date: Thu Jan 01 00:00:01 1970 +0000
513 summary: r1
513 summary: r1
514
514
515 log -d " " (whitespaces only)
515
516
517 $ hg log -d " "
518 abort: dates cannot consist entirely of whitespace
519 [255]
516
520
517 log -d -1
521 log -d -1
518
522
General Comments 0
You need to be logged in to leave comments. Login now