Opened 9 years ago
Closed 9 years ago
#12313 closed defect (fixed)
trac.versioncontrol.admin.RepositoryAdminPanel depends on trac.versioncontrol.web_ui.main.VersionControlUI
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.10 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed Version Control: Repositories admin template not available if |
||
API Changes: | |||
Internal Changes: |
Description
When using trac-github integration the components trac.versioncontrol.web_ui.*
are disabled
. With trac.versioncontrol.web_ui.* = disabled
the repository admin panel (trac.versioncontrol.admin.RepositoryAdminPanel
) shows an error because the template is not available.
The problem is that admin_repositories.html
template will only be available if trac.versioncontrol.web_ui.main
is enabled. The following configuration will work, but it's not very obvious to the user:
trac.versioncontrol.web_ui.* = disabled trac.versioncontrol.web_ui.main.* = enabled
Maybe there's a better solution than having a dedicated Component for implementing ITemplateProvider
: tags/trac-1.0.9/trac/versioncontrol/web_ui/main.py.
I propose to move the ITemplateProvider
implementation to RepositoryManager.
Attachments (0)
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
In this case the issue might not occur if we separated the Interface
s from the Environment
class, by having them in separate modules. I haven't tested out that idea though.
comment:3 by , 9 years ago
follow-up: 5 comment:4 by , 9 years ago
follow-up: 6 comment:5 by , 9 years ago
Replying to Ryan J Ollos:
#5010 looks interesting. Should we go ahead and implement the fix in this ticket with the thought that at least one of the local imports will be removed when #5010 is implemented?
Fine by me, and the other local import is in a backward compat method that we could deprecate.
follow-up: 8 comment:6 by , 9 years ago
Replying to Christian Boos:
Fine by me, and the other local import is in a backward compat method that we could deprecate.
Yeah, I would like the remove get_repository
in 1.3.1 (#11901). I'll plan to mark it as deprecated if no one else objects. We previously touched on this in comment:32:ticket:11605.
comment:7 by , 9 years ago
Owner: | set to |
---|---|
Release Notes: | modified (diff) |
Status: | new → assigned |
comment:8 by , 9 years ago
Replying to Ryan J Ollos:
Yeah, I would like the remove
get_repository
in 1.3.1 (#11901). I'll plan to mark it as deprecated if no one else objects. We previously touched on this in comment:32:ticket:11605.
Added notice in [14435].
comment:9 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
There is a circular import in initial changes:
Let me know if you see a cleaner way to resolve the issue than proposed changes in log:rjollos.git:t12313_versioncontrol_itemplateprovider.