Edgewall Software

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#6665 closed enhancement (worksforme)

Display external definitions as links

Reported by: christian_unger@… Owned by: Christian Boos
Priority: normal Milestone:
Component: version control/browser Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Trac will display external definitions as plain text, although the displayed text contains URLs to the referenced externals. It'd be a great help if those link were shown as html links, so one click will bring the user to the displayed directory.

Attachments (0)

Change History (8)

comment:1 by Christian Boos, 16 years ago

Resolution: worksforme
Status: newclosed

By external you mean svn:externals I presume? This is supported in 0.11, see TracIni#svn:externals-section.

comment:2 by roger@…, 16 years ago

I have the same question as the original poster. trac is finding the item, accessing the repository using http, and the URL is the one I would use to access the repository.

In my case, the svn:external is a different repository on the same local server. So I am unclear on the syntax of referring to this. What would I need to map the http: URL into to get the external repository to be shown in the nice way trac shows things instead of as plain text (what the svn server provides over http)? I read the trac.ini docs for this as being something that translates one request into another request. I tried something like this:

http://sto-opq-src.scc.se/svn/RSofT_Library http://source/rsoft/browser/$path?rev=$rev

where the first entry is the external repository, and the second is what I am guessing would be where I want it it be to get rendered better. My trac is at http://source/rsoft

In my browser, when I hold the mouse over the link to the external, trac has it as http://sto-opq-src.scc.se/svn/RSofT_Library, no matter if I have an entry in trac.ini. I restart my http server and refresh the page when I change trac.ini.

What am I missing?


comment:3 by Christian Boos, 16 years ago

You probably missed the key = ... part in the setting.

Try something like this:

lib = http://sto-opq-src.scc.se/svn/RSofT_Library http://source/rsoft/browser/$path?rev=$rev
# <key> = <svn:external> <correspond-path-trac>
# Note that the actual value (here 'lib') doesn't matter, it's just
# needed to comply to the syntax of the .ini file.

Note that the above assumes that http://source/rsoft is actually a Trac for which the [trac] repository_dir is set to the repository corresponding to http://sto-opq-src.scc.se/svn/RSofT_Library. If you don't have yet such a Trac, just set up one, or if you feel adventurous, you can try to upgrade to the MultipleRepositorySupport version.

comment:4 by roger@…, 16 years ago

Oops. I added the missing 'lib =', but as the external is not set up in a trac, this of course failed.

This is a new trac that I am setting up. So, I think I will try 0.12 with MultipleRepositorySupport. I do not need to keep anything from the current install as it has not been used yet.

Thanks for the help.

One thing I am curious about. It is surely in the docs, but I did not see it. How much does trac cache for an svn repository? Does it effectively check out a copy? Or is it more tricky? I realize this is a different thread…

comment:5 by Christian Boos, 16 years ago

Trac caches all the changeset related information in its database, but no property, file or directory content is cached. There's no checkout, all the information is retrieved when needed from the svn repository using the svn API.

The MultipleRepositorySupport doesn't (yet) have any cache support, but that's OK for small or medium-sized svn repositories (i.e. with less than 10k changesets, you should be fine).

comment:6 by anonymous, 16 years ago

I installed the new version without complaint. It still says version Trac 0.11.1 at the bottom. Still, I can get multiple repositories in the browser. Yeah.

A few comments / questions (which you probably already know):

  1. How can I get the name in the Repository Index to keep the case in the name? It is converted to lower case.
  1. Since you use the init tag as the name to show in the Repository Index, it seems I cannot have a period in the name of the repository as shown.
  1. I get a default in the Repository Index, as well as that same repository listed in the previous single repository manner. I think that when the multiple repositories are listed, and one of them is the same as the trac repository_dir, it does not need to be listed twice or three times.

Other than that, so far this is going to meet my needs quite nicely. Thanks!

comment:7 by Christian Boos, 16 years ago

Thanks for the feedback, I've answered in the branch page directly.

in reply to:  1 comment:8 by anonymous, 15 years ago

Replying to cboos:

By external you mean svn:externals I presume? This is supported in 0.11, see TracIni#svn:externals-section.

From the documentation, I'm having a little bit of trouble determining when Trac can interpret svn:externals.

The TracBrowser for Subversion can interpret the svn:externals property of folders out of the box. However, if those externals are not using the http: protocol, or if a link to a different repository browser (such another Trac or ViewVC) is desired, then Trac needs to be able to map an external prefix to this other URL.

Should I also assume that HTTP does not imply HTTPS?

I'm having some trouble getting this to work.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.