Modify

Opened 18 years ago

Closed 16 years ago

Last modified 15 years ago

#227 closed enhancement (fixed)

Show the "real" SVN URL from the browse sections

Reported by: toby@… 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 18 years ago by Christian Boos

Severity: blockernormal
Type: defectenhancement

See also #T1781

comment:2 Changed 17 years ago by tlast

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 17 years ago by tlast

Trac Release: 0.80.9

comment:4 Changed 16 years ago by A.M.Iwi@…

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 16 years ago by anonymous

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

comment:6 Changed 16 years ago by anonymous

Resolution: fixed
Status: newclosed

SvnUrlsPlugin does this.

comment:8 Changed 15 years ago by Ryan J Ollos

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anybody.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.