Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

#2100 closed enhancement (fixed)

Implement a TracLinks syntax for targeting line numbers in repository files

Reported by: Christian Boos Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: version control/browser Version: devel
Severity: normal Keywords: source link line number
Cc: Branch:
Release Notes:
API Changes:

Description

In order to support code reviews, either formal or informal, it's necessary to be able to precisely refer to line numbers.

Trac should support a simple syntax for this. I would suggest the following (lifted from ticket #2011):

While it's obvious what the target of a link to a single line number should be, the target of a range is a little bit less obvious.

Attachments (0)

Change History (5)

comment:1 by Matthew Good, 14 years ago

Yes, I think this would be generally preferrable to current use of # for specifying a revision. However, I think that we should use the existing line anchors which are like #l100 (though in some ways I'd sort of prefer to change that to #line100, since the lower case 'l' can look a bit like a '1', which is confusing).

Is there any precedence in Trac for deprecating Wiki syntaxes? I think that the current #rev syntax should be removed at some point after the @rev is implemented, but I don't know how we'd want to handle that.

comment:2 by Christopher Lenz, 14 years ago

Component: wikibrowser
Milestone: 0.9
Owner: changed from Christian Boos to Christopher Lenz
Status: newassigned

I don't see how we could support line number ranges, but the rest looks good.

About change #l100 to #line100 I'm not sure that's worth the extra three bytes per line. Maybe just use an upper-case L to avoid it being confused with a 1.

comment:3 by Christopher Lenz, 14 years ago

Resolution: fixed
Status: assignedclosed

Implemented in [2290].

comment:4 by Matthew Good, 14 years ago

Resolution: fixed
Status: closedreopened

Ok, yeah the uppercase L seems sufficiently clear. However, my main point above was that it seems more consistent to use source:/README@123#L12 so the anchor in the link syntax is the same as the actual URL anchor.

comment:5 by Christopher Lenz, 14 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in [2299].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.