Modify

Opened 6 years ago

Closed 5 years ago

#2671 closed defect (fixed)

Traceback on nonexistent paths with 0.10 git plugin

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

Description

If you visit /browser/this_path_does_not_exist, the following traceback will occur using the 0.10 plugin (0.11 with its respective plugin shows the correct "No node" error).

Traceback (most recent call last):
  File "/home/tim/code/trac-0.10.3.1/trac/web/main.py", line 387, in dispatch_request
  File "/home/tim/code/trac-0.10.3.1/trac/web/main.py", line 237, in dispatch
  File "/home/tim/code/trac-0.10.3.1/trac/versioncontrol/web_ui/browser.py", line 145, in process_request
  File "/home/tim/code/trac-0.10.3.1/trac/versioncontrol/web_ui/browser.py", line 246, in _render_file
  File "/home/tim/tmp/gitplugin/0.10/gitplugin/git_fs.py", line 97, in get_changeset
    return GitChangeset(self.git, rev)
  File "/home/tim/tmp/gitplugin/0.10/gitplugin/git_fs.py", line 237, in __init__
    (msg,props) = git.read_commit(sha)
  File "/home/tim/tmp/gitplugin/0.10/gitplugin/PyGIT.py", line 76, in read_commit
    raw = self._git_call("git-cat-file commit "+sha)
TypeError: cannot concatenate 'str' and 'NoneType' objects

Noticed in the wild on all demo environments linked, and verified against 0.10.3.1 and the latest git plugin from http://trac-hacks.org/svn/gitplugin/0.10 today.

Attachments (1)

gitplugin-nosuchnode.diff (416 bytes) - added by thatch 6 years ago.
Patch to correctly raise NoSuchNode when paths are missing

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by anonymous

The same ANNOYING error can be seen on the VideoLAN VLC website at this page:
http://trac.videolan.org/vlc/browser/tags/0.8.6e/NEWS

Changed 6 years ago by thatch

Patch to correctly raise NoSuchNode when paths are missing

comment:2 Changed 6 years ago by hvr

(In [3369]) GitPlugin: raise NoSuchNode exception when path can't be found during node construction (addresses #2671)

comment:3 Changed 6 years ago by hvr

  • Owner changed from hvr to anonymous
  • Status changed from new to assigned

please close ticket if committed fix works properly for you

comment:4 Changed 6 years ago by hvr

  • Owner changed from anonymous to hvr
  • Status changed from assigned to new

comment:5 Changed 6 years ago by hvr

  • Status changed from new to assigned

comment:6 Changed 5 years ago by hvr

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

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.