# HG changeset patch # User Martin von Zweigbergk # Date 2017-01-11 19:40:40 # Node ID 43839a24fd592d4d7c0e2dbd4dd2703684511502 # Parent bbb5cc55ab8b74f609e570afb02c419ab932ef6a tests: use `hg help dates` instead of `hg help revs` in test The revisions help is already long and will get longer, so switch to another short and stable topic. diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1154,37 +1154,49 @@ Test commands that collide with topics ( 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" - 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 @@ Dish up an empty repo; serve it cold. - $ 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 @@ -2737,7 +2749,7 @@ Dish up an empty repo; serve it cold. - Help: revisions + Help: dates @@ -2761,7 +2773,7 @@ Dish up an empty repo; serve it cold.
-

Help: revisions

+

Help: dates

-

Specifying Single Revisions

+

Date Formats

- Mercurial supports several ways to specify individual revisions. + 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. +

- 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:

+
    +
  • "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 +

- 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: +

+
    +
  • "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).

- 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 log command also accepts date ranges:

-

- 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. -

+
    +
  • "<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 +