Modify

Opened 9 years ago

Closed 8 years ago

#2671 closed defect (fixed)

Traceback on nonexistent paths with 0.10 git plugin

Reported by: Tim Hatch Owned by: Herbert Valerio Riedel
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 Tim Hatch 9 years ago.
Patch to correctly raise NoSuchNode when paths are missing

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 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 9 years ago by Tim Hatch

Attachment: gitplugin-nosuchnode.diff added

Patch to correctly raise NoSuchNode when paths are missing

comment:2 Changed 9 years ago by Herbert Valerio Riedel

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

comment:3 Changed 9 years ago by Herbert Valerio Riedel

Owner: changed from Herbert Valerio Riedel to anonymous
Status: newassigned

please close ticket if committed fix works properly for you

comment:4 Changed 9 years ago by Herbert Valerio Riedel

Owner: changed from anonymous to Herbert Valerio Riedel
Status: assignednew

comment:5 Changed 9 years ago by Herbert Valerio Riedel

Status: newassigned

comment:6 Changed 8 years ago by Herbert Valerio Riedel

Resolution: fixed
Status: assignedclosed

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.