diff mercurial/filelog.py @ 47821:c30ca163b45e stable

issue6528: also filter delta on the fly when applying a changegroup This ensure that corrupted clone does not spread corruption to "fixed" version. This might come at a performance cost, we will had a config option to control this behavior in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D11270
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 07 Aug 2021 14:12:28 +0200
parents 436932c2cfaa
children 2813d406b036
line wrap: on
line diff
--- a/mercurial/filelog.py	Sat Aug 07 14:13:53 2021 +0200
+++ b/mercurial/filelog.py	Sat Aug 07 14:12:28 2021 +0200
@@ -20,6 +20,7 @@
 from .utils import storageutil
 from .revlogutils import (
     constants as revlog_constants,
+    rewrite,
 )
 
 
@@ -158,6 +159,9 @@
             )
 
         with self._revlog._writing(transaction):
+
+            deltas = rewrite.filter_delta_issue6528(self._revlog, deltas)
+
             return self._revlog.addgroup(
                 deltas,
                 linkmapper,