trac.versioncontrol.web_ui.changeset¶
-
class
trac.versioncontrol.web_ui.changeset.ChangesetModule¶ Bases:
trac.core.ComponentRenderer providing flexible functionality for showing sets of differences.
If the differences shown are coming from a specific changeset, then that changeset information can be shown too.
In addition, it is possible to show only a subset of the changeset: Only the changes affecting a given path will be shown. This is called the ‘’restricted’’ changeset.
But the differences can also be computed in a more general way, between two arbitrary paths and/or between two arbitrary revisions. In that case, there’s no changeset information displayed.
-
max_diff_bytes¶ Maximum total size in bytes of the modified files (their old size plus their new size) for which the changeset view will attempt to show the diffs inlined.
-
max_diff_files¶ Maximum number of modified files for which the changeset view will attempt to show the diffs inlined.
-
process_request(req)¶ The appropriate mode of operation is inferred from the request parameters:
- If
new_pathandold_pathare equal (orold_pathis omitted) andnewandoldare equal (oroldis omitted), then we’re about to view a revision Changeset:chgsetis True. Furthermore, if the path is not the root, the changeset is ‘’restricted’’ to that path (only the changes affecting that path, its children or its ancestor directories will be shown). - In any other case, the set of changes corresponds to arbitrary
differences between path@rev pairs. If
new_pathandold_pathare equal, the ‘’restricted’’ flag will also be set, meaning in this case that the differences between two revisions are restricted to those occurring on that path.
In any case, either path@rev pairs must exist.
- If
-
property_diff_renderers¶ List of components that implement
IPropertyDiffRenderer
-
render_property_diff(name, old_node, old_props, new_node, new_props, options)¶ Renders diffs of a node property to HTML.
-
timeline_collapse¶ Whether consecutive changesets from the same author having exactly the same message should be presented as one event. That event will link to the range of changesets in the log view.
-
timeline_long_messages¶ Whether wiki-formatted changeset messages should be multiline or not.
If this option is not specified or is false and
wiki_format_messagesis set to true, changeset messages will be single line only, losing some formatting (bullet points, etc).
-
timeline_show_files¶ Number of files to show (
-1for unlimited,0to disable).This can also be
location, for showing the common prefix for the changed files.
-
wiki_format_messages¶ Whether wiki formatting should be applied to changeset messages.
If this option is disabled, changeset messages will be rendered as pre-formatted text.
-
-
class
trac.versioncontrol.web_ui.changeset.DefaultPropertyDiffRenderer¶ Bases:
trac.core.ComponentDefault version control property difference renderer.
-
class
trac.versioncontrol.web_ui.changeset.IPropertyDiffRenderer¶ Bases:
trac.core.InterfaceRender node properties in TracBrowser and TracChangeset views.
-
match_property_diff(name)¶ Indicate whether this renderer can treat the given property diffs
Returns a quality number, ranging from 0 (unsupported) to 9 (‘’perfect’’ match).
-
render_property_diff(name, old_context, old_props, new_context, new_props, options)¶ Render the given diff of property to HTML.
nameis the property name as given tomatch_property_diff(),old_contextcorresponds to the old node being render (useful when the rendering depends on the node kind) andold_propsis the corresponding collection of all properties. Same fornew_nodeandnew_props.optionsare the current diffs options.
-