Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 10 years ago

#3745 closed enhancement (fixed)

TracLinks "''source''" could not use line number only without first giving a specific revision

Reported by: bryan@… Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: version control Version: 0.10b1
Severity: minor Keywords: traclinks
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Specifying line number without revision might not be reasonable, but from time to time, I found it annoying to specify the revision when I'm targeting to the same tag directory.

I think having such flexibility might be a good thing. For example, this makes "source:/path/name@#L10" work.

--- trac/trunk/lib/python2.4/site-packages/trac/versioncontrol/web_ui/util.py  (revision 34)
+++ trac/trunk/lib/python2.4/site-packages/trac/versioncontrol/web_ui/util.py  (revision 35)
@@ -85,7 +85,7 @@
         })
     return links

-rev_re = re.compile(r"([^@#:]*)[@#:]([^#]+)(?:#L(\d+))?")
+rev_re = re.compile(r"([^@#:]*)[@#:]([^#]+)?(?:#L(\d+))?")

 def get_path_rev_line(path):
     rev = None

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 18 years ago

Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor
Status: newassigned

You could already achieve this by specifying head as the revision, but I'm going to implement your suggestion anyway because it nicely addresses the concerns I had that omitting the revision might be accidental: if source:path@#L100 is allowed but not source:path#L100, it's clear that you left out the revision number intentionally.

See also #3644.

comment:2 by Christian Boos, 18 years ago

Component: wikiversion control
Keywords: TracLinks added
Resolution: fixed
Status: assignedclosed

Implemented in r3747.

comment:3 by Ryan J Ollos, 11 years ago

Keywords: traclinks added; TracLinks removed

comment:4 by Ryan J Ollos, 11 years ago

Keywords: traclink added; traclinks removed

comment:5 by Ryan J Ollos, 11 years ago

Keywords: traclinks added; traclink removed

comment:6 by Ryan J Ollos, 10 years ago

Summary: TracLinks "''source''" could not use line number only without fist giving a specific revisionTracLinks "''source''" could not use line number only without first giving a specific revision

Documentation for this feature was added in #11541.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.