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

Re: date parsing problem

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-05-11 08:26:03 CEST

Barry Scott <barry@barrys-emacs.org> writes:
> In pysvn I use svn_parse_date to convert the string date from
> svn_client_log
> into apr_time_t.
>
> One user reports that the dates are not getting converted.
> He used vss2svn to create the repos with these bad dates.

While there might be an argument for making the Subversion date parser
more tolerant, it does seem like this is a bug in vss2svn, which is a
separate project. Subversion is only responsible for the repositories
it creates. If some other tool creates a repository that looks a lot
like a Subversion repository (except that it's not, quite, because it
uses a different date format), Subversion may not be able to parse
that repository.

However, just write a script to go through the repository, changing
the svn:date revision properties in the obvious way, that should fix
it. Do

   search://subversion revprops/

for more on them :-).

Best,
-Karl

> Here is a log entry my user found is causing the problem.
>
> svn log -r {2002-03-05}:{2002-03-01} --xml file://localhost/p:/svn/
> produtos
> <?xml version="1.0"?>
> <log>
> <logentry
> revision="2772">
> <author>paulo</author>
> <date>2002-03-04T19:57:0.000030Z</date>
> <msg>Checked in $/CardioMg/TransTel</msg>
> </logentry>
> <logentry
> revision="2771">
> <author>paulo</author>
> <date>2002-03-04T18:48:0.000028Z</date>
> <msg>Checked in $/CardioMg/Recorder</msg>
> </logentry>
>
> I'm guessing that the issue is that there is only 1 digit for the
> seconds where
> as iso 8601 mandates 2 digits.
>
> At this point we have a bad date and svn_parse_date says it cannot
> parse it.
> No problem. But it seems that the svn command is parsing these dates
> so that
> it can support revision date ranges.
>
> Am I right that these are not iso 8601 format date?
> Is it your intention that these almost iso 8601 dates should be
> supported?
> If so why doesn't svn_parse_date support them?
>
> Barry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 11 08:26:18 2007

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.