You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alex Zepeda <zi...@sonic.net> on 2002/09/21 03:14:19 UTC

cvs2svn fails to parse certain RCS files

In playing around with subversion, one of my first thoughts was to try and
setup a repository.  So I ran a few of the KDE modules through cvs2svn
(kde-common, arts, kdelibs, kdemultimedia).  All except for kdelibs worked
fine.

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.

Traceback (most recent call last):
  File "./cvs2svn.py", line 675, in ?
    main()
  File "./cvs2svn.py", line 672, in main
    util.run_app(convert, ctx, start_pass=start_pass)
  File "/usr/local/lib/python2.2/site-packages/svn/util.py", line 38, in run_app
    return apply(func, (pool,) + args, kw)
  File "./cvs2svn.py", line 623, in convert
    _passes[i](ctx)
  File "./cvs2svn.py", line 498, in pass1
    os.path.walk(ctx.cvsroot, visit_file, (cd, p, stats))
  File "/usr/local/lib/python2.2/posixpath.py", line 279, in walk
    func(arg, top, names)
  File "./cvs2svn.py", line 165, in visit_file
    p.parse(open(pathname), cd)
  File "./rcsparse.py", line 303, in parse
    self.parse_rcs_tree()
  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 collected a few of the offending RCS files and put them up at
http://blarf.homeip.net:8080/rcs (if checking out a 185mb CVS repo from
cvsup.kde.org is a scary thought).

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.

- alex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by Alex Zepeda <zi...@sonic.net>.
On Mon, Sep 23, 2002 at 05:22:15AM -0700, Greg Stein wrote:

> 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.

Heh.

> 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().

Good suggestion perhaps.  However I can't get cvs2svn to work at all now.  
I believe Will has posted on this problem already.

- alex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by Greg Stein <gs...@lyra.org>.
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

Re: cvs2svn fails to parse certain RCS files

Posted by Alex Zepeda <zi...@sonic.net>.
On Sun, Sep 22, 2002 at 12:59:25AM -0500, David Summers wrote:

> If I'm following your line of questioning, trying to anticipate where this 
> is leading then my question is: Does Subversion have to be installed in 
> its final place BEFORE the swig binding can be compiled?  It appears that 
> it compiles OK even before the subversion is installed but maybe I'm 
> missing something.  If Subversion has to be installed BEFORE the swig 
> bindings can be compiled and used then I guess I'll have to make a 
> separate package....that would be a bit of a bummer but I'll do whatever 
> it takes to get this working.  I was hoping to have it all built in one 
> RPM.

No.  But the svn configure script needs to be able to find Swig (check the
output), and you need to have everything installed before you can run
cvs2svn.  'Course past r3033 I can't get cvs2svn to work at all.  Oh well.

- alex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by David Summers <da...@summersoft.fay.ar.us>.
On Sat, 21 Sep 2002, Will Andrews wrote:

> On Sun, Sep 22, 2002 at 12:40:51AM -0500, David Summers wrote:
> > It wasn't enable before but it was detecting the SWIG 1.3.15 but I just 
> > added --with-swig to the Subversion ./configure but it doesn't seem to 
> > make any difference.  I'm still getting the above error.
> 
> Did you re-build and re-install the swig bindings after you
> re-installed subversion with swig support?

Hmmm. I think so.  I'm trying to modify my Subversion RPMs to include the 
ability to use the cvs2svn python script.  So during the build of 
Subversion I try to tell it to also build and install the subversion swig 
bindings so it can run cvs2svn. 

If I'm following your line of questioning, trying to anticipate where this 
is leading then my question is: Does Subversion have to be installed in 
its final place BEFORE the swig binding can be compiled?  It appears that 
it compiles OK even before the subversion is installed but maybe I'm 
missing something.  If Subversion has to be installed BEFORE the swig 
bindings can be compiled and used then I guess I'll have to make a 
separate package....that would be a bit of a bummer but I'll do whatever 
it takes to get this working.  I was hoping to have it all built in one 
RPM.

   Thanks

-- 
David Wayne Summers          "Linux: Because reboots are for upgrades!"
david@summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by Will Andrews <wi...@csociety.org>.
On Sun, Sep 22, 2002 at 12:40:51AM -0500, David Summers wrote:
> It wasn't enable before but it was detecting the SWIG 1.3.15 but I just 
> added --with-swig to the Subversion ./configure but it doesn't seem to 
> make any difference.  I'm still getting the above error.

