Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 13886:fe48c57390f2
help/dates: use DATE as place-holder in help and abort texts
The use of "{datetime}" was unfortunate since I as a user never knew
if I was expected to do
hg log -d '>{2011-04-01}'
or
hg log -d '>2011-04-01'
The word "datetime" is also confusing -- calling it a date it much
simpler.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 05 Apr 2011 10:01:39 +0200 |
parents | 5b0a3f6cbead |
children | 9a96efc4af8a |
comparison
equal
deleted
inserted
replaced
13885:5d115ea4030b | 13886:fe48c57390f2 |
---|---|
1194 | 1194 |
1195 if not date: | 1195 if not date: |
1196 raise Abort(_("dates cannot consist entirely of whitespace")) | 1196 raise Abort(_("dates cannot consist entirely of whitespace")) |
1197 elif date[0] == "<": | 1197 elif date[0] == "<": |
1198 if not date[1:]: | 1198 if not date[1:]: |
1199 raise Abort(_("invalid day spec. use '<{datetime}' ")) | 1199 raise Abort(_("invalid day spec, use '<DATE'")) |
1200 when = upper(date[1:]) | 1200 when = upper(date[1:]) |
1201 return lambda x: x <= when | 1201 return lambda x: x <= when |
1202 elif date[0] == ">": | 1202 elif date[0] == ">": |
1203 if not date[1:]: | 1203 if not date[1:]: |
1204 raise Abort(_("invalid day spec. use '>{datetime}' ")) | 1204 raise Abort(_("invalid day spec, use '>DATE'")) |
1205 when = lower(date[1:]) | 1205 when = lower(date[1:]) |
1206 return lambda x: x >= when | 1206 return lambda x: x >= when |
1207 elif date[0] == "-": | 1207 elif date[0] == "-": |
1208 try: | 1208 try: |
1209 days = int(date[1:]) | 1209 days = int(date[1:]) |