--- a/tests/test-help.t Wed Jan 11 11:28:54 2017 -0800
+++ b/tests/test-help.t Wed Jan 11 11:40:40 2017 -0800
@@ -1154,37 +1154,49 @@
Test a help topic
- $ hg help revs
- Specifying Single Revisions
- """""""""""""""""""""""""""
-
- Mercurial supports several ways to specify individual revisions.
-
- A plain integer is treated as a revision number. Negative integers are
- treated as sequential offsets from the tip, with -1 denoting the tip, -2
- denoting the revision prior to the tip, and so forth.
-
- A 40-digit hexadecimal string is treated as a unique revision identifier.
- A hexadecimal string less than 40 characters long is treated as a unique
- revision identifier and is referred to as a short-form identifier. A
- short-form identifier is only valid if it is the prefix of exactly one
- full-length identifier.
-
- Any other string is treated as a bookmark, tag, or branch name. A bookmark
- is a movable pointer to a revision. A tag is a permanent name associated
- with a revision. A branch name denotes the tipmost open branch head of
- that branch - or if they are all closed, the tipmost closed head of the
- branch. Bookmark, tag, and branch names must not contain the ":"
- character.
-
- The reserved name "tip" always identifies the most recent revision.
-
- The reserved name "null" indicates the null revision. This is the revision
- of an empty repository, and the parent of revision 0.
-
- The reserved name "." indicates the working directory parent. If no
- working directory is checked out, it is equivalent to null. If an
- uncommitted merge is in progress, "." is the revision of the first parent.
+ $ hg help dates
+ Date Formats
+ """"""""""""
+
+ Some commands allow the user to specify a date, e.g.:
+
+ - 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)
+ - "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
+ - "Dec 6" (midnight)
+ - "13:18" (today assumed)
+ - "3:39" (3:39AM assumed)
+ - "3:39pm" (15:39)
+ - "2006-12-06 13:18:29" (ISO 8601 format)
+ - "2006-12-6 13:18"
+ - "2006-12-6"
+ - "12-6"
+ - "12/6"
+ - "12/6/6" (Dec 6 2006)
+ - "today" (midnight)
+ - "yesterday" (midnight)
+ - "now" - right now
+
+ Lastly, there is Mercurial's internal format:
+
+ - "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
+
+ This is the internal representation format for dates. The first number is
+ the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
+ 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" - at or before a given date/time
+ - ">DATE" - on or after a given date/time
+ - "DATE to DATE" - a date range, inclusive
+ - "-DAYS" - within a given number of days of today
Test repeated config section name
@@ -2726,7 +2738,7 @@
</html>
- $ get-with-headers.py 127.0.0.1:$HGPORT "help/revisions"
+ $ get-with-headers.py 127.0.0.1:$HGPORT "help/dates"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -2737,7 +2749,7 @@
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
- <title>Help: revisions</title>
+ <title>Help: dates</title>
</head>
<body>
@@ -2761,7 +2773,7 @@
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
- <h3>Help: revisions</h3>
+ <h3>Help: dates</h3>
<form class="search" action="/log">
@@ -2770,42 +2782,56 @@
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
- <h1>Specifying Single Revisions</h1>
+ <h1>Date Formats</h1>
<p>
- Mercurial supports several ways to specify individual revisions.
+ Some commands allow the user to specify a date, e.g.:
</p>
+ <ul>
+ <li> backout, commit, import, tag: Specify the commit date.
+ <li> log, revert, update: Select revision(s) by date.
+ </ul>
<p>
- A plain integer is treated as a revision number. Negative integers are
- treated as sequential offsets from the tip, with -1 denoting the tip,
- -2 denoting the revision prior to the tip, and so forth.
+ Many date formats are valid. Here are some examples:
</p>
+ <ul>
+ <li> "Wed Dec 6 13:18:29 2006" (local timezone assumed)
+ <li> "Dec 6 13:18 -0600" (year assumed, time offset provided)
+ <li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
+ <li> "Dec 6" (midnight)
+ <li> "13:18" (today assumed)
+ <li> "3:39" (3:39AM assumed)
+ <li> "3:39pm" (15:39)
+ <li> "2006-12-06 13:18:29" (ISO 8601 format)
+ <li> "2006-12-6 13:18"
+ <li> "2006-12-6"
+ <li> "12-6"
+ <li> "12/6"
+ <li> "12/6/6" (Dec 6 2006)
+ <li> "today" (midnight)
+ <li> "yesterday" (midnight)
+ <li> "now" - right now
+ </ul>
<p>
- A 40-digit hexadecimal string is treated as a unique revision identifier.
- A hexadecimal string less than 40 characters long is treated as a
- unique revision identifier and is referred to as a short-form
- identifier. A short-form identifier is only valid if it is the prefix
- of exactly one full-length identifier.
+ Lastly, there is Mercurial's internal format:
+ </p>
+ <ul>
+ <li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
+ </ul>
+ <p>
+ This is the internal representation format for dates. The first number
+ is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
+ second is the offset of the local timezone, in seconds west of UTC
+ (negative if the timezone is east of UTC).
</p>
<p>
- Any other string is treated as a bookmark, tag, or branch name. A
- bookmark is a movable pointer to a revision. A tag is a permanent name
- associated with a revision. A branch name denotes the tipmost open branch head
- of that branch - or if they are all closed, the tipmost closed head of the
- branch. Bookmark, tag, and branch names must not contain the ":" character.
- </p>
- <p>
- The reserved name "tip" always identifies the most recent revision.
+ The log command also accepts date ranges:
</p>
- <p>
- The reserved name "null" indicates the null revision. This is the
- revision of an empty repository, and the parent of revision 0.
- </p>
- <p>
- The reserved name "." indicates the working directory parent. If no
- working directory is checked out, it is equivalent to null. If an
- uncommitted merge is in progress, "." is the revision of the first
- parent.
- </p>
+ <ul>
+ <li> "<DATE" - at or before a given date/time
+ <li> ">DATE" - on or after a given date/time
+ <li> "DATE to DATE" - a date range, inclusive
+ <li> "-DAYS" - within a given number of days of today
+ </ul>
</div>
</div>