RE: [viewvc-dev] Exception Issue With ViewVC

"Adeleye, Adekunle (GE Indust, GE Fanuc)" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <1AB4B85652D7334589F25768BD390CD206AB6C76@CINMLVEM16.e2k.ad.ge.com>
Thanks.. yes I can apply this patch and try it, will let you know my
findings.
It will be nice to output a particular file causing the problem, is this
something that can be included in the tools ? 

Kunle 

-----Original Message-----
From: C. Michael Pilato [mailto:[email protected]] 
Sent: Wednesday, December 12, 2007 1:29 PM
To: [email protected]
Subject: Re: [viewvc-dev] Exception Issue With ViewVC

Are you comfortable with applying patches?  If so, try this one.  It
won't tell you what file has the error, but it *will* tell you what the
bogus value was.  You can then grep/find this string in the ,v files in
the problematic directory to see which has the problem.


Index: lib/vclib/bincvs/__init__.py
===================================================================
--- lib/vclib/bincvs/__init__.py	(revision 1703)
+++ lib/vclib/bincvs/__init__.py	(working copy)
@@ -300,7 +300,10 @@
 class Tag:
   def __init__(self, name, revstr):
     self.name = name
-    self.number = _tag_tuple(revstr)
+    try:
+      self.number = _tag_tuple(revstr)
+    except ValueError:
+      raise ValueError, "Bogus revision '%s'" % (revstr)
     self.is_branch = len(self.number) % 2 == 1 or not self.number




Adeleye, Adekunle (GE Indust, GE Fanuc) wrote:
> This just happens on one folder currently that I know of. 
> 
> But how does one trace to the file that is causing this problem, I do 
> not see a file name in the error message.
> 
> Kunle. 
> -----Original Message-----
> From: C. Michael Pilato [mailto:[email protected]]
> Sent: Wednesday, December 12, 2007 12:03 PM
> To: [email protected]
> Subject: Re: [viewvc-dev] Exception Issue With ViewVC
> 
> Adeleye, Adekunle (GE Indust, GE Fanuc) wrote:
>> Does anyone have an idea where this issue is coming from:
>>  
>> An Exception Has Occurred
>> Python Traceback
>>  
>> Traceback (most recent call last):
>>   File "/usr/local/viewvc-1.0.3-dev/lib/viewvc.py", line 3629, in
main
>>     request.run_viewvc()
>>   File "/usr/local/viewvc-1.0.3-dev/lib/viewvc.py", line 388, in
> run_viewvc
>>     self.view_func(self)
>>   File "/usr/local/viewvc-1.0.3-dev/lib/viewvc.py", line 1541, in 
>> view_directory
>>     request.repos.dirlogs(request.path_parts, request.pathrev, 
>> file_data, options)
>>   File "/usr/local/viewvc-1.0.3-dev/lib/vclib/ccvs/__init__.py", line

>> 75, in dirlogs
>>     if Tag(None, rev).is_branch:
>>   File "/usr/local/viewvc-1.0.3-dev/lib/vclib/bincvs/__init__.py",
>> line 303, in __init__
>>     self.number = _tag_tuple(revstr)
>>   File "/usr/local/viewvc-1.0.3-dev/lib/vclib/bincvs/__init__.py",
>> line 474, in _tag_tuple
>>     t = map(int, string.split(revision_string, '.'))
>> ValueError: invalid literal for int():
> 
> In private mail you indicated that this was happening when navigating 
> into a CVS folder.  Any particular folder, or all of them?
> 
> At first glance, the general problem appears to be that ViewVC is 
> trying to get the components which make up a CVS revision number 
> (splitting "1.2.3.4"
> into [1, 2, 3, 4]) and failing because one of those components isn't 
> an integer.  If this is the case, then the problem is most likely 
> found in one of the RCS backing files (the ,v files) in your 
> repository, not a bug in ViewVC itself.
> 
> --
> C. Michael Pilato <[email protected]>
> CollabNet   <>   www.collab.net   <>   Distributed Development On
Demand
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] For 
> additional commands, e-mail: [email protected]
> 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.