Edgewall Software

Ticket #3745 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: bryan@… Owned by: cboos
Priority: normal Milestone: 0.10
Component: version control Version: 0.10b1
Severity: minor Keywords: TracLinks
Cc:

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

Change History

Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • status changed from new to assigned
  • severity changed from normal to minor
  • milestone set to 0.10

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.

Changed 2 years ago by cboos

  • keywords TracLinks added
  • resolution set to fixed
  • status changed from assigned to closed
  • component changed from wiki to version control

Implemented in r3747.

Add/Change #3745 (TracLinks "''source''" could not use line number only without fist giving a specific revision)

Author



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