[darcs-devel] [issue1323] --from-match=date should be from arbitrary dates, not patch dates

gwern bugs at darcs.net
Sat Jan 17 18:18:25 UTC 2009


New submission from gwern <gwern0 at gmail.com>:

So in gitit, we want to be able to get an arbitrary section of a file or
repository's revision history. (The function providing this is used in every
history-related page and bit of functionality, so it's fairly important.)

That is, our Recent Changes page may display 1 year's worth of changes, or maybe
1 day and 1 minute's worth. With Git, we can just pass it a datetime like Thu
Dec 18 18:09:38 UTC 2008, and it'll give us all revisions after that date. Even
if there was no revision at 6:09 that day, but one at 6:10, that 6:10 revision
will be included in the output.

Darcs however, can't seem to do similar stuff. The --match functionality is very
picky and hard to understand, but what I've gathered so far is this:

If I want to use --from-match='date foo', then any precise date like the one
given above *must* be the date of a patch. If it isn't, if it's off at all, then
Darcs errors out.
If I want to use the strange human-readable dates, then I can go
'--from-match=date since 2008-12', or '--from-match=date since 2008-12-18', but
I simply can't get any more precise than that. There are no examples including
minutes and seconds, and all the variants I've tried end with that irksome error
message about 'fancy dates'.

So I am left with no simple approach. There are a number of workarounds, each
more hideous than the last (round to month so I can use --from-match date since
year-month; get the entire history and do XML parsing to make up for darcs' lack
of intelligence in --from-match etc.). 

But much much better would be to change darcs such that: if --from/to-match are
passed a specific date, they return every patch after/before that date,
including any patch on that date (if it exists, and *not* erroring out if it
doesn't!).

----------
messages: 7127
nosy: dmitry.kurochkin, gwern, kowey, simon, thorkilnaur
priority: bug
status: unread
title: --from-match=date should be from arbitrary dates, not patch dates

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1323>
__________________________________


More information about the darcs-devel mailing list