fix(diffs): bumped diffs cache to invalidate previous logic on single branch

This commit is contained in:
RhodeCode Admin 2025-12-23 20:10:49 +01:00
parent b7c79549cc
commit 6f780dccb1

View file

@ -269,13 +269,15 @@ class DiffProcessor(object):
end += 1
if start or end:
def do(l):
last = end + len(l["line"])
if l["action"] == Action.ADD:
def do(_line):
last = end + len(_line["line"])
if _line["action"] == Action.ADD:
tag = "ins"
else:
tag = "del"
l["line"] = f"{l['line'][:start]}<{tag}>{l['line'][start:last]}</{tag}>{l['line'][last:]}"
_line["line"] = (
f"{_line['line'][:start]}<{tag}>{_line['line'][start:last]}</{tag}>{_line['line'][last:]}"
)
do(line)
do(next_)
@ -1045,8 +1047,8 @@ class DiffLimitExceeded(Exception):
# NOTE(marcink): if diffs.mako change, probably this
# needs a bump to next version
CURRENT_DIFF_VERSION = "v5"
# needs a bump to the next version
CURRENT_DIFF_VERSION = "v6"
def _cleanup_cache_file(cached_diff_file):