Modify

Opened 17 years ago

Closed 16 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: Herbert Valerio Riedel
Priority: normal Component: GitPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.10

Description

Traceback (most recent call last):

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

dispatcher.dispatch(req)

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

resp = chosen_handler.process_request(req)

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

get_reporter_id(req, 'author'))

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

req.hdfticket.description.formatted? = wiki_to_html(

File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", 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/formatter.py", line 822, in format

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

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

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

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

replacement = self.handle_match(fullmatch)

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

return external_handler(self, match, fullmatch)

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

y, z))

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

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

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

IndexError: pop from empty list

Attachments (1)

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

Download all attachments as: .zip

Change History (6)

Changed 17 years ago by adam

Attachment: gitplugin-fix-1639.patch added

Patch to fix #1639

comment:1 Changed 17 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 Changed 17 years ago by anonymous

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

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

Component: TracGitPluginGitPlugin
Owner: changed from Samat Jain to Herbert Valerio Riedel

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.

Adam

comment:4 Changed 16 years ago by Herbert Valerio Riedel

(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 16 years ago by Herbert Valerio Riedel

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.