Document log date ranges and mention 'hg help dates' for all commands (
issue998)
--- a/hgext/fetch.py Fri Feb 22 11:28:14 2008 +0100
+++ b/hgext/fetch.py Fri Feb 22 21:18:48 2008 +0100
@@ -17,7 +17,10 @@
If the pulled changes add a new head, the head is automatically
merged, and the result of the merge is committed. Otherwise, the
- working directory is updated.'''
+ working directory is updated.
+
+ See 'hg help dates' for a list of formats valid for -d/--date.
+ '''
def postincoming(other, modheads):
if modheads == 0:
--- a/hgext/gpg.py Fri Feb 22 11:28:14 2008 +0100
+++ b/hgext/gpg.py Fri Feb 22 21:18:48 2008 +0100
@@ -198,6 +198,8 @@
If no revision is given, the parent of the working directory is used,
or tip if no revision is checked out.
+
+ See 'hg help dates' for a list of formats valid for -d/--date.
"""
mygpg = newgpg(ui, **opts)
--- a/hgext/record.py Fri Feb 22 11:28:14 2008 +0100
+++ b/hgext/record.py Fri Feb 22 21:18:48 2008 +0100
@@ -341,6 +341,8 @@
If a list of files is omitted, all changes reported by "hg status"
will be candidates for recording.
+ See 'hg help dates' for a list of formats valid for -d/--date.
+
You will be prompted for whether to record changes to each
modified file, and for files with multiple changes, for each
change to use. For each query, the following responses are
--- a/mercurial/commands.py Fri Feb 22 11:28:14 2008 +0100
+++ b/mercurial/commands.py Fri Feb 22 21:18:48 2008 +0100
@@ -184,7 +184,10 @@
before starting the backout, then merges the new head with that
changeset afterwards. This saves you from doing the merge by
hand. The result of this merge is not committed, as for a normal
- merge.'''
+ merge.
+
+ See 'hg help dates' for a list of formats valid for -d/--date.
+ '''
if rev and node:
raise util.Abort(_("please specify just one revision"))
@@ -533,6 +536,8 @@
If no commit message is specified, the configured editor is started to
enter a message.
+
+ See 'hg help dates' for a list of formats valid for -d/--date.
"""
def commitfunc(ui, repo, files, message, match, opts):
return repo.commit(files, message, opts['user'], opts['date'], match,
@@ -1440,6 +1445,7 @@
problems or other deficiencies in the text patch format.
To read a patch from standard input, use patch name "-".
+ See 'hg help dates' for a list of formats valid for -d/--date.
"""
patches = (patch1,) + patches
@@ -1662,6 +1668,8 @@
--follow is set, in which case the working directory parent is
used as the starting revision.
+ See 'hg help dates' for a list of formats valid for -d/--date.
+
By default this command outputs: changeset id and hash, tags,
non-trivial parents, user, date and time, and a summary for each
commit. When the -v/--verbose switch is used, the list of changed
@@ -2173,7 +2181,8 @@
Using the -r option, revert the given files or directories to their
contents as of a specific revision. This can be helpful to "roll
- back" some or all of an earlier change.
+ back" some or all of an earlier change.
+ See 'hg help dates' for a list of formats valid for -d/--date.
Revert modifies the working directory. It does not commit any
changes, or change the parent of the working directory. If you
@@ -2185,7 +2194,6 @@
mode of a file was changed, it is reset.
If names are given, all files matching the names are reverted.
-
If no arguments are given, no files are reverted.
Modified files are saved with a .orig suffix before reverting.
@@ -2541,6 +2549,8 @@
similarly to other project files and can be hand-edited if
necessary. The file '.hg/localtags' is used for local tags (not
shared among repositories).
+
+ See 'hg help dates' for a list of formats valid for -d/--date.
"""
if name in ['tip', '.', 'null']:
raise util.Abort(_("the name '%s' is reserved") % name)
@@ -2642,6 +2652,7 @@
Update the working directory to the specified revision, or the
tip of the current branch if none is specified.
+ See 'hg help dates' for a list of formats valid for -d/--date.
If there are no outstanding changes in the working directory and
there is a linear relationship between the current version and the
--- a/mercurial/help.py Fri Feb 22 11:28:14 2008 +0100
+++ b/mercurial/help.py Fri Feb 22 21:18:48 2008 +0100
@@ -8,8 +8,11 @@
helptable = {
"dates|Date Formats":
r'''
- Some commands (backout, commit, tag) allow the user to specify a date.
- Many date formats are acceptible. Here are some examples:
+ Some commands allow the user to specify a date:
+ backout, commit, import, tag: Specify the commit date.
+ log, revert, update: Select revision(s) by date.
+
+ Many date formats are valid. Here are some examples:
"Wed Dec 6 13:18:29 2006" (local timezone assumed)
"Dec 6 13:18 -0600" (year assumed, time offset provided)
@@ -33,6 +36,13 @@
the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
is the offset of the local timezone, in seconds west of UTC (negative
if the timezone is east of UTC).
+
+ The log command also accepts date ranges:
+
+ "<{date}" - on or before a given date
+ ">{date}" - on or after a given date
+ "{date} to {date}" - a date range, inclusive
+ "-{days}" - within a given number of days of today
''',
'environment|env|Environment Variables':
--- a/tests/test-record.out Fri Feb 22 11:28:14 2008 +0100
+++ b/tests/test-record.out Fri Feb 22 21:18:48 2008 +0100
@@ -6,6 +6,8 @@
If a list of files is omitted, all changes reported by "hg status"
will be candidates for recording.
+ See 'hg help dates' for a list of formats valid for -d/--date.
+
You will be prompted for whether to record changes to each
modified file, and for files with multiple changes, for each
change to use. For each query, the following responses are