##// END OF EJS Templates
log: abort for -d '>' or -d '<' (issue2749)
Yun Lee -
r13867:28f557e8 default
parent child Browse files
Show More
@@ -1222,9 +1222,13 b' def matchdate(date):'
1222 if not date:
1222 if not date:
1223 raise Abort(_("dates cannot consist entirely of whitespace"))
1223 raise Abort(_("dates cannot consist entirely of whitespace"))
1224 elif date[0] == "<":
1224 elif date[0] == "<":
1225 if not date[1:]:
1226 raise Abort(_("invalid day spec. use '<{datetime}' "))
1225 when = upper(date[1:])
1227 when = upper(date[1:])
1226 return lambda x: x <= when
1228 return lambda x: x <= when
1227 elif date[0] == ">":
1229 elif date[0] == ">":
1230 if not date[1:]:
1231 raise Abort(_("invalid day spec. use '>{datetime}' "))
1228 when = lower(date[1:])
1232 when = lower(date[1:])
1229 return lambda x: x >= when
1233 return lambda x: x >= when
1230 elif date[0] == "-":
1234 elif date[0] == "-":
@@ -522,6 +522,18 b' log -d -1'
522
522
523 $ hg log -d -1
523 $ hg log -d -1
524
524
525 log -d ">"
526
527 $ hg log -d ">"
528 abort: invalid day spec. use '>{datetime}'
529 [255]
530
531 log -d "<"
532
533 $ hg log -d "<"
534 abort: invalid day spec. use '<{datetime}'
535 [255]
536
525
537
526 log -p -l2 --color=always
538 log -p -l2 --color=always
527
539
General Comments 0
You need to be logged in to leave comments. Login now