Ticket #227 (closed enhancement: fixed)

Opened 7 years ago

Last modified 4 years ago

Show the "real" SVN URL from the browse sections

Reported by: toby@tobiasly.com Assigned to: 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

Change History

03/17/06 19:14:25 changed by cboos

  • type changed from defect to enhancement.
  • severity changed from blocker to normal.

See also #T1781

01/03/07 14:30:11 changed by tlast

  • release set to 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).

01/03/07 14:30:53 changed by tlast

  • release changed from 0.8 to 0.9.

02/04/08 11:54:34 changed by A.M.Iwi_at_rl.ac.uk

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.

03/06/08 23:01:30 changed by anonymous

This would certainly be more useful than the plugin that tells you what day Easter is.

08/11/08 09:15:21 changed by anonymous

  • status changed from new to closed.
  • resolution set to fixed.

SvnUrlsPlugin does this.

09/06/09 11:01:53 changed by rjollos


Add/Change #227 (Show the "real" SVN URL from the browse sections)




Change Properties
Action