feat: say why an upstream revision is held

The emulator page showed the reason for pin_frozen and never the one for upstream_frozen, which 11 profiles record: mupen64plus read as left behind HEAD.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 19:29:22 +01:00
1 parent 1b388e3cdc
commit 4bc9074dfe
2 files changed
+19 -4

No files matched your search

+8 -4
View File
@@ -7984,10 +7984,14 @@ def _build_rows(profile: dict) -> list[str]:
found = _found_by_text(profile.get("found_by"))
if found:
rows.append(f"| Files found by | {found} |")
frozen = profile.get("pin_frozen")
if frozen:
held = _escape_tags(' '.join(str(frozen).split())).replace('|', r'\|')
rows.append(f"| Revision held | {held} |")
# Each pin says why it is held: a bare upstream revision read as a
# profile left behind HEAD (mupen64plus, aps3e).
for field, label in (("pin_frozen", "Revision held"),
("upstream_frozen", "Upstream revision held")):
frozen = profile.get(field)
if frozen:
held = _escape_tags(' '.join(str(frozen).split())).replace('|', r'\|')
rows.append(f"| {label} | {held} |")
announced = profile.get("version_source")
if isinstance(announced, dict) and announced.get("url"):
url = str(announced["url"])
+11
View File
@@ -68,6 +68,17 @@ class WhoShipsTheBuildAndWhy(unittest.TestCase):
"(https://example.org/news) (version 13.0 announced there, "
"found only as rebuilt copies) |", page)
def test_the_upstream_pin_says_why_it_is_held(self):
"""mupen64plus showed its core revision and not that AmberELEC
builds that one: read as a profile behind HEAD."""
page = _page("mupen64plus", {
"type": "libretro",
"upstream_frozen": "AmberELEC builds the core at this revision.",
"files": [],
})
self.assertIn("| Upstream revision held | AmberELEC builds the core at this "
"revision. |", page)
class ACardKeepsItsAddress(unittest.TestCase):
"""emulators/raze/#file-duke3d-grp stopped pointing at its card once a