I like the idea of this patch. However, we should probably brainstorm how we want to handle this a bit more. source_viewer implies it views source code, and we may decode to add some icon for looking at a file in the viewer at some point. However, this URL is branch-specific. I think the best thing to do would be to create a new SourceViewer model with a link to a branch URL and a link to a URL for viewing a file path (optionally with revisions). Then we'd link to this in the repository. We will probably want to change the bug_tracker to do this in the future as well, so that we can have better integration. Alternatively, we could have a model representing a type of viewer (Trac's viewer, ViewCVS, etc.) which we could pre-install models for. Each path would be relative to a base path. The repository would link to the model for representing the viewer/bug tracker and would have a field for the base path. This route would actually make it far easier for admins to set up links to tools, as they wouldn't have to look and find the full paths they need. They'd just need to point to the base site for the viewer/tracker and point to the type of viewer/tracker they're using. I'm leaning toward the latter.
Make "Branch" property link to source viewer (Issue 101)
Review Request #55 — Created June 15, 2007 and discarded
|Review Board SVN (deprecated)|
This patch creates a new attribute on the Repository object called source_viewer. It is an interpolatable string, similar to that of bug_tracker, that allows the Branch: property to link to the appropriate branch in an online repository tool, such as Trac (or even the SVN http interface).
I have this deployed on my company's Review Board server and it seems to be working fine. I am not familiar with writing automated Python tests with Django, so therefore there are no tests for this patch.