Re: [viewvc-dev] [PATCH] fix exception on mixing url-based and filesystem-based svn repositories

"C. Michael Pilato" <[email protected]> Thu, 07 May 2009 10:40:40 -0400
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Organization CollabNet, Inc.
Message-ID <[email protected]>
Harald,

Are you running under mod_python, by chance?  I'm trying to figure out how
you're hitting this condition, and the best I can guess is that under
mod_python you've got the vclib.svn_ra module loaded (with a reference as
vclib.svn) and then -- because mod_python isn't dumping its module
collection between displays -- another request that needs to load the real
vclib.svn bypasses that step and then blows the call to SubversionRepository().

Does that sound right?

I think the correct fix is to do what I did for ViewVC 1.1.x, which is to
hide the vclib.ccvs and vclib.bincvs modules behind a single switching
module (vclib.ccvs) and the vclib.svn and vclib.svn_ra modules behind
another single switching module (vclib.svn).  Would you agree?


Harald Karner wrote:
> Hi,
> 
> when I mix svn repositories that are url-based with filesystem-based 
> ones in my viewvc.conf, I get an exception on switching to browsing the 
> filesys-based repository.
> 
> System configuration:
> python 2.5.1
> ViewVC 1.0.8
> 
> viewvc.conf (excerpt):
> 
> svn_roots = url_based: https://server/svn/repo,
>              filesys_based: /home/user/whatever/svnrepo
> default_root = url_based
> 
> 
> The exception in the browser:
> 
> An Exception Has Occurred
> Python Traceback
> 
> Traceback (most recent call last):
>    File "/home/hka/workspace/viewvc-1.0.8/lib/viewvc.py", line 3753, in main
>      request.run_viewvc()
>    File "/home/hka/workspace/viewvc-1.0.8/lib/viewvc.py", line 268, in 
> run_viewvc
>      cfg.general.svn_path)
> TypeError: __init__() takes exactly 3 arguments (4 given)
> 
> 
> 
> The attached patch fixes this behavior.
> 
> regards,
> Harald Karner
> 
> ------------------------------------------------------
> http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2082212
> 
> To unsubscribe from this discussion, e-mail: [[email protected]].
> 


-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2095810

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoC8ugACgkQokEGqRcG/W6GxwCfWbpEOYHbKzd8NOzUE2nUyFwb
TbMAoMKAGggM5evCkWTqKzKGeS6wp+Sm
=2kfB
-----END PGP SIGNATURE-----