Cache problem: "TypeError: previous_rev() takes exactly 2 arguments (3 given)"

Bug #338429 reported by Adam Buchbinder
2
Affects Status Importance Assigned to Milestone
Trac-Git
Fix Released
Unknown
trac-git (Debian)
Fix Released
Unknown
trac-git (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: trac-git

I'm running trac and trac-git, with cached_repository = true. When I try to view a revision, I get the following error (summarized):

While doing a GET operation on `/changeset/afc71fcc75bd4287c5d8e41bb28f5bb39f476f8b`, Trac issued an internal error.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 323, in process_request
    self._render_html(req, repos, chgset, restricted, xhr, data)
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/changeset.py", line 406, in _render_html
    prev_rev = repos.previous_rev(chgset.rev)
  File "/usr/lib/python2.5/site-packages/trac/versioncontrol/cache.py", line 241, in previous_rev
    return self.repos.previous_rev(rev, path)
TypeError: previous_rev() takes exactly 2 arguments (3 given)

I'm running trac 0.11-2 and trac-git 0.0.20080710-1 on Ubuntu Intrepid.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
Package: trac-git 0.0.20080710-1
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
SourcePackage: trac-git
Uname: Linux 2.6.27-11-generic i686

Tags: apport-bug
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :
Changed in trac-git:
status: Unknown → Fix Released
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

The attached patch allows cached repositories to work, if applied against the version in Intrepid. (Nothing in the Debian changelog for the version in Jaunty suggests the problem is fixed there, and the upstream version is the same.)

I've been unable to make it into a debdiff, and I've run out of patience for struggling against quilt, so here's a bare patch against 0.11/tracext/git/git_fs.py. With only this change made, I have "cached_repository = true" working on my local Trac instance. (Note that I had to restart Apache to get the installation of the new version to take effect; apparently mod_python does some sort of caching. If it seems to fail, that's probably why.)

Original source for the patch is here: http://trac-hacks.org/attachment/ticket/3008/gitplugin-prevrev.patch

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for taking the time to report this bug and including a patch. It seems to be fixed in the Jaunty version of the package as there is a now a patch (debian/patches/01-r4147-add-previous_rev_argument.diff) with this change.

Changed in trac-git (Ubuntu):
importance: Undecided → Medium
status: New → Fix Released
Changed in trac-git (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.