Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#750 closed defect (fixed)

Backtrace in Diff.py

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone: 0.8
Component: version control/changeset view Version: devel
Severity: normal Keywords: diff oops
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Happens if I have selected at least one under 'Ignore:' Blank lines, Case changes or White space changes

If none Ignore options are selecgted - no Oops.

Oops…

Trac detected an internal error:

no such column: True Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/core.py", line 523, in cgi_start

real_cgi_start()

File "/usr/lib/python2.3/site-packages/trac/core.py", line 518, in real_cgi_start

dispatch_request(path_info, args, req, env)

File "/usr/lib/python2.3/site-packages/trac/core.py", line 433, in dispatch_request

module.run()

File "/usr/lib/python2.3/site-packages/trac/Module.py", line 47, in run

disp()

File "/usr/lib/python2.3/site-packages/trac/Changeset.py", line 215, in display

self.render_diffs()

File "/usr/lib/python2.3/site-packages/trac/Changeset.py", line 211, in render_diffs

0, 1, 0, 1, self.pool)

File "/usr/lib/python2.3/site-packages/trac/Changeset.py", line 102, in apply_textdelta

self.print_diff (*file_baton)

File "/usr/lib/python2.3/site-packages/trac/Changeset.py", line 55, in print_diff

options = Diff.get_options(self.env, self.req, self.args, 1)

File "/usr/lib/python2.3/site-packages/trac/Diff.py", line 167, in get_options

arg = get_bool_option(session, args, 'ignorecase')

File "/usr/lib/python2.3/site-packages/trac/Diff.py", line 142, in get_bool_option

session.set_var('diff_' + name, arg)

File "/usr/lib/python2.3/site-packages/trac/Session.py", line 141, in set_var

self.sid, self.req.authname, key, val)

File "/usr/lib/python2.3/site-packages/sqlite/main.py", line 255, in execute

self.rs = self.con.db.execute(SQL % parms)

DatabaseError: no such column: True

Attachments (0)

Change History (3)

comment:1 by zilvinas@…, 20 years ago

Please apply the following patch - will fix the problem (I am no Python export though) I think arg is a boolean, thus before stored to session it must be converted to int ?

—- trac/Diff.py (revision 915) +++ trac/Diff.py (working copy) @@ -139,7 +139,7 @@

pref = int(session.get('diff_' + name, default)) arg = args.has_key(name) if args.has_key('update') and arg != pref:

  • session.set_var('diff_' + name, arg)

+ session.set_var('diff_' + name, int(arg))

else:

arg = pref

return arg

comment:2 by Jonas Borgström, 20 years ago

Status: newassigned

dict.has_key() returns a type bool in python ≥ python2.3 and an int in older python versions…

comment:3 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: assignedclosed

Thanks for the report, fixed in [916].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.