Bug 190956

Summary: Parse and link (repository) commit references in issue comments
Product: Services Reporter: Alexey Dokuchaev <danfe>
Component: Bug TrackerAssignee: Marcus von Appen <mva>
Status: Closed FIXED    
Severity: Affects Many People CC: bugmeister, koobs
Priority: Normal Keywords: feature, needs-qa
Version: unspecified   
Hardware: Any   
OS: Any   

Description Alexey Dokuchaev freebsd_committer freebsd_triage 2014-06-12 02:56:16 UTC
It would be nice and handy if say "SVN/ports rXXXXXX" text in a Bugzilla comment text would be converted to a link to http://svnweb.freebsd.org/ports?view=revision&revision=XXXXXX.  Ditto for src (base) and docs repos.  For a live example, check some random bugs on GitHub and notice that commit hashes are clickable links.

Something like these guys discuss here: http://www.wireshark.org/lists/wireshark-dev/201204/msg00003.html

Our case is a bit more complicated because we have multiple repos though.
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2014-09-22 10:12:39 UTC
In contrast to SVN, git commit hashes are unique, so a commit hash should not exist for two different repositories or projects.

Adding a parser for referencing SVN is not that hard. The problem is how to avoid wrong assumptions.

a) "Check out r14775 from project foo: http://svn.awesomefoo.meh/..." -> we do not want a link pointing to our repos.
b) reference base, doc, ports, etc. This means a non-intuitive aproach.

What I could imagine, would be something like Phabric does:

rP12345 -> ports revision
rS12345 -> src/base revision
rD12345 -> doc revision

Or, to be similar to bug XXXXX and comment XX syntax:

ports 123456
src 123456
doc 123456

I'd favour the latter, since it's more intuitive for a bugzilla user.
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2014-09-22 10:53:58 UTC
Extension is created, but not rolled out yet:

https://github.com/freebsd/bugzilla/commit/c6a249e5e38fe6144cc5eec0cc312266f5b861d0

Supported repos would be: base, ports, doc
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2014-09-29 15:55:07 UTC
SVN links are now available. Supported link types are:

ports <number>
base <number>
doc <number>
reviews D<number>
Comment 4 Alexey Dokuchaev freebsd_committer freebsd_triage 2014-11-15 15:06:23 UTC
Have been using it for a short while, seems to work fine, thanks!

I'm a bit worried about overly simple matching scheme (e.g. I've personally would probably require explicit "r" prefix for revision and/or "SVN/repo" instead of just "repo"), but so far it did not clash with my usage of English.