Opened 18 years ago
Last modified 10 years ago
#4788 new enhancement
show symlink info in source browser
Reported by: | 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
(→ 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)
Change History (17)
comment:1 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 18 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 , 18 years ago
Keywords: | symbolic links added |
---|---|
Resolution: | duplicate |
Status: | closed → reopened |
Summary: | show symlink info in svn → show 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).
follow-up: 7 comment:4 by , 18 years ago
I just made a minimalistic patch (based on one of the patches in #2566), which will only add the display (→ target) in a directory browser. (no target resolution is done)
attaching it in case it is useful
follow-up: 6 comment:5 by , 18 years ago
I was going to attach a small screenshot (png, 2kB) doesn't seem to work…
comment:6 by , 18 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…
follow-up: 8 comment:7 by , 18 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 (→ 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 , 18 years ago
Attachment: | render_svn_special-r4804.diff added |
---|
Rendering of the svn:special → "Symbolic Link to <target>"
follow-ups: 9 10 comment:8 by , 18 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 (→ 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.
follow-up: 12 comment:9 by , 18 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 ;-) ).
comment:10 by , 18 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 , 18 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.
comment:12 by , 18 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 , 17 years ago
Milestone: | 0.11.1 → 0.12 |
---|
comment:14 by , 14 years ago
Summary: | show symlink info in svn properties → show symlink info in source browser |
---|
As Subversion is not the only system to support symlinks…
comment:15 by , 10 years ago
Owner: | removed |
---|---|
Status: | reopened → new |
Duplicate of #2566, which has a patch mostly functional. See there for details.