Closed
Bug 450695
Opened 17 years ago
Closed 16 years ago
Pushlog date query should accept ISO dates without minutes/seconds
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: ted)
References
()
Details
(Whiteboard: [See |hg help dates|])
Attachments
(1 file)
2.42 KB,
patch
|
Details | Diff | Splinter Review |
Bug 437445 added query-by-date to the hg pushlog, but the date parsing is a bit weird. Since I'm used to Bonsai, at first I thought it didn't accept ISO 8601 dates at all.
"2008-07-01 03:00:00" is interpreted correctly, but
"2008-07-01 03:00" somehow becomes "today 03:00"
Ted says anything that isn't a full ISO date gets passed to the natural-language "parsedatetime" module. I think the initial check should be changed to accept truncated ISO dates (missing the seconds, or missing the minutes and seconds). These are valid ISO dates, IIUC.
It also fails if you include a T as the separator between date and time (as specified in ISO 8601) instead of a space and if you include any whitespace at the beginning or end of the date (as often happens when copy and pasting).
I can file separate bugs for these if you'd prefer.
Assignee | ||
Comment 2•17 years ago
|
||
I'll fix those as part of this. (Although maybe not the 'T' in the date, who's seriously going to use that?)
(In reply to comment #2)
> I'll fix those as part of this. (Although maybe not the 'T' in the date, who's
> seriously going to use that?)
I did the first time I tried it for some reason, but yeah guess it's not a common thing. I'd copied in a 14 digit new-style buildid and was manually adding the separators, so I suppose another request is for it to be able to parse the new build id format but perhaps that's off-topic for this bug.
Comment 4•17 years ago
|
||
Even without the hour, if that's valid...
Updated•17 years ago
|
Whiteboard: [See |hg help dates|]
Assignee | ||
Comment 5•16 years ago
|
||
This will let you enter dates like "2008-11-21" "2008-11-21 11" "2008-11-21 11:30" "2008-11-21 11:30:01".
I need to write some tests for it, but it works in my initial testing.
Assignee | ||
Comment 6•16 years ago
|
||
Pushed:
http://hg.mozilla.org/users/bsmedberg_mozilla.com/hgpoller/rev/e955a1f05004
Going to file a bug right away to get all my recent pushlog changes deployed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 7•16 years ago
|
||
(In reply to comment #3)
> I suppose another request is for it to be able to
> parse the new build id format but perhaps that's off-topic for this bug.
Please, file a separate bug, if you want this.
***
V.Fixed, per comment 5 steps.
NB: 'T' is not (yet) supported, per comment 2.
Status: RESOLVED → VERIFIED
Updated•12 years ago
|
Product: mozilla.org → Release Engineering
Comment 8•11 years ago
|
||
Updated•11 years ago
|
Product: Release Engineering → Developer Services
You need to log in
before you can comment on or make changes to this bug.
Description
•