TracLinks "''source''" could not use line number only without first giving a specific revision
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
Change History
(6)
| Milestone: |
→ 0.10
|
| Owner: |
changed from Jonas Borgström to Christian Boos
|
| Severity: |
normal → minor
|
| Status: |
new → assigned
|
| Component: |
wiki → version control
|
| Keywords: |
TracLinks added
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
| Keywords: |
traclinks added; TracLinks removed
|
| Keywords: |
traclink added; traclinks removed
|
| Keywords: |
traclinks added; traclink removed
|
| Summary: |
TracLinks "''source''" could not use line number only without fist giving a specific revision → TracLinks "''source''" could not use line number only without first giving a specific revision
|
You could already achieve this by specifying
headas 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: ifsource:path@#L100is allowed but notsource:path#L100, it's clear that you left out the revision number intentionally.See also #3644.