Accept Bugzilla URLs in "PR" lines in commit logs.
Still accepted are multiple PRs per line, commas,
extra text, references, and mixed case "Pr/pR/pr" tags.
GNATS category tags, such as kern/1234, are no longer accepted.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 23645 Build 22627: arc lint + arc unit
Event Timeline
Missing is the change to the commit message template to update it to say URL instead of PRxxxx
hooks/scripts/extract_pr_numbers.py | ||
---|---|---|
30 | $FreeBSD$ |
Check out rP154065.
All of the PRs linked there were filed in GNATS but were mapped over in BUGZILLA so they had the same numbers.
Had they been GNATS urls they would be more annoying to deal with IMO as the links would all be dead now. I realize this is an objective opinion. I would be comfortable with simply "https://bugs.freebsd.org/12344" as that can likely work forever.
We would need the same changes over in ports and docs repos as well.
And phabricator matching.
You might want to discuss this on a mailing list to see what else is parsing the format.
I imagine we could write a URL redirector easily enough. As an example, I just wrote one to redirect a Bugzilla URL to whatever system we have next:
https://people.freebsd.org/~vangyzen/show_bug.cgi.txt
Of course, it just redirects to bugzilla for now. Also, CGI is not enabled in our public_html, so you just get to read the code, not test it. (I tested it locally.)
I would be comfortable with simply "https://bugs.freebsd.org/12344" as that can likely work forever.
I considered that, and I would prefer it very much. The problem is, Someone(TM) would need to modify Bugzilla to produce those URLs, because the address bar in the browser is the one place people will get the URL for copy-and-pasting into the commit log. I am not inclined to make that change. The URL redirector will be easy enough, when the time comes.
We would need the same changes over in ports and docs repos as well.
Will do. I think I'll get some more feedback before porting it over, but I'll commit to all three at the same time.
And phabricator matching.
I don't understand. If you're referring to the web UI, that already turns all URLs into links (as you probably knew). I'm not sure what else you could be referring to, though.
You might want to discuss this on a mailing list to see what else is parsing the format.
Good idea. Thanks.
To keep the whole record in one place, here is the CGI script I mentioned:
#!/bin/sh # disable filename globbing set -f if id=$(expr "$QUERY_STRING" : '^id=\([0-9][0-9]*\)$') then printf 'Refresh: 0;https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=%d\r\n' "$id" fi printf '\r\n'
I would be comfortable with simply "https://bugs.freebsd.org/12344" as that can likely work forever.
Note that https://bugs.freebsd.org/12344 does work - we should accept either https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= or https://bugs.freebsd.org/[0-9]+
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=[0-9]+ or https://bugs.freebsd.org/[0-9]+ (Added [0-9] to first)
I put an updated (case insensitive URL, python3, etc.) version of extract_pr_numbers.py at https://bugs.freebsd.org/236229