Modify

Opened 9 years ago

Closed 6 years ago

Last modified 5 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 9 years ago by cboos

  • Severity changed from blocker to normal
  • Type changed from defect to enhancement

See also #T1781

comment:2 Changed 8 years ago by tlast

  • Trac 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).

comment:3 Changed 8 years ago by tlast

  • Trac Release changed from 0.8 to 0.9

comment:4 Changed 7 years ago 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.

comment:5 Changed 7 years ago by anonymous

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

comment:6 Changed 6 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

SvnUrlsPlugin does this.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.