Edgewall Software
Modify

Opened 17 years ago

Last modified 9 years ago

#4788 new enhancement

show symlink info in source browser

Reported by: Sergei Haller <sergei@…> Owned by:
Priority: normal Milestone: next-major-releases
Component: version control/browser Version: devel
Severity: normal Keywords: symbolic links
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Currently the source browser doesn't seem to display if a given file in the svn repository is a symlink.

In the browser of the directory containing a symlink, it could be something like

(&rarr; target)

right after the name of the file. And in the browser of the symlink itself it could be an extra line like

Symbolic linc to target

where "target" would be a link to the appropriate file (if the target is also in the repository)

Attachments (2)

symlink.patch (5.5 KB ) - added by Sergei Haller <sergei@…> 17 years ago.
patch against r4802
render_svn_special-r4804.diff (2.2 KB ) - added by Christian Boos 17 years ago.
Rendering of the svn:special → "Symbolic Link to <target>"

Download all attachments as: .zip

Change History (17)

comment:1 by Christian Boos, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #2566, which has a patch mostly functional. See there for details.

comment:2 by Sergei Haller <sergei@…>, 17 years ago

sorry, must have clicked on the wrong file. the browser does show the svn:special property and the contants tells what the target is.

The first suggestion still holds. (showing target in directory browser)

comment:3 by Christian Boos, 17 years ago

Keywords: symbolic links added
Resolution: duplicate
Status: closedreopened
Summary: show symlink info in svnshow symlink info in svn properties

Looking again at #2566, I think we can implement medium term support for symbolic links, by support for svn:special properties in the SubversionPropertyRenderer (see in source:trunk/trac/versioncontrol/svn_fs.py).

comment:4 by Sergei Haller <sergei@…>, 17 years ago

I just made a minimalistic patch (based on one of the patches in #2566), which will only add the display (&rarr; target) in a directory browser. (no target resolution is done)

attaching it in case it is useful

by Sergei Haller <sergei@…>, 17 years ago

Attachment: symlink.patch added

patch against r4802

comment:5 by Sergei Haller <sergei@…>, 17 years ago

I was going to attach a small screenshot (png, 2kB) doesn't seem to work…

in reply to:  5 comment:6 by Christian Boos, 17 years ago

Replying to Sergei Haller <sergei@sergei-haller.de>:

I was going to attach a small screenshot (png, 2kB) doesn't seem to work…

#4087

in reply to:  4 ; comment:7 by Christian Boos, 17 years ago

Milestone: 0.11

Replying to Sergei Haller <sergei@sergei-haller.de>:

I just made a minimalistic patch (based on one of the patches in #2566), which will only add the display (&rarr; target) in a directory browser.

Can you do some timings, also?

I'm a bit concerned about the call to get_properties for every entry, as I said in #2566. That's why I wanted to dedicate this ticket to another approach, only supporting special rendering for the svn:special property when browsing the entry having that property, like in attachment:render_svn_special-r4804.diff.

by Christian Boos, 17 years ago

Rendering of the svn:special → "Symbolic Link to <target>"

in reply to:  7 ; comment:8 by Sergei Haller <sergei@…>, 17 years ago

Replying to cboos:

Replying to Sergei Haller <sergei@sergei-haller.de>:

I just made a minimalistic patch (based on one of the patches in #2566), which will only add the display (&rarr; target) in a directory browser.

Can you do some timings, also?

will try to do some tomorrow.

I'm a bit concerned about the call to get_properties for every entry, as I said in #2566.

the patch is slightly different. but I'll do some timings and let you know.

rendering for the svn:special property when browsing the entry having that property, like in attachment:render_svn_special-r4804.diff.

I like it. there is just a typo somewhere: it makes a href to "link bla" instead of just to "bla". didn't have the time to check where.

in reply to:  8 ; comment:9 by Christian Boos, 17 years ago

Replying to Sergei Haller <sergei@sergei-haller.de>:

… it makes a href to "link bla" instead of just to "bla". didn't have the time to check where.

Oh, I see. That's because a link file probably contains "link <target>" instead of just "<target>" as in my test. As I was working on Windows, where the svn tools don't support symbolic links, I just created one file and set the svn:special property manually on it (and broke my working copy at the same occasion ;-) ).

in reply to:  8 comment:10 by Sergei Haller <sergei@…>, 17 years ago

Replying to Sergei Haller <sergei@sergei-haller.de>:

the patch is slightly different. but I'll do some timings and let you know.

well. we have a directiry with 468 files included, none of which are links, but that shouldn't matter for the timing. With the above attachment:symlink.patch (using get_properties) it takes 42.2 seconds for 10 runs, without patch 41.5 seconds for 10 runs. so I'd say it's OK.

that is using tracd as server and wget as client:

time for i in `seq 1 10`
do wget http://host:8000/proj/browser/blubber -O/dev/null --no-proxy
done

a link file probably contains "link <target>"

yes

comment:11 by Sergei Haller <sergei@…>, 17 years ago

ah, the other thing about attachment:render_svn_special-r4804.diff is that it probably shouldn't render links to absolute paths. (starting with /)

One could say that it should be absolute within the project, but I think that's unlikely as in almost all cases the root of an svn working dir is not root of the file system.

in reply to:  9 comment:12 by Sergei Haller <sergei@…>, 17 years ago

Replying to cboos:

Oh, I see. That's because a link file probably contains "link <target>"

fix for that is adding ![5:] after [0] in your patch.

the other thing I noticed is that it will drop the ?rev parameter. i.e. if the symlink is browser/dir/link?rev=123 then the rendered href is to browser/dir/target (which may not exist in HEAD revision)

comment:13 by Christian Boos, 16 years ago

Milestone: 0.11.10.12

comment:14 by Christian Boos, 14 years ago

Summary: show symlink info in svn propertiesshow symlink info in source browser

As Subversion is not the only system to support symlinks…

comment:15 by Ryan J Ollos, 9 years ago

Owner: Christian Boos removed
Status: reopenednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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