Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#11599 closed defect (fixed)

"Repository '' not found" when navigating to /log page and the default repository is not defined

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: general Version: 1.0-stable
Severity: normal Keywords: log
Cc: Branch:
Release Notes:

Show error message when navigating to /log with no default repository defined.

API Changes:
Internal Changes:

Description

When the default repository is not defined, the following error is seen when navigating to /log:

When the default repository is defined, /log redirects to the default repository.

We should show the same error that is displayed when navigating to /changeset and default repository is not defined:

Attachments (2)

TracError.png (12.6 KB ) - added by Ryan J Ollos 11 years ago.
TracErrorChangeset.png (13.5 KB ) - added by Ryan J Ollos 11 years ago.

Download all attachments as: .zip

Change History (10)

by Ryan J Ollos, 11 years ago

Attachment: TracError.png added

by Ryan J Ollos, 11 years ago

Attachment: TracErrorChangeset.png added

comment:1 by Ryan J Ollos, 11 years ago

Keywords: log added
Version: 1.0-stable

comment:2 by Ryan J Ollos, 11 years ago

Milestone: next-stable-1.0.x1.0.2
Status: newassigned

Proposed changes in log:rjollos.git:t11599.

comment:3 by Jun Omae, 11 years ago

Changing the following in [716b57d6/rjollos.git#file1], I don't think .split('/')[0] is needed. Since repository name can include / characters, we cannot determine whether repository name is a first segment in path or entire of path.

-                raise TracError(_("Repository '%(repo)s' not found", 
-                                  repo=reponame or new_path.strip('/'))) 
+                raise TracError(_("Repository '%(repo)s' not found.", 
+                                  repo=reponame or 
+                                       new_path.lstrip('/').split('/')[0])) 

comment:4 by Jun Omae, 11 years ago

Another thing, we could add tests for this issue as unit tests. I like to use unit tests rather than functional tests. Functional tests is very slow.

e.g. branches/1.0-stable/tracopt/versioncontrol/git/tests/git_fs.py@12720:276-281,283-288#L257.

in reply to:  3 comment:5 by Ryan J Ollos, 11 years ago

Replying to jomae:

Since repository name can include / characters, we cannot determine whether repository name is a first segment in path or entire of path.

In that case we should probably change the error message to something like Path '%(path)s' not found.

comment:6 by Ryan J Ollos, 11 years ago

Revised changes in log:rjollos.git:t11599.2.

comment:7 by Jun Omae, 11 years ago

I am not sure about the changes in [12798]. normalize_rev can raise NoSuchChangeset exceptions but normalize_path never raise the exceptions….

comment:8 by Ryan J Ollos, 11 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

The error described in comment:7 has been fixed, changes committed to 1.0-stable in [12798:12799,12802], merged to trunk in [12800:12801,12803].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.