Page MenuHomeFreeBSD

subversion: update commit message template to allow URLs in PR field
Needs ReviewPublic

Authored by vangyzen on Mar 4 2019, 7:56 PM.

Details

Reviewers
rgrimes
Summary

Following D19426, suggest URLs in addition to PR numbers in the PR field.
Also suggest adding multiple PR lines, which will probably be even more
relevant with the much longer URLs.

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22898
Build 21984: arc lint + arc unit

Event Timeline

vangyzen created this revision.Mar 4 2019, 7:56 PM
rgrimes added inline comments.Mar 4 2019, 10:12 PM
contrib/subversion/subversion/svn/util.c
465

Wouldn't be better to copy this line just change phabric to bugzilla? reviews to bugs?

vangyzen added inline comments.Mar 5 2019, 6:58 PM
contrib/subversion/subversion/svn/util.c
465

I still wanted to say that bare PR numbers are accepted. However, in hindsight, I really want to encourage URLs, so yeah, I'll take your suggestion. Old-timers will still know about bare PR numbers, and new committers will probably want to use URLs anyway.

vangyzen updated this revision to Diff 54737.Mar 5 2019, 7:09 PM

Just mention the URL in the comments.

kristof added a subscriber: kristof.Mar 8 2019, 9:37 AM

https://bugs.freebsd.org/12345 redirects to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=12345. Wouldn't the first form be better? It's shorter and likely easier to map to whatever bug tracker we might move to after bugzilla (if we ever do change). It also looks more like the phabricator links.

https://bugs.freebsd.org/12345 redirects to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=12345. Wouldn't the first form be better? It's shorter and likely easier to map to whatever bug tracker we might move to after bugzilla (if we ever do change). It also looks more like the phabricator links.

@bdrewery and I both independently had the same idea. He mentioned it in D19426.

Yes, the first form would be _far_ better. The problem is getting people to put that in their commit logs. I imagine the vast majority of people will copy it from their browser's address bar. Nobody wants to hand-type a URL from scratch. Very few would copy it from this description into the PR field and modify the bug number. So, we would need the short URL to appear consistently in the address bar. If you know how to make that happen, would you be willing to make the change in Bugzilla and its web server configuration? Do you know someone else who would? I would love to see that happen even if my changes never go in.

An alternative is to add a pre-commit hook that looks for the long URL and either rewrites it to the short URL or rejects the commit and instructs the author to rewrite it. I don't want to modify the commit log in the hook scripts. It's rude and possibly dangerous, and it sets a dangerous precedent for further modifications that are beyond the committer's control. I also don't want to reject the commit, for the same reasons as the previous paragraph. It would also be yet another barrier to committing code. People would complain about the "heavyweight process", and I would tend to agree.

I believe what your wanting is web server re-write rules, that would rewrite the URL in and out of the web pages to have the preffered form. Beyond my area of expertise to implement, but I know it can be done and that is probably the easiest place to do it (ie, no modifying bugzilla should be required.)

@bdrewery and I both independently had the same idea. He mentioned it in D19426.

Ah, I hadn't looked at that review yet.

Yes, the first form would be _far_ better. The problem is getting people to put that in their commit logs. I imagine the vast majority of people will copy it from their browser's address bar. Nobody wants to hand-type a URL from scratch. Very few would copy it from this description into the PR field and modify the bug number. So, we would need the short URL to appear consistently in the address bar. If you know how to make that happen, would you be willing to make the change in Bugzilla and its web server configuration? Do you know someone else who would? I would love to see that happen even if my changes never go in.

I see. Yes, that's an issue. Sadly I'm not too familiar with bugzilla, and I know basically nothing about our bugzilla and webserver configuration. I'd think clusteradm would be the best people to talk to about this.

An alternative is to add a pre-commit hook that looks for the long URL and either rewrites it to the short URL or rejects the commit and instructs the author to rewrite it. I don't want to modify the commit log in the hook scripts. It's rude and possibly dangerous, and it sets a dangerous precedent for further modifications that are beyond the committer's control. I also don't want to reject the commit, for the same reasons as the previous paragraph. It would also be yet another barrier to committing code. People would complain about the "heavyweight process", and I would tend to agree.

Yes, that makes sense too. It *should* be very safe, but I understand the slippery slope aspect of the issue.