Closed Bug 1123992 Opened 10 years ago Closed 10 years ago

rev/changeset pages displaying extra BMO links in commit messages -- bug numbers replaced with: [number] title="Bug [number]">Bug [number]

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Cykesiopka, Assigned: gps)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See the attached screenshot, which corresponds to: https://hg.mozilla.org/mozilla-central/rev/5e415846b951 Apologies ahead of time if this was already filed or being worked on.
Blocks: 1117021
As a result of: <div class="page_body"> <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1100917">1100917</a>" title="<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1100917">Bug 1100917</a>"><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1100917">Bug 1100917</a></a> - Add config options for SSL3/RC4 only servers to ssltunnel. r=ted </div>
[making summary a bit more verbose about the symptom, to enhance discoverability & reduce dupe-filings]
Summary: rev/changeset pages displaying extra BMO links → rev/changeset pages displaying extra BMO links in commit messages -- bug numbers replaced with: [number] title="Bug [number]">Bug [number]
No longer blocks: 1117021
Depends on: 1117021
Hmm. So I tried to reproduce this locally using the directions at bug 1124253 comment 2 but the tip of the version-control-tools repo, and it works fine locally. I can get behavior kinda like what we see if I throw "buglink" in the page_body div more than once, but the template in the repo clearly has it only once.
Is it possible that the deployed buglink is not hgext/pushlog-legacy/buglink.py? The only change to the page_body bit recently was: -{desc|strip|escape|buglink|addbreaks} +{desc|strip|escape|websub|buglink|addbreaks} which seems unlikely to cause the observed behavior...
I believe websub should be a no-op in production. buglink.py in v-c-t is the same as on production.
(In reply to Gregory Szorc [:gps] from comment #7) > I believe websub should be a no-op in production. I don't think it can be. Annotation pages link to bugzilla fine with only {desc|strip|escape|websub|addbreaks|nonempty} https://hg.mozilla.org/hgcustom/version-control-tools/annotate/f103ed0e8f00/hgtemplates/gitweb_mozilla/fileannotate.tmpl There's also a difference in output. Annotation pages get <a href="[buglink]" title="Bug #">Bug #</a> buglink.py only does <a href="[buglink]">Bug #</a> And this matches up with the error output, which is buglink being applied to the link with the title attribute.
I tracked down the issue. The global hgrc on the servers has the following: [interhg] a_httplinks = s|(https?://\S+)|<a href="\1">\1</a>|i bugzilla = s|((?:bug[\s#]*|b=#?|#)(\d{4,}))|<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=\2" title="Bug \2">\1</a>|i While the "interhg" extension is not enabled, Mercurial maintains backwards compatibility and equates [interhg] with [websub] (http://selenic.com/repo/hg/file/1265a3a71d75/mercurial/hgweb/hgweb_mod.py#l279). So, having buglink.py and this [interhg] section effectively result in double escaping. A proper fix will require Puppet changes. A more proper fix means killing one of buglink.py or the [websub] entry, probably the former.
Trivial fix deployed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → gps
Blocks: 1125680
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: