Mercurial > hg
comparison mercurial/revlogutils/debug.py @ 49677:05db41701ece
find-delta: pass the cache-delta usage policy alongside the cache-delta
The idea is to give higher level code more control to what will happens with
the cache delta passed. This should help with controling how we treat delta's
from different sources.
The final goal of this change is to allow for server modes where the client can
blindly accept any server delta without regards to any local constraints. This
will be implemented in later changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 07 Nov 2022 22:12:59 -0500 |
parents | 4302db0f54c8 |
children | b1e4c74beb6f |
comparison
equal
deleted
inserted
replaced
49676:4302db0f54c8 | 49677:05db41701ece |
---|---|
644 | 644 |
645 if base_rev != nodemod.nullrev: | 645 if base_rev != nodemod.nullrev: |
646 base_text = revlog.revision(base_rev) | 646 base_text = revlog.revision(base_rev) |
647 delta = mdiff.textdiff(base_text, full_text) | 647 delta = mdiff.textdiff(base_text, full_text) |
648 | 648 |
649 cachedelta = (base_rev, delta) | 649 cachedelta = (base_rev, delta, constants.DELTA_BASE_REUSE_TRY) |
650 btext = [None] | 650 btext = [None] |
651 | 651 |
652 revinfo = revlogutils.revisioninfo( | 652 revinfo = revlogutils.revisioninfo( |
653 node, | 653 node, |
654 p1, | 654 p1, |