Closed
Bug 443989
Opened 16 years ago
Closed 13 years ago
Auto-link "changeset foo" to hgweb
Categories
(bugzilla.mozilla.org :: Extensions, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mrbkap, Unassigned)
References
Details
(Keywords: student-project, Whiteboard: bmo4.0-resolved)
It would be cool if bugzilla auto-linked "changeset foo" to hgweb. So, "changeset 6059b09ca278" would auto-link to http://hg.mozilla.org/index.cgi/mozilla-central/rev/6059b09ca278 . As a note, some people might say "changeset 15693:6059b09ca278".
Comment 1•16 years ago
|
||
'changeset 15693' by itself is meaningless, right?
Reporter | ||
Comment 2•16 years ago
|
||
Pretty much, yeah. Especially once a merge happens all of the non-hash numbers can change.
Comment 3•16 years ago
|
||
It would be nice to support the format that 'hg log' and 'hg outgoing' gives you, since people sometimes paste that into bugs: changeset: 18654:44fa0cbc64ac (Note the colon after 'changeset' and the extra spaces)
Comment 4•16 years ago
|
||
What about changesets not in mozilla-central (e.g. tracemonkey branch or gecko 1.9.1 branch)? Is there a way to give hg.mozilla.org a changeset ID and have it figure out which branch(es) it exists on?
Comment 5•16 years ago
|
||
No
Reporter | ||
Comment 6•16 years ago
|
||
That's what stalled this bug, AFAIK, nobody could agree on a color (way) for saying "mozilla-central changeset foo".
Comment 7•16 years ago
|
||
The problem there is that Bugzilla would need a list of branch names?
Comment 8•16 years ago
|
||
Can we use a hg hook to collect the data that bugzilla needs?
Updated•15 years ago
|
Keywords: student-project
Comment 9•15 years ago
|
||
I'm not sure this is worthwhile: people have been pasting changeset links (from hg.mozilla.org) into bugzilla and it has worked out pretty well... can we just keep using that system?
Comment 10•15 years ago
|
||
It would be a lot easier to link to a changeset if I could just type "changeset" and paste the id from my terminal window. Currently, I have to combine it with a long URL prefix, or load http://hg.mozilla.org/mozilla-central/pushloghtml and copy the entire link.
Reporter | ||
Comment 11•15 years ago
|
||
bz hooked his 'hg log' to automatically give him a link to the hg.mozilla.org revision that he can copy/paste into bugs.
Comment 12•15 years ago
|
||
(In reply to comment #6) > That's what stalled this bug, AFAIK, nobody could agree on a color (way) for > saying "mozilla-central changeset foo". Well this is silly. If anyone wants to get this done, please, with my blessing, pick whatever color you want. Here are two ways it could possibly work. 1. I'm ok with "<repo-name> changeset foo", as in "mozilla-central changeset foo", where foo is 12 or more hex digits. It seems reasonable to default to mozilla-central if the repo-name isn't recognized. 2. Or "changeset foo" and "changeset: 12345:foo" could auto-link to http://hg.mozilla.org/findrev?q=foo and when the user clicks the link, hg.mozilla.org figures out which repository contains the changeset and sends an HTTP redirect. Or whatever. I'm not saying this needs to be a high priority. It really doesn't. I just don't see any significant obstacles to hacking together something useful.
Comment 14•14 years ago
|
||
I just had a quick look at implementing jorendorff's idea 1). Idea 2) is really the one which works best, but it requires Hg server-side support. This is what you've got on the bmo-4.0 branch: my $hgrepos = join('|', qw!(releases/)?comm-[\w.]+ (releases/)?mozilla-[\w.]+ (releases/)?mobile-[\w.]+ tracemonkey tamarin-[\w.]+ camino!); Then the regexp is: /\b(($hgrepos)\s+changeset:?\s+(\d+:)?([0-9a-fA-F]{12}))\b/ and it goes to a URL of the form: https://hg.mozilla.org/$repo/rev/$id So you have to put repo names in in full (e.g. releases/comm-1.9.1). And there's no default repo (to avoid false matches when someone is talking about a random repo). And it only knows a few repo name forms. But hopefully it covers the common cases. Gerv
Assignee: nobody → gerv
Status: NEW → ASSIGNED
Whiteboard: bmo4.0-resolved
Comment 15•13 years ago
|
||
This is in place now on production. Please reopen or file new bug if this is not working in anyway. dkl
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Assignee: gerv → nobody
Component: Bugzilla: Other b.m.o Issues → Extensions
Product: mozilla.org → bugzilla.mozilla.org
QA Contact: general → extensions
Version: other → Current
Comment 16•13 years ago
|
||
It works! Example: mozilla-central changeset c3c4c902e9cd
Updated•5 years ago
|
Component: Extensions: Other → Extensions
You need to log in
before you can comment on or make changes to this bug.
Description
•