[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] -r { DATE } with words

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 20 May 2011 17:26:39 +0200

On Fri, May 20, 2011 at 04:28:55PM +0200, Neels J Hofmeyr wrote:
> On 05/18/2011 09:38 PM, Branko ─îibej wrote:
> >On 17.05.2011 11:36, Stefan Sperling wrote:
> >>On Tue, May 17, 2011 at 12:45:50AM +0200, Stefan Sperling wrote:
> >>>Any comments or objections?
> >>Neels didn't like the arbitrary "round to 00:00 of next day" rules
> >>and everyone in the hackathon room seems to agree. So "one day ago"
> >>is now the same as "24 hours ago".
> >>
> >>I also dropped the "yesterday" keyword because it overlaps with "one day ago".
> I liked 'yesterday' as 'yesterday' == 'one day ago', even add
> 'fortnight' and so on. But I agree with Brane's reservations. Having
> an untranslatable, grammar dependent non-feature that isn't even
> documented... weeeell...
> BUT, why don't we just use standardized unit letters? e.g. {-1d}
> means one day ago. Then we'd have something like
> [-+]<float-nr>[YyMDdHhmSs]

What would we need the + for? We cannot resolve future revisions.

> (M = months, m = minutes, the others are case insensitive)
> No need to translate, no grammar involved, less characters to write.
> svn log -r {-1.5d}
> (one-and-a-half days ago)
> Heh and we'd drop the '+' too, I guess, making the '-' optional.
> Brainstorming more, the [+-] could define the range:
> svn log -r {1y} -r {+1M}
> (get the log from one year ago to a month after that.)
> and the reverse case, though some may probably not want to support this:
> svn log -r {-1d} -r {5M}
> svn log -r {5M} -r {-1d}
> (get the log from five months and a day ago until five months ago.)
> If I were to write this feature, this would be my choice. stsp?

I think the current simple grammer is easier to understand at first sight.
It doesn't even need documentation. -r{-1d} isn't self-documenting at all.
Received on 2011-05-20 17:27:30 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.