Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filelog.py @ 47816: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 |
comparison
equal
deleted
inserted
replaced
47815:436932c2cfaa | 47816:c30ca163b45e |
---|---|
18 util as interfaceutil, | 18 util as interfaceutil, |
19 ) | 19 ) |
20 from .utils import storageutil | 20 from .utils import storageutil |
21 from .revlogutils import ( | 21 from .revlogutils import ( |
22 constants as revlog_constants, | 22 constants as revlog_constants, |
23 rewrite, | |
23 ) | 24 ) |
24 | 25 |
25 | 26 |
26 @interfaceutil.implementer(repository.ifilestorage) | 27 @interfaceutil.implementer(repository.ifilestorage) |
27 class filelog(object): | 28 class filelog(object): |
156 b'parents write mode' | 157 b'parents write mode' |
157 ) | 158 ) |
158 ) | 159 ) |
159 | 160 |
160 with self._revlog._writing(transaction): | 161 with self._revlog._writing(transaction): |
162 | |
163 deltas = rewrite.filter_delta_issue6528(self._revlog, deltas) | |
164 | |
161 return self._revlog.addgroup( | 165 return self._revlog.addgroup( |
162 deltas, | 166 deltas, |
163 linkmapper, | 167 linkmapper, |
164 transaction, | 168 transaction, |
165 addrevisioncb=addrevisioncb, | 169 addrevisioncb=addrevisioncb, |