Edgewall Software

Ticket #2100 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Implement a TracLinks syntax for targeting line numbers in repository files

Reported by: cboos Owned by: cmlenz
Priority: normal Milestone: 0.9
Component: version control/browser Version: devel
Severity: normal Keywords: source link line number
Cc:

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

Change History

Changed 3 years ago by mgood

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.

Changed 3 years ago by cmlenz

  • owner changed from cboos to cmlenz
  • status changed from new to assigned
  • component changed from wiki to browser
  • milestone set to 0.9

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.

Changed 3 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Implemented in [2290].

Changed 3 years ago by mgood

  • status changed from closed to reopened
  • resolution fixed deleted

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.

Changed 3 years ago by cmlenz

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in [2299].

Add/Change #2100 (Implement a TracLinks syntax for targeting line numbers in repository files)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.