Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2006-10-15 16:44:24
Size: 746
Editor: mpm
Comment:
Revision 6 as of 2010-07-22 07:28:49
Size: 1208
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
We should be able to do more with dates. In particular: This is no longer a plan, but implemented as of Mercurial 0.9.3, see "hg help dates".
Line 3: Line 3:
Logging: === Supported Commands ===
Line 5: Line 5:
We should support a -d switch to show log entries from particular dates. Formats we should support: hg log:

Ther
e is a -d/--date switch to show log entries from particular dates. Supported formats:
Line 15: Line 17:
Checkout/Update/Merge/Revert: hg update/revert:
Line 17: Line 19:
Again, we should support a -d switch, which results in scanning the log for the first matching changeset. This is usually what people want. -d/--date results in scanning the log for the first matching changeset. This is usually what people want.
Line 19: Line 21:
Here, and elsewhere, we should allow dates without hours, minutes, or years. === Date Formats ===

Various date formats are supported. 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-6 13:18:29" (ISO 8601 format)
"2006-12-6 13:18"
"2006-12-6"
"12-6"
"12/6"
"12/6/6" (Dec 6 2006)
}}}

Get more info on date formats with hg help:

{{{
$ hg help dates
}}}

This is no longer a plan, but implemented as of Mercurial 0.9.3, see "hg help dates".

Supported Commands

hg log:

There is a -d/--date switch to show log entries from particular dates. Supported formats:

  • "{date}" - a single date
  • "<{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

We'll need to scan the entire changelog as there's no guarantee that there's any date ordering.

hg update/revert:

-d/--date results in scanning the log for the first matching changeset. This is usually what people want.

Date Formats

Various date formats are supported. 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-6 13:18:29" (ISO 8601 format)
"2006-12-6 13:18"
"2006-12-6"
"12-6"
"12/6"
"12/6/6" (Dec 6 2006)

Get more info on date formats with hg help:

$ hg help dates

DatePlan (last edited 2010-07-22 07:28:49 by MartinGeisler)