Last modified: 2012-11-07 09:26:49 UTC
People will need to refer, in Bugzilla comments, to changeset "Change ID"s (SHA-1s) and to the changeset numbers in the Gerrit changeset URL for any given diff. So: * Convert the Bugzilla code to recognize the new SHA-1 commits * Come up with a shorthand to autolink from BZ to gerrit changeset
Doing this should be reasonably trivial... Weve got to decide on the syntax for identifying it. In the simplest form a sha1 has is only really distinguishable from words byit having numbers in it. Even tjen on shorthand it may be letters, which could in theory bea word
The Gerrit UI seems to prefix Git ids with a capital "I", even offering a button for copying the full SHA-1 hash to the clipboard prefixed with the "I". It's not what I would have chosen, but I wonder if Gerrit is following some convention established elsewhere. Worth looking into, and may be a good default barring a better suggestion. For Gerrit links, since we're not 100% convinced we want to stay with Gerrit for very long, it may be best to use something like "Gerrit change #12345" or "gerrit:12345" that will be relatively easy to search for in the distant future should we switch away from Gerrit in the near future.
Not a blocker for the March 21st migration.
Testing a couple of accepted formats: Gerrit change #1234 Gerrit change #1234 Gerrit change #1234 Gerrit change #1234 Gerrit change #1234 Gerrit change #1234
change ##### change 1234
What other syntaxes do we want here?
Giving the rendering of comment 4 (all six lines are rendered as the same HTML), it is hard to tell which syntax are supported.
http://svn.wikimedia.org/viewvc/mediawiki/trunk/tools/bugzilla/bugzilla-4.0/extensions/Wikimedia/Extension.pm?view=annotate#l53
(In reply to comment #7) > Giving the rendering of comment 4 (all six lines are rendered as the same > HTML), it is hard to tell which syntax are supported. Would it be possible to leave the original text so that we can see what works?
(In reply to comment #9) > (In reply to comment #7) > > Giving the rendering of comment 4 (all six lines are rendered as the same > > HTML), it is hard to tell which syntax are supported. > > Would it be possible to leave the original text so that we can see what works? I posted a link to the regex above, but here it is: gerrit(\ change(set)?)?\ ?\#?(\d+)
(In reply to comment #10) > I posted a link to the regex above, but here it is: I understood your link to the regex, but what I was asking is if we made a link like "gerrit #1" to remain as is (i.e. no “change”) instead of all of the links being displayed the same way. (I'm assuming I understand what is going on and that the links will be parsed and displayed a certain way.)
It would also be nice to have a shortened syntax, as we used to have r100000, unless we now think that it's very evil and confusing (maybe it is). I don't know what letter(s) to use, maybe g for gerrit or c for change(set)? g4020, c4020. (I suppose it would be better to imitate what other git users do out there.) P.s.: I've added the syntax to https://www.mediawiki.org/wiki/Bugzilla#What_syntax_can_I_use.3F
Gerrit change #1234 Gerrit change #1234 patchset 2 :p
Change-Id: Ifdc79e9c5d95f978025b237a5eeb95fd75092f46
gerrit Ifdc79e9c5d95f978025b237a5eeb95fd75092f46
Can we make above text autolinked?
Resetting to default per bug 37789
It looks like auto-linking by SHA1 was done by Krinkle in r115448. Is this correct? If so, what needs to happen to push this change live?
(In reply to comment #18) > It looks like auto-linking by SHA1 was done by Krinkle in r115448. Is this > correct? If so, what needs to happen to push this change live? I think it's live now? Some people are using c12345 as a shortcut to the (boring) Gerrit change #12345, maybe that could be the new r12345?
Note that "Gerrit change #12345" in the previous comment is currently not autolinking, maybe for newlines?
Does Gerrit change #12345 work? (it should)
Closing, as this appears to have been implemented. There is a separate bug (Bug 40344) about the URL mangling which appears to affect some auto-links.