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)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Cykesiopka, Assigned: gps)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
13.80 KB,
image/png
|
Details |
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.
Comment 1•10 years ago
|
||
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>
Comment 4•10 years ago
|
||
[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]
Assignee | ||
Updated•10 years ago
|
Comment 5•10 years ago
|
||
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.
Comment 6•10 years ago
|
||
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...
Assignee | ||
Comment 7•10 years ago
|
||
I believe websub should be a no-op in production.
buglink.py in v-c-t is the same as on production.
Comment 8•10 years ago
|
||
(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.
Assignee | ||
Comment 10•10 years ago
|
||
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.
Assignee | ||
Comment 11•10 years ago
|
||
Assignee | ||
Comment 12•10 years ago
|
||
Trivial fix deployed.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Assignee: nobody → gps
You need to log in
before you can comment on or make changes to this bug.
Description
•