diff --git a/mercurial/help/dates.txt b/mercurial/help/dates.txt --- a/mercurial/help/dates.txt +++ b/mercurial/help/dates.txt @@ -30,7 +30,7 @@ the timezone is east of UTC). The log command also accepts date ranges: -- ``<{datetime}`` - at or before a given date/time -- ``>{datetime}`` - on or after a given date/time -- ``{datetime} to {datetime}`` - a date range, inclusive -- ``-{days}`` - within a given number of days of today +- ``DATE`` - on or after a given date/time +- ``DATE to DATE`` - a date range, inclusive +- ``-DAYS`` - within a given number of days of today diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1196,12 +1196,12 @@ def matchdate(date): raise Abort(_("dates cannot consist entirely of whitespace")) elif date[0] == "<": if not date[1:]: - raise Abort(_("invalid day spec. use '<{datetime}' ")) + raise Abort(_("invalid day spec, use '": if not date[1:]: - raise Abort(_("invalid day spec. use '>{datetime}' ")) + raise Abort(_("invalid day spec, use '>DATE'")) when = lower(date[1:]) return lambda x: x >= when elif date[0] == "-": diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -525,13 +525,13 @@ log -d -1 log -d ">" $ hg log -d ">" - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] log -d "<" $ hg log -d "<" - abort: invalid day spec. use '<{datetime}' + abort: invalid day spec, use '' or '<' accompanied by space characters $ hg log -d '>' --template '{date|date}\n' - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] $ hg log -d '<' hg log -d '>' --template '{date|date}\n' - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] $ hg log -d ' >' --template '{date|date}\n' - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] $ hg log -d ' <' --template '{date|date}\n' - abort: invalid day spec. use '<{datetime}' + abort: invalid day spec, use ' ' --template '{date|date}\n' - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] $ hg log -d '< ' --template '{date|date}\n' - abort: invalid day spec. use '<{datetime}' + abort: invalid day spec, use ' ' --template '{date|date}\n' - abort: invalid day spec. use '>{datetime}' + abort: invalid day spec, use '>DATE' [255] $ hg log -d ' < ' --template '{date|date}\n' - abort: invalid day spec. use '<{datetime}' + abort: invalid day spec, use '02/01' --template '{date|date}\n'