Edgewall Software

Opened 12 years ago

Last modified 12 years ago

#10819 closed defect

Incorrect git repo path makes BrowserModule fail to load — at Initial Version

Reported by: Ethan Jucovy <ethan.jucovy@…> Owned by:
Priority: normal Milestone: 1.0
Component: plugin/git Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

To reproduce:

  1. Navigate to /admin/versioncontrol/repository/ and add a new repository of type "git" with a directory that does not exist or is not a git repository, like "/tmp/"
  2. Save changes

When the page is reloaded, a yellow Trac warning will appear: Warning: Error with navigation contributor "BrowserModule"

Additionally, the "Browse Source" tab in the nav bar will have vanished. If you navigate to /browser/ directly, Trac will spit out an Internal Error: "GitError: GIT control files not found, maybe wrong directory?"

Note that when adding an invalid repository of type "svn", this does not happen. Instead, the Browse Source tab still exists and can be viewed without an internal error. When navigating to that page, the corresponding error will be displayed inline in the browser view: "/tmp/ does not appear to be a Subversion repository."

The Git backend should be made consistent with the SVN backend. As it is, it's hard for an admin to diagnose the user error, and a typo can bring down the whole BrowserModule.

Change History (1)

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

Attachment: git_error.diff added
Note: See TracTickets for help on using tickets.