#227 closed enhancement (fixed)
Show the "real" SVN URL from the browse sections
Reported by: | Owned by: | anybody | |
---|---|---|---|
Priority: | normal | Component: | Request-a-Hack |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.9 |
Description
I don't understand why web-based source viewing systems never show the "real" SVN URL but unfortunately Trac seems to be the same... All I want is a link on each page or on each item so that if I'm (for example) browsing a source directory in Trac I can easily check out that directory by copying the Subversion URL.
This of course would involve telling the plugin the "base" SVN URL (or ParentPath entry) and tacking the Subversion path on to the end.
Attachments (0)
Change History (7)
comment:1 Changed 19 years ago by
Severity: | blocker → normal |
---|---|
Type: | defect → enhancement |
comment:2 Changed 18 years ago by
Trac Release: | → 0.8 |
---|
Why not just edit the browser.cs template and add it in? In 0.9.6 (I don't know about other versions), you basically just add it (around line 26) like this (I wanted mine sortable):
call:sortable_th(browser.order, browser.desc, 'fullpath', 'SVN Link', browser.href) ?><?cs
Then copy the <td class="name"> section (around line 45) through </td> (around line 63), name the new section fullpath and modify the href like this:
href="https://PATH_TO_REPOSITORY<?cs var:item.fullpath ?>"><?cs var:item.name ?>
Do it for the "Directory" and "View File" parts in your new section, and you're done.
I suppose someone could write a plugin for this, but that seems like a lot of work for something that's pretty simple to do (once you know how).
comment:3 Changed 18 years ago by
Trac Release: | 0.8 → 0.9 |
---|
comment:4 Changed 17 years ago by
I would like to second the original request.
Also I do not understand the reply about how this can be done "easily". It appears to suggest that PATH_TO_REPOSITORY has to be hard-coded in browser.cs. I am thinking of a particular installation of trac which runs a number of projects, each with its own repository path, so this cannot be hard-coded. Is the repository path accessible via some variable instead?
If anyone has any suggestions, I would much appreciate a copy by email. Many thanks.
comment:5 Changed 17 years ago by
This would certainly be more useful than the plugin that tells you what day Easter is.
See also #T1781