Changes between Version 5 and Version 6 of TracCrossReferences
- Timestamp:
- Sep 1, 2005, 4:12:25 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracCrossReferences
v5 v6 8 8 9 9 A cross-reference is a link from a Trac object (the ''source'') 10 to another Trac object (the '' destination'').10 to another Trac object (the ''target''). 11 11 12 12 Usually, such links are created after processing some Wiki text … … 17 17 * Wiki page ''(has the Cross-references navigation link)'' 18 18 * content facet ''(done)'' 19 * attachment comment facets 19 * attachment comment facets ''<<depends-on #787>>'' 20 20 * Ticket ''(has the Cross-references navigation link)'' 21 21 * ~~summary facet~~ (seems that it was never … … 23 23 * description facet ''(done)'' 24 24 * comments facets ''(done)'' 25 * attachment comment facets 25 * attachment comment facets ''<<depends-on #787>>'' 26 26 * (more to come...) 27 27 * Changeset 28 28 * log message facet 29 29 * Report 30 * title facet30 * ~~title facet~~ ''(see summary facet above)'' 31 31 * description facet 32 32 * Milestone 33 * title facet33 * ~~title facet~~ ''(see summary facet above)'' 34 34 * description facet 35 35 * Source … … 40 40 A cross-reference is also called a ''relation'' when 41 41 an explicit semantic is attached to the link 42 from the source object to the destinationobject.42 from the source object to the target object. 43 43 44 44 If there's no relation defined, one simply knows that the two objects … … 64 64 For example, the ticket form could be extended to include 65 65 a '''duplicate of''' field, activated when the resolution 66 type is set to ''duplicate'' .66 type is set to ''duplicate'' (see #1395). 67 67 The content of that field would be a facet for the ticket 68 68 and any reference found in the facet will create a specific … … 76 76 from the current object to any other Trac object. 77 77 78 I would propose using `<<...>>`, which can be nicely rendered 79 in HTML by [[html(«...»)]]. 78 I would propose using `<<the-relation LinkToTargetedObject>>`, 79 which can be nicely rendered in HTML as 80 [[html(«the-relation)]]LinkToTargetedObject[[html(»)]]. 80 81 81 Example, with the `tag` relation:82 Example, using the `tag` relation (should it be `has-tag`?): 82 83 Writing 83 84 {{{ … … 92 93 <<tag xref, idea, #1242>> 93 94 }}} 94 Would tag this page with theall those 3 objects95 Would tag this page with all those 3 objects 95 96 96 97 ''Undecided issue:'' [[BR]] … … 111 112 the `rel` 112 113 * `Closure(rel)` would provide a brief listing of all Trac objects in 113 the transitive closure of the specified relation .114 * `Count(rel)` would provide a count of the objects matchin the `rel`114 the transitive closure of the specified relation 115 * `Count(rel)` would provide a count of the objects matching the `rel` 115 116 116 The relation description `rel` can be using a similar syntax to the wiki one: 117 * `<<*rel* ...>>` would refer to the source objects 118 related to the specified target by relation `*rel*` 117 The relation description `rel` could be written using a similar syntax 118 to the one used for the wiki and described above. 119 120 The idea being that if there exists a relation `<<A relates-to B>>` 121 then specifying: 122 * `<<A relates-to>>` should result in `B` 123 * `<<relates-to B>>` should result in `A` 124 125 Some concrete examples: 126 * `<<*rel* *tgt*>>` would refer to the source objects 127 related to the specified target object `*tgt*` by the relation `*rel*`. 128 Examples: 119 129 * `<<tag xref>>` all the objects having the `xref` tag 120 130 * `<<depends-on #123>>` all the objects that depend on the ticket !#123 121 * Special object patterns: `.` and `%`131 * Special object patterns: "." and "%" 122 132 * `<<depends-on .>>` all the objects that depend on the current object 123 * `<<depends-on>>` same as above, `.`is the target if none given133 * `<<depends-on>>` same as above, "." is the target if none given 124 134 * `<<tag CS103/%>>` all the objects having a tag which name 125 135 starts with `CS103` 126 * `<<... *rel*>>` would refer to the target objects 127 related to the specified source by relation `*rel*` 136 * `<<*src* *rel*>>` would refer to the target objects 137 related to the specified source object `*src*` by the relation `*rel*`. 138 Examples: 128 139 * `<<. tag>>` would list all tags of the current object 129 140 * `<<% tag>>` would list all tags of any object … … 136 147 137 148 The [source:branches/cboos-dev/xref-branch xref] branch 138 currently contains an implementation for it. 139 It's kept in sync with all my other branches 149 currently contains an implementation of the cross-references, 150 plus the infrastructure needed for the relations. 151 That branch is kept in sync with all my other branches 140 152 (TracDiff and InterTrac) and, as such, 141 i s also kept in sync with the trunk on a regular basis.153 it is also quite in sync with the trunk. 142 154 143 155 See also: … … 146 158 * Relationship and ticket dependencies support: #31, #226 and #886 147 159 * Wiki Page renames: #1106 160 * Other relationships: #449, #508 148 161 149 162 === Refactoring Ideas === … … 158 171 * the ticket components could be be reimplemented using a 159 172 ''has-component'' relation, with the components being 160 wiki pages (1). The advantage would be that a ticket could have multiple 161 components, and that the component could be documented and used in a 162 meaningful way in other relationships (e.g. #548, #1678 and 173 wiki pages [wiki:TracCrossReferences#a1 (1)]. [[comment(foot notes, anyone?)]] 174 The advantage would be that a ticket could have multiple 175 components (#1730), and that the component could be documented (#1233) 176 and used in a meaningful way in other relationships (e.g. #548, #1678 and 163 177 TracMultipleProjects/SingleEnvironment#UsingComponentobjects) 164 178 * idem for the versions, using a ''has-version'' relation 165 179 166 180 ---- 167 (1):: 168 ...Wiki pages created from a !ComponentTemplate page, therefore169 170 171 172 173 181 ===== (1) ===== 182 Components would be Wiki pages created from a !ComponentTemplate page, therefore 183 having an ''is-a'' relationship to the above !ComponentTemplate page. 184 This makes it simple to retrieve all components: 185 those are the `[[Relation(<<is-a ComponentTemplate>>)]]` objects, 186 or, in Python code, 187 {{{ 174 188 #!python 175 189 components = WikiPage(self.env, 'ComponentTemplate').sources('is-a') 176 177 190 }}} 191 Of course, the !ComponentTemplate ''is-a'' !TemplateTemplate...