Did you re-build and re-install the swig bindings after you
re-installed subversion with swig support?

regards,
-- 
wca

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by David Summers <da...@summersoft.fay.ar.us>.
On Sat, 21 Sep 2002, Will Andrews wrote:

> On Sun, Sep 22, 2002 at 12:27:57AM -0500, David Summers wrote:
> > Thanks!  That got me further.  Now I get:
> > 
> > $ env | grep -i PYTHON
> > PYTHONPATH=/usr/lib/python2.2/site-packages/svn
> > $ cvs2svn
> > Traceback (most recent call last):
> >   File "/usr/bin/cvs2svn", line 17, in ?
> >     from svn import fs, util, _delta, _repos
> >   File 
> > "/home/david/rpms/tmp/subversion-0.14.3-3205/usr/lib/python2.2/site-packages/svn/fs.py", 
> > line 19, in ?
> >     import _fs
> > ImportError: /usr/lib/python2.2/site-packages/svn/_fs.so: undefined 
> > symbol: SWIG_TypeQuery
> 
> Is Subversion compiled using --with-swig?

It wasn't enable before but it was detecting the SWIG 1.3.15 but I just 
added --with-swig to the Subversion ./configure but it doesn't seem to 
make any difference.  I'm still getting the above error.

  Thanks for your help.
  - David

-- 
David Wayne Summers          "Linux: Because reboots are for upgrades!"
david@summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by Will Andrews <wi...@csociety.org>.
On Sun, Sep 22, 2002 at 12:27:57AM -0500, David Summers wrote:
> Thanks!  That got me further.  Now I get:
> 
> $ env | grep -i PYTHON
> PYTHONPATH=/usr/lib/python2.2/site-packages/svn
> $ cvs2svn
> Traceback (most recent call last):
>   File "/usr/bin/cvs2svn", line 17, in ?
>     from svn import fs, util, _delta, _repos
>   File 
> "/home/david/rpms/tmp/subversion-0.14.3-3205/usr/lib/python2.2/site-packages/svn/fs.py", 
> line 19, in ?
>     import _fs
> ImportError: /usr/lib/python2.2/site-packages/svn/_fs.so: undefined 
> symbol: SWIG_TypeQuery

Is Subversion compiled using --with-swig?

regards,
-- 
wca

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by David Summers <da...@summersoft.fay.ar.us>.
On Sat, 21 Sep 2002, Will Andrews wrote:

> On Sat, Sep 21, 2002 at 10:58:56PM -0500, David Summers wrote:
> > You've gotten further than I have.  How do you set things up so that 
> > cvs2svn can see and import the rcsparse.py module?  I've gotten SWIG 
> > 1.3.15 installed and subversion saw that when it built and I told it to 
> > install the swig subversion bindings.  But when I run cvs2svn it can't 
> > find the rcsparse.py module/file even if I put it in the svn python 
> > site-packages directory or its own rcsparse directory.
> > 
> > What am I missing?
> 
> You need to install ViewCVS 0.9.2 somewhere.  Then add the path
> to rcsparse.py to the env var PYTHONPATH.  Then cvs2svn should work.

Thanks!  That got me further.  Now I get:

$ env | grep -i PYTHON
PYTHONPATH=/usr/lib/python2.2/site-packages/svn
$ cvs2svn
Traceback (most recent call last):
  File "/usr/bin/cvs2svn", line 17, in ?
    from svn import fs, util, _delta, _repos
  File 
"/home/david/rpms/tmp/subversion-0.14.3-3205/usr/lib/python2.2/site-packages/svn/fs.py", 
line 19, in ?
    import _fs
