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

Re: cvs2svn fails to parse certain RCS files

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-09-23 14:22:15 CEST

On Fri, Sep 20, 2002 at 08:14:19PM -0700, Alex Zepeda wrote:
>...
> I'm using subversion from r3205, swig 1.3.15, python 2.2, FreeBSD-current
> (more or less), and rcsparse.py from the viewcvs 0.9.2 tarball.
>...
> File "./rcsparse.py", line 229, in parse_rcs_tree
> timestamp = time.mktime(tuple(date_fields))
> OverflowError: mktime argument out of range
>
> With a few debuging prints I found that the first date that it barfs on
> is: 2001.04.01.02.33.28. If I "fix" or remove this file, each subsequent
> failure is on an April 1st date. Oy.

I've seen this before. It is because 02:33:28 is a non-existent time in
areas where Daylight Savings exists. There is a gap as the time shoots from
02:00 to 03:00 on that day.

Elsewhere in ViewCVS, we deal with that by advancing the parsed date by one
hour, then constructing the Python time.

The rcsparse in the current ViewCVS CVS repos has a fix for this problem,
but I don't like it. (note that rcsparse turned from a simple module into a
package) The package depends on an external module named "compat" which
lives in the ViewCVS library. That isn't "Right", so I'm trying to figure
out a better way to organize the code in there.

[ at some point, we're going to take a snapshot of rcsparse and just put
  that into svn's tree to make it easier for people to use cvs2svn ]

>...
> The RCS files look perfectly okay to me, but I'm not an RCS guru of any
> sort. Any ideas on where this is comming from? Changing the date(s) by
> hand to April 5th seems to fix everything. This is of course a less than
> ideal solution.

You can manually adjust them by one hour.

Even better, take a look at the function parse_log_entry() in viewcvs.py.
You'll see the funny business about advancing by one hour. You can replicate
that portion of the code into your rcsparse.py where it calls mktime().

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 23 14:22:19 2002

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