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

Re: RFC: date parser rewrite

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-12-20 01:34:23 CET

mark benedetto king wrote:
> On Fri, Dec 19, 2003 at 02:44:21PM -0600, kfogel@collab.net wrote:
>>This thread's been dormant for a bit, so I'm afraid to disturb it :-).

Heh - yes.

For what it's worth, I think Karl is talking sense with regard to how this fits into the big picture of releasing the first "proper" version of Subversion.

The only thing as far as I am concerned that would be intolerable is guaranteeing to support all of the currently accepted date formats in future. As I mentioned, we can solve that by documenting that the nasty formats are not supported even though the code happens to accept them currently.

> If we decide not to replace the date parser before 1.0, then I suggest
> we:
> 1.) protect the logic with a big mutex

That sounds like a moderately important thing to do, and a small enough change that porting it into 1.0 is a reasonable option.

> 2.) follow your suggestion to add support for the formats we want
> to add by wrapping the existing logic

No need to do that for version 1.0. Version 1.0 will still be useful without the new formats, as it has been for a year and more. We can add new formats in version 1.1 or 1.2 or any time later.

> 3.) *Deprecate* all behavior outside the strictly limited input set
> I proposed earlier.

Yes - that's the important point. It can be as simple as changing this part of the book:

Subversion accepts an incredible number of date formats—just remember to use quotes around any date that contains spaces. Here are just a few of the formats that Subversion accepts:

$ svn checkout --revision {2002-02-17}
$ svn checkout --revision {2/17/02}
$ svn checkout --revision {"17 Feb"}
$ svn checkout --revision {"17 Feb 2002"}
$ svn checkout --revision {"17 Feb 2002 15:30"}
$ svn checkout --revision {"17 Feb 2002 15:30:12 GMT"}
$ svn checkout --revision {"10 days ago"}
$ svn checkout --revision {"last week"}
$ svn checkout --revision {"yesterday"}

to something like:

You should specify the date as YYYY-MM-DD hh:mm:ss. (Subversion currently accepts an incredible number of date formats but they won't be supported in future.) Remember to use quotes around any date that contains spaces.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 20 01:34:44 2003

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.