mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-25 13:19:03 -05:00
fix: name only the pin moves a bump keeps
A bump rolled back for stale prose still printed the pins it would have set (yaps2: upstream_commit -> 7fe1e55 after "nothing was written").
This commit is contained in:
1 parent
4a1d875f43
commit
e63bdd23c2
1 file changed
+9
-5
@@ -3862,15 +3862,16 @@ def _apply_writes(
|
||||
file=sys.stderr,
|
||||
)
|
||||
return
|
||||
for line in applied:
|
||||
print(f"{name}: {recale}{line}")
|
||||
messages = [f"{name}: {recale}{line}" for line in applied]
|
||||
if moved:
|
||||
# Each pin the write changes, as written: a bump that only moved
|
||||
# upstream_commit announced the source_commit it already held.
|
||||
after = yaml.safe_load(target.read_text(encoding="utf-8")) or {}
|
||||
before = yaml.safe_load(path.read_text(encoding="utf-8")) or {}
|
||||
for pin in pins_changed(before, after):
|
||||
print(f"{name}: {bumped}{pin} -> {str(after[pin])[:7]}")
|
||||
messages += [
|
||||
f"{name}: {bumped}{pin} -> {str(after[pin])[:7]}"
|
||||
for pin in pins_changed(before, after)
|
||||
]
|
||||
if not args.dry_run and (applied or moved):
|
||||
original = path.read_bytes()
|
||||
path.write_bytes(target.read_bytes())
|
||||
@@ -3883,9 +3884,12 @@ def _apply_writes(
|
||||
path.write_bytes(original)
|
||||
print(
|
||||
f"{name}: the bump would leave {len(left)} prose citation(s) "
|
||||
"under an older pin, nothing was written; read them first",
|
||||
"under an older pin, nothing was written. Read them first.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return
|
||||
for message in messages:
|
||||
print(message)
|
||||
|
||||
|
||||
def _cited_paths(report: ProfileReport) -> list[str]:
|
||||
|
||||
Reference in new issue
Block a user