ImportError: /usr/lib/python2.2/site-packages/svn/_fs.so: undefined 
symbol: SWIG_TypeQuery
$ ls -la /usr/lib/python2.2/site-packages/svn
total 1256
drwxr-xr-x    2 root     root         4096 Sep 22 00:14 .
drwxr-xr-x    9 root     root         4096 Sep 21 13:24 ..
-rw-r--r--    1 root     root          697 Sep 22 00:07 __init__.py
-rw-r--r--    1 root     root          164 Sep 22 00:10 __init__.pyc
-rwxr-xr-x    1 root     root       172085 Sep 22 00:10 _client.so
-rwxr-xr-x    1 root     root       191381 Sep 22 00:10 _delta.so
-rwxr-xr-x    1 root     root       181051 Sep 22 00:10 _fs.so
-rwxr-xr-x    1 root     root       138339 Sep 22 00:10 _ra.so
-rwxr-xr-x    1 root     root       166350 Sep 22 00:10 _repos.so
-rwxr-xr-x    1 root     root       120351 Sep 22 00:10 _util.so
-rwxr-xr-x    1 root     root       195709 Sep 22 00:10 _wc.so
-rw-r--r--    1 root     root         1696 Sep 22 00:07 delta.py
-rw-r--r--    1 root     root         4221 Sep 22 00:10 delta.pyc
-rw-r--r--    1 root     root         1138 Sep 22 00:07 fs.py
-rw-r--r--    1 root     root          859 Sep 22 00:10 fs.pyc
-rwxr-xr-x    1 root     root        12025 Sep 22 00:10 rcsparse.py
-rw-r--r--    1 root     root        16795 Sep 21 13:42 rcsparse.pyc
-rw-r--r--    1 root     root         1980 Sep 22 00:07 util.py
-rw-r--r--    1 root     root         2295 Sep 22 00:10 util.pyc


This is with Subversion (r3205), ViewCVS 0.9.2.

Any ideas?

I've tried following the installation instructions but either they are 
missing something or I'm not understanding something.

   Thanks!

-- 
David Wayne Summers          "Linux: Because reboots are for upgrades!"
david@summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by Will Andrews <wi...@csociety.org>.
On Sat, Sep 21, 2002 at 10:58:56PM -0500, David Summers wrote:
> You've gotten further than I have.  How do you set things up so that 
> cvs2svn can see and import the rcsparse.py module?  I've gotten SWIG 
> 1.3.15 installed and subversion saw that when it built and I told it to 
> install the swig subversion bindings.  But when I run cvs2svn it can't 
> find the rcsparse.py module/file even if I put it in the svn python 
> site-packages directory or its own rcsparse directory.
> 
> What am I missing?

You need to install ViewCVS 0.9.2 somewhere.  Then add the path
to rcsparse.py to the env var PYTHONPATH.  Then cvs2svn should work.

regards,
-- 
wca

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: cvs2svn fails to parse certain RCS files

Posted by David Summers <da...@summersoft.fay.ar.us>.
You've gotten further than I have.  How do you set things up so that 
cvs2svn can see and import the rcsparse.py module?  I've gotten SWIG 
1.3.15 installed and subversion saw that when it built and I told it to 
install the swig subversion bindings.  But when I run cvs2svn it can't 
find the rcsparse.py module/file even if I put it in the svn python 
site-packages directory or its own rcsparse directory.

What am I missing?

   Thanks,
   - David Summers

On Fri, 20 Sep 2002, Alex Zepeda wrote:

> In playing around with subversion, one of my first thoughts was to try and
> setup a repository.  So I ran a few of the KDE modules through cvs2svn
> (kde-common, arts, kdelibs, kdemultimedia).  All except for kdelibs worked
> fine.
> 
> 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.
> 
> Traceback (most recent call last):
>   File "./cvs2svn.py", line 675, in ?
>     main()
>   File "./cvs2svn.py", line 672, in main
>     util.run_app(convert, ctx, start_pass=start_pass)
>   File "/usr/local/lib/python2.2/site-packages/svn/util.py", line 38, in run_app
>     return apply(func, (pool,) + args, kw)
>   File "./cvs2svn.py", line 623, in convert
>     _passes[i](ctx)
>   File "./cvs2svn.py", line 498, in pass1
>     os.path.walk(ctx.cvsroot, visit_file, (cd, p, stats))
>   File "/usr/local/lib/python2.2/posixpath.py", line 279, in walk
>     func(arg, top, names)
>   File "./cvs2svn.py", line 165, in visit_file
>     p.parse(open(pathname), cd)
>   File "./rcsparse.py", line 303, in parse
>     self.parse_rcs_tree()
>   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 collected a few of the offending RCS files and put them up at
> http://blarf.homeip.net:8080/rcs (if checking out a 185mb CVS repo from
> cvsup.kde.org is a scary thought).
> 
> 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.
> 
> - alex
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 

-- 
David Wayne Summers          "Linux: Because reboots are for upgrades!"
david@summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org