Modify

Opened 5 years ago

Closed 5 years ago

#4681 closed defect (worksforme)

NameError: global name 'GitErrorCommit_Id' is not defined when trying to open the browser

Reported by: vedant@… Owned by: hvr
Priority: highest Component: GitPlugin
Severity: blocker Keywords:
Cc: vedant@… Trac Release: 0.11

Description

I initialised a new trac environment and set it up for a Git repository. When I tried to view the browser, I got the following error:

Trac detected an internal error:
NameError: global name 'GitErrorCommit_Id' is not defined

The action that triggered the error was:
GET: /browser

This is the error from stderr:
09:22:54 IST Trac[main] ERROR: global name 'GitErrorCommit_Id' is not defined
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 361, in process_request

'dir': node.isdir and self._render_dir(req, repos, node, rev),

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/browser.py", line 408, in _render_dir

changes = get_changes(repos, [i.rev for i in entries])

File "/usr/lib/python2.5/site-packages/trac/versioncontrol/web_ui/util.py", line 38, in get_changes

changeset = repos.get_changeset(rev)

File "/usr/lib/python2.5/site-packages/tracext/git/git_fs.py", line 223, in get_changeset

return GitChangeset(self.git, rev)

File "/usr/lib/python2.5/site-packages/tracext/git/git_fs.py", line 389, in init

(msg, props) = git.read_commit(sha)

File "/usr/lib/python2.5/site-packages/tracext/git/PyGIT.py", line 486, in read_commit

raise GitErrorCommit_Id

NameError: global name 'GitErrorCommit_Id' is not defined

I am running debian testing, with trac, git and trac-git installed through apt.

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by thatch

Was the git repo empty?

comment:2 Changed 5 years ago by vedant@…

It wasn't empty, but it had just one commit. The browser seems to work fine with a repo with many files and commits.

comment:3 Changed 5 years ago by bugs@…

I ran into the same bug. I resolved it by renaming files which have a space in the name like: "revision3 2009.txt" to "revision3_2009.txt".

This works for me.

Greetz!

comment:4 Changed 5 years ago by hvr

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

should have been fixed with r5378

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.