Ticket #2671 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Traceback on nonexistent paths with 0.10 git plugin

Reported by: thatch Assigned to: 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

gitplugin-nosuchnode.diff (416 bytes) - added by thatch on 03/13/08 19:02:19.
Patch to correctly raise NoSuchNode? when paths are missing

Change History

03/07/08 17:47:46 changed 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

03/13/08 19:02:19 changed by thatch

  • attachment gitplugin-nosuchnode.diff added.

Patch to correctly raise NoSuchNode? when paths are missing

03/15/08 09:50:12 changed by hvr

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

03/15/08 09:51:48 changed by hvr

  • owner changed from hvr to anonymous.
  • status changed from new to assigned.

please close ticket if committed fix works properly for you

03/15/08 09:52:27 changed by hvr

  • owner changed from anonymous to hvr.
  • status changed from assigned to new.

03/15/08 09:52:35 changed by hvr

  • status changed from new to assigned.

03/20/09 16:41:01 changed by hvr

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #2671 (Traceback on nonexistent paths with 0.10 git plugin)




Change Properties
Action