Opened 9 years ago

Closed 9 years ago

#1639 closed defect (fixed)

This error inhibits the usefullness of the plugin. It has affected tickets, reports and commits.

Reported by: anonymous Owned by: hvr
Priority: normal Component: GitPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10


Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/", line 387, in dispatch_request


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

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.4/site-packages/trac/ticket/", line 302, in process_request

get_reporter_id(req, 'author'))

File "/usr/lib/python2.4/site-packages/trac/ticket/", line 593, in _insert_ticket_data

req.hdfticket.description.formatted? = wiki_to_html(

File "/usr/lib/python2.4/site-packages/trac/wiki/", line 999, in wiki_to_html

Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)

File "/usr/lib/python2.4/site-packages/trac/wiki/", line 822, in format

result = re.sub(, self.replace, line)

File "/usr/lib64/python2.4/", line 142, in sub

return _compile(pattern, 0).sub(repl, string, count)

File "/usr/lib/python2.4/site-packages/trac/wiki/", line 768, in replace

replacement = self.handle_match(fullmatch)

File "/usr/lib/python2.4/site-packages/trac/wiki/", line 761, in handle_match

return external_handler(self, match, fullmatch)

File "/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/", line 697, in <lambda>

y, z))

File "/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/", line 715, in _format_changeset_link

changeset = self.env.get_repository().get_changeset(rev)

File "build/bdist.linux-x86_64/egg/gitplugin/", line 63, in get_changeset File "build/bdist.linux-x86_64/egg/gitplugin/", line 189, in init File "build/bdist.linux-x86_64/egg/gitplugin/", line 77, in read_commit

IndexError: pop from empty list

Attachments (1)

gitplugin-fix-1639.patch (1.1 KB) - added by adam 9 years ago.
Patch to fix #1639

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by adam

Patch to fix #1639

comment:1 Changed 9 years ago by adam

The above patch fixes this problem. The issue appears to be that Trac occasionally looks for a commit that doesn't exist in the git repository. An example here is the WikiFormatting page, which will cause this error on a default install of 0.10.

The patch returns bogus committer and author information, which causes Trac to not blow up.

This may or may not be the right thing to do; I'm not at all familiar with Trac's internals. It does work, though.

comment:2 follow-up: Changed 9 years ago by anonymous

...actually, that patch is for the other git plugin.

comment:3 in reply to: ↑ 2 Changed 9 years ago by anonymous

  • Component changed from TracGitPlugin to GitPlugin
  • Owner changed from sjain to hvr

Replying to anonymous:

...actually, that patch is for the other git plugin.

Updated to reflect the GitPlugin, instead of TracGitPlugin. The patch still fixes the bug, though.


comment:4 Changed 9 years ago by hvr

(In [3174]) GitPlugin:

  • speeded up get_history and rev_older_than
  • raise NoSuchChangeset exception if invalid changeset revision is requested (addresses #1639)

Signed-Off-By: Herbert Valerio Riedel <hvr@…>

comment:5 Changed 9 years ago by hvr

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

this issue should be resolved as far as I can see; if not please reopen

Add Comment

Modify Ticket

as closed The owner will remain hvr.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.