Ticket #2168 (closed enhancement: fixed)
Opened 6 years ago
Last modified 5 years ago
Universal TracLinks argument
| Reported by: | cboos | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | wiki system | Version: | devel |
| Severity: | minor | Keywords: | TracLinks |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by cboos) (diff)
Currently, each flavor of TracLinks implements its own "sub" syntax.
There is some consistency however, for example,
a trailing "#fragment" is used to locate a specific anchor in the targeted
objects.
This works for section anchors in Wiki pages and more recently
for line numbers in repository files.
Also, there's some support for the special "?format=raw" argument
which works for attachment: links, and it was suggested that source:
links adopt the same convention.
What becomes apparent from the above is that those conventions
are pretty much the same as those used for URIs.
Therefore, I propose to add the query URI syntax
to the TracLinks syntax, for the short and long form of links
(but not for the shorthand forms).
Examples:
- source:trunk/README?format=txt Access the README file in "text" mode
- wiki:WikiStart?format=txt Access the WikiStart page in "text" mode
- log:trunk?limit=10 See the last ten changesets on trunk
- query:?milestone=1.0&owner=cboos See my 1.0 tickets (works already)
- search:?q=google&wiki=on Search for "google" in Wiki pages (works already)
- report:14?PRIORITY=highest ... works in Trac > r2322
Attachments
Change History
comment:1 Changed 6 years ago by cboos
comment:2 Changed 6 years ago by cboos
- Milestone set to 0.9.1
See also #2078, for a similar request concerning changeset: links.
comment:3 Changed 6 years ago by cmlenz
- Milestone changed from 0.9.1 to 0.9.2
comment:4 Changed 6 years ago by cmlenz
- Milestone changed from 0.9.3 to 1.0
comment:5 Changed 6 years ago by cboos
See also #2635 for a discussion about uniform handling of
versioning arguments (e.g. type:id@version for addressing
a specific version of the object, and type:id@versionx:versiony
for addressing a specific change or group of changes for the object).
comment:6 follow-up: ↓ 7 Changed 6 years ago by cboos
- Milestone changed from 1.0 to 0.11
We should also allow fragment identifiers after tickets
(e.g. ticket:2168#comment:5 or #2168#comment:5)
and changesets (e.g. r1231#file3, see #2078).
comment:7 in reply to: ↑ 6 Changed 5 years ago by cboos
Replying to cboos:
We should also allow fragment identifiers after tickets
(e.g. ticket:2168#comment:5 or #2168#comment:5)
...
How funny, I just wanted to write a comment here saying just that... again!
I find the current comment link syntax (e.g. comment:ticket:3555:5) a bit irritating... It was initially modelled after the attachment syntax (e.g. attachment:<resource>:<file>), but in the case of comments, it's really annoying to have to split the comment: prefix and the comment number.
Maybe we could change both syntaxes to thing:which_thing:type:id?
Ideally, this could even be "recursive", e.g. comment:4:attachment:the_file.txt:ticket:345.
Just brainstorming...
comment:8 Changed 5 years ago by cboos
(side-note: the syntax changes suggested in comment:7 were implemented in [3824:3828])
comment:9 Changed 5 years ago by cboos
comment:10 Changed 5 years ago by cboos
- Keywords TracLinks added
comment:11 Changed 5 years ago by cboos
- Description modified (diff)
- Status changed from new to assigned
comment:12 Changed 5 years ago by cboos
- Resolution set to fixed
- Status changed from assigned to closed
... and finally with r4371 and the milestone: TracLinks, the main purpose of this ticket is fulfilled. If there's any issue with the changes introduced (or omissions), please create new defect tickets.
In future iterations of the Wiki engine, more things could probably be done at the generic level, but until that time, the functionality as at least there.



See also #1209, for a similar request concerning milestone: links.