Opened 20 years ago
Closed 18 years ago
#1601 closed enhancement (fixed)
custom SVN properties in "browse source" section
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | version control/browser | Version: | 0.8.1 |
Severity: | normal | Keywords: | SVN property, browse source |
Cc: | pn@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
It would be nice to have the possibility to define custom SVN properties which has to be shown in the "browse source" section. For example I want to define a custom SVN property for the build system which has to be shown in the "browse source" section. The configuration of the SVN properties to be shown in the "browse source" could be part of the trac.ini configuration file.
This could be used for the new SVN 1.2 locking functionality too (svn:needs-lock SVN property).
Attachments (0)
Change History (10)
comment:1 by , 19 years ago
Severity: | normal → enhancement |
---|
comment:2 by , 19 years ago
Milestone: | 0.9 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 19 years ago
Milestone: | → 1.0 |
---|
Note that property renderers could also be used for fixing #1896:
[browser-custom] svk:merge = hidden
class HiddenPropertyRenderer(Component): implements IPropertyRenderer def get_property_renderers(self): return ('hidden', self.render) def render(self,req,pname,pvalue): return ''
comment:4 by , 19 years ago
I think it would be very useful to be able to show properties in general, and not just the ones listed in the ini file. Of course some protection is needed if a non-printable value is set
Also showing revision properties for changesets is very useful too. For our development we are looking at applying a code-review-log to the revision properties, so we can later see the comments of the code review.
comment:5 by , 19 years ago
to anonymous: In the trunk SVN properties are already displayed if they're available. This ticket is about providing a way to display certain properties in a more descriptive manner. The default behavior would be to display the available properties as plain-text if not otherwise specified.
Revision properties are an interesting suggestion though.
comment:6 by , 19 years ago
Status: | assigned → new |
---|
(changing the status, as I've not actually started to work on that yet)
comment:7 by , 19 years ago
Milestone: | 1.0 → 0.11 |
---|
comment:8 by , 18 years ago
Status: | new → assigned |
---|
I've started to work on this one: source:sandbox/property-renderers-tmp
So far, this addresses the #2340 issue and #3002. I plan to rework #2545 as well to use the IPropertyRenderer. Finally, I'll add support for displaying properties in columns, as originally requested in this ticket.
comment:9 by , 18 years ago
Cc: | added |
---|
comment:10 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented in r4653 (IPropertyRenderer). See also r4654 for an example (support for svn:externals
and svn:needs-lock
properties).
There are two built-in property renderers.
The first, DefaultPropertyRenderer, simply checks for the properties listed in the [browser] hide_properties
configuration entry, and will render as text any property not listed there. Multi-lines properties will be correctly rendered.
The second, WikiPropertyRenderer, checks for properties listed in either the [browser] wiki_properties
or the [browser] oneliner_properties
configuration entries, and will wiki format the property, either as html or as single line output, respectively.
I'm interested in this one.
Configuration syntax could be similar to the one used for TracTicketsCustomFields
Even better, the types could be extensible, so that the rendering method could be adapted to each content. E.g.
The req argument could be used to adapt the rendering to the context (e.g. an image render could display a small size picture for the browser and a full size image for the changeset view…)