Your message dated Tue, 13 May 2008 14:30:58 +0100
with message-id <[EMAIL PROTECTED]>
and subject line viewcvs has been removed from Debian, closing #223351
has caused the Debian Bug report #223351,
regarding viewcvs: Crash when diffing to invalid revision
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
223351: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=223351
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: viewcvs
Version: 0.9.2-4; reported 2003-12-08
Severity: normal
Tags: patch
We have a file that was first added on a branch. The viewcvs log looks like
this (links _underlined_):
Revision _1.1.2.1_ ...
Branch: _foo_
Changes since 1.1: +16 -0 lines
Diff to _previous 1.1_
"Added blah.c"
Revision 1.1
Branch: _MAIN_
CVS Tags: _HEAD_
Branch point for: _foo_
FILE REMOVED
file blah.c was initially added on branch foo.
Note that Revision 1.1 is not a link. Either because of this, or
because of the FILE REMOVED tag, our bug tracker (FogBugz) generates a
diff to previous link of ".../blah.c?r1=NONE&r2=1.1.2.1", instead of
r1=1.1. This gives the following crash:
Traceback (most recent call last):
File "/usr/lib/python2.1/viewcvs/viewcvs.py", line 2645, in run_cgi
main()
File "/usr/lib/python2.1/viewcvs/viewcvs.py", line 2613, in main
view_diff(request, full_name)
File "/usr/lib/python2.1/viewcvs/viewcvs.py", line 2339, in view_diff
if revcmp(rev1, rev2) > 0:
File "/usr/lib/python2.1/viewcvs/viewcvs.py", line 1098, in revcmp
rev1 = map(int, string.split(rev1, '.'))
ValueError: invalid literal for int(): NONE
Obviously this is at least half FogBugz's fault, but I think it would be
useful to default to the first revision (which I assume is always 1.1)
if the user types a bad URL. This patch will do that:
--- viewcvs.py.orig 2003-12-08 15:30:02.000000000 -0500
+++ viewcvs.py 2003-12-08 15:30:57.000000000 -0500
@@ -1095,8 +1095,14 @@
return fileinfo, alltags
def revcmp(rev1, rev2):
- rev1 = map(int, string.split(rev1, '.'))
- rev2 = map(int, string.split(rev2, '.'))
+ try:
+ rev1 = map(int, string.split(rev1, '.'))
+ except ValueError:
+ rev1 = 1.1
+ try:
+ rev2 = map(int, string.split(rev2, '.'))
+ except ValueError:
+ rev2 = 1.1
return cmp(rev1, rev2)
def view_directory(request):
Another option is to catch ValueError farther up and display a nicely
formatted error message instead of just crashing, but I prefer this
patch because it makes FogBugz (and probably other not-quite-correct
software) useful now.
-- System Information
Debian Release: testing/stable
Architecture: i386
Kernel: Linux echo 2.4.19 #1 SMP Wed Jul 9 17:30:38 EDT 2003 i686 unknown
Locale: LANG=C, LC_CTYPE=C
--- End Message ---
--- Begin Message ---
Version: 0.9.2+cvs.1.0.dev.2004.07.28-4.1+rm
The viewcvs package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.
For more information about this package's removal, read
http://bugs.debian.org/460451 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
--
Marco Rodrigues
http://Marco.Tondela.org
--- End Message ---