feat: each citation names the code that asks

A profile that reads a libretro core and the original emulator cited both trees alike, and readers could not tell whether the core or the emulator asked for a file. A cited path now opens with source or upstream, the repository its lines are in. Emulator code a port carries is attributed upstream when the original holds the same value on the cited line.

profile_sync --attribute-refs writes the words from where the lines are found and follows a word already written. The site links each citation to that repository's pin, labels it libretro core or upstream emulator, and says on each file card whose code asks for it. A recale keeps the word, and mame_ref_audit reads the tree it names.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 05:52:13 +02:00
1 parent adea35e12a
commit dec0fdc163
9 files changed
+306 -21

No files matched your search

+2 -2
View File
@@ -26,7 +26,7 @@ sys.path.insert(0, os.path.dirname(__file__))
import upstream
from common import suggest_names
from profile_sync import collect_citations, select_views, split_source_ref
from profile_sync import collect_citations, ref_role, select_views, split_source_ref
from safeparse import yaml_load
# Ways a program asks for somewhere to read from.
@@ -45,7 +45,7 @@ def cited_paths(document: dict) -> list[str]:
seen: list[str] = []
for citation in collect_citations(document):
for part in split_source_ref(citation.ref):
path = part.path
path = ref_role(part.path)[1]
if path.endswith(SOURCE_SUFFIX) and path not in seen:
seen.append(path)
return seen