Edgewall Software
Modify

Ticket #750 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Backtrace in Diff.py

Reported by: anonymous Owned by: jonas
Priority: normal Milestone: 0.8
Component: version control/changeset view Version: devel
Severity: normal Keywords: diff oops
Cc:
Release Notes:
API 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

Change History

comment:1 Changed 8 years ago by zilvinas@…

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 Changed 8 years ago by jonas

  • Status changed from new to assigned

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

comment:3 Changed 8 years ago by jonas

  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks for the report, fixed in [916].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.