Modify

Opened 6 years ago

Closed 5 years ago

#3654 closed defect (duplicate)

AssertionError when selecting browse source

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

Description

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 1.5.6.5

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/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/browser.py", line 342, in process_request

rev_or_latest = rev or repos.youngest_rev

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

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

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

return self.git.youngest_rev()

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

return self.rev_cache[0]

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

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

AssertionError

Any idea what I did wrong?

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by lhunath

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

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

Using Trac 0.11.2.1

As a result, nothing from GIT is available anymore.

comment:2 Changed 6 years ago by lhunath

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

comment:3 Changed 6 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 5 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 5 years ago by thatch

  • Resolution set to duplicate
  • Status changed from new to closed

Looks like a duplicate of #4139

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from hvr. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.