diff --git a/hgext/fetch.py b/hgext/fetch.py --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -17,7 +17,10 @@ def fetch(ui, repo, source='default', ** 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: diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -198,6 +198,8 @@ def sign(ui, repo, *revs, **opts): 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) diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -341,6 +341,8 @@ def record(ui, repo, *pats, **opts): 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 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -184,7 +184,10 @@ def backout(ui, repo, node=None, rev=Non 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 @@ def commit(ui, repo, *pats, **opts): 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 @@ def import_(ui, repo, patch1, *patches, 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 @@ def log(ui, repo, *pats, **opts): --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 @@ def revert(ui, repo, *pats, **opts): 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 @@ def revert(ui, repo, *pats, **opts): 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 @@ def tag(ui, repo, name, rev_=None, **opt 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 @@ def update(ui, repo, node=None, rev=None 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 diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -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 @@ helptable = { 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': diff --git a/tests/test-record.out b/tests/test-record.out --- a/tests/test-record.out +++ b/tests/test-record.out @@ -6,6 +6,8 @@ interactively select changes to commit 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