Opened 14 years ago

Closed 13 years ago

#3654 closed defect (duplicate)

AssertionError when selecting browse source

Reported by: nico-trackhack-git@… Owned by: Herbert Valerio Riedel
Priority: normal Component: GitPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11


I installed trac & trac-git from debian lenny: 0.11 of trac:

ii trac 0.11-3 Enhanced wiki and issue tracking system for ii trac-git 0.0.20080710-1 Git version control backend for Trac

I did GIT_DIR=trac/g1 git init and git push trac master:refs/heads/master to populate the git-repo. trac options:

[git] cached_repository = false git_bin = /usr/bin/git persistent_cache = false shortrev_len = 7

[trac] repository_dir = /home/nicosc/trac/g1/ repository_type = git

nicosc@ikdesk1:~/trac/g1$ git --version git version

I get this error:

11:00:49 Trac[git_fs] INFO: disabled CachedRepository for '/home/nicosc/trac/g1/' 11:00:49 Trac[main] ERROR: Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/trac/web/", line 423, in _dispatch_request


File "/usr/lib/python2.5/site-packages/trac/web/", line 197, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/", line 342, in process_request

rev_or_latest = rev or repos.youngest_rev

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/", line 264, in <lambda>

youngest_rev = property(lambda x: x.get_youngest_rev())

File "/usr/lib/python2.5/site-packages/gitplugin/", line 189, in get_youngest_rev

return self.git.youngest_rev()

File "/usr/lib/python2.5/site-packages/gitplugin/", line 331, in youngest_rev

return self.rev_cache[0]

File "/usr/lib/python2.5/site-packages/gitplugin/", line 316, in get_rev_cache

assert all(e is not None for e in self.rev_cache)


Any idea what I did wrong?

Attachments (0)

Change History (5)

comment:1 Changed 13 years ago by lhunath

I get something comparable whenever it tries to resolve a rev:

  File "/usr/lib/python2.6/site-packages/trac/wiki/", line 802, in handle_match
    return external_handler(self, match, fullmatch)
  File "build/bdist.linux-i686/egg/tracext/git/", line 122, in <lambda>
    self._format_sha_link(fmt, 'changeset', sha, sha))
  File "build/bdist.linux-i686/egg/tracext/git/", line 79, in _format_sha_link
    changeset = self.env.get_repository().get_changeset(sha)
  File "build/bdist.linux-i686/egg/tracext/git/", line 223, in get_changeset
    return GitChangeset(self.git, rev)
  File "build/bdist.linux-i686/egg/tracext/git/", line 390, in __init__
    (msg, props) = git.read_commit(sha)
  File "build/bdist.linux-i686/egg/tracext/git/", line 483, in read_commit
    db = self.get_commits()
  File "build/bdist.linux-i686/egg/tracext/git/", line 327, in get_commits
    return self.rev_cache[2]
  File "build/bdist.linux-i686/egg/tracext/git/", line 318, in get_rev_cache
    assert all(e is not None for e in self.__rev_cache)
lyndir tracext # git --version
git version
lyndir tracext # python -V
Python 2.6.1

Using Trac

As a result, nothing from GIT is available anymore.

comment:2 Changed 13 years ago by lhunath

Note: This is after having patched GitPlugin to fix this issue: #4227

comment:3 Changed 13 years ago by lhunath

Uhm, I take that back. After cleaning up the patch I submitted for #4227 my issue went away.

In case the patch difference is somehow useful (if this issue is even related to what I was struggling with) I will commit the cleaned up patch (which does fix #4227) as a separate file.

comment:4 Changed 13 years ago by maurya

Have you tried creating some entries in git repo ? If it is null sometimes it gives this assertion.

comment:5 Changed 13 years ago by Tim Hatch

Resolution: duplicate
Status: newclosed

Looks like a duplicate of #4139

